chargebee 1.6.7 → 1.6.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -1
- data/chargebee.gemspec +2 -2
- data/lib/chargebee.rb +1 -1
- data/lib/chargebee/models/customer.rb +17 -1
- data/lib/chargebee/models/estimate.rb +2 -1
- data/lib/chargebee/models/invoice.rb +6 -5
- data/lib/chargebee/result.rb +1 -1
- 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: 438e26887451cb0c0b725d1be6ea8bcf577e35c5
|
4
|
+
data.tar.gz: 30c62e69d8349ce55a9197150caa744cfe5be57d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edc8b02d517e5a87caa6b42e52836397d530ead2088435b0ecbf6da79d6d2cd74d455a7dfff3ede3a159f66873caaf527219d35d53763f7ff93a57a07a822604
|
7
|
+
data.tar.gz: 4571118a36e3a72e3628819bd515ff26696a56ff11d4c6c35b1d6b3cd19d918b2f8ef443459ad95e6d1ba0ee5c15f0bd97b90d4d5938d022218f8e896c1f4bbe
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,26 @@
|
|
1
|
+
### v1.6.8 (2016-02-08)
|
2
|
+
* * *
|
3
|
+
|
4
|
+
** APIs added**:
|
5
|
+
|
6
|
+
Support to add additional contact for a customer. See: https://www.chargebee.com/docs/customers.html#add-contact
|
7
|
+
New api endpoints to add, update and delete 'Contact' are added to Customer resource. See add contact API here: https://apidocs.chargebee.com/docs/api/customers#add_contacts_to_a_customer
|
8
|
+
|
9
|
+
** APIs updated**:
|
10
|
+
|
11
|
+
New attribute 'contacts' with list of contacts is returned as part of Customer resource. See: https://apidocs.chargebee.com/docs/api/customers#customer_attributes
|
12
|
+
|
13
|
+
Support for partial payment. Collect payment for an invoice API now accepts 'amount' paramater. See: https://apidocs.chargebee.com/docs/api/invoices#collect_payment_for_an_invoice
|
14
|
+
|
15
|
+
New attribute 'refundable_credits' is returned as part of Customer resource.
|
16
|
+
|
17
|
+
New attributes 'amount_paid', 'amount_adjusted' & 'credits_applied' are returned as part of Invoice resource. See: https://apidocs.chargebee.com/docs/api/invoices#invoice_attributes
|
18
|
+
|
19
|
+
New attributes 'credits_applied' & 'amount_due' are returned as part of Estimate resource. See: https://apidocs.chargebee.com/docs/api/estimates#estimate_attributes
|
20
|
+
|
21
|
+
New entity type 'credit_note' is added as part of 'entity_type' attribute of Comment resource.
|
22
|
+
See: https://apidocs.chargebee.com/docs/api/comments#comment_attributes
|
23
|
+
|
1
24
|
### v1.6.7 (2015-12-15)
|
2
25
|
* * *
|
3
26
|
|
@@ -20,7 +43,7 @@ See plan attributes here: https://apidocs.chargebee.com/docs/api/plans#plan_attr
|
|
20
43
|
|
21
44
|
** APIs updated**:
|
22
45
|
|
23
|
-
Support for
|
46
|
+
Support for excess payments. See : https://www.chargebee.com/docs/customers.html#excess-payments
|
24
47
|
|
25
48
|
New attribute "excess_payments" is returned as part of Customer resource.
|
26
49
|
See: https://apidocs.chargebee.com/docs/api/customers#customer_attributes
|
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 = '1.6.
|
8
|
-
s.date = '
|
7
|
+
s.version = '1.6.8'
|
8
|
+
s.date = '2016-02-09'
|
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
@@ -5,13 +5,17 @@ module ChargeBee
|
|
5
5
|
attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip
|
6
6
|
end
|
7
7
|
|
8
|
+
class Contact < Model
|
9
|
+
attr_accessor :id, :first_name, :last_name, :email, :phone, :label, :enabled, :send_account_email, :send_billing_email
|
10
|
+
end
|
11
|
+
|
8
12
|
class PaymentMethod < Model
|
9
13
|
attr_accessor :type, :gateway, :status, :reference_id
|
10
14
|
end
|
11
15
|
|
12
16
|
attr_accessor :id, :first_name, :last_name, :email, :phone, :company, :vat_number, :auto_collection,
|
13
17
|
:allow_direct_debit, :created_at, :created_from_ip, :taxability, :card_status, :billing_address,
|
14
|
-
:payment_method, :invoice_notes, :account_credits, :excess_payments
|
18
|
+
:contacts, :payment_method, :invoice_notes, :account_credits, :refundable_credits, :excess_payments
|
15
19
|
|
16
20
|
# OPERATIONS
|
17
21
|
#-----------
|
@@ -40,6 +44,18 @@ module ChargeBee
|
|
40
44
|
Request.send('post', uri_path("customers",id.to_s,"update_billing_info"), params, env, headers)
|
41
45
|
end
|
42
46
|
|
47
|
+
def self.add_contact(id, params, env=nil, headers={})
|
48
|
+
Request.send('post', uri_path("customers",id.to_s,"add_contact"), params, env, headers)
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.update_contact(id, params, env=nil, headers={})
|
52
|
+
Request.send('post', uri_path("customers",id.to_s,"update_contact"), params, env, headers)
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.delete_contact(id, params, env=nil, headers={})
|
56
|
+
Request.send('post', uri_path("customers",id.to_s,"delete_contact"), params, env, headers)
|
57
|
+
end
|
58
|
+
|
43
59
|
def self.add_account_credits(id, params, env=nil, headers={})
|
44
60
|
Request.send('post', uri_path("customers",id.to_s,"add_account_credits"), params, env, headers)
|
45
61
|
end
|
@@ -14,7 +14,8 @@ module ChargeBee
|
|
14
14
|
end
|
15
15
|
|
16
16
|
attr_accessor :created_at, :recurring, :subscription_id, :subscription_status, :term_ends_at,
|
17
|
-
:collect_now, :
|
17
|
+
:collect_now, :price_type, :amount, :credits_applied, :amount_due, :sub_total, :line_items,
|
18
|
+
:discounts, :taxes
|
18
19
|
|
19
20
|
# OPERATIONS
|
20
21
|
#-----------
|
@@ -34,9 +34,10 @@ module ChargeBee
|
|
34
34
|
end
|
35
35
|
|
36
36
|
attr_accessor :id, :po_number, :customer_id, :subscription_id, :recurring, :status, :vat_number,
|
37
|
-
:price_type, :start_date, :end_date, :amount, :
|
38
|
-
:
|
39
|
-
:linked_orders, :notes, :shipping_address,
|
37
|
+
:price_type, :start_date, :end_date, :amount, :amount_paid, :amount_adjusted, :credits_applied,
|
38
|
+
:amount_due, :paid_on, :dunning_status, :next_retry, :sub_total, :tax, :first_invoice, :currency_code,
|
39
|
+
:line_items, :discounts, :taxes, :linked_transactions, :linked_orders, :notes, :shipping_address,
|
40
|
+
:billing_address
|
40
41
|
|
41
42
|
# OPERATIONS
|
42
43
|
#-----------
|
@@ -89,8 +90,8 @@ module ChargeBee
|
|
89
90
|
Request.send('post', uri_path("invoices",id.to_s,"collect"), {}, env, headers)
|
90
91
|
end
|
91
92
|
|
92
|
-
def self.collect_payment(id, env=nil, headers={})
|
93
|
-
Request.send('post', uri_path("invoices",id.to_s,"collect_payment"),
|
93
|
+
def self.collect_payment(id, params={}, env=nil, headers={})
|
94
|
+
Request.send('post', uri_path("invoices",id.to_s,"collect_payment"), params, env, headers)
|
94
95
|
end
|
95
96
|
|
96
97
|
def self.refund(id, params={}, env=nil, headers={})
|
data/lib/chargebee/result.rb
CHANGED
@@ -12,7 +12,7 @@ module ChargeBee
|
|
12
12
|
|
13
13
|
def customer()
|
14
14
|
get(:customer, Customer,
|
15
|
-
{:billing_address => Customer::BillingAddress, :payment_method => Customer::PaymentMethod});
|
15
|
+
{:billing_address => Customer::BillingAddress, :contacts => Customer::Contact, :payment_method => Customer::PaymentMethod});
|
16
16
|
end
|
17
17
|
|
18
18
|
def card()
|
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: 1.6.
|
4
|
+
version: 1.6.8
|
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:
|
12
|
+
date: 2016-02-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json_pure
|