chargebee 2.43.0 → 2.44.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +52 -0
- data/Gemfile.lock +1 -1
- data/chargebee.gemspec +4 -5
- data/lib/chargebee/models/invoice.rb +6 -2
- data/lib/chargebee/models/item.rb +9 -1
- data/lib/chargebee/models/payment_schedule.rb +15 -0
- data/lib/chargebee/models/payment_schedule_scheme.rb +27 -0
- data/lib/chargebee/result.rb +17 -16
- data/lib/chargebee/util.rb +4 -2
- data/lib/chargebee.rb +3 -2
- metadata +4 -5
- data/lib/chargebee/models/installment.rb +0 -18
- data/lib/chargebee/models/installment_config.rb +0 -27
- data/lib/chargebee/models/installment_detail.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3621b2495d5b64a5507c2cdd14d16971bf3e763b
|
4
|
+
data.tar.gz: 49fc6659643194faadec24341e5796ab8c1d7215
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 578e9cdb85549a4078c8260822c377c7f728db26d3ad207c639a6e7082209b4197a9d569cbb8cca0bf30295883a61a71578ee8a3e2d77252344585e852329f20
|
7
|
+
data.tar.gz: 384b676a1a73e51ae91de6a6ba9378088586ba3b642470080ee6025a6129106cc3d44b4f4b35f841c928ae9e77cb0b9516b7da6e8dd805ecfd0ddd56557f42f2
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,55 @@
|
|
1
|
+
### v2.44.1 (2024-10-03)
|
2
|
+
* * *
|
3
|
+
|
4
|
+
#### Bug Fixes:
|
5
|
+
* metadata field not working bug fixed.
|
6
|
+
* meta_data field not working bug fixed.
|
7
|
+
|
8
|
+
### v2.44.0 (2024-09-19)
|
9
|
+
* * *
|
10
|
+
|
11
|
+
#### New Resource:
|
12
|
+
* PaymentScheduleScheme has been added.
|
13
|
+
* PaymentSchedule has been added.
|
14
|
+
|
15
|
+
### New Endpoints:
|
16
|
+
* Invoice#ApplyPaymentScheduleScheme has been added.
|
17
|
+
* Invoice#PaymentSchedules has been added.
|
18
|
+
|
19
|
+
### New Attributes
|
20
|
+
* bundle_items[] has been added to Items.
|
21
|
+
* bundle_configuration has been added to Items.
|
22
|
+
|
23
|
+
#### New Input parameters:
|
24
|
+
* bundle_configuration has been added to Items#CreateParams, Items#UpdateParams & Items#ListParams.
|
25
|
+
* bundle_items_to_add[] has been added to Items#CreateParams & Items#UpdateParams.
|
26
|
+
* bundle_items_to_update[] has been added to Items#UpdateParams.
|
27
|
+
* bundle_items_to_remove[] has been added to Items#UpdateParams.
|
28
|
+
* payment_schedule has been added to Purchase#CreateParams.
|
29
|
+
|
30
|
+
### New Enum Values:
|
31
|
+
* payment_schedules_created has been added to EventTypeEnum.
|
32
|
+
* payment_schedules_updated has been added to EventTypeEnum.
|
33
|
+
* payment_schedule_scheme_created has been added to EventTypeEnum.
|
34
|
+
* payment_schedule_scheme_deleted has been added to EventTypeEnum.
|
35
|
+
|
36
|
+
### Removed Resource:
|
37
|
+
* Installment has been removed.
|
38
|
+
* InstallmentConfig has been removed.
|
39
|
+
* InstallmentDetail has been removed.
|
40
|
+
|
41
|
+
### Removed Endpoints:
|
42
|
+
* Invoice#Installments has been removed.
|
43
|
+
|
44
|
+
### Removed Input parameters:
|
45
|
+
* installment_info has been removed from Purchase#CreateParams.
|
46
|
+
|
47
|
+
### Removed Enum Values:
|
48
|
+
* invoice_installments_created has been removed from EventTypeEnum.
|
49
|
+
* invoice_installment_updated has been removed from EventTypeEnum.
|
50
|
+
* installment_config_created has been removed from EventTypeEnum.
|
51
|
+
* installment_config_deleted has been removed from EventTypeEnum.
|
52
|
+
|
1
53
|
### v2.43.0 (2024-08-29)
|
2
54
|
* * *
|
3
55
|
|
data/Gemfile.lock
CHANGED
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.
|
8
|
-
s.date = '2024-
|
7
|
+
s.version = '2.44.1'
|
8
|
+
s.date = '2024-10-03'
|
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
|
s.metadata = {
|
@@ -79,9 +79,6 @@ Gem::Specification.new do |s|
|
|
79
79
|
lib/chargebee/models/impacted_item_price.rb
|
80
80
|
lib/chargebee/models/impacted_subscription.rb
|
81
81
|
lib/chargebee/models/in_app_subscription.rb
|
82
|
-
lib/chargebee/models/installment.rb
|
83
|
-
lib/chargebee/models/installment_config.rb
|
84
|
-
lib/chargebee/models/installment_detail.rb
|
85
82
|
lib/chargebee/models/invoice.rb
|
86
83
|
lib/chargebee/models/invoice_estimate.rb
|
87
84
|
lib/chargebee/models/item.rb
|
@@ -94,6 +91,8 @@ Gem::Specification.new do |s|
|
|
94
91
|
lib/chargebee/models/order.rb
|
95
92
|
lib/chargebee/models/payment_intent.rb
|
96
93
|
lib/chargebee/models/payment_reference_number.rb
|
94
|
+
lib/chargebee/models/payment_schedule.rb
|
95
|
+
lib/chargebee/models/payment_schedule_scheme.rb
|
97
96
|
lib/chargebee/models/payment_source.rb
|
98
97
|
lib/chargebee/models/payment_voucher.rb
|
99
98
|
lib/chargebee/models/plan.rb
|
@@ -228,8 +228,12 @@ module ChargeBee
|
|
228
228
|
Request.send('post', uri_path("invoices",id.to_s,"update_details"), params, env, headers)
|
229
229
|
end
|
230
230
|
|
231
|
-
def self.
|
232
|
-
Request.send('post', uri_path("invoices",id.to_s,"
|
231
|
+
def self.apply_payment_schedule_scheme(id, params, env=nil, headers={})
|
232
|
+
Request.send('post', uri_path("invoices",id.to_s,"apply_payment_schedule_scheme"), params, env, headers)
|
233
|
+
end
|
234
|
+
|
235
|
+
def self.payment_schedules(id, env=nil, headers={})
|
236
|
+
Request.send('get', uri_path("invoices",id.to_s,"payment_schedules"), {}, env, headers)
|
233
237
|
end
|
234
238
|
|
235
239
|
def self.resend_einvoice(id, env=nil, headers={})
|
@@ -5,10 +5,18 @@ module ChargeBee
|
|
5
5
|
attr_accessor :id
|
6
6
|
end
|
7
7
|
|
8
|
+
class BundleItem < Model
|
9
|
+
attr_accessor :item_id, :item_type, :quantity, :price_allocation
|
10
|
+
end
|
11
|
+
|
12
|
+
class BundleConfiguration < Model
|
13
|
+
attr_accessor :type
|
14
|
+
end
|
15
|
+
|
8
16
|
attr_accessor :id, :name, :external_name, :description, :status, :resource_version, :updated_at,
|
9
17
|
:item_family_id, :type, :is_shippable, :is_giftable, :redirect_url, :enabled_for_checkout, :enabled_in_portal,
|
10
18
|
:included_in_mrr, :item_applicability, :gift_claim_redirect_url, :unit, :metered, :usage_calculation,
|
11
|
-
:archived_at, :channel, :applicable_items, :metadata
|
19
|
+
:archived_at, :channel, :applicable_items, :bundle_items, :bundle_configuration, :metadata
|
12
20
|
|
13
21
|
# OPERATIONS
|
14
22
|
#-----------
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class PaymentSchedule < Model
|
3
|
+
|
4
|
+
class ScheduleEntry < Model
|
5
|
+
attr_accessor :id, :date, :amount, :status
|
6
|
+
end
|
7
|
+
|
8
|
+
attr_accessor :id, :scheme_id, :entity_type, :entity_id, :amount, :created_at, :resource_version,
|
9
|
+
:updated_at, :currency_code, :schedule_entries
|
10
|
+
|
11
|
+
# OPERATIONS
|
12
|
+
#-----------
|
13
|
+
|
14
|
+
end # ~PaymentSchedule
|
15
|
+
end # ~ChargeBee
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class PaymentScheduleScheme < Model
|
3
|
+
|
4
|
+
class PreferredSchedule < Model
|
5
|
+
attr_accessor :period, :amount_percentage
|
6
|
+
end
|
7
|
+
|
8
|
+
attr_accessor :id, :description, :number_of_schedules, :period_unit, :period, :created_at, :resource_version,
|
9
|
+
:updated_at, :preferred_schedules
|
10
|
+
|
11
|
+
# OPERATIONS
|
12
|
+
#-----------
|
13
|
+
|
14
|
+
def self.create(params, env=nil, headers={})
|
15
|
+
Request.send('post', uri_path("payment_schedule_schemes"), params, env, headers)
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.retrieve(id, env=nil, headers={})
|
19
|
+
Request.send('get', uri_path("payment_schedule_schemes",id.to_s), {}, env, headers)
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.delete(id, env=nil, headers={})
|
23
|
+
Request.send('post', uri_path("payment_schedule_schemes",id.to_s,"delete"), {}, env, headers)
|
24
|
+
end
|
25
|
+
|
26
|
+
end # ~PaymentScheduleScheme
|
27
|
+
end # ~ChargeBee
|
data/lib/chargebee/result.rb
CHANGED
@@ -106,6 +106,12 @@ module ChargeBee
|
|
106
106
|
return payment_reference_number;
|
107
107
|
end
|
108
108
|
|
109
|
+
def payment_schedule()
|
110
|
+
payment_schedule = get(:payment_schedule, PaymentSchedule,
|
111
|
+
{:schedule_entries => PaymentSchedule::ScheduleEntry});
|
112
|
+
return payment_schedule;
|
113
|
+
end
|
114
|
+
|
109
115
|
def tax_withheld()
|
110
116
|
tax_withheld = get(:tax_withheld, TaxWithheld);
|
111
117
|
return tax_withheld;
|
@@ -289,7 +295,7 @@ module ChargeBee
|
|
289
295
|
|
290
296
|
def item()
|
291
297
|
item = get(:item, Item,
|
292
|
-
{:applicable_items => Item::ApplicableItem});
|
298
|
+
{:applicable_items => Item::ApplicableItem, :bundle_items => Item::BundleItem, :bundle_configuration => Item::BundleConfiguration});
|
293
299
|
return item;
|
294
300
|
end
|
295
301
|
|
@@ -413,21 +419,10 @@ module ChargeBee
|
|
413
419
|
return ramp;
|
414
420
|
end
|
415
421
|
|
416
|
-
def
|
417
|
-
|
418
|
-
{:
|
419
|
-
return
|
420
|
-
end
|
421
|
-
|
422
|
-
def installment()
|
423
|
-
installment = get(:installment, Installment);
|
424
|
-
return installment;
|
425
|
-
end
|
426
|
-
|
427
|
-
def installment_detail()
|
428
|
-
installment_detail = get(:installment_detail, InstallmentDetail,
|
429
|
-
{:installments => InstallmentDetail::Installment});
|
430
|
-
return installment_detail;
|
422
|
+
def payment_schedule_scheme()
|
423
|
+
payment_schedule_scheme = get(:payment_schedule_scheme, PaymentScheduleScheme,
|
424
|
+
{:preferred_schedules => PaymentScheduleScheme::PreferredSchedule});
|
425
|
+
return payment_schedule_scheme;
|
431
426
|
end
|
432
427
|
|
433
428
|
def pricing_page_session()
|
@@ -453,6 +448,12 @@ module ChargeBee
|
|
453
448
|
return invoices;
|
454
449
|
end
|
455
450
|
|
451
|
+
def payment_schedules()
|
452
|
+
payment_schedules = get_list(:payment_schedules, PaymentSchedule,
|
453
|
+
{:schedule_entries => PaymentSchedule::ScheduleEntry});
|
454
|
+
return payment_schedules;
|
455
|
+
end
|
456
|
+
|
456
457
|
def credit_notes()
|
457
458
|
credit_notes = get_list(:credit_notes, CreditNote,
|
458
459
|
{:einvoice => CreditNote::Einvoice, :line_items => CreditNote::LineItem, :discounts => CreditNote::Discount, :line_item_discounts => CreditNote::LineItemDiscount, :line_item_tiers => CreditNote::LineItemTier, :taxes => CreditNote::Tax, :line_item_taxes => CreditNote::LineItemTax, :linked_refunds => CreditNote::LinkedRefund, :allocations => CreditNote::Allocation, :shipping_address => CreditNote::ShippingAddress, :billing_address => CreditNote::BillingAddress, :site_details_at_creation => CreditNote::SiteDetailsAtCreation, :tax_origin => CreditNote::TaxOrigin});
|
data/lib/chargebee/util.rb
CHANGED
@@ -6,7 +6,9 @@ module ChargeBee
|
|
6
6
|
case value
|
7
7
|
when Hash
|
8
8
|
value.each do |k, v|
|
9
|
-
if
|
9
|
+
if k == :metadata or k == :meta_data # metadata is encoded as a JSON string instead of URL-encoded.
|
10
|
+
serialized.merge!({k.to_s => as_str(v)})
|
11
|
+
elsif(v.kind_of? Hash or v.kind_of? Array)
|
10
12
|
serialized.merge!(serialize(v, k))
|
11
13
|
else
|
12
14
|
key = "#{(prefix!=nil) ? prefix:''}#{(prefix!=nil) ? '['+k.to_s+']' : k}#{(idx != nil) ? '['+idx.to_s+']':''}"
|
@@ -17,7 +19,7 @@ module ChargeBee
|
|
17
19
|
value.each_with_index do |v, i|
|
18
20
|
serialized.merge!(serialize(v, prefix, i))
|
19
21
|
end
|
20
|
-
|
22
|
+
else
|
21
23
|
if(idx != nil and prefix != nil)
|
22
24
|
key = "#{prefix}[#{idx.to_s}]"
|
23
25
|
serialized.merge!({key => as_str(value)})
|
data/lib/chargebee.rb
CHANGED
@@ -68,7 +68,6 @@ require File.dirname(__FILE__) + '/chargebee/models/tax_withheld.rb'
|
|
68
68
|
require File.dirname(__FILE__) + '/chargebee/models/token.rb'
|
69
69
|
require File.dirname(__FILE__) + '/chargebee/models/non_subscription.rb'
|
70
70
|
require File.dirname(__FILE__) + '/chargebee/models/price_variant'
|
71
|
-
require File.dirname(__FILE__) + '/chargebee/models/installment_detail'
|
72
71
|
require File.dirname(__FILE__) + '/chargebee/models/ramp'
|
73
72
|
require File.dirname(__FILE__) + '/chargebee/models/business_entity'
|
74
73
|
require File.dirname(__FILE__) + '/chargebee/models/business_entity_transfer'
|
@@ -76,10 +75,12 @@ require File.dirname(__FILE__) + '/chargebee/models/currency'
|
|
76
75
|
require File.dirname(__FILE__) + '/chargebee/models/pricing_page_session'
|
77
76
|
require File.dirname(__FILE__) + '/chargebee/models/metadata'
|
78
77
|
require File.dirname(__FILE__) + '/chargebee/models/customer_entitlement'
|
78
|
+
require File.dirname(__FILE__) + '/chargebee/models/payment_schedule'
|
79
|
+
require File.dirname(__FILE__) + '/chargebee/models/payment_schedule_scheme'
|
79
80
|
|
80
81
|
module ChargeBee
|
81
82
|
|
82
|
-
VERSION = '2.
|
83
|
+
VERSION = '2.44.1'
|
83
84
|
|
84
85
|
@@default_env = nil
|
85
86
|
@@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.
|
4
|
+
version: 2.44.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: 2024-
|
12
|
+
date: 2024-10-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json_pure
|
@@ -152,9 +152,6 @@ files:
|
|
152
152
|
- lib/chargebee/models/impacted_item_price.rb
|
153
153
|
- lib/chargebee/models/impacted_subscription.rb
|
154
154
|
- lib/chargebee/models/in_app_subscription.rb
|
155
|
-
- lib/chargebee/models/installment.rb
|
156
|
-
- lib/chargebee/models/installment_config.rb
|
157
|
-
- lib/chargebee/models/installment_detail.rb
|
158
155
|
- lib/chargebee/models/invoice.rb
|
159
156
|
- lib/chargebee/models/invoice_estimate.rb
|
160
157
|
- lib/chargebee/models/item.rb
|
@@ -167,6 +164,8 @@ files:
|
|
167
164
|
- lib/chargebee/models/order.rb
|
168
165
|
- lib/chargebee/models/payment_intent.rb
|
169
166
|
- lib/chargebee/models/payment_reference_number.rb
|
167
|
+
- lib/chargebee/models/payment_schedule.rb
|
168
|
+
- lib/chargebee/models/payment_schedule_scheme.rb
|
170
169
|
- lib/chargebee/models/payment_source.rb
|
171
170
|
- lib/chargebee/models/payment_voucher.rb
|
172
171
|
- lib/chargebee/models/plan.rb
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module ChargeBee
|
2
|
-
class Installment < Model
|
3
|
-
|
4
|
-
attr_accessor :id, :invoice_id, :date, :amount, :status, :created_at, :resource_version, :updated_at
|
5
|
-
|
6
|
-
# OPERATIONS
|
7
|
-
#-----------
|
8
|
-
|
9
|
-
def self.retrieve(id, env=nil, headers={})
|
10
|
-
Request.send('get', uri_path("installments",id.to_s), {}, env, headers)
|
11
|
-
end
|
12
|
-
|
13
|
-
def self.list(params, env=nil, headers={})
|
14
|
-
Request.send_list_request('get', uri_path("installments"), params, env, headers)
|
15
|
-
end
|
16
|
-
|
17
|
-
end # ~Installment
|
18
|
-
end # ~ChargeBee
|
@@ -1,27 +0,0 @@
|
|
1
|
-
module ChargeBee
|
2
|
-
class InstallmentConfig < Model
|
3
|
-
|
4
|
-
class Installment < Model
|
5
|
-
attr_accessor :period, :amount_percentage
|
6
|
-
end
|
7
|
-
|
8
|
-
attr_accessor :id, :description, :number_of_installments, :period_unit, :period, :preferred_day,
|
9
|
-
:created_at, :resource_version, :updated_at, :installments
|
10
|
-
|
11
|
-
# OPERATIONS
|
12
|
-
#-----------
|
13
|
-
|
14
|
-
def self.create(params, env=nil, headers={})
|
15
|
-
Request.send('post', uri_path("installment_configs"), params, env, headers)
|
16
|
-
end
|
17
|
-
|
18
|
-
def self.retrieve(id, env=nil, headers={})
|
19
|
-
Request.send('get', uri_path("installment_configs",id.to_s), {}, env, headers)
|
20
|
-
end
|
21
|
-
|
22
|
-
def self.delete(id, env=nil, headers={})
|
23
|
-
Request.send('post', uri_path("installment_configs",id.to_s,"delete"), {}, env, headers)
|
24
|
-
end
|
25
|
-
|
26
|
-
end # ~InstallmentConfig
|
27
|
-
end # ~ChargeBee
|
@@ -1,14 +0,0 @@
|
|
1
|
-
module ChargeBee
|
2
|
-
class InstallmentDetail < Model
|
3
|
-
|
4
|
-
class Installment < Model
|
5
|
-
attr_accessor :id, :invoice_id, :date, :amount, :status, :created_at, :resource_version, :updated_at
|
6
|
-
end
|
7
|
-
|
8
|
-
attr_accessor :id, :invoice_id, :amount, :installments
|
9
|
-
|
10
|
-
# OPERATIONS
|
11
|
-
#-----------
|
12
|
-
|
13
|
-
end # ~InstallmentDetail
|
14
|
-
end # ~ChargeBee
|