Skip to content

Release 10.0.0 - #207

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

Release 10.0.0#207
imlukedewitt merged 16 commits into
mainfrom
publish

Conversation

@imlukedewitt

@imlukedewittimlukedewitt commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

ab-java-sdk 10.0.0 Changelog

Breaking Changes

  • unit_balance is now a one-of container instead of an integer. This affects SubscriptionComponent, CreateSubscriptionComponent, MeteredUsage, and PrepaidUsage. Each container exposes fromNumber and fromString factory methods, and a match method that takes a case for each variant.
  • GetOneTimeTokenRequest.paymentProfile is now an any-of container. The endpoint can return a credit card profile or a bank account profile, keyed on payment_type. Direct getter access no longer reaches the profile fields, and GetOneTimeTokenRequestPaymentProfile exposes match for both variants.
  • ListSubscriptionsInput.getProduct() now returns ListSubscriptionsInputProduct instead of Integer. The filter accepts a product ID or an exact product name. Product handles are not supported. ListSubscriptionsInputProduct exposes fromNumber and fromString factory methods.
  • ListSubcriptionGroupPrepaymentItem is renamed to ListSubscriptionGroupPrepaymentItem. We corrected a typo in the schema title, and the generated class name follows the title. The properties of the model are unchanged.
  • The ListSubscriptionsInput constructor argument order changed. The parameter count went from 16 to 25. sort and direction moved to positions 3 and 4. Because the arity changed, existing positional calls fail to compile rather than misbind.
  • All-args constructors widened on models that gained properties. Any model listed under Model Enhancements has a longer all-args constructor.
  • CreditCardPaymentProfile.cardType can now be null. The API can now return null on a profile that previously always carried a value.

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 filters to ListSubscriptionsInput: q, qScope, customerId, collectionMethod, groupStatus, dunningExemption, paymentGateways, currencies, and brandingThemeId.
  • 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.

New Models

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

New container types in com.maxio.advancedbilling.models.containers:

  • SubscriptionComponentUnitBalance
  • CreateSubscriptionComponentUnitBalance
  • MeteredUsageNewUnitBalance
  • PrepaidUsageNewUnitBalance
  • PrepaidUsageNewOverageUnitBalance
  • GetOneTimeTokenRequestPaymentProfile
  • ListSubscriptionsInputProduct
  • UpdateInvoiceItemQuantity
  • UpdateInvoiceItemUnitPrice
  • UpdateInvoiceItemProductId
  • UpdateInvoiceItemProductPricePointId
  • UpdateInvoiceItemComponentId
  • UpdateInvoiceItemPricePointId

Model Enhancements

  • Component, CreateOrUpdateProduct, Product, EBBComponent, MeteredComponent, OnOffComponent, PrepaidUsageComponent, QuantityBasedComponent, UpdateComponent
    • Added unspscCode (String, nullable).
  • Customer
    • Added surcharging (Boolean).
    • Added brandingThemeId (Integer, nullable).
  • CustomerAttributes
    • Added surcharging (Boolean).
  • CreateCustomer
    • Added surcharging (Boolean).
    • Added brandingThemeId (Integer, nullable).
  • UpdateCustomer
    • Added surcharging (Boolean).
    • Added brandingThemeId (Integer, nullable).
  • ProductFamily
    • Added surcharging (Boolean).
  • CreateProductFamily
    • Added surcharging (Boolean).
  • CreateSubscription
    • Added brandingThemeId (Integer, nullable). Write-only. The subscription response does not return it.
  • UpdateSubscription
    • Added brandingThemeId (Integer, nullable). Write-only. The subscription response does not return it.
  • Invoice
    • Added brandingThemeId (Integer, nullable).
  • SubscriptionProductChange
    • Added previousProductPricePointId (Integer, nullable).
    • Added newProductPricePointId (Integer, nullable).
    • Added effectiveAt (ZonedDateTime, nullable).
    • 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.

Internal / Non-functional Changes

  • Javadoc and doc comments reworded across models and controllers after a wording and punctuation pass in the spec (no behavioral impact).

lucassusand others added 14 commits August 11, 2026 20:52
unit_balance is now typed as oneOf [integer, string] in the spec
(developer-portal#767, PLS-1832), since the API returns a string-encoded
decimal when a component has allow_fractional_quantities enabled. APIMatic
generates container types for this, so the int literals no longer compile.
- Wrap 11 CreateSubscriptionComponent.unitBalance(...) call sites in
CreateSubscriptionComponentUnitBalance.fromNumber(...)
- Read SubscriptionComponent.getUnitBalance() through a new
SubscriptionComponentUnitBalanceGetter matcher, modelled on the existing
SubscriptionComponentAllocatedQuantityGetter
- Branch the metered-component assertion on getAllowFractionalQuantities(),
mirroring the allocated_quantity block above it, so a fractional fixture
would fail an assertion rather than throw ClassCastException
The product query param on GET /subscriptions.json is now typed as
oneOf [integer, string] (developer-portal#706), which generates the
ListSubscriptionsInputProduct container.
Wrap the 3 ListSubscriptionsInput.Builder#product(...) call sites in
ListSubscriptionsInputProduct.fromNumber(...).
Product Family gained a surcharging property (developer-portal#771), which
adds a 4th parameter to the generated CreateProductFamily constructor.
Pass null for surcharging at the 7 call sites to preserve existing
behaviour, since the property defaults to true server-side when omitted.
The subscription_product_change_scheduled webhook is now documented
(developer-portal#776), adding a case to the EventEventSpecificData one-of.
EventSpecificDataGetter must implement it to satisfy the Cases interface.
Follow-up to the unit_balance one-of change (developer-portal#767).
MeteredUsage.getNewUnitBalance() now returns a MeteredUsageNewUnitBalance
container, so comparing it directly against an int silently failed at
runtime with "expected: 2 (Integer) but was: 2 (NumberCase)" - the
containers do not override equals(), and assertThat(Object).isEqualTo(int)
still compiles, so this was not caught by the compiler.
Unwrap via a new MeteredUsageNewUnitBalanceGetter matcher at both
assertion sites, following the existing matcher pattern.
Invoice gained a brandingThemeId property in this release, so
branding_theme_id is now deserialized into a real field instead of landing
in additionalProperties. The expected map size drops from 20 to 19.
The 422 message changed on the API side to cover not-yet-renewed segments:
before: Invoice status must be 'open', 'canceled', 'processing' or
'pending' and non-consolidated to be voided.
after: Invoice status must be 'open', 'canceled', 'processing', or a
pending invoice that is either non-consolidated or a
not-yet-renewed segment to be voided.
…tter
Reverts the case added in ae9ad54. The spec fix merged
Subscription-Product-Change-Scheduled into Subscription-Product-Change
rather than keeping two schemas, because the two could never be made
mutually exclusive for APIMatic's one-of matcher: the plain schema's
required set was a subset of the scheduled schema's properties, and extra
JSON keys never exclude a match (additionalProperties: false has no effect
on the generated models, which all extend BaseModel).
The regenerated SDK therefore deletes SubscriptionProductChangeScheduled
and folds its three extra fields into SubscriptionProductChange, so this
Cases method no longer exists on the interface.
Two unrelated failures in InvoicesControllerListInvoiceEventsTest:
1. shouldReturnInvoiceEventsForExistingInvoice - external_connected_data
now comes back as [] rather than null in the invoice additionalProperties,
so assert an empty list, matching how surcharges is already asserted.
(The 20 -> 19 size change from 619336a was correct; that assertion passed.
branding_theme_id became a modelled field and a new meter_fields key
appeared, netting -1.)
2. shouldReturnInvoiceEventsWithPaging - the 4 invoice events (issue,
payment, refund, void) are recorded asynchronously and setUp only slept
for a fixed 500ms, with the comment "sometimes some events are missing".
The paging assertions could therefore see an intermediate state, with 3
events instead of 4, so page 2 held 1 event rather than 2. This is a
pre-existing race, not a behaviour change: in the same CI run the sibling
test asserted hasSize(4) and passed.
Replaced the blind sleep with a poll that waits for all 4 events to be
visible (20 attempts, 500ms apart), which removes the flake for every
test in the class.
Verified with two consecutive local runs, 5/5 green each time.
lucassus
lucassus previously approved these changes Aug 13, 2026
@imlukedewitt
imlukedewitt merged commit 97cb898 into mainAug 14, 2026
2 of 3 checks passed
@imlukedewitt
imlukedewitt deleted the publish branch August 14, 2026 13:25
Sign up for freeto 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

@imlukedewitt@lucassus