chargebee 2.2.6 → 2.2.7
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 +25 -0
- data/chargebee.gemspec +2 -2
- data/lib/chargebee.rb +1 -1
- data/lib/chargebee/models/credit_note.rb +5 -1
- data/lib/chargebee/models/credit_note_estimate.rb +5 -1
- data/lib/chargebee/models/hosted_page.rb +9 -1
- data/lib/chargebee/models/invoice.rb +7 -2
- data/lib/chargebee/models/invoice_estimate.rb +5 -1
- data/lib/chargebee/result.rb +6 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ebed03245dd17530f4ec612fbddf23d80d2d4fc
|
4
|
+
data.tar.gz: 976c09f5771072a4c2557ac437b8cb4f14f957ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26e094bee8119d88b4def5bf34d58718d2367f86720b4e4939d3465650a99174e5461e68b1f69cc3d004049a818fe04ef763517f1c332031de7d8daadde21f3c
|
7
|
+
data.tar.gz: 29b1dc06022f263ad0eb7d753d35895a61a157e4a4252a9caae457f4cb321e0dd5ab8166e43ab8bbe921c530e832182e2dc566cabb7c3470f42fd2eb3595743d
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,28 @@
|
|
1
|
+
###v2.2.7 (2017-04-19)
|
2
|
+
* * *
|
3
|
+
|
4
|
+
** APIs added**:
|
5
|
+
The endpoints 'List' and 'Acknowledge' APIs have been added to the Hosted page resource.
|
6
|
+
See : https://apidocs.chargebee.com/docs/api/hosted_pages
|
7
|
+
|
8
|
+
** APIs updated**:
|
9
|
+
A new subresource 'line_item_discounts' has been added to the Invoice, Credit note, Invoice estimates and Credit note estimates resources.
|
10
|
+
See : https://apidocs.chargebee.com/docs/api/invoices#invoice_attributes
|
11
|
+
|
12
|
+
The Card statuses 'pending_verification' and 'invalid' have been added to the Customer resource.
|
13
|
+
See : https://apidocs.chargebee.com/docs/api/customers#customer_attributes
|
14
|
+
|
15
|
+
The Payment Method types 'generic', 'alipay' and 'unionpay' have been added to the Payment Method type in the Customer resource.
|
16
|
+
See : https://apidocs.chargebee.com/docs/api/customers#customer_attributes
|
17
|
+
|
18
|
+
The state 'failed' and the attribute 'failure_reason' have been deprecated in the Hosted Page resource.
|
19
|
+
|
20
|
+
The attribues 'updated_at', 'resource_version' and 'checkout_info' have been added.
|
21
|
+
See : https://apidocs.chargebee.com/docs/api/hosted_pages#hosted_page_attributes
|
22
|
+
|
23
|
+
A new gateway 'adyen' has been added.
|
24
|
+
See : https://apidocs.chargebee.com/docs/api/cards#card_attributes
|
25
|
+
|
1
26
|
###v2.2.6 (2017-03-16)
|
2
27
|
* * *
|
3
28
|
|
data/chargebee.gemspec
CHANGED
@@ -4,8 +4,8 @@ Gem::Specification.new do |s|
|
|
4
4
|
s.rubygems_version = '1.3.5'
|
5
5
|
|
6
6
|
s.name = 'chargebee'
|
7
|
-
s.version = '2.2.
|
8
|
-
s.date = '2017-
|
7
|
+
s.version = '2.2.7'
|
8
|
+
s.date = '2017-04-19'
|
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."
|
data/lib/chargebee.rb
CHANGED
@@ -9,6 +9,10 @@ module ChargeBee
|
|
9
9
|
attr_accessor :amount, :description, :entity_type, :entity_id
|
10
10
|
end
|
11
11
|
|
12
|
+
class LineItemDiscount < Model
|
13
|
+
attr_accessor :line_item_id, :discount_type, :coupon_id, :discount_amount
|
14
|
+
end
|
15
|
+
|
12
16
|
class Tax < Model
|
13
17
|
attr_accessor :name, :amount, :description
|
14
18
|
end
|
@@ -28,7 +32,7 @@ module ChargeBee
|
|
28
32
|
attr_accessor :id, :customer_id, :subscription_id, :reference_invoice_id, :type, :reason_code,
|
29
33
|
:status, :vat_number, :date, :price_type, :currency_code, :total, :amount_allocated, :amount_refunded,
|
30
34
|
:amount_available, :refunded_at, :voided_at, :resource_version, :updated_at, :sub_total, :line_items,
|
31
|
-
:discounts, :taxes, :line_item_taxes, :linked_refunds, :allocations, :deleted
|
35
|
+
:discounts, :line_item_discounts, :taxes, :line_item_taxes, :linked_refunds, :allocations, :deleted
|
32
36
|
|
33
37
|
# OPERATIONS
|
34
38
|
#-----------
|
@@ -17,8 +17,12 @@ module ChargeBee
|
|
17
17
|
attr_accessor :line_item_id, :tax_name, :tax_rate, :tax_amount, :tax_juris_type, :tax_juris_name, :tax_juris_code
|
18
18
|
end
|
19
19
|
|
20
|
+
class LineItemDiscount < Model
|
21
|
+
attr_accessor :line_item_id, :discount_type, :coupon_id, :discount_amount
|
22
|
+
end
|
23
|
+
|
20
24
|
attr_accessor :reference_invoice_id, :type, :price_type, :currency_code, :sub_total, :total,
|
21
|
-
:amount_allocated, :amount_available, :line_items, :discounts, :taxes, :line_item_taxes
|
25
|
+
:amount_allocated, :amount_available, :line_items, :discounts, :taxes, :line_item_taxes, :line_item_discounts
|
22
26
|
|
23
27
|
# OPERATIONS
|
24
28
|
#-----------
|
@@ -2,7 +2,7 @@ module ChargeBee
|
|
2
2
|
class HostedPage < Model
|
3
3
|
|
4
4
|
attr_accessor :id, :type, :url, :state, :failure_reason, :pass_thru_content, :embed, :created_at,
|
5
|
-
:expires_at
|
5
|
+
:expires_at, :updated_at, :resource_version, :checkout_info
|
6
6
|
|
7
7
|
class Content < Result
|
8
8
|
end
|
@@ -34,9 +34,17 @@ module ChargeBee
|
|
34
34
|
Request.send('post', uri_path("hosted_pages","update_payment_method"), params, env, headers)
|
35
35
|
end
|
36
36
|
|
37
|
+
def self.acknowledge(id, env=nil, headers={})
|
38
|
+
Request.send('post', uri_path("hosted_pages",id.to_s,"acknowledge"), {}, env, headers)
|
39
|
+
end
|
40
|
+
|
37
41
|
def self.retrieve(id, env=nil, headers={})
|
38
42
|
Request.send('get', uri_path("hosted_pages",id.to_s), {}, env, headers)
|
39
43
|
end
|
40
44
|
|
45
|
+
def self.list(params={}, env=nil, headers={})
|
46
|
+
Request.send_list_request('get', uri_path("hosted_pages"), params, env, headers)
|
47
|
+
end
|
48
|
+
|
41
49
|
end # ~HostedPage
|
42
50
|
end # ~ChargeBee
|
@@ -9,6 +9,10 @@ module ChargeBee
|
|
9
9
|
attr_accessor :amount, :description, :entity_type, :entity_id
|
10
10
|
end
|
11
11
|
|
12
|
+
class LineItemDiscount < Model
|
13
|
+
attr_accessor :line_item_id, :discount_type, :coupon_id, :discount_amount
|
14
|
+
end
|
15
|
+
|
12
16
|
class Tax < Model
|
13
17
|
attr_accessor :name, :amount, :description
|
14
18
|
end
|
@@ -53,8 +57,9 @@ module ChargeBee
|
|
53
57
|
:price_type, :date, :due_date, :net_term_days, :currency_code, :total, :amount_paid, :amount_adjusted,
|
54
58
|
:write_off_amount, :credits_applied, :amount_due, :paid_at, :dunning_status, :next_retry_at,
|
55
59
|
:voided_at, :resource_version, :updated_at, :sub_total, :tax, :first_invoice, :has_advance_charges,
|
56
|
-
:line_items, :discounts, :taxes, :line_item_taxes, :linked_payments, :applied_credits,
|
57
|
-
:issued_credit_notes, :linked_orders, :notes, :shipping_address, :billing_address,
|
60
|
+
:line_items, :discounts, :line_item_discounts, :taxes, :line_item_taxes, :linked_payments, :applied_credits,
|
61
|
+
:adjustment_credit_notes, :issued_credit_notes, :linked_orders, :notes, :shipping_address, :billing_address,
|
62
|
+
:deleted
|
58
63
|
|
59
64
|
# OPERATIONS
|
60
65
|
#-----------
|
@@ -17,8 +17,12 @@ module ChargeBee
|
|
17
17
|
attr_accessor :line_item_id, :tax_name, :tax_rate, :tax_amount, :tax_juris_type, :tax_juris_name, :tax_juris_code
|
18
18
|
end
|
19
19
|
|
20
|
+
class LineItemDiscount < Model
|
21
|
+
attr_accessor :line_item_id, :discount_type, :coupon_id, :discount_amount
|
22
|
+
end
|
23
|
+
|
20
24
|
attr_accessor :recurring, :price_type, :currency_code, :sub_total, :total, :credits_applied,
|
21
|
-
:amount_paid, :amount_due, :line_items, :discounts, :taxes, :line_item_taxes
|
25
|
+
:amount_paid, :amount_due, :line_items, :discounts, :taxes, :line_item_taxes, :line_item_discounts
|
22
26
|
|
23
27
|
# OPERATIONS
|
24
28
|
#-----------
|
data/lib/chargebee/result.rb
CHANGED
@@ -29,13 +29,13 @@ module ChargeBee
|
|
29
29
|
|
30
30
|
def invoice()
|
31
31
|
invoice = get(:invoice, Invoice,
|
32
|
-
{:line_items => Invoice::LineItem, :discounts => Invoice::Discount, :taxes => Invoice::Tax, :line_item_taxes => Invoice::LineItemTax, :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});
|
32
|
+
{:line_items => Invoice::LineItem, :discounts => Invoice::Discount, :line_item_discounts => Invoice::LineItemDiscount, :taxes => Invoice::Tax, :line_item_taxes => Invoice::LineItemTax, :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});
|
33
33
|
return invoice;
|
34
34
|
end
|
35
35
|
|
36
36
|
def credit_note()
|
37
37
|
credit_note = get(:credit_note, CreditNote,
|
38
|
-
{:line_items => CreditNote::LineItem, :discounts => CreditNote::Discount, :taxes => CreditNote::Tax, :line_item_taxes => CreditNote::LineItemTax, :linked_refunds => CreditNote::LinkedRefund, :allocations => CreditNote::Allocation});
|
38
|
+
{:line_items => CreditNote::LineItem, :discounts => CreditNote::Discount, :line_item_discounts => CreditNote::LineItemDiscount, :taxes => CreditNote::Tax, :line_item_taxes => CreditNote::LineItemTax, :linked_refunds => CreditNote::LinkedRefund, :allocations => CreditNote::Allocation});
|
39
39
|
return credit_note;
|
40
40
|
end
|
41
41
|
|
@@ -61,11 +61,11 @@ module ChargeBee
|
|
61
61
|
estimate.init_dependant(@response[:estimate], :subscription_estimate,
|
62
62
|
{:shipping_address => SubscriptionEstimate::ShippingAddress});
|
63
63
|
estimate.init_dependant(@response[:estimate], :invoice_estimate,
|
64
|
-
{:line_items => InvoiceEstimate::LineItem, :discounts => InvoiceEstimate::Discount, :taxes => InvoiceEstimate::Tax, :line_item_taxes => InvoiceEstimate::LineItemTax});
|
64
|
+
{:line_items => InvoiceEstimate::LineItem, :discounts => InvoiceEstimate::Discount, :taxes => InvoiceEstimate::Tax, :line_item_taxes => InvoiceEstimate::LineItemTax, :line_item_discounts => InvoiceEstimate::LineItemDiscount});
|
65
65
|
estimate.init_dependant(@response[:estimate], :next_invoice_estimate,
|
66
|
-
{:line_items => InvoiceEstimate::LineItem, :discounts => InvoiceEstimate::Discount, :taxes => InvoiceEstimate::Tax, :line_item_taxes => InvoiceEstimate::LineItemTax});
|
66
|
+
{:line_items => InvoiceEstimate::LineItem, :discounts => InvoiceEstimate::Discount, :taxes => InvoiceEstimate::Tax, :line_item_taxes => InvoiceEstimate::LineItemTax, :line_item_discounts => InvoiceEstimate::LineItemDiscount});
|
67
67
|
estimate.init_dependant_list(@response[:estimate], :credit_note_estimates,
|
68
|
-
{:line_items => CreditNoteEstimate::LineItem, :discounts => CreditNoteEstimate::Discount, :taxes => CreditNoteEstimate::Tax, :line_item_taxes => CreditNoteEstimate::LineItemTax});
|
68
|
+
{:line_items => CreditNoteEstimate::LineItem, :discounts => CreditNoteEstimate::Discount, :taxes => CreditNoteEstimate::Tax, :line_item_taxes => CreditNoteEstimate::LineItemTax, :line_item_discounts => CreditNoteEstimate::LineItemDiscount});
|
69
69
|
return estimate;
|
70
70
|
end
|
71
71
|
|
@@ -129,7 +129,7 @@ module ChargeBee
|
|
129
129
|
|
130
130
|
def credit_notes()
|
131
131
|
credit_notes = get_list(:credit_notes, CreditNote,
|
132
|
-
{:line_items => CreditNote::LineItem, :discounts => CreditNote::Discount, :taxes => CreditNote::Tax, :line_item_taxes => CreditNote::LineItemTax, :linked_refunds => CreditNote::LinkedRefund, :allocations => CreditNote::Allocation});
|
132
|
+
{:line_items => CreditNote::LineItem, :discounts => CreditNote::Discount, :line_item_discounts => CreditNote::LineItemDiscount, :taxes => CreditNote::Tax, :line_item_taxes => CreditNote::LineItemTax, :linked_refunds => CreditNote::LinkedRefund, :allocations => CreditNote::Allocation});
|
133
133
|
return credit_notes;
|
134
134
|
end
|
135
135
|
|
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.2.
|
4
|
+
version: 2.2.7
|
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: 2017-
|
12
|
+
date: 2017-04-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json_pure
|