Skip to content

Release 10.0.0 - #73

Merged
imlukedewitt merged 5 commits into
mainfrom
publish
Aug 14, 2026
Merged

Release 10.0.0#73
imlukedewitt merged 5 commits into
mainfrom
publish

Conversation

@imlukedewitt

@imlukedewitt imlukedewitt commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

ab-php-sdk 10.0.0 Changelog

Breaking Changes

  • unit_balance now accepts an integer or a string. This affects SubscriptionComponent, CreateSubscriptionComponent, MeteredUsage, and PrepaidUsage. The affected getters and setters lost their scalar type declaration, so the value arrives untyped. On MeteredUsage and PrepaidUsage the constructor no longer raises a TypeError for a numeric string.
  • GetOneTimeTokenRequest::$paymentProfile is now a union. The endpoint can return GetOneTimeTokenPaymentProfile or GetOneTimeTokenBankAccountPaymentProfile, 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::$cardType is now nullable. The setter signature changed from string to ?string, and a new unsetCardType() method removes the field from the serialized payload.
  • ListSubcriptionGroupPrepaymentItem is renamed to ListSubscriptionGroupPrepaymentItem. 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 updateInvoice and deleteInvoice to InvoicesController. Both act only on ad hoc invoices in draft status.
  • Added support for the subscription_product_change_scheduled webhook event, as EventKey::SUBSCRIPTION_PRODUCT_CHANGE_SCHEDULED and WebhookSubscription::SUBSCRIPTION_PRODUCT_CHANGE_SCHEDULED. The payload deserializes into the existing SubscriptionProductChange model.
  • Added nine option keys to SubscriptionsController::listSubscriptions(): q, qScope, customerId, collectionMethod, groupStatus, dunningExemption, paymentGateways, currencies, and brandingThemeId.
  • The product filter on listSubscriptions now 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 SubscriptionListInclude values: CURRENT_ACCOUNT_BALANCE_IN_CENTS, CURRENT_BILLING_AMOUNT, and COUPONS.
  • Added five SubscriptionStateFilter values: ENUM_EXPIRED_CARDS_LIVE_SUBSCRIPTIONS, ENUM_EXPIRED_CARDS_ALL_SUBSCRIPTIONS, AWAITING_SIGNUP, AWAITING_SIGNUP_DATE, and PREPAID_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/.

  • UpdateInvoice
  • UpdateInvoiceItem
  • UpdateInvoiceRequest
  • GetOneTimeTokenBankAccountPaymentProfile
  • QScope (enum)
  • GroupStatus (enum)
  • CollectionMethod1 (enum). The 1 suffix avoids a collision with the existing CollectionMethod.

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.
  • Customer
    • Added surcharging (?bool).
    • Added brandingThemeId (?int).
  • CustomerAttributes
    • Added surcharging (?bool).
  • CreateCustomer
    • Added surcharging (?bool).
    • Added brandingThemeId (?int).
  • UpdateCustomer
    • Added surcharging (?bool).
    • Added brandingThemeId (?int).
  • ProductFamily
    • Added surcharging (?bool).
  • CreateProductFamily
    • Added surcharging (?bool).
  • CreateSubscription
    • Added brandingThemeId (?int). Write-only. The subscription response does not return it.
  • UpdateSubscription
    • Added brandingThemeId (?int). Write-only. The subscription response does not return it.
  • Invoice
    • Added brandingThemeId (?int).
  • SubscriptionProductChange
    • Added previousProductPricePointId (?int).
    • Added newProductPricePointId (?int).
    • Added effectiveAt (?DateTime).
    • Only the subscription_product_change_scheduled event populates these three fields.

Bug Fixes

  • subscription_product_change_scheduled events no longer fail to deserialize. The payload carries previous_product_price_point_id, new_product_price_point_id, and effective_at. SubscriptionProductChange did not model these fields. It now does, so Event::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/.

lucassus and others added 4 commits August 11, 2026 20:52
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.
@imlukedewitt
imlukedewitt merged commit f5fb09d into main Aug 14, 2026
4 checks passed
@imlukedewitt
imlukedewitt deleted the publish branch August 14, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants