chargebee 2.20.0 → 2.22.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: 597fc1a63786c913dce021f6543a34b18fdfdf37
4
- data.tar.gz: dea300a96633c90cfebbae706332980f4776dc4e
3
+ metadata.gz: 713fc3ef9187f7ad0cfc0cd0a9c60ff5d057bf39
4
+ data.tar.gz: ba0a29c1d187ddcf991ee969e35d5454c90489d8
5
5
  SHA512:
6
- metadata.gz: 5f16dbd970124daae33798ad87861980f38c42f41abca2245df0cdc5d7a7eb1219d607c558bc8ec38d34bc9db17ccb43517338a81541a38a23d0b8f53638d931
7
- data.tar.gz: cbed4282a3c1047eb7d276f02425f64832d700efd4be156b51631f6d2f27548633c55cff630d3af0b6b19d3414e45112fe964366ec209a18e54f868bd9ed0c07
6
+ metadata.gz: 3e53f86e0ae3d4e2ff161d7bc5a45b50a2b599b334167c54d798fe435961968874702629ca534af5610433775f5b01b7aea8df188ee73d6e1043ddf387bab83f
7
+ data.tar.gz: 479a753dfc973473738b7fa1f3cc21f7cc54974b1989b8f733618f4690f2e3e1100820dd1e2f5eff6c83fce890ba4f7eee971c06cbb419495c3cd3fd340e1a20
data/CHANGELOG.md CHANGED
@@ -1,3 +1,49 @@
1
+ ### v2.22.0 (2023-01-13)
2
+ * * *
3
+
4
+ #### Fixes:
5
+ * Added missing `require`'s for models.
6
+
7
+ #### New Attributes:
8
+ * shipping_address and billing_address parameter has been added to the CreditNote.
9
+ * is_advance_charge has been added to the UnbilledCharge.
10
+
11
+ #### Added input parameters:
12
+ * CreateSubForCustomerQuoteRequest#subscription[po_number] and CreateSubItemsForCustomerQuoteRequest#subscription[po_number] parameter has been added to Quote resource.
13
+ * ImportUnbilledChargesRequest#unbilled_charges[is_advance_charge] parameter has been added to Subscription resource.
14
+ * ImportInvoiceRequest#has_advance_charges parameter has been added to Invoice resource.
15
+
16
+ #### New endpoints:
17
+ * Invoice#DeleteLineItemsRequest has been added to the Invoice resource.
18
+
19
+ #### New Enum values:
20
+ * SUBSCRIPTION_TRIAL_EXTENDED has been added to EventTypeEnum.
21
+ * ZERO_VALUE_ITEM has been added to TaxExemptReasonEnum.
22
+ * BANK_OF_AMERICA has been added to GatewayEnum.
23
+
24
+
25
+ ### v2.21.0 (2022-11-10)
26
+ * * *
27
+
28
+ #### New endpoints:
29
+ * credit_notes#import_credit_note has been added to the credit_notes resource.
30
+ * subscriptions#import_unbilled_charges has been added to the subscriptions resource.
31
+
32
+ #### New attributes:
33
+ * shipped_at parameter has been added to the orders#list_orders API.
34
+
35
+ #### Added input parameters:
36
+ * voided_at and void_reason_code have been added to the invoices#import_invoice API.
37
+
38
+ #### New attributes:
39
+ * business_entity_id has been added to the orders resource.
40
+
41
+ #### New Enum values:
42
+ * registered has been added to the status enum in credit_note_einvoice and invoice_einvoice subresources.
43
+ * type enum has been added to the subscription_discount subresource.
44
+ * subscription_entitlements_created has been added to the event_type enum.
45
+
46
+
1
47
  ### v2.20.0 (2022-09-20)
2
48
 
3
49
  #### New Resource:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- chargebee (2.18.0)
4
+ chargebee (2.22.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.20.0'
8
- s.date = '2022-09-20'
7
+ s.version = '2.22.0'
8
+ s.date = '2023-01-13'
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
 
@@ -53,7 +53,6 @@ Gem::Specification.new do |s|
53
53
  lib/chargebee/models/credit_note_estimate.rb
54
54
  lib/chargebee/models/customer.rb
55
55
  lib/chargebee/models/differential_price.rb
56
- lib/chargebee/models/discount.rb
57
56
  lib/chargebee/models/download.rb
58
57
  lib/chargebee/models/entitlement_override.rb
59
58
  lib/chargebee/models/estimate.rb
@@ -37,13 +37,21 @@ module ChargeBee
37
37
  attr_accessor :invoice_id, :allocated_amount, :allocated_at, :invoice_date, :invoice_status
38
38
  end
39
39
 
40
+ class ShippingAddress < Model
41
+ attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status, :index
42
+ end
43
+
44
+ class BillingAddress < Model
45
+ attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
46
+ end
47
+
40
48
  attr_accessor :id, :customer_id, :subscription_id, :reference_invoice_id, :type, :reason_code,
41
49
  :status, :vat_number, :date, :price_type, :currency_code, :total, :amount_allocated, :amount_refunded,
42
50
  :amount_available, :refunded_at, :voided_at, :generated_at, :resource_version, :updated_at,
43
51
  :channel, :einvoice, :sub_total, :sub_total_in_local_currency, :total_in_local_currency, :local_currency_code,
44
52
  :round_off_amount, :fractional_correction, :line_items, :discounts, :line_item_discounts, :line_item_tiers,
45
53
  :taxes, :line_item_taxes, :linked_refunds, :allocations, :deleted, :create_reason_code, :vat_number_prefix,
46
- :business_entity_id
54
+ :business_entity_id, :shipping_address, :billing_address
47
55
 
48
56
  # OPERATIONS
49
57
  #-----------
@@ -92,5 +100,9 @@ module ChargeBee
92
100
  Request.send('post', uri_path("credit_notes",id.to_s,"resend_einvoice"), {}, env, headers)
93
101
  end
94
102
 
103
+ def self.import_credit_note(params, env=nil, headers={})
104
+ Request.send('post', uri_path("credit_notes","import_credit_note"), params, env, headers)
105
+ end
106
+
95
107
  end # ~CreditNote
96
108
  end # ~ChargeBee
@@ -115,6 +115,10 @@ module ChargeBee
115
115
  Request.send('post', uri_path("invoices",id.to_s,"sync_usages"), {}, env, headers)
116
116
  end
117
117
 
118
+ def self.delete_line_items(id, params={}, env=nil, headers={})
119
+ Request.send('post', uri_path("invoices",id.to_s,"delete_line_items"), params, env, headers)
120
+ end
121
+
118
122
  def self.apply_credits(id, params={}, env=nil, headers={})
119
123
  Request.send('post', uri_path("invoices",id.to_s,"apply_credits"), params, env, headers)
120
124
  end
@@ -31,7 +31,7 @@ module ChargeBee
31
31
  Request.send('get', uri_path("item_prices",id.to_s), {}, env, headers)
32
32
  end
33
33
 
34
- def self.update(id, params={}, env=nil, headers={})
34
+ def self.update(id, params, env=nil, headers={})
35
35
  Request.send('post', uri_path("item_prices",id.to_s), params, env, headers)
36
36
  end
37
37
 
@@ -37,7 +37,7 @@ module ChargeBee
37
37
  :delivered_at, :shipped_at, :resource_version, :updated_at, :cancelled_at, :resent_status, :is_resent,
38
38
  :original_order_id, :order_line_items, :shipping_address, :billing_address, :discount, :sub_total,
39
39
  :total, :line_item_taxes, :line_item_discounts, :linked_credit_notes, :deleted, :currency_code,
40
- :is_gifted, :gift_note, :gift_id, :resend_reason, :resent_orders
40
+ :is_gifted, :gift_note, :gift_id, :resend_reason, :resent_orders, :business_entity_id
41
41
 
42
42
  # OPERATIONS
43
43
  #-----------
@@ -42,7 +42,7 @@ module ChargeBee
42
42
  end
43
43
 
44
44
  class Discount < Model
45
- attr_accessor :id, :invoice_name, :percentage, :amount, :currency_code, :duration_type, :period, :period_unit, :included_in_mrr, :apply_on, :item_price_id, :created_at, :apply_till, :applied_count, :coupon_id, :index
45
+ attr_accessor :id, :invoice_name, :type, :percentage, :amount, :currency_code, :duration_type, :period, :period_unit, :included_in_mrr, :apply_on, :item_price_id, :created_at, :apply_till, :applied_count, :coupon_id, :index
46
46
  end
47
47
 
48
48
  attr_accessor :id, :currency_code, :plan_id, :plan_quantity, :plan_unit_price, :setup_fee, :billing_period,
@@ -167,6 +167,10 @@ module ChargeBee
167
167
  Request.send('post', uri_path("subscriptions",id.to_s,"import_contract_term"), params, env, headers)
168
168
  end
169
169
 
170
+ def self.import_unbilled_charges(id, params, env=nil, headers={})
171
+ Request.send('post', uri_path("subscriptions",id.to_s,"import_unbilled_charges"), params, env, headers)
172
+ end
173
+
170
174
  def self.import_for_items(id, params, env=nil, headers={})
171
175
  Request.send('post', uri_path("customers",id.to_s,"import_for_items"), params, env, headers)
172
176
  end
@@ -8,7 +8,7 @@ module ChargeBee
8
8
  attr_accessor :id, :customer_id, :subscription_id, :date_from, :date_to, :unit_amount, :pricing_model,
9
9
  :quantity, :amount, :currency_code, :discount_amount, :description, :entity_type, :entity_id,
10
10
  :is_voided, :voided_at, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :updated_at,
11
- :tiers, :deleted
11
+ :tiers, :is_advance_charge, :deleted
12
12
 
13
13
  # OPERATIONS
14
14
  #-----------
@@ -87,7 +87,7 @@ module ChargeBee
87
87
 
88
88
  def credit_note()
89
89
  credit_note = get(:credit_note, CreditNote,
90
- {: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});
90
+ {: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});
91
91
  return credit_note;
92
92
  end
93
93
 
@@ -332,7 +332,7 @@ module ChargeBee
332
332
 
333
333
  def credit_notes()
334
334
  credit_notes = get_list(:credit_notes, CreditNote,
335
- {: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});
335
+ {: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});
336
336
  return credit_notes;
337
337
  end
338
338
 
data/lib/chargebee.rb CHANGED
@@ -50,10 +50,25 @@ require File.dirname(__FILE__) + '/chargebee/models/item.rb'
50
50
  require File.dirname(__FILE__) + '/chargebee/models/item_family.rb'
51
51
  require File.dirname(__FILE__) + '/chargebee/models/item_price.rb'
52
52
  require File.dirname(__FILE__) + '/chargebee/models/usage.rb'
53
+ require File.dirname(__FILE__) + '/chargebee/models/advance_invoice_schedule'
54
+ require File.dirname(__FILE__) + '/chargebee/models/contract_term.rb'
55
+ require File.dirname(__FILE__) + '/chargebee/models/entitlement_override.rb'
56
+ require File.dirname(__FILE__) + '/chargebee/models/feature.rb'
57
+ require File.dirname(__FILE__) + '/chargebee/models/impacted_item.rb'
58
+ require File.dirname(__FILE__) + '/chargebee/models/impacted_subscription.rb'
59
+ require File.dirname(__FILE__) + '/chargebee/models/in_app_subscription.rb'
60
+ require File.dirname(__FILE__) + '/chargebee/models/item_entitlement.rb'
61
+ require File.dirname(__FILE__) + '/chargebee/models/purchase.rb'
62
+ require File.dirname(__FILE__) + '/chargebee/models/quote_line_group.rb'
63
+ require File.dirname(__FILE__) + '/chargebee/models/quote_charge.rb'
64
+ require File.dirname(__FILE__) + '/chargebee/models/quoted_subscription.rb'
65
+ require File.dirname(__FILE__) + '/chargebee/models/subscription_entitlement'
66
+ require File.dirname(__FILE__) + '/chargebee/models/tax_withheld.rb'
67
+ require File.dirname(__FILE__) + '/chargebee/models/token.rb'
53
68
 
54
69
  module ChargeBee
55
70
 
56
- VERSION = '2.20.0'
71
+ VERSION = '2.22.0'
57
72
 
58
73
  @@default_env = nil
59
74
  @@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.20.0
4
+ version: 2.22.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: 2022-09-20 00:00:00.000000000 Z
12
+ date: 2023-01-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
@@ -129,7 +129,6 @@ files:
129
129
  - lib/chargebee/models/credit_note_estimate.rb
130
130
  - lib/chargebee/models/customer.rb
131
131
  - lib/chargebee/models/differential_price.rb
132
- - lib/chargebee/models/discount.rb
133
132
  - lib/chargebee/models/download.rb
134
133
  - lib/chargebee/models/entitlement_override.rb
135
134
  - lib/chargebee/models/estimate.rb
@@ -1,12 +0,0 @@
1
- module ChargeBee
2
- class Discount < Model
3
-
4
- attr_accessor :id, :invoice_name, :percentage, :amount, :currency_code, :duration_type, :period,
5
- :period_unit, :included_in_mrr, :apply_on, :item_price_id, :created_at, :apply_till, :applied_count,
6
- :coupon_id, :index
7
-
8
- # OPERATIONS
9
- #-----------
10
-
11
- end # ~Discount
12
- end # ~ChargeBee