From 1ea6936fb1e56a772c2af326b43c663111448748 Mon Sep 17 00:00:00 2001 From: Corey Date: Wed, 7 Feb 2024 01:25:39 -0800 Subject: [PATCH] feat: Add support for `import_meta` in Notification Subscription --- src/Entities/Notification/NotificationSubscription.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Entities/Notification/NotificationSubscription.php b/src/Entities/Notification/NotificationSubscription.php index 63a3d7b..4551822 100644 --- a/src/Entities/Notification/NotificationSubscription.php +++ b/src/Entities/Notification/NotificationSubscription.php @@ -10,6 +10,7 @@ use Paddle\SDK\Entities\Shared\CollectionMode; use Paddle\SDK\Entities\Shared\CurrencyCode; use Paddle\SDK\Entities\Shared\CustomData; +use Paddle\SDK\Entities\Shared\ImportMeta; use Paddle\SDK\Entities\Shared\TimePeriod; use Paddle\SDK\Entities\Subscription\SubscriptionDiscount; use Paddle\SDK\Entities\Subscription\SubscriptionItem; @@ -46,6 +47,7 @@ protected function __construct( public SubscriptionScheduledChange|null $scheduledChange, public array $items, public CustomData|null $customData, + public ImportMeta|null $importMeta, ) { } @@ -77,6 +79,7 @@ public static function from(array $data): self : null, items: array_map(fn (array $item): SubscriptionItem => SubscriptionItem::from($item), $data['items']), customData: isset($data['custom_data']) ? new CustomData($data['custom_data']) : null, + importMeta: isset($data['import_meta']) ? ImportMeta::from($data['import_meta']) : null, ); } }