Release v2.73.0#123
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
PR Complexity Score: 3.8 - Simple
View Breakdown
- Lines Changed: 212
- Files Changed: 12
- Complexity Added: 15
- Raw Score: 62.74
Overview
This PR releases version 2.73.0 of the Chargebee Ruby client, introducing new models and API operations for grant blocks, ledger account balances/operations, and promotional grants. It also extends existing models (CreditNote, HostedPage, OmnichannelSubscription) with new attributes and sorting/query parameters. The Result wrapper is updated to expose the new resources and lists.
Key Changes
- Bumps gem version to 2.73.0 with updated date and changelog entry documenting the new APIs and enums.
- Adds
GrantBlockmodel with support for listing grant blocks and richer enum values around status, grant source, account type, and unit type. - Adds
LedgerAccountBalancemodel, including nestedProvisionedBalanceandOverdraftBalancestructures, and alist_ledger_account_balancesAPI. - Adds
LedgerOperationmodel with retrieve, list, and operation APIs (capture,authorize,capture_authorization,release_authorization) plus expandedtypeandunit_typeenums and sorting/filtering options. - Adds
PromotionalGrantmodel with an idempotentpromotional_grantscreation API. - Extends
CreditNotewith anotesattribute andHostedPagewith alayoutattribute. - Adds a
sort_byquery parameter (withcreated_at/updated_atoptions) tolist_omnichannel_subscriptions. - Updates
Resultto expose single-resource getters (ledger_account_balance,ledger_operation,grant_block,promotional_grant) and list getters (ledger_operations,grant_blocks). - Marks
HostedPage.update_payment_methodas deprecated.
Risks & Considerations
- New models and operations rely on backend API support; clients must ensure the Chargebee API version they target includes grant blocks, ledger operations, and promotional grants.
- Expanded enum values for statuses, types, and unit types could affect client-side logic that assumes a smaller set of possible values.
- The new list and sort parameters may change default ordering or filtering behavior if client code passes them incorrectly.
- Deprecation of
HostedPage.update_payment_methodsignals future removal; consumers should migrate to the recommended alternative before upgrading further.
File-level change summary
| File | Change summary |
|---|---|
| CHANGELOG.md | Adds v2.73.0 release notes describing new resources, attributes, parameters, and enum values. |
| Gemfile.lock | Updates the local chargebee gem version reference from 2.72.0 to 2.73.0. |
| VERSION | Bumps the library version string from 2.72.0 to 2.73.0. |
| chargebee.gemspec | Updates gem version/date and includes new model files (grant_block, ledger_account_balance, ledger_operation, promotional_grant) in the gem. |
| lib/chargebee.rb | Updates the ChargeBee::VERSION constant to 2.73.0. |
| lib/chargebee/models/credit_note.rb | Adds the notes attribute to the CreditNote model. |
| lib/chargebee/models/grant_block.rb | Introduces the GrantBlock model with attributes and a list_grant_blocks API method. |
| lib/chargebee/models/hosted_page.rb | Adds a layout attribute and marks update_payment_method as deprecated. |
| lib/chargebee/models/ledger_account_balance.rb | Introduces the LedgerAccountBalance model with nested balance types and a list_ledger_account_balances API method. |
| lib/chargebee/models/ledger_operation.rb | Introduces the LedgerOperation model with retrieve, list, and capture/authorize-related API methods. |
| lib/chargebee/models/promotional_grant.rb | Introduces the PromotionalGrant model with an idempotent promotional_grants creation API method. |
| lib/chargebee/result.rb | Adds getters for new single resources and list accessors for ledger operations and grant blocks to the Result wrapper. |
There was a problem hiding this comment.
PR Complexity Score: 2.3 - Simple
View Breakdown
- Lines Changed: 105
- Files Changed: 4
- Complexity Added: 8
- Raw Score: 26.1
Overview
This PR introduces new ChargeBee model classes to support grant blocks, ledger account balances, and ledger operations, exposing corresponding API operations.
It also adjusts the behavior of the existing offer_fulfillments_get call to change how the response is handled.
Overall, the changes expand the SDK surface for ledger-related features while making a small behavioral tweak to offer fulfillment retrieval.
Key Changes
- Added a
GrantBlockmodel with attributes for tracking grant amounts, balances, status, and metadata, along with alist_grant_blocksAPI method to query grant block records. - Added a
LedgerAccountBalancemodel, including nestedProvisionedBalanceandOverdraftBalanceclasses, and alist_ledger_account_balancesAPI operation to fetch ledger balances by subscription/unit. - Added a
LedgerOperationmodel with attributes for balances, timestamps, metadata, and subscription/unit linkage, plus multiple API operations: retrieve a single ledger operation, list operations, and performcapture,authorize,capture_authorization, andrelease_authorizationactions. - Updated
offer_fulfillments_getto callRequest.sendwith thegrowparameter set tofalseinstead oftrue, changing how the response is processed/deserialized.
Risks & Considerations
- New APIs (
grant_blocks,ledger_account_balances,ledger_operations) depend on corresponding backend endpoints; mismatches in API shape or availability could cause runtime errors. - The change from
grow = truetogrow = falseforoffer_fulfillments_getmay alter response parsing or model inflation, potentially impacting existing consumers that rely on the previous behavior. - The new models assume specific field names and types; any divergence from the backend contract (e.g., missing fields, different types) could lead to nil attributes or unexpected behavior.
File-level change summary
| File | Change summary |
|---|---|
| lib/chargebee/models/grant_block.rb | Adds a new GrantBlock model with grant-related attributes and a list_grant_blocks API method. |
| lib/chargebee/models/ledger_account_balance.rb | Adds a new LedgerAccountBalance model with nested balance classes and a list_ledger_account_balances API method. |
| lib/chargebee/models/ledger_operation.rb | Adds a new LedgerOperation model and API methods for retrieving, listing, and mutating ledger operations (capture/authorize flows). |
| lib/chargebee/models/offer_fulfillment.rb | Updates offer_fulfillments_get to disable the grow behavior when calling Request.send. |
v2.73.0 (2026-06-12)
New Resources:
GrantBlockhas been added.LedgerAccountBalancehas been added.LedgerOperationhas been added.PromotionalGranthas been added.New Attributes:
noteshas been added toCreditNote.layouthas been added toHostedPage.New Parameters:
sort_byhas been added as query parameter tolist_omnichannel_subscriptionsinOmnichannelSubscription.New Enums:
available,exhausted,scheduled, andin_grace_periodhave been added as new values enumStatus.subscription_created,subscription_changed,top_up,promotional_grants, androlloverhave been added as new values to enum attributegrant_sourceinGrantBlock.provisionedandoverdrafthave been added as new values to enum attributeaccount_typeinGrantBlock.credit_unithas been added as a new value to enum attributeunit_typeinGrantBlock.credit_unithas been added as a new value to enum attributeunit_typeinLedgerAccountBalance.allocation,capture,authorize,release_authorization,capture_authorization,expiry,void,rollover, andadjustmenthave been added as new values to enum attributetypeinLedgerOperation.credit_unithas been added as a new value to enum attributeunit_typeinLedgerOperation.expires_at,created_at, andeffective_fromhave been added as new values to enum query parametersort_by.ascinlist_grant_blocksofGrantBlock.expires_at,created_at, andeffective_fromhave been added as new values to enum query parametersort_by.descinlist_grant_blocksofGrantBlock.allocation,release_authorization,void,capture,rollover,adjustment,expiry,authorize, andcapture_authorizationhave been added as new values to enum query parametertype.isinlist_ledger_operationsofLedgerOperation.allocation,release_authorization,void,capture,rollover,adjustment,expiry,authorize, andcapture_authorizationhave been added as new values to enum query parametertype.ininlist_ledger_operationsofLedgerOperation.created_athas been added as a new value to enum query parametersort_by.ascinlist_ledger_operationsofLedgerOperation.created_athas been added as a new value to enum query parametersort_by.descinlist_ledger_operationsofLedgerOperation.updated_atandcreated_athave been added as new values to enum query parametersort_by.ascinlist_omnichannel_subscriptionsofOmnichannelSubscription.updated_atandcreated_athave been added as new values to enum query parametersort_by.descinlist_omnichannel_subscriptionsofOmnichannelSubscription.