chargebee 2.18.0 → 2.19.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 +21 -0
- data/chargebee.gemspec +2 -2
- data/lib/chargebee/models/customer.rb +1 -1
- data/lib/chargebee/models/purchase.rb +0 -4
- data/lib/chargebee/models/subscription.rb +10 -1
- data/lib/chargebee/result.rb +1 -1
- data/lib/chargebee.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18ef136d2026d74d5b20a00970b4b75fe659ee29
|
4
|
+
data.tar.gz: 0d763f180f2856ec9c9a28500c85e6e89074f056
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97c07fb3668490dec82f73640ae16cd12ccc77aaf23b3ca1dbad31cf3e410834e644aeae63c824a787e8c8ac1a57bcc183046a20e1a0b144fa5fdf857adb81dd
|
7
|
+
data.tar.gz: b3b2615fac6707599daf6cf4659b68cc05faf51391050ea8797b53effc28793a980084afa641a1ae1f897f5cf431c5b801fb8f06886edeaab7c5d9008c75ae35
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,24 @@
|
|
1
|
+
### v2.19.0 (2022-09-20)
|
2
|
+
* * *
|
3
|
+
|
4
|
+
#### New endpoints:
|
5
|
+
* subscriptions#list_discounts has been added to the subscriptions resource.
|
6
|
+
|
7
|
+
#### New attributes:
|
8
|
+
* billing_month has been added to the customer resource.
|
9
|
+
|
10
|
+
#### Added input parameters:
|
11
|
+
* billing_month has been added to the customers#change_billing_date API.
|
12
|
+
* line_items[subscription_id] has been added to the invoices#import_invoice API.
|
13
|
+
* layout has been added to hosted_pages#checkout_onetime_for_items, hosted_pages#checkout_new_for_items and hosted_pages#checkout_existing_for_items APIs.
|
14
|
+
* discounts[apply_on], discounts[percentage], discounts[amount] and discounts[item_price_id] have been added to estimates#create_subscription_for_items, estimates#create_subscription_for_items_estimate, estimates#update_subscription_for_items, hosted_pages#checkout_onetime_for_items, hosted_pages#checkout_new_for_items, hosted_pages#checkout_existing_for_items, invoices#create_for_charge_items_and_charges, quotes#create_subscription_for_items, quotes#edit_create_subscription_quote_for_items, quotes#update_subscription_quote_for_items, quotes#edit_update_subscription_quote_for_items, quotes#create_for_charge_items_and_charges, quotes#edit_for_charge_items_and_charges, subscriptions#create_subscription_for_items, subscriptions#update_subscription_for_items and subscriptions#import_subscription_for_items APIs.
|
15
|
+
* discounts[duration_type], discounts[period], discounts[period_unit] and discounts[included_in_mrr] have been added to estimates#create_subscription_for_items, estimates#create_subscription_for_items_estimate, estimates#update_subscription_for_items, hosted_pages#checkout_new_for_items, hosted_pages#checkout_existing_for_items, quotes#create_subscription_for_items, quotes#edit_create_subscription_quote_for_items, quotes#update_subscription_quote_for_items, quotes#edit_update_subscription_quote_for_items, subscriptions#create_subscription_for_items, subscriptions#update_subscription_for_items and subscriptions#import_subscription_for_items APIs.
|
16
|
+
* discounts[operation_type] and discounts[id] have been added to estimates#update_subscription_for_items, quotes#update_subscription_quote_for_items, hosted_pages#checkout_existing_for_items, quotes#edit_update_subscription_quote_for_items, subscriptions#update_subscription_for_items and subscriptions#import_subscription_for_items APIs.
|
17
|
+
|
18
|
+
#### New Enum values:
|
19
|
+
* global_payments has been added to gateway enum.
|
20
|
+
* layout enum has been added.
|
21
|
+
|
1
22
|
### v2.18.0 (2022-08-22)
|
2
23
|
* * *
|
3
24
|
|
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 = '2022-
|
7
|
+
s.version = '2.19.0'
|
8
|
+
s.date = '2022-09-20'
|
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
|
|
@@ -40,7 +40,7 @@ module ChargeBee
|
|
40
40
|
attr_accessor :id, :first_name, :last_name, :email, :phone, :company, :vat_number, :auto_collection,
|
41
41
|
:offline_payment_method, :net_term_days, :vat_number_validated_time, :vat_number_status, :allow_direct_debit,
|
42
42
|
:is_location_valid, :created_at, :created_from_ip, :exemption_details, :taxability, :entity_code,
|
43
|
-
:exempt_number, :resource_version, :updated_at, :locale, :billing_date, :billing_date_mode,
|
43
|
+
:exempt_number, :resource_version, :updated_at, :locale, :billing_date, :billing_month, :billing_date_mode,
|
44
44
|
:billing_day_of_week, :billing_day_of_week_mode, :pii_cleared, :auto_close_invoices, :channel,
|
45
45
|
:card_status, :fraud_flag, :primary_payment_source_id, :backup_payment_source_id, :billing_address,
|
46
46
|
:referral_urls, :contacts, :payment_method, :invoice_notes, :business_entity_id, :preferred_currency_code,
|
@@ -10,10 +10,6 @@ module ChargeBee
|
|
10
10
|
Request.send('post', uri_path("purchases"), params, env, headers)
|
11
11
|
end
|
12
12
|
|
13
|
-
def self.retrieve(id, env=nil, headers={})
|
14
|
-
Request.send('get', uri_path("purchases",id.to_s), {}, env, headers)
|
15
|
-
end
|
16
|
-
|
17
13
|
def self.estimate(params, env=nil, headers={})
|
18
14
|
Request.send('post', uri_path("purchases","estimate"), params, env, headers)
|
19
15
|
end
|
@@ -41,6 +41,10 @@ module ChargeBee
|
|
41
41
|
attr_accessor :id, :status, :contract_start, :contract_end, :billing_cycle, :action_at_term_end, :total_contract_value, :cancellation_cutoff_period, :created_at, :subscription_id, :remaining_billing_cycles
|
42
42
|
end
|
43
43
|
|
44
|
+
class Discount < Model
|
45
|
+
attr_accessor :id, :invoice_name, :percentage, :amount, :currency_code, :period, :period_unit, :included_in_mrr, :item_price_id, :created_at, :apply_till, :applied_count, :coupon_id, :index
|
46
|
+
end
|
47
|
+
|
44
48
|
attr_accessor :id, :currency_code, :plan_id, :plan_quantity, :plan_unit_price, :setup_fee, :billing_period,
|
45
49
|
:billing_period_unit, :start_date, :trial_end, :remaining_billing_cycles, :po_number, :auto_collection,
|
46
50
|
:plan_quantity_in_decimal, :plan_unit_price_in_decimal, :customer_id, :plan_amount, :plan_free_quantity,
|
@@ -53,7 +57,8 @@ module ChargeBee
|
|
53
57
|
:due_invoices_count, :due_since, :total_dues, :mrr, :exchange_rate, :base_currency_code, :addons,
|
54
58
|
:event_based_addons, :charged_event_based_addons, :coupon, :coupons, :shipping_address, :referral_info,
|
55
59
|
:invoice_notes, :meta_data, :metadata, :deleted, :changes_scheduled_at, :contract_term, :cancel_reason_code,
|
56
|
-
:free_period, :free_period_unit, :create_pending_invoices, :auto_close_invoices, :
|
60
|
+
:free_period, :free_period_unit, :create_pending_invoices, :auto_close_invoices, :discounts,
|
61
|
+
:business_entity_id
|
57
62
|
|
58
63
|
# OPERATIONS
|
59
64
|
#-----------
|
@@ -82,6 +87,10 @@ module ChargeBee
|
|
82
87
|
Request.send('get', uri_path("subscriptions",id.to_s,"contract_terms"), params, env, headers)
|
83
88
|
end
|
84
89
|
|
90
|
+
def self.list_discounts(id, params={}, env=nil, headers={})
|
91
|
+
Request.send('get', uri_path("subscriptions",id.to_s,"discounts"), params, env, headers)
|
92
|
+
end
|
93
|
+
|
85
94
|
def self.retrieve(id, env=nil, headers={})
|
86
95
|
Request.send('get', uri_path("subscriptions",id.to_s), {}, env, headers)
|
87
96
|
end
|
data/lib/chargebee/result.rb
CHANGED
@@ -7,7 +7,7 @@ module ChargeBee
|
|
7
7
|
|
8
8
|
def subscription()
|
9
9
|
subscription = get(:subscription, Subscription,
|
10
|
-
{: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});
|
10
|
+
{: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});
|
11
11
|
return subscription;
|
12
12
|
end
|
13
13
|
|
data/lib/chargebee.rb
CHANGED
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.19.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-
|
12
|
+
date: 2022-09-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json_pure
|