chargebee 1.4.2 → 1.4.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.
- data/CHANGELOG.md +11 -0
- data/chargebee.gemspec +2 -2
- data/lib/chargebee.rb +1 -1
- data/lib/chargebee/models/addon.rb +2 -2
- data/lib/chargebee/models/coupon.rb +2 -2
- data/lib/chargebee/models/estimate.rb +4 -0
- data/lib/chargebee/models/plan.rb +3 -2
- data/lib/chargebee/models/subscription.rb +8 -0
- metadata +2 -2
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
### v1.4.3 (2014-07-29)
|
2
|
+
* * *
|
3
|
+
APIs added:
|
4
|
+
* Add a one time charged to the subscription which will be added to the invoice generated at the end of the current term. See https://apidocs.chargebee.com/docs/api/subscriptions#add_charge_at_term_end.
|
5
|
+
* Add a "non-recurring addon" charge to a subscription which will be added to the invoice generated at the end of the current term. See https://apidocs.chargebee.com/docs/api/subscriptions#charge_addon_at_term_end.
|
6
|
+
*Return an estimate of the amount that will be charged when the subscription renews. See https://apidocs.chargebee.com/docs/api/estimates#subscription_renewal_estimate
|
7
|
+
|
8
|
+
APIs updated:
|
9
|
+
* Now plans supports charge model to specify how the subscription plan charges should be calculated. See https://apidocs.chargebee.com/docs/api/plans#plan_attributes
|
10
|
+
* Include delayed charges while calculating the Estimate.
|
11
|
+
|
1
12
|
### v1.4.2 (2014-06-19)
|
2
13
|
* * *
|
3
14
|
APIs added:
|
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.4.
|
8
|
-
s.date = '2014-
|
7
|
+
s.version = '1.4.3'
|
8
|
+
s.date = '2014-07-29'
|
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
@@ -1,8 +1,8 @@
|
|
1
1
|
module ChargeBee
|
2
2
|
class Addon < Model
|
3
3
|
|
4
|
-
attr_accessor :id, :name, :invoice_name, :type, :charge_type, :price, :period,
|
5
|
-
:unit, :status, :archived_at
|
4
|
+
attr_accessor :id, :name, :invoice_name, :description, :type, :charge_type, :price, :period,
|
5
|
+
:period_unit, :unit, :status, :archived_at
|
6
6
|
|
7
7
|
# OPERATIONS
|
8
8
|
#-----------
|
@@ -3,8 +3,8 @@ module ChargeBee
|
|
3
3
|
|
4
4
|
attr_accessor :id, :name, :invoice_name, :discount_type, :discount_percentage, :discount_amount,
|
5
5
|
:discount_quantity, :duration_type, :duration_month, :valid_till, :max_redemptions, :status,
|
6
|
-
:
|
7
|
-
:
|
6
|
+
:apply_discount_on, :apply_on, :plan_constraint, :addon_constraint, :created_at, :archived_at,
|
7
|
+
:plan_ids, :addon_ids, :redemptions
|
8
8
|
|
9
9
|
# OPERATIONS
|
10
10
|
#-----------
|
@@ -27,5 +27,9 @@ module ChargeBee
|
|
27
27
|
Request.send('post', uri_path("estimates","update_subscription"), params, env)
|
28
28
|
end
|
29
29
|
|
30
|
+
def self.renewal_estimate(id, params={}, env=nil)
|
31
|
+
Request.send('get', uri_path("subscriptions",id.to_s,"renewal_estimate"), params, env)
|
32
|
+
end
|
33
|
+
|
30
34
|
end # ~Estimate
|
31
35
|
end # ~ChargeBee
|
@@ -1,8 +1,9 @@
|
|
1
1
|
module ChargeBee
|
2
2
|
class Plan < Model
|
3
3
|
|
4
|
-
attr_accessor :id, :name, :invoice_name, :price, :period, :period_unit, :trial_period,
|
5
|
-
:
|
4
|
+
attr_accessor :id, :name, :invoice_name, :description, :price, :period, :period_unit, :trial_period,
|
5
|
+
:trial_period_unit, :charge_model, :free_quantity, :setup_cost, :downgrade_penalty, :status,
|
6
|
+
:archived_at, :billing_cycles, :redirect_url, :enabled_in_hosted_pages
|
6
7
|
|
7
8
|
# OPERATIONS
|
8
9
|
#-----------
|
@@ -57,6 +57,14 @@ module ChargeBee
|
|
57
57
|
Request.send('post', uri_path("subscriptions",id.to_s,"reactivate"), params, env)
|
58
58
|
end
|
59
59
|
|
60
|
+
def self.add_charge_at_term_end(id, params, env=nil)
|
61
|
+
Request.send('post', uri_path("subscriptions",id.to_s,"add_charge_at_term_end"), params, env)
|
62
|
+
end
|
63
|
+
|
64
|
+
def self.charge_addon_at_term_end(id, params, env=nil)
|
65
|
+
Request.send('post', uri_path("subscriptions",id.to_s,"charge_addon_at_term_end"), params, env)
|
66
|
+
end
|
67
|
+
|
60
68
|
def self.add_credit(id, params, env=nil)
|
61
69
|
Request.send('post', uri_path("subscriptions",id.to_s,"add_credit"), params, env)
|
62
70
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: chargebee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.4.
|
5
|
+
version: 1.4.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: 2014-
|
14
|
+
date: 2014-07-29 00:00:00 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: json_pure
|