chargebee 1.5.2 → 1.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/chargebee.gemspec +2 -2
- data/lib/chargebee.rb +1 -1
- data/lib/chargebee/models/invoice.rb +13 -1
- data/lib/chargebee/models/portal_session.rb +10 -2
- data/lib/chargebee/result.rb +3 -2
- 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: 3a73e12a6ffd11c9a4632132659a393562e5ba70
|
4
|
+
data.tar.gz: 9170c3470406d2a8405851340151c3cb51509ec5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 632c61b40d6eda7cecd2c8d0c2b6cd84c6df3288e29d068dcc8de3bfabe3cca74b7a7432a3e82da02feba20d5a5a5233f643e998fd1604123a61d117425cbc1b
|
7
|
+
data.tar.gz: 4a53b78cc7f1e3bf62102c1ea361e2cc86f18b2683913a646e312a2f8a74c9cf4da345595aeab19ea2ffc4b07d398200a36ca98d99027478153dad72928823a5
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
### v1.5.3 (2015-02-27)
|
2
|
+
* * *
|
3
|
+
|
4
|
+
** APIs added**:
|
5
|
+
|
6
|
+
A new API "Create an Invoice" added to create one-off invoices with multiple 'Non Recurring' addon & ad-hoc charges for a customer. See https://apidocs.chargebee.com/docs/api/invoices#create_an_invoice.
|
7
|
+
|
8
|
+
A new API called Activate a portal session method(Portal session) added to support building your authentication for your website on top of ChargeBee. See https://apidocs.chargebee.com/docs/api/portal_sessions#activate_a_portal_session. Read about "Using ChargeBee authentication to allow access to your website" at https://apidocs.chargebee.com/docs/api/portal_sessions.
|
9
|
+
|
10
|
+
** APIs updated**:
|
11
|
+
|
12
|
+
Shipping and Billing Address are returned as part of Invoice resource attributes. This returns the shiping & billing address that was present at the time of invoice generation.
|
13
|
+
|
14
|
+
Linked Customers as part of Portal session resource attributes.
|
15
|
+
|
1
16
|
### v1.5.2 (2015-02-18)
|
2
17
|
* * *
|
3
18
|
|
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.5.
|
8
|
-
s.date = '2015-02-
|
7
|
+
s.version = '1.5.3'
|
8
|
+
s.date = '2015-02-27'
|
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
@@ -21,13 +21,25 @@ module ChargeBee
|
|
21
21
|
attr_accessor :id, :status, :reference_id, :fulfillment_status, :batch_id, :created_at
|
22
22
|
end
|
23
23
|
|
24
|
+
class ShippingAddress < Model
|
25
|
+
attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip
|
26
|
+
end
|
27
|
+
|
28
|
+
class BillingAddress < Model
|
29
|
+
attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip
|
30
|
+
end
|
31
|
+
|
24
32
|
attr_accessor :id, :customer_id, :subscription_id, :recurring, :status, :vat_number, :start_date,
|
25
33
|
:end_date, :amount, :paid_on, :next_retry, :sub_total, :tax, :line_items, :discounts, :taxes,
|
26
|
-
:linked_transactions, :linked_orders
|
34
|
+
:linked_transactions, :linked_orders, :shipping_address, :billing_address
|
27
35
|
|
28
36
|
# OPERATIONS
|
29
37
|
#-----------
|
30
38
|
|
39
|
+
def self.create(params, env=nil)
|
40
|
+
Request.send('post', uri_path("invoices"), params, env)
|
41
|
+
end
|
42
|
+
|
31
43
|
def self.charge(params, env=nil)
|
32
44
|
Request.send('post', uri_path("invoices","charge"), params, env)
|
33
45
|
end
|
@@ -1,8 +1,12 @@
|
|
1
1
|
module ChargeBee
|
2
2
|
class PortalSession < Model
|
3
3
|
|
4
|
-
|
5
|
-
|
4
|
+
class LinkedCustomer < Model
|
5
|
+
attr_accessor :customer_id, :email, :has_billing_address, :has_payment_method, :has_active_subscription
|
6
|
+
end
|
7
|
+
|
8
|
+
attr_accessor :id, :token, :access_url, :redirect_url, :status, :created_at, :expires_at, :customer_id,
|
9
|
+
:login_at, :logout_at, :login_ipaddress, :logout_ipaddress, :linked_customers
|
6
10
|
|
7
11
|
# OPERATIONS
|
8
12
|
#-----------
|
@@ -19,5 +23,9 @@ module ChargeBee
|
|
19
23
|
Request.send('post', uri_path("portal_sessions",id.to_s,"logout"), {}, env)
|
20
24
|
end
|
21
25
|
|
26
|
+
def self.activate(id, params, env=nil)
|
27
|
+
Request.send('post', uri_path("portal_sessions",id.to_s,"activate"), params, env)
|
28
|
+
end
|
29
|
+
|
22
30
|
end # ~PortalSession
|
23
31
|
end # ~ChargeBee
|
data/lib/chargebee/result.rb
CHANGED
@@ -21,7 +21,7 @@ module ChargeBee
|
|
21
21
|
|
22
22
|
def invoice()
|
23
23
|
get(:invoice, Invoice,
|
24
|
-
{:line_items => Invoice::LineItem, :discounts => Invoice::Discount, :taxes => Invoice::Tax, :invoice_transactions => Invoice::LinkedTransaction, :orders => Invoice::LinkedOrder});
|
24
|
+
{:line_items => Invoice::LineItem, :discounts => Invoice::Discount, :taxes => Invoice::Tax, :invoice_transactions => Invoice::LinkedTransaction, :orders => Invoice::LinkedOrder, :shipping_address => Invoice::ShippingAddress, :billing_address => Invoice::BillingAddress});
|
25
25
|
end
|
26
26
|
|
27
27
|
def order()
|
@@ -75,7 +75,8 @@ module ChargeBee
|
|
75
75
|
end
|
76
76
|
|
77
77
|
def portal_session()
|
78
|
-
get(:portal_session, PortalSession
|
78
|
+
get(:portal_session, PortalSession,
|
79
|
+
{:linked_customers => PortalSession::LinkedCustomer});
|
79
80
|
end
|
80
81
|
|
81
82
|
|
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.5.
|
4
|
+
version: 1.5.3
|
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: 2015-02-
|
12
|
+
date: 2015-02-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json_pure
|