Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,64 @@
### v2.83.0 (2026-11-13)
* * *
### New Resources:
- `BillingLineItem` has been added.
- `BillingMetadata` has been added.
- `GatewayRequestLog` has been added.
- `GatewayWebhookLog` has been added.
- `OrganizationDetail` has been added.


### New Attributes:
- `description` has been added to `Discount`.
- `billing_metadata` has been added to `GrantBlock`.
- `offline_payment_method` has been added to `Invoice`.


### New Parameters:
- `discounts.description` has been added as request body parameter to `estimate_for_creating_a_customer_and_subscription` in `Estimate`.
- `discounts.description` has been added as request body parameter to `estimate_for_updating_a_subscription` in `Estimate`.
- `discounts.description` has been added as request body parameter to `estimate_for_creating_a_subscription` in `Estimate`.
- `allowed_billing_frequencies` has been added as request body parameter to `checkout_gift_subscription_for_items` in `HostedPage`.
- `show_billing_frequency_selector` has been added as request body parameter to `checkout_gift_subscription_for_items` in `HostedPage`.
- `allowed_billing_frequencies` has been added as request body parameter to `create_checkout_for_a_new_subscription` in `HostedPage`.
- `show_billing_frequency_selector` has been added as request body parameter to `create_checkout_for_a_new_subscription` in `HostedPage`.
- `allowed_billing_frequencies` has been added as request body parameter to `create_checkout_to_update_a_subscription` in `HostedPage`.
- `show_billing_frequency_selector` has been added as request body parameter to `create_checkout_to_update_a_subscription` in `HostedPage`.
- `credit_notes.amount` has been added as request body parameter to `apply_credits_for_an_invoice` in `Invoice`.
- `credit_notes.applied_at` has been added as request body parameter to `apply_credits_for_an_invoice` in `Invoice`.
- `offline_payment_method` has been added as request body parameter to `create_invoice_for_items_and_one-time_charges` in `Invoice`.
- `discounts.description` has been added as request body parameter to `update_subscription_for_items` in `Subscription`.
- `discounts.description` has been added as request body parameter to `create_subscription_for_items` in `Subscription`.
- `group_by.window_size` has been added as request body parameter to `retrieve_usages_for_an_invoice_as_pdf` in `Usage`.


### New Events:
- `organization_details_updated` has been added.
- `organization_details_created` has been added.


### Deleted Actions:
- `list_citations_for_a_draft_request` has been removed from `DraftRequest`.
- `add_citations_to_a_draft_request` has been removed from `DraftRequest`.
- `execute_a_draft_request` has been removed from `DraftRequest`.
- `estimate_a_draft_request` has been removed from `DraftRequest`.
- `list_comments_for_a_draft_request` has been removed from `DraftRequest`.
- `add_comments_to_a_draft_request` has been removed from `DraftRequest`.
- `retrieve_a_draft_request` has been removed from `DraftRequest`.
- `update_a_draft_request` has been removed from `DraftRequest`.
- `create_a_draft_request` has been removed from `DraftRequest`.


### New Enums:
- `organization_details_created` and `organization_details_updated` have been added as new values enum `EventType`.
- `invocation_time` has been added as a new value to enum query parameter `sort_by.asc` in `list_gateway_request_logs` of `GatewayRequestLog`.
- `invocation_time` has been added as a new value to enum query parameter `sort_by.desc` in `list_gateway_request_logs` of `GatewayRequestLog`.
- `received_at` has been added as a new value to enum query parameter `sort_by.asc` in `list_gateway_webhook_logs` of `GatewayWebhookLog`.
- `received_at` has been added as a new value to enum query parameter `sort_by.desc` in `list_gateway_webhook_logs` of `GatewayWebhookLog`.
- `none` and `day` have been added as new values to enum request body parameter `group_by.window_size` in `retrieve_usages_for_an_invoice_as_pdf` of `Usage`.



### v2.82.0 (2026-11-02)
* * *
### New Resources:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
chargebee (2.82.0)
chargebee (2.83.0)
cgi (>= 0.1.0, < 1.0.0)

GEM
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.82.0
2.83.0
9 changes: 7 additions & 2 deletions chargebee.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Gem::Specification.new do |s|
s.rubygems_version = '1.3.5'
s.required_ruby_version = '>= 1.9.3'
s.name = 'chargebee'
s.version = '2.82.0'
s.date = '2026-11-02'
s.version = '2.83.0'
s.date = '2026-11-13'
s.summary = "Ruby client for Chargebee API."
s.description = "Subscription Billing - Simple. Secure. Affordable. More details at www.chargebee.com."
s.metadata = {
Expand Down Expand Up @@ -55,6 +55,8 @@ Gem::Specification.new do |s|
lib/chargebee/models/attached_item.rb
lib/chargebee/models/attribute.rb
lib/chargebee/models/billing_configuration.rb
lib/chargebee/models/billing_line_item.rb
lib/chargebee/models/billing_metadata.rb
lib/chargebee/models/brand.rb
lib/chargebee/models/business_entity.rb
lib/chargebee/models/business_entity_transfer.rb
Expand Down Expand Up @@ -105,6 +107,8 @@ Gem::Specification.new do |s|
lib/chargebee/models/filter_condition.rb
lib/chargebee/models/gateway_error_detail.rb
lib/chargebee/models/gateway_payment_method_token.rb
lib/chargebee/models/gateway_request_log.rb
lib/chargebee/models/gateway_webhook_log.rb
lib/chargebee/models/gift.rb
lib/chargebee/models/grant_block.rb
lib/chargebee/models/group_by_attribute.rb
Expand Down Expand Up @@ -141,6 +145,7 @@ Gem::Specification.new do |s|
lib/chargebee/models/omnichannel_subscription_item_scheduled_change.rb
lib/chargebee/models/omnichannel_transaction.rb
lib/chargebee/models/order.rb
lib/chargebee/models/organization_detail.rb
lib/chargebee/models/payment_intent.rb
lib/chargebee/models/payment_reference_number.rb
lib/chargebee/models/payment_schedule.rb
Expand Down
7 changes: 6 additions & 1 deletion lib/chargebee.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
require File.dirname(__FILE__) + '/chargebee/models/attached_item'
require File.dirname(__FILE__) + '/chargebee/models/attribute'
require File.dirname(__FILE__) + '/chargebee/models/billing_configuration'
require File.dirname(__FILE__) + '/chargebee/models/billing_line_item'
require File.dirname(__FILE__) + '/chargebee/models/billing_metadata'
require File.dirname(__FILE__) + '/chargebee/models/brand'
require File.dirname(__FILE__) + '/chargebee/models/business_entity'
require File.dirname(__FILE__) + '/chargebee/models/business_entity_transfer'
Expand Down Expand Up @@ -77,6 +79,8 @@
require File.dirname(__FILE__) + '/chargebee/models/filter_condition'
require File.dirname(__FILE__) + '/chargebee/models/gateway_error_detail'
require File.dirname(__FILE__) + '/chargebee/models/gateway_payment_method_token'
require File.dirname(__FILE__) + '/chargebee/models/gateway_request_log'
require File.dirname(__FILE__) + '/chargebee/models/gateway_webhook_log'
require File.dirname(__FILE__) + '/chargebee/models/gift'
require File.dirname(__FILE__) + '/chargebee/models/grant_block'
require File.dirname(__FILE__) + '/chargebee/models/group_by_attribute'
Expand Down Expand Up @@ -112,6 +116,7 @@
require File.dirname(__FILE__) + '/chargebee/models/omnichannel_subscription_item_scheduled_change'
require File.dirname(__FILE__) + '/chargebee/models/omnichannel_transaction'
require File.dirname(__FILE__) + '/chargebee/models/order'
require File.dirname(__FILE__) + '/chargebee/models/organization_detail'
require File.dirname(__FILE__) + '/chargebee/models/payment_intent'
require File.dirname(__FILE__) + '/chargebee/models/payment_reference_number'
require File.dirname(__FILE__) + '/chargebee/models/payment_schedule'
Expand Down Expand Up @@ -166,7 +171,7 @@

module ChargeBee

VERSION = '2.82.0'
VERSION = '2.83.0'

@@default_env = nil
@@verify_ca_certs = true
Expand Down
10 changes: 10 additions & 0 deletions lib/chargebee/models/billing_line_item.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module ChargeBee
class BillingLineItem < Model

attr_accessor :id, :invoice_number, :quantity

# OPERATIONS
#-----------

end # ~BillingLineItem
end # ~ChargeBee
10 changes: 10 additions & 0 deletions lib/chargebee/models/billing_metadata.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module ChargeBee
class BillingMetadata < Model

attr_accessor :item_price_id, :line_items

# OPERATIONS
#-----------

end # ~BillingMetadata
end # ~ChargeBee
6 changes: 3 additions & 3 deletions lib/chargebee/models/discount.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module ChargeBee
class Discount < Model

attr_accessor :id, :invoice_name, :type, :percentage, :amount, :quantity, :currency_code, :duration_type,
:period, :period_unit, :included_in_mrr, :apply_on, :item_price_id, :created_at, :apply_till,
:applied_count, :coupon_id, :index
attr_accessor :id, :invoice_name, :description, :type, :percentage, :amount, :quantity, :currency_code,
:duration_type, :period, :period_unit, :included_in_mrr, :apply_on, :item_price_id, :created_at,
:apply_till, :applied_count, :coupon_id, :index

# OPERATIONS
#-----------
Expand Down
28 changes: 28 additions & 0 deletions lib/chargebee/models/gateway_request_log.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module ChargeBee
class GatewayRequestLog < Model

attr_accessor :log_id, :url, :status_code, :method, :request_body, :response_body, :request_headers,
:response_headers, :gateway, :customer_handle, :invoice_handle, :transaction_handle, :payment_method_handle,
:gateway_credential_handle, :payment_attempt_handle, :payment_intent_handle, :payment_method_name,
:operation_name, :operation_type, :action_type, :source, :trace_id_hash, :invocation_time, :response_received_at,
:response_time

# OPERATIONS
#-----------

def self.list(params={}, env=nil, headers={})
jsonKeys = {
}
options = {}
Request.send_list_request('get', uri_path("gateway_request_logs"), params, env, headers,nil, false, jsonKeys, options, "gatewayRequestLog", "list")
end

def self.retrieve(id, env=nil, headers={})
jsonKeys = {
}
options = {}
Request.send('get', uri_path("gateway_request_logs",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "gatewayRequestLog", "retrieve")
end

end # ~GatewayRequestLog
end # ~ChargeBee
27 changes: 27 additions & 0 deletions lib/chargebee/models/gateway_webhook_log.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module ChargeBee
class GatewayWebhookLog < Model

attr_accessor :webhook_id, :url, :method, :status_code, :gateway, :id_at_gateway, :customer_handle,
:invoice_handle, :transaction_handle, :payment_method_handle, :gateway_credential_handle, :payment_attempt_handle,
:payment_intent_handle, :payment_method_name, :request_body, :response_body, :request_headers,
:response_headers, :received_at, :response_time

# OPERATIONS
#-----------

def self.list(params={}, env=nil, headers={})
jsonKeys = {
}
options = {}
Request.send_list_request('get', uri_path("gateway_webhook_logs"), params, env, headers,nil, false, jsonKeys, options, "gatewayWebhookLog", "list")
end

def self.retrieve(id, env=nil, headers={})
jsonKeys = {
}
options = {}
Request.send('get', uri_path("gateway_webhook_logs",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "gatewayWebhookLog", "retrieve")
end

end # ~GatewayWebhookLog
end # ~ChargeBee
6 changes: 5 additions & 1 deletion lib/chargebee/models/grant_block.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ class OverdraftBlockBalance < Model
attr_accessor :is_unlimited, :limit, :total_balance, :usable_balance, :used_amount
end

class BillingMetadata < Model
attr_accessor :item_price_id, :line_items
end

attr_accessor :id, :subscription_id, :unit_id, :unit_type, :account_type, :granted_amount, :effective_from,
:expires_at, :balance, :hold_amount, :used_amount, :expired_amount, :rolled_over_amount, :voided_amount,
:origin_grant_block_id, :status, :grant_source, :created_at, :modified_at, :resource_version,
:provisioned_block_balance, :overdraft_block_balance, :metadata
:provisioned_block_balance, :overdraft_block_balance, :billing_metadata, :metadata

# OPERATIONS
#-----------
Expand Down
13 changes: 7 additions & 6 deletions lib/chargebee/models/invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,13 @@ class SiteDetailsAtCreation < Model
:total_in_local_currency, :amount_due, :amount_adjusted, :amount_paid, :paid_at, :write_off_amount,
:credits_applied, :dunning_status, :next_retry_at, :voided_at, :resource_version, :updated_at,
:line_items_next_offset, :exchange_rates, :first_invoice, :new_sales_amount, :has_advance_charges,
:term_finalized, :is_gifted, :generated_at, :expected_payment_date, :amount_to_collect, :round_off_amount,
:line_items, :line_item_tiers, :line_item_discounts, :line_item_taxes, :line_item_credits, :line_item_addresses,
:discounts, :taxes, :tax_origin, :linked_payments, :reference_transactions, :retry_segment_id,
:dunning_attempts, :applied_credits, :adjustment_credit_notes, :issued_credit_notes, :linked_orders,
:notes, :shipping_address, :billing_address, :statement_descriptor, :einvoice, :void_reason_code,
:deleted, :tax_category, :vat_number_prefix, :channel, :business_entity_id, :brand_id, :site_details_at_creation
:offline_payment_method, :term_finalized, :is_gifted, :generated_at, :expected_payment_date,
:amount_to_collect, :round_off_amount, :line_items, :line_item_tiers, :line_item_discounts,
:line_item_taxes, :line_item_credits, :line_item_addresses, :discounts, :taxes, :tax_origin,
:linked_payments, :reference_transactions, :retry_segment_id, :dunning_attempts, :applied_credits,
:adjustment_credit_notes, :issued_credit_notes, :linked_orders, :notes, :shipping_address, :billing_address,
:statement_descriptor, :einvoice, :void_reason_code, :deleted, :tax_category, :vat_number_prefix,
:channel, :business_entity_id, :brand_id, :site_details_at_creation

# OPERATIONS
#-----------
Expand Down
35 changes: 35 additions & 0 deletions lib/chargebee/models/organization_detail.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module ChargeBee
class OrganizationDetail < Model

attr_accessor :id, :organization_name, :email, :address_line1, :address_line2, :address_line3,
:city, :state_code, :state, :country_code, :zip, :phone, :fax, :website, :is_vat_number_present,
:vat_number, :resource_version, :updated_at, :business_entity_id

# OPERATIONS
#-----------

def self.create(params, env=nil, headers={})
jsonKeys = {
}
options = {
:isIdempotent => true
}
Request.send('post', uri_path("organization_details"), params, env, headers,nil, false, jsonKeys, options, "organizationDetail", "create")
end

def self.retrieve(id, env=nil, headers={})
jsonKeys = {
}
options = {}
Request.send('get', uri_path("organization_details",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "organizationDetail", "retrieve")
end

def self.list(params={}, env=nil, headers={})
jsonKeys = {
}
options = {}
Request.send_list_request('get', uri_path("organization_details"), params, env, headers,nil, false, jsonKeys, options, "organizationDetail", "list")
end

end # ~OrganizationDetail
end # ~ChargeBee
2 changes: 1 addition & 1 deletion lib/chargebee/models/subscription.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class ContractTerm < Model
end

class Discount < Model
attr_accessor :id, :invoice_name, :type, :percentage, :amount, :quantity, :currency_code, :duration_type, :period, :period_unit, :included_in_mrr, :apply_on, :item_price_id, :created_at, :apply_till, :applied_count, :coupon_id, :index
attr_accessor :id, :invoice_name, :description, :type, :percentage, :amount, :quantity, :currency_code, :duration_type, :period, :period_unit, :included_in_mrr, :apply_on, :item_price_id, :created_at, :apply_till, :applied_count, :coupon_id, :index
end

attr_accessor :id, :currency_code, :plan_id, :plan_quantity, :plan_unit_price, :setup_fee, :billing_period,
Expand Down
27 changes: 25 additions & 2 deletions lib/chargebee/result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,16 @@ def email_log()
return email_log;
end

def gateway_request_log()
gateway_request_log = get(:gateway_request_log, GatewayRequestLog);
return gateway_request_log;
end

def gateway_webhook_log()
gateway_webhook_log = get(:gateway_webhook_log, GatewayWebhookLog);
return gateway_webhook_log;
end

def invoice()
invoice = get(:invoice, Invoice,
{:exchange_rates => Invoice::ExchangeRate, :line_items => Invoice::LineItem, :line_item_tiers => Invoice::LineItemTier, :line_item_discounts => Invoice::LineItemDiscount, :line_item_taxes => Invoice::LineItemTax, :line_item_credits => Invoice::LineItemCredit, :line_item_addresses => Invoice::LineItemAddress, :discounts => Invoice::Discount, :taxes => Invoice::Tax, :tax_origin => Invoice::TaxOrigin, :linked_payments => Invoice::LinkedPayment, :reference_transactions => Invoice::ReferenceTransaction, :dunning_attempts => Invoice::DunningAttempt, :applied_credits => Invoice::AppliedCredit, :adjustment_credit_notes => Invoice::AdjustmentCreditNote, :issued_credit_notes => Invoice::IssuedCreditNote, :linked_orders => Invoice::LinkedOrder, :notes => Invoice::Note, :shipping_address => Invoice::ShippingAddress, :billing_address => Invoice::BillingAddress, :statement_descriptor => Invoice::StatementDescriptor, :einvoice => Invoice::Einvoice, :site_details_at_creation => Invoice::SiteDetailsAtCreation});
Expand Down Expand Up @@ -502,6 +512,11 @@ def payment_voucher()
return payment_voucher;
end

def organization_detail()
organization_detail = get(:organization_detail, OrganizationDetail);
return organization_detail;
end

def currency()
currency = get(:currency, Currency);
return currency;
Expand Down Expand Up @@ -795,9 +810,17 @@ def ledger_operation()
return ledger_operation;
end

def billing_metadata()
billing_metadata = get(:billing_metadata, BillingMetadata, {},
{:line_items => BillingLineItem});
billing_metadata.init_dependant_list(@response[:billing_metadata], :line_items,
{});
return billing_metadata;
end

def grant_block()
grant_block = get(:grant_block, GrantBlock,
{:provisioned_block_balance => GrantBlock::ProvisionedBlockBalance, :overdraft_block_balance => GrantBlock::OverdraftBlockBalance});
{:provisioned_block_balance => GrantBlock::ProvisionedBlockBalance, :overdraft_block_balance => GrantBlock::OverdraftBlockBalance, :billing_metadata => GrantBlock::BillingMetadata});
return grant_block;
end

Expand Down Expand Up @@ -907,7 +930,7 @@ def ledger_operations()

def grant_blocks()
grant_blocks = get_list(:grant_blocks, GrantBlock,
{:provisioned_block_balance => GrantBlock::ProvisionedBlockBalance, :overdraft_block_balance => GrantBlock::OverdraftBlockBalance});
{:provisioned_block_balance => GrantBlock::ProvisionedBlockBalance, :overdraft_block_balance => GrantBlock::OverdraftBlockBalance, :billing_metadata => GrantBlock::BillingMetadata});
return grant_blocks;
end

Expand Down
Loading