chargebee 2.76.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.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +140 -0
  3. data/Gemfile.lock +1 -1
  4. data/VERSION +1 -1
  5. data/chargebee.gemspec +9 -2
  6. data/lib/chargebee/models/addon.rb +7 -7
  7. data/lib/chargebee/models/address.rb +2 -2
  8. data/lib/chargebee/models/alert.rb +16 -8
  9. data/lib/chargebee/models/alert_status.rb +2 -2
  10. data/lib/chargebee/models/async_response.rb +18 -0
  11. data/lib/chargebee/models/async_response_list.rb +10 -0
  12. data/lib/chargebee/models/attached_item.rb +5 -5
  13. data/lib/chargebee/models/business_entity.rb +2 -2
  14. data/lib/chargebee/models/card.rb +5 -5
  15. data/lib/chargebee/models/column_definition.rb +10 -0
  16. data/lib/chargebee/models/comment.rb +4 -4
  17. data/lib/chargebee/models/configuration.rb +1 -1
  18. data/lib/chargebee/models/coupon.rb +9 -9
  19. data/lib/chargebee/models/coupon_code.rb +4 -4
  20. data/lib/chargebee/models/coupon_set.rb +7 -7
  21. data/lib/chargebee/models/credit_note.rb +22 -17
  22. data/lib/chargebee/models/credit_note_estimate.rb +1 -1
  23. data/lib/chargebee/models/credit_unit.rb +54 -0
  24. data/lib/chargebee/models/currency.rb +6 -6
  25. data/lib/chargebee/models/customer.rb +26 -26
  26. data/lib/chargebee/models/customer_entitlement.rb +1 -1
  27. data/lib/chargebee/models/differential_price.rb +5 -5
  28. data/lib/chargebee/models/entitlement.rb +2 -2
  29. data/lib/chargebee/models/entitlement_override.rb +2 -2
  30. data/lib/chargebee/models/estimate.rb +20 -20
  31. data/lib/chargebee/models/event.rb +2 -2
  32. data/lib/chargebee/models/export.rb +18 -18
  33. data/lib/chargebee/models/feature.rb +9 -9
  34. data/lib/chargebee/models/gift.rb +7 -7
  35. data/lib/chargebee/models/grant_block.rb +5 -4
  36. data/lib/chargebee/models/hosted_page.rb +22 -22
  37. data/lib/chargebee/models/in_app_subscription.rb +4 -4
  38. data/lib/chargebee/models/invoice.rb +48 -44
  39. data/lib/chargebee/models/invoice_estimate.rb +1 -1
  40. data/lib/chargebee/models/item.rb +5 -5
  41. data/lib/chargebee/models/item_entitlement.rb +4 -4
  42. data/lib/chargebee/models/item_family.rb +5 -5
  43. data/lib/chargebee/models/item_price.rb +7 -7
  44. data/lib/chargebee/models/ledger_account_balance.rb +3 -2
  45. data/lib/chargebee/models/ledger_entry.rb +12 -0
  46. data/lib/chargebee/models/ledger_operation.rb +16 -9
  47. data/lib/chargebee/models/meter.rb +18 -0
  48. data/lib/chargebee/models/metered_feature.rb +46 -0
  49. data/lib/chargebee/models/non_subscription.rb +1 -1
  50. data/lib/chargebee/models/offer_event.rb +1 -1
  51. data/lib/chargebee/models/offer_fulfillment.rb +3 -3
  52. data/lib/chargebee/models/omnichannel_one_time_order.rb +2 -2
  53. data/lib/chargebee/models/omnichannel_subscription.rb +4 -4
  54. data/lib/chargebee/models/omnichannel_subscription_item.rb +1 -1
  55. data/lib/chargebee/models/order.rb +12 -12
  56. data/lib/chargebee/models/payment_intent.rb +9 -4
  57. data/lib/chargebee/models/payment_schedule_scheme.rb +3 -3
  58. data/lib/chargebee/models/payment_source.rb +16 -16
  59. data/lib/chargebee/models/payment_voucher.rb +4 -4
  60. data/lib/chargebee/models/personalized_offer.rb +1 -1
  61. data/lib/chargebee/models/plan.rb +7 -7
  62. data/lib/chargebee/models/portal_session.rb +4 -4
  63. data/lib/chargebee/models/price_variant.rb +5 -5
  64. data/lib/chargebee/models/pricing_page_session.rb +2 -2
  65. data/lib/chargebee/models/promotional_credit.rb +5 -5
  66. data/lib/chargebee/models/promotional_grant.rb +1 -1
  67. data/lib/chargebee/models/purchase.rb +2 -2
  68. data/lib/chargebee/models/quote.rb +27 -27
  69. data/lib/chargebee/models/quote_line_group.rb +1 -1
  70. data/lib/chargebee/models/quoted_charge.rb +2 -2
  71. data/lib/chargebee/models/ramp.rb +6 -6
  72. data/lib/chargebee/models/recorded_purchase.rb +2 -2
  73. data/lib/chargebee/models/resource_migration.rb +1 -1
  74. data/lib/chargebee/models/rule.rb +1 -1
  75. data/lib/chargebee/models/site_migration_detail.rb +1 -1
  76. data/lib/chargebee/models/subscription.rb +37 -37
  77. data/lib/chargebee/models/subscription_entitlement.rb +2 -2
  78. data/lib/chargebee/models/time_machine.rb +3 -3
  79. data/lib/chargebee/models/transaction.rb +11 -11
  80. data/lib/chargebee/models/unbilled_charge.rb +6 -6
  81. data/lib/chargebee/models/usage.rb +5 -5
  82. data/lib/chargebee/models/usage_charge.rb +1 -1
  83. data/lib/chargebee/models/usage_event.rb +2 -2
  84. data/lib/chargebee/models/usage_file.rb +2 -2
  85. data/lib/chargebee/models/usage_summary.rb +1 -1
  86. data/lib/chargebee/models/virtual_bank_account.rb +6 -6
  87. data/lib/chargebee/models/webhook_endpoint.rb +5 -5
  88. data/lib/chargebee/result.rb +57 -6
  89. data/lib/chargebee.rb +8 -1
  90. metadata +9 -2
@@ -30,7 +30,7 @@ module ChargeBee
30
30
  options = {
31
31
  :isIdempotent => true
32
32
  }
33
- Request.send('post', uri_path("coupons"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "coupon", telemetry_operation: "create")
33
+ Request.send('post', uri_path("coupons"), params, env, headers,nil, false, jsonKeys, options, "coupon", "create")
34
34
  end
35
35
 
36
36
  def self.create_for_items(params, env=nil, headers={})
@@ -44,7 +44,7 @@ module ChargeBee
44
44
  options = {
45
45
  :isIdempotent => true
46
46
  }
47
- Request.send('post', uri_path("coupons","create_for_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "coupon", telemetry_operation: "createForItems")
47
+ Request.send('post', uri_path("coupons","create_for_items"), params, env, headers,nil, false, jsonKeys, options, "coupon", "createForItems")
48
48
  end
49
49
 
50
50
  def self.update_for_items(id, params, env=nil, headers={})
@@ -58,21 +58,21 @@ module ChargeBee
58
58
  options = {
59
59
  :isIdempotent => true
60
60
  }
61
- Request.send('post', uri_path("coupons",id.to_s,"update_for_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "coupon", telemetry_operation: "updateForItems")
61
+ Request.send('post', uri_path("coupons",id.to_s,"update_for_items"), params, env, headers,nil, false, jsonKeys, options, "coupon", "updateForItems")
62
62
  end
63
63
 
64
64
  def self.list(params={}, env=nil, headers={})
65
65
  jsonKeys = {
66
66
  }
67
67
  options = {}
68
- Request.send_list_request('get', uri_path("coupons"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "coupon", telemetry_operation: "list")
68
+ Request.send_list_request('get', uri_path("coupons"), params, env, headers,nil, false, jsonKeys, options, "coupon", "list")
69
69
  end
70
70
 
71
71
  def self.retrieve(id, env=nil, headers={})
72
72
  jsonKeys = {
73
73
  }
74
74
  options = {}
75
- Request.send('get', uri_path("coupons",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "coupon", telemetry_operation: "retrieve")
75
+ Request.send('get', uri_path("coupons",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "coupon", "retrieve")
76
76
  end
77
77
 
78
78
  def self.update(id, params={}, env=nil, headers={})
@@ -82,7 +82,7 @@ module ChargeBee
82
82
  options = {
83
83
  :isIdempotent => true
84
84
  }
85
- Request.send('post', uri_path("coupons",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "coupon", telemetry_operation: "update")
85
+ Request.send('post', uri_path("coupons",id.to_s), params, env, headers,nil, false, jsonKeys, options, "coupon", "update")
86
86
  end
87
87
 
88
88
  def self.delete(id, env=nil, headers={})
@@ -91,7 +91,7 @@ module ChargeBee
91
91
  options = {
92
92
  :isIdempotent => true
93
93
  }
94
- Request.send('post', uri_path("coupons",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "coupon", telemetry_operation: "delete")
94
+ Request.send('post', uri_path("coupons",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "coupon", "delete")
95
95
  end
96
96
 
97
97
  def self.copy(params, env=nil, headers={})
@@ -100,7 +100,7 @@ module ChargeBee
100
100
  options = {
101
101
  :isIdempotent => true
102
102
  }
103
- Request.send('post', uri_path("coupons","copy"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "coupon", telemetry_operation: "copy")
103
+ Request.send('post', uri_path("coupons","copy"), params, env, headers,nil, false, jsonKeys, options, "coupon", "copy")
104
104
  end
105
105
 
106
106
  def self.unarchive(id, env=nil, headers={})
@@ -109,7 +109,7 @@ module ChargeBee
109
109
  options = {
110
110
  :isIdempotent => true
111
111
  }
112
- Request.send('post', uri_path("coupons",id.to_s,"unarchive"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "coupon", telemetry_operation: "unarchive")
112
+ Request.send('post', uri_path("coupons",id.to_s,"unarchive"), {}, env, headers,nil, false, jsonKeys, options, "coupon", "unarchive")
113
113
  end
114
114
 
115
115
  end # ~Coupon
@@ -13,21 +13,21 @@ module ChargeBee
13
13
  options = {
14
14
  :isIdempotent => true
15
15
  }
16
- Request.send('post', uri_path("coupon_codes"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "couponCode", telemetry_operation: "create")
16
+ Request.send('post', uri_path("coupon_codes"), params, env, headers,nil, false, jsonKeys, options, "couponCode", "create")
17
17
  end
18
18
 
19
19
  def self.retrieve(id, env=nil, headers={})
20
20
  jsonKeys = {
21
21
  }
22
22
  options = {}
23
- Request.send('get', uri_path("coupon_codes",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "couponCode", telemetry_operation: "retrieve")
23
+ Request.send('get', uri_path("coupon_codes",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "couponCode", "retrieve")
24
24
  end
25
25
 
26
26
  def self.list(params={}, env=nil, headers={})
27
27
  jsonKeys = {
28
28
  }
29
29
  options = {}
30
- Request.send_list_request('get', uri_path("coupon_codes"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "couponCode", telemetry_operation: "list")
30
+ Request.send_list_request('get', uri_path("coupon_codes"), params, env, headers,nil, false, jsonKeys, options, "couponCode", "list")
31
31
  end
32
32
 
33
33
  def self.archive(id, env=nil, headers={})
@@ -36,7 +36,7 @@ module ChargeBee
36
36
  options = {
37
37
  :isIdempotent => true
38
38
  }
39
- Request.send('post', uri_path("coupon_codes",id.to_s,"archive"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "couponCode", telemetry_operation: "archive")
39
+ Request.send('post', uri_path("coupon_codes",id.to_s,"archive"), {}, env, headers,nil, false, jsonKeys, options, "couponCode", "archive")
40
40
  end
41
41
 
42
42
  end # ~CouponCode
@@ -13,7 +13,7 @@ module ChargeBee
13
13
  options = {
14
14
  :isIdempotent => true
15
15
  }
16
- Request.send('post', uri_path("coupon_sets"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "couponSet", telemetry_operation: "create")
16
+ Request.send('post', uri_path("coupon_sets"), params, env, headers,nil, false, jsonKeys, options, "couponSet", "create")
17
17
  end
18
18
 
19
19
  def self.add_coupon_codes(id, params={}, env=nil, headers={})
@@ -22,21 +22,21 @@ module ChargeBee
22
22
  options = {
23
23
  :isIdempotent => true
24
24
  }
25
- Request.send('post', uri_path("coupon_sets",id.to_s,"add_coupon_codes"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "couponSet", telemetry_operation: "addCouponCodes")
25
+ Request.send('post', uri_path("coupon_sets",id.to_s,"add_coupon_codes"), params, env, headers,nil, false, jsonKeys, options, "couponSet", "addCouponCodes")
26
26
  end
27
27
 
28
28
  def self.list(params={}, env=nil, headers={})
29
29
  jsonKeys = {
30
30
  }
31
31
  options = {}
32
- Request.send_list_request('get', uri_path("coupon_sets"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "couponSet", telemetry_operation: "list")
32
+ Request.send_list_request('get', uri_path("coupon_sets"), params, env, headers,nil, false, jsonKeys, options, "couponSet", "list")
33
33
  end
34
34
 
35
35
  def self.retrieve(id, env=nil, headers={})
36
36
  jsonKeys = {
37
37
  }
38
38
  options = {}
39
- Request.send('get', uri_path("coupon_sets",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "couponSet", telemetry_operation: "retrieve")
39
+ Request.send('get', uri_path("coupon_sets",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "couponSet", "retrieve")
40
40
  end
41
41
 
42
42
  def self.update(id, params={}, env=nil, headers={})
@@ -46,7 +46,7 @@ module ChargeBee
46
46
  options = {
47
47
  :isIdempotent => true
48
48
  }
49
- Request.send('post', uri_path("coupon_sets",id.to_s,"update"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "couponSet", telemetry_operation: "update")
49
+ Request.send('post', uri_path("coupon_sets",id.to_s,"update"), params, env, headers,nil, false, jsonKeys, options, "couponSet", "update")
50
50
  end
51
51
 
52
52
  def self.delete(id, env=nil, headers={})
@@ -55,7 +55,7 @@ module ChargeBee
55
55
  options = {
56
56
  :isIdempotent => true
57
57
  }
58
- Request.send('post', uri_path("coupon_sets",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "couponSet", telemetry_operation: "delete")
58
+ Request.send('post', uri_path("coupon_sets",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "couponSet", "delete")
59
59
  end
60
60
 
61
61
  def self.delete_unused_coupon_codes(id, env=nil, headers={})
@@ -64,7 +64,7 @@ module ChargeBee
64
64
  options = {
65
65
  :isIdempotent => true
66
66
  }
67
- Request.send('post', uri_path("coupon_sets",id.to_s,"delete_unused_coupon_codes"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "couponSet", telemetry_operation: "deleteUnusedCouponCodes")
67
+ Request.send('post', uri_path("coupon_sets",id.to_s,"delete_unused_coupon_codes"), {}, env, headers,nil, false, jsonKeys, options, "couponSet", "deleteUnusedCouponCodes")
68
68
  end
69
69
 
70
70
  end # ~CouponSet
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class CreditNote < Model
3
3
 
4
4
  class LineItem < Model
5
- attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :metered, :is_percentage_pricing, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
5
+ attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :metered, :is_percentage_pricing, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id, :proration_mode
6
6
  end
7
7
 
8
8
  class LineItemTier < Model
@@ -41,6 +41,10 @@ module ChargeBee
41
41
  attr_accessor :invoice_id, :allocated_amount, :allocated_at, :invoice_date, :invoice_status, :tax_application
42
42
  end
43
43
 
44
+ class ExchangeRate < Model
45
+ attr_accessor :currency_code, :rate
46
+ end
47
+
44
48
  class ShippingAddress < Model
45
49
  attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
46
50
  end
@@ -63,8 +67,9 @@ module ChargeBee
63
67
  :channel, :line_items_next_offset, :sub_total, :sub_total_in_local_currency, :total_in_local_currency,
64
68
  :local_currency_code, :round_off_amount, :fractional_correction, :notes, :line_items, :line_item_tiers,
65
69
  :line_item_discounts, :line_item_taxes, :line_item_addresses, :discounts, :taxes, :tax_origin,
66
- :linked_refunds, :allocations, :deleted, :tax_category, :local_currency_exchange_rate, :create_reason_code,
67
- :vat_number_prefix, :business_entity_id, :shipping_address, :billing_address, :einvoice, :site_details_at_creation
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
68
73
 
69
74
  # OPERATIONS
70
75
  #-----------
@@ -75,14 +80,14 @@ module ChargeBee
75
80
  options = {
76
81
  :isIdempotent => true
77
82
  }
78
- Request.send('post', uri_path("credit_notes"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "create")
83
+ Request.send('post', uri_path("credit_notes"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "create")
79
84
  end
80
85
 
81
86
  def self.retrieve(id, params={}, env=nil, headers={})
82
87
  jsonKeys = {
83
88
  }
84
89
  options = {}
85
- Request.send('get', uri_path("credit_notes",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "retrieve")
90
+ Request.send('get', uri_path("credit_notes",id.to_s), params, env, headers,nil, false, jsonKeys, options, "creditNote", "retrieve")
86
91
  end
87
92
 
88
93
  def self.pdf(id, params={}, env=nil, headers={})
@@ -91,14 +96,14 @@ module ChargeBee
91
96
  options = {
92
97
  :isIdempotent => true
93
98
  }
94
- Request.send('post', uri_path("credit_notes",id.to_s,"pdf"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "pdf")
99
+ Request.send('post', uri_path("credit_notes",id.to_s,"pdf"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "pdf")
95
100
  end
96
101
 
97
102
  def self.download_einvoice(id, env=nil, headers={})
98
103
  jsonKeys = {
99
104
  }
100
105
  options = {}
101
- Request.send('get', uri_path("credit_notes",id.to_s,"download_einvoice"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "downloadEinvoice")
106
+ Request.send('get', uri_path("credit_notes",id.to_s,"download_einvoice"), {}, env, headers,nil, false, jsonKeys, options, "creditNote", "downloadEinvoice")
102
107
  end
103
108
 
104
109
  def self.refund(id, params={}, env=nil, headers={})
@@ -107,7 +112,7 @@ module ChargeBee
107
112
  options = {
108
113
  :isIdempotent => true
109
114
  }
110
- Request.send('post', uri_path("credit_notes",id.to_s,"refund"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "refund")
115
+ Request.send('post', uri_path("credit_notes",id.to_s,"refund"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "refund")
111
116
  end
112
117
 
113
118
  def self.record_refund(id, params, env=nil, headers={})
@@ -116,7 +121,7 @@ module ChargeBee
116
121
  options = {
117
122
  :isIdempotent => true
118
123
  }
119
- Request.send('post', uri_path("credit_notes",id.to_s,"record_refund"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "recordRefund")
124
+ Request.send('post', uri_path("credit_notes",id.to_s,"record_refund"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "recordRefund")
120
125
  end
121
126
 
122
127
  def self.void_credit_note(id, params={}, env=nil, headers={})
@@ -125,14 +130,14 @@ module ChargeBee
125
130
  options = {
126
131
  :isIdempotent => true
127
132
  }
128
- Request.send('post', uri_path("credit_notes",id.to_s,"void"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "voidCreditNote")
133
+ Request.send('post', uri_path("credit_notes",id.to_s,"void"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "voidCreditNote")
129
134
  end
130
135
 
131
136
  def self.list(params={}, env=nil, headers={})
132
137
  jsonKeys = {
133
138
  }
134
139
  options = {}
135
- Request.send_list_request('get', uri_path("credit_notes"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "list")
140
+ Request.send_list_request('get', uri_path("credit_notes"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "list")
136
141
  end
137
142
 
138
143
  # @deprecated This method is deprecated and will be removed in a future version.
@@ -140,7 +145,7 @@ module ChargeBee
140
145
  jsonKeys = {
141
146
  }
142
147
  options = {}
143
- Request.send('get', uri_path("customers",id.to_s,"credit_notes"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "creditNotesForCustomer")
148
+ Request.send('get', uri_path("customers",id.to_s,"credit_notes"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "creditNotesForCustomer")
144
149
  end
145
150
 
146
151
  def self.delete(id, params={}, env=nil, headers={})
@@ -149,7 +154,7 @@ module ChargeBee
149
154
  options = {
150
155
  :isIdempotent => true
151
156
  }
152
- Request.send('post', uri_path("credit_notes",id.to_s,"delete"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "delete")
157
+ Request.send('post', uri_path("credit_notes",id.to_s,"delete"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "delete")
153
158
  end
154
159
 
155
160
  def self.remove_tax_withheld_refund(id, params, env=nil, headers={})
@@ -158,7 +163,7 @@ module ChargeBee
158
163
  options = {
159
164
  :isIdempotent => true
160
165
  }
161
- Request.send('post', uri_path("credit_notes",id.to_s,"remove_tax_withheld_refund"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "removeTaxWithheldRefund")
166
+ Request.send('post', uri_path("credit_notes",id.to_s,"remove_tax_withheld_refund"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "removeTaxWithheldRefund")
162
167
  end
163
168
 
164
169
  def self.resend_einvoice(id, env=nil, headers={})
@@ -167,7 +172,7 @@ module ChargeBee
167
172
  options = {
168
173
  :isIdempotent => true
169
174
  }
170
- Request.send('post', uri_path("credit_notes",id.to_s,"resend_einvoice"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "resendEinvoice")
175
+ Request.send('post', uri_path("credit_notes",id.to_s,"resend_einvoice"), {}, env, headers,nil, false, jsonKeys, options, "creditNote", "resendEinvoice")
171
176
  end
172
177
 
173
178
  def self.send_einvoice(id, env=nil, headers={})
@@ -176,7 +181,7 @@ module ChargeBee
176
181
  options = {
177
182
  :isIdempotent => true
178
183
  }
179
- Request.send('post', uri_path("credit_notes",id.to_s,"send_einvoice"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "sendEinvoice")
184
+ Request.send('post', uri_path("credit_notes",id.to_s,"send_einvoice"), {}, env, headers,nil, false, jsonKeys, options, "creditNote", "sendEinvoice")
180
185
  end
181
186
 
182
187
  def self.import_credit_note(params, env=nil, headers={})
@@ -185,7 +190,7 @@ module ChargeBee
185
190
  options = {
186
191
  :isIdempotent => true
187
192
  }
188
- Request.send('post', uri_path("credit_notes","import_credit_note"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "importCreditNote")
193
+ Request.send('post', uri_path("credit_notes","import_credit_note"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "importCreditNote")
189
194
  end
190
195
 
191
196
  end # ~CreditNote
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class CreditNoteEstimate < Model
3
3
 
4
4
  class LineItem < Model
5
- attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :metered, :is_percentage_pricing, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
5
+ attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :metered, :is_percentage_pricing, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id, :proration_mode
6
6
  end
7
7
 
8
8
  class LineItemTier < Model
@@ -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
@@ -10,14 +10,14 @@ module ChargeBee
10
10
  jsonKeys = {
11
11
  }
12
12
  options = {}
13
- Request.send_list_request('get', uri_path("currencies","list"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "currency", telemetry_operation: "list")
13
+ Request.send_list_request('get', uri_path("currencies","list"), params, env, headers,nil, false, jsonKeys, options, "currency", "list")
14
14
  end
15
15
 
16
16
  def self.retrieve(id, env=nil, headers={})
17
17
  jsonKeys = {
18
18
  }
19
19
  options = {}
20
- Request.send('get', uri_path("currencies",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "currency", telemetry_operation: "retrieve")
20
+ Request.send('get', uri_path("currencies",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "currency", "retrieve")
21
21
  end
22
22
 
23
23
  def self.create(params, env=nil, headers={})
@@ -26,7 +26,7 @@ module ChargeBee
26
26
  options = {
27
27
  :isIdempotent => true
28
28
  }
29
- Request.send('post', uri_path("currencies"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "currency", telemetry_operation: "create")
29
+ Request.send('post', uri_path("currencies"), params, env, headers,nil, false, jsonKeys, options, "currency", "create")
30
30
  end
31
31
 
32
32
  def self.update(id, params, env=nil, headers={})
@@ -35,7 +35,7 @@ module ChargeBee
35
35
  options = {
36
36
  :isIdempotent => true
37
37
  }
38
- Request.send('post', uri_path("currencies",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "currency", telemetry_operation: "update")
38
+ Request.send('post', uri_path("currencies",id.to_s), params, env, headers,nil, false, jsonKeys, options, "currency", "update")
39
39
  end
40
40
 
41
41
  def self.add_schedule(id, params, env=nil, headers={})
@@ -44,7 +44,7 @@ module ChargeBee
44
44
  options = {
45
45
  :isIdempotent => true
46
46
  }
47
- Request.send('post', uri_path("currencies",id.to_s,"add_schedule"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "currency", telemetry_operation: "addSchedule")
47
+ Request.send('post', uri_path("currencies",id.to_s,"add_schedule"), params, env, headers,nil, false, jsonKeys, options, "currency", "addSchedule")
48
48
  end
49
49
 
50
50
  def self.remove_schedule(id, env=nil, headers={})
@@ -53,7 +53,7 @@ module ChargeBee
53
53
  options = {
54
54
  :isIdempotent => true
55
55
  }
56
- Request.send('post', uri_path("currencies",id.to_s,"remove_schedule"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "currency", telemetry_operation: "removeSchedule")
56
+ Request.send('post', uri_path("currencies",id.to_s,"remove_schedule"), {}, env, headers,nil, false, jsonKeys, options, "currency", "removeSchedule")
57
57
  end
58
58
 
59
59
  end # ~Currency