chargebee 2.4.0 → 2.4.1

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: 9db3200b540a1474a92bd91f908b4e2ef32d1c96
4
- data.tar.gz: 9634b99e26ef82102f0ebc34f1bc1972a9dacd5a
3
+ metadata.gz: c280a92f484b70c40ebc28caaa6077287e8a71d5
4
+ data.tar.gz: e65cdadff50cadc98cd8c7908dbfca4ae78bf3b6
5
5
  SHA512:
6
- metadata.gz: 0dcb0d25c5ce8cb0b36600d2403b2fc98dd78fafd4124e5d4a243badf41a957e4ea1dc171370205ffed306d7703b748424e3426d73ca1915abb358f314004f35
7
- data.tar.gz: 7a354690e7f684545997ca8981903f743973b0fb87042ea3b1765d454aa6a41da92c0535c3adf450e5f721caee0fb42bdaeae438958b9ea9c5e5fb412097f15b
6
+ metadata.gz: a03c48b90c3fad334077a4e9d30b1c8c5c2e227eec4d21791d7d8dc32d9c5a79c6ba18ff31d8461dcbb3ef3c7d3b94711d996183a4a2cd23510648912c061853
7
+ data.tar.gz: 366df2572d6ed7274847c275b0f7dcd5864dc48704e725fbea39710cb6a8208dbafa47595c3916434fed89d0119c6d6d5d0884c9669e5a8a732c49cfd078b342
@@ -1,3 +1,24 @@
1
+ ### v2.4.1 (2017-11-13)
2
+ * * *
3
+
4
+ ** API changes**:
5
+ * The new resource [Coupon Set](https://apidocs.chargebee.com/docs/api/coupon_sets) has been added
6
+
7
+ * The API end point create a coupon code for a coupon has been deprecated in coupon code resource
8
+
9
+ * The attribute [coupon_set_id](https://apidocs.chargebee.com/docs/api/coupon_codes#coupon_code_coupon_set_id) has been added to Coupon Code resource
10
+
11
+ * The deprecation has been removed for [Collect payment for customer](https://apidocs.chargebee.com/docs/api/customers#collect_payment_for_customer) in customer resource
12
+
13
+ * New end point Manage payment source and Collect now has been added as deprecated API to hosted page. Please mail us at support@chargebee.com to enable
14
+
15
+ ** Attributes added**:
16
+ * New attribute [remaining_billing_cycles](https://apidocs.chargebee.com/docs/api/subscriptions#subscription_addons_remaining_billing_cycles) has been added in addons under subscription resource.
17
+
18
+
19
+ ** Events added**:
20
+ * New event type coupon_set_created, coupon_set_updated, coupon_set_deleted, coupon_codes_added, coupon_codes_updated, coupon_codes_deleted
21
+
1
22
  ### v2.4.0 (2017-09-22)
2
23
  * * *
3
24
 
@@ -4,8 +4,8 @@ Gem::Specification.new do |s|
4
4
  s.rubygems_version = '1.3.5'
5
5
  s.required_ruby_version = '>= 1.9.3'
6
6
  s.name = 'chargebee'
7
- s.version = '2.4.0'
8
- s.date = '2017-09-22'
7
+ s.version = '2.4.1'
8
+ s.date = '2017-11-13'
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."
@@ -43,6 +43,7 @@ Gem::Specification.new do |s|
43
43
  lib/chargebee/models/comment.rb
44
44
  lib/chargebee/models/coupon.rb
45
45
  lib/chargebee/models/coupon_code.rb
46
+ lib/chargebee/models/coupon_set.rb
46
47
  lib/chargebee/models/credit_note.rb
47
48
  lib/chargebee/models/credit_note_estimate.rb
48
49
  lib/chargebee/models/customer.rb
@@ -27,6 +27,7 @@ require File.dirname(__FILE__) + '/chargebee/models/plan'
27
27
  require File.dirname(__FILE__) + '/chargebee/models/addon'
28
28
  require File.dirname(__FILE__) + '/chargebee/models/coupon'
29
29
  require File.dirname(__FILE__) + '/chargebee/models/coupon_code'
30
+ require File.dirname(__FILE__) + '/chargebee/models/coupon_set'
30
31
  require File.dirname(__FILE__) + '/chargebee/models/comment'
31
32
  require File.dirname(__FILE__) + '/chargebee/models/portal_session'
32
33
  require File.dirname(__FILE__) + '/chargebee/models/download'
@@ -38,7 +39,7 @@ require File.dirname(__FILE__) + '/chargebee/models/time_machine'
38
39
 
39
40
  module ChargeBee
40
41
 
41
- VERSION = '2.4.0'
42
+ VERSION = '2.4.1'
42
43
 
43
44
  @@default_env = nil
44
45
  @@verify_ca_certs = true
@@ -1,7 +1,7 @@
1
1
  module ChargeBee
2
2
  class CouponCode < Model
3
3
 
4
- attr_accessor :code, :status, :coupon_id, :coupon_set_name
4
+ attr_accessor :code, :status, :coupon_id, :coupon_set_id, :coupon_set_name
5
5
 
6
6
  # OPERATIONS
7
7
  #-----------
@@ -0,0 +1,38 @@
1
+ module ChargeBee
2
+ class CouponSet < Model
3
+
4
+ attr_accessor :id, :coupon_id, :name, :total_count, :redeemed_count, :archived_count, :meta_data
5
+
6
+ # OPERATIONS
7
+ #-----------
8
+
9
+ def self.create(params, env=nil, headers={})
10
+ Request.send('post', uri_path("coupon_sets"), params, env, headers)
11
+ end
12
+
13
+ def self.add_coupon_codes(id, params={}, env=nil, headers={})
14
+ Request.send('post', uri_path("coupon_sets",id.to_s,"add_coupon_codes"), params, env, headers)
15
+ end
16
+
17
+ def self.list(params={}, env=nil, headers={})
18
+ Request.send_list_request('get', uri_path("coupon_sets"), params, env, headers)
19
+ end
20
+
21
+ def self.retrieve(id, env=nil, headers={})
22
+ Request.send('get', uri_path("coupon_sets",id.to_s), {}, env, headers)
23
+ end
24
+
25
+ def self.update(id, params={}, env=nil, headers={})
26
+ Request.send('post', uri_path("coupon_sets",id.to_s,"update"), params, env, headers)
27
+ end
28
+
29
+ def self.delete(id, env=nil, headers={})
30
+ Request.send('post', uri_path("coupon_sets",id.to_s,"delete"), {}, env, headers)
31
+ end
32
+
33
+ def self.delete_unused_coupon_codes(id, env=nil, headers={})
34
+ Request.send('post', uri_path("coupon_sets",id.to_s,"delete_unused_coupon_codes"), {}, env, headers)
35
+ end
36
+
37
+ end # ~CouponSet
38
+ end # ~ChargeBee
@@ -34,6 +34,14 @@ module ChargeBee
34
34
  Request.send('post', uri_path("hosted_pages","update_payment_method"), params, env, headers)
35
35
  end
36
36
 
37
+ def self.manage_payment_sources(params, env=nil, headers={})
38
+ Request.send('post', uri_path("hosted_pages","manage_payment_sources"), params, env, headers)
39
+ end
40
+
41
+ def self.collect_now(params, env=nil, headers={})
42
+ Request.send('post', uri_path("hosted_pages","collect_now"), params, env, headers)
43
+ end
44
+
37
45
  def self.acknowledge(id, env=nil, headers={})
38
46
  Request.send('post', uri_path("hosted_pages",id.to_s,"acknowledge"), {}, env, headers)
39
47
  end
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class Subscription < Model
3
3
 
4
4
  class Addon < Model
5
- attr_accessor :id, :quantity, :unit_price, :trial_end
5
+ attr_accessor :id, :quantity, :unit_price, :trial_end, :remaining_billing_cycles
6
6
  end
7
7
 
8
8
  class Coupon < Model
@@ -99,6 +99,11 @@ module ChargeBee
99
99
  return coupon;
100
100
  end
101
101
 
102
+ def coupon_set()
103
+ coupon_set = get(:coupon_set, CouponSet);
104
+ return coupon_set;
105
+ end
106
+
102
107
  def coupon_code()
103
108
  coupon_code = get(:coupon_code, CouponCode);
104
109
  return coupon_code;
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: 2.4.0
4
+ version: 2.4.1
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: 2017-09-22 00:00:00.000000000 Z
12
+ date: 2017-11-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
@@ -98,6 +98,7 @@ files:
98
98
  - lib/chargebee/models/comment.rb
99
99
  - lib/chargebee/models/coupon.rb
100
100
  - lib/chargebee/models/coupon_code.rb
101
+ - lib/chargebee/models/coupon_set.rb
101
102
  - lib/chargebee/models/credit_note.rb
102
103
  - lib/chargebee/models/credit_note_estimate.rb
103
104
  - lib/chargebee/models/customer.rb