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
- Added
updateInvoiceanddeleteInvoicetoInvoicesController. Both act only on ad hoc invoices indraftstatus. - Added support for the
subscription_product_change_scheduledwebhook event, asEventKey::SUBSCRIPTION_PRODUCT_CHANGE_SCHEDULEDandWebhookSubscription::SUBSCRIPTION_PRODUCT_CHANGE_SCHEDULED. The payload deserializes into the existingSubscriptionProductChangemodel. - Added nine option keys to
SubscriptionsController::listSubscriptions():q,qScope,customerId,collectionMethod,groupStatus,dunningExemption,paymentGateways,currencies, andbrandingThemeId. - The
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. - Added three
SubscriptionListIncludevalues:CURRENT_ACCOUNT_BALANCE_IN_CENTS,CURRENT_BILLING_AMOUNT, andCOUPONS. - Added five
SubscriptionStateFiltervalues:ENUM_EXPIRED_CARDS_LIVE_SUBSCRIPTIONS,ENUM_EXPIRED_CARDS_ALL_SUBSCRIPTIONS,AWAITING_SIGNUP,AWAITING_SIGNUP_DATE, andPREPAID_DUNNING.
Because listSubscriptions takes 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_balance and payment_profile unions 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,UpdateComponent- Added
unspscCode(?string), with an unset method and a builder method.
- Added
Customer- Added
surcharging(?bool). - Added
brandingThemeId(?int).
- Added
CustomerAttributes- Added
surcharging(?bool).
- Added
CreateCustomer- Added
surcharging(?bool). - Added
brandingThemeId(?int).
- Added
UpdateCustomer- Added
surcharging(?bool). - Added
brandingThemeId(?int).
- Added
ProductFamily- Added
surcharging(?bool).
- Added
CreateProductFamily- Added
surcharging(?bool).
- Added
CreateSubscription- Added
brandingThemeId(?int). Write-only. The subscription response does not return it.
- Added
UpdateSubscription- Added
brandingThemeId(?int). Write-only. The subscription response does not return it.
- Added
Invoice- Added
brandingThemeId(?int).
- Added
SubscriptionProductChange- Added
previousProductPricePointId(?int). - Added
newProductPricePointId(?int). - Added
effectiveAt(?DateTime). - Only the
subscription_product_change_scheduledevent populates these three fields.
- Added
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 comments reworded across models and controllers after a wording and punctuation pass in the spec (no behavioral impact).
- Regenerated Markdown reference docs under
doc/.
Full Changelog: 9.1.0...10.0.0