chargebee 2.7.9 → 2.8.4
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 +5 -5
- data/CHANGELOG.md +118 -1
- data/chargebee.gemspec +8 -2
- data/lib/chargebee.rb +1 -1
- data/lib/chargebee/models/addon.rb +4 -3
- data/lib/chargebee/models/attached_item.rb +35 -0
- data/lib/chargebee/models/coupon.rb +18 -2
- data/lib/chargebee/models/credit_note.rb +2 -2
- data/lib/chargebee/models/credit_note_estimate.rb +2 -2
- data/lib/chargebee/models/customer.rb +7 -7
- data/lib/chargebee/models/differential_price.rb +39 -0
- data/lib/chargebee/models/estimate.rb +32 -0
- data/lib/chargebee/models/export.rb +20 -0
- data/lib/chargebee/models/gift.rb +4 -0
- data/lib/chargebee/models/hosted_page.rb +12 -0
- data/lib/chargebee/models/invoice.rb +14 -2
- data/lib/chargebee/models/invoice_estimate.rb +2 -2
- data/lib/chargebee/models/item.rb +37 -0
- data/lib/chargebee/models/item_family.rb +30 -0
- data/lib/chargebee/models/item_price.rb +47 -0
- data/lib/chargebee/models/payment_intent.rb +2 -2
- data/lib/chargebee/models/plan.rb +6 -6
- data/lib/chargebee/models/promotional_credit.rb +2 -2
- data/lib/chargebee/models/quote.rb +13 -1
- data/lib/chargebee/models/quote_line_group.rb +1 -1
- data/lib/chargebee/models/quoted_subscription.rb +11 -3
- data/lib/chargebee/models/subscription.rb +53 -7
- data/lib/chargebee/models/transaction.rb +4 -0
- data/lib/chargebee/models/unbilled_charge.rb +7 -2
- data/lib/chargebee/models/usage.rb +31 -0
- data/lib/chargebee/result.rb +44 -5
- metadata +23 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9f71ee1595033b10d59dac1f74a44f865d073ebd
|
4
|
+
data.tar.gz: 79a08ad94d54263919b2572ec1d38e0885911277
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 798119dd87e5106464a95959da1678f697b345514361d1b3dfe4426bbefb68baec9a8426d844d26ba741d5c93432651f46ccde3ee65f83b352f00b393912a81e
|
7
|
+
data.tar.gz: c528885d80a4aeff578a64cfcd454e7dd8b1932bf797236366dda367bdc187443ecb30bbc6fc07e0b023076255add8a13c1b45caa340f7ace489a2f9907e08bc
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,120 @@
|
|
1
|
+
### v2.8.4 (2021-01-20)
|
2
|
+
* * *
|
3
|
+
* Ruby Library-URL encoding Issue - bugfix
|
4
|
+
### v2.8.3 (2021-01-19)
|
5
|
+
* * *
|
6
|
+
##### New resources:
|
7
|
+
* Usages is added. Applicable only for Product Catalog V2
|
8
|
+
|
9
|
+
##### New end points:
|
10
|
+
* hosted_pages#checkout_one-time_payments has been added in hosted_pages resource
|
11
|
+
|
12
|
+
##### New attributes:
|
13
|
+
* auto_close_invoices has been added to customers, subscriptions resources
|
14
|
+
* metered, usage_calculation have been added to items resources
|
15
|
+
* create_pending_invoices, auto_close_invoices have been added to subscriptions resources
|
16
|
+
|
17
|
+
##### New parameters:
|
18
|
+
* auto_close_invoices has been added to the endpoint: customers#create_a_customer, customers#list_customers, customers#update_a_customer
|
19
|
+
* invoice_allocations[invoice_id] has been added to the endpoint: customers#collect_payment_for_customer
|
20
|
+
* coupon_ids has been added to the endpoint: estimates#create_invoice_for_items_estimate. Applicable only for Product Catalog V2
|
21
|
+
* subscription[auto_close_invoices] has been added to the endpoint: exports#export_revenue_recognition_reports, exports#export_deferred_revenue_reports, exports#export_subscriptions
|
22
|
+
* customer[auto_close_invoices] has been added to the endpoint: exports#export_revenue_recognition_reports, exports#export_deferred_revenue_reports, exports#export_customers
|
23
|
+
* item[metered], item[usage_calculation] have been added to the endpoint: exports#export_items. Applicable only for Product Catalog V2
|
24
|
+
* subscription_id has been added to the endpoint: invoices#add_one-time_charge_to_a_pending_invoice, invoices#add_non-recurring_addon_to_a_pending_invoice
|
25
|
+
* subscription_id has been added to the endpoint: invoices#add_a_charge-item_to_a_pending_invoice. Applicable only for Product Catalog V2
|
26
|
+
* metered, usage_calculation have been added to the endpoint: items#create_an_item, items#list_item. Applicable only for Product Catalog V2
|
27
|
+
* create_pending_invoices, auto_close_invoices, first_invoice_pending have been added to the endpoint: subscriptions#create_subscription_for_items, subscriptions#update_subscription_for_items,subscriptions#import_subscription_for_items. Applicable only for Product Catalog V2
|
28
|
+
* create_pending_invoices, auto_close_invoices have been added to the endpoint: subscriptions#list_subscriptions
|
29
|
+
|
30
|
+
### v2.8.2 (2020-12-15)
|
31
|
+
* * *
|
32
|
+
##### New end points:
|
33
|
+
* estimate_for_creating_a_customer_and_subscription, cancel_subscription_for_items_estimate, gift_subscription_estimate_for_items have been added in estimate resource. Applicable only for Product Catalog V2
|
34
|
+
* regenerate_invoice_estimate has been added in estimate resource
|
35
|
+
* create_a_gift_subscription_for_items has been added in gift resource. Applicable only for Product Catalog V2
|
36
|
+
* regenerate_invoice has been added in subscription resource
|
37
|
+
|
38
|
+
##### New attributes:
|
39
|
+
* show_description_in_invoices, show_description_in_quotes have been added to the resource item_prices
|
40
|
+
* tiers[starting_unit_in_decimal], tiers[ending_unit_in_decimal], tiers[price_in_decimal] have been added to the resource differential_prices
|
41
|
+
* show_description_in_invoices, show_description_in_quotes have been added to the resource item_prices. Applicable only for Product Catalog V2
|
42
|
+
|
43
|
+
##### New parameters:
|
44
|
+
* payment_intent[additional_info] has been added to the endpoints customers#create_a_customer, invoices#create_an_invoice, payment_sources#create_using_payment_intent, subscriptions#create_a_subscription, subscriptions#update_a_subscription, subscriptions#create_subscription_for_customer, subscriptions#reactivate_a_subscription, subscriptions#resume_a_subscription
|
45
|
+
* payment_intent[additional_info] has been added to the endpoints gifts#create_a_gift_subscription_for_items, invoices#create_invoice_for_items_and_one-time_charges, subscriptions#create_subscription_for_items, subscriptions#update_subscription_for_items. Applicable only for Product Catalog V2
|
46
|
+
* contract_term[action_at_term_end], contract_term[cancellation_cutoff_period], subscription[contract_term_billing_cycle_on_renewal] has been added to the endpoint estimates#estimate_for_creating_a_subscription. Applicable only for Product Catalog V2
|
47
|
+
* cancel_at, contract_term_cancel_option, cancel_reason_code have been added to the endpoint estimates#cancel_subscription_for_items_estimate
|
48
|
+
* event_based_addons has been added to the endpoint estimates#cancel_subscription_for_items_estimate
|
49
|
+
* redirect_url has been added to the endpoint hosted_pages#accept_a_quote
|
50
|
+
* token_id, retain_payment_source, card, bank_account, payment_method added have been added to the endpoint invoices#create_an_invoice
|
51
|
+
* token_id, retain_payment_source, card, bank_account, payment_method added have been added to the endpoint invoices#create_invoice_for_items_and_one-time_charges. Applicable only for Product Catalog V2
|
52
|
+
* show_description_in_invoices, show_description_in_quotes have been added to the endpoints item_prices#create_an_item_price, item_prices#update_an_item_price. Applicable only for Product Catalog V2
|
53
|
+
|
54
|
+
### v2.8.1 (2020-11-26)
|
55
|
+
* * *
|
56
|
+
##### New resources:
|
57
|
+
item_family, item, item_price, attached_item and differential_price are added. Applicable only for Product Catalog V2
|
58
|
+
|
59
|
+
##### New end points:
|
60
|
+
* coupons#create_a_coupon_for_items and coupons#update_a_coupon_for_items have been added in coupon resource. Applicable only for Product Catalog V2
|
61
|
+
* estimates#estimate_for_creating_a_subscription, estimates#estimate_for_updating_a_subscription and estimates#create_invoice_for_items_estimate have been added in estimate resource. Applicable only for Product Catalog V2
|
62
|
+
* estimates#advance_invoice_estimate has been added in estimate resource
|
63
|
+
* exports#export_item_families, exports#export_items, exports#export_item_prices, exports#export_attached_items and exports#export_differential_price have been added in export api. Applicable only for Product Catalog V2
|
64
|
+
* checkout_new_for_items and checkout_existing_for_items have been added in hosted_pages api. Applicable only for Product Catalog V2
|
65
|
+
* invoices#create_invoice_for_items_and_one-time_charges, invoices#create_invoice_for_a_charge-item and invoices#add_a_charge-item_to_a_pending_invoice have been added in invoice resource. Applicable only for Product Catalog V2
|
66
|
+
* quotes#create_a_quote_for_a_new_subscription_items, quotes#create_a_quote_for_update_subscription_items and quotes#create_a_quote_for_charge_and_charge_items have been added in quote resource. Applicable only for Product Catalog V2
|
67
|
+
* subscriptions#create_subscription_for_items, subscriptions#update_subscription_for_items, subscriptions#import_subscription_for_items and subscriptions#cancel_subscription_for_items have been added in subscription resource. Applicable only for Product Catalog V2
|
68
|
+
* subscriptions#edit_advance_invoice_schedule, subscriptions#retrieve_advance_invoice and subscriptions#remove_an_advance_invoice_schedules have been added in subscription resource
|
69
|
+
* unbilled_charges#create_an_invoice_for_unbilled_charges has been added to unbilled_charge resource
|
70
|
+
|
71
|
+
##### New attributes:
|
72
|
+
* item_constraints and item_constraint_criteria have been added in coupon resource. Applicable only for Product Catalog V2
|
73
|
+
* success_url and failure_url have been added in payment_intent resource
|
74
|
+
* subscription_items and item_tiers have been added in quoted_subscription resource. Applicable only for Product Catalog V2
|
75
|
+
* has_scheduled_advance_invoices has been added in subscription resource
|
76
|
+
* subscription_items, item_tiers and charged_items have been added in subscription resource. Applicable only for Product Catalog V2
|
77
|
+
|
78
|
+
##### New parameters:
|
79
|
+
* item_id and item_price_id have been added to the end point: subscriptions#list_subscriptions, exports#export_revenue_recognition_reports, exports#export_deferred_revenue_reports, exports#export_subscriptions. Applicable only for Product Catalog V2
|
80
|
+
* invoice_immediately, schedule_type and fixed_interval_schedule have been added to the end point: subscriptions#charge_future_renewals
|
81
|
+
* success_url and failure_url have been added to the end points: payment_intents#create_a_payment_intent, payment_intents#update_a_payment_intent
|
82
|
+
|
83
|
+
##### New Enum values:
|
84
|
+
* PLAN_ITEM_PRICE, ADDON_ITEM_PRICE, CHARGE_ITEM_PRICE are added to Entitytype Enum
|
85
|
+
* ITEM_FAMILY_CREATED, ITEM_FAMILY_UPDATED, ITEM_FAMILY_DELETED, ITEM_CREATED, ITEM_UPDATED, ITEM_DELETED, ITEM_PRICE_CREATED, ITEM_PRICE_UPDATED, ITEM_PRICE_DELETED, ATTACHED_ITEM_CREATED, ATTACHED_ITEM_UPDATED, ATTACHED_ITEM_DELETED, DIFFERENTIAL_PRICE_CREATED, DIFFERENTIAL_PRICE_UPDATED, DIFFERENTIAL_PRICE_DELETED are added to EventType Enum
|
86
|
+
|
87
|
+
### v2.8.0 (2020-11-16)
|
88
|
+
* * *
|
89
|
+
* New attributes price_in_decimal, tiers[starting_unit_in_decimal], tiers[ending_unit_in_decimal], tiers[price_in_decimal] have been added to the resource addon
|
90
|
+
* New input parameters price_in_decimal, tiers[starting_unit_in_decimal], tiers[ending_unit_in_decimal], tiers[price_in_decimal] have been added to addons#create_an_addon, addons#update_an_addon apis.
|
91
|
+
* New attributes unit_amount_in_decimal, quantity_in_decimal, amount_in_decimal, line_item_tiers[starting_unit_in_decimal], line_item_tiers[ending_unit_in_decimal], line_item_tiers[quantity_used_in_decimal], line_item_tiers[unit_amount_in_decimal] have been added to the resources credit_note, credit_note_estimate, invoice, invoice_estimate
|
92
|
+
* New input parameters line_items[unit_amount_in_decimal], line_items[quantity_in_decimal] have been added to credit_notes#create_credit_note api.
|
93
|
+
* New input parameters subscription[plan_unit_price_in_decimal], subscription[plan_quantity_in_decimal], addons[quantity_in_decimal], addons[unit_price_in_decimal], event_based_addons[quantity_in_decimal], event_based_addons[unit_price_in_decimal] have been added to estimates#create_subscription_estimate, estimates#create_subscription_for_a_customer_estimate, estimates#update_subscription_estimate, hosted_pages#checkout_new_subscription, hosted_pages#checkout_existing_subscription, quotes#create_a_quote_for_a_new_subscription, quotes#edit_create_subscription_quote, quotes#create_a_quote_for_update_subscription, quotes#edit_update_subscription_quote, apis
|
94
|
+
* New input parameters subscription[plan_quantity_in_decimal], addons[quantity_in_decimal] have been added to estimates#gift_subscription_estimate, gifts#create_a_gift, hosted_pages#checkout_gift_subscription apis
|
95
|
+
* New input parameters addons[quantity_in_decimal], addons[unit_price_in_decimal], charges[amount_in_decimal] have been added to estimates#create_invoice_estimate, invoices#create_an_invoice, quotes#create_a_quote_for_one-time_charges, quotes#edit_one-time_quote apis
|
96
|
+
* New input parameter amount_in_decimal has been added to invoices#create_invoice_for_a_one-time_charge api
|
97
|
+
* Input parameter amount has been made optional to invoices#create_invoice_for_a_one-time_charge api
|
98
|
+
* New input parameters addon_quantity_in_decimal, addon_unit_price_in_decimal have been added to invoices#create_invoice_for_a_non-recurring_addon
|
99
|
+
* New input parameters line_items[unit_amount_in_decimal], line_items[quantity_in_decimal], line_items[amount_in_decimal], line_item_tiers[starting_unit_in_decimal], line_item_tiers[ending_unit_in_decimal], line_item_tiers[quantity_used_in_decimal], line_item_tiers[unit_amount_in_decimal] have been added to invoices#import_invoice api
|
100
|
+
* Input parameters line_item_tiers[starting_unit], line_item_tiers[ending_unit], line_item_tiers[quantity_used], line_item_tiers[unit_amount] have beed made optional in invoices#import_invoice api
|
101
|
+
* New input parameters addon_quantity_in_decimal, addon_unit_price_in_decimal have been added to invoices#add_non-recurring_addon_to_a_pending_invoice api
|
102
|
+
* New input parameter invoice_date has been added to invoices#close_a_pending_invoice api
|
103
|
+
* New attributes tiers[starting_unit_in_decimal], tiers[ending_unit_in_decimal], tiers[price_in_decimal], attached_addons[quantity_in_decimal], event_based_addons[quantity_in_decimal], free_quantity_in_decimal, price_in_decimal have been added to the resource plan
|
104
|
+
* New input parameters tiers[starting_unit_in_decimal], tiers[ending_unit_in_decimal], tiers[price_in_decimal], attached_addons[quantity_in_decimal], event_based_addons[quantity_in_decimal], free_quantity_in_decimal, price_in_decimal have been added to plans#create_a_plan, plans#update_a_plan apis
|
105
|
+
* New attribute amount_in_decimal has been added to the resource promotional_credit
|
106
|
+
* New input parameter amount_in_decimal has been added to promotional_credits#add_promotional_credits, promotional_credits#deduct_promotional_credits, promotional_credits#set_promotional_credits apis
|
107
|
+
* Input parameter amount has been made optional in promotional_credits#add_promotional_credits, promotional_credits#deduct_promotional_credits, promotional_credits#set_promotional_credits apis
|
108
|
+
* New attributes unit_amount_in_decimal, quantity_in_decimal, amount_in_decimal have been added to the resource quote
|
109
|
+
* New attributes addons[quantity_in_decimal], addons[unit_price_in_decimal], addons[amount_in_decimal], event_based_addons[quantity_in_decimal], event_based_addons[unit_price_in_decimal] have been added to the sub resource quoted_subscription
|
110
|
+
* New attributes unit_amount_in_decimal, quantity_in_decimal, amount_in_decimal have been added to the sub resource quoted_line_group
|
111
|
+
* New attributes addons[quantity_in_decimal], addons[unit_price_in_decimal], addons[amount_in_decimal], event_based_addons[quantity_in_decimal], event_based_addons[unit_price_in_decimal], plan_free_quantity_in_decimal, plan_quantity_in_decimal, plan_unit_price_in_decimal, plan_amount_in_decimal have been added to the resource subscription
|
112
|
+
* New input parameters plan_unit_price_in_decimal, plan_quantity_in_decimal, addons[quantity_in_decimal], addons[unit_price_in_decimal], event_based_addons[quantity_in_decimal], event_based_addons[unit_price_in_decimal] have been added to subscriptions#create_a_subscription, subscriptions#create_subscription_for_customer, subscriptions#update_a_subscription, subscriptions#import_a_subscription, subscriptions#import_subscription_for_customer apis
|
113
|
+
* New input parameter amount_in_decimal has been added to subscriptions#add_charge_at_term_end apis
|
114
|
+
* Input parameter amount has been made optional in subscriptions#add_charge_at_term_end apis
|
115
|
+
* New input parameters addon_quantity_in_decimal, addon_unit_price_in_decimal have been added to subscriptions#charge_addon_at_term_end api
|
116
|
+
* New attributes tiers[starting_unit_in_decimal], tiers[ending_unit_in_decimal], tiers[quantity_used_in_decimal], tiers[unit_amount_in_decimal], unit_amount_in_decimal, quantity_in_decimal, amount_in_decimal have been added to the resource unbilled_charge
|
117
|
+
* New endpoint transactions#refund_a_payment has been added to the resource transaction
|
1
118
|
### v2.7.9 (2020-10-19)
|
2
119
|
* * *
|
3
120
|
* New optional attribute quoted_subscriptions has been added to the resource quote
|
@@ -1702,4 +1819,4 @@ Support for creating plans & addons on the fly via API.
|
|
1702
1819
|
|
1703
1820
|
* API to fetch multiple subscriptions of a customer.
|
1704
1821
|
|
1705
|
-
* Added support to get the list of events filtered by event type. Events can be fetched based on the event type eg., payment_succeeded.
|
1822
|
+
* Added support to get the list of events filtered by event type. Events can be fetched based on the event type eg., payment_succeeded.
|
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 = '
|
7
|
+
s.version = '2.8.4'
|
8
|
+
s.date = '2021-01-20'
|
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."
|
@@ -41,6 +41,7 @@ Gem::Specification.new do |s|
|
|
41
41
|
lib/chargebee/models/addon.rb
|
42
42
|
lib/chargebee/models/address.rb
|
43
43
|
lib/chargebee/models/advance_invoice_schedule.rb
|
44
|
+
lib/chargebee/models/attached_item.rb
|
44
45
|
lib/chargebee/models/card.rb
|
45
46
|
lib/chargebee/models/comment.rb
|
46
47
|
lib/chargebee/models/contact.rb
|
@@ -51,6 +52,7 @@ Gem::Specification.new do |s|
|
|
51
52
|
lib/chargebee/models/credit_note.rb
|
52
53
|
lib/chargebee/models/credit_note_estimate.rb
|
53
54
|
lib/chargebee/models/customer.rb
|
55
|
+
lib/chargebee/models/differential_price.rb
|
54
56
|
lib/chargebee/models/download.rb
|
55
57
|
lib/chargebee/models/estimate.rb
|
56
58
|
lib/chargebee/models/event.rb
|
@@ -60,6 +62,9 @@ Gem::Specification.new do |s|
|
|
60
62
|
lib/chargebee/models/hosted_page.rb
|
61
63
|
lib/chargebee/models/invoice.rb
|
62
64
|
lib/chargebee/models/invoice_estimate.rb
|
65
|
+
lib/chargebee/models/item.rb
|
66
|
+
lib/chargebee/models/item_family.rb
|
67
|
+
lib/chargebee/models/item_price.rb
|
63
68
|
lib/chargebee/models/model.rb
|
64
69
|
lib/chargebee/models/order.rb
|
65
70
|
lib/chargebee/models/payment_intent.rb
|
@@ -79,6 +84,7 @@ Gem::Specification.new do |s|
|
|
79
84
|
lib/chargebee/models/token.rb
|
80
85
|
lib/chargebee/models/transaction.rb
|
81
86
|
lib/chargebee/models/unbilled_charge.rb
|
87
|
+
lib/chargebee/models/usage.rb
|
82
88
|
lib/chargebee/models/virtual_bank_account.rb
|
83
89
|
lib/chargebee/request.rb
|
84
90
|
lib/chargebee/rest.rb
|
data/lib/chargebee.rb
CHANGED
@@ -2,15 +2,16 @@ module ChargeBee
|
|
2
2
|
class Addon < Model
|
3
3
|
|
4
4
|
class Tier < Model
|
5
|
-
attr_accessor :starting_unit, :ending_unit, :price
|
5
|
+
attr_accessor :starting_unit, :ending_unit, :price, :starting_unit_in_decimal, :ending_unit_in_decimal, :price_in_decimal
|
6
6
|
end
|
7
7
|
|
8
8
|
attr_accessor :id, :name, :invoice_name, :description, :pricing_model, :type, :charge_type,
|
9
9
|
:price, :currency_code, :period, :period_unit, :unit, :status, :archived_at, :enabled_in_portal,
|
10
10
|
:tax_code, :taxjar_product_code, :avalara_sale_type, :avalara_transaction_type, :avalara_service_type,
|
11
11
|
:sku, :accounting_code, :accounting_category1, :accounting_category2, :is_shippable, :shipping_frequency_period,
|
12
|
-
:shipping_frequency_period_unit, :resource_version, :updated_at, :
|
13
|
-
:taxable, :tax_profile_id, :meta_data, :tiers, :show_description_in_invoices,
|
12
|
+
:shipping_frequency_period_unit, :resource_version, :updated_at, :price_in_decimal, :included_in_mrr,
|
13
|
+
:invoice_notes, :taxable, :tax_profile_id, :meta_data, :tiers, :show_description_in_invoices,
|
14
|
+
:show_description_in_quotes
|
14
15
|
|
15
16
|
# OPERATIONS
|
16
17
|
#-----------
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class AttachedItem < Model
|
3
|
+
|
4
|
+
attr_accessor :id, :parent_item_id, :item_id, :type, :status, :quantity, :billing_cycles, :charge_on_event,
|
5
|
+
:charge_once, :created_at, :resource_version, :updated_at
|
6
|
+
|
7
|
+
# OPERATIONS
|
8
|
+
#-----------
|
9
|
+
|
10
|
+
def self.create(id, params, env=nil, headers={})
|
11
|
+
Request.send('post', uri_path("items",id.to_s,"attached_items"), params, env, headers)
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.update(id, params, env=nil, headers={})
|
15
|
+
Request.send('post', uri_path("attached_items",id.to_s), params, env, headers)
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.retrieve(id, params, env=nil, headers={})
|
19
|
+
Request.send('get', uri_path("attached_items",id.to_s), params, env, headers)
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.delete(id, params, env=nil, headers={})
|
23
|
+
Request.send('post', uri_path("attached_items",id.to_s,"delete"), params, env, headers)
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.list(id, params={}, env=nil, headers={})
|
27
|
+
Request.send_list_request('get', uri_path("items",id.to_s,"attached_items"), params, env, headers)
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.list_internal(params={}, env=nil, headers={})
|
31
|
+
Request.send('get', uri_path("attached_items","list_internal"), params, env, headers)
|
32
|
+
end
|
33
|
+
|
34
|
+
end # ~AttachedItem
|
35
|
+
end # ~ChargeBee
|
@@ -1,11 +1,19 @@
|
|
1
1
|
module ChargeBee
|
2
2
|
class Coupon < Model
|
3
3
|
|
4
|
+
class ItemConstraint < Model
|
5
|
+
attr_accessor :item_type, :constraint, :item_price_ids
|
6
|
+
end
|
7
|
+
|
8
|
+
class ItemConstraintCriteria < Model
|
9
|
+
attr_accessor :item_type, :currencies, :item_family_ids, :item_price_periods
|
10
|
+
end
|
11
|
+
|
4
12
|
attr_accessor :id, :name, :invoice_name, :discount_type, :discount_percentage, :discount_amount,
|
5
13
|
:discount_quantity, :currency_code, :duration_type, :duration_month, :valid_till, :max_redemptions,
|
6
14
|
:status, :apply_discount_on, :apply_on, :plan_constraint, :addon_constraint, :created_at, :archived_at,
|
7
|
-
:resource_version, :updated_at, :included_in_mrr, :plan_ids, :addon_ids, :
|
8
|
-
:meta_data
|
15
|
+
:resource_version, :updated_at, :included_in_mrr, :plan_ids, :addon_ids, :item_constraints,
|
16
|
+
:item_constraint_criteria, :redemptions, :invoice_notes, :meta_data
|
9
17
|
|
10
18
|
# OPERATIONS
|
11
19
|
#-----------
|
@@ -14,6 +22,14 @@ module ChargeBee
|
|
14
22
|
Request.send('post', uri_path("coupons"), params, env, headers)
|
15
23
|
end
|
16
24
|
|
25
|
+
def self.create_for_items(params, env=nil, headers={})
|
26
|
+
Request.send('post', uri_path("coupons","create_for_items"), params, env, headers)
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.update_for_items(id, params, env=nil, headers={})
|
30
|
+
Request.send('post', uri_path("coupons",id.to_s,"update_for_items"), params, env, headers)
|
31
|
+
end
|
32
|
+
|
17
33
|
def self.list(params={}, env=nil, headers={})
|
18
34
|
Request.send_list_request('get', uri_path("coupons"), params, env, headers)
|
19
35
|
end
|
@@ -2,7 +2,7 @@ module ChargeBee
|
|
2
2
|
class CreditNote < Model
|
3
3
|
|
4
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_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
|
5
|
+
attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
|
6
6
|
end
|
7
7
|
|
8
8
|
class Discount < Model
|
@@ -14,7 +14,7 @@ module ChargeBee
|
|
14
14
|
end
|
15
15
|
|
16
16
|
class LineItemTier < Model
|
17
|
-
attr_accessor :line_item_id, :starting_unit, :ending_unit, :quantity_used, :unit_amount
|
17
|
+
attr_accessor :line_item_id, :starting_unit, :ending_unit, :quantity_used, :unit_amount, :starting_unit_in_decimal, :ending_unit_in_decimal, :quantity_used_in_decimal, :unit_amount_in_decimal
|
18
18
|
end
|
19
19
|
|
20
20
|
class Tax < Model
|
@@ -2,7 +2,7 @@ module ChargeBee
|
|
2
2
|
class CreditNoteEstimate < Model
|
3
3
|
|
4
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_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
|
5
|
+
attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
|
6
6
|
end
|
7
7
|
|
8
8
|
class Discount < Model
|
@@ -22,7 +22,7 @@ module ChargeBee
|
|
22
22
|
end
|
23
23
|
|
24
24
|
class LineItemTier < Model
|
25
|
-
attr_accessor :line_item_id, :starting_unit, :ending_unit, :quantity_used, :unit_amount
|
25
|
+
attr_accessor :line_item_id, :starting_unit, :ending_unit, :quantity_used, :unit_amount, :starting_unit_in_decimal, :ending_unit_in_decimal, :quantity_used_in_decimal, :unit_amount_in_decimal
|
26
26
|
end
|
27
27
|
|
28
28
|
attr_accessor :reference_invoice_id, :type, :price_type, :currency_code, :sub_total, :total,
|
@@ -37,12 +37,12 @@ module ChargeBee
|
|
37
37
|
:offline_payment_method, :net_term_days, :vat_number_validated_time, :vat_number_status, :allow_direct_debit,
|
38
38
|
:is_location_valid, :created_at, :created_from_ip, :exemption_details, :taxability, :entity_code,
|
39
39
|
:exempt_number, :resource_version, :updated_at, :locale, :billing_date, :billing_date_mode,
|
40
|
-
:billing_day_of_week, :billing_day_of_week_mode, :pii_cleared, :
|
41
|
-
:
|
42
|
-
:
|
43
|
-
:
|
44
|
-
:
|
45
|
-
:parent_account_access, :child_account_access
|
40
|
+
:billing_day_of_week, :billing_day_of_week_mode, :pii_cleared, :auto_close_invoices, :card_status,
|
41
|
+
:fraud_flag, :primary_payment_source_id, :backup_payment_source_id, :billing_address, :referral_urls,
|
42
|
+
:contacts, :payment_method, :invoice_notes, :preferred_currency_code, :promotional_credits,
|
43
|
+
:unbilled_charges, :refundable_credits, :excess_payments, :balances, :meta_data, :deleted, :registered_for_gst,
|
44
|
+
:consolidated_invoicing, :customer_type, :business_customer_without_vat_number, :client_profile_id,
|
45
|
+
:relationship, :use_default_hierarchy_settings, :parent_account_access, :child_account_access
|
46
46
|
|
47
47
|
# OPERATIONS
|
48
48
|
#-----------
|
@@ -107,7 +107,7 @@ module ChargeBee
|
|
107
107
|
Request.send('post', uri_path("customers",id.to_s,"record_excess_payment"), params, env, headers)
|
108
108
|
end
|
109
109
|
|
110
|
-
def self.collect_payment(id, params
|
110
|
+
def self.collect_payment(id, params, env=nil, headers={})
|
111
111
|
Request.send('post', uri_path("customers",id.to_s,"collect_payment"), params, env, headers)
|
112
112
|
end
|
113
113
|
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class DifferentialPrice < Model
|
3
|
+
|
4
|
+
class Tier < Model
|
5
|
+
attr_accessor :starting_unit, :ending_unit, :price, :starting_unit_in_decimal, :ending_unit_in_decimal, :price_in_decimal
|
6
|
+
end
|
7
|
+
|
8
|
+
class ParentPeriod < Model
|
9
|
+
attr_accessor :period_unit, :period
|
10
|
+
end
|
11
|
+
|
12
|
+
attr_accessor :id, :item_price_id, :parent_item_id, :price, :status, :resource_version, :updated_at,
|
13
|
+
:created_at, :modified_at, :tiers, :currency_code, :parent_periods
|
14
|
+
|
15
|
+
# OPERATIONS
|
16
|
+
#-----------
|
17
|
+
|
18
|
+
def self.create(id, params, env=nil, headers={})
|
19
|
+
Request.send('post', uri_path("item_prices",id.to_s,"differential_prices"), params, env, headers)
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.retrieve(id, params, env=nil, headers={})
|
23
|
+
Request.send('get', uri_path("differential_prices",id.to_s), params, env, headers)
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.update(id, params, env=nil, headers={})
|
27
|
+
Request.send('post', uri_path("differential_prices",id.to_s), params, env, headers)
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.delete(id, params, env=nil, headers={})
|
31
|
+
Request.send('post', uri_path("differential_prices",id.to_s,"delete"), params, env, headers)
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.list(params={}, env=nil, headers={})
|
35
|
+
Request.send_list_request('get', uri_path("differential_prices"), params, env, headers)
|
36
|
+
end
|
37
|
+
|
38
|
+
end # ~DifferentialPrice
|
39
|
+
end # ~ChargeBee
|
@@ -11,18 +11,38 @@ module ChargeBee
|
|
11
11
|
Request.send('post', uri_path("estimates","create_subscription"), params, env, headers)
|
12
12
|
end
|
13
13
|
|
14
|
+
def self.create_sub_item_estimate(params, env=nil, headers={})
|
15
|
+
Request.send('post', uri_path("estimates","create_subscription_for_items"), params, env, headers)
|
16
|
+
end
|
17
|
+
|
14
18
|
def self.create_sub_for_customer_estimate(id, params, env=nil, headers={})
|
15
19
|
Request.send('get', uri_path("customers",id.to_s,"create_subscription_estimate"), params, env, headers)
|
16
20
|
end
|
17
21
|
|
22
|
+
def self.create_sub_item_for_customer_estimate(id, params, env=nil, headers={})
|
23
|
+
Request.send('post', uri_path("customers",id.to_s,"create_subscription_for_items_estimate"), params, env, headers)
|
24
|
+
end
|
25
|
+
|
18
26
|
def self.update_subscription(params, env=nil, headers={})
|
19
27
|
Request.send('post', uri_path("estimates","update_subscription"), params, env, headers)
|
20
28
|
end
|
21
29
|
|
30
|
+
def self.update_subscription_for_items(params, env=nil, headers={})
|
31
|
+
Request.send('post', uri_path("estimates","update_subscription_for_items"), params, env, headers)
|
32
|
+
end
|
33
|
+
|
22
34
|
def self.renewal_estimate(id, params={}, env=nil, headers={})
|
23
35
|
Request.send('get', uri_path("subscriptions",id.to_s,"renewal_estimate"), params, env, headers)
|
24
36
|
end
|
25
37
|
|
38
|
+
def self.advance_invoice_estimate(id, params={}, env=nil, headers={})
|
39
|
+
Request.send('post', uri_path("subscriptions",id.to_s,"advance_invoice_estimate"), params, env, headers)
|
40
|
+
end
|
41
|
+
|
42
|
+
def self.regenerate_invoice_estimate(id, params={}, env=nil, headers={})
|
43
|
+
Request.send('post', uri_path("subscriptions",id.to_s,"regenerate_invoice_estimate"), params, env, headers)
|
44
|
+
end
|
45
|
+
|
26
46
|
def self.upcoming_invoices_estimate(id, env=nil, headers={})
|
27
47
|
Request.send('get', uri_path("customers",id.to_s,"upcoming_invoices_estimate"), {}, env, headers)
|
28
48
|
end
|
@@ -35,6 +55,10 @@ module ChargeBee
|
|
35
55
|
Request.send('post', uri_path("subscriptions",id.to_s,"cancel_subscription_estimate"), params, env, headers)
|
36
56
|
end
|
37
57
|
|
58
|
+
def self.cancel_subscription_for_items(id, params={}, env=nil, headers={})
|
59
|
+
Request.send('post', uri_path("subscriptions",id.to_s,"cancel_subscription_for_items_estimate"), params, env, headers)
|
60
|
+
end
|
61
|
+
|
38
62
|
def self.pause_subscription(id, params={}, env=nil, headers={})
|
39
63
|
Request.send('post', uri_path("subscriptions",id.to_s,"pause_subscription_estimate"), params, env, headers)
|
40
64
|
end
|
@@ -47,9 +71,17 @@ module ChargeBee
|
|
47
71
|
Request.send('post', uri_path("estimates","gift_subscription"), params, env, headers)
|
48
72
|
end
|
49
73
|
|
74
|
+
def self.gift_subscription_for_items(params, env=nil, headers={})
|
75
|
+
Request.send('post', uri_path("estimates","gift_subscription_for_items"), params, env, headers)
|
76
|
+
end
|
77
|
+
|
50
78
|
def self.create_invoice(params={}, env=nil, headers={})
|
51
79
|
Request.send('post', uri_path("estimates","create_invoice"), params, env, headers)
|
52
80
|
end
|
53
81
|
|
82
|
+
def self.create_invoice_for_items(params, env=nil, headers={})
|
83
|
+
Request.send('post', uri_path("estimates","create_invoice_for_items"), params, env, headers)
|
84
|
+
end
|
85
|
+
|
54
86
|
end # ~Estimate
|
55
87
|
end # ~ChargeBee
|