ab-ruby-sdk 10.0.0 Changelog
Breaking Changes
unit_balanceis now anInteger | Stringunion. This affectsSubscriptionComponent,CreateSubscriptionComponent,MeteredUsage, andPrepaidUsage. Components that support fractional quantities return a string.GetOneTimeTokenRequest#payment_profilecan now be a bank account profile. The endpoint returnsGetOneTimeTokenPaymentProfileorGetOneTimeTokenBankAccountPaymentProfile. Ruby generates this as a plain any-of with no discriminator, so the object class is the only signal of 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#card_typeis now nullable. The API can now return nil on a profile that previously always carried a value.ListSubcriptionGroupPrepaymentItemis renamed toListSubscriptionGroupPrepaymentItem. We corrected a typo in the schema title, and Ruby class names come from the title. The properties of the model are unchanged.
New Features
- Added
update_invoiceanddelete_invoicetoInvoicesController. 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#list_subscriptions:q,q_scope,customer_id,collection_method,group_status,dunning_exemption,payment_gateways,currencies, andbranding_theme_id. - The
productfilter onlist_subscriptionsnow 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 Ruby. - 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 list_subscriptions takes a single options hash, the reordered query parameters in the spec do not change any call site.
New Models
UpdateInvoiceUpdateInvoiceItemUpdateInvoiceRequestGetOneTimeTokenBankAccountPaymentProfileQScope(enum)CollectionMethod1(enum). The1suffix avoids a collision with the existingCollectionMethod.GroupStatus(enum)
The new unions are registered in lib/advanced_billing/utilities/union_type_lookup.rb rather than generated as standalone classes. They cover the unit_balance fields, GetOneTimeTokenRequestPaymentProfile, ListSubscriptionsInputProduct, and six UpdateInvoiceItem fields.
Model Enhancements
Component,EbbComponent,MeteredComponent,OnOffComponent,PrepaidUsageComponent,QuantityBasedComponent,UpdateComponent,Product,CreateOrUpdateProduct- Added
unspsc_code(String, nullable).
- Added
Customer,CustomerAttributes,CreateCustomer,UpdateCustomer- Added
surcharging(TrueClass | FalseClass).
- Added
ProductFamily,CreateProductFamily- Added
surcharging(TrueClass | FalseClass).
- Added
Customer,CreateCustomer,UpdateCustomer,Invoice- Added
branding_theme_id(Integer, nullable).
- Added
CreateSubscription,UpdateSubscription- Added
branding_theme_id(Integer, nullable). Write-only. Create and update accept it, but the subscription response does not return it.
- Added
SubscriptionProductChange- Added
previous_product_price_point_id(Integer, nullable). - Added
new_product_price_point_id(Integer, nullable). - Added
effective_at(DateTime, nullable). - 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#event_specific_dataresolves 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).
- Version and user agent bumped to
10.0.0.
Full Changelog: 9.1.0...10.0.0