chargebee 2.15.0 → 2.16.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0232e352a693582a0e848b864963082981b8ab0a
4
- data.tar.gz: 0fc491a54ffec2d077d039a76b65afbfda23999f
3
+ metadata.gz: 6e91a90da69999c446d0f339ddaccef3239841ea
4
+ data.tar.gz: 8584192a936b3f00d2c842d4747be030b571ef78
5
5
  SHA512:
6
- metadata.gz: 241fe47ea0959a545f5b84731ee03f73d152a268934b93f454405390accb25ba4c6a4e32c8103dc15c4a735dbf39e7bb5fbc77e7f996b2ae9f6ea8300cee140c
7
- data.tar.gz: 029ab84935dd9cc0ce4203413275a8b7ede7cfe05085f404f61dd589438120c608c23bc14f83b240965ccd2557d732f5b4f5cbe782fe225462f5342045044fca
6
+ metadata.gz: f0a0dfbc6687ceb4af29180ecc689bfe9836c3ac43ec48b6e4ef601b2651c9e5d991ff584e71dae0976850ce6b32cacdca5f823500e6e3720881d211711dac5f
7
+ data.tar.gz: ee4c770b3a428cf8fabb0407c6bb5d3aa1269ffaced5909339225261b31b8522ac24a061fdea340804ac9ce35708d483ab69989174a1450ce7ee91cbd9cc2fff
data/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ ### v2.16.0 (2022-05-23)
2
+ * * *
3
+
4
+ #### New endpoints:
5
+ * invoice#sync_usages and invoice#resend_einvoice have been added to the invoice resource.
6
+ * credit_notes#resend_einvoice has been added to the credit_notes resource.
7
+ * features#list_features, features#create_a_feature, features#update_a_feature, features#retrieve_a_feature, features#delete_a_feature, features#activate_a_feature, features#archive_a_feature and features#reactivate_a_feature have been added to the features resource.
8
+ * subscription_entitlements#subscription_entitlements_for_subscription and subscription_entitlements#set_subscription_entitlement_availability have been added to the subscription_entitlements resource.
9
+ * item_entitlements#item_entitlements_for_an_item, item_entitlements#item_entitlements_for_a_feature, item_entitlements#add_an_item_entitlements and item_entitlements#upsert_or_remove_an_item_entitlements_for_item have been added to the item_entitlements resource.
10
+ * entitlement_overrides#add_entitlement_override_for_a_subscription and entitlement_overrides#list_entitlement_override_for_a_subscription have been added to the entitlement_overrides resource.
11
+
12
+ #### New Resource:
13
+ * features, subscription_entitlements, item_entitlements and entitlement_overrides have been added.
14
+
15
+ #### New filter parameters:
16
+ * einvoice[status] filter parameter has been added in credit_notes#list_credit_notes api.
17
+
18
+ #### New Enum values:
19
+ * paypal_express_checkout has been added to payment_method_type enum.
20
+ * feature_created, feature_updated, feature_deleted, feature_activated, feature_reactivated, feature_archived, item_entitlements_updated, entitlement_overrides_updated, entitlement_overrides_removed, item_entitlements_removed and entitlement_overrides_auto_removed have been added to the event_type enum.
21
+ * action enum has been added.
22
+
1
23
  ### v2.15.0 (2022-04-25)
2
24
  * * *
3
25
 
data/chargebee.gemspec CHANGED
@@ -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.15.0'
8
- s.date = '2022-04-25'
7
+ s.version = '2.16.0'
8
+ s.date = '2022-05-23'
9
9
  s.summary = "Ruby client for Chargebee API."
10
10
  s.description = "Subscription Billing - Simple. Secure. Affordable. More details at www.chargebee.com."
11
11
 
@@ -52,15 +52,18 @@ Gem::Specification.new do |s|
52
52
  lib/chargebee/models/customer.rb
53
53
  lib/chargebee/models/differential_price.rb
54
54
  lib/chargebee/models/download.rb
55
+ lib/chargebee/models/entitlement_override.rb
55
56
  lib/chargebee/models/estimate.rb
56
57
  lib/chargebee/models/event.rb
57
58
  lib/chargebee/models/export.rb
59
+ lib/chargebee/models/feature.rb
58
60
  lib/chargebee/models/gift.rb
59
61
  lib/chargebee/models/hierarchy.rb
60
62
  lib/chargebee/models/hosted_page.rb
61
63
  lib/chargebee/models/invoice.rb
62
64
  lib/chargebee/models/invoice_estimate.rb
63
65
  lib/chargebee/models/item.rb
66
+ lib/chargebee/models/item_entitlement.rb
64
67
  lib/chargebee/models/item_family.rb
65
68
  lib/chargebee/models/item_price.rb
66
69
  lib/chargebee/models/model.rb
@@ -77,6 +80,7 @@ Gem::Specification.new do |s|
77
80
  lib/chargebee/models/resource_migration.rb
78
81
  lib/chargebee/models/site_migration_detail.rb
79
82
  lib/chargebee/models/subscription.rb
83
+ lib/chargebee/models/subscription_entitlement.rb
80
84
  lib/chargebee/models/subscription_estimate.rb
81
85
  lib/chargebee/models/tax_withheld.rb
82
86
  lib/chargebee/models/third_party_payment_method.rb
@@ -87,5 +87,9 @@ module ChargeBee
87
87
  Request.send('post', uri_path("credit_notes",id.to_s,"delete"), params, env, headers)
88
88
  end
89
89
 
90
+ def self.resend_einvoice(id, env=nil, headers={})
91
+ Request.send('post', uri_path("credit_notes",id.to_s,"resend_einvoice"), {}, env, headers)
92
+ end
93
+
90
94
  end # ~CreditNote
91
95
  end # ~ChargeBee
@@ -0,0 +1,23 @@
1
+ module ChargeBee
2
+ class EntitlementOverride < Model
3
+
4
+ class EmbeddedResource < Model
5
+ attr_accessor
6
+ end
7
+
8
+ attr_accessor :id, :entity_id, :entity_type, :feature_id, :feature_name, :value, :name, :expires_at,
9
+ :embedded
10
+
11
+ # OPERATIONS
12
+ #-----------
13
+
14
+ def self.add_entitlement_override_for_subscription(id, params, env=nil, headers={})
15
+ Request.send('post', uri_path("subscriptions",id.to_s,"entitlement_overrides"), params, env, headers)
16
+ end
17
+
18
+ def self.list_entitlement_override_for_subscription(id, params={}, env=nil, headers={})
19
+ Request.send('get', uri_path("subscriptions",id.to_s,"entitlement_overrides"), params, env, headers)
20
+ end
21
+
22
+ end # ~EntitlementOverride
23
+ end # ~ChargeBee
@@ -0,0 +1,47 @@
1
+ module ChargeBee
2
+ class Feature < Model
3
+
4
+ class Level < Model
5
+ attr_accessor :name, :value, :level, :is_unlimited
6
+ end
7
+
8
+ attr_accessor :id, :name, :description, :status, :type, :unit, :resource_version, :updated_at,
9
+ :created_at, :levels
10
+
11
+ # OPERATIONS
12
+ #-----------
13
+
14
+ def self.list(params={}, env=nil, headers={})
15
+ Request.send_list_request('get', uri_path("features"), params, env, headers)
16
+ end
17
+
18
+ def self.create(params, env=nil, headers={})
19
+ Request.send('post', uri_path("features"), params, env, headers)
20
+ end
21
+
22
+ def self.update(id, params={}, env=nil, headers={})
23
+ Request.send('post', uri_path("features",id.to_s), params, env, headers)
24
+ end
25
+
26
+ def self.retrieve(id, env=nil, headers={})
27
+ Request.send('get', uri_path("features",id.to_s), {}, env, headers)
28
+ end
29
+
30
+ def self.delete(id, env=nil, headers={})
31
+ Request.send('post', uri_path("features",id.to_s,"delete"), {}, env, headers)
32
+ end
33
+
34
+ def self.activate(id, env=nil, headers={})
35
+ Request.send('post', uri_path("features",id.to_s,"activate_command"), {}, env, headers)
36
+ end
37
+
38
+ def self.archive(id, env=nil, headers={})
39
+ Request.send('post', uri_path("features",id.to_s,"archive_command"), {}, env, headers)
40
+ end
41
+
42
+ def self.reactivate(id, env=nil, headers={})
43
+ Request.send('post', uri_path("features",id.to_s,"reactivate_command"), {}, env, headers)
44
+ end
45
+
46
+ end # ~Feature
47
+ end # ~ChargeBee
@@ -111,6 +111,10 @@ module ChargeBee
111
111
  Request.send('post', uri_path("invoices",id.to_s,"apply_payments"), params, env, headers)
112
112
  end
113
113
 
114
+ def self.sync_usages(id, env=nil, headers={})
115
+ Request.send('post', uri_path("invoices",id.to_s,"sync_usages"), {}, env, headers)
116
+ end
117
+
114
118
  def self.apply_credits(id, params={}, env=nil, headers={})
115
119
  Request.send('post', uri_path("invoices",id.to_s,"apply_credits"), params, env, headers)
116
120
  end
@@ -195,5 +199,9 @@ module ChargeBee
195
199
  Request.send('post', uri_path("invoices",id.to_s,"update_details"), params, env, headers)
196
200
  end
197
201
 
202
+ def self.resend_einvoice(id, env=nil, headers={})
203
+ Request.send('post', uri_path("invoices",id.to_s,"resend_einvoice"), {}, env, headers)
204
+ end
205
+
198
206
  end # ~Invoice
199
207
  end # ~ChargeBee
@@ -0,0 +1,30 @@
1
+ module ChargeBee
2
+ class ItemEntitlement < Model
3
+
4
+ class EmbeddedResource < Model
5
+ attr_accessor
6
+ end
7
+
8
+ attr_accessor :id, :item_id, :item_type, :feature_id, :feature_name, :value, :name, :embedded
9
+
10
+ # OPERATIONS
11
+ #-----------
12
+
13
+ def self.item_entitlements_for_item(id, params={}, env=nil, headers={})
14
+ Request.send('get', uri_path("items",id.to_s,"item_entitlements"), params, env, headers)
15
+ end
16
+
17
+ def self.item_entitlements_for_feature(id, params={}, env=nil, headers={})
18
+ Request.send('get', uri_path("features",id.to_s,"item_entitlements"), params, env, headers)
19
+ end
20
+
21
+ def self.add_item_entitlements(id, params, env=nil, headers={})
22
+ Request.send('post', uri_path("features",id.to_s,"item_entitlements"), params, env, headers)
23
+ end
24
+
25
+ def self.upsert_or_remove_item_entitlements_for_item(id, params, env=nil, headers={})
26
+ Request.send('post', uri_path("items",id.to_s,"item_entitlements"), params, env, headers)
27
+ end
28
+
29
+ end # ~ItemEntitlement
30
+ end # ~ChargeBee
@@ -0,0 +1,27 @@
1
+ module ChargeBee
2
+ class SubscriptionEntitlement < Model
3
+
4
+ class Component < Model
5
+ attr_accessor
6
+ end
7
+
8
+ class EmbeddedResource < Model
9
+ attr_accessor
10
+ end
11
+
12
+ attr_accessor :id, :subscription_id, :feature_id, :feature_name, :feature_unit, :value, :name,
13
+ :is_overridden, :is_enabled, :expires_at, :components, :embedded
14
+
15
+ # OPERATIONS
16
+ #-----------
17
+
18
+ def self.subscription_entitlements_for_subscription(id, params={}, env=nil, headers={})
19
+ Request.send('get', uri_path("subscriptions",id.to_s,"subscription_entitlements"), params, env, headers)
20
+ end
21
+
22
+ def self.set_subscription_entitlement_availability(id, params, env=nil, headers={})
23
+ Request.send('post', uri_path("subscriptions",id.to_s,"subscription_entitlements/set_availability"), params, env, headers)
24
+ end
25
+
26
+ end # ~SubscriptionEntitlement
27
+ end # ~ChargeBee
@@ -272,6 +272,30 @@ module ChargeBee
272
272
  return differential_price;
273
273
  end
274
274
 
275
+ def feature()
276
+ feature = get(:feature, Feature,
277
+ {:levels => Feature::Level});
278
+ return feature;
279
+ end
280
+
281
+ def subscription_entitlement()
282
+ subscription_entitlement = get(:subscription_entitlement, SubscriptionEntitlement,
283
+ {:component => SubscriptionEntitlement::Component, :embedded_resource => SubscriptionEntitlement::EmbeddedResource});
284
+ return subscription_entitlement;
285
+ end
286
+
287
+ def item_entitlement()
288
+ item_entitlement = get(:item_entitlement, ItemEntitlement,
289
+ {:embedded_resource => ItemEntitlement::EmbeddedResource});
290
+ return item_entitlement;
291
+ end
292
+
293
+ def entitlement_override()
294
+ entitlement_override = get(:entitlement_override, EntitlementOverride,
295
+ {:embedded_resource => EntitlementOverride::EmbeddedResource});
296
+ return entitlement_override;
297
+ end
298
+
275
299
 
276
300
  def unbilled_charges()
277
301
  unbilled_charges = get_list(:unbilled_charges, UnbilledCharge,
data/lib/chargebee.rb CHANGED
@@ -53,7 +53,7 @@ require File.dirname(__FILE__) + '/chargebee/models/usage.rb'
53
53
 
54
54
  module ChargeBee
55
55
 
56
- VERSION = '2.15.0'
56
+ VERSION = '2.16.0'
57
57
 
58
58
  @@default_env = nil
59
59
  @@verify_ca_certs = true
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.15.0
4
+ version: 2.16.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: 2022-04-25 00:00:00.000000000 Z
12
+ date: 2022-05-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
@@ -128,15 +128,18 @@ files:
128
128
  - lib/chargebee/models/customer.rb
129
129
  - lib/chargebee/models/differential_price.rb
130
130
  - lib/chargebee/models/download.rb
131
+ - lib/chargebee/models/entitlement_override.rb
131
132
  - lib/chargebee/models/estimate.rb
132
133
  - lib/chargebee/models/event.rb
133
134
  - lib/chargebee/models/export.rb
135
+ - lib/chargebee/models/feature.rb
134
136
  - lib/chargebee/models/gift.rb
135
137
  - lib/chargebee/models/hierarchy.rb
136
138
  - lib/chargebee/models/hosted_page.rb
137
139
  - lib/chargebee/models/invoice.rb
138
140
  - lib/chargebee/models/invoice_estimate.rb
139
141
  - lib/chargebee/models/item.rb
142
+ - lib/chargebee/models/item_entitlement.rb
140
143
  - lib/chargebee/models/item_family.rb
141
144
  - lib/chargebee/models/item_price.rb
142
145
  - lib/chargebee/models/model.rb
@@ -153,6 +156,7 @@ files:
153
156
  - lib/chargebee/models/resource_migration.rb
154
157
  - lib/chargebee/models/site_migration_detail.rb
155
158
  - lib/chargebee/models/subscription.rb
159
+ - lib/chargebee/models/subscription_entitlement.rb
156
160
  - lib/chargebee/models/subscription_estimate.rb
157
161
  - lib/chargebee/models/tax_withheld.rb
158
162
  - lib/chargebee/models/third_party_payment_method.rb