Release v4.21.0#133
Merged
Merged
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
PR Complexity Score: 4.9 - Moderate
View Breakdown
- Lines Changed: 250
- Files Changed: 30
- Complexity Added: 0
- Raw Score: 95.0
Overview
This PR releases version 4.21.0 of the SDK, updating the changelog and version constants.
It introduces additional attributes and filters for Omnichannel subscriptions, expands Gift and Hosted Page APIs, and adds new payment method/event enums.
It also removes the deprecated QuoteEntitlement resource and the exclude query parameter on invoice listing, aligning the SDK with the latest API surface.
Key Changes
- Bumped SDK version from 4.20.1 to 4.21.0 and documented changes in the changelog as v4.21.0.
- Added
purchased_atandupdated_atattributes toOmnichannelSubscription, andupdated_attoOmnichannelSubscriptionItem, improving tracking of subscription and item lifecycle updates. - Extended
list_omnichannel_subscriptionsfilters to supportcustomer_id.in,customer_id.not_in,id,id_at_source,updated_at, andpurchased_atfor more flexible querying. - Updated Gift API:
updateGiftnow accepts an optionalgift_receiverobject (email, first_name, last_name),scheduled_atis optional, and the method’s$paramsargument is now optional in both interface and implementation. - Extended Hosted Page checkout for gift subscriptions (
checkout_gift_subscription_for_items) to accept an optionallayoutparameter. - Removed the
excludequery parameter from the invoice listing API in both interface and implementation, matching the documented API removal. - Added new webhook/event support:
omnichannel_subscription_item_updatedandomnichannel_subscription_item_recoveredtoEnabledEventsandEventType. - Added new payment methods (
klarna,alipay_hk,paypay,gcash,south_korean_cards) toPaymentMethod,PaymentMethodType,Type, and Payment Intent–specificPaymentMethodTypeenums, and wired them into Payment Intent request/response enums. - Removed
QuoteEntitlementas a resource fromContent, including its property, serialization/deserialization, and known field registration. - Tidied various docblock array shapes (primarily reordering
business_entity_idsub-keys) to reflect current API semantics without changing runtime behavior.
Risks & Considerations
- Removal of
QuoteEntitlementfrom the SDK is a breaking change for any consumers that referencedContent::$quoteentitlementorquote_entitlementin responses; downstream code must be updated. - Removal of the
excludefilter fromlist_invoicesmay break integrations that currently pass this parameter; callers need to stop sending it. - Making
$paramsoptional forupdateGiftand addinggift_receivermay expose edge cases if callers relied on strict parameter requirements or perform their own type validation. - New enums for events and payment methods can affect consumers with exhaustive
match/switchstatements over event or payment method types. - New Omnichannel filters and timestamp attributes should be validated in staging to ensure backend support and to confirm no unexpected null/format issues.
- None of the docblock-only reordering changes affect runtime behavior, but mismatches between docs and actual API expectations should still be spot-checked against API docs.
File-level change summary
| File | Change summary |
|---|---|
| CHANGELOG.md | Added v4.21.0 release notes documenting new attributes, parameters, events, removed resources/parameters, and new enums. |
| VERSION | Bumped raw version file from 4.20.1 to 4.21.0. |
| src/Actions/Contracts/ExportActionsInterface.php | Reordered business_entity_id docblock keys to list is before is_present in multiple export methods. |
| src/Actions/Contracts/GiftActionsInterface.php | Added gift_receiver and optional scheduled_at to updateGift params and made $params optional in the interface. |
| src/Actions/Contracts/HostedPageActionsInterface.php | Added optional layout field to the checkout gift subscription for items request params docblock. |
| src/Actions/Contracts/InvoiceActionsInterface.php | Removed the exclude query parameter from the list invoices method docblock. |
| src/Actions/Contracts/ItemActionsInterface.php | Reordered business_entity_id docblock keys to list is before is_present for item listing. |
| src/Actions/Contracts/ItemFamilyActionsInterface.php | Reordered business_entity_id docblock keys to list is before is_present for item family listing. |
| src/Actions/Contracts/ItemPriceActionsInterface.php | Reordered business_entity_id docblock keys to list is before is_present for item price listing. |
| src/Actions/Contracts/OmnichannelSubscriptionActionsInterface.php | Expanded list-omnichannel-subscriptions params to include new filters on customer_id, id, id_at_source, updated_at, and purchased_at. |
| src/Actions/Contracts/PriceVariantActionsInterface.php | Reordered business_entity_id docblock keys to list is before is_present for price variant listing. |
| src/Actions/ExportActions.php | Mirrored export interface changes by reordering business_entity_id docblock keys in implementation methods. |
| src/Actions/GiftActions.php | Implemented updated updateGift signature with optional $params and added gift_receiver/optional scheduled_at in the docblock. |
| src/Actions/HostedPageActions.php | Implemented the new optional layout parameter in the checkout gift subscription for items hosted page method docblock. |
| src/Actions/InvoiceActions.php | Removed handling/documentation of the exclude query parameter from invoice listing implementation docblock. |
| src/Actions/ItemActions.php | Reordered business_entity_id docblock keys in the item actions implementation to match the interface. |
| src/Actions/ItemFamilyActions.php | Reordered business_entity_id docblock keys in item family actions implementation to match the interface. |
| src/Actions/ItemPriceActions.php | Reordered business_entity_id docblock keys in item price actions implementation to match the interface. |
| src/Actions/OmnichannelSubscriptionActions.php | Implemented new list-omnichannel-subscriptions filters (customer_id in/not_in, id, id_at_source, updated_at, purchased_at) in the docblock. |
| src/Actions/PriceVariantActions.php | Reordered business_entity_id docblock keys in price variant actions implementation to match the interface. |
| src/Enums/EnabledEvents.php | Added OMNICHANNEL_SUBSCRIPTION_ITEM_UPDATED and OMNICHANNEL_SUBSCRIPTION_ITEM_RECOVERED enum values. |
| src/Enums/EventType.php | Added OMNICHANNEL_SUBSCRIPTION_ITEM_UPDATED and OMNICHANNEL_SUBSCRIPTION_ITEM_RECOVERED event type values. |
| src/Enums/PaymentMethod.php | Added new payment method values for Klarna, Alipay HK, PayPay, GCash, and South Korean cards. |
| src/Enums/PaymentMethodType.php | Reordered PIX and added new payment method type values (Klarna, Alipay HK, PayPay, GCash, South Korean cards) to the SDK-level enum. |
| src/Enums/Type.php | Reordered PIX and added new generic Type enum values for Klarna, Alipay HK, PayPay, GCash, and South Korean cards. |
| src/Resources/Content/Content.php | Removed QuoteEntitlement usage and quote_entitlement handling from properties, known fields, constructor, from(), and toArray(). |
| src/Resources/OmnichannelSubscription/OmnichannelSubscription.php | Added purchased_at and updated_at properties, wired them into known fields, constructor, from(), and toArray(). |
| src/Resources/OmnichannelSubscriptionItem/OmnichannelSubscriptionItem.php | Added updated_at property, included it in known fields, constructor, from(), and toArray(). |
| src/Resources/PaymentIntent/Enums/PaymentMethodType.php | Added Payment Intent–specific enum values for PIX, Klarna, Alipay HK, PayPay, GCash, and South Korean cards. |
| src/Version.php | Updated the SDK VERSION constant to 4.21.0. |
cb-karthikp
approved these changes
Jun 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v4.21.0 (2026-06-08)
New Attributes:
purchased_athas been added toOmnichannelSubscription.updated_athas been added toOmnichannelSubscription.updated_athas been added toOmnichannelSubscriptionItem.New Parameters:
customer_id.inhas been added as query parameter tolist_omnichannel_subscriptionsinOmnichannelSubscription.customer_id.not_inhas been added as query parameter tolist_omnichannel_subscriptionsinOmnichannelSubscription.idhas been added as query parameter tolist_omnichannel_subscriptionsinOmnichannelSubscription.id_at_sourcehas been added as query parameter tolist_omnichannel_subscriptionsinOmnichannelSubscription.updated_athas been added as query parameter tolist_omnichannel_subscriptionsinOmnichannelSubscription.purchased_athas been added as query parameter tolist_omnichannel_subscriptionsinOmnichannelSubscription.gift_receiverhas been added as request body parameter toupdate_a_giftinGift.layouthas been added as request body parameter tocheckout_gift_subscription_for_itemsinHostedPage.Parameter Updates:
scheduled_athas been changed from required to optional inupdate_a_giftofGift.New Events:
omnichannel_subscription_item_updatedhas been added.omnichannel_subscription_item_recoveredhas been added.Deleted Resources:
Deleted Attributes:
entity_idhas been removed fromQuoteEntitlement.entity_typehas been removed fromQuoteEntitlement.feature_idhas been removed fromQuoteEntitlement.valuehas been removed fromQuoteEntitlement.is_enabledhas been removed fromQuoteEntitlement.start_datehas been removed fromQuoteEntitlement.end_datehas been removed fromQuoteEntitlement.created_athas been removed fromQuoteEntitlement.modified_athas been removed fromQuoteEntitlement.Deleted Parameters:
excludehas been removed as query parameter fromlist_invoicesinInvoice.New Enums:
omnichannel_subscription_item_updatedandomnichannel_subscription_item_recoveredhave been added as new values enumEventType.klarna,alipay_hk,paypay,gcash, andsouth_korean_cardshave been added as new values enumPaymentMethod.klarna,alipay_hk,paypay,gcash, andsouth_korean_cardshave been added as new values enumPaymentMethodType.klarna,alipay_hk,paypay,gcash, andsouth_korean_cardshave been added as new values enumType.klarna,alipay_hk,paypay,gcash, andsouth_korean_cardshave been added as new values to enum attributepayment_method_typeinPaymentIntent.klarna,alipay_hk,paypay,gcash, andsouth_korean_cardshave been added as new values to enum attributeactive_payment_attempt.payment_method_typeinPaymentIntent.klarna,alipay_hk,paypay,gcash, andsouth_korean_cardshave been added as new values to enum request body parameterpayment_method_typeinupdate_a_payment_intentofPaymentIntent.klarna,alipay_hk,paypay,gcash, andsouth_korean_cardshave been added as new values to enum request body parameterpayment_method_typeincreate_a_payment_intentofPaymentIntent.