chargebee 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/chargebee.gemspec +3 -2
- data/lib/chargebee.rb +1 -1
- data/lib/chargebee/models/invoice.rb +14 -2
- data/lib/chargebee/models/offline_checkout.rb +22 -0
- data/lib/chargebee/models/transaction.rb +2 -2
- metadata +3 -2
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.1.
|
8
|
-
s.date = '2012-12-
|
7
|
+
s.version = '1.1.3'
|
8
|
+
s.date = '2012-12-31'
|
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."
|
@@ -46,6 +46,7 @@ Gem::Specification.new do |s|
|
|
46
46
|
lib/chargebee/models/hosted_page.rb
|
47
47
|
lib/chargebee/models/invoice.rb
|
48
48
|
lib/chargebee/models/model.rb
|
49
|
+
lib/chargebee/models/offline_checkout.rb
|
49
50
|
lib/chargebee/models/plan.rb
|
50
51
|
lib/chargebee/models/subscription.rb
|
51
52
|
lib/chargebee/models/transaction.rb
|
data/lib/chargebee.rb
CHANGED
@@ -15,16 +15,28 @@ module ChargeBee
|
|
15
15
|
# OPERATIONS
|
16
16
|
#-----------
|
17
17
|
|
18
|
+
def self.add_charge(id, params, env=nil)
|
19
|
+
Request.send('post', "/invoices/#{id.to_s}/add_charge", params, env)
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.add_addon_charge(id, params, env=nil)
|
23
|
+
Request.send('post', "/invoices/#{id.to_s}/add_addon_charge", params, env)
|
24
|
+
end
|
25
|
+
|
18
26
|
def self.list(params={}, env=nil)
|
19
27
|
Request.send('get', "/invoices", params, env)
|
20
28
|
end
|
21
29
|
|
30
|
+
def self.invoices_for_subscription(id, params={}, env=nil)
|
31
|
+
Request.send('get', "/subscriptions/#{id.to_s}/invoices", params, env)
|
32
|
+
end
|
33
|
+
|
22
34
|
def self.retrieve(id, env=nil)
|
23
35
|
Request.send('get', "/invoices/#{id.to_s}", {}, env)
|
24
36
|
end
|
25
37
|
|
26
|
-
def self.
|
27
|
-
Request.send('
|
38
|
+
def self.collect(id, env=nil)
|
39
|
+
Request.send('post', "/invoices/#{id.to_s}/collect", {}, env)
|
28
40
|
end
|
29
41
|
|
30
42
|
def self.charge(params, env=nil)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class OfflineCheckout < Model
|
3
|
+
|
4
|
+
attr_accessor :id, :type, :amount, :status, :created_at, :updated_at
|
5
|
+
|
6
|
+
# OPERATIONS
|
7
|
+
#-----------
|
8
|
+
|
9
|
+
def self.retrieve(id, env=nil)
|
10
|
+
Request.send('get', "/offline_checkouts/#{id.to_s}", {}, env)
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.pre_register(params, env=nil)
|
14
|
+
Request.send('post', "/offline_checkouts/pre_register", params, env)
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.post_register(id, params, env=nil)
|
18
|
+
Request.send('post', "/offline_checkouts/#{id.to_s}/post_register", params, env)
|
19
|
+
end
|
20
|
+
|
21
|
+
end # ~OfflineCheckout
|
22
|
+
end # ~ChargeBee
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module ChargeBee
|
2
2
|
class Transaction < Model
|
3
3
|
|
4
|
-
attr_accessor :id, :subscription_id, :gateway, :description, :type, :date,
|
5
|
-
:error_code, :error_text, :refunded_tx_id, :voided_at, :status, :masked_card_number
|
4
|
+
attr_accessor :id, :subscription_id, :payment_method, :gateway, :description, :type, :date,
|
5
|
+
:amount, :id_at_gateway, :error_code, :error_text, :refunded_tx_id, :voided_at, :status, :masked_card_number
|
6
6
|
|
7
7
|
# OPERATIONS
|
8
8
|
#-----------
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: chargebee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.1.
|
5
|
+
version: 1.1.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Rajaraman S
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2012-12-
|
14
|
+
date: 2012-12-31 00:00:00 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: json_pure
|
@@ -87,6 +87,7 @@ files:
|
|
87
87
|
- lib/chargebee/models/hosted_page.rb
|
88
88
|
- lib/chargebee/models/invoice.rb
|
89
89
|
- lib/chargebee/models/model.rb
|
90
|
+
- lib/chargebee/models/offline_checkout.rb
|
90
91
|
- lib/chargebee/models/plan.rb
|
91
92
|
- lib/chargebee/models/subscription.rb
|
92
93
|
- lib/chargebee/models/transaction.rb
|