Uh oh!
There was an error while loading. Please reload this page.
Release 10.0.0 - #207
Merged
Merged
Conversation
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
previously approved these changes
Aug 13, 2026
lucassus
approved these changes
Aug 14, 2026
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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-java-sdk 10.0.0 Changelog
Breaking Changes
unit_balanceis now a one-of container instead of an integer. This affectsSubscriptionComponent,CreateSubscriptionComponent,MeteredUsage, andPrepaidUsage. Each container exposesfromNumberandfromStringfactory methods, and amatchmethod that takes a case for each variant.GetOneTimeTokenRequest.paymentProfileis now an any-of container. The endpoint can return a credit card profile or a bank account profile, keyed onpayment_type. Direct getter access no longer reaches the profile fields, andGetOneTimeTokenRequestPaymentProfileexposesmatchfor both variants.ListSubscriptionsInput.getProduct()now returnsListSubscriptionsInputProductinstead ofInteger. The filter accepts a product ID or an exact product name. Product handles are not supported.ListSubscriptionsInputProductexposesfromNumberandfromStringfactory methods.ListSubcriptionGroupPrepaymentItemis renamed toListSubscriptionGroupPrepaymentItem. We corrected a typo in the schema title, and the generated class name follows the title. The properties of the model are unchanged.ListSubscriptionsInputconstructor argument order changed. The parameter count went from 16 to 25.sortanddirectionmoved to positions 3 and 4. Because the arity changed, existing positional calls fail to compile rather than misbind.CreditCardPaymentProfile.cardTypecan now be null. The API can now return null on a profile that previously always carried a value.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.ListSubscriptionsInput:q,qScope,customerId,collectionMethod,groupStatus,dunningExemption,paymentGateways,currencies, andbrandingThemeId.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.New Models
UpdateInvoiceUpdateInvoiceItemUpdateInvoiceRequestGetOneTimeTokenBankAccountPaymentProfileQScope(enum)CollectionMethod1(enum). The1suffix avoids a collision with the existingCollectionMethod.GroupStatus(enum)New container types in
com.maxio.advancedbilling.models.containers:SubscriptionComponentUnitBalanceCreateSubscriptionComponentUnitBalanceMeteredUsageNewUnitBalancePrepaidUsageNewUnitBalancePrepaidUsageNewOverageUnitBalanceGetOneTimeTokenRequestPaymentProfileListSubscriptionsInputProductUpdateInvoiceItemQuantityUpdateInvoiceItemUnitPriceUpdateInvoiceItemProductIdUpdateInvoiceItemProductPricePointIdUpdateInvoiceItemComponentIdUpdateInvoiceItemPricePointIdModel Enhancements
Component,CreateOrUpdateProduct,Product,EBBComponent,MeteredComponent,OnOffComponent,PrepaidUsageComponent,QuantityBasedComponent,UpdateComponentunspscCode(String, nullable).Customersurcharging(Boolean).brandingThemeId(Integer, nullable).CustomerAttributessurcharging(Boolean).CreateCustomersurcharging(Boolean).brandingThemeId(Integer, nullable).UpdateCustomersurcharging(Boolean).brandingThemeId(Integer, nullable).ProductFamilysurcharging(Boolean).CreateProductFamilysurcharging(Boolean).CreateSubscriptionbrandingThemeId(Integer, nullable). Write-only. The subscription response does not return it.UpdateSubscriptionbrandingThemeId(Integer, nullable). Write-only. The subscription response does not return it.InvoicebrandingThemeId(Integer, nullable).SubscriptionProductChangepreviousProductPricePointId(Integer, nullable).newProductPricePointId(Integer, nullable).effectiveAt(ZonedDateTime, nullable).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.Internal / Non-functional Changes