chargebee 2.6.7 → 2.7.2

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: d43cfd517b221d62c391b308fcc6267172ac996d
4
- data.tar.gz: 2216894ca1372be37ee0def9841ce68d3271f33a
3
+ metadata.gz: b44f485ff0c5ff3e2e7741f2c59c623a814f0288
4
+ data.tar.gz: 35fe1367aec6d6c824b0c9866126d80a8347d421
5
5
  SHA512:
6
- metadata.gz: 4e9a0d0d2b633f99c9db97bbc090a9f11a224c0ec7cbec375fa6541c2387ae1fd76b6e040bf43275809c1e986e942c33cbf8ff6f4c066d73db59f8a2d0e4f996
7
- data.tar.gz: ec2b7d8a6923cbb70d7f7d34a1f392f821df35baaee33fa70426c416112523a2097c709026e421dabcc2dcc78b71f73d1a1e19febc13e5e365ad829347f103c0
6
+ metadata.gz: fa5e2d2b5790bcdf6ea693400828fed01f27710f1582404686ddb6b61f24f64ccb9e5dffc19347c6cfee23a9edbf83df1e5dd1c375da8847e94b9b897e18fcf3
7
+ data.tar.gz: 4e6ed3e62b0c8c702bcbbfd7ec0c7391ab27505336a8c365e53df333c5cc5b79f4f0f486e45a5d7ad9eec529b5af6411f535a350c71878744cae25840603582e
@@ -1,3 +1,50 @@
1
+ ### v2.7.2 (2020-01-08)
2
+ * * *
3
+
4
+ * New attribute taxjar_product_code has been added in Addon and Plan resource.
5
+ * New input parameter taxjar_product_code has been added in create_an_addon, update_an_addon, create_a_plan and update_a_plan api
6
+ * New input parameter taxjar_exemption_category has been added in create_a_customer, update_a_customer , create_a_subscription and import_a_subscription api
7
+ * New input parameter no_expiry has been added in gift_subscription_estimate and create_a_gift api
8
+ * New attribute no_expiry has been added in Gift resource
9
+ * New endpoint update_gift has been added in Gift resource
10
+ * New value BUSINESS_CHECKING has been added in AccountType enum
11
+ * New value CCD has been added in EcheckType enum
12
+ * New event type GIFT_UPDATED has been added
13
+ * New enum taxjar_exemption_category has been added
14
+
15
+ ### v2.7.1 (2019-09-13)
16
+ * * *
17
+
18
+ * New endpoints gift_subscription_estimate and create_invoice_estimate have been added in estimate resource.
19
+ * New input parameter reference_id in payment_intent has been added in create_a_gift, create_an_invoice, create_using_payment_intent, create_a_subscription, create_subscription_for_customer, update_a_subscription, reactivate_a_subscription, resume_a_subscription, create_a_customer and collect_payment_for_customer api.
20
+ * New endpoint record_refund_for_a_payment has been added in transaction resource.
21
+
22
+ ### v2.7.0 (2019-08-27)
23
+ * * *
24
+
25
+ * New attribute client_profile_id has been added in customer resource.
26
+ * New input parameter client_profile_id has been added in create_a_customer, update_a_customer, create_subscription_estimate, create_a_subscription and import_a_subscription api.
27
+ * New input parameter payment_intent has been added in create_a_gift, create_an_invoice, reactivate_a_subscription and resume_a_subscription api.
28
+ * New input parameter replace_primary_payment_source has been added in create_an_invoice api.
29
+ * New attribute currency_code has been added in payment_intent resource.
30
+
31
+ ### v2.6.9 (2019-08-14)
32
+ * * *
33
+
34
+ * New resource payment_intent has been added.
35
+ * New input parameter 'id' in payment_intent sub-param has been added in create_a_customer, collect_payment_for_customer, create_using_payment_intent, create_a_subscription, create_subscription_for_customer and update_a_subscription .
36
+ * New event_types PAYMENT_INTENT_CREATED and PAYMENT_INTENT_UPDATED have been added.
37
+
38
+ ### v2.6.8 (2019-08-07)
39
+ * * *
40
+
41
+ * New attributes tax_amount_in_local_currency and local_currency_code have been added in line_item_tax sub-resource of credit_note, credit_note_estimate, invoice, invoice_estimate, order and quote resources.
42
+ * New attributes sub_total_in_local_currency, total_in_local_currency and local_currency_code have been added in credit_note and invoice resources.
43
+ * New input parameter gw_payment_method_id has been added in create_a_customer, collect_payment_for_customer, create_using_payment_intent, create_a_subscription, create_subscription_for_customer and update_a_subscription api.
44
+ * New attributes name, invoice_id and notes have been added in quote resource.
45
+ * New input parameters name, notes and expires_at have been added in create_a_quote_for_a_new_subscription, create_a_quote_for_update_subscription and create_a_quote_for_one-time_charges api.
46
+ * New input parameters id, auto_collection and po_number have been added in convert_a_quote api.
47
+
1
48
  ### v2.6.7 (2019-07-22)
2
49
  * * *
3
50
 
@@ -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.6.7'
8
- s.date = '2019-07-22'
7
+ s.version = '2.7.2'
8
+ s.date = '2020-01-08'
9
9
 
10
10
  s.summary = "Ruby client for Chargebee API."
11
11
  s.description = "Subscription Billing - Simple. Secure. Affordable. More details at www.chargebee.com."
@@ -60,6 +60,7 @@ Gem::Specification.new do |s|
60
60
  lib/chargebee/models/invoice_estimate.rb
61
61
  lib/chargebee/models/model.rb
62
62
  lib/chargebee/models/order.rb
63
+ lib/chargebee/models/payment_intent.rb
63
64
  lib/chargebee/models/payment_source.rb
64
65
  lib/chargebee/models/plan.rb
65
66
  lib/chargebee/models/portal_session.rb
@@ -42,10 +42,12 @@ require File.dirname(__FILE__) + '/chargebee/models/export'
42
42
  require File.dirname(__FILE__) + '/chargebee/models/gift'
43
43
  require File.dirname(__FILE__) + '/chargebee/models/quote'
44
44
  require File.dirname(__FILE__) + '/chargebee/models/contact.rb'
45
+ require File.dirname(__FILE__) + '/chargebee/models/hierarchy.rb'
46
+ require File.dirname(__FILE__) + '/chargebee/models/payment_intent.rb'
45
47
 
46
48
  module ChargeBee
47
49
 
48
- VERSION = '2.6.7'
50
+ VERSION = '2.7.2'
49
51
 
50
52
  @@default_env = nil
51
53
  @@verify_ca_certs = true
@@ -7,9 +7,10 @@ module ChargeBee
7
7
 
8
8
  attr_accessor :id, :name, :invoice_name, :description, :pricing_model, :type, :charge_type,
9
9
  :price, :currency_code, :period, :period_unit, :unit, :status, :archived_at, :enabled_in_portal,
10
- :tax_code, :avalara_sale_type, :avalara_transaction_type, :avalara_service_type, :sku, :accounting_code,
11
- :accounting_category1, :accounting_category2, :is_shippable, :shipping_frequency_period, :shipping_frequency_period_unit,
12
- :resource_version, :updated_at, :invoice_notes, :taxable, :tax_profile_id, :meta_data, :tiers
10
+ :tax_code, :taxjar_product_code, :avalara_sale_type, :avalara_transaction_type, :avalara_service_type,
11
+ :sku, :accounting_code, :accounting_category1, :accounting_category2, :is_shippable, :shipping_frequency_period,
12
+ :shipping_frequency_period_unit, :resource_version, :updated_at, :invoice_notes, :taxable, :tax_profile_id,
13
+ :meta_data, :tiers
13
14
 
14
15
  # OPERATIONS
15
16
  #-----------
@@ -22,7 +22,7 @@ module ChargeBee
22
22
  end
23
23
 
24
24
  class LineItemTax < Model
25
- attr_accessor :line_item_id, :tax_name, :tax_rate, :is_partial_tax_applied, :is_non_compliance_tax, :taxable_amount, :tax_amount, :tax_juris_type, :tax_juris_name, :tax_juris_code
25
+ attr_accessor :line_item_id, :tax_name, :tax_rate, :is_partial_tax_applied, :is_non_compliance_tax, :taxable_amount, :tax_amount, :tax_juris_type, :tax_juris_name, :tax_juris_code, :tax_amount_in_local_currency, :local_currency_code
26
26
  end
27
27
 
28
28
  class LinkedRefund < Model
@@ -35,9 +35,10 @@ module ChargeBee
35
35
 
36
36
  attr_accessor :id, :customer_id, :subscription_id, :reference_invoice_id, :type, :reason_code,
37
37
  :status, :vat_number, :date, :price_type, :currency_code, :total, :amount_allocated, :amount_refunded,
38
- :amount_available, :refunded_at, :voided_at, :resource_version, :updated_at, :sub_total, :round_off_amount,
39
- :fractional_correction, :line_items, :discounts, :line_item_discounts, :line_item_tiers, :taxes,
40
- :line_item_taxes, :linked_refunds, :allocations, :deleted
38
+ :amount_available, :refunded_at, :voided_at, :resource_version, :updated_at, :sub_total, :sub_total_in_local_currency,
39
+ :total_in_local_currency, :local_currency_code, :round_off_amount, :fractional_correction, :line_items,
40
+ :discounts, :line_item_discounts, :line_item_tiers, :taxes, :line_item_taxes, :linked_refunds,
41
+ :allocations, :deleted
41
42
 
42
43
  # OPERATIONS
43
44
  #-----------
@@ -14,7 +14,7 @@ module ChargeBee
14
14
  end
15
15
 
16
16
  class LineItemTax < Model
17
- attr_accessor :line_item_id, :tax_name, :tax_rate, :is_partial_tax_applied, :is_non_compliance_tax, :taxable_amount, :tax_amount, :tax_juris_type, :tax_juris_name, :tax_juris_code
17
+ attr_accessor :line_item_id, :tax_name, :tax_rate, :is_partial_tax_applied, :is_non_compliance_tax, :taxable_amount, :tax_amount, :tax_juris_type, :tax_juris_name, :tax_juris_code, :tax_amount_in_local_currency, :local_currency_code
18
18
  end
19
19
 
20
20
  class LineItemDiscount < Model
@@ -33,7 +33,7 @@ module ChargeBee
33
33
  :backup_payment_source_id, :billing_address, :referral_urls, :contacts, :payment_method, :invoice_notes,
34
34
  :preferred_currency_code, :promotional_credits, :unbilled_charges, :refundable_credits, :excess_payments,
35
35
  :balances, :meta_data, :deleted, :registered_for_gst, :business_customer_without_vat_number,
36
- :customer_type, :relationship
36
+ :customer_type, :client_profile_id, :relationship
37
37
 
38
38
  # OPERATIONS
39
39
  #-----------
@@ -43,5 +43,13 @@ module ChargeBee
43
43
  Request.send('post', uri_path("subscriptions",id.to_s,"resume_subscription_estimate"), params, env, headers)
44
44
  end
45
45
 
46
+ def self.gift_subscription(params, env=nil, headers={})
47
+ Request.send('post', uri_path("estimates","gift_subscription"), params, env, headers)
48
+ end
49
+
50
+ def self.create_invoice(params, env=nil, headers={})
51
+ Request.send('post', uri_path("estimates","create_invoice"), params, env, headers)
52
+ end
53
+
46
54
  end # ~Estimate
47
55
  end # ~ChargeBee
@@ -13,7 +13,7 @@ module ChargeBee
13
13
  attr_accessor :status, :occurred_at
14
14
  end
15
15
 
16
- attr_accessor :id, :status, :scheduled_at, :auto_claim, :claim_expiry_date, :resource_version,
16
+ attr_accessor :id, :status, :scheduled_at, :auto_claim, :no_expiry, :claim_expiry_date, :resource_version,
17
17
  :updated_at, :gifter, :gift_receiver, :gift_timelines
18
18
 
19
19
  # OPERATIONS
@@ -39,5 +39,9 @@ module ChargeBee
39
39
  Request.send('post', uri_path("gifts",id.to_s,"cancel"), {}, env, headers)
40
40
  end
41
41
 
42
+ def self.update_gift(id, params, env=nil, headers={})
43
+ Request.send('post', uri_path("gifts",id.to_s,"update_gift"), params, env, headers)
44
+ end
45
+
42
46
  end # ~Gift
43
47
  end # ~ChargeBee
@@ -18,7 +18,7 @@ module ChargeBee
18
18
  end
19
19
 
20
20
  class LineItemTax < Model
21
- attr_accessor :line_item_id, :tax_name, :tax_rate, :is_partial_tax_applied, :is_non_compliance_tax, :taxable_amount, :tax_amount, :tax_juris_type, :tax_juris_name, :tax_juris_code
21
+ attr_accessor :line_item_id, :tax_name, :tax_rate, :is_partial_tax_applied, :is_non_compliance_tax, :taxable_amount, :tax_amount, :tax_juris_type, :tax_juris_name, :tax_juris_code, :tax_amount_in_local_currency, :local_currency_code
22
22
  end
23
23
 
24
24
  class LineItemTier < Model
@@ -64,11 +64,12 @@ module ChargeBee
64
64
  attr_accessor :id, :po_number, :customer_id, :subscription_id, :recurring, :status, :vat_number,
65
65
  :price_type, :date, :due_date, :net_term_days, :currency_code, :total, :amount_paid, :amount_adjusted,
66
66
  :write_off_amount, :credits_applied, :amount_due, :paid_at, :dunning_status, :next_retry_at,
67
- :voided_at, :resource_version, :updated_at, :sub_total, :tax, :first_invoice, :has_advance_charges,
68
- :term_finalized, :is_gifted, :expected_payment_date, :amount_to_collect, :round_off_amount,
69
- :line_items, :discounts, :line_item_discounts, :taxes, :line_item_taxes, :line_item_tiers, :linked_payments,
70
- :dunning_attempts, :applied_credits, :adjustment_credit_notes, :issued_credit_notes, :linked_orders,
71
- :notes, :shipping_address, :billing_address, :payment_owner, :deleted
67
+ :voided_at, :resource_version, :updated_at, :sub_total, :sub_total_in_local_currency, :total_in_local_currency,
68
+ :local_currency_code, :tax, :first_invoice, :has_advance_charges, :term_finalized, :is_gifted,
69
+ :expected_payment_date, :amount_to_collect, :round_off_amount, :line_items, :discounts, :line_item_discounts,
70
+ :taxes, :line_item_taxes, :line_item_tiers, :linked_payments, :dunning_attempts, :applied_credits,
71
+ :adjustment_credit_notes, :issued_credit_notes, :linked_orders, :notes, :shipping_address, :billing_address,
72
+ :payment_owner, :deleted
72
73
 
73
74
  # OPERATIONS
74
75
  #-----------
@@ -14,7 +14,7 @@ module ChargeBee
14
14
  end
15
15
 
16
16
  class LineItemTax < Model
17
- attr_accessor :line_item_id, :tax_name, :tax_rate, :is_partial_tax_applied, :is_non_compliance_tax, :taxable_amount, :tax_amount, :tax_juris_type, :tax_juris_name, :tax_juris_code
17
+ attr_accessor :line_item_id, :tax_name, :tax_rate, :is_partial_tax_applied, :is_non_compliance_tax, :taxable_amount, :tax_amount, :tax_juris_type, :tax_juris_name, :tax_juris_code, :tax_amount_in_local_currency, :local_currency_code
18
18
  end
19
19
 
20
20
  class LineItemTier < Model
@@ -14,7 +14,7 @@ module ChargeBee
14
14
  end
15
15
 
16
16
  class LineItemTax < Model
17
- attr_accessor :line_item_id, :tax_name, :tax_rate, :is_partial_tax_applied, :is_non_compliance_tax, :taxable_amount, :tax_amount, :tax_juris_type, :tax_juris_name, :tax_juris_code
17
+ attr_accessor :line_item_id, :tax_name, :tax_rate, :is_partial_tax_applied, :is_non_compliance_tax, :taxable_amount, :tax_amount, :tax_juris_type, :tax_juris_name, :tax_juris_code, :tax_amount_in_local_currency, :local_currency_code
18
18
  end
19
19
 
20
20
  class LineItemDiscount < Model
@@ -0,0 +1,27 @@
1
+ module ChargeBee
2
+ class PaymentIntent < Model
3
+
4
+ class PaymentAttempt < Model
5
+ attr_accessor :id, :status, :id_at_gateway, :error_code, :error_text, :created_at, :modified_at
6
+ end
7
+
8
+ attr_accessor :id, :status, :currency_code, :amount, :gateway_account_id, :expires_at, :reference_id,
9
+ :created_at, :modified_at, :customer_id, :gateway, :active_payment_attempt
10
+
11
+ # OPERATIONS
12
+ #-----------
13
+
14
+ def self.create(params, env=nil, headers={})
15
+ Request.send('post', uri_path("payment_intents"), params, env, headers)
16
+ end
17
+
18
+ def self.update(id, params={}, env=nil, headers={})
19
+ Request.send('post', uri_path("payment_intents",id.to_s), params, env, headers)
20
+ end
21
+
22
+ def self.retrieve(id, env=nil, headers={})
23
+ Request.send('get', uri_path("payment_intents",id.to_s), {}, env, headers)
24
+ end
25
+
26
+ end # ~PaymentIntent
27
+ end # ~ChargeBee
@@ -20,11 +20,11 @@ module ChargeBee
20
20
  attr_accessor :id, :name, :invoice_name, :description, :price, :currency_code, :period, :period_unit,
21
21
  :trial_period, :trial_period_unit, :pricing_model, :charge_model, :free_quantity, :setup_cost,
22
22
  :downgrade_penalty, :status, :archived_at, :billing_cycles, :redirect_url, :enabled_in_hosted_pages,
23
- :enabled_in_portal, :addon_applicability, :tax_code, :avalara_sale_type, :avalara_transaction_type,
24
- :avalara_service_type, :sku, :accounting_code, :accounting_category1, :accounting_category2,
25
- :is_shippable, :shipping_frequency_period, :shipping_frequency_period_unit, :resource_version,
26
- :updated_at, :giftable, :claim_url, :invoice_notes, :taxable, :tax_profile_id, :meta_data, :tiers,
27
- :applicable_addons, :attached_addons, :event_based_addons
23
+ :enabled_in_portal, :addon_applicability, :tax_code, :taxjar_product_code, :avalara_sale_type,
24
+ :avalara_transaction_type, :avalara_service_type, :sku, :accounting_code, :accounting_category1,
25
+ :accounting_category2, :is_shippable, :shipping_frequency_period, :shipping_frequency_period_unit,
26
+ :resource_version, :updated_at, :giftable, :claim_url, :invoice_notes, :taxable, :tax_profile_id,
27
+ :meta_data, :tiers, :applicable_addons, :attached_addons, :event_based_addons
28
28
 
29
29
  # OPERATIONS
30
30
  #-----------
@@ -18,7 +18,7 @@ module ChargeBee
18
18
  end
19
19
 
20
20
  class LineItemTax < Model
21
- attr_accessor :line_item_id, :tax_name, :tax_rate, :is_partial_tax_applied, :is_non_compliance_tax, :taxable_amount, :tax_amount, :tax_juris_type, :tax_juris_name, :tax_juris_code
21
+ attr_accessor :line_item_id, :tax_name, :tax_rate, :is_partial_tax_applied, :is_non_compliance_tax, :taxable_amount, :tax_amount, :tax_juris_type, :tax_juris_name, :tax_juris_code, :tax_amount_in_local_currency, :local_currency_code
22
22
  end
23
23
 
24
24
  class ShippingAddress < Model
@@ -29,10 +29,10 @@ module ChargeBee
29
29
  attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
30
30
  end
31
31
 
32
- attr_accessor :id, :po_number, :customer_id, :subscription_id, :status, :operation_type, :vat_number,
33
- :price_type, :valid_till, :date, :sub_total, :total, :credits_applied, :amount_paid, :amount_due,
34
- :resource_version, :updated_at, :currency_code, :line_items, :discounts, :line_item_discounts,
35
- :taxes, :line_item_taxes, :shipping_address, :billing_address
32
+ attr_accessor :id, :name, :po_number, :customer_id, :subscription_id, :invoice_id, :status,
33
+ :operation_type, :vat_number, :price_type, :valid_till, :date, :sub_total, :total, :credits_applied,
34
+ :amount_paid, :amount_due, :resource_version, :updated_at, :currency_code, :line_items, :discounts,
35
+ :line_item_discounts, :taxes, :line_item_taxes, :notes, :shipping_address, :billing_address
36
36
 
37
37
  # OPERATIONS
38
38
  #-----------
@@ -57,8 +57,8 @@ module ChargeBee
57
57
  Request.send_list_request('get', uri_path("quotes"), params, env, headers)
58
58
  end
59
59
 
60
- def self.convert(id, env=nil, headers={})
61
- Request.send('post', uri_path("quotes",id.to_s,"convert"), {}, env, headers)
60
+ def self.convert(id, params={}, env=nil, headers={})
61
+ Request.send('post', uri_path("quotes",id.to_s,"convert"), params, env, headers)
62
62
  end
63
63
 
64
64
  def self.update_status(id, params, env=nil, headers={})
@@ -36,6 +36,10 @@ module ChargeBee
36
36
  Request.send('post', uri_path("transactions",id.to_s,"void"), {}, env, headers)
37
37
  end
38
38
 
39
+ def self.record_refund(id, params, env=nil, headers={})
40
+ Request.send('post', uri_path("transactions",id.to_s,"record_refund"), params, env, headers)
41
+ end
42
+
39
43
  def self.list(params={}, env=nil, headers={})
40
44
  Request.send_list_request('get', uri_path("transactions"), params, env, headers)
41
45
  end
@@ -198,6 +198,12 @@ module ChargeBee
198
198
  return export;
199
199
  end
200
200
 
201
+ def payment_intent()
202
+ payment_intent = get(:payment_intent, PaymentIntent,
203
+ {:payment_attempt => PaymentIntent::PaymentAttempt});
204
+ return payment_intent;
205
+ end
206
+
201
207
 
202
208
  def unbilled_charges()
203
209
  unbilled_charges = get_list(:unbilled_charges, UnbilledCharge,
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.6.7
4
+ version: 2.7.2
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: 2019-07-22 00:00:00.000000000 Z
12
+ date: 2020-01-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
@@ -115,6 +115,7 @@ files:
115
115
  - lib/chargebee/models/invoice_estimate.rb
116
116
  - lib/chargebee/models/model.rb
117
117
  - lib/chargebee/models/order.rb
118
+ - lib/chargebee/models/payment_intent.rb
118
119
  - lib/chargebee/models/payment_source.rb
119
120
  - lib/chargebee/models/plan.rb
120
121
  - lib/chargebee/models/portal_session.rb