Release 10.0.0 - #73
Merged
Merged
Conversation
Component and Product now expose an optional, nullable unspsc_code attribute. The API returns it as null, so the mapper marks it as explicitly set, while the expected objects built by the test factories left it untouched. That difference broke the equality assertions in ComponentsControllerTest and ProductsControllerTest. Set unspscCode to null in the factories so the expected objects match.
lucassus
approved these changes
Aug 13, 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.
ab-php-sdk 10.0.0 Changelog
Breaking Changes
unit_balancenow accepts an integer or a string. This affectsSubscriptionComponent,CreateSubscriptionComponent,MeteredUsage, andPrepaidUsage. The affected getters and setters lost their scalar type declaration, so the value arrives untyped. OnMeteredUsageandPrepaidUsagethe constructor no longer raises aTypeErrorfor a numeric string.GetOneTimeTokenRequest::$paymentProfileis now a union. The endpoint can returnGetOneTimeTokenPaymentProfileorGetOneTimeTokenBankAccountPaymentProfile, so the property lost its type declaration. The concrete class identifies which variant came back. The credit card class keeps its old name, because the spec file was renamed but the schema title was not.CreditCardPaymentProfile::$cardTypeis now nullable. The setter signature changed fromstringto?string, and a newunsetCardType()method removes the field from the serialized payload.ListSubcriptionGroupPrepaymentItemis renamed toListSubscriptionGroupPrepaymentItem. We corrected a typo in the schema title, and PHP class names come from the title. The builder class was renamed the same way. The properties are unchanged.New Features
updateInvoiceanddeleteInvoicetoInvoicesController. Both act only on ad hoc invoices indraftstatus.subscription_product_change_scheduledwebhook event, asEventKey::SUBSCRIPTION_PRODUCT_CHANGE_SCHEDULEDandWebhookSubscription::SUBSCRIPTION_PRODUCT_CHANGE_SCHEDULED. The payload deserializes into the existingSubscriptionProductChangemodel.SubscriptionsController::listSubscriptions():q,qScope,customerId,collectionMethod,groupStatus,dunningExemption,paymentGateways,currencies, andbrandingThemeId.productfilter onlistSubscriptionsnow also accepts a string. It takes a product ID or an exact product name, but not a handle. Existing integer values keep working, so this is not a breaking change in PHP.SubscriptionListIncludevalues:CURRENT_ACCOUNT_BALANCE_IN_CENTS,CURRENT_BILLING_AMOUNT, andCOUPONS.SubscriptionStateFiltervalues:ENUM_EXPIRED_CARDS_LIVE_SUBSCRIPTIONS,ENUM_EXPIRED_CARDS_ALL_SUBSCRIPTIONS,AWAITING_SIGNUP,AWAITING_SIGNUP_DATE, andPREPAID_DUNNING.Because
listSubscriptionstakes a single options array, the reordered query parameters in the spec do not change any call site.New Models
Each model below ships with a matching builder in
src/Models/Builders/.UpdateInvoiceUpdateInvoiceItemUpdateInvoiceRequestGetOneTimeTokenBankAccountPaymentProfileQScope(enum)GroupStatus(enum)CollectionMethod1(enum). The1suffix avoids a collision with the existingCollectionMethod.The
unit_balanceandpayment_profileunions did not produce dedicated container classes in PHP. They are untyped properties with union annotations.Model Enhancements
Component,CreateOrUpdateProduct,Product,EBBComponent,MeteredComponent,OnOffComponent,PrepaidUsageComponent,QuantityBasedComponent,UpdateComponentunspscCode(?string), with an unset method and a builder method.Customersurcharging(?bool).brandingThemeId(?int).CustomerAttributessurcharging(?bool).CreateCustomersurcharging(?bool).brandingThemeId(?int).UpdateCustomersurcharging(?bool).brandingThemeId(?int).ProductFamilysurcharging(?bool).CreateProductFamilysurcharging(?bool).CreateSubscriptionbrandingThemeId(?int). Write-only. The subscription response does not return it.UpdateSubscriptionbrandingThemeId(?int). Write-only. The subscription response does not return it.InvoicebrandingThemeId(?int).SubscriptionProductChangepreviousProductPricePointId(?int).newProductPricePointId(?int).effectiveAt(?DateTime).subscription_product_change_scheduledevent populates these three fields.Bug Fixes
subscription_product_change_scheduledevents no longer fail to deserialize. The payload carriesprevious_product_price_point_id,new_product_price_point_id, andeffective_at.SubscriptionProductChangedid not model these fields. It now does, soEvent::getEventSpecificData()resolves the payload.Internal / Non-functional Changes
doc/.