chargebee 2.39.0 → 2.40.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +29 -0
- data/Gemfile.lock +1 -1
- data/chargebee.gemspec +4 -2
- data/lib/chargebee/models/credit_note.rb +5 -1
- data/lib/chargebee/models/currency.rb +34 -0
- data/lib/chargebee/models/invoice.rb +5 -1
- data/lib/chargebee/models/pricing_page_session.rb +18 -0
- data/lib/chargebee/result.rb +15 -11
- data/lib/chargebee.rb +5 -3
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bfe1b8cb604f21ddc0c2576369a4b8f0160905f
|
4
|
+
data.tar.gz: 4a18277ce05c43f06b3221cea01448c0e4b46f4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6be1dc7f8277dab54c056de01bc2ea77e3c6cc093e3b5c542af2ef1b6d44d63a847de4d9e4463515305d98b6a0ecaedde623a9b62184f0f1f107082b1916fe03
|
7
|
+
data.tar.gz: 420e99f1ee538706d90c7a19fb78c49cc7aa0e7beac2f8088c09cac361fc933bf00bf970a9db71f729d49bca6b84813e8c11f3c74bba89b768d66691f84c84fd
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,32 @@
|
|
1
|
+
### v2.40.0 (2024-07-03)
|
2
|
+
* * *
|
3
|
+
|
4
|
+
#### New resources:
|
5
|
+
* Currency has been added.
|
6
|
+
* PricingPageSession Transfer has been added.
|
7
|
+
|
8
|
+
#### New Enum
|
9
|
+
* cancel_option Enum has been added.
|
10
|
+
|
11
|
+
#### New Enum values:
|
12
|
+
* ONLINE_BANKING_POLAND has been added in PaymentMethod enum.
|
13
|
+
* ONLINE_BANKING_POLAND has been added in PaymentMethodType enum.
|
14
|
+
* ONLINE_BANKING_POLAND has been added in Type enum.
|
15
|
+
* DRAFT has been added in Ramp enum.
|
16
|
+
|
17
|
+
#### New Input parameters:
|
18
|
+
* cancel_option has been added to Estimate#CancelSubscriptionRequest, Estimate#CancelSubscriptionForItemsRequest.
|
19
|
+
* cancel_option has been added to Subscription#CancelForItemsRequest, Subscription#CancelRequest.
|
20
|
+
* statement_descriptor[descriptor] has been added to Purchase#ChargeRequest.
|
21
|
+
|
22
|
+
#### New Attributes:
|
23
|
+
* tax_origin has been added to Invoice.
|
24
|
+
* tax_origin has been added to CreditNote.
|
25
|
+
|
26
|
+
### v2.39.1 (2024-05-28)
|
27
|
+
* * *
|
28
|
+
* Ruby chargebee.rb Import Issue - bugfix
|
29
|
+
|
1
30
|
### v2.39.0 (2024-05-28)
|
2
31
|
* * *
|
3
32
|
|
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.40.0'
|
8
|
+
s.date = '2024-07-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 = {
|
@@ -59,6 +59,7 @@ Gem::Specification.new do |s|
|
|
59
59
|
lib/chargebee/models/credit_note.rb
|
60
60
|
lib/chargebee/models/credit_note_estimate.rb
|
61
61
|
lib/chargebee/models/csv_tax_rule.rb
|
62
|
+
lib/chargebee/models/currency.rb
|
62
63
|
lib/chargebee/models/customer.rb
|
63
64
|
lib/chargebee/models/differential_price.rb
|
64
65
|
lib/chargebee/models/discount.rb
|
@@ -96,6 +97,7 @@ Gem::Specification.new do |s|
|
|
96
97
|
lib/chargebee/models/plan.rb
|
97
98
|
lib/chargebee/models/portal_session.rb
|
98
99
|
lib/chargebee/models/price_variant.rb
|
100
|
+
lib/chargebee/models/pricing_page_session.rb
|
99
101
|
lib/chargebee/models/promotional_credit.rb
|
100
102
|
lib/chargebee/models/purchase.rb
|
101
103
|
lib/chargebee/models/quote.rb
|
@@ -49,6 +49,10 @@ module ChargeBee
|
|
49
49
|
attr_accessor :timezone, :organization_address
|
50
50
|
end
|
51
51
|
|
52
|
+
class TaxOrigin < Model
|
53
|
+
attr_accessor :country, :registration_number
|
54
|
+
end
|
55
|
+
|
52
56
|
attr_accessor :id, :customer_id, :subscription_id, :reference_invoice_id, :type, :reason_code,
|
53
57
|
:status, :vat_number, :date, :price_type, :currency_code, :total, :amount_allocated, :amount_refunded,
|
54
58
|
:amount_available, :refunded_at, :voided_at, :generated_at, :resource_version, :updated_at,
|
@@ -56,7 +60,7 @@ module ChargeBee
|
|
56
60
|
:round_off_amount, :fractional_correction, :line_items, :discounts, :line_item_discounts, :line_item_tiers,
|
57
61
|
:taxes, :line_item_taxes, :linked_refunds, :allocations, :deleted, :tax_category, :local_currency_exchange_rate,
|
58
62
|
:create_reason_code, :vat_number_prefix, :business_entity_id, :shipping_address, :billing_address,
|
59
|
-
:site_details_at_creation
|
63
|
+
:site_details_at_creation, :tax_origin
|
60
64
|
|
61
65
|
# OPERATIONS
|
62
66
|
#-----------
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class Currency < Model
|
3
|
+
|
4
|
+
attr_accessor :id, :enabled, :forex_type, :currency_code, :is_base_currency, :manual_exchange_rate
|
5
|
+
|
6
|
+
# OPERATIONS
|
7
|
+
#-----------
|
8
|
+
|
9
|
+
def self.list(env=nil, headers={})
|
10
|
+
Request.send_list_request('get', uri_path("currencies","list"), {}, env, headers)
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.retrieve(id, env=nil, headers={})
|
14
|
+
Request.send('get', uri_path("currencies",id.to_s), {}, env, headers)
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.create(params, env=nil, headers={})
|
18
|
+
Request.send('post', uri_path("currencies"), params, env, headers)
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.update(id, params, env=nil, headers={})
|
22
|
+
Request.send('post', uri_path("currencies",id.to_s), params, env, headers)
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.add_schedule(id, params, env=nil, headers={})
|
26
|
+
Request.send('post', uri_path("currencies",id.to_s,"add_schedule"), params, env, headers)
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.remove_schedule(id, env=nil, headers={})
|
30
|
+
Request.send('post', uri_path("currencies",id.to_s,"remove_schedule"), {}, env, headers)
|
31
|
+
end
|
32
|
+
|
33
|
+
end # ~Currency
|
34
|
+
end # ~ChargeBee
|
@@ -73,6 +73,10 @@ module ChargeBee
|
|
73
73
|
attr_accessor :timezone, :organization_address
|
74
74
|
end
|
75
75
|
|
76
|
+
class TaxOrigin < Model
|
77
|
+
attr_accessor :country, :registration_number
|
78
|
+
end
|
79
|
+
|
76
80
|
attr_accessor :id, :po_number, :customer_id, :subscription_id, :recurring, :status, :vat_number,
|
77
81
|
:price_type, :date, :due_date, :net_term_days, :exchange_rate, :currency_code, :total, :amount_paid,
|
78
82
|
:amount_adjusted, :write_off_amount, :credits_applied, :amount_due, :paid_at, :dunning_status,
|
@@ -83,7 +87,7 @@ module ChargeBee
|
|
83
87
|
:line_item_taxes, :line_item_tiers, :linked_payments, :dunning_attempts, :applied_credits, :adjustment_credit_notes,
|
84
88
|
:issued_credit_notes, :linked_orders, :notes, :shipping_address, :statement_descriptor, :billing_address,
|
85
89
|
:einvoice, :payment_owner, :void_reason_code, :deleted, :tax_category, :vat_number_prefix, :channel,
|
86
|
-
:business_entity_id, :site_details_at_creation
|
90
|
+
:business_entity_id, :site_details_at_creation, :tax_origin
|
87
91
|
|
88
92
|
# OPERATIONS
|
89
93
|
#-----------
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class PricingPageSession < Model
|
3
|
+
|
4
|
+
attr_accessor :id, :url, :created_at, :expires_at
|
5
|
+
|
6
|
+
# OPERATIONS
|
7
|
+
#-----------
|
8
|
+
|
9
|
+
def self.create_for_new_subscription(params, env=nil, headers={})
|
10
|
+
Request.send('post', uri_path("pricing_page_sessions","create_for_new_subscription"), params, env, headers)
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.create_for_existing_subscription(params, env=nil, headers={})
|
14
|
+
Request.send('post', uri_path("pricing_page_sessions","create_for_existing_subscription"), params, env, headers)
|
15
|
+
end
|
16
|
+
|
17
|
+
end # ~PricingPageSession
|
18
|
+
end # ~ChargeBee
|
data/lib/chargebee/result.rb
CHANGED
@@ -97,7 +97,7 @@ module ChargeBee
|
|
97
97
|
|
98
98
|
def invoice()
|
99
99
|
invoice = get(:invoice, Invoice,
|
100
|
-
{:line_items => Invoice::LineItem, :discounts => Invoice::Discount, :line_item_discounts => Invoice::LineItemDiscount, :taxes => Invoice::Tax, :line_item_taxes => Invoice::LineItemTax, :line_item_tiers => Invoice::LineItemTier, :linked_payments => Invoice::LinkedPayment, :dunning_attempts => Invoice::DunningAttempt, :applied_credits => Invoice::AppliedCredit, :adjustment_credit_notes => Invoice::AdjustmentCreditNote, :issued_credit_notes => Invoice::IssuedCreditNote, :linked_orders => Invoice::LinkedOrder, :notes => Invoice::Note, :shipping_address => Invoice::ShippingAddress, :statement_descriptor => Invoice::StatementDescriptor, :billing_address => Invoice::BillingAddress, :einvoice => Invoice::Einvoice, :site_details_at_creation => Invoice::SiteDetailsAtCreation});
|
100
|
+
{:line_items => Invoice::LineItem, :discounts => Invoice::Discount, :line_item_discounts => Invoice::LineItemDiscount, :taxes => Invoice::Tax, :line_item_taxes => Invoice::LineItemTax, :line_item_tiers => Invoice::LineItemTier, :linked_payments => Invoice::LinkedPayment, :dunning_attempts => Invoice::DunningAttempt, :applied_credits => Invoice::AppliedCredit, :adjustment_credit_notes => Invoice::AdjustmentCreditNote, :issued_credit_notes => Invoice::IssuedCreditNote, :linked_orders => Invoice::LinkedOrder, :notes => Invoice::Note, :shipping_address => Invoice::ShippingAddress, :statement_descriptor => Invoice::StatementDescriptor, :billing_address => Invoice::BillingAddress, :einvoice => Invoice::Einvoice, :site_details_at_creation => Invoice::SiteDetailsAtCreation, :tax_origin => Invoice::TaxOrigin});
|
101
101
|
return invoice;
|
102
102
|
end
|
103
103
|
|
@@ -113,7 +113,7 @@ module ChargeBee
|
|
113
113
|
|
114
114
|
def credit_note()
|
115
115
|
credit_note = get(:credit_note, CreditNote,
|
116
|
-
{: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});
|
116
|
+
{: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});
|
117
117
|
return credit_note;
|
118
118
|
end
|
119
119
|
|
@@ -387,6 +387,11 @@ module ChargeBee
|
|
387
387
|
return payment_voucher;
|
388
388
|
end
|
389
389
|
|
390
|
+
def currency()
|
391
|
+
currency = get(:currency, Currency);
|
392
|
+
return currency;
|
393
|
+
end
|
394
|
+
|
390
395
|
def ramp()
|
391
396
|
ramp = get(:ramp, Ramp,
|
392
397
|
{:items_to_add => Ramp::ItemsToAdd, :items_to_update => Ramp::ItemsToUpdate, :coupons_to_add => Ramp::CouponsToAdd, :discounts_to_add => Ramp::DiscountsToAdd, :item_tiers => Ramp::ItemTier});
|
@@ -410,6 +415,11 @@ module ChargeBee
|
|
410
415
|
return installment_detail;
|
411
416
|
end
|
412
417
|
|
418
|
+
def pricing_page_session()
|
419
|
+
pricing_page_session = get(:pricing_page_session, PricingPageSession);
|
420
|
+
return pricing_page_session;
|
421
|
+
end
|
422
|
+
|
413
423
|
def advance_invoice_schedules()
|
414
424
|
advance_invoice_schedules = get_list(:advance_invoice_schedules, AdvanceInvoiceSchedule,
|
415
425
|
{:fixed_interval_schedule => AdvanceInvoiceSchedule::FixedIntervalSchedule, :specific_dates_schedule => AdvanceInvoiceSchedule::SpecificDatesSchedule});
|
@@ -424,19 +434,13 @@ module ChargeBee
|
|
424
434
|
|
425
435
|
def invoices()
|
426
436
|
invoices = get_list(:invoices, Invoice,
|
427
|
-
{:line_items => Invoice::LineItem, :discounts => Invoice::Discount, :line_item_discounts => Invoice::LineItemDiscount, :taxes => Invoice::Tax, :line_item_taxes => Invoice::LineItemTax, :line_item_tiers => Invoice::LineItemTier, :linked_payments => Invoice::LinkedPayment, :dunning_attempts => Invoice::DunningAttempt, :applied_credits => Invoice::AppliedCredit, :adjustment_credit_notes => Invoice::AdjustmentCreditNote, :issued_credit_notes => Invoice::IssuedCreditNote, :linked_orders => Invoice::LinkedOrder, :notes => Invoice::Note, :shipping_address => Invoice::ShippingAddress, :statement_descriptor => Invoice::StatementDescriptor, :billing_address => Invoice::BillingAddress, :einvoice => Invoice::Einvoice, :site_details_at_creation => Invoice::SiteDetailsAtCreation});
|
437
|
+
{:line_items => Invoice::LineItem, :discounts => Invoice::Discount, :line_item_discounts => Invoice::LineItemDiscount, :taxes => Invoice::Tax, :line_item_taxes => Invoice::LineItemTax, :line_item_tiers => Invoice::LineItemTier, :linked_payments => Invoice::LinkedPayment, :dunning_attempts => Invoice::DunningAttempt, :applied_credits => Invoice::AppliedCredit, :adjustment_credit_notes => Invoice::AdjustmentCreditNote, :issued_credit_notes => Invoice::IssuedCreditNote, :linked_orders => Invoice::LinkedOrder, :notes => Invoice::Note, :shipping_address => Invoice::ShippingAddress, :statement_descriptor => Invoice::StatementDescriptor, :billing_address => Invoice::BillingAddress, :einvoice => Invoice::Einvoice, :site_details_at_creation => Invoice::SiteDetailsAtCreation, :tax_origin => Invoice::TaxOrigin});
|
428
438
|
return invoices;
|
429
439
|
end
|
430
440
|
|
431
|
-
def
|
432
|
-
differential_prices = get_list(:differential_prices, DifferentialPrice,
|
433
|
-
{:tiers => DifferentialPrice::Tier, :parent_periods => DifferentialPrice::ParentPeriod});
|
434
|
-
return differential_prices;
|
435
|
-
end
|
436
|
-
|
437
|
-
def credit_notes()
|
441
|
+
def credit_notes()
|
438
442
|
credit_notes = get_list(:credit_notes, CreditNote,
|
439
|
-
{: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});
|
443
|
+
{: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});
|
440
444
|
return credit_notes;
|
441
445
|
end
|
442
446
|
|
data/lib/chargebee.rb
CHANGED
@@ -70,12 +70,14 @@ require File.dirname(__FILE__) + '/chargebee/models/non_subscription.rb'
|
|
70
70
|
require File.dirname(__FILE__) + '/chargebee/models/price_variant'
|
71
71
|
require File.dirname(__FILE__) + '/chargebee/models/installment_detail'
|
72
72
|
require File.dirname(__FILE__) + '/chargebee/models/ramp'
|
73
|
-
require File.dirname(__FILE__) + '
|
74
|
-
require File.dirname(__FILE__) + '
|
73
|
+
require File.dirname(__FILE__) + '/chargebee/models/business_entity'
|
74
|
+
require File.dirname(__FILE__) + '/chargebee/models/business_entity_transfer'
|
75
|
+
require File.dirname(__FILE__) + '/chargebee/models/currency'
|
76
|
+
require File.dirname(__FILE__) + '/chargebee/models/pricing_page_session'
|
75
77
|
|
76
78
|
module ChargeBee
|
77
79
|
|
78
|
-
VERSION = '2.
|
80
|
+
VERSION = '2.40.0'
|
79
81
|
|
80
82
|
@@default_env = nil
|
81
83
|
@@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.40.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: 2024-
|
12
|
+
date: 2024-07-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json_pure
|
@@ -132,6 +132,7 @@ files:
|
|
132
132
|
- lib/chargebee/models/credit_note.rb
|
133
133
|
- lib/chargebee/models/credit_note_estimate.rb
|
134
134
|
- lib/chargebee/models/csv_tax_rule.rb
|
135
|
+
- lib/chargebee/models/currency.rb
|
135
136
|
- lib/chargebee/models/customer.rb
|
136
137
|
- lib/chargebee/models/differential_price.rb
|
137
138
|
- lib/chargebee/models/discount.rb
|
@@ -169,6 +170,7 @@ files:
|
|
169
170
|
- lib/chargebee/models/plan.rb
|
170
171
|
- lib/chargebee/models/portal_session.rb
|
171
172
|
- lib/chargebee/models/price_variant.rb
|
173
|
+
- lib/chargebee/models/pricing_page_session.rb
|
172
174
|
- lib/chargebee/models/promotional_credit.rb
|
173
175
|
- lib/chargebee/models/purchase.rb
|
174
176
|
- lib/chargebee/models/quote.rb
|