Skip to content

Release v2.73.0#123

Open
cb-alish wants to merge 1 commit into
masterfrom
release-v2.73.0
Open

Release v2.73.0#123
cb-alish wants to merge 1 commit into
masterfrom
release-v2.73.0

Conversation

@cb-alish

Copy link
Copy Markdown
Collaborator

v2.73.0 (2026-06-12)

New Resources:

New Attributes:

New Parameters:

New Enums:

@snyk-io

snyk-io Bot commented Jun 12, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@hivel-marco hivel-marco Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 GrantBlock model with support for listing grant blocks and richer enum values around status, grant source, account type, and unit type.
  • Adds LedgerAccountBalance model, including nested ProvisionedBalance and OverdraftBalance structures, and a list_ledger_account_balances API.
  • Adds LedgerOperation model with retrieve, list, and operation APIs (capture, authorize, capture_authorization, release_authorization) plus expanded type and unit_type enums and sorting/filtering options.
  • Adds PromotionalGrant model with an idempotent promotional_grants creation API.
  • Extends CreditNote with a notes attribute and HostedPage with a layout attribute.
  • Adds a sort_by query parameter (with created_at/updated_at options) to list_omnichannel_subscriptions.
  • Updates Result to expose single-resource getters (ledger_account_balance, ledger_operation, grant_block, promotional_grant) and list getters (ledger_operations, grant_blocks).
  • Marks HostedPage.update_payment_method as 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_method signals 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.

Comment on lines +19 to +56
def self.list_ledger_operations(params, env=nil, headers={})
jsonKeys = {
}
options = {}
Request.send('get', uri_path("ledger_operations"), params, env, headers,nil, true, jsonKeys, options)
end

def self.capture(params, env=nil, headers={})
jsonKeys = {
:metadata => 0,
}
options = {}
Request.send('post', uri_path("ledger_operations","capture"), params, env, headers,nil, true, jsonKeys, options)
end

def self.authorize(params, env=nil, headers={})
jsonKeys = {
:metadata => 0,
}
options = {}
Request.send('post', uri_path("ledger_operations","authorize"), params, env, headers,nil, true, jsonKeys, options)
end

def self.capture_authorization(params, env=nil, headers={})
jsonKeys = {
:metadata => 0,
}
options = {}
Request.send('post', uri_path("ledger_operations","capture_authorization"), params, env, headers,nil, true, jsonKeys, options)
end

def self.release_authorization(params, env=nil, headers={})
jsonKeys = {
:metadata => 0,
}
options = {}
Request.send('post', uri_path("ledger_operations","release_authorization"), params, env, headers,nil, true, jsonKeys, options)
end

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Priority: 🟠 HIGH

Problem: The capture, authorize, capture_authorization, and release_authorization methods pass true for the boolean argument to Request.send, which is used to indicate a list response in the same file (list_ledger_operations), causing these single-operation endpoints to be treated as list endpoints.

Why: Treating a single-resource response as a list can break result parsing, e.g., callers expecting Result#ledger_operation may not work correctly if the internal Result is configured for list semantics, leading to runtime errors or incorrect data handling.

How to Fix: Change the boolean argument in these four Request.send calls from true to false so that these methods are handled as single-resource operations, consistent with retrieve_ledger_operation.

Suggested change
def self.list_ledger_operations(params, env=nil, headers={})
jsonKeys = {
}
options = {}
Request.send('get', uri_path("ledger_operations"), params, env, headers,nil, true, jsonKeys, options)
end
def self.capture(params, env=nil, headers={})
jsonKeys = {
:metadata => 0,
}
options = {}
Request.send('post', uri_path("ledger_operations","capture"), params, env, headers,nil, true, jsonKeys, options)
end
def self.authorize(params, env=nil, headers={})
jsonKeys = {
:metadata => 0,
}
options = {}
Request.send('post', uri_path("ledger_operations","authorize"), params, env, headers,nil, true, jsonKeys, options)
end
def self.capture_authorization(params, env=nil, headers={})
jsonKeys = {
:metadata => 0,
}
options = {}
Request.send('post', uri_path("ledger_operations","capture_authorization"), params, env, headers,nil, true, jsonKeys, options)
end
def self.release_authorization(params, env=nil, headers={})
jsonKeys = {
:metadata => 0,
}
options = {}
Request.send('post', uri_path("ledger_operations","release_authorization"), params, env, headers,nil, true, jsonKeys, options)
end
def self.list_ledger_operations(params, env=nil, headers={})
jsonKeys = {
}
options = {}
Request.send('get', uri_path("ledger_operations"), params, env, headers,nil, true, jsonKeys, options)
end
def self.capture(params, env=nil, headers={})
jsonKeys = {
:metadata => 0,
}
options = {}
Request.send('post', uri_path("ledger_operations","capture"), params, env, headers,nil, false, jsonKeys, options)
end
def self.authorize(params, env=nil, headers={})
jsonKeys = {
:metadata => 0,
}
options = {}
Request.send('post', uri_path("ledger_operations","authorize"), params, env, headers,nil, false, jsonKeys, options)
end
def self.capture_authorization(params, env=nil, headers={})
jsonKeys = {
:metadata => 0,
}
options = {}
Request.send('post', uri_path("ledger_operations","capture_authorization"), params, env, headers,nil, false, jsonKeys, options)
end
def self.release_authorization(params, env=nil, headers={})
jsonKeys = {
:metadata => 0,
}
options = {}
Request.send('post', uri_path("ledger_operations","release_authorization"), params, env, headers,nil, false, jsonKeys, options)
end

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.

1 participant