chargebee 2.6.6 → 2.7.1

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: 2caaa7324faa9cd840b2e5141d5f4c835cb4639c
4
- data.tar.gz: 88819266680175a0faaa1cc032323c48ccfff883
3
+ metadata.gz: 10fa49b3ee8ed8dca25b7527359029784a8af56e
4
+ data.tar.gz: 0d6fa392787a961cc2dfe9e505abd48b33b4be50
5
5
  SHA512:
6
- metadata.gz: 921d5beb7c8e8387cba3befeb077deac8f1c8a9033027de2000c91a4c4844fc4be1fa8a64d2c935e8cf0d4b1dc09e82f426875699452a41ac545224356a93fa0
7
- data.tar.gz: 499d68d00d054fd7777158ecdd69885705ecf06e2f884eeda0c8369cccb39597f1ab1f5adb71d98b51bcee21925af10c6c749e8e328a12d12742e4a85ec49bd2
6
+ metadata.gz: 84b5ee5b02234645ce18d23a478b8ad98029d6bbd12344905d93ca9c0df3cef8d0600b74e58624c6f02066ac2146134a85598c315ae8bc00e5dad6f3701454c5
7
+ data.tar.gz: f57cc36bf1f7e9bd6c8774cfb239f84346bbf49bfa4d2e1fc288e3b881ede3fc7de4ebc1132090d9fef6a10c08f7cb494aa7b47d9b0f9319da9d139c28952589
@@ -1,3 +1,53 @@
1
+ ### v2.7.1 (2019-09-13)
2
+ * * *
3
+
4
+ * New endpoints gift_subscription_estimate and create_invoice_estimate have been added in estimate resource.
5
+ * 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.
6
+ * New endpoint record_refund_for_a_payment has been added in transaction resource.
7
+
8
+ ### v2.7.0 (2019-08-27)
9
+ * * *
10
+
11
+ * New attribute client_profile_id has been added in customer resource.
12
+ * 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.
13
+ * New input parameter payment_intent has been added in create_a_gift, create_an_invoice, reactivate_a_subscription and resume_a_subscription api.
14
+ * New input parameter replace_primary_payment_source has been added in create_an_invoice api.
15
+ * New attribute currency_code has been added in payment_intent resource.
16
+
17
+ ### v2.6.9 (2019-08-14)
18
+ * * *
19
+
20
+ * New resource payment_intent has been added.
21
+ * 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 .
22
+ * New event_types PAYMENT_INTENT_CREATED and PAYMENT_INTENT_UPDATED have been added.
23
+
24
+ ### v2.6.8 (2019-08-07)
25
+ * * *
26
+
27
+ * 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.
28
+ * New attributes sub_total_in_local_currency, total_in_local_currency and local_currency_code have been added in credit_note and invoice resources.
29
+ * 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.
30
+ * New attributes name, invoice_id and notes have been added in quote resource.
31
+ * 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.
32
+ * New input parameters id, auto_collection and po_number have been added in convert_a_quote api.
33
+
34
+ ### v2.6.7 (2019-07-22)
35
+ * * *
36
+
37
+ * The attribute ref_tx_id has been added in card resource.
38
+ * The attribute custmer_id has been added in credit_note_estimate and invoice_estimate resource.
39
+ * The input parameters payment_intent with gateway_account_id and gw_token have been added in create a customer, collect payment for customer, create subscription and create subscription for customer API.
40
+ * New enum dunning_type has been added.
41
+ * New value vantiv has been added in the gateway enum.
42
+ * New value sepa_credit has been added in payment method enum.
43
+ * The attribute dunning_attempts has been added in invoice resource.
44
+ * New enpoint create_using_payment_intent has been added in payment_source resouce.
45
+ * The input parameter reference_transaction has been added in update card payment source API.
46
+ * New endpoint list quote has been added in qoutes resource.
47
+ * The attributes initiator_type and three_d_secure have been added in transaction resource.
48
+ * New attribute scheme has been added in virtual_bank_account resource.
49
+ * New input parameter scheme has been added in create a virtual bank account using permanent token and create a virtual bank account API.
50
+
1
51
  ### v2.6.6 (2019-07-08)
2
52
  * * *
3
53
 
@@ -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.6'
8
- s.date = '2019-07-08'
7
+ s.version = '2.7.1'
8
+ s.date = '2019-09-13'
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.6'
50
+ VERSION = '2.7.1'
49
51
 
50
52
  @@default_env = nil
51
53
  @@verify_ca_certs = true
@@ -1,10 +1,10 @@
1
1
  module ChargeBee
2
2
  class Card < Model
3
3
 
4
- attr_accessor :payment_source_id, :status, :gateway, :gateway_account_id, :first_name, :last_name,
5
- :iin, :last4, :card_type, :funding_type, :expiry_month, :expiry_year, :issuing_country, :billing_addr1,
6
- :billing_addr2, :billing_city, :billing_state_code, :billing_state, :billing_country, :billing_zip,
7
- :created_at, :resource_version, :updated_at, :ip_address, :customer_id, :masked_number
4
+ attr_accessor :payment_source_id, :status, :gateway, :gateway_account_id, :ref_tx_id, :first_name,
5
+ :last_name, :iin, :last4, :card_type, :funding_type, :expiry_month, :expiry_year, :issuing_country,
6
+ :billing_addr1, :billing_addr2, :billing_city, :billing_state_code, :billing_state, :billing_country,
7
+ :billing_zip, :created_at, :resource_version, :updated_at, :ip_address, :customer_id, :masked_number
8
8
 
9
9
  # OPERATIONS
10
10
  #-----------
@@ -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
@@ -27,7 +27,7 @@ module ChargeBee
27
27
 
28
28
  attr_accessor :reference_invoice_id, :type, :price_type, :currency_code, :sub_total, :total,
29
29
  :amount_allocated, :amount_available, :line_items, :discounts, :taxes, :line_item_taxes, :line_item_discounts,
30
- :line_item_tiers, :round_off_amount
30
+ :line_item_tiers, :round_off_amount, :customer_id
31
31
 
32
32
  # OPERATIONS
33
33
  #-----------
@@ -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
@@ -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
@@ -29,6 +29,10 @@ module ChargeBee
29
29
  attr_accessor :txn_id, :applied_amount, :applied_at, :txn_status, :txn_date, :txn_amount
30
30
  end
31
31
 
32
+ class DunningAttempt < Model
33
+ attr_accessor :attempt, :transaction_id, :dunning_type, :created_at, :txn_status, :txn_amount
34
+ end
35
+
32
36
  class AppliedCredit < Model
33
37
  attr_accessor :cn_id, :applied_amount, :applied_at, :cn_reason_code, :cn_date, :cn_status
34
38
  end
@@ -60,11 +64,12 @@ module ChargeBee
60
64
  attr_accessor :id, :po_number, :customer_id, :subscription_id, :recurring, :status, :vat_number,
61
65
  :price_type, :date, :due_date, :net_term_days, :currency_code, :total, :amount_paid, :amount_adjusted,
62
66
  :write_off_amount, :credits_applied, :amount_due, :paid_at, :dunning_status, :next_retry_at,
63
- :voided_at, :resource_version, :updated_at, :sub_total, :tax, :first_invoice, :has_advance_charges,
64
- :term_finalized, :is_gifted, :expected_payment_date, :amount_to_collect, :round_off_amount,
65
- :line_items, :discounts, :line_item_discounts, :taxes, :line_item_taxes, :line_item_tiers, :linked_payments,
66
- :applied_credits, :adjustment_credit_notes, :issued_credit_notes, :linked_orders, :notes, :shipping_address,
67
- :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
68
73
 
69
74
  # OPERATIONS
70
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
@@ -27,7 +27,7 @@ module ChargeBee
27
27
 
28
28
  attr_accessor :recurring, :price_type, :currency_code, :sub_total, :total, :credits_applied,
29
29
  :amount_paid, :amount_due, :line_items, :discounts, :taxes, :line_item_taxes, :line_item_tiers,
30
- :line_item_discounts, :round_off_amount
30
+ :line_item_discounts, :round_off_amount, :customer_id
31
31
 
32
32
  # OPERATIONS
33
33
  #-----------
@@ -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
@@ -36,6 +36,10 @@ module ChargeBee
36
36
  Request.send('post', uri_path("payment_sources","create_using_token"), params, env, headers)
37
37
  end
38
38
 
39
+ def self.create_using_payment_intent(params, env=nil, headers={})
40
+ Request.send('post', uri_path("payment_sources","create_using_payment_intent"), params, env, headers)
41
+ end
42
+
39
43
  def self.create_card(params, env=nil, headers={})
40
44
  Request.send('post', uri_path("payment_sources","create_card"), params, env, headers)
41
45
  end
@@ -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
  #-----------
@@ -53,8 +53,12 @@ module ChargeBee
53
53
  Request.send('post', uri_path("quotes","create_for_onetime_charges"), params, env, headers)
54
54
  end
55
55
 
56
- def self.convert(id, env=nil, headers={})
57
- Request.send('post', uri_path("quotes",id.to_s,"convert"), {}, env, headers)
56
+ def self.list(params={}, env=nil, headers={})
57
+ Request.send_list_request('get', uri_path("quotes"), params, env, headers)
58
+ end
59
+
60
+ def self.convert(id, params={}, env=nil, headers={})
61
+ Request.send('post', uri_path("quotes",id.to_s,"convert"), params, env, headers)
58
62
  end
59
63
 
60
64
  def self.update_status(id, params, env=nil, headers={})
@@ -19,10 +19,11 @@ module ChargeBee
19
19
 
20
20
  attr_accessor :id, :customer_id, :subscription_id, :gateway_account_id, :payment_source_id,
21
21
  :payment_method, :reference_number, :gateway, :type, :date, :settled_at, :currency_code, :amount,
22
- :id_at_gateway, :status, :fraud_flag, :authorization_reason, :error_code, :error_text, :voided_at,
23
- :resource_version, :updated_at, :fraud_reason, :amount_unused, :masked_card_number, :reference_transaction_id,
24
- :refunded_txn_id, :reference_authorization_id, :amount_capturable, :reversal_transaction_id,
25
- :linked_invoices, :linked_credit_notes, :linked_refunds, :linked_payments, :deleted
22
+ :id_at_gateway, :status, :fraud_flag, :initiator_type, :three_d_secure, :authorization_reason,
23
+ :error_code, :error_text, :voided_at, :resource_version, :updated_at, :fraud_reason, :amount_unused,
24
+ :masked_card_number, :reference_transaction_id, :refunded_txn_id, :reference_authorization_id,
25
+ :amount_capturable, :reversal_transaction_id, :linked_invoices, :linked_credit_notes, :linked_refunds,
26
+ :linked_payments, :deleted
26
27
 
27
28
  # OPERATIONS
28
29
  #-----------
@@ -35,6 +36,10 @@ module ChargeBee
35
36
  Request.send('post', uri_path("transactions",id.to_s,"void"), {}, env, headers)
36
37
  end
37
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
+
38
43
  def self.list(params={}, env=nil, headers={})
39
44
  Request.send_list_request('get', uri_path("transactions"), params, env, headers)
40
45
  end
@@ -1,8 +1,9 @@
1
1
  module ChargeBee
2
2
  class VirtualBankAccount < Model
3
3
 
4
- attr_accessor :id, :customer_id, :email, :bank_name, :account_number, :routing_number, :swift_code,
5
- :gateway, :gateway_account_id, :resource_version, :updated_at, :created_at, :reference_id, :deleted
4
+ attr_accessor :id, :customer_id, :email, :scheme, :bank_name, :account_number, :routing_number,
5
+ :swift_code, :gateway, :gateway_account_id, :resource_version, :updated_at, :created_at, :reference_id,
6
+ :deleted
6
7
 
7
8
  # OPERATIONS
8
9
  #-----------
@@ -60,7 +60,7 @@ module ChargeBee
60
60
 
61
61
  def invoice()
62
62
  invoice = get(:invoice, Invoice,
63
- {:line_items => Invoice::LineItem, :discounts => Invoice::Discount, :line_item_discounts => Invoice::LineItemDiscount, :taxes => Invoice::Tax, :line_item_taxes => Invoice::LineItemTax, :line_item_tiers => Invoice::LineItemTier, :linked_payments => Invoice::LinkedPayment, :applied_credits => Invoice::AppliedCredit, :adjustment_credit_notes => Invoice::AdjustmentCreditNote, :issued_credit_notes => Invoice::IssuedCreditNote, :linked_orders => Invoice::LinkedOrder, :notes => Invoice::Note, :shipping_address => Invoice::ShippingAddress, :billing_address => Invoice::BillingAddress});
63
+ {:line_items => Invoice::LineItem, :discounts => Invoice::Discount, :line_item_discounts => Invoice::LineItemDiscount, :taxes => Invoice::Tax, :line_item_taxes => Invoice::LineItemTax, :line_item_tiers => Invoice::LineItemTier, :linked_payments => Invoice::LinkedPayment, :dunning_attempts => Invoice::DunningAttempt, :applied_credits => Invoice::AppliedCredit, :adjustment_credit_notes => Invoice::AdjustmentCreditNote, :issued_credit_notes => Invoice::IssuedCreditNote, :linked_orders => Invoice::LinkedOrder, :notes => Invoice::Note, :shipping_address => Invoice::ShippingAddress, :billing_address => Invoice::BillingAddress});
64
64
  return invoice;
65
65
  end
66
66
 
@@ -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,
@@ -219,13 +225,10 @@ module ChargeBee
219
225
 
220
226
  def invoices()
221
227
  invoices = get_list(:invoices, Invoice,
222
- {:line_items => Invoice::LineItem, :discounts => Invoice::Discount, :line_item_discounts => Invoice::LineItemDiscount, :taxes => Invoice::Tax, :line_item_taxes => Invoice::LineItemTax, :line_item_tiers => Invoice::LineItemTier, :linked_payments => Invoice::LinkedPayment, :applied_credits => Invoice::AppliedCredit, :adjustment_credit_notes => Invoice::AdjustmentCreditNote, :issued_credit_notes => Invoice::IssuedCreditNote, :linked_orders => Invoice::LinkedOrder, :notes => Invoice::Note, :shipping_address => Invoice::ShippingAddress, :billing_address => Invoice::BillingAddress});
228
+ {:line_items => Invoice::LineItem, :discounts => Invoice::Discount, :line_item_discounts => Invoice::LineItemDiscount, :taxes => Invoice::Tax, :line_item_taxes => Invoice::LineItemTax, :line_item_tiers => Invoice::LineItemTier, :linked_payments => Invoice::LinkedPayment, :dunning_attempts => Invoice::DunningAttempt, :applied_credits => Invoice::AppliedCredit, :adjustment_credit_notes => Invoice::AdjustmentCreditNote, :issued_credit_notes => Invoice::IssuedCreditNote, :linked_orders => Invoice::LinkedOrder, :notes => Invoice::Note, :shipping_address => Invoice::ShippingAddress, :billing_address => Invoice::BillingAddress});
223
229
  return invoices;
224
230
  end
225
231
 
226
- def to_s(*args)
227
- JSON.pretty_generate(@response)
228
- end
229
232
 
230
233
  private
231
234
  def get_list(type, klass, sub_types = {}, dependant_types = {}, dependant_sub_types = {})
@@ -251,5 +254,9 @@ module ChargeBee
251
254
  return klass.construct(@response[type], sub_types, dependant_types)
252
255
  end
253
256
 
257
+ def to_s(*args)
258
+ JSON.pretty_generate(@response)
259
+ end
260
+
254
261
  end
255
262
  end
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.6
4
+ version: 2.7.1
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-08 00:00:00.000000000 Z
12
+ date: 2019-09-13 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