chargebee 2.42.0 → 2.44.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0137cfd34ae7b2042cd9b32bb3df75e6829201a2
4
- data.tar.gz: b162dbdd738a3db62701e938d0aa4ba644213409
3
+ metadata.gz: 44da361071398b749b3cfe048a50212229dc63d5
4
+ data.tar.gz: 61146139b6c738cdec5dfd56365896c0ab8ebcc6
5
5
  SHA512:
6
- metadata.gz: 0a0e3363748e28dd07474497d96dc1870c5df87b6c8e9c8f6e7e4878cba3532df164fbd008bb0e4eb67cab1db67eab470ac8feefd5b3229ba1b438ba642f0caa
7
- data.tar.gz: d542240692d07385b3ec2cde793883c2ef1ca0532ad66056ad9561c26d5e457c84b27ffcc09c398e445598ae8d25f3fd19497b4c2518a5e22ca4c71d5a8e069c
6
+ metadata.gz: 2d3d45972fb75a39b58c075ede16dd7478a883b7aff76777434bbe7b803f25d4f31aee680f44898fbcab524943b6a23761f326a5af414aeb2445bc92c69c8a3a
7
+ data.tar.gz: 9f0ebf9ce1b70a1d5d59c0f7001a02701bc9aacf1a5dbbbfecb1eb766321c02e90084cb6286a6cd41716525f9e31b3265d2d2a9d646f9c5f0d2e546babcac890
data/CHANGELOG.md CHANGED
@@ -1,3 +1,67 @@
1
+ ### v2.44.0 (2024-09-19)
2
+ * * *
3
+
4
+ #### New Resource:
5
+ * PaymentScheduleScheme has been added.
6
+ * PaymentSchedule has been added.
7
+
8
+ ### New Endpoints:
9
+ * Invoice#ApplyPaymentScheduleScheme has been added.
10
+ * Invoice#PaymentSchedules has been added.
11
+
12
+ ### New Attributes
13
+ * bundle_items[] has been added to Items.
14
+ * bundle_configuration has been added to Items.
15
+
16
+ #### New Input parameters:
17
+ * bundle_configuration has been added to Items#CreateParams, Items#UpdateParams & Items#ListParams.
18
+ * bundle_items_to_add[] has been added to Items#CreateParams & Items#UpdateParams.
19
+ * bundle_items_to_update[] has been added to Items#UpdateParams.
20
+ * bundle_items_to_remove[] has been added to Items#UpdateParams.
21
+ * payment_schedule has been added to Purchase#CreateParams.
22
+
23
+ ### New Enum Values:
24
+ * payment_schedules_created has been added to EventTypeEnum.
25
+ * payment_schedules_updated has been added to EventTypeEnum.
26
+ * payment_schedule_scheme_created has been added to EventTypeEnum.
27
+ * payment_schedule_scheme_deleted has been added to EventTypeEnum.
28
+
29
+ ### Removed Resource:
30
+ * Installment has been removed.
31
+ * InstallmentConfig has been removed.
32
+ * InstallmentDetail has been removed.
33
+
34
+ ### Removed Endpoints:
35
+ * Invoice#Installments has been removed.
36
+
37
+ ### Removed Input parameters:
38
+ * installment_info has been removed from Purchase#CreateParams.
39
+
40
+ ### Removed Enum Values:
41
+ * invoice_installments_created has been removed from EventTypeEnum.
42
+ * invoice_installment_updated has been removed from EventTypeEnum.
43
+ * installment_config_created has been removed from EventTypeEnum.
44
+ * installment_config_deleted has been removed from EventTypeEnum.
45
+
46
+ ### v2.43.0 (2024-08-29)
47
+ * * *
48
+
49
+ #### New Resource:
50
+ * CustomerEntitlement has been added.
51
+
52
+ #### New Endpoints:
53
+ * Ramp#UpdateRequest has been added to Ramp resource.
54
+ * Transaction#ReconcileRequest has been added to Transaction resource.
55
+
56
+ ### New Attributes:
57
+ * arr has been added to Subscription.
58
+
59
+ ### New Enum Values:
60
+ * customer_entitlements_updated has been added to EntityTypeEnum.
61
+ * subscription_moved_in has been added in EventType enum.
62
+ * subscription_moved_out has been added in EventType enum.
63
+ * subscription_movement_failed has been added in EventType enum.
64
+
1
65
  ### v2.42.0 (2024-08-14)
2
66
  * * *
3
67
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- chargebee (2.42.0)
4
+ chargebee (2.44.0)
5
5
  cgi (>= 0.1.0, < 1.0.0)
6
6
  json_pure (~> 2.1)
7
7
  rest-client (>= 1.8, <= 2.0.2)
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.42.0'
8
- s.date = '2024-08-14'
7
+ s.version = '2.44.0'
8
+ s.date = '2024-09-19'
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 = {
@@ -61,6 +61,7 @@ Gem::Specification.new do |s|
61
61
  lib/chargebee/models/csv_tax_rule.rb
62
62
  lib/chargebee/models/currency.rb
63
63
  lib/chargebee/models/customer.rb
64
+ lib/chargebee/models/customer_entitlement.rb
64
65
  lib/chargebee/models/differential_price.rb
65
66
  lib/chargebee/models/discount.rb
66
67
  lib/chargebee/models/download.rb
@@ -78,9 +79,6 @@ Gem::Specification.new do |s|
78
79
  lib/chargebee/models/impacted_item_price.rb
79
80
  lib/chargebee/models/impacted_subscription.rb
80
81
  lib/chargebee/models/in_app_subscription.rb
81
- lib/chargebee/models/installment.rb
82
- lib/chargebee/models/installment_config.rb
83
- lib/chargebee/models/installment_detail.rb
84
82
  lib/chargebee/models/invoice.rb
85
83
  lib/chargebee/models/invoice_estimate.rb
86
84
  lib/chargebee/models/item.rb
@@ -93,6 +91,8 @@ Gem::Specification.new do |s|
93
91
  lib/chargebee/models/order.rb
94
92
  lib/chargebee/models/payment_intent.rb
95
93
  lib/chargebee/models/payment_reference_number.rb
94
+ lib/chargebee/models/payment_schedule.rb
95
+ lib/chargebee/models/payment_schedule_scheme.rb
96
96
  lib/chargebee/models/payment_source.rb
97
97
  lib/chargebee/models/payment_voucher.rb
98
98
  lib/chargebee/models/plan.rb
@@ -0,0 +1,14 @@
1
+ module ChargeBee
2
+ class CustomerEntitlement < Model
3
+
4
+ attr_accessor :customer_id, :subscription_id, :feature_id, :value, :name, :is_enabled
5
+
6
+ # OPERATIONS
7
+ #-----------
8
+
9
+ def self.entitlements_for_customer(id, params={}, env=nil, headers={})
10
+ Request.send('get', uri_path("customers",id.to_s,"customer_entitlements"), params, env, headers)
11
+ end
12
+
13
+ end # ~CustomerEntitlement
14
+ end # ~ChargeBee
@@ -228,8 +228,12 @@ module ChargeBee
228
228
  Request.send('post', uri_path("invoices",id.to_s,"update_details"), params, env, headers)
229
229
  end
230
230
 
231
- def self.installments(id, params, env=nil, headers={})
232
- Request.send('post', uri_path("invoices",id.to_s,"installments"), params, env, headers)
231
+ def self.apply_payment_schedule_scheme(id, params, env=nil, headers={})
232
+ Request.send('post', uri_path("invoices",id.to_s,"apply_payment_schedule_scheme"), params, env, headers)
233
+ end
234
+
235
+ def self.payment_schedules(id, env=nil, headers={})
236
+ Request.send('get', uri_path("invoices",id.to_s,"payment_schedules"), {}, env, headers)
233
237
  end
234
238
 
235
239
  def self.resend_einvoice(id, env=nil, headers={})
@@ -5,10 +5,18 @@ module ChargeBee
5
5
  attr_accessor :id
6
6
  end
7
7
 
8
+ class BundleItem < Model
9
+ attr_accessor :item_id, :item_type, :quantity, :price_allocation
10
+ end
11
+
12
+ class BundleConfiguration < Model
13
+ attr_accessor :type
14
+ end
15
+
8
16
  attr_accessor :id, :name, :external_name, :description, :status, :resource_version, :updated_at,
9
17
  :item_family_id, :type, :is_shippable, :is_giftable, :redirect_url, :enabled_for_checkout, :enabled_in_portal,
10
18
  :included_in_mrr, :item_applicability, :gift_claim_redirect_url, :unit, :metered, :usage_calculation,
11
- :archived_at, :channel, :applicable_items, :metadata
19
+ :archived_at, :channel, :applicable_items, :bundle_items, :bundle_configuration, :metadata
12
20
 
13
21
  # OPERATIONS
14
22
  #-----------
@@ -0,0 +1,15 @@
1
+ module ChargeBee
2
+ class PaymentSchedule < Model
3
+
4
+ class ScheduleEntry < Model
5
+ attr_accessor :id, :date, :amount, :status
6
+ end
7
+
8
+ attr_accessor :id, :scheme_id, :entity_type, :entity_id, :amount, :created_at, :resource_version,
9
+ :updated_at, :currency_code, :schedule_entries
10
+
11
+ # OPERATIONS
12
+ #-----------
13
+
14
+ end # ~PaymentSchedule
15
+ end # ~ChargeBee
@@ -0,0 +1,27 @@
1
+ module ChargeBee
2
+ class PaymentScheduleScheme < Model
3
+
4
+ class PreferredSchedule < Model
5
+ attr_accessor :period, :amount_percentage
6
+ end
7
+
8
+ attr_accessor :id, :description, :number_of_schedules, :period_unit, :period, :created_at, :resource_version,
9
+ :updated_at, :preferred_schedules
10
+
11
+ # OPERATIONS
12
+ #-----------
13
+
14
+ def self.create(params, env=nil, headers={})
15
+ Request.send('post', uri_path("payment_schedule_schemes"), params, env, headers)
16
+ end
17
+
18
+ def self.retrieve(id, env=nil, headers={})
19
+ Request.send('get', uri_path("payment_schedule_schemes",id.to_s), {}, env, headers)
20
+ end
21
+
22
+ def self.delete(id, env=nil, headers={})
23
+ Request.send('post', uri_path("payment_schedule_schemes",id.to_s,"delete"), {}, env, headers)
24
+ end
25
+
26
+ end # ~PaymentScheduleScheme
27
+ end # ~ChargeBee
@@ -36,6 +36,10 @@ module ChargeBee
36
36
  Request.send('post', uri_path("subscriptions",id.to_s,"create_ramp"), params, env, headers)
37
37
  end
38
38
 
39
+ def self.update(id, params, env=nil, headers={})
40
+ Request.send('post', uri_path("ramps",id.to_s,"update"), params, env, headers)
41
+ end
42
+
39
43
  def self.retrieve(id, env=nil, headers={})
40
44
  Request.send('get', uri_path("ramps",id.to_s), {}, env, headers)
41
45
  end
@@ -54,7 +54,7 @@ module ChargeBee
54
54
  :created_from_ip, :resource_version, :updated_at, :has_scheduled_advance_invoices, :has_scheduled_changes,
55
55
  :payment_source_id, :plan_free_quantity_in_decimal, :plan_amount_in_decimal, :cancel_schedule_created_at,
56
56
  :offline_payment_method, :channel, :net_term_days, :active_id, :subscription_items, :item_tiers,
57
- :charged_items, :due_invoices_count, :due_since, :total_dues, :mrr, :exchange_rate, :base_currency_code,
57
+ :charged_items, :due_invoices_count, :due_since, :total_dues, :mrr, :arr, :exchange_rate, :base_currency_code,
58
58
  :addons, :event_based_addons, :charged_event_based_addons, :coupon, :coupons, :shipping_address,
59
59
  :referral_info, :invoice_notes, :meta_data, :metadata, :deleted, :changes_scheduled_at, :contract_term,
60
60
  :cancel_reason_code, :free_period, :free_period_unit, :create_pending_invoices, :auto_close_invoices,
@@ -45,6 +45,10 @@ module ChargeBee
45
45
  Request.send('post', uri_path("transactions",id.to_s,"record_refund"), params, env, headers)
46
46
  end
47
47
 
48
+ def self.reconcile(id, params={}, env=nil, headers={})
49
+ Request.send('post', uri_path("transactions",id.to_s,"reconcile"), params, env, headers)
50
+ end
51
+
48
52
  def self.refund(id, params={}, env=nil, headers={})
49
53
  Request.send('post', uri_path("transactions",id.to_s,"refund"), params, env, headers)
50
54
  end
@@ -106,6 +106,12 @@ module ChargeBee
106
106
  return payment_reference_number;
107
107
  end
108
108
 
109
+ def payment_schedule()
110
+ payment_schedule = get(:payment_schedule, PaymentSchedule,
111
+ {:schedule_entries => PaymentSchedule::ScheduleEntry});
112
+ return payment_schedule;
113
+ end
114
+
109
115
  def tax_withheld()
110
116
  tax_withheld = get(:tax_withheld, TaxWithheld);
111
117
  return tax_withheld;
@@ -289,7 +295,7 @@ module ChargeBee
289
295
 
290
296
  def item()
291
297
  item = get(:item, Item,
292
- {:applicable_items => Item::ApplicableItem});
298
+ {:applicable_items => Item::ApplicableItem, :bundle_items => Item::BundleItem, :bundle_configuration => Item::BundleConfiguration});
293
299
  return item;
294
300
  end
295
301
 
@@ -356,6 +362,11 @@ module ChargeBee
356
362
  return subscription_entitlement;
357
363
  end
358
364
 
365
+ def customer_entitlement()
366
+ customer_entitlement = get(:customer_entitlement, CustomerEntitlement);
367
+ return customer_entitlement;
368
+ end
369
+
359
370
  def item_entitlement()
360
371
  item_entitlement = get(:item_entitlement, ItemEntitlement);
361
372
  return item_entitlement;
@@ -376,7 +387,7 @@ module ChargeBee
376
387
  return non_subscription;
377
388
  end
378
389
 
379
- def entitlement_override()
390
+ def entitlement_override()
380
391
  entitlement_override = get(:entitlement_override, EntitlementOverride);
381
392
  return entitlement_override;
382
393
  end
@@ -408,21 +419,10 @@ module ChargeBee
408
419
  return ramp;
409
420
  end
410
421
 
411
- def installment_config()
412
- installment_config = get(:installment_config, InstallmentConfig,
413
- {:installments => InstallmentConfig::Installment});
414
- return installment_config;
415
- end
416
-
417
- def installment()
418
- installment = get(:installment, Installment);
419
- return installment;
420
- end
421
-
422
- def installment_detail()
423
- installment_detail = get(:installment_detail, InstallmentDetail,
424
- {:installments => InstallmentDetail::Installment});
425
- return installment_detail;
422
+ def payment_schedule_scheme()
423
+ payment_schedule_scheme = get(:payment_schedule_scheme, PaymentScheduleScheme,
424
+ {:preferred_schedules => PaymentScheduleScheme::PreferredSchedule});
425
+ return payment_schedule_scheme;
426
426
  end
427
427
 
428
428
  def pricing_page_session()
@@ -448,6 +448,12 @@ module ChargeBee
448
448
  return invoices;
449
449
  end
450
450
 
451
+ def payment_schedules()
452
+ payment_schedules = get_list(:payment_schedules, PaymentSchedule,
453
+ {:schedule_entries => PaymentSchedule::ScheduleEntry});
454
+ return payment_schedules;
455
+ end
456
+
451
457
  def credit_notes()
452
458
  credit_notes = get_list(:credit_notes, CreditNote,
453
459
  {:einvoice => CreditNote::Einvoice, :line_items => CreditNote::LineItem, :discounts => CreditNote::Discount, :line_item_discounts => CreditNote::LineItemDiscount, :line_item_tiers => CreditNote::LineItemTier, :taxes => CreditNote::Tax, :line_item_taxes => CreditNote::LineItemTax, :linked_refunds => CreditNote::LinkedRefund, :allocations => CreditNote::Allocation, :shipping_address => CreditNote::ShippingAddress, :billing_address => CreditNote::BillingAddress, :site_details_at_creation => CreditNote::SiteDetailsAtCreation, :tax_origin => CreditNote::TaxOrigin});
data/lib/chargebee.rb CHANGED
@@ -68,17 +68,19 @@ require File.dirname(__FILE__) + '/chargebee/models/tax_withheld.rb'
68
68
  require File.dirname(__FILE__) + '/chargebee/models/token.rb'
69
69
  require File.dirname(__FILE__) + '/chargebee/models/non_subscription.rb'
70
70
  require File.dirname(__FILE__) + '/chargebee/models/price_variant'
71
- require File.dirname(__FILE__) + '/chargebee/models/installment_detail'
72
71
  require File.dirname(__FILE__) + '/chargebee/models/ramp'
73
72
  require File.dirname(__FILE__) + '/chargebee/models/business_entity'
74
73
  require File.dirname(__FILE__) + '/chargebee/models/business_entity_transfer'
75
74
  require File.dirname(__FILE__) + '/chargebee/models/currency'
76
75
  require File.dirname(__FILE__) + '/chargebee/models/pricing_page_session'
77
76
  require File.dirname(__FILE__) + '/chargebee/models/metadata'
77
+ require File.dirname(__FILE__) + '/chargebee/models/customer_entitlement'
78
+ require File.dirname(__FILE__) + '/chargebee/models/payment_schedule'
79
+ require File.dirname(__FILE__) + '/chargebee/models/payment_schedule_scheme'
78
80
 
79
81
  module ChargeBee
80
82
 
81
- VERSION = '2.42.0'
83
+ VERSION = '2.44.0'
82
84
 
83
85
  @@default_env = nil
84
86
  @@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.42.0
4
+ version: 2.44.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: 2024-08-14 00:00:00.000000000 Z
12
+ date: 2024-09-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
@@ -134,6 +134,7 @@ files:
134
134
  - lib/chargebee/models/csv_tax_rule.rb
135
135
  - lib/chargebee/models/currency.rb
136
136
  - lib/chargebee/models/customer.rb
137
+ - lib/chargebee/models/customer_entitlement.rb
137
138
  - lib/chargebee/models/differential_price.rb
138
139
  - lib/chargebee/models/discount.rb
139
140
  - lib/chargebee/models/download.rb
@@ -151,9 +152,6 @@ files:
151
152
  - lib/chargebee/models/impacted_item_price.rb
152
153
  - lib/chargebee/models/impacted_subscription.rb
153
154
  - lib/chargebee/models/in_app_subscription.rb
154
- - lib/chargebee/models/installment.rb
155
- - lib/chargebee/models/installment_config.rb
156
- - lib/chargebee/models/installment_detail.rb
157
155
  - lib/chargebee/models/invoice.rb
158
156
  - lib/chargebee/models/invoice_estimate.rb
159
157
  - lib/chargebee/models/item.rb
@@ -166,6 +164,8 @@ files:
166
164
  - lib/chargebee/models/order.rb
167
165
  - lib/chargebee/models/payment_intent.rb
168
166
  - lib/chargebee/models/payment_reference_number.rb
167
+ - lib/chargebee/models/payment_schedule.rb
168
+ - lib/chargebee/models/payment_schedule_scheme.rb
169
169
  - lib/chargebee/models/payment_source.rb
170
170
  - lib/chargebee/models/payment_voucher.rb
171
171
  - lib/chargebee/models/plan.rb
@@ -1,18 +0,0 @@
1
- module ChargeBee
2
- class Installment < Model
3
-
4
- attr_accessor :id, :invoice_id, :date, :amount, :status, :created_at, :resource_version, :updated_at
5
-
6
- # OPERATIONS
7
- #-----------
8
-
9
- def self.retrieve(id, env=nil, headers={})
10
- Request.send('get', uri_path("installments",id.to_s), {}, env, headers)
11
- end
12
-
13
- def self.list(params, env=nil, headers={})
14
- Request.send_list_request('get', uri_path("installments"), params, env, headers)
15
- end
16
-
17
- end # ~Installment
18
- end # ~ChargeBee
@@ -1,27 +0,0 @@
1
- module ChargeBee
2
- class InstallmentConfig < Model
3
-
4
- class Installment < Model
5
- attr_accessor :period, :amount_percentage
6
- end
7
-
8
- attr_accessor :id, :description, :number_of_installments, :period_unit, :period, :preferred_day,
9
- :created_at, :resource_version, :updated_at, :installments
10
-
11
- # OPERATIONS
12
- #-----------
13
-
14
- def self.create(params, env=nil, headers={})
15
- Request.send('post', uri_path("installment_configs"), params, env, headers)
16
- end
17
-
18
- def self.retrieve(id, env=nil, headers={})
19
- Request.send('get', uri_path("installment_configs",id.to_s), {}, env, headers)
20
- end
21
-
22
- def self.delete(id, env=nil, headers={})
23
- Request.send('post', uri_path("installment_configs",id.to_s,"delete"), {}, env, headers)
24
- end
25
-
26
- end # ~InstallmentConfig
27
- end # ~ChargeBee
@@ -1,14 +0,0 @@
1
- module ChargeBee
2
- class InstallmentDetail < Model
3
-
4
- class Installment < Model
5
- attr_accessor :id, :invoice_id, :date, :amount, :status, :created_at, :resource_version, :updated_at
6
- end
7
-
8
- attr_accessor :id, :invoice_id, :amount, :installments
9
-
10
- # OPERATIONS
11
- #-----------
12
-
13
- end # ~InstallmentDetail
14
- end # ~ChargeBee