chargebee 2.78.0 → 2.80.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.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +259 -0
  3. data/Gemfile.lock +1 -1
  4. data/VERSION +1 -1
  5. data/chargebee.gemspec +14 -2
  6. data/lib/chargebee/models/applied_business_rule.rb +11 -0
  7. data/lib/chargebee/models/applied_rule.rb +10 -0
  8. data/lib/chargebee/models/apply_rule.rb +15 -0
  9. data/lib/chargebee/models/business_rule.rb +113 -0
  10. data/lib/chargebee/models/business_ruleset.rb +99 -0
  11. data/lib/chargebee/models/business_ruleset_rule.rb +10 -0
  12. data/lib/chargebee/models/credit_note.rb +20 -2
  13. data/lib/chargebee/models/custom_data_schema.rb +11 -0
  14. data/lib/chargebee/models/customer.rb +11 -1
  15. data/lib/chargebee/models/dispute.rb +25 -0
  16. data/lib/chargebee/models/einvoice.rb +21 -1
  17. data/lib/chargebee/models/email_log.rb +18 -0
  18. data/lib/chargebee/models/event.rb +1 -1
  19. data/lib/chargebee/models/export.rb +9 -0
  20. data/lib/chargebee/models/gateway_payment_method_token.rb +11 -0
  21. data/lib/chargebee/models/grant_block.rb +10 -2
  22. data/lib/chargebee/models/hosted_page.rb +1 -1
  23. data/lib/chargebee/models/invoice.rb +19 -1
  24. data/lib/chargebee/models/ledger_entry.rb +1 -1
  25. data/lib/chargebee/models/omnichannel_subscription_item_metric.rb +12 -0
  26. data/lib/chargebee/models/payment_intent.rb +6 -4
  27. data/lib/chargebee/models/payment_schedule.rb +13 -2
  28. data/lib/chargebee/models/payment_schedule_estimate.rb +1 -1
  29. data/lib/chargebee/models/payment_schedule_scheme.rb +7 -0
  30. data/lib/chargebee/models/payment_source.rb +12 -1
  31. data/lib/chargebee/models/quote.rb +1 -1
  32. data/lib/chargebee/models/quote_entitlement.rb +10 -2
  33. data/lib/chargebee/models/quoted_ramp.rb +1 -1
  34. data/lib/chargebee/models/quoted_subscription.rb +1 -1
  35. data/lib/chargebee/models/ramp.rb +6 -1
  36. data/lib/chargebee/models/subscription.rb +2 -2
  37. data/lib/chargebee/models/third_party_payment_method.rb +1 -1
  38. data/lib/chargebee/models/transaction.rb +5 -1
  39. data/lib/chargebee/models/vaulted_payment_method.rb +17 -0
  40. data/lib/chargebee/result.rb +86 -12
  41. data/lib/chargebee.rb +14 -1
  42. metadata +14 -2
@@ -0,0 +1,99 @@
1
+ module ChargeBee
2
+ class BusinessRuleset < Model
3
+
4
+ attr_accessor :id, :name, :description, :active, :execute_mode, :updated_at, :updated_by, :created_by,
5
+ :created_at, :rules, :resource_version
6
+
7
+ # OPERATIONS
8
+ #-----------
9
+
10
+ def self.create(params, env=nil, headers={})
11
+ jsonKeys = {
12
+ :rules => 0,
13
+ }
14
+ options = {
15
+ :isIdempotent => true
16
+ }
17
+ Request.send('post', uri_path("business_rulesets"), params, env, headers,nil, false, jsonKeys, options, "businessRuleset", "create")
18
+ end
19
+
20
+ def self.update(id, params, env=nil, headers={})
21
+ jsonKeys = {
22
+ :rules => 0,
23
+ }
24
+ options = {
25
+ :isIdempotent => true
26
+ }
27
+ Request.send('post', uri_path("business_rulesets",id.to_s), params, env, headers,nil, false, jsonKeys, options, "businessRuleset", "update")
28
+ end
29
+
30
+ def self.delete(id, env=nil, headers={})
31
+ jsonKeys = {
32
+ }
33
+ options = {
34
+ :isIdempotent => true
35
+ }
36
+ Request.send('post', uri_path("business_rulesets",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "businessRuleset", "delete")
37
+ end
38
+
39
+ def self.activate(id, env=nil, headers={})
40
+ jsonKeys = {
41
+ }
42
+ options = {
43
+ :isIdempotent => true
44
+ }
45
+ Request.send('post', uri_path("business_rulesets",id.to_s,"activate"), {}, env, headers,nil, false, jsonKeys, options, "businessRuleset", "activate")
46
+ end
47
+
48
+ def self.deactivate(id, env=nil, headers={})
49
+ jsonKeys = {
50
+ }
51
+ options = {
52
+ :isIdempotent => true
53
+ }
54
+ Request.send('post', uri_path("business_rulesets",id.to_s,"deactivate"), {}, env, headers,nil, false, jsonKeys, options, "businessRuleset", "deactivate")
55
+ end
56
+
57
+ def self.add_rules(id, params={}, env=nil, headers={})
58
+ jsonKeys = {
59
+ :rules => 0,
60
+ }
61
+ options = {
62
+ :isIdempotent => true
63
+ }
64
+ Request.send('post', uri_path("business_rulesets",id.to_s,"add_rules"), params, env, headers,nil, false, jsonKeys, options, "businessRuleset", "addRules")
65
+ end
66
+
67
+ def self.remove_rules(id, params={}, env=nil, headers={})
68
+ jsonKeys = {
69
+ :rules => 0,
70
+ }
71
+ options = {
72
+ :isIdempotent => true
73
+ }
74
+ Request.send('post', uri_path("business_rulesets",id.to_s,"remove_rules"), params, env, headers,nil, false, jsonKeys, options, "businessRuleset", "removeRules")
75
+ end
76
+
77
+ def self.list_rules(id, params={}, env=nil, headers={})
78
+ jsonKeys = {
79
+ }
80
+ options = {}
81
+ Request.send('get', uri_path("business_rulesets",id.to_s,"rules"), params, env, headers,nil, false, jsonKeys, options, "businessRuleset", "listRules")
82
+ end
83
+
84
+ def self.list(params={}, env=nil, headers={})
85
+ jsonKeys = {
86
+ }
87
+ options = {}
88
+ Request.send_list_request('get', uri_path("business_rulesets"), params, env, headers,nil, false, jsonKeys, options, "businessRuleset", "list")
89
+ end
90
+
91
+ def self.retrieve(id, env=nil, headers={})
92
+ jsonKeys = {
93
+ }
94
+ options = {}
95
+ Request.send('get', uri_path("business_rulesets",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "businessRuleset", "retrieve")
96
+ end
97
+
98
+ end # ~BusinessRuleset
99
+ end # ~ChargeBee
@@ -0,0 +1,10 @@
1
+ module ChargeBee
2
+ class BusinessRulesetRule < Model
3
+
4
+ attr_accessor :rule_id, :priority
5
+
6
+ # OPERATIONS
7
+ #-----------
8
+
9
+ end # ~BusinessRulesetRule
10
+ end # ~ChargeBee
@@ -68,8 +68,8 @@ module ChargeBee
68
68
  :local_currency_code, :round_off_amount, :fractional_correction, :notes, :line_items, :line_item_tiers,
69
69
  :line_item_discounts, :line_item_taxes, :line_item_addresses, :discounts, :taxes, :tax_origin,
70
70
  :linked_refunds, :allocations, :deleted, :tax_category, :local_currency_exchange_rate, :exchange_rates,
71
- :create_reason_code, :vat_number_prefix, :business_entity_id, :shipping_address, :billing_address,
72
- :einvoice, :site_details_at_creation
71
+ :create_reason_code, :vat_number_prefix, :business_entity_id, :brand_id, :shipping_address,
72
+ :billing_address, :einvoice, :site_details_at_creation
73
73
 
74
74
  # OPERATIONS
75
75
  #-----------
@@ -133,6 +133,15 @@ module ChargeBee
133
133
  Request.send('post', uri_path("credit_notes",id.to_s,"void"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "voidCreditNote")
134
134
  end
135
135
 
136
+ def self.send_email(id, env=nil, headers={})
137
+ jsonKeys = {
138
+ }
139
+ options = {
140
+ :isIdempotent => true
141
+ }
142
+ Request.send('post', uri_path("credit_notes",id.to_s,"send_email"), {}, env, headers,nil, false, jsonKeys, options, "creditNote", "sendEmail")
143
+ end
144
+
136
145
  def self.list(params={}, env=nil, headers={})
137
146
  jsonKeys = {
138
147
  }
@@ -157,6 +166,15 @@ module ChargeBee
157
166
  Request.send('post', uri_path("credit_notes",id.to_s,"delete"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "delete")
158
167
  end
159
168
 
169
+ def self.update(id, params={}, env=nil, headers={})
170
+ jsonKeys = {
171
+ }
172
+ options = {
173
+ :isIdempotent => true
174
+ }
175
+ Request.send('post', uri_path("credit_notes",id.to_s,"update"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "update")
176
+ end
177
+
160
178
  def self.remove_tax_withheld_refund(id, params, env=nil, headers={})
161
179
  jsonKeys = {
162
180
  }
@@ -0,0 +1,11 @@
1
+ module ChargeBee
2
+ class CustomDataSchema < Model
3
+
4
+ attr_accessor :id, :display_name, :entity_type, :schema_definition, :status, :created_at, :modified_at,
5
+ :updated_at
6
+
7
+ # OPERATIONS
8
+ #-----------
9
+
10
+ end # ~CustomDataSchema
11
+ end # ~ChargeBee
@@ -52,7 +52,8 @@ module ChargeBee
52
52
  :balances, :entity_identifiers, :tax_providers_fields, :is_einvoice_enabled, :einvoicing_method,
53
53
  :meta_data, :deleted, :registered_for_gst, :consolidated_invoicing, :customer_type, :business_customer_without_vat_number,
54
54
  :client_profile_id, :relationship, :use_default_hierarchy_settings, :parent_account_access,
55
- :child_account_access, :vat_number_prefix, :entity_identifier_scheme, :entity_identifier_standard
55
+ :child_account_access, :vat_number_prefix, :entity_identifier_scheme, :entity_identifier_standard,
56
+ :brand_id
56
57
 
57
58
  # OPERATIONS
58
59
  #-----------
@@ -206,6 +207,15 @@ module ChargeBee
206
207
  Request.send('post', uri_path("customers",id.to_s,"collect_payment"), params, env, headers,nil, false, jsonKeys, options, "customer", "collectPayment")
207
208
  end
208
209
 
210
+ def self.send_payment_request(id, env=nil, headers={})
211
+ jsonKeys = {
212
+ }
213
+ options = {
214
+ :isIdempotent => true
215
+ }
216
+ Request.send('post', uri_path("customers",id.to_s,"send_payment_request"), {}, env, headers,nil, false, jsonKeys, options, "customer", "sendPaymentRequest")
217
+ end
218
+
209
219
  def self.delete(id, params={}, env=nil, headers={})
210
220
  jsonKeys = {
211
221
  }
@@ -0,0 +1,25 @@
1
+ module ChargeBee
2
+ class Dispute < Model
3
+
4
+ attr_accessor :id, :customer_id, :transaction_id, :gateway_account_id, :id_at_gateway, :currency_code,
5
+ :amount, :reason, :status, :type, :is_partial_dispute, :created_at, :resource_version, :updated_at
6
+
7
+ # OPERATIONS
8
+ #-----------
9
+
10
+ def self.retrieve(id, env=nil, headers={})
11
+ jsonKeys = {
12
+ }
13
+ options = {}
14
+ Request.send('get', uri_path("disputes",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "dispute", "retrieve")
15
+ end
16
+
17
+ def self.list(params={}, env=nil, headers={})
18
+ jsonKeys = {
19
+ }
20
+ options = {}
21
+ Request.send_list_request('get', uri_path("disputes"), params, env, headers,nil, false, jsonKeys, options, "dispute", "list")
22
+ end
23
+
24
+ end # ~Dispute
25
+ end # ~ChargeBee
@@ -1,10 +1,30 @@
1
1
  module ChargeBee
2
2
  class Einvoice < Model
3
3
 
4
- attr_accessor :id, :reference_id, :reference_number, :status, :message, :provider_references
4
+ class Artifact < Model
5
+ attr_accessor :artifact_type, :direction, :status, :code, :external_artifact_id, :created_at, :resource_version, :updated_at, :deleted
6
+ end
7
+
8
+ attr_accessor :id, :entity_type, :entity_id, :reference_id, :reference_number, :status, :message,
9
+ :created_at, :resource_version, :updated_at, :deleted, :provider_references, :business_entity_id,
10
+ :artifacts
5
11
 
6
12
  # OPERATIONS
7
13
  #-----------
8
14
 
15
+ def self.retrieve(id, env=nil, headers={})
16
+ jsonKeys = {
17
+ }
18
+ options = {}
19
+ Request.send('get', uri_path("einvoices",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "einvoice", "retrieve")
20
+ end
21
+
22
+ def self.list_einvoices(params={}, env=nil, headers={})
23
+ jsonKeys = {
24
+ }
25
+ options = {}
26
+ Request.send('get', uri_path("einvoices"), params, env, headers,nil, false, jsonKeys, options, "einvoice", "listEinvoices")
27
+ end
28
+
9
29
  end # ~Einvoice
10
30
  end # ~ChargeBee
@@ -0,0 +1,18 @@
1
+ module ChargeBee
2
+ class EmailLog < Model
3
+
4
+ attr_accessor :id, :template_name, :from_address, :to_address, :subject, :status, :sent_on,
5
+ :customer_id, :site_id, :business_entity_id, :brand_id, :error_message
6
+
7
+ # OPERATIONS
8
+ #-----------
9
+
10
+ def self.email_logs_for_customer(id, params={}, env=nil, headers={})
11
+ jsonKeys = {
12
+ }
13
+ options = {}
14
+ Request.send('get', uri_path("customers",id.to_s,"email_logs"), params, env, headers,nil, false, jsonKeys, options, "emailLog", "emailLogsForCustomer")
15
+ end
16
+
17
+ end # ~EmailLog
18
+ end # ~ChargeBee
@@ -6,7 +6,7 @@ module ChargeBee
6
6
  end
7
7
 
8
8
  attr_accessor :id, :occurred_at, :source, :user, :webhook_status, :webhook_failure_reason, :webhooks,
9
- :event_type, :api_version, :origin_user
9
+ :event_type, :site_id, :api_version, :origin_user
10
10
 
11
11
  class Content < Result
12
12
  end
@@ -196,5 +196,14 @@ end
196
196
  Request.send('post', uri_path("exports","price_variants"), params, env, headers,nil, false, jsonKeys, options, "export", "priceVariants")
197
197
  end
198
198
 
199
+ def self.ramps(params={}, env=nil, headers={})
200
+ jsonKeys = {
201
+ }
202
+ options = {
203
+ :isIdempotent => true
204
+ }
205
+ Request.send('post', uri_path("exports","ramps"), params, env, headers,nil, false, jsonKeys, options, "export", "ramps")
206
+ end
207
+
199
208
  end # ~Export
200
209
  end # ~ChargeBee
@@ -0,0 +1,11 @@
1
+ module ChargeBee
2
+ class GatewayPaymentMethodToken < Model
3
+
4
+ attr_accessor :id, :gateway_account_id, :gateway_name, :gateway_customer_id, :gateway_token,
5
+ :status, :created_at, :updated_at
6
+
7
+ # OPERATIONS
8
+ #-----------
9
+
10
+ end # ~GatewayPaymentMethodToken
11
+ end # ~ChargeBee
@@ -1,10 +1,18 @@
1
1
  module ChargeBee
2
2
  class GrantBlock < Model
3
3
 
4
- attr_accessor :id, :subscription_id, :account_type, :unit_id, :unit_type, :granted_amount, :effective_from,
4
+ class ProvisionedBlockBalance < Model
5
+ attr_accessor :granted_amount, :total_balance, :usable_balance, :hold_amount, :used_amount, :expired_amount, :rolled_over_amount, :voided_amount
6
+ end
7
+
8
+ class OverdraftBlockBalance < Model
9
+ attr_accessor :is_unlimited, :limit, :total_balance, :usable_balance, :used_amount
10
+ end
11
+
12
+ attr_accessor :id, :subscription_id, :unit_id, :unit_type, :account_type, :granted_amount, :effective_from,
5
13
  :expires_at, :balance, :hold_amount, :used_amount, :expired_amount, :rolled_over_amount, :voided_amount,
6
14
  :origin_grant_block_id, :status, :grant_source, :created_at, :modified_at, :resource_version,
7
- :metadata
15
+ :provisioned_block_balance, :overdraft_block_balance, :metadata
8
16
 
9
17
  # OPERATIONS
10
18
  #-----------
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class HostedPage < Model
3
3
 
4
4
  attr_accessor :id, :type, :url, :state, :failure_reason, :pass_thru_content, :embed, :created_at,
5
- :expires_at, :layout, :updated_at, :resource_version, :checkout_info, :business_entity_id
5
+ :expires_at, :layout, :updated_at, :resource_version, :checkout_info, :business_entity_id, :brand_id
6
6
 
7
7
  class Content < Result
8
8
  end
@@ -104,7 +104,7 @@ module ChargeBee
104
104
  :discounts, :taxes, :tax_origin, :linked_payments, :reference_transactions, :dunning_attempts,
105
105
  :applied_credits, :adjustment_credit_notes, :issued_credit_notes, :linked_orders, :notes, :shipping_address,
106
106
  :billing_address, :statement_descriptor, :einvoice, :void_reason_code, :deleted, :tax_category,
107
- :vat_number_prefix, :channel, :business_entity_id, :site_details_at_creation
107
+ :vat_number_prefix, :channel, :business_entity_id, :brand_id, :site_details_at_creation
108
108
 
109
109
  # OPERATIONS
110
110
  #-----------
@@ -410,6 +410,24 @@ module ChargeBee
410
410
  Request.send('post', uri_path("invoices",id.to_s,"write_off"), params, env, headers,nil, false, jsonKeys, options, "invoice", "writeOff")
411
411
  end
412
412
 
413
+ def self.void_before_capture(id, params={}, env=nil, headers={})
414
+ jsonKeys = {
415
+ }
416
+ options = {
417
+ :isIdempotent => true
418
+ }
419
+ Request.send('post', uri_path("invoices",id.to_s,"void_before_capture"), params, env, headers,nil, false, jsonKeys, options, "invoice", "voidBeforeCapture")
420
+ end
421
+
422
+ def self.send_email(id, env=nil, headers={})
423
+ jsonKeys = {
424
+ }
425
+ options = {
426
+ :isIdempotent => true
427
+ }
428
+ Request.send('post', uri_path("invoices",id.to_s,"send_email"), {}, env, headers,nil, false, jsonKeys, options, "invoice", "sendEmail")
429
+ end
430
+
413
431
  def self.delete(id, params={}, env=nil, headers={})
414
432
  jsonKeys = {
415
433
  }
@@ -1,7 +1,7 @@
1
1
  module ChargeBee
2
2
  class LedgerEntry < Model
3
3
 
4
- attr_accessor :id, :subscription_id, :account_type, :unit_id, :unit_type, :amount, :grant_block_start_balance,
4
+ attr_accessor :id, :subscription_id, :unit_id, :unit_type, :account_type, :amount, :grant_block_start_balance,
5
5
  :grant_block_end_balance, :account_start_balance, :account_end_balance, :type, :ledger_operation_id,
6
6
  :grant_block_id, :created_at, :modified_at
7
7
 
@@ -0,0 +1,12 @@
1
+ module ChargeBee
2
+ class OmnichannelSubscriptionItemMetric < Model
3
+
4
+ attr_accessor :customer_id, :omnichannel_subscription_id, :omnichannel_subscription_item_id,
5
+ :item_id_at_source, :mrr_currency, :mrr_units, :mrr_nanos, :effective_from, :calculated_at,
6
+ :created_at, :resource_version
7
+
8
+ # OPERATIONS
9
+ #-----------
10
+
11
+ end # ~OmnichannelSubscriptionItemMetric
12
+ end # ~ChargeBee
@@ -2,11 +2,11 @@ module ChargeBee
2
2
  class PaymentIntent < Model
3
3
 
4
4
  class PaymentAttempt < Model
5
- attr_accessor :id, :status, :payment_method_type, :id_at_gateway, :error_code, :error_text, :checkout_details, :created_at, :modified_at, :error_detail
5
+ attr_accessor :id, :status, :payment_method_type, :id_at_gateway, :error_code, :error_text, :checkout_details, :created_at, :modified_at, :error_detail, :routing_rule_id, :payment_method_display_rule_id
6
6
  end
7
7
 
8
8
  class PaymentAttempt < Model
9
- attr_accessor :id, :status, :payment_method_type, :id_at_gateway, :error_code, :error_text, :checkout_details, :created_at, :modified_at, :error_detail
9
+ attr_accessor :id, :status, :payment_method_type, :id_at_gateway, :error_code, :error_text, :checkout_details, :created_at, :modified_at, :error_detail, :routing_rule_id, :payment_method_display_rule_id
10
10
  end
11
11
 
12
12
  class PaymentIntentMetadata < Model
@@ -15,14 +15,15 @@ module ChargeBee
15
15
 
16
16
  attr_accessor :id, :status, :currency_code, :amount, :gateway_account_id, :expires_at, :reference_id,
17
17
  :payment_method_type, :success_url, :failure_url, :created_at, :modified_at, :resource_version,
18
- :updated_at, :customer_id, :gateway, :active_payment_attempt, :payment_attempts, :payment_intent_metadata,
19
- :business_entity_id
18
+ :updated_at, :payment_method_options, :customer_id, :gateway, :active_payment_attempt, :payment_attempts,
19
+ :payment_intent_metadata, :business_entity_id, :brand_id
20
20
 
21
21
  # OPERATIONS
22
22
  #-----------
23
23
 
24
24
  def self.create(params, env=nil, headers={})
25
25
  jsonKeys = {
26
+ :payment_method_options => 0,
26
27
  }
27
28
  options = {
28
29
  :isIdempotent => true
@@ -32,6 +33,7 @@ module ChargeBee
32
33
 
33
34
  def self.update(id, params={}, env=nil, headers={})
34
35
  jsonKeys = {
36
+ :payment_method_options => 0,
35
37
  }
36
38
  options = {
37
39
  :isIdempotent => true
@@ -2,14 +2,25 @@ module ChargeBee
2
2
  class PaymentSchedule < Model
3
3
 
4
4
  class ScheduleEntry < Model
5
- attr_accessor :id, :date, :amount, :status
5
+ attr_accessor :id, :date, :amount, :scheduled_amount, :status
6
+ end
7
+
8
+ class ReferenceTransaction < Model
9
+ attr_accessor :schedule_entry_id, :applied_amount, :txn_id, :txn_status, :txn_date, :txn_amount
6
10
  end
7
11
 
8
12
  attr_accessor :id, :scheme_id, :entity_type, :entity_id, :amount, :created_at, :resource_version,
9
- :updated_at, :currency_code, :schedule_entries
13
+ :updated_at, :currency_code, :schedule_entries, :reference_transactions
10
14
 
11
15
  # OPERATIONS
12
16
  #-----------
13
17
 
18
+ def self.list(params={}, env=nil, headers={})
19
+ jsonKeys = {
20
+ }
21
+ options = {}
22
+ Request.send_list_request('get', uri_path("payment_schedules"), params, env, headers,nil, false, jsonKeys, options, "paymentSchedule", "list")
23
+ end
24
+
14
25
  end # ~PaymentSchedule
15
26
  end # ~ChargeBee
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class PaymentScheduleEstimate < Model
3
3
 
4
4
  class ScheduleEntry < Model
5
- attr_accessor :id, :date, :amount, :status
5
+ attr_accessor :id, :date, :amount, :scheduled_amount, :status
6
6
  end
7
7
 
8
8
  attr_accessor :id, :scheme_id, :entity_type, :entity_id, :amount, :currency_code, :schedule_entries
@@ -27,6 +27,13 @@ module ChargeBee
27
27
  Request.send('get', uri_path("payment_schedule_schemes",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "paymentScheduleScheme", "retrieve")
28
28
  end
29
29
 
30
+ def self.list(params={}, env=nil, headers={})
31
+ jsonKeys = {
32
+ }
33
+ options = {}
34
+ Request.send_list_request('get', uri_path("payment_schedule_schemes"), params, env, headers,nil, false, jsonKeys, options, "paymentScheduleScheme", "list")
35
+ end
36
+
30
37
  def self.delete(id, env=nil, headers={})
31
38
  jsonKeys = {
32
39
  }
@@ -41,10 +41,14 @@ module ChargeBee
41
41
  attr_accessor :id, :subscription_id, :created_at
42
42
  end
43
43
 
44
+ class NetworkTransactionReference < Model
45
+ attr_accessor :original_network_transaction_id
46
+ end
47
+
44
48
  attr_accessor :id, :resource_version, :updated_at, :created_at, :customer_id, :type, :reference_id,
45
49
  :status, :gateway, :gateway_account_id, :ip_address, :issuing_country, :card, :bank_account,
46
50
  :boleto, :billing_address, :amazon_payment, :upi, :paypal, :venmo, :klarna_pay_now, :mandates,
47
- :deleted, :business_entity_id
51
+ :vault_token, :network_transaction_reference, :deleted, :business_entity_id, :brand_id
48
52
 
49
53
  # OPERATIONS
50
54
  #-----------
@@ -148,6 +152,13 @@ module ChargeBee
148
152
  Request.send('post', uri_path("payment_sources",id.to_s,"verify_bank_account"), params, env, headers,nil, false, jsonKeys, options, "paymentSource", "verifyBankAccount")
149
153
  end
150
154
 
155
+ def self.list_gateway_tokens_for_payment_source(id, params={}, env=nil, headers={})
156
+ jsonKeys = {
157
+ }
158
+ options = {}
159
+ Request.send('get', uri_path("payment_sources",id.to_s,"gateway_payment_method_tokens"), params, env, headers,nil, false, jsonKeys, options, "paymentSource", "listGatewayTokensForPaymentSource")
160
+ end
161
+
151
162
  def self.retrieve(id, env=nil, headers={})
152
163
  jsonKeys = {
153
164
  }
@@ -39,7 +39,7 @@ module ChargeBee
39
39
  :updated_at, :vat_number_prefix, :line_items, :line_item_tiers, :line_item_discounts, :line_item_taxes,
40
40
  :discounts, :taxes, :tax_category, :currency_code, :notes, :shipping_address, :billing_address,
41
41
  :contract_term_start, :contract_term_end, :contract_term_termination_fee, :business_entity_id,
42
- :deleted, :total_contract_value, :total_discount
42
+ :deleted, :total_contract_value, :total_discount, :has_entitlements
43
43
 
44
44
  # OPERATIONS
45
45
  #-----------
@@ -1,11 +1,19 @@
1
1
  module ChargeBee
2
2
  class QuoteEntitlement < Model
3
3
 
4
- attr_accessor :entity_id, :entity_type, :feature_id, :value, :is_enabled, :start_date, :end_date,
5
- :created_at, :modified_at
4
+ attr_accessor :entity_id, :entity_type, :action_type, :feature_id, :value, :is_enabled, :start_date,
5
+ :end_date, :created_at, :modified_at, :is_overridden, :feature_name, :feature_unit, :feature_type,
6
+ :name, :metered
6
7
 
7
8
  # OPERATIONS
8
9
  #-----------
9
10
 
11
+ def self.list_quote_entitlements(id, params={}, env=nil, headers={})
12
+ jsonKeys = {
13
+ }
14
+ options = {}
15
+ Request.send('get', uri_path("quotes",id.to_s,"quote_entitlements"), params, env, headers,nil, false, jsonKeys, options, "quoteEntitlement", "listQuoteEntitlements")
16
+ end
17
+
10
18
  end # ~QuoteEntitlement
11
19
  end # ~ChargeBee
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class QuotedRamp < Model
3
3
 
4
4
  class LineItem < Model
5
- attr_accessor :item_price_id, :item_type, :quantity, :quantity_in_decimal, :metered_quantity, :unit_price, :unit_price_in_decimal, :amount, :amount_in_decimal, :billing_period, :billing_period_unit, :free_quantity, :free_quantity_in_decimal, :billing_cycles, :service_period_days, :charge_on_event, :charge_once, :charge_on_option, :start_date, :end_date, :ramp_tier_id, :discount_per_billing_cycle, :discount_per_billing_cycle_in_decimal, :item_level_discount_per_billing_cycle, :item_level_discount_per_billing_cycle_in_decimal, :amount_per_billing_cycle, :amount_per_billing_cycle_in_decimal, :net_amount_per_billing_cycle, :net_amount_per_billing_cycle_in_decimal
5
+ attr_accessor :item_price_id, :item_type, :quantity, :quantity_in_decimal, :metered_quantity, :unit_price, :unit_price_in_decimal, :amount, :amount_in_decimal, :billing_period, :billing_period_unit, :free_quantity, :free_quantity_in_decimal, :billing_cycles, :service_period_days, :charge_on_event, :charge_once, :charge_on_option, :start_date, :end_date, :ramp_tier_id, :discount_per_billing_cycle, :discount_per_billing_cycle_in_decimal, :item_level_discount_per_billing_cycle, :item_level_discount_per_billing_cycle_in_decimal, :amount_per_billing_cycle, :amount_per_billing_cycle_in_decimal, :net_amount_per_billing_cycle, :net_amount_per_billing_cycle_in_decimal, :description
6
6
  end
7
7
 
8
8
  class Discount < Model
@@ -14,7 +14,7 @@ module ChargeBee
14
14
  end
15
15
 
16
16
  class SubscriptionItem < Model
17
- attr_accessor :item_price_id, :item_type, :quantity, :quantity_in_decimal, :metered_quantity, :last_calculated_at, :unit_price, :unit_price_in_decimal, :amount, :current_term_start, :current_term_end, :next_billing_at, :amount_in_decimal, :billing_period, :billing_period_unit, :free_quantity, :free_quantity_in_decimal, :trial_end, :billing_cycles, :service_period_days, :charge_on_event, :charge_once, :charge_on_option, :proration_type, :usage_accumulation_reset_frequency
17
+ attr_accessor :item_price_id, :item_type, :quantity, :quantity_in_decimal, :metered_quantity, :last_calculated_at, :unit_price, :unit_price_in_decimal, :amount, :current_term_start, :current_term_end, :next_billing_at, :amount_in_decimal, :billing_period, :billing_period_unit, :free_quantity, :free_quantity_in_decimal, :trial_end, :billing_cycles, :service_period_days, :charge_on_event, :charge_once, :charge_on_option, :proration_type, :usage_accumulation_reset_frequency, :description
18
18
  end
19
19
 
20
20
  class ItemTier < Model
@@ -25,13 +25,18 @@ module ChargeBee
25
25
  attr_accessor :cancellation_cutoff_period, :renewal_billing_cycles, :action_at_term_end
26
26
  end
27
27
 
28
+ class BillingConfiguration < Model
29
+ attr_accessor :po_number
30
+ end
31
+
28
32
  class StatusTransitionReason < Model
29
33
  attr_accessor :code, :message
30
34
  end
31
35
 
32
36
  attr_accessor :id, :description, :subscription_id, :effective_from, :status, :created_at, :resource_version,
33
37
  :updated_at, :items_to_add, :items_to_update, :coupons_to_add, :discounts_to_add, :item_tiers,
34
- :items_to_remove, :coupons_to_remove, :discounts_to_remove, :contract_term, :deleted, :status_transition_reason
38
+ :items_to_remove, :coupons_to_remove, :discounts_to_remove, :contract_term, :billing_configuration,
39
+ :deleted, :status_transition_reason
35
40
 
36
41
  # OPERATIONS
37
42
  #-----------
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class Subscription < Model
3
3
 
4
4
  class SubscriptionItem < Model
5
- attr_accessor :item_price_id, :item_type, :quantity, :quantity_in_decimal, :metered_quantity, :last_calculated_at, :unit_price, :unit_price_in_decimal, :amount, :current_term_start, :current_term_end, :next_billing_at, :amount_in_decimal, :billing_period, :billing_period_unit, :free_quantity, :free_quantity_in_decimal, :trial_end, :billing_cycles, :service_period_days, :charge_on_event, :charge_once, :charge_on_option, :proration_type, :usage_accumulation_reset_frequency
5
+ attr_accessor :item_price_id, :item_type, :quantity, :quantity_in_decimal, :metered_quantity, :last_calculated_at, :unit_price, :unit_price_in_decimal, :amount, :current_term_start, :current_term_end, :next_billing_at, :amount_in_decimal, :billing_period, :billing_period_unit, :free_quantity, :free_quantity_in_decimal, :trial_end, :billing_cycles, :service_period_days, :charge_on_event, :charge_once, :charge_on_option, :proration_type, :usage_accumulation_reset_frequency, :description
6
6
  end
7
7
 
8
8
  class ItemTier < Model
@@ -62,7 +62,7 @@ module ChargeBee
62
62
  :addons, :event_based_addons, :charged_event_based_addons, :coupon, :coupons, :shipping_address,
63
63
  :referral_info, :billing_override, :invoice_notes, :meta_data, :deleted, :changes_scheduled_at,
64
64
  :contract_term, :cancel_reason_code, :free_period, :free_period_unit, :create_pending_invoices,
65
- :auto_close_invoices, :discounts, :business_entity_id, :decommissioned, :metadata
65
+ :auto_close_invoices, :discounts, :business_entity_id, :decommissioned, :brand_id, :metadata
66
66
  def metadata
67
67
  warn "[DEPRECATION] `metadata` is deprecated please use meta_data instead."
68
68
  @metadata
@@ -1,7 +1,7 @@
1
1
  module ChargeBee
2
2
  class ThirdPartyPaymentMethod < Model
3
3
 
4
- attr_accessor :type, :gateway, :gateway_account_id, :reference_id
4
+ attr_accessor :type, :gateway, :gateway_account_id, :reference_id, :network_transaction_reference
5
5
 
6
6
  # OPERATIONS
7
7
  #-----------
@@ -21,6 +21,10 @@ module ChargeBee
21
21
  attr_accessor :request_id, :error_category, :error_code, :error_message, :decline_code, :decline_message, :network_error_code, :network_error_message, :error_field, :recommendation_code, :recommendation_message, :processor_error_code, :processor_error_message, :error_cause_id, :processor_advice_code
22
22
  end
23
23
 
24
+ class NetworkTransactionDetail < Model
25
+ attr_accessor :network_transaction_id, :original_network_transaction_id
26
+ end
27
+
24
28
  attr_accessor :id, :customer_id, :subscription_id, :gateway_account_id, :payment_source_id,
25
29
  :payment_method, :reference_number, :gateway, :type, :date, :settled_at, :exchange_rate, :currency_code,
26
30
  :amount, :id_at_gateway, :status, :fraud_flag, :initiator_type, :three_d_secure, :authorization_reason,
@@ -28,7 +32,7 @@ module ChargeBee
28
32
  :amount_unused, :masked_card_number, :reference_transaction_id, :refunded_txn_id, :reference_authorization_id,
29
33
  :amount_capturable, :reversal_transaction_id, :linked_invoices, :linked_credit_notes, :linked_refunds,
30
34
  :linked_payments, :deleted, :iin, :last4, :merchant_reference_id, :business_entity_id, :payment_method_details,
31
- :error_detail, :custom_payment_method_name
35
+ :error_detail, :custom_payment_method_name, :network_transaction_details
32
36
 
33
37
  # OPERATIONS
34
38
  #-----------