chargebee 2.7.4 → 2.7.5
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 +4 -4
- data/CHANGELOG.md +20 -0
- data/chargebee.gemspec +4 -2
- data/lib/chargebee.rb +1 -1
- data/lib/chargebee/models/contract_term.rb +11 -0
- data/lib/chargebee/models/credit_note.rb +4 -0
- data/lib/chargebee/models/customer.rb +2 -2
- data/lib/chargebee/models/quote.rb +4 -0
- data/lib/chargebee/models/quote_line_group.rb +31 -0
- data/lib/chargebee/models/subscription.rb +14 -6
- data/lib/chargebee/models/subscription_estimate.rb +6 -1
- data/lib/chargebee/result.rb +13 -2
- 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: 4eb42cd957b47fe9e72bb151935bfddbf5e926aa
|
4
|
+
data.tar.gz: c6be1ee5be0019030bad155fffe46c9f57c363f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cb242d499446aebbfad8c28b180d124def0a62461c750b062b9c18adbc86008331fb0653818f8f1b418fd9e0e04d40c007cfd0b2135ff09036077aa8f829f0e
|
7
|
+
data.tar.gz: 41e5160fe429abbebb14c23bbe60c08fb4c2e7577d5f700dfadc3fd01e196282b74e6c40811a5116712c25f06183f2c35df77e6f45e471b319dc379b7d642200
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,23 @@
|
|
1
|
+
### v2.7.5 (2020-04-03)
|
2
|
+
* * *
|
3
|
+
|
4
|
+
* A subresource contract_term has been added in Subscription resource
|
5
|
+
* New endpoint refund_a_credit_note has been added in Credit notes resource
|
6
|
+
* New endpoint list_quote_line_groups has been added in Quotes resource
|
7
|
+
* New endpoint list_contract_terms_for_a_subscription has been added in Subscriptions resource
|
8
|
+
* New input parameter contract_term_billing_cycle_on_renewal, contract_term[action_at_term_end], contract_term[cancellation_cutoff_period] has been added in create_a_subscription, create_subscription_for_customer, update_a_subscription and reactivate_a_subscription apis
|
9
|
+
* New input parameter contract_term_cancel_option has been added in cancel_a_subscription api
|
10
|
+
* New input parameter contract_term[action_at_term_end], contract_term[cancellation_cutoff_period], subscription[contract_term_billing_cycle_on_renewal] has been added in create_subscription_estimate, create_subscription_for_a_customer_estimate, checkout_new_subscription, checkout_existing_subscription apis
|
11
|
+
* New input parameter business_customer_without_vat_number has been added in create_a_customer and update_billing_info_for_a_customer apis
|
12
|
+
* New input parameter addons[service_period] replaces the parameter addons[date_from] and addons[date_to] in create_a_quote_for_one-time_charges api
|
13
|
+
* New input parameter charges[service_period] replaces the parameter charges[date_from] and charges[date_to] in create_a_quote_for_one-time_charges api
|
14
|
+
* New input parameter consolidated_view has been added in retrieve_quote_as_pdf api
|
15
|
+
* New input parameter customer[business_customer_without_vat_number] has been added in create_a_subscription, update_a_subscription apis
|
16
|
+
* New value CHECKOUT_COM has been added in gateway enum
|
17
|
+
* New value CONTRACT_TERMINATION has been added to eventBasedAddons onEvent enum
|
18
|
+
* New values IDEAL, GOOGLE_PAY has been added to payment types enum
|
19
|
+
* New event types CONTRACT_TERM_CREATED, CONTRACT_TERM_RENEWED, CONTRACT_TERM_TERMINATED, CONTRACT_TERM_COMPLETED, CONTRACT_TERM_CANCELLED have been added
|
20
|
+
|
1
21
|
### v2.7.4(2020-02-06)
|
2
22
|
* * *
|
3
23
|
|
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.7.
|
8
|
-
s.date = '2020-
|
7
|
+
s.version = '2.7.5'
|
8
|
+
s.date = '2020-04-03'
|
9
9
|
|
10
10
|
s.summary = "Ruby client for Chargebee API."
|
11
11
|
s.description = "Subscription Billing - Simple. Secure. Affordable. More details at www.chargebee.com."
|
@@ -43,6 +43,7 @@ Gem::Specification.new do |s|
|
|
43
43
|
lib/chargebee/models/card.rb
|
44
44
|
lib/chargebee/models/comment.rb
|
45
45
|
lib/chargebee/models/contact.rb
|
46
|
+
lib/chargebee/models/contract_term.rb
|
46
47
|
lib/chargebee/models/coupon.rb
|
47
48
|
lib/chargebee/models/coupon_code.rb
|
48
49
|
lib/chargebee/models/coupon_set.rb
|
@@ -66,6 +67,7 @@ Gem::Specification.new do |s|
|
|
66
67
|
lib/chargebee/models/portal_session.rb
|
67
68
|
lib/chargebee/models/promotional_credit.rb
|
68
69
|
lib/chargebee/models/quote.rb
|
70
|
+
lib/chargebee/models/quote_line_group.rb
|
69
71
|
lib/chargebee/models/resource_migration.rb
|
70
72
|
lib/chargebee/models/site_migration_detail.rb
|
71
73
|
lib/chargebee/models/subscription.rb
|
data/lib/chargebee.rb
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class ContractTerm < Model
|
3
|
+
|
4
|
+
attr_accessor :id, :status, :contract_start, :contract_end, :billing_cycle, :action_at_term_end,
|
5
|
+
:total_contract_value, :cancellation_cutoff_period, :created_at, :subscription_id, :remaining_billing_cycles
|
6
|
+
|
7
|
+
# OPERATIONS
|
8
|
+
#-----------
|
9
|
+
|
10
|
+
end # ~ContractTerm
|
11
|
+
end # ~ChargeBee
|
@@ -55,6 +55,10 @@ module ChargeBee
|
|
55
55
|
Request.send('post', uri_path("credit_notes",id.to_s,"pdf"), params, env, headers)
|
56
56
|
end
|
57
57
|
|
58
|
+
def self.refund(id, params={}, env=nil, headers={})
|
59
|
+
Request.send('post', uri_path("credit_notes",id.to_s,"refund"), params, env, headers)
|
60
|
+
end
|
61
|
+
|
58
62
|
def self.record_refund(id, params, env=nil, headers={})
|
59
63
|
Request.send('post', uri_path("credit_notes",id.to_s,"record_refund"), params, env, headers)
|
60
64
|
end
|
@@ -32,8 +32,8 @@ module ChargeBee
|
|
32
32
|
:billing_day_of_week, :billing_day_of_week_mode, :pii_cleared, :card_status, :fraud_flag, :primary_payment_source_id,
|
33
33
|
:backup_payment_source_id, :billing_address, :referral_urls, :contacts, :payment_method, :invoice_notes,
|
34
34
|
:preferred_currency_code, :promotional_credits, :unbilled_charges, :refundable_credits, :excess_payments,
|
35
|
-
:balances, :meta_data, :deleted, :registered_for_gst, :business_customer_without_vat_number,
|
36
|
-
:
|
35
|
+
:balances, :meta_data, :deleted, :registered_for_gst, :customer_type, :business_customer_without_vat_number,
|
36
|
+
:client_profile_id, :relationship
|
37
37
|
|
38
38
|
# OPERATIONS
|
39
39
|
#-----------
|
@@ -58,6 +58,10 @@ module ChargeBee
|
|
58
58
|
Request.send_list_request('get', uri_path("quotes"), params, env, headers)
|
59
59
|
end
|
60
60
|
|
61
|
+
def self.quote_line_groups_for_quote(id, params={}, env=nil, headers={})
|
62
|
+
Request.send('get', uri_path("quotes",id.to_s,"quote_line_groups"), params, env, headers)
|
63
|
+
end
|
64
|
+
|
61
65
|
def self.convert(id, params={}, env=nil, headers={})
|
62
66
|
Request.send('post', uri_path("quotes",id.to_s,"convert"), params, env, headers)
|
63
67
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class QuoteLineGroup < Model
|
3
|
+
|
4
|
+
class LineItem < Model
|
5
|
+
attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :discount_amount, :item_level_discount_amount, :description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
|
6
|
+
end
|
7
|
+
|
8
|
+
class Discount < Model
|
9
|
+
attr_accessor :amount, :description, :entity_type, :entity_id
|
10
|
+
end
|
11
|
+
|
12
|
+
class LineItemDiscount < Model
|
13
|
+
attr_accessor :line_item_id, :discount_type, :coupon_id, :discount_amount
|
14
|
+
end
|
15
|
+
|
16
|
+
class Tax < Model
|
17
|
+
attr_accessor :name, :amount, :description
|
18
|
+
end
|
19
|
+
|
20
|
+
class LineItemTax < Model
|
21
|
+
attr_accessor :line_item_id, :tax_name, :tax_rate, :is_partial_tax_applied, :is_non_compliance_tax, :taxable_amount, :tax_amount, :tax_juris_type, :tax_juris_name, :tax_juris_code, :tax_amount_in_local_currency, :local_currency_code
|
22
|
+
end
|
23
|
+
|
24
|
+
attr_accessor :id, :sub_total, :total, :credits_applied, :amount_paid, :amount_due, :charge_event,
|
25
|
+
:billing_cycle_number, :line_items, :discounts, :line_item_discounts, :taxes, :line_item_taxes
|
26
|
+
|
27
|
+
# OPERATIONS
|
28
|
+
#-----------
|
29
|
+
|
30
|
+
end # ~QuoteLineGroup
|
31
|
+
end # ~ChargeBee
|
@@ -25,15 +25,19 @@ module ChargeBee
|
|
25
25
|
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
|
26
26
|
end
|
27
27
|
|
28
|
+
class ContractTerm < Model
|
29
|
+
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
|
30
|
+
end
|
31
|
+
|
28
32
|
attr_accessor :id, :customer_id, :currency_code, :plan_id, :plan_quantity, :plan_unit_price,
|
29
33
|
:setup_fee, :plan_amount, :billing_period, :billing_period_unit, :plan_free_quantity, :status,
|
30
34
|
:start_date, :trial_start, :trial_end, :current_term_start, :current_term_end, :next_billing_at,
|
31
|
-
:remaining_billing_cycles, :po_number, :created_at, :started_at, :activated_at, :gift_id, :
|
32
|
-
:pause_date, :resume_date, :cancelled_at, :cancel_reason, :affiliate_token,
|
33
|
-
:resource_version, :updated_at, :has_scheduled_changes, :payment_source_id,
|
34
|
-
:due_invoices_count, :due_since, :total_dues, :mrr, :exchange_rate, :base_currency_code,
|
35
|
-
:event_based_addons, :charged_event_based_addons, :coupon, :coupons, :shipping_address,
|
36
|
-
:invoice_notes, :meta_data, :deleted
|
35
|
+
:remaining_billing_cycles, :po_number, :created_at, :started_at, :activated_at, :gift_id, :contract_term_billing_cycle_on_renewal,
|
36
|
+
:override_relationship, :pause_date, :resume_date, :cancelled_at, :cancel_reason, :affiliate_token,
|
37
|
+
:created_from_ip, :resource_version, :updated_at, :has_scheduled_changes, :payment_source_id,
|
38
|
+
:auto_collection, :due_invoices_count, :due_since, :total_dues, :mrr, :exchange_rate, :base_currency_code,
|
39
|
+
:addons, :event_based_addons, :charged_event_based_addons, :coupon, :coupons, :shipping_address,
|
40
|
+
:referral_info, :invoice_notes, :meta_data, :deleted, :contract_term
|
37
41
|
|
38
42
|
# OPERATIONS
|
39
43
|
#-----------
|
@@ -54,6 +58,10 @@ module ChargeBee
|
|
54
58
|
Request.send('get', uri_path("customers",id.to_s,"subscriptions"), params, env, headers)
|
55
59
|
end
|
56
60
|
|
61
|
+
def self.contract_terms_for_subscription(id, params={}, env=nil, headers={})
|
62
|
+
Request.send('get', uri_path("subscriptions",id.to_s,"contract_terms"), params, env, headers)
|
63
|
+
end
|
64
|
+
|
57
65
|
def self.retrieve(id, env=nil, headers={})
|
58
66
|
Request.send('get', uri_path("subscriptions",id.to_s), {}, env, headers)
|
59
67
|
end
|
@@ -5,7 +5,12 @@ module ChargeBee
|
|
5
5
|
attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
|
6
6
|
end
|
7
7
|
|
8
|
-
|
8
|
+
class ContractTerm < Model
|
9
|
+
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
|
10
|
+
end
|
11
|
+
|
12
|
+
attr_accessor :id, :currency_code, :status, :next_billing_at, :pause_date, :resume_date, :shipping_address,
|
13
|
+
:contract_term
|
9
14
|
|
10
15
|
# OPERATIONS
|
11
16
|
#-----------
|
data/lib/chargebee/result.rb
CHANGED
@@ -7,10 +7,15 @@ module ChargeBee
|
|
7
7
|
|
8
8
|
def subscription()
|
9
9
|
subscription = get(:subscription, Subscription,
|
10
|
-
{: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});
|
10
|
+
{: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});
|
11
11
|
return subscription;
|
12
12
|
end
|
13
13
|
|
14
|
+
def contract_term()
|
15
|
+
contract_term = get(:contract_term, ContractTerm);
|
16
|
+
return contract_term;
|
17
|
+
end
|
18
|
+
|
14
19
|
def customer()
|
15
20
|
customer = get(:customer, Customer,
|
16
21
|
{:billing_address => Customer::BillingAddress, :referral_urls => Customer::ReferralUrl, :contacts => Customer::Contact, :payment_method => Customer::PaymentMethod, :balances => Customer::Balance, :relationship => Customer::Relationship});
|
@@ -103,7 +108,7 @@ module ChargeBee
|
|
103
108
|
estimate = get(:estimate, Estimate, {},
|
104
109
|
{:subscription_estimate => SubscriptionEstimate, :invoice_estimate => InvoiceEstimate, :invoice_estimates => InvoiceEstimate, :next_invoice_estimate => InvoiceEstimate, :credit_note_estimates => CreditNoteEstimate, :unbilled_charge_estimates => UnbilledCharge});
|
105
110
|
estimate.init_dependant(@response[:estimate], :subscription_estimate,
|
106
|
-
{:shipping_address => SubscriptionEstimate::ShippingAddress});
|
111
|
+
{:shipping_address => SubscriptionEstimate::ShippingAddress, :contract_term => SubscriptionEstimate::ContractTerm});
|
107
112
|
estimate.init_dependant(@response[:estimate], :invoice_estimate,
|
108
113
|
{:line_items => InvoiceEstimate::LineItem, :discounts => InvoiceEstimate::Discount, :taxes => InvoiceEstimate::Tax, :line_item_taxes => InvoiceEstimate::LineItemTax, :line_item_tiers => InvoiceEstimate::LineItemTier, :line_item_discounts => InvoiceEstimate::LineItemDiscount});
|
109
114
|
estimate.init_dependant(@response[:estimate], :next_invoice_estimate,
|
@@ -123,6 +128,12 @@ module ChargeBee
|
|
123
128
|
return quote;
|
124
129
|
end
|
125
130
|
|
131
|
+
def quote_line_group()
|
132
|
+
quote_line_group = get(:quote_line_group, QuoteLineGroup,
|
133
|
+
{:line_items => QuoteLineGroup::LineItem, :discounts => QuoteLineGroup::Discount, :line_item_discounts => QuoteLineGroup::LineItemDiscount, :taxes => QuoteLineGroup::Tax, :line_item_taxes => QuoteLineGroup::LineItemTax});
|
134
|
+
return quote_line_group;
|
135
|
+
end
|
136
|
+
|
126
137
|
def plan()
|
127
138
|
plan = get(:plan, Plan,
|
128
139
|
{:tiers => Plan::Tier, :applicable_addons => Plan::ApplicableAddon, :attached_addons => Plan::AttachedAddon, :event_based_addons => Plan::EventBasedAddon});
|
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.7.
|
4
|
+
version: 2.7.5
|
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: 2020-
|
12
|
+
date: 2020-04-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json_pure
|
@@ -98,6 +98,7 @@ files:
|
|
98
98
|
- lib/chargebee/models/card.rb
|
99
99
|
- lib/chargebee/models/comment.rb
|
100
100
|
- lib/chargebee/models/contact.rb
|
101
|
+
- lib/chargebee/models/contract_term.rb
|
101
102
|
- lib/chargebee/models/coupon.rb
|
102
103
|
- lib/chargebee/models/coupon_code.rb
|
103
104
|
- lib/chargebee/models/coupon_set.rb
|
@@ -121,6 +122,7 @@ files:
|
|
121
122
|
- lib/chargebee/models/portal_session.rb
|
122
123
|
- lib/chargebee/models/promotional_credit.rb
|
123
124
|
- lib/chargebee/models/quote.rb
|
125
|
+
- lib/chargebee/models/quote_line_group.rb
|
124
126
|
- lib/chargebee/models/resource_migration.rb
|
125
127
|
- lib/chargebee/models/site_migration_detail.rb
|
126
128
|
- lib/chargebee/models/subscription.rb
|