chargebee 2.47.1 → 2.48.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 +41 -0
- data/Gemfile.lock +1 -1
- data/chargebee.gemspec +3 -2
- data/lib/chargebee/errors.rb +2 -1
- data/lib/chargebee/models/configuration.rb +14 -0
- data/lib/chargebee/models/credit_note.rb +1 -1
- data/lib/chargebee/models/credit_note_estimate.rb +1 -1
- data/lib/chargebee/models/gateway_error_detail.rb +1 -1
- data/lib/chargebee/models/invoice.rb +1 -1
- data/lib/chargebee/models/invoice_estimate.rb +1 -1
- data/lib/chargebee/models/omnichannel_subscription.rb +5 -1
- data/lib/chargebee/models/omnichannel_subscription_item.rb +1 -1
- data/lib/chargebee/models/quote.rb +3 -2
- data/lib/chargebee/models/quote_line_group.rb +1 -1
- data/lib/chargebee/models/quoted_subscription.rb +1 -1
- data/lib/chargebee/models/subscription.rb +8 -4
- data/lib/chargebee/models/transaction.rb +1 -1
- data/lib/chargebee/result.rb +14 -3
- data/lib/chargebee.rb +2 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f35c3629f938f3db764288c1d2c9912bf8a09f04
|
4
|
+
data.tar.gz: 73bb6f3da742431e15568e749ac4504b217339a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e5f6ab315172e433117dcac5f3abe73383df3821fb2133e2fbe3eaf0c5eb6d248f489c5750938f13ea7792de1e64c78ef5992566d62644a98030ba7483c817b
|
7
|
+
data.tar.gz: 611845925d8b5d050d1ba30e6987d190f5724549ccaa9cb5f4d5b6d6ef9c0bf5221cbc8a4b1c47dbb4ed8dca9ddbb76e1364ac8712d729da521a0b2e3fe0b8c1
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,44 @@
|
|
1
|
+
### v2.48.0 (2024-12-19)
|
2
|
+
* * *
|
3
|
+
|
4
|
+
#### New Resource:
|
5
|
+
* Configuration has been added.
|
6
|
+
|
7
|
+
#### New Attribute:
|
8
|
+
* discount_type has been added to CreditNote#Discount.
|
9
|
+
* discount_type has been added to CreditNoteEstimate#Discount.
|
10
|
+
* discount_type has been added to Invoice#Discount.
|
11
|
+
* discount_type has been added to InvoiceEstimate#Discount.
|
12
|
+
* discount_type has been added to QuoteLineGroup#Discount.
|
13
|
+
* initial_purchase_transaction has been added to OmnichannelSubscription.
|
14
|
+
* error_cause_id has been added to GatewayErrorDetail.
|
15
|
+
* error_cause_id has been added to Transaction#GatewayErrorDetail.
|
16
|
+
* error_cause_id has been added to APIError.
|
17
|
+
* deleted has been added to Quote.
|
18
|
+
* current_term_start has been added to QuotedSubscripiton#SubscriptionItem.
|
19
|
+
* current_term_end has been added to QuotedSubscripiton#SubscriptionItem.
|
20
|
+
* next_billing_at has been added to QuotedSubscripiton#SubscriptionItem.
|
21
|
+
* current_term_start has been added to Subscription#SubscriptionItem.
|
22
|
+
* current_term_end has been added to Subscription#SubscriptionItem.
|
23
|
+
* next_billing_at has been added to Subscription#SubscriptionItem.
|
24
|
+
* billing_override has been added to Subscription.
|
25
|
+
* grace_period_expires_at has been added to OmnichannelSubscriptionItem.
|
26
|
+
|
27
|
+
#### New Input Params:
|
28
|
+
* billing_override has been added to Subscription#CreateWithItemsInputParam.
|
29
|
+
* billing_override has been added to Subscription#UpdateForItemsInputParam.
|
30
|
+
|
31
|
+
#### New Enum Values:
|
32
|
+
* OMNICHANNEL_SUBSCRIPTION_IMPORTED has been added to EventTypeEnum.
|
33
|
+
* DISABLED has been added to Event#WebhookStatus.
|
34
|
+
* OMNICHANNEL_SUBSCRIPTION_ITEM_GRACE_PERIOD_STARTED has been added to EventTypeEnum.
|
35
|
+
* OMNICHANNEL_SUBSCRIPTION_ITEM_GRACE_PERIOD_EXPIRED has been added to EventTypeEnum.
|
36
|
+
* OMNICHANNEL_SUBSCRIPTION_ITEM_DUNNING_STARTED has been added to EventTypeEnum.
|
37
|
+
* OMNICHANNEL_SUBSCRIPTION_ITEM_DUNNING_EXPIRED has been added to EventTypeEnum.
|
38
|
+
* IGNORED has been added to RecordedPurchase#StatusEnum.
|
39
|
+
* IN_DUNNING & IN_GRACE_PERIOD have been added to OmnichannelSubscriptionItem#StatusEnum.
|
40
|
+
|
41
|
+
|
1
42
|
### v2.47.1 (2024-12-10)
|
2
43
|
|
3
44
|
#### New Feature:
|
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-12-
|
7
|
+
s.version = '2.48.0'
|
8
|
+
s.date = '2024-12-19'
|
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 = {
|
@@ -51,6 +51,7 @@ Gem::Specification.new do |s|
|
|
51
51
|
lib/chargebee/models/business_entity_transfer.rb
|
52
52
|
lib/chargebee/models/card.rb
|
53
53
|
lib/chargebee/models/comment.rb
|
54
|
+
lib/chargebee/models/configuration.rb
|
54
55
|
lib/chargebee/models/contact.rb
|
55
56
|
lib/chargebee/models/contract_term.rb
|
56
57
|
lib/chargebee/models/coupon.rb
|
data/lib/chargebee/errors.rb
CHANGED
@@ -13,7 +13,7 @@ module ChargeBee
|
|
13
13
|
|
14
14
|
class APIError < Error
|
15
15
|
|
16
|
-
attr_reader :http_status_code, :type, :api_error_code, :param, :json_obj,
|
16
|
+
attr_reader :http_status_code, :type, :api_error_code, :param, :json_obj, :error_cause_id,
|
17
17
|
#Deprecated attributes
|
18
18
|
:http_code, :http_body, :error_code
|
19
19
|
|
@@ -24,6 +24,7 @@ module ChargeBee
|
|
24
24
|
@type = json_obj[:type]
|
25
25
|
@api_error_code = json_obj[:api_error_code]
|
26
26
|
@param = json_obj[:param]
|
27
|
+
@error_cause_id = json_obj[:error_cause_id]
|
27
28
|
|
28
29
|
#Deprecated attributes
|
29
30
|
@error_code = json_obj[:error_code]
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class Configuration < Model
|
3
|
+
|
4
|
+
attr_accessor :domain, :product_catalog_version
|
5
|
+
|
6
|
+
# OPERATIONS
|
7
|
+
#-----------
|
8
|
+
|
9
|
+
def self.list(env=nil, headers={})
|
10
|
+
Request.send_list_request('get', uri_path("configurations"), {}, env, headers)
|
11
|
+
end
|
12
|
+
|
13
|
+
end # ~Configuration
|
14
|
+
end # ~ChargeBee
|
@@ -10,7 +10,7 @@ module ChargeBee
|
|
10
10
|
end
|
11
11
|
|
12
12
|
class Discount < Model
|
13
|
-
attr_accessor :amount, :description, :entity_type, :entity_id, :coupon_set_code
|
13
|
+
attr_accessor :amount, :description, :entity_type, :discount_type, :entity_id, :coupon_set_code
|
14
14
|
end
|
15
15
|
|
16
16
|
class LineItemDiscount < Model
|
@@ -3,7 +3,7 @@ module ChargeBee
|
|
3
3
|
|
4
4
|
attr_accessor :request_id, :error_category, :error_code, :error_message, :decline_code, :decline_message,
|
5
5
|
:network_error_code, :network_error_message, :error_field, :recommendation_code, :recommendation_message,
|
6
|
-
:processor_error_code, :processor_error_message
|
6
|
+
:processor_error_code, :processor_error_message, :error_cause_id
|
7
7
|
|
8
8
|
# OPERATIONS
|
9
9
|
#-----------
|
@@ -6,7 +6,7 @@ module ChargeBee
|
|
6
6
|
end
|
7
7
|
|
8
8
|
class Discount < Model
|
9
|
-
attr_accessor :amount, :description, :entity_type, :entity_id, :coupon_set_code
|
9
|
+
attr_accessor :amount, :description, :entity_type, :discount_type, :entity_id, :coupon_set_code
|
10
10
|
end
|
11
11
|
|
12
12
|
class LineItemDiscount < Model
|
@@ -1,8 +1,12 @@
|
|
1
1
|
module ChargeBee
|
2
2
|
class OmnichannelSubscription < Model
|
3
3
|
|
4
|
+
class OmnichannelTransaction < Model
|
5
|
+
attr_accessor :id, :id_at_source, :app_id, :price_currency, :price_units, :price_nanos, :type, :transacted_at, :created_at, :resource_version
|
6
|
+
end
|
7
|
+
|
4
8
|
attr_accessor :id, :id_at_source, :app_id, :source, :customer_id, :created_at, :resource_version,
|
5
|
-
:omnichannel_subscription_items
|
9
|
+
:omnichannel_subscription_items, :initial_purchase_transaction
|
6
10
|
|
7
11
|
# OPERATIONS
|
8
12
|
#-----------
|
@@ -2,7 +2,7 @@ module ChargeBee
|
|
2
2
|
class OmnichannelSubscriptionItem < Model
|
3
3
|
|
4
4
|
attr_accessor :id, :item_id_at_source, :status, :current_term_start, :current_term_end, :expired_at,
|
5
|
-
:expiration_reason, :cancelled_at, :cancellation_reason, :resource_version
|
5
|
+
:expiration_reason, :cancelled_at, :cancellation_reason, :grace_period_expires_at, :resource_version
|
6
6
|
|
7
7
|
# OPERATIONS
|
8
8
|
#-----------
|
@@ -6,7 +6,7 @@ module ChargeBee
|
|
6
6
|
end
|
7
7
|
|
8
8
|
class Discount < Model
|
9
|
-
attr_accessor :amount, :description, :entity_type, :entity_id, :coupon_set_code
|
9
|
+
attr_accessor :amount, :description, :entity_type, :discount_type, :entity_id, :coupon_set_code
|
10
10
|
end
|
11
11
|
|
12
12
|
class LineItemDiscount < Model
|
@@ -38,7 +38,8 @@ module ChargeBee
|
|
38
38
|
:sub_total, :total, :credits_applied, :amount_paid, :amount_due, :version, :resource_version,
|
39
39
|
:updated_at, :vat_number_prefix, :line_items, :discounts, :line_item_discounts, :taxes, :line_item_taxes,
|
40
40
|
:line_item_tiers, :tax_category, :currency_code, :notes, :shipping_address, :billing_address,
|
41
|
-
:contract_term_start, :contract_term_end, :contract_term_termination_fee, :business_entity_id
|
41
|
+
:contract_term_start, :contract_term_end, :contract_term_termination_fee, :business_entity_id,
|
42
|
+
:deleted
|
42
43
|
|
43
44
|
# OPERATIONS
|
44
45
|
#-----------
|
@@ -6,7 +6,7 @@ module ChargeBee
|
|
6
6
|
end
|
7
7
|
|
8
8
|
class Discount < Model
|
9
|
-
attr_accessor :amount, :description, :entity_type, :entity_id, :coupon_set_code
|
9
|
+
attr_accessor :amount, :description, :entity_type, :discount_type, :entity_id, :coupon_set_code
|
10
10
|
end
|
11
11
|
|
12
12
|
class LineItemDiscount < Model
|
@@ -14,7 +14,7 @@ module ChargeBee
|
|
14
14
|
end
|
15
15
|
|
16
16
|
class SubscriptionItem < Model
|
17
|
-
attr_accessor :item_price_id, :item_type, :quantity, :quantity_in_decimal, :metered_quantity, :last_calculated_at, :unit_price, :unit_price_in_decimal, :amount, :amount_in_decimal, :billing_period, :billing_period_unit, :free_quantity, :free_quantity_in_decimal, :trial_end, :billing_cycles, :service_period_days, :charge_on_event, :charge_once, :charge_on_option, :proration_type, :usage_accumulation_reset_frequency
|
17
|
+
attr_accessor :item_price_id, :item_type, :quantity, :quantity_in_decimal, :metered_quantity, :last_calculated_at, :unit_price, :unit_price_in_decimal, :amount, :current_term_start, :current_term_end, :next_billing_at, :amount_in_decimal, :billing_period, :billing_period_unit, :free_quantity, :free_quantity_in_decimal, :trial_end, :billing_cycles, :service_period_days, :charge_on_event, :charge_once, :charge_on_option, :proration_type, :usage_accumulation_reset_frequency
|
18
18
|
end
|
19
19
|
|
20
20
|
class ItemTier < Model
|
@@ -2,7 +2,7 @@ module ChargeBee
|
|
2
2
|
class Subscription < Model
|
3
3
|
|
4
4
|
class SubscriptionItem < Model
|
5
|
-
attr_accessor :item_price_id, :item_type, :quantity, :quantity_in_decimal, :metered_quantity, :last_calculated_at, :unit_price, :unit_price_in_decimal, :amount, :amount_in_decimal, :billing_period, :billing_period_unit, :free_quantity, :free_quantity_in_decimal, :trial_end, :billing_cycles, :service_period_days, :charge_on_event, :charge_once, :charge_on_option, :proration_type, :usage_accumulation_reset_frequency
|
5
|
+
attr_accessor :item_price_id, :item_type, :quantity, :quantity_in_decimal, :metered_quantity, :last_calculated_at, :unit_price, :unit_price_in_decimal, :amount, :current_term_start, :current_term_end, :next_billing_at, :amount_in_decimal, :billing_period, :billing_period_unit, :free_quantity, :free_quantity_in_decimal, :trial_end, :billing_cycles, :service_period_days, :charge_on_event, :charge_once, :charge_on_option, :proration_type, :usage_accumulation_reset_frequency
|
6
6
|
end
|
7
7
|
|
8
8
|
class ItemTier < Model
|
@@ -37,6 +37,10 @@ module ChargeBee
|
|
37
37
|
attr_accessor :referral_code, :coupon_code, :referrer_id, :external_reference_id, :reward_status, :referral_system, :account_id, :campaign_id, :external_campaign_id, :friend_offer_type, :referrer_reward_type, :notify_referral_system, :destination_url, :post_purchase_widget_enabled
|
38
38
|
end
|
39
39
|
|
40
|
+
class BillingOverride < Model
|
41
|
+
attr_accessor :max_excess_payment_usage, :max_refundable_credits_usage
|
42
|
+
end
|
43
|
+
|
40
44
|
class ContractTerm < Model
|
41
45
|
attr_accessor :id, :status, :contract_start, :contract_end, :billing_cycle, :action_at_term_end, :total_contract_value, :total_contract_value_before_tax, :cancellation_cutoff_period, :created_at, :subscription_id, :remaining_billing_cycles
|
42
46
|
end
|
@@ -56,9 +60,9 @@ module ChargeBee
|
|
56
60
|
:offline_payment_method, :channel, :net_term_days, :active_id, :subscription_items, :item_tiers,
|
57
61
|
:charged_items, :due_invoices_count, :due_since, :total_dues, :mrr, :arr, :exchange_rate, :base_currency_code,
|
58
62
|
:addons, :event_based_addons, :charged_event_based_addons, :coupon, :coupons, :shipping_address,
|
59
|
-
:referral_info, :invoice_notes, :meta_data, :deleted, :changes_scheduled_at,
|
60
|
-
:cancel_reason_code, :free_period, :free_period_unit, :create_pending_invoices,
|
61
|
-
:discounts, :business_entity_id, :metadata
|
63
|
+
:referral_info, :billing_override, :invoice_notes, :meta_data, :deleted, :changes_scheduled_at,
|
64
|
+
:contract_term, :cancel_reason_code, :free_period, :free_period_unit, :create_pending_invoices,
|
65
|
+
:auto_close_invoices, :discounts, :business_entity_id, :metadata
|
62
66
|
def metadata
|
63
67
|
warn "[DEPRECATION] `metadata` is deprecated please use meta_data instead."
|
64
68
|
@metadata
|
@@ -18,7 +18,7 @@ module ChargeBee
|
|
18
18
|
end
|
19
19
|
|
20
20
|
class GatewayErrorDetail < Model
|
21
|
-
attr_accessor :request_id, :error_category, :error_code, :error_message, :decline_code, :decline_message, :network_error_code, :network_error_message, :error_field, :recommendation_code, :recommendation_message, :processor_error_code, :processor_error_message
|
21
|
+
attr_accessor :request_id, :error_category, :error_code, :error_message, :decline_code, :decline_message, :network_error_code, :network_error_message, :error_field, :recommendation_code, :recommendation_message, :processor_error_code, :processor_error_message, :error_cause_id
|
22
22
|
end
|
23
23
|
|
24
24
|
attr_accessor :id, :customer_id, :subscription_id, :gateway_account_id, :payment_source_id,
|
data/lib/chargebee/result.rb
CHANGED
@@ -23,7 +23,7 @@ module ChargeBee
|
|
23
23
|
|
24
24
|
def subscription()
|
25
25
|
subscription = get(:subscription, Subscription,
|
26
|
-
{:subscription_items => Subscription::SubscriptionItem, :item_tiers => Subscription::ItemTier, :charged_items => Subscription::ChargedItem, :addons => Subscription::Addon, :event_based_addons => Subscription::EventBasedAddon, :charged_event_based_addons => Subscription::ChargedEventBasedAddon, :coupons => Subscription::Coupon, :shipping_address => Subscription::ShippingAddress, :referral_info => Subscription::ReferralInfo, :contract_term => Subscription::ContractTerm, :discounts => Subscription::Discount});
|
26
|
+
{:subscription_items => Subscription::SubscriptionItem, :item_tiers => Subscription::ItemTier, :charged_items => Subscription::ChargedItem, :addons => Subscription::Addon, :event_based_addons => Subscription::EventBasedAddon, :charged_event_based_addons => Subscription::ChargedEventBasedAddon, :coupons => Subscription::Coupon, :shipping_address => Subscription::ShippingAddress, :referral_info => Subscription::ReferralInfo, :billing_override => Subscription::BillingOverride, :contract_term => Subscription::ContractTerm, :discounts => Subscription::Discount});
|
27
27
|
return subscription;
|
28
28
|
end
|
29
29
|
|
@@ -329,6 +329,11 @@ module ChargeBee
|
|
329
329
|
return differential_price;
|
330
330
|
end
|
331
331
|
|
332
|
+
def configuration()
|
333
|
+
configuration = get(:configuration, Configuration);
|
334
|
+
return configuration;
|
335
|
+
end
|
336
|
+
|
332
337
|
def feature()
|
333
338
|
feature = get(:feature, Feature,
|
334
339
|
{:levels => Feature::Level});
|
@@ -389,7 +394,7 @@ module ChargeBee
|
|
389
394
|
return non_subscription;
|
390
395
|
end
|
391
396
|
|
392
|
-
def entitlement_override()
|
397
|
+
def entitlement_override()
|
393
398
|
entitlement_override = get(:entitlement_override, EntitlementOverride);
|
394
399
|
return entitlement_override;
|
395
400
|
end
|
@@ -498,6 +503,12 @@ module ChargeBee
|
|
498
503
|
return downloads;
|
499
504
|
end
|
500
505
|
|
506
|
+
def configurations()
|
507
|
+
configurations = get_list(:configurations, Configuration,
|
508
|
+
{});
|
509
|
+
return configurations;
|
510
|
+
end
|
511
|
+
|
501
512
|
def in_app_subscriptions()
|
502
513
|
in_app_subscriptions = get_list(:in_app_subscriptions, InAppSubscription,
|
503
514
|
{});
|
@@ -510,7 +521,7 @@ module ChargeBee
|
|
510
521
|
end
|
511
522
|
|
512
523
|
def get_raw_response()
|
513
|
-
|
524
|
+
@response;
|
514
525
|
end
|
515
526
|
|
516
527
|
private
|
data/lib/chargebee.rb
CHANGED
@@ -82,11 +82,12 @@ require File.dirname(__FILE__) + '/chargebee/models/omnichannel_subscription'
|
|
82
82
|
require File.dirname(__FILE__) + '/chargebee/models/omnichannel_transaction'
|
83
83
|
require File.dirname(__FILE__) + '/chargebee/models/recorded_purchase'
|
84
84
|
require File.dirname(__FILE__) + '/chargebee/models/omnichannel_subscription_item'
|
85
|
+
require File.dirname(__FILE__) + '/chargebee/models/configuration'
|
85
86
|
|
86
87
|
|
87
88
|
module ChargeBee
|
88
89
|
|
89
|
-
VERSION = '2.
|
90
|
+
VERSION = '2.48.0'
|
90
91
|
|
91
92
|
@@default_env = nil
|
92
93
|
@@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.48.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-
|
12
|
+
date: 2024-12-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json_pure
|
@@ -124,6 +124,7 @@ files:
|
|
124
124
|
- lib/chargebee/models/business_entity_transfer.rb
|
125
125
|
- lib/chargebee/models/card.rb
|
126
126
|
- lib/chargebee/models/comment.rb
|
127
|
+
- lib/chargebee/models/configuration.rb
|
127
128
|
- lib/chargebee/models/contact.rb
|
128
129
|
- lib/chargebee/models/contract_term.rb
|
129
130
|
- lib/chargebee/models/coupon.rb
|