chargebee 1.5.2 → 1.5.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d563d1d35b841f75d804390a529921071fc4c632
4
- data.tar.gz: 51130ad57f36a130611b069332730ec985e10894
3
+ metadata.gz: 3a73e12a6ffd11c9a4632132659a393562e5ba70
4
+ data.tar.gz: 9170c3470406d2a8405851340151c3cb51509ec5
5
5
  SHA512:
6
- metadata.gz: 895c2fcd126d98f039afe0fb0fc24bd1fef612e54513e2c82d5c6764a162fe2528cf37cd95e5998e1de9e9ab33f4c5b34aae88e8001b078f017a55649a81659f
7
- data.tar.gz: 01fd9efa26205002846cf02fd56dd8927ff6f7e67adb35b15c50f02e12707bd9f9cc3db21b68a89c4c9477c825d76086592b34f0fb45fe963b70671cef64a2f1
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.2'
8
- s.date = '2015-02-18'
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
@@ -28,7 +28,7 @@ require File.dirname(__FILE__) + '/chargebee/models/download'
28
28
 
29
29
  module ChargeBee
30
30
 
31
- VERSION = '1.5.2'
31
+ VERSION = '1.5.3'
32
32
 
33
33
  @@default_env = nil
34
34
  @@verify_ca_certs = true
@@ -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
- attr_accessor :id, :access_url, :redirect_url, :status, :created_at, :expires_at, :customer_id,
5
- :login_at, :logout_at, :login_ipaddress, :logout_ipaddress
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
@@ -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.2
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-18 00:00:00.000000000 Z
12
+ date: 2015-02-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure