From ffbcf3a5fd75f457468997c639269f3c3ce8b398 Mon Sep 17 00:00:00 2001 From: cb-alish Date: Mon, 8 Jun 2026 10:37:10 +0530 Subject: [PATCH] Releasing v4.21.0 --- CHANGELOG.md | 60 +++++++++++++++++++ VERSION | 2 +- .../Contracts/ExportActionsInterface.php | 8 +-- .../Contracts/GiftActionsInterface.php | 9 ++- .../Contracts/HostedPageActionsInterface.php | 1 + .../Contracts/InvoiceActionsInterface.php | 3 - .../Contracts/ItemActionsInterface.php | 2 +- .../Contracts/ItemFamilyActionsInterface.php | 2 +- .../Contracts/ItemPriceActionsInterface.php | 2 +- ...mnichannelSubscriptionActionsInterface.php | 24 ++++++++ .../PriceVariantActionsInterface.php | 2 +- src/Actions/ExportActions.php | 8 +-- src/Actions/GiftActions.php | 9 ++- src/Actions/HostedPageActions.php | 1 + src/Actions/InvoiceActions.php | 3 - src/Actions/ItemActions.php | 2 +- src/Actions/ItemFamilyActions.php | 2 +- src/Actions/ItemPriceActions.php | 2 +- .../OmnichannelSubscriptionActions.php | 24 ++++++++ src/Actions/PriceVariantActions.php | 2 +- src/Enums/EnabledEvents.php | 2 + src/Enums/EventType.php | 2 + src/Enums/PaymentMethod.php | 5 ++ src/Enums/PaymentMethodType.php | 7 ++- src/Enums/Type.php | 7 ++- src/Resources/Content/Content.php | 16 +---- .../OmnichannelSubscription.php | 22 ++++++- .../OmnichannelSubscriptionItem.php | 12 +++- .../PaymentIntent/Enums/PaymentMethodType.php | 7 ++- src/Version.php | 2 +- 30 files changed, 202 insertions(+), 48 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9020d92..ec1fed6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,63 @@ +### v4.21.0 (2026-06-08) +* * * +### New Attributes: +- [`purchased_at`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/omnichannel-subscription-object#purchased_at) has been added to [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions). +- [`updated_at`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/omnichannel-subscription-object#updated_at) has been added to [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions). +- [`updated_at`](https://apidocs.chargebee.com/docs/api/omnichannel_subscription_items/omnichannel-subscription-item-object#updated_at) has been added to [`OmnichannelSubscriptionItem`](https://apidocs.chargebee.com/docs/api/omnichannel_subscription_items). + + +### New Parameters: +- [`customer_id.in`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#customer_id_in) has been added as query parameter to [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) in [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions). +- [`customer_id.not_in`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#customer_id_not_in) has been added as query parameter to [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) in [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions). +- [`id`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#id) has been added as query parameter to [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) in [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions). +- [`id_at_source`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#id_at_source) has been added as query parameter to [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) in [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions). +- [`updated_at`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#updated_at) has been added as query parameter to [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) in [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions). +- [`purchased_at`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#purchased_at) has been added as query parameter to [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) in [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions). +- [`gift_receiver`](https://apidocs.chargebee.com/docs/api/gifts/update-a-gift#gift_receiver) has been added as request body parameter to [`update_a_gift`](https://apidocs.chargebee.com/docs/api/gifts/update-a-gift) in [`Gift`](https://apidocs.chargebee.com/docs/api/gifts). +- [`layout`](https://apidocs.chargebee.com/docs/api/hosted_pages/checkout-gift-subscription-for-items#layout) has been added as request body parameter to [`checkout_gift_subscription_for_items`](https://apidocs.chargebee.com/docs/api/hosted_pages/checkout-gift-subscription-for-items) in [`HostedPage`](https://apidocs.chargebee.com/docs/api/hosted_pages). + + +### Parameter Updates: +- [`scheduled_at`](https://apidocs.chargebee.com/docs/api/gifts/update-a-gift#scheduled_at) has been changed from required to optional in [`update_a_gift`](https://apidocs.chargebee.com/docs/api/gifts/update-a-gift) of [`Gift`](https://apidocs.chargebee.com/docs/api/gifts). + + +### New Events: +- [`omnichannel_subscription_item_updated`](https://apidocs.chargebee.com/docs/api/events/webhook/omnichannel_subscription_item_updated) has been added. +- [`omnichannel_subscription_item_recovered`](https://apidocs.chargebee.com/docs/api/events/webhook/omnichannel_subscription_item_recovered) has been added. + + +### Deleted Resources: +- QuoteEntitlement has been removed. + + +### Deleted Attributes: +- `entity_id` has been removed from `QuoteEntitlement`. +- `entity_type` has been removed from `QuoteEntitlement`. +- `feature_id` has been removed from `QuoteEntitlement`. +- `value` has been removed from `QuoteEntitlement`. +- `is_enabled` has been removed from `QuoteEntitlement`. +- `start_date` has been removed from `QuoteEntitlement`. +- `end_date` has been removed from `QuoteEntitlement`. +- `created_at` has been removed from `QuoteEntitlement`. +- `modified_at` has been removed from `QuoteEntitlement`. + + +### Deleted Parameters: +- `exclude` has been removed as query parameter from [`list_invoices`](https://apidocs.chargebee.com/docs/api/invoices/list-invoices) in [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices). + + +### New Enums: +- `omnichannel_subscription_item_updated` and `omnichannel_subscription_item_recovered` have been added as new values enum `EventType`. +- `klarna`, `alipay_hk`, `paypay`, `gcash`, and `south_korean_cards` have been added as new values enum `PaymentMethod`. +- `klarna`, `alipay_hk`, `paypay`, `gcash`, and `south_korean_cards` have been added as new values enum `PaymentMethodType`. +- `klarna`, `alipay_hk`, `paypay`, `gcash`, and `south_korean_cards` have been added as new values enum `Type`. +- `klarna`, `alipay_hk`, `paypay`, `gcash`, and `south_korean_cards` have been added as new values to enum attribute [`payment_method_type`](https://apidocs.chargebee.com/docs/api/payment_intents/payment-intent-object#payment_method_type) in [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents). +- `klarna`, `alipay_hk`, `paypay`, `gcash`, and `south_korean_cards` have been added as new values to enum attribute [`active_payment_attempt.payment_method_type`](https://apidocs.chargebee.com/docs/api/payment_intents/payment-intent-object#active_payment_attempt_payment_method_type) in [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents). +- `klarna`, `alipay_hk`, `paypay`, `gcash`, and `south_korean_cards` have been added as new values to enum request body parameter `payment_method_type` in [`update_a_payment_intent`](https://apidocs.chargebee.com/docs/api/payment_intents/update-a-payment-intent) of [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents). +- `klarna`, `alipay_hk`, `paypay`, `gcash`, and `south_korean_cards` have been added as new values to enum request body parameter `payment_method_type` in [`create_a_payment_intent`](https://apidocs.chargebee.com/docs/api/payment_intents/create-a-payment-intent) of [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents). + + + ## 4.20.1 (2026-06-01) ### Fixed diff --git a/VERSION b/VERSION index 2c9b9c37..7c6be317 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.20.1 +4.21.0 diff --git a/src/Actions/Contracts/ExportActionsInterface.php b/src/Actions/Contracts/ExportActionsInterface.php index dcd6b57e..35c8546e 100644 --- a/src/Actions/Contracts/ExportActionsInterface.php +++ b/src/Actions/Contracts/ExportActionsInterface.php @@ -395,8 +395,8 @@ public function differentialPrices(array $params = [], array $headers = []): Dif * }, * }, * business_entity_id?: array{ - * is_present?: mixed, * is?: mixed, + * is_present?: mixed, * }, * include_site_level_resources?: array{ * is?: mixed, @@ -602,8 +602,8 @@ public function retrieve(string $id, array $headers = []): RetrieveExportRespons * }, * }, * business_entity_id?: array{ - * is_present?: mixed, * is?: mixed, + * is_present?: mixed, * }, * include_site_level_resources?: array{ * is?: mixed, @@ -693,8 +693,8 @@ public function priceVariants(array $params = [], array $headers = []): PriceVar * }, * }, * business_entity_id?: array{ - * is_present?: mixed, * is?: mixed, + * is_present?: mixed, * }, * include_site_level_resources?: array{ * is?: mixed, @@ -1862,8 +1862,8 @@ public function orders(array $params = [], array $headers = []): OrdersExportRes * not_in?: mixed, * }, * business_entity_id?: array{ - * is_present?: mixed, * is?: mixed, + * is_present?: mixed, * }, * include_site_level_resources?: array{ * is?: mixed, diff --git a/src/Actions/Contracts/GiftActionsInterface.php b/src/Actions/Contracts/GiftActionsInterface.php index b8e652bb..d7ee2062 100644 --- a/src/Actions/Contracts/GiftActionsInterface.php +++ b/src/Actions/Contracts/GiftActionsInterface.php @@ -108,7 +108,12 @@ public function cancel(string $id, array $headers = []): CancelGiftResponse; /** * @see https://apidocs.chargebee.com/docs/api/gifts/update-a-gift?lang=php-v4 * @param array{ - * scheduled_at?: int, + * gift_receiver?: array{ + * email?: string, + * first_name?: string, + * last_name?: string, + * }, + * scheduled_at?: int, * comment?: string, * } $params Description of the parameters * @param string $id @@ -120,7 +125,7 @@ public function cancel(string $id, array $headers = []): CancelGiftResponse; * @throws InvalidRequestException * @throws Exception */ - public function updateGift(string $id, array $params, array $headers = []): UpdateGiftGiftResponse; + public function updateGift(string $id, array $params = [], array $headers = []): UpdateGiftGiftResponse; /** * @see https://apidocs.chargebee.com/docs/api/gifts/list-gifts?lang=php-v4 diff --git a/src/Actions/Contracts/HostedPageActionsInterface.php b/src/Actions/Contracts/HostedPageActionsInterface.php index f542b1d6..0ffe1d3f 100644 --- a/src/Actions/Contracts/HostedPageActionsInterface.php +++ b/src/Actions/Contracts/HostedPageActionsInterface.php @@ -280,6 +280,7 @@ public function events(array $params, array $headers = []): EventsHostedPageResp * ending_unit_in_decimal?: string, * price_in_decimal?: string, * }>, + * layout?: string, * business_entity_id?: string, * redirect_url?: string, * coupon_ids?: array, diff --git a/src/Actions/Contracts/InvoiceActionsInterface.php b/src/Actions/Contracts/InvoiceActionsInterface.php index 91bef40f..63fc9bd2 100644 --- a/src/Actions/Contracts/InvoiceActionsInterface.php +++ b/src/Actions/Contracts/InvoiceActionsInterface.php @@ -452,9 +452,6 @@ public function pauseDunning(string $id, array $params, array $headers = []): Pa * asc?: string, * desc?: string, * }, - * exclude?: array{ - * in?: mixed, - * }, * } $params Description of the parameters * * @param array $headers diff --git a/src/Actions/Contracts/ItemActionsInterface.php b/src/Actions/Contracts/ItemActionsInterface.php index f150d119..be97d2d7 100644 --- a/src/Actions/Contracts/ItemActionsInterface.php +++ b/src/Actions/Contracts/ItemActionsInterface.php @@ -96,8 +96,8 @@ * not_in?: mixed, * }, * business_entity_id?: array{ - * is_present?: mixed, * is?: mixed, + * is_present?: mixed, * }, * include_site_level_resources?: array{ * is?: mixed, diff --git a/src/Actions/Contracts/ItemFamilyActionsInterface.php b/src/Actions/Contracts/ItemFamilyActionsInterface.php index 56bb02c2..281a920c 100644 --- a/src/Actions/Contracts/ItemFamilyActionsInterface.php +++ b/src/Actions/Contracts/ItemFamilyActionsInterface.php @@ -53,8 +53,8 @@ public function delete(string $id, array $headers = []): DeleteItemFamilyRespons * between?: mixed, * }, * business_entity_id?: array{ - * is_present?: mixed, * is?: mixed, + * is_present?: mixed, * }, * include_site_level_resources?: array{ * is?: mixed, diff --git a/src/Actions/Contracts/ItemPriceActionsInterface.php b/src/Actions/Contracts/ItemPriceActionsInterface.php index 80e86b7d..747fd076 100644 --- a/src/Actions/Contracts/ItemPriceActionsInterface.php +++ b/src/Actions/Contracts/ItemPriceActionsInterface.php @@ -248,8 +248,8 @@ public function findApplicableItems(string $id, array $params = [], array $heade * between?: mixed, * }, * business_entity_id?: array{ - * is_present?: mixed, * is?: mixed, + * is_present?: mixed, * }, * include_site_level_resources?: array{ * is?: mixed, diff --git a/src/Actions/Contracts/OmnichannelSubscriptionActionsInterface.php b/src/Actions/Contracts/OmnichannelSubscriptionActionsInterface.php index 803a8dc6..45cdfe5c 100644 --- a/src/Actions/Contracts/OmnichannelSubscriptionActionsInterface.php +++ b/src/Actions/Contracts/OmnichannelSubscriptionActionsInterface.php @@ -89,6 +89,30 @@ public function omnichannelTransactionsForOmnichannelSubscription(string $id, ar * is?: mixed, * is_not?: mixed, * starts_with?: mixed, + * in?: mixed, + * not_in?: mixed, + * }, + * id?: array{ + * is?: mixed, + * is_not?: mixed, + * starts_with?: mixed, + * in?: mixed, + * not_in?: mixed, + * }, + * id_at_source?: array{ + * is?: mixed, + * is_not?: mixed, + * starts_with?: mixed, + * in?: mixed, + * not_in?: mixed, + * }, + * updated_at?: array{ + * before?: mixed, + * after?: mixed, + * }, + * purchased_at?: array{ + * before?: mixed, + * after?: mixed, * }, * } $params Description of the parameters * diff --git a/src/Actions/Contracts/PriceVariantActionsInterface.php b/src/Actions/Contracts/PriceVariantActionsInterface.php index 61a2947f..b28c0e11 100644 --- a/src/Actions/Contracts/PriceVariantActionsInterface.php +++ b/src/Actions/Contracts/PriceVariantActionsInterface.php @@ -67,8 +67,8 @@ public function delete(string $id, array $headers = []): DeletePriceVariantRespo * between?: mixed, * }, * business_entity_id?: array{ - * is_present?: mixed, * is?: mixed, + * is_present?: mixed, * }, * include_site_level_resources?: array{ * is?: mixed, diff --git a/src/Actions/ExportActions.php b/src/Actions/ExportActions.php index beeeaf9b..9117c8cb 100644 --- a/src/Actions/ExportActions.php +++ b/src/Actions/ExportActions.php @@ -479,8 +479,8 @@ public function differentialPrices(array $params = [], array $headers = []): Dif * }, * }, * business_entity_id?: array{ - * is_present?: mixed, * is?: mixed, + * is_present?: mixed, * }, * include_site_level_resources?: array{ * is?: mixed, @@ -738,8 +738,8 @@ public function retrieve(string $id, array $headers = []): RetrieveExportRespons * }, * }, * business_entity_id?: array{ - * is_present?: mixed, * is?: mixed, + * is_present?: mixed, * }, * include_site_level_resources?: array{ * is?: mixed, @@ -847,8 +847,8 @@ public function priceVariants(array $params = [], array $headers = []): PriceVar * }, * }, * business_entity_id?: array{ - * is_present?: mixed, * is?: mixed, + * is_present?: mixed, * }, * include_site_level_resources?: array{ * is?: mixed, @@ -2124,8 +2124,8 @@ public function orders(array $params = [], array $headers = []): OrdersExportRes * not_in?: mixed, * }, * business_entity_id?: array{ - * is_present?: mixed, * is?: mixed, + * is_present?: mixed, * }, * include_site_level_resources?: array{ * is?: mixed, diff --git a/src/Actions/GiftActions.php b/src/Actions/GiftActions.php index dca3fc73..09e25516 100644 --- a/src/Actions/GiftActions.php +++ b/src/Actions/GiftActions.php @@ -158,7 +158,12 @@ public function cancel(string $id, array $headers = []): CancelGiftResponse /** * @see https://apidocs.chargebee.com/docs/api/gifts/update-a-gift?lang=php-v4 * @param array{ - * scheduled_at?: int, + * gift_receiver?: array{ + * email?: string, + * first_name?: string, + * last_name?: string, + * }, + * scheduled_at?: int, * comment?: string, * } $params Description of the parameters * @param string $id @@ -170,7 +175,7 @@ public function cancel(string $id, array $headers = []): CancelGiftResponse * @throws InvalidRequestException * @throws Exception */ - public function updateGift(string $id, array $params, array $headers = []): UpdateGiftGiftResponse + public function updateGift(string $id, array $params = [], array $headers = []): UpdateGiftGiftResponse { $jsonKeys = [ ]; diff --git a/src/Actions/HostedPageActions.php b/src/Actions/HostedPageActions.php index b147c8bc..720b6ee7 100644 --- a/src/Actions/HostedPageActions.php +++ b/src/Actions/HostedPageActions.php @@ -384,6 +384,7 @@ public function events(array $params, array $headers = []): EventsHostedPageResp * ending_unit_in_decimal?: string, * price_in_decimal?: string, * }>, + * layout?: string, * business_entity_id?: string, * redirect_url?: string, * coupon_ids?: array, diff --git a/src/Actions/InvoiceActions.php b/src/Actions/InvoiceActions.php index 781140a8..a2278724 100644 --- a/src/Actions/InvoiceActions.php +++ b/src/Actions/InvoiceActions.php @@ -696,9 +696,6 @@ public function pauseDunning(string $id, array $params, array $headers = []): Pa * asc?: string, * desc?: string, * }, - * exclude?: array{ - * in?: mixed, - * }, * } $params Description of the parameters * * @param array $headers diff --git a/src/Actions/ItemActions.php b/src/Actions/ItemActions.php index ea53bff1..598d5b0b 100644 --- a/src/Actions/ItemActions.php +++ b/src/Actions/ItemActions.php @@ -109,8 +109,8 @@ public function __construct(HttpClientFactory $httpClientFactory, Environment $e * not_in?: mixed, * }, * business_entity_id?: array{ - * is_present?: mixed, * is?: mixed, + * is_present?: mixed, * }, * include_site_level_resources?: array{ * is?: mixed, diff --git a/src/Actions/ItemFamilyActions.php b/src/Actions/ItemFamilyActions.php index 3cd98840..95401836 100644 --- a/src/Actions/ItemFamilyActions.php +++ b/src/Actions/ItemFamilyActions.php @@ -83,8 +83,8 @@ public function delete(string $id, array $headers = []): DeleteItemFamilyRespons * between?: mixed, * }, * business_entity_id?: array{ - * is_present?: mixed, * is?: mixed, + * is_present?: mixed, * }, * include_site_level_resources?: array{ * is?: mixed, diff --git a/src/Actions/ItemPriceActions.php b/src/Actions/ItemPriceActions.php index fe8b8392..a7e2eb76 100644 --- a/src/Actions/ItemPriceActions.php +++ b/src/Actions/ItemPriceActions.php @@ -347,8 +347,8 @@ public function findApplicableItems(string $id, array $params = [], array $heade * between?: mixed, * }, * business_entity_id?: array{ - * is_present?: mixed, * is?: mixed, + * is_present?: mixed, * }, * include_site_level_resources?: array{ * is?: mixed, diff --git a/src/Actions/OmnichannelSubscriptionActions.php b/src/Actions/OmnichannelSubscriptionActions.php index 765d1432..1f75df82 100644 --- a/src/Actions/OmnichannelSubscriptionActions.php +++ b/src/Actions/OmnichannelSubscriptionActions.php @@ -153,6 +153,30 @@ public function omnichannelTransactionsForOmnichannelSubscription(string $id, ar * is?: mixed, * is_not?: mixed, * starts_with?: mixed, + * in?: mixed, + * not_in?: mixed, + * }, + * id?: array{ + * is?: mixed, + * is_not?: mixed, + * starts_with?: mixed, + * in?: mixed, + * not_in?: mixed, + * }, + * id_at_source?: array{ + * is?: mixed, + * is_not?: mixed, + * starts_with?: mixed, + * in?: mixed, + * not_in?: mixed, + * }, + * updated_at?: array{ + * before?: mixed, + * after?: mixed, + * }, + * purchased_at?: array{ + * before?: mixed, + * after?: mixed, * }, * } $params Description of the parameters * diff --git a/src/Actions/PriceVariantActions.php b/src/Actions/PriceVariantActions.php index 28c6029c..1d6b672b 100644 --- a/src/Actions/PriceVariantActions.php +++ b/src/Actions/PriceVariantActions.php @@ -97,8 +97,8 @@ public function delete(string $id, array $headers = []): DeletePriceVariantRespo * between?: mixed, * }, * business_entity_id?: array{ - * is_present?: mixed, * is?: mixed, + * is_present?: mixed, * }, * include_site_level_resources?: array{ * is?: mixed, diff --git a/src/Enums/EnabledEvents.php b/src/Enums/EnabledEvents.php index 884307b7..f23eb8c6 100644 --- a/src/Enums/EnabledEvents.php +++ b/src/Enums/EnabledEvents.php @@ -223,6 +223,8 @@ enum EnabledEvents : string { case OMNICHANNEL_SUBSCRIPTION_MOVED_IN = "omnichannel_subscription_moved_in"; case OMNICHANNEL_TRANSACTION_CREATED = "omnichannel_transaction_created"; case ALERT_STATUS_CHANGED = "alert_status_changed"; + case OMNICHANNEL_SUBSCRIPTION_ITEM_UPDATED = "omnichannel_subscription_item_updated"; + case OMNICHANNEL_SUBSCRIPTION_ITEM_RECOVERED = "omnichannel_subscription_item_recovered"; case PLAN_CREATED = "plan_created"; case PLAN_UPDATED = "plan_updated"; case PLAN_DELETED = "plan_deleted"; diff --git a/src/Enums/EventType.php b/src/Enums/EventType.php index a969ea4a..3810b899 100644 --- a/src/Enums/EventType.php +++ b/src/Enums/EventType.php @@ -214,6 +214,8 @@ enum EventType : string { case OMNICHANNEL_SUBSCRIPTION_MOVED_IN = "omnichannel_subscription_moved_in"; case OMNICHANNEL_TRANSACTION_CREATED = "omnichannel_transaction_created"; case ALERT_STATUS_CHANGED = "alert_status_changed"; + case OMNICHANNEL_SUBSCRIPTION_ITEM_UPDATED = "omnichannel_subscription_item_updated"; + case OMNICHANNEL_SUBSCRIPTION_ITEM_RECOVERED = "omnichannel_subscription_item_recovered"; case PLAN_CREATED = "plan_created"; case PLAN_UPDATED = "plan_updated"; case PLAN_DELETED = "plan_deleted"; diff --git a/src/Enums/PaymentMethod.php b/src/Enums/PaymentMethod.php index 52d4dba5..fe584209 100644 --- a/src/Enums/PaymentMethod.php +++ b/src/Enums/PaymentMethod.php @@ -53,6 +53,11 @@ enum PaymentMethod : string { case AFTER_PAY = "after_pay"; case SWISH = "swish"; case PAYME = "payme"; + case KLARNA = "klarna"; + case ALIPAY_HK = "alipay_hk"; + case PAYPAY = "paypay"; + case GCASH = "gcash"; + case SOUTH_KOREAN_CARDS = "south_korean_cards"; /* * @depcreated */ diff --git a/src/Enums/PaymentMethodType.php b/src/Enums/PaymentMethodType.php index 3f3ce7a6..92cc1356 100644 --- a/src/Enums/PaymentMethodType.php +++ b/src/Enums/PaymentMethodType.php @@ -37,7 +37,6 @@ enum PaymentMethodType : string { case NAVER_PAY = "naver_pay"; case REVOLUT_PAY = "revolut_pay"; case CASH_APP_PAY = "cash_app_pay"; - case PIX = "pix"; case TWINT = "twint"; case GO_PAY = "go_pay"; case GRAB_PAY = "grab_pay"; @@ -45,6 +44,12 @@ enum PaymentMethodType : string { case AFTER_PAY = "after_pay"; case SWISH = "swish"; case PAYME = "payme"; + case PIX = "pix"; + case KLARNA = "klarna"; + case ALIPAY_HK = "alipay_hk"; + case PAYPAY = "paypay"; + case GCASH = "gcash"; + case SOUTH_KOREAN_CARDS = "south_korean_cards"; case UNKNOWN = "unknown"; public static function tryFromValue(string $value): self { diff --git a/src/Enums/Type.php b/src/Enums/Type.php index dddb0a53..5b2e2683 100644 --- a/src/Enums/Type.php +++ b/src/Enums/Type.php @@ -37,7 +37,6 @@ enum Type : string { case NAVER_PAY = "naver_pay"; case REVOLUT_PAY = "revolut_pay"; case CASH_APP_PAY = "cash_app_pay"; - case PIX = "pix"; case TWINT = "twint"; case GO_PAY = "go_pay"; case GRAB_PAY = "grab_pay"; @@ -45,6 +44,12 @@ enum Type : string { case AFTER_PAY = "after_pay"; case SWISH = "swish"; case PAYME = "payme"; + case PIX = "pix"; + case KLARNA = "klarna"; + case ALIPAY_HK = "alipay_hk"; + case PAYPAY = "paypay"; + case GCASH = "gcash"; + case SOUTH_KOREAN_CARDS = "south_korean_cards"; case FREE_TRIAL = "free_trial"; case PAY_UP_FRONT = "pay_up_front"; case PAY_AS_YOU_GO = "pay_as_you_go"; diff --git a/src/Resources/Content/Content.php b/src/Resources/Content/Content.php index 12583da0..a06a6c1c 100644 --- a/src/Resources/Content/Content.php +++ b/src/Resources/Content/Content.php @@ -79,7 +79,6 @@ use Chargebee\Resources\PromotionalCredit\PromotionalCredit; use Chargebee\Resources\Purchase\Purchase; use Chargebee\Resources\Quote\Quote; -use Chargebee\Resources\QuoteEntitlement\QuoteEntitlement; use Chargebee\Resources\QuoteLineGroup\QuoteLineGroup; use Chargebee\Resources\QuotedCharge\QuotedCharge; use Chargebee\Resources\QuotedDeltaRamp\QuotedDeltaRamp; @@ -578,12 +577,6 @@ class Content { */ public ?Quote $quote; - /** - * - * @var ?QuoteEntitlement $quoteentitlement - */ - public ?QuoteEntitlement $quoteentitlement; - /** * * @var ?QuoteLineGroup $quotelinegroup @@ -755,7 +748,7 @@ class Content { /** * @var array $knownFields */ - protected static array $knownFields = [ "addon" , "address" , "advance_invoice_schedule" , "alert" , "alert_status" , "attached_item" , "attribute" , "billing_configuration" , "brand" , "business_entity" , "business_entity_transfer" , "card" , "comment" , "configuration" , "contact" , "contract_term" , "coupon" , "coupon_code" , "coupon_set" , "cpq_quote_signature" , "credit_note" , "credit_note_estimate" , "currency" , "customer" , "customer_entitlement" , "differential_price" , "discount" , "download" , "einvoice" , "entitlement" , "entitlement_override" , "estimate" , "event" , "export" , "feature" , "filter_condition" , "gateway_error_detail" , "gift" , "hierarchy" , "hosted_page" , "impacted_customer" , "impacted_item" , "impacted_item_price" , "impacted_subscription" , "in_app_subscription" , "invoice" , "invoice_estimate" , "item" , "item_entitlement" , "item_family" , "item_price" , "metadata" , "non_subscription" , "offer_event" , "offer_fulfillment" , "omnichannel_one_time_order" , "omnichannel_one_time_order_item" , "omnichannel_subscription" , "omnichannel_subscription_item" , "omnichannel_subscription_item_offer" , "omnichannel_subscription_item_scheduled_change" , "omnichannel_transaction" , "order" , "payment_intent" , "payment_reference_number" , "payment_schedule" , "payment_schedule_estimate" , "payment_schedule_scheme" , "payment_source" , "payment_voucher" , "personalized_offer" , "plan" , "portal_session" , "price_variant" , "pricing_page_session" , "promotional_credit" , "purchase" , "quote" , "quote_entitlement" , "quote_line_group" , "quoted_charge" , "quoted_delta_ramp" , "quoted_ramp" , "quoted_subscription" , "ramp" , "recorded_purchase" , "resource_migration" , "rule" , "site_migration_detail" , "subscription" , "subscription_entitlement" , "subscription_entitlements_created_detail" , "subscription_entitlements_updated_detail" , "subscription_estimate" , "tax_withheld" , "third_party_payment_method" , "time_machine" , "token" , "transaction" , "unbilled_charge" , "usage" , "usage_charge" , "usage_event" , "usage_file" , "usage_summary" , "virtual_bank_account" , "webhook_endpoint" ]; + protected static array $knownFields = [ "addon" , "address" , "advance_invoice_schedule" , "alert" , "alert_status" , "attached_item" , "attribute" , "billing_configuration" , "brand" , "business_entity" , "business_entity_transfer" , "card" , "comment" , "configuration" , "contact" , "contract_term" , "coupon" , "coupon_code" , "coupon_set" , "cpq_quote_signature" , "credit_note" , "credit_note_estimate" , "currency" , "customer" , "customer_entitlement" , "differential_price" , "discount" , "download" , "einvoice" , "entitlement" , "entitlement_override" , "estimate" , "event" , "export" , "feature" , "filter_condition" , "gateway_error_detail" , "gift" , "hierarchy" , "hosted_page" , "impacted_customer" , "impacted_item" , "impacted_item_price" , "impacted_subscription" , "in_app_subscription" , "invoice" , "invoice_estimate" , "item" , "item_entitlement" , "item_family" , "item_price" , "metadata" , "non_subscription" , "offer_event" , "offer_fulfillment" , "omnichannel_one_time_order" , "omnichannel_one_time_order_item" , "omnichannel_subscription" , "omnichannel_subscription_item" , "omnichannel_subscription_item_offer" , "omnichannel_subscription_item_scheduled_change" , "omnichannel_transaction" , "order" , "payment_intent" , "payment_reference_number" , "payment_schedule" , "payment_schedule_estimate" , "payment_schedule_scheme" , "payment_source" , "payment_voucher" , "personalized_offer" , "plan" , "portal_session" , "price_variant" , "pricing_page_session" , "promotional_credit" , "purchase" , "quote" , "quote_line_group" , "quoted_charge" , "quoted_delta_ramp" , "quoted_ramp" , "quoted_subscription" , "ramp" , "recorded_purchase" , "resource_migration" , "rule" , "site_migration_detail" , "subscription" , "subscription_entitlement" , "subscription_entitlements_created_detail" , "subscription_entitlements_updated_detail" , "subscription_estimate" , "tax_withheld" , "third_party_payment_method" , "time_machine" , "token" , "transaction" , "unbilled_charge" , "usage" , "usage_charge" , "usage_event" , "usage_file" , "usage_summary" , "virtual_bank_account" , "webhook_endpoint" ]; /** * dynamic properties for resources @@ -842,7 +835,6 @@ private function __construct( ?PromotionalCredit $promotionalcredit, ?Purchase $purchase, ?Quote $quote, - ?QuoteEntitlement $quoteentitlement, ?QuoteLineGroup $quotelinegroup, ?QuotedCharge $quotedcharge, ?QuotedDeltaRamp $quoteddeltaramp, @@ -951,7 +943,6 @@ private function __construct( $this->promotionalcredit = $promotionalcredit; $this->purchase = $purchase; $this->quote = $quote; - $this->quoteentitlement = $quoteentitlement; $this->quotelinegroup = $quotelinegroup; $this->quotedcharge = $quotedcharge; $this->quoteddeltaramp = $quoteddeltaramp; @@ -1062,7 +1053,6 @@ public static function from(array $resourceAttributes): self isset($resourceAttributes['promotional_credit']) ? PromotionalCredit::from($resourceAttributes['promotional_credit']) : null, isset($resourceAttributes['purchase']) ? Purchase::from($resourceAttributes['purchase']) : null, isset($resourceAttributes['quote']) ? Quote::from($resourceAttributes['quote']) : null, - isset($resourceAttributes['quote_entitlement']) ? QuoteEntitlement::from($resourceAttributes['quote_entitlement']) : null, isset($resourceAttributes['quote_line_group']) ? QuoteLineGroup::from($resourceAttributes['quote_line_group']) : null, isset($resourceAttributes['quoted_charge']) ? QuotedCharge::from($resourceAttributes['quoted_charge']) : null, isset($resourceAttributes['quoted_delta_ramp']) ? QuotedDeltaRamp::from($resourceAttributes['quoted_delta_ramp']) : null, @@ -1206,7 +1196,6 @@ public function toArray(): array - ], function ($value) { @@ -1448,9 +1437,6 @@ public function toArray(): array if($this->quote instanceof Quote){ $data['quote'] = $this->quote->toArray(); } - if($this->quoteentitlement instanceof QuoteEntitlement){ - $data['quote_entitlement'] = $this->quoteentitlement->toArray(); - } if($this->quotelinegroup instanceof QuoteLineGroup){ $data['quote_line_group'] = $this->quotelinegroup->toArray(); } diff --git a/src/Resources/OmnichannelSubscription/OmnichannelSubscription.php b/src/Resources/OmnichannelSubscription/OmnichannelSubscription.php index 19f44fb5..044406d6 100644 --- a/src/Resources/OmnichannelSubscription/OmnichannelSubscription.php +++ b/src/Resources/OmnichannelSubscription/OmnichannelSubscription.php @@ -33,6 +33,18 @@ class OmnichannelSubscription { */ public ?int $created_at; + /** + * + * @var ?int $purchased_at + */ + public ?int $purchased_at; + + /** + * + * @var ?int $updated_at + */ + public ?int $updated_at; + /** * * @var ?int $resource_version @@ -60,7 +72,7 @@ class OmnichannelSubscription { /** * @var array $knownFields */ - protected static array $knownFields = [ "id" , "id_at_source" , "app_id" , "customer_id" , "created_at" , "resource_version" , "omnichannel_subscription_items" , "initial_purchase_transaction" ]; + protected static array $knownFields = [ "id" , "id_at_source" , "app_id" , "customer_id" , "created_at" , "purchased_at" , "updated_at" , "resource_version" , "omnichannel_subscription_items" , "initial_purchase_transaction" ]; /** * dynamic properties for resources @@ -74,6 +86,8 @@ private function __construct( ?string $app_id, ?string $customer_id, ?int $created_at, + ?int $purchased_at, + ?int $updated_at, ?int $resource_version, ?array $omnichannel_subscription_items, ?\Chargebee\Resources\OmnichannelTransaction\OmnichannelTransaction $initial_purchase_transaction, @@ -85,6 +99,8 @@ private function __construct( $this->app_id = $app_id; $this->customer_id = $customer_id; $this->created_at = $created_at; + $this->purchased_at = $purchased_at; + $this->updated_at = $updated_at; $this->resource_version = $resource_version; $this->omnichannel_subscription_items = $omnichannel_subscription_items; $this->initial_purchase_transaction = $initial_purchase_transaction; @@ -102,6 +118,8 @@ public static function from(array $resourceAttributes): self $resourceAttributes['app_id'] ?? null, $resourceAttributes['customer_id'] ?? null, $resourceAttributes['created_at'] ?? null, + $resourceAttributes['purchased_at'] ?? null, + $resourceAttributes['updated_at'] ?? null, $resourceAttributes['resource_version'] ?? null, $omnichannel_subscription_items, isset($resourceAttributes['initial_purchase_transaction']) ? \Chargebee\Resources\OmnichannelTransaction\OmnichannelTransaction::from($resourceAttributes['initial_purchase_transaction']) : null, @@ -122,6 +140,8 @@ public function toArray(): array 'app_id' => $this->app_id, 'customer_id' => $this->customer_id, 'created_at' => $this->created_at, + 'purchased_at' => $this->purchased_at, + 'updated_at' => $this->updated_at, 'resource_version' => $this->resource_version, diff --git a/src/Resources/OmnichannelSubscriptionItem/OmnichannelSubscriptionItem.php b/src/Resources/OmnichannelSubscriptionItem/OmnichannelSubscriptionItem.php index 31b5e52c..a63c00f3 100644 --- a/src/Resources/OmnichannelSubscriptionItem/OmnichannelSubscriptionItem.php +++ b/src/Resources/OmnichannelSubscriptionItem/OmnichannelSubscriptionItem.php @@ -63,6 +63,12 @@ class OmnichannelSubscriptionItem { */ public ?bool $has_scheduled_changes; + /** + * + * @var ?int $updated_at + */ + public ?int $updated_at; + /** * * @var ?int $resource_version @@ -114,7 +120,7 @@ class OmnichannelSubscriptionItem { /** * @var array $knownFields */ - protected static array $knownFields = [ "id" , "item_id_at_source" , "item_parent_id_at_source" , "current_term_start" , "current_term_end" , "expired_at" , "cancelled_at" , "grace_period_expires_at" , "resumes_at" , "has_scheduled_changes" , "resource_version" , "omnichannel_subscription_item_offers" , "upcoming_renewal" , "linked_item" ]; + protected static array $knownFields = [ "id" , "item_id_at_source" , "item_parent_id_at_source" , "current_term_start" , "current_term_end" , "expired_at" , "cancelled_at" , "grace_period_expires_at" , "resumes_at" , "has_scheduled_changes" , "updated_at" , "resource_version" , "omnichannel_subscription_item_offers" , "upcoming_renewal" , "linked_item" ]; /** * dynamic properties for resources @@ -133,6 +139,7 @@ private function __construct( ?int $grace_period_expires_at, ?int $resumes_at, ?bool $has_scheduled_changes, + ?int $updated_at, ?int $resource_version, ?array $omnichannel_subscription_item_offers, ?UpcomingRenewal $upcoming_renewal, @@ -153,6 +160,7 @@ private function __construct( $this->grace_period_expires_at = $grace_period_expires_at; $this->resumes_at = $resumes_at; $this->has_scheduled_changes = $has_scheduled_changes; + $this->updated_at = $updated_at; $this->resource_version = $resource_version; $this->omnichannel_subscription_item_offers = $omnichannel_subscription_item_offers; $this->upcoming_renewal = $upcoming_renewal; @@ -179,6 +187,7 @@ public static function from(array $resourceAttributes): self $resourceAttributes['grace_period_expires_at'] ?? null, $resourceAttributes['resumes_at'] ?? null, $resourceAttributes['has_scheduled_changes'] ?? null, + $resourceAttributes['updated_at'] ?? null, $resourceAttributes['resource_version'] ?? null, $omnichannel_subscription_item_offers, isset($resourceAttributes['upcoming_renewal']) ? UpcomingRenewal::from($resourceAttributes['upcoming_renewal']) : null, @@ -211,6 +220,7 @@ public function toArray(): array 'grace_period_expires_at' => $this->grace_period_expires_at, 'resumes_at' => $this->resumes_at, 'has_scheduled_changes' => $this->has_scheduled_changes, + 'updated_at' => $this->updated_at, 'resource_version' => $this->resource_version, diff --git a/src/Resources/PaymentIntent/Enums/PaymentMethodType.php b/src/Resources/PaymentIntent/Enums/PaymentMethodType.php index 6410fac7..f37b796a 100644 --- a/src/Resources/PaymentIntent/Enums/PaymentMethodType.php +++ b/src/Resources/PaymentIntent/Enums/PaymentMethodType.php @@ -35,7 +35,6 @@ enum PaymentMethodType : string { case CASH_APP_PAY = "cash_app_pay"; case WECHAT_PAY = "wechat_pay"; case ALIPAY = "alipay"; - case PIX = "pix"; case TWINT = "twint"; case GO_PAY = "go_pay"; case GRAB_PAY = "grab_pay"; @@ -43,6 +42,12 @@ enum PaymentMethodType : string { case AFTER_PAY = "after_pay"; case SWISH = "swish"; case PAYME = "payme"; + case PIX = "pix"; + case KLARNA = "klarna"; + case ALIPAY_HK = "alipay_hk"; + case PAYPAY = "paypay"; + case GCASH = "gcash"; + case SOUTH_KOREAN_CARDS = "south_korean_cards"; case UNKNOWN = "unknown"; public static function tryFromValue(string $value): self { diff --git a/src/Version.php b/src/Version.php index d70305a0..7aba070c 100644 --- a/src/Version.php +++ b/src/Version.php @@ -4,7 +4,7 @@ final class Version { - const VERSION = '4.20.1'; + const VERSION = '4.21.0'; } ?> \ No newline at end of file