chargebee 1.4.9 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 582226d9416ce94e7efd012ffe95bc1fb7734038
4
- data.tar.gz: 0957b090094d02eba05f923cb0f0caefb7bfd07a
3
+ metadata.gz: 844bc2ff90cfbf1782158c357bf4d7d065875ff4
4
+ data.tar.gz: 59a9eff7f8de51672b1f447648c04acc341b9b0d
5
5
  SHA512:
6
- metadata.gz: fec13fb5b8993973a4a98761eb447757aafdcce9769668fbdb50843631f4c4f4d3bdf21dfd52d3eb0bba5789046c8ec61985402cfd644cf7ca477b02ccbec9e3
7
- data.tar.gz: 84a9f6c027f1dcebad3779e0e5f6ce4b60e29b5f9c9112978323d38157e8041beb8e6aee2d2bb025fc132d83531bf52f75571876cd78d76679e61a13aa27d383
6
+ metadata.gz: 7a4dc8da4b147d8108562eb28468444fbc4ee92615cfe3cf020cf921c93c6c8bd88c3d2fb5dc94f79c5be0cab1f6075269d0d6af8543105af21b8f67d66937ba
7
+ data.tar.gz: bcfddbabaa68d630772ccc27fa510a29190cef5ba2c516be15ac9e5e3a1f8698d2168697959940c89fdb360cc5b923d67b3b9703a535ec15bba875ef6b18b4c8
@@ -1,3 +1,13 @@
1
+ ### v1.5.0 (2014-12-02)
2
+ * * *
3
+
4
+ **APIs added**:
5
+ A new resource called Order is introduced. This can be used for integrating ChargeBee with any shipping/order management application (like ShipStation). Orders are not automatically generated or updated by ChargeBee currently. They have to be created/updated either via api or merchant web console (a.k.a admin console). An order can be created against an invoice irrespective of the status of the invoice and an invoice can have multiple orders associated with it.
6
+ See https://apidocs.chargebee.com/docs/api/orders?lang=ruby for details.
7
+
8
+ **API Updates**:
9
+ Ability to filter Invoices with paid_on_after parameter. See https://apidocs.chargebee.com/docs/api/invoices?lang=ruby#list_invoices.
10
+
1
11
  ### v1.4.9 (2014-11-24)
2
12
  * * *
3
13
 
data/Rakefile CHANGED
@@ -89,14 +89,14 @@ end
89
89
 
90
90
  desc "Create tag v#{version} and build and push #{gem_file} to Rubygems"
91
91
  task :release => :build do
92
- # unless `git branch` =~ /^\* master$/
93
- # puts "You must be on the master branch to release!"
94
- # exit!
95
- # end
96
- # sh "git commit --allow-empty -a -m 'Release #{version}'"
97
- # sh "git tag v#{version}"
98
- # sh "git push origin master"
99
- # sh "git push origin v#{version}"
92
+ unless `git branch` =~ /^\* master$/
93
+ puts "You must be on the master branch to release!"
94
+ exit!
95
+ end
96
+ sh "git commit --allow-empty -a -m 'Release #{version}'"
97
+ sh "git tag v#{version}"
98
+ sh "git push origin master"
99
+ sh "git push origin v#{version}"
100
100
  sh "gem push pkg/#{name}-#{version}.gem"
101
101
  end
102
102
 
@@ -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.4.9'
8
- s.date = '2014-11-26'
7
+ s.version = '1.5.0'
8
+ s.date = '2014-12-02'
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."
@@ -50,6 +50,7 @@ Gem::Specification.new do |s|
50
50
  lib/chargebee/models/hosted_page.rb
51
51
  lib/chargebee/models/invoice.rb
52
52
  lib/chargebee/models/model.rb
53
+ lib/chargebee/models/order.rb
53
54
  lib/chargebee/models/plan.rb
54
55
  lib/chargebee/models/portal_session.rb
55
56
  lib/chargebee/models/subscription.rb
@@ -14,6 +14,7 @@ require File.dirname(__FILE__) + '/chargebee/models/card'
14
14
  require File.dirname(__FILE__) + '/chargebee/models/address'
15
15
  require File.dirname(__FILE__) + '/chargebee/models/transaction'
16
16
  require File.dirname(__FILE__) + '/chargebee/models/invoice'
17
+ require File.dirname(__FILE__) + '/chargebee/models/order'
17
18
  require File.dirname(__FILE__) + '/chargebee/models/estimate'
18
19
  require File.dirname(__FILE__) + '/chargebee/models/hosted_page'
19
20
  require File.dirname(__FILE__) + '/chargebee/models/event'
@@ -27,7 +28,7 @@ require File.dirname(__FILE__) + '/chargebee/models/download'
27
28
 
28
29
  module ChargeBee
29
30
 
30
- VERSION = '1.4.9'
31
+ VERSION = '1.5.0'
31
32
 
32
33
  @@default_env = nil
33
34
  @@verify_ca_certs = true
@@ -32,4 +32,4 @@ module ChargeBee
32
32
  end
33
33
 
34
34
  end # ~Event
35
- end # ~ChargeBee
35
+ end # ~ChargeBee
@@ -17,9 +17,13 @@ module ChargeBee
17
17
  attr_accessor :txn_id, :applied_amount, :txn_type, :txn_status, :txn_date, :txn_amount
18
18
  end
19
19
 
20
+ class LinkedOrder < Model
21
+ attr_accessor :id, :invoice_id, :status, :reference_id, :fulfillment_status, :note, :tracking_id, :batch_id, :created_by, :created_at, :status_update_at
22
+ end
23
+
20
24
  attr_accessor :id, :customer_id, :subscription_id, :recurring, :status, :vat_number, :start_date,
21
25
  :end_date, :amount, :paid_on, :next_retry, :sub_total, :tax, :line_items, :discounts, :taxes,
22
- :linked_transactions
26
+ :linked_transactions, :linked_orders
23
27
 
24
28
  # OPERATIONS
25
29
  #-----------
@@ -0,0 +1,31 @@
1
+ module ChargeBee
2
+ class Order < Model
3
+
4
+ attr_accessor :id, :invoice_id, :status, :reference_id, :fulfillment_status, :note, :tracking_id,
5
+ :batch_id, :created_by, :created_at, :status_update_at
6
+
7
+ # OPERATIONS
8
+ #-----------
9
+
10
+ def self.create(params, env=nil)
11
+ Request.send('post', uri_path("orders"), params, env)
12
+ end
13
+
14
+ def self.update(id, params={}, env=nil)
15
+ Request.send('post', uri_path("orders",id.to_s), params, env)
16
+ end
17
+
18
+ def self.retrieve(id, env=nil)
19
+ Request.send('get', uri_path("orders",id.to_s), {}, env)
20
+ end
21
+
22
+ def self.list(params={}, env=nil)
23
+ Request.send('get', uri_path("orders"), params, env)
24
+ end
25
+
26
+ def self.orders_for_invoice(id, params={}, env=nil)
27
+ Request.send('get', uri_path("invoices",id.to_s,"orders"), params, env)
28
+ end
29
+
30
+ end # ~Order
31
+ end # ~ChargeBee
@@ -21,7 +21,11 @@ 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});
24
+ {:line_items => Invoice::LineItem, :discounts => Invoice::Discount, :taxes => Invoice::Tax, :invoice_transactions => Invoice::LinkedTransaction, :orders => Invoice::LinkedOrder});
25
+ end
26
+
27
+ def order()
28
+ get(:order, Order);
25
29
  end
26
30
 
27
31
  def transaction()
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.4.9
4
+ version: 1.5.0
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: 2014-11-26 00:00:00.000000000 Z
12
+ date: 2014-12-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
@@ -99,6 +99,7 @@ files:
99
99
  - lib/chargebee/models/hosted_page.rb
100
100
  - lib/chargebee/models/invoice.rb
101
101
  - lib/chargebee/models/model.rb
102
+ - lib/chargebee/models/order.rb
102
103
  - lib/chargebee/models/plan.rb
103
104
  - lib/chargebee/models/portal_session.rb
104
105
  - lib/chargebee/models/subscription.rb