chargebee 1.4.3 → 1.4.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ### v1.4.4 (2014-08-13)
2
+ * * *
3
+ Added properties:
4
+ * Property has_scheduled_changes added to the Subscription resource to indicate whether there are any pending change scheduled for this Subscription
5
+
6
+ APIs added:
7
+ * Retrieve a subscription with scheduled changes applied. See https://apidocs.chargebee.com/docs/api/subscriptions#retrieve_with_scheduled_changes.
8
+ * Remove schedule changes for a subscription. See https://apidocs.chargebee.com/docs/api/subscriptions#remove_scheduled_changes.
9
+
10
+ APIs updated:
11
+ * Ability to pass description for Plans & Addons while Creating & Updating.
12
+
13
+ APIs Removed:
14
+ * Refund a Transaction - In ChargeBee, the 'refunds' are tracked against the invoice for which they are issued. A payment transaction can be associated with only one invoice now. So Transaction.refund() API is indeed a shortcut for Transaction.associatedInvoice().refund().
15
+
1
16
  ### v1.4.3 (2014-07-29)
2
17
  * * *
3
18
  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.3'
8
- s.date = '2014-07-29'
7
+ s.version = '1.4.4'
8
+ s.date = '2014-08-16'
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
@@ -27,7 +27,7 @@ require File.dirname(__FILE__) + '/chargebee/models/download'
27
27
 
28
28
  module ChargeBee
29
29
 
30
- VERSION = '1.4.3'
30
+ VERSION = '1.4.4'
31
31
 
32
32
  @@default_env = nil
33
33
  @@verify_ca_certs = true
@@ -40,6 +40,8 @@ module ChargeBee
40
40
  def method_missing(m, *args, &block)
41
41
  if(@values.has_key?(m))
42
42
  return @values[m]
43
+ elsif(m[0,3] == "cf_") # All the custom fields start with prefix cf_.
44
+ return nil
43
45
  end
44
46
  puts "There's no method called #{m} #{args} here -- please try again."
45
47
  puts @values
@@ -58,4 +60,4 @@ module ChargeBee
58
60
  end
59
61
 
60
62
  end
61
- end
63
+ end
@@ -16,7 +16,7 @@ module ChargeBee
16
16
  attr_accessor :id, :plan_id, :plan_quantity, :status, :start_date, :trial_start, :trial_end,
17
17
  :current_term_start, :current_term_end, :remaining_billing_cycles, :created_at, :started_at,
18
18
  :activated_at, :cancelled_at, :cancel_reason, :due_invoices_count, :due_since, :total_dues,
19
- :addons, :coupon, :coupons, :shipping_address
19
+ :addons, :coupon, :coupons, :shipping_address, :has_scheduled_changes
20
20
 
21
21
  # OPERATIONS
22
22
  #-----------
@@ -41,6 +41,14 @@ module ChargeBee
41
41
  Request.send('get', uri_path("subscriptions",id.to_s), {}, env)
42
42
  end
43
43
 
44
+ def self.retrieve_with_scheduled_changes(id, env=nil)
45
+ Request.send('get', uri_path("subscriptions",id.to_s,"retrieve_with_scheduled_changes"), {}, env)
46
+ end
47
+
48
+ def self.remove_scheduled_changes(id, env=nil)
49
+ Request.send('post', uri_path("subscriptions",id.to_s,"remove_scheduled_changes"), {}, env)
50
+ end
51
+
44
52
  def self.update(id, params={}, env=nil)
45
53
  Request.send('post', uri_path("subscriptions",id.to_s), params, env)
46
54
  end
@@ -65,9 +73,5 @@ module ChargeBee
65
73
  Request.send('post', uri_path("subscriptions",id.to_s,"charge_addon_at_term_end"), params, env)
66
74
  end
67
75
 
68
- def self.add_credit(id, params, env=nil)
69
- Request.send('post', uri_path("subscriptions",id.to_s,"add_credit"), params, env)
70
- end
71
-
72
76
  end # ~Subscription
73
77
  end # ~ChargeBee
@@ -36,9 +36,5 @@ module ChargeBee
36
36
  Request.send('post', uri_path("invoices",id.to_s,"record_payment"), params, env)
37
37
  end
38
38
 
39
- def self.refund(id, params={}, env=nil)
40
- Request.send('post', uri_path("transactions",id.to_s,"refund"), params, env)
41
- end
42
-
43
39
  end # ~Transaction
44
40
  end # ~ChargeBee
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: chargebee
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.4.3
5
+ version: 1.4.4
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-07-29 00:00:00 Z
14
+ date: 2014-08-16 00:00:00 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: json_pure