chargebee 2.77.0 → 2.78.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ada6fc55e78a48f1e967ca90df739cb05d754fa07ed8df370c5e5eed084259e
4
- data.tar.gz: fe8b6c89e34bc33b773d8bda4a111f2cb7193f95a25c084aa537baabc2f93cca
3
+ metadata.gz: fa1e1329c8e1d56ac5010f379b9cea93641f8644bbf5d7dbf7ca80c3e9c0a1eb
4
+ data.tar.gz: 7ad51c4868e08e99b5b9d872a561455b6eba45f71dbbb76c8f13c49a5730ed99
5
5
  SHA512:
6
- metadata.gz: 884e6b4a7312a7882b82c3d43764702fc9e0b71b6ad2b493f9bc36e4d025b608045715da57975791f2b002cea74cf38063cd5798c968c6dffd97f46faf94192a
7
- data.tar.gz: 2a64cfdbfe0d781f7485b93154a7af60fdef6cd332eddd59b49b1887a5a2dfde7b1c8c1e6915468dbb5a0e4fa1b1b827506a1f17f09317f73a74355e54e1cb83
6
+ metadata.gz: 93b93230e23c38a34be6074de559b25460364b4704e8343e07639a407a297b2d8bc46aa509da1f3ff66de043c08b956ef2cf6a0703e2c834fd662f333b0f95d5
7
+ data.tar.gz: f45972e8045fc0fd238032221e1098d4951edf84c6f860e95724ec4fef10b1b85dabd04cb14fd6661ca24c765cc70289a6ba5967781e7aa8af70b73bda806c2b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,61 @@
1
+ ### v2.78.0 (2026-07-30)
2
+ * * *
3
+ ### New Resources:
4
+ - [`CreditUnit`](https://apidocs.chargebee.com/docs/api/credit_units) has been added.
5
+ - [`LedgerEntry`](https://apidocs.chargebee.com/docs/api/ledger_entries) has been added.
6
+
7
+
8
+ ### New Actions:
9
+ - [`allocate`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate) has been added to [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
10
+
11
+
12
+ ### New Attributes:
13
+ - [`unit_id`](https://apidocs.chargebee.com/docs/api/alerts/alert-object#unit_id) has been added to [`Alert`](https://apidocs.chargebee.com/docs/api/alerts).
14
+ - [`subscription_id`](https://apidocs.chargebee.com/docs/api/grant_blocks/grant-block-object#subscription_id) has been added to [`GrantBlock`](https://apidocs.chargebee.com/docs/api/grant_blocks).
15
+ - [`modified_at`](https://apidocs.chargebee.com/docs/api/grant_blocks/grant-block-object#modified_at) has been added to [`GrantBlock`](https://apidocs.chargebee.com/docs/api/grant_blocks).
16
+ - [`resource_version`](https://apidocs.chargebee.com/docs/api/grant_blocks/grant-block-object#resource_version) has been added to [`GrantBlock`](https://apidocs.chargebee.com/docs/api/grant_blocks).
17
+ - [`created_at`](https://apidocs.chargebee.com/docs/api/ledger_account_balances/ledger-account-balance-object#created_at) has been added to [`LedgerAccountBalance`](https://apidocs.chargebee.com/docs/api/ledger_account_balances).
18
+ - [`resource_version`](https://apidocs.chargebee.com/docs/api/ledger_account_balances/ledger-account-balance-object#resource_version) has been added to [`LedgerAccountBalance`](https://apidocs.chargebee.com/docs/api/ledger_account_balances).
19
+
20
+
21
+ ### New Parameters:
22
+ - [`account_type`](https://apidocs.chargebee.com/docs/api/grant_blocks/list-grant-blocks#account_type) has been added as query parameter to [`list_grant_blocks`](https://apidocs.chargebee.com/docs/api/grant_blocks/list-grant-blocks) in [`GrantBlock`](https://apidocs.chargebee.com/docs/api/grant_blocks).
23
+ - [`unit_id`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert#unit_id) has been added as request body parameter to [`create_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts).
24
+ - [`include_cancellation_day_in_billing`](https://apidocs.chargebee.com/docs/api/estimates/cancel-subscription-for-items-estimate#include_cancellation_day_in_billing) has been added as request body parameter to [`cancel_subscription_for_items_estimate`](https://apidocs.chargebee.com/docs/api/estimates/cancel-subscription-for-items-estimate) in [`Estimate`](https://apidocs.chargebee.com/docs/api/estimates).
25
+ - [`subscription_id`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate#subscription_id) has been added as request body parameter to [`allocate`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate) in [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
26
+ - [`unit_id`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate#unit_id) has been added as request body parameter to [`allocate`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate) in [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
27
+ - [`amount`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate#amount) has been added as request body parameter to [`allocate`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate) in [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
28
+ - [`expires_at`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate#expires_at) has been added as request body parameter to [`allocate`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate) in [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
29
+ - [`metadata`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate#metadata) has been added as request body parameter to [`allocate`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate) in [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
30
+ - [`include_cancellation_day_in_billing`](https://apidocs.chargebee.com/docs/api/subscriptions/cancel-subscription-for-items#include_cancellation_day_in_billing) has been added as request body parameter to [`cancel_subscription_for_items`](https://apidocs.chargebee.com/docs/api/subscriptions/cancel-subscription-for-items) in [`Subscription`](https://apidocs.chargebee.com/docs/api/subscriptions).
31
+
32
+
33
+ ### New Events:
34
+ - [`grant_blocks_created`](https://apidocs.chargebee.com/docs/api/events/webhook/grant_blocks_created) has been added.
35
+ - [`ledger_updated`](https://apidocs.chargebee.com/docs/api/events/webhook/ledger_updated) has been added.
36
+ - [`ledger_account_balance_updated`](https://apidocs.chargebee.com/docs/api/events/webhook/ledger_account_balance_updated) has been added.
37
+ - [`grant_blocks_updated`](https://apidocs.chargebee.com/docs/api/events/webhook/grant_blocks_updated) has been added.
38
+
39
+
40
+ ### New Enums:
41
+ - `ledger_account_balance_updated`, `grant_blocks_created`, `grant_blocks_updated`, and `ledger_updated` have been added as new values enum `EventType`.
42
+ - `dana`, `touch_n_go`, `tamara`, and `qpay` have been added as new values enum `PaymentMethod`.
43
+ - `dana`, `touch_n_go`, `tamara`, and `qpay` have been added as new values enum `PaymentMethodType`.
44
+ - `dana`, `touch_n_go`, `tamara`, `qpay`, `credit_balance_dropped`, `credit`, `debit`, `hold`, and `unhold` have been added as new values enum `Type`.
45
+ - `active` and `archived` have been added as new values to enum attribute [`status`](https://apidocs.chargebee.com/docs/api/credit_units/credit-unit-object#status) in [`CreditUnit`](https://apidocs.chargebee.com/docs/api/credit_units).
46
+ - `grant_renewal` and `subscription_renewed` have been added as new values to enum attribute [`grant_source`](https://apidocs.chargebee.com/docs/api/grant_blocks/grant-block-object#grant_source) in [`GrantBlock`](https://apidocs.chargebee.com/docs/api/grant_blocks).
47
+ - `provisioned` and `overdraft` have been added as new values to enum attribute [`account_type`](https://apidocs.chargebee.com/docs/api/ledger_entries/ledger-entry-object#account_type) in [`LedgerEntry`](https://apidocs.chargebee.com/docs/api/ledger_entries).
48
+ - `credit_unit` has been added as a new value to enum attribute [`unit_type`](https://apidocs.chargebee.com/docs/api/ledger_entries/ledger-entry-object#unit_type) in [`LedgerEntry`](https://apidocs.chargebee.com/docs/api/ledger_entries).
49
+ - `dana`, `touch_n_go`, `tamara`, and `qpay` have been added as new values to enum attribute [`payment_method_type`](https://apidocs.chargebee.com/docs/api/payment_intents/payment-intent-object#payment_method_type) in [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).
50
+ - `dana`, `touch_n_go`, `tamara`, and `qpay` have been added as new values to enum attribute [`active_payment_attempt.payment_method_type`](https://apidocs.chargebee.com/docs/api/payment_intents/payment-intent-object#active_payment_attempt_payment_method_type) in [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).
51
+ - `archived` and `active` have been added as new values to enum query parameter `status.in` in [`list_credit_units`](https://apidocs.chargebee.com/docs/api/credit_units/list-credit-units) of [`CreditUnit`](https://apidocs.chargebee.com/docs/api/credit_units).
52
+ - `archived` and `active` have been added as new values to enum query parameter `status.is` in [`list_credit_units`](https://apidocs.chargebee.com/docs/api/credit_units/list-credit-units) of [`CreditUnit`](https://apidocs.chargebee.com/docs/api/credit_units).
53
+ - `provisioned` and `overdraft` have been added as new values to enum query parameter `account_type.is` in [`list_grant_blocks`](https://apidocs.chargebee.com/docs/api/grant_blocks/list-grant-blocks) of [`GrantBlock`](https://apidocs.chargebee.com/docs/api/grant_blocks).
54
+ - `dana`, `touch_n_go`, `tamara`, and `qpay` have been added as new values to enum request body parameter `payment_method_type` in [`update_a_payment_intent`](https://apidocs.chargebee.com/docs/api/payment_intents/update-a-payment-intent) of [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).
55
+ - `dana`, `touch_n_go`, `tamara`, and `qpay` have been added as new values to enum request body parameter `payment_method_type` in [`create_a_payment_intent`](https://apidocs.chargebee.com/docs/api/payment_intents/create-a-payment-intent) of [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).
56
+
57
+
58
+
1
59
  ### v2.77.0 (2026-07-21)
2
60
  * * *
3
61
  ### New Resources:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- chargebee (2.77.0)
4
+ chargebee (2.78.0)
5
5
  cgi (>= 0.1.0, < 1.0.0)
6
6
 
7
7
  GEM
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.77.0
1
+ 2.78.0
data/chargebee.gemspec CHANGED
@@ -4,8 +4,8 @@ Gem::Specification.new do |s|
4
4
  s.rubygems_version = '1.3.5'
5
5
  s.required_ruby_version = '>= 1.9.3'
6
6
  s.name = 'chargebee'
7
- s.version = '2.77.0'
8
- s.date = '2026-07-21'
7
+ s.version = '2.78.0'
8
+ s.date = '2026-07-30'
9
9
  s.summary = "Ruby client for Chargebee API."
10
10
  s.description = "Subscription Billing - Simple. Secure. Affordable. More details at www.chargebee.com."
11
11
  s.metadata = {
@@ -67,6 +67,7 @@ Gem::Specification.new do |s|
67
67
  lib/chargebee/models/cpq_quote_signature.rb
68
68
  lib/chargebee/models/credit_note.rb
69
69
  lib/chargebee/models/credit_note_estimate.rb
70
+ lib/chargebee/models/credit_unit.rb
70
71
  lib/chargebee/models/csv_tax_rule.rb
71
72
  lib/chargebee/models/currency.rb
72
73
  lib/chargebee/models/customer.rb
@@ -99,6 +100,7 @@ Gem::Specification.new do |s|
99
100
  lib/chargebee/models/item_family.rb
100
101
  lib/chargebee/models/item_price.rb
101
102
  lib/chargebee/models/ledger_account_balance.rb
103
+ lib/chargebee/models/ledger_entry.rb
102
104
  lib/chargebee/models/ledger_operation.rb
103
105
  lib/chargebee/models/metadata.rb
104
106
  lib/chargebee/models/meter.rb
@@ -9,8 +9,8 @@ module ChargeBee
9
9
  attr_accessor :field, :operator, :value
10
10
  end
11
11
 
12
- attr_accessor :id, :type, :name, :description, :metered_feature_id, :currency_code, :subscription_id,
13
- :status, :meta, :created_at, :updated_at, :threshold, :filter_conditions
12
+ attr_accessor :id, :type, :name, :description, :metered_feature_id, :currency_code, :unit_id,
13
+ :subscription_id, :status, :meta, :created_at, :updated_at, :threshold, :filter_conditions
14
14
 
15
15
  # OPERATIONS
16
16
  #-----------
@@ -0,0 +1,54 @@
1
+ module ChargeBee
2
+ class CreditUnit < Model
3
+
4
+ attr_accessor :id, :name, :external_name, :status, :resource_version, :updated_at, :created_at,
5
+ :created_by, :updated_by, :is_unlimited, :overdraft_amount
6
+
7
+ # OPERATIONS
8
+ #-----------
9
+
10
+ def self.list(params={}, env=nil, headers={})
11
+ jsonKeys = {
12
+ }
13
+ options = {}
14
+ Request.send_list_request('get', uri_path("credit_units"), params, env, headers,nil, false, jsonKeys, options, "creditUnit", "list")
15
+ end
16
+
17
+ def self.create(params, env=nil, headers={})
18
+ jsonKeys = {
19
+ }
20
+ options = {
21
+ :isIdempotent => true
22
+ }
23
+ Request.send('post', uri_path("credit_units"), params, env, headers,nil, false, jsonKeys, options, "creditUnit", "create")
24
+ end
25
+
26
+ def self.update(id, params={}, env=nil, headers={})
27
+ jsonKeys = {
28
+ }
29
+ options = {
30
+ :isIdempotent => true
31
+ }
32
+ Request.send('post', uri_path("credit_units",id.to_s), params, env, headers,nil, false, jsonKeys, options, "creditUnit", "update")
33
+ end
34
+
35
+ def self.archive(id, env=nil, headers={})
36
+ jsonKeys = {
37
+ }
38
+ options = {
39
+ :isIdempotent => true
40
+ }
41
+ Request.send('post', uri_path("credit_units",id.to_s,"archive_command"), {}, env, headers,nil, false, jsonKeys, options, "creditUnit", "archive")
42
+ end
43
+
44
+ def self.reactivate(id, env=nil, headers={})
45
+ jsonKeys = {
46
+ }
47
+ options = {
48
+ :isIdempotent => true
49
+ }
50
+ Request.send('post', uri_path("credit_units",id.to_s,"reactivate_command"), {}, env, headers,nil, false, jsonKeys, options, "creditUnit", "reactivate")
51
+ end
52
+
53
+ end # ~CreditUnit
54
+ end # ~ChargeBee
@@ -1,9 +1,10 @@
1
1
  module ChargeBee
2
2
  class GrantBlock < Model
3
3
 
4
- attr_accessor :id, :granted_amount, :effective_from, :expires_at, :balance, :hold_amount, :used_amount,
5
- :expired_amount, :rolled_over_amount, :voided_amount, :origin_grant_block_id, :status, :grant_source,
6
- :created_at, :account_type, :unit_id, :unit_type, :metadata
4
+ attr_accessor :id, :subscription_id, :account_type, :unit_id, :unit_type, :granted_amount, :effective_from,
5
+ :expires_at, :balance, :hold_amount, :used_amount, :expired_amount, :rolled_over_amount, :voided_amount,
6
+ :origin_grant_block_id, :status, :grant_source, :created_at, :modified_at, :resource_version,
7
+ :metadata
7
8
 
8
9
  # OPERATIONS
9
10
  #-----------
@@ -9,7 +9,8 @@ module ChargeBee
9
9
  attr_accessor :is_unlimited, :limit, :total_balance, :usable_balance, :used_amount, :hold_amount
10
10
  end
11
11
 
12
- attr_accessor :subscription_id, :unit_id, :unit_type, :modified_at, :provisioned_balance, :overdraft_balance
12
+ attr_accessor :subscription_id, :unit_id, :unit_type, :created_at, :modified_at, :resource_version,
13
+ :provisioned_balance, :overdraft_balance
13
14
 
14
15
  # OPERATIONS
15
16
  #-----------
@@ -0,0 +1,12 @@
1
+ module ChargeBee
2
+ class LedgerEntry < Model
3
+
4
+ attr_accessor :id, :subscription_id, :account_type, :unit_id, :unit_type, :amount, :grant_block_start_balance,
5
+ :grant_block_end_balance, :account_start_balance, :account_end_balance, :type, :ledger_operation_id,
6
+ :grant_block_id, :created_at, :modified_at
7
+
8
+ # OPERATIONS
9
+ #-----------
10
+
11
+ end # ~LedgerEntry
12
+ end # ~ChargeBee
@@ -1,9 +1,9 @@
1
1
  module ChargeBee
2
2
  class LedgerOperation < Model
3
3
 
4
- attr_accessor :id, :type, :amount, :provisioned_start_balance, :provisioned_end_balance, :overdraft_start_balance,
5
- :overdraft_end_balance, :parent_ledger_operation_id, :ledger_operation_timestamp, :auto_release_timestamp,
6
- :created_at, :modified_at, :subscription_id, :unit_id, :unit_type, :metadata
4
+ attr_accessor :id, :subscription_id, :unit_id, :unit_type, :type, :amount, :provisioned_start_balance,
5
+ :provisioned_end_balance, :overdraft_start_balance, :overdraft_end_balance, :parent_ledger_operation_id,
6
+ :ledger_operation_timestamp, :auto_release_timestamp, :created_at, :modified_at, :metadata
7
7
 
8
8
  # OPERATIONS
9
9
  #-----------
@@ -54,5 +54,13 @@ module ChargeBee
54
54
  Request.send('post', uri_path("ledger_operations","release_authorization"), params, env, headers,nil, true, jsonKeys, options, "ledgerOperation", "releaseAuthorization")
55
55
  end
56
56
 
57
+ def self.allocate(params, env=nil, headers={})
58
+ jsonKeys = {
59
+ :metadata => 0,
60
+ }
61
+ options = {}
62
+ Request.send('post', uri_path("ledger_operations","allocate"), params, env, headers,nil, true, jsonKeys, options, "ledgerOperation", "allocate")
63
+ end
64
+
57
65
  end # ~LedgerOperation
58
66
  end # ~ChargeBee
@@ -414,6 +414,11 @@ module ChargeBee
414
414
  return metadata;
415
415
  end
416
416
 
417
+ def credit_unit()
418
+ credit_unit = get(:credit_unit, CreditUnit);
419
+ return credit_unit;
420
+ end
421
+
417
422
  def subscription_entitlement()
418
423
  subscription_entitlement = get(:subscription_entitlement, SubscriptionEntitlement,
419
424
  {:component => SubscriptionEntitlement::Component});
@@ -644,6 +649,11 @@ module ChargeBee
644
649
  return grant_block;
645
650
  end
646
651
 
652
+ def ledger_entry()
653
+ ledger_entry = get(:ledger_entry, LedgerEntry);
654
+ return ledger_entry;
655
+ end
656
+
647
657
  def promotional_grant()
648
658
  promotional_grant = get(:promotional_grant, PromotionalGrant);
649
659
  return promotional_grant;
@@ -737,6 +747,12 @@ module ChargeBee
737
747
  return grant_blocks;
738
748
  end
739
749
 
750
+ def ledger_entries()
751
+ ledger_entries = get_list(:ledger_entries, LedgerEntry,
752
+ {});
753
+ return ledger_entries;
754
+ end
755
+
740
756
 
741
757
  def to_s(*args)
742
758
  JSON.pretty_generate(@response)
data/lib/chargebee.rb CHANGED
@@ -41,6 +41,7 @@ require File.dirname(__FILE__) + '/chargebee/models/coupon_set'
41
41
  require File.dirname(__FILE__) + '/chargebee/models/cpq_quote_signature'
42
42
  require File.dirname(__FILE__) + '/chargebee/models/credit_note'
43
43
  require File.dirname(__FILE__) + '/chargebee/models/credit_note_estimate'
44
+ require File.dirname(__FILE__) + '/chargebee/models/credit_unit'
44
45
  require File.dirname(__FILE__) + '/chargebee/models/currency'
45
46
  require File.dirname(__FILE__) + '/chargebee/models/customer'
46
47
  require File.dirname(__FILE__) + '/chargebee/models/customer_entitlement'
@@ -72,6 +73,7 @@ require File.dirname(__FILE__) + '/chargebee/models/item_entitlement'
72
73
  require File.dirname(__FILE__) + '/chargebee/models/item_family'
73
74
  require File.dirname(__FILE__) + '/chargebee/models/item_price'
74
75
  require File.dirname(__FILE__) + '/chargebee/models/ledger_account_balance'
76
+ require File.dirname(__FILE__) + '/chargebee/models/ledger_entry'
75
77
  require File.dirname(__FILE__) + '/chargebee/models/ledger_operation'
76
78
  require File.dirname(__FILE__) + '/chargebee/models/metadata'
77
79
  require File.dirname(__FILE__) + '/chargebee/models/meter'
@@ -134,7 +136,7 @@ require File.dirname(__FILE__) + '/chargebee/models/webhook_endpoint'
134
136
 
135
137
  module ChargeBee
136
138
 
137
- VERSION = '2.77.0'
139
+ VERSION = '2.78.0'
138
140
 
139
141
  @@default_env = nil
140
142
  @@verify_ca_certs = true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chargebee
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.77.0
4
+ version: 2.78.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajaraman S
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2026-07-21 00:00:00.000000000 Z
12
+ date: 2026-07-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cgi
@@ -108,6 +108,7 @@ files:
108
108
  - lib/chargebee/models/cpq_quote_signature.rb
109
109
  - lib/chargebee/models/credit_note.rb
110
110
  - lib/chargebee/models/credit_note_estimate.rb
111
+ - lib/chargebee/models/credit_unit.rb
111
112
  - lib/chargebee/models/csv_tax_rule.rb
112
113
  - lib/chargebee/models/currency.rb
113
114
  - lib/chargebee/models/customer.rb
@@ -140,6 +141,7 @@ files:
140
141
  - lib/chargebee/models/item_family.rb
141
142
  - lib/chargebee/models/item_price.rb
142
143
  - lib/chargebee/models/ledger_account_balance.rb
144
+ - lib/chargebee/models/ledger_entry.rb
143
145
  - lib/chargebee/models/ledger_operation.rb
144
146
  - lib/chargebee/models/metadata.rb
145
147
  - lib/chargebee/models/meter.rb