chargebee 2.6.6 → 2.6.9
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -0
- data/chargebee.gemspec +3 -2
- data/lib/chargebee.rb +3 -1
- data/lib/chargebee/models/card.rb +4 -4
- data/lib/chargebee/models/credit_note.rb +5 -4
- data/lib/chargebee/models/credit_note_estimate.rb +2 -2
- data/lib/chargebee/models/invoice.rb +11 -6
- data/lib/chargebee/models/invoice_estimate.rb +2 -2
- data/lib/chargebee/models/order.rb +1 -1
- data/lib/chargebee/models/payment_intent.rb +27 -0
- data/lib/chargebee/models/payment_source.rb +4 -0
- data/lib/chargebee/models/quote.rb +11 -7
- data/lib/chargebee/models/transaction.rb +5 -4
- data/lib/chargebee/models/virtual_bank_account.rb +3 -2
- data/lib/chargebee/result.rb +12 -5
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8e05624c6552aa867fb277c32c361f8ada1e0d9
|
4
|
+
data.tar.gz: c80be17904301417d2116033c37b55910322f3d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3f468f3c1a005b2a54e0accb38a361d4c25d1629d853356a51b8b450186d5c181dc33053a7b91ca20efd92fb4bb2a372b0faf776b9c943f598462580ae2eb8f
|
7
|
+
data.tar.gz: 64086e385bcba69a8595edad0bb0572712a67e5af89acdbf43f14108e905d0e77621a91c561329e3bdf93ee780c0360bb867a60214855bfad6ddbd22f503c756
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,37 @@
|
|
1
|
+
### v2.6.9 (2019-08-14)
|
2
|
+
* * *
|
3
|
+
|
4
|
+
* New resource payment_intent has been added.
|
5
|
+
* 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 .
|
6
|
+
* New event_types PAYMENT_INTENT_CREATED and PAYMENT_INTENT_UPDATED have been added.
|
7
|
+
|
8
|
+
### v2.6.8 (2019-08-07)
|
9
|
+
* * *
|
10
|
+
|
11
|
+
* 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.
|
12
|
+
* New attributes sub_total_in_local_currency, total_in_local_currency and local_currency_code have been added in credit_note and invoice resources.
|
13
|
+
* 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.
|
14
|
+
* New attributes name, invoice_id and notes have been added in quote resource.
|
15
|
+
* 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.
|
16
|
+
* New input parameters id, auto_collection and po_number have been added in convert_a_quote api.
|
17
|
+
|
18
|
+
### v2.6.7 (2019-07-22)
|
19
|
+
* * *
|
20
|
+
|
21
|
+
* The attribute ref_tx_id has been added in card resource.
|
22
|
+
* The attribute custmer_id has been added in credit_note_estimate and invoice_estimate resource.
|
23
|
+
* 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.
|
24
|
+
* New enum dunning_type has been added.
|
25
|
+
* New value vantiv has been added in the gateway enum.
|
26
|
+
* New value sepa_credit has been added in payment method enum.
|
27
|
+
* The attribute dunning_attempts has been added in invoice resource.
|
28
|
+
* New enpoint create_using_payment_intent has been added in payment_source resouce.
|
29
|
+
* The input parameter reference_transaction has been added in update card payment source API.
|
30
|
+
* New endpoint list quote has been added in qoutes resource.
|
31
|
+
* The attributes initiator_type and three_d_secure have been added in transaction resource.
|
32
|
+
* New attribute scheme has been added in virtual_bank_account resource.
|
33
|
+
* New input parameter scheme has been added in create a virtual bank account using permanent token and create a virtual bank account API.
|
34
|
+
|
1
35
|
### v2.6.6 (2019-07-08)
|
2
36
|
* * *
|
3
37
|
|
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.6.
|
8
|
-
s.date = '2019-
|
7
|
+
s.version = '2.6.9'
|
8
|
+
s.date = '2019-08-14'
|
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
|
data/lib/chargebee.rb
CHANGED
@@ -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.
|
50
|
+
VERSION = '2.6.9'
|
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, :
|
5
|
-
:iin, :last4, :card_type, :funding_type, :expiry_month, :expiry_year, :issuing_country,
|
6
|
-
:billing_addr2, :billing_city, :billing_state_code, :billing_state, :billing_country,
|
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, :
|
39
|
-
:
|
40
|
-
:
|
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
|
#-----------
|
@@ -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, :
|
64
|
-
:
|
65
|
-
:
|
66
|
-
:
|
67
|
-
:
|
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, :amount, :gateway_account_id, :expires_at, :reference_id, :created_at,
|
9
|
+
: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, :
|
33
|
-
:price_type, :valid_till, :date, :sub_total, :total, :credits_applied,
|
34
|
-
:resource_version, :updated_at, :currency_code, :line_items, :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.
|
57
|
-
Request.
|
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, :
|
23
|
-
:
|
24
|
-
:
|
25
|
-
:
|
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
|
#-----------
|
@@ -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,
|
5
|
-
:gateway, :gateway_account_id, :resource_version, :updated_at, :created_at, :reference_id,
|
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
|
#-----------
|
data/lib/chargebee/result.rb
CHANGED
@@ -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.
|
4
|
+
version: 2.6.9
|
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-
|
12
|
+
date: 2019-08-14 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
|