chargebee 2.41.0 → 3.0.0-beta.2
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.
- package/CHANGELOG.md +11 -15
- package/LICENSE +1 -1
- package/README.md +90 -170
- package/cjs/RequestWrapper.js +84 -0
- package/cjs/asyncApiSupport.js +39 -0
- package/cjs/chargebee.cjs.js +13 -0
- package/cjs/chargebee.cjs.worker.js +9 -0
- package/cjs/chargebeeError.js +17 -0
- package/cjs/coreCommon.js +72 -0
- package/cjs/createChargebee.js +92 -0
- package/cjs/environment.js +18 -0
- package/cjs/filter.js +1 -0
- package/cjs/net/ClientInterface.js +40 -0
- package/cjs/net/FetchClient.js +86 -0
- package/cjs/net/NodeClient.js +61 -0
- package/cjs/package.json +1 -0
- package/cjs/resources/api_endpoints.js +1086 -0
- package/cjs/util.js +218 -0
- package/esm/RequestWrapper.js +80 -0
- package/esm/asyncApiSupport.js +35 -0
- package/esm/chargebee.esm.js +9 -0
- package/esm/chargebee.esm.worker.js +5 -0
- package/esm/chargebeeError.js +13 -0
- package/esm/coreCommon.js +67 -0
- package/esm/createChargebee.js +88 -0
- package/esm/environment.js +15 -0
- package/esm/filter.js +1 -0
- package/esm/net/ClientInterface.js +35 -0
- package/esm/net/FetchClient.js +81 -0
- package/esm/net/NodeClient.js +56 -0
- package/esm/package.json +1 -0
- package/esm/resources/api_endpoints.js +1083 -0
- package/esm/util.js +202 -0
- package/package.json +69 -38
- package/types/core.d.ts +558 -89
- package/types/index.d.ts +90 -55
- package/types/resources/Address.d.ts +57 -272
- package/types/resources/AdvanceInvoiceSchedule.d.ts +21 -94
- package/types/resources/AttachedItem.d.ts +91 -329
- package/types/resources/Attribute.d.ts +5 -5
- package/types/resources/BusinessEntity.d.ts +49 -69
- package/types/resources/BusinessEntityTransfer.d.ts +11 -17
- package/types/resources/Card.d.ts +146 -424
- package/types/resources/Comment.d.ts +72 -189
- package/types/resources/Contact.d.ts +12 -64
- package/types/resources/ContractTerm.d.ts +15 -96
- package/types/resources/Coupon.d.ts +282 -758
- package/types/resources/CouponCode.d.ts +56 -52
- package/types/resources/CouponSet.d.ts +92 -234
- package/types/resources/CreditNote.d.ts +588 -1758
- package/types/resources/CreditNoteEstimate.d.ts +131 -157
- package/types/resources/Currency.d.ts +75 -62
- package/types/resources/Customer.d.ts +892 -835
- package/types/resources/CustomerEntitlement.d.ts +24 -35
- package/types/resources/DifferentialPrice.d.ts +116 -314
- package/types/resources/Discount.d.ts +20 -125
- package/types/resources/Download.d.ts +6 -22
- package/types/resources/Entitlement.d.ts +51 -160
- package/types/resources/EntitlementOverride.d.ts +58 -139
- package/types/resources/Estimate.d.ts +1178 -527
- package/types/resources/Event.d.ts +67 -178
- package/types/resources/Export.d.ts +563 -723
- package/types/resources/Feature.d.ts +117 -433
- package/types/resources/GatewayErrorDetail.d.ts +16 -72
- package/types/resources/Gift.d.ts +265 -432
- package/types/resources/Hierarchy.d.ts +8 -36
- package/types/resources/HostedPage.d.ts +1017 -1153
- package/types/resources/ImpactedItem.d.ts +13 -50
- package/types/resources/ImpactedItemPrice.d.ts +13 -15
- package/types/resources/ImpactedSubscription.d.ts +13 -45
- package/types/resources/InAppSubscription.d.ts +93 -389
- package/types/resources/Installment.d.ts +35 -110
- package/types/resources/InstallmentConfig.d.ts +54 -155
- package/types/resources/InstallmentDetail.d.ts +19 -27
- package/types/resources/Invoice.d.ts +1574 -3157
- package/types/resources/InvoiceEstimate.d.ts +131 -161
- package/types/resources/Item.d.ts +133 -611
- package/types/resources/ItemEntitlement.d.ts +78 -215
- package/types/resources/ItemFamily.d.ts +69 -178
- package/types/resources/ItemPrice.d.ts +291 -1203
- package/types/resources/Metadata.d.ts +3 -5
- package/types/resources/Order.d.ts +538 -1471
- package/types/resources/PaymentIntent.d.ts +163 -347
- package/types/resources/PaymentReferenceNumber.d.ts +7 -29
- package/types/resources/PaymentSource.d.ts +476 -1272
- package/types/resources/PaymentVoucher.d.ts +87 -306
- package/types/resources/PortalSession.d.ts +71 -207
- package/types/resources/PriceVariant.d.ts +91 -279
- package/types/resources/PricingPageSession.d.ts +92 -41
- package/types/resources/PromotionalCredit.d.ts +90 -346
- package/types/resources/Purchase.d.ts +185 -315
- package/types/resources/Quote.d.ts +1406 -887
- package/types/resources/QuoteLineGroup.d.ts +125 -452
- package/types/resources/QuotedCharge.d.ts +45 -274
- package/types/resources/QuotedSubscription.d.ts +100 -488
- package/types/resources/Ramp.d.ts +230 -747
- package/types/resources/ResourceMigration.d.ts +25 -80
- package/types/resources/SiteMigrationDetail.d.ts +34 -112
- package/types/resources/Subscription.d.ts +2390 -4336
- package/types/resources/SubscriptionEntitlement.d.ts +59 -160
- package/types/resources/SubscriptionEstimate.d.ts +51 -75
- package/types/resources/TaxWithheld.d.ts +15 -40
- package/types/resources/ThirdPartyPaymentMethod.d.ts +7 -29
- package/types/resources/TimeMachine.d.ts +43 -97
- package/types/resources/Token.d.ts +15 -85
- package/types/resources/Transaction.d.ts +276 -911
- package/types/resources/UnbilledCharge.d.ts +189 -164
- package/types/resources/Usage.d.ts +89 -279
- package/types/resources/VirtualBankAccount.d.ts +103 -255
- package/types/resources/filter.d.ts +52 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -81
- package/.github/ISSUE_TEMPLATE/config.yml +0 -6
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -34
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -8
- package/lib/chargebee.js +0 -512
- package/lib/resources/api_endpoints.js +0 -2935
- package/types/resources/NonSubscription.d.ts +0 -30
- package/types/resources/Session.d.ts +0 -41
|
@@ -1,1237 +1,325 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
///<reference path='./filter.d.ts'/>
|
|
2
4
|
declare module 'chargebee' {
|
|
3
5
|
export interface ItemPrice {
|
|
4
|
-
[key
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* @description The name of the item price used in customer-facing pages and documents. These include [invoices](./invoices?prod_cat_ver=2) and [hosted pages](hosted_pages?prod_cat_ver=2). If not provided, then `name` is used
|
|
51
|
-
|
|
52
|
-
*/
|
|
53
|
-
|
|
54
|
-
external_name?:string;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @description An immutable unique identifier of a [price variant](price_variants).
|
|
58
|
-
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
|
-
price_variant_id?:string;
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* @description **Note**
|
|
65
|
-
|
|
66
|
-
Applicable only for item prices with:
|
|
67
|
-
|
|
68
|
-
* [item_type](item_prices#item_price_item_type) = `addon`.
|
|
69
|
-
* [pricing_model](item_prices#item_price_pricing_model) = `per_unit`.
|
|
70
|
-
Specifies how to manage charges or credits for the addon item price during a [subscription update](subscriptions?prod_cat_ver=2#update_subscription_for_items) or [estimating](estimates?prod_cat_ver=2#estimate_for_updating_a_subscription) a subscription update. \* full_term - Charge the full price of the addon item price or give the full credit. Don't apply any proration. \* site_default - Use the [site-wide proration setting](https://www.chargebee.com/docs/2.0/proration.html#proration-for-subscription-change). \* partial_term - Prorate the charges or credits for the rest of the current term.
|
|
71
|
-
|
|
72
|
-
*/
|
|
73
|
-
|
|
74
|
-
proration_type?:'partial_term' | 'full_term' | 'site_default';
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* @description The [pricing scheme](https://www.chargebee.com/docs/2.0/plans.html#pricing-models) for this item price. If subscriptions, invoices or [differential prices](./differential_prices?prod_cat_ver=2) exist for this item price, `pricing_model` cannot be changed.
|
|
78
|
-
\* tiered - The per unit price is based on the tier that the total quantity falls in.
|
|
79
|
-
\* per_unit - A fixed price per unit quantity.
|
|
80
|
-
\* flat_fee - A fixed price that is not quantity-based.
|
|
81
|
-
\* volume - There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.
|
|
82
|
-
\* stairstep - A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.
|
|
83
|
-
|
|
84
|
-
*/
|
|
85
|
-
|
|
86
|
-
pricing_model:PricingModel;
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* @description The cost of the item price when the pricing model is `flat_fee`. When the pricing model is `per_unit`, it is the price per unit quantity of the item. Not applicable for the other pricing models. The value is in the [minor unit of the currency](https://apidocs.chargebee.com/docs/api#handling_currency_units).
|
|
90
|
-
|
|
91
|
-
*/
|
|
92
|
-
|
|
93
|
-
price?:number;
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* @description The price of the item when the pricing_model is `flat_fee`. When the pricing model is `per_unit`, it is the price per unit quantity of the item. Not applicable for the other pricing models. The value is in decimal and in major units of the currency. Also, this is only applicable when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
|
|
97
|
-
|
|
98
|
-
*/
|
|
99
|
-
|
|
100
|
-
price_in_decimal?:string;
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* @description
|
|
104
|
-
|
|
105
|
-
* When the item `type` is `plan`: The billing period of the plan in `period_unit`s. For example, create a 6 month plan by providing `period` as 6 and `period_unit` as month.
|
|
106
|
-
* When item `type` is `addon`: The period of the addon in `period_unit`s. For example, create an addon with a 2 month `period` by providing period as 2 and `period_unit` as `month`. The period of an addon is the duration for which its `price` applies. When attached to a plan, the addon is billed for the billing period of the plan. [Learn more.](https://www.chargebee.com/docs/2.0/addons-billingcycle.html)
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
If subscriptions or invoices exist for this item price, `period` cannot be changed. The `period` is mandatory when the item `type` is `plan` or `addon`
|
|
111
|
-
|
|
112
|
-
*/
|
|
113
|
-
|
|
114
|
-
period?:number;
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* @description The currency code ([ISO 4217 format](https://www.chargebee.com/docs/2.0/supported-currencies.html)) for the item price. If subscriptions, invoices or [differential prices](./differential_prices?prod_cat_ver=2) exist for this item price, `currency_code` cannot be changed.
|
|
118
|
-
|
|
119
|
-
*/
|
|
120
|
-
|
|
121
|
-
currency_code:string;
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* @description The unit of time for `period`. If subscriptions or invoices exist for this item price, `period_unit` cannot be changed. The `period_unit` is mandatory when the item `type` is `plan` or `addon` \* month - A period of 1 calendar month. \* week - A period of 7 days. \* year - A period of 1 calendar year. \* day - A period of 24 hours.
|
|
125
|
-
|
|
126
|
-
*/
|
|
127
|
-
|
|
128
|
-
period_unit?:'week' | 'month' | 'year' | 'day';
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* @description The trial period of the plan in `trial_period_unit`s. You can also set [trial periods for addons](https://www.chargebee.com/docs/2.0/addons-trial.html); contact [Support](https://chargebee.freshdesk.com/support/home) to enable that feature.
|
|
132
|
-
|
|
133
|
-
*/
|
|
134
|
-
|
|
135
|
-
trial_period?:number;
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* @description The unit of time for `trial_period`. \* month - A period of 1 calendar month. \* day - A period of 24 hours.
|
|
139
|
-
|
|
140
|
-
*/
|
|
141
|
-
|
|
142
|
-
trial_period_unit?:'month' | 'day';
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* @description Applicable only when [End-of-trial Action](https://www.chargebee.com/docs/trial_periods.html#how-to-define-the-end-of-trial-actions-for-subscriptions) has been enabled for the site. Specifies the operation to be carried out for the subscription once the trial ends. Whenever the `item.type` is `plan` and a trial period is defined for this item price, this attribute (parameter) is returned (required). This can be overridden at the [subscription-level](subscriptions?prod_cat_ver=2#subscription_trial_end_action). \* cancel_subscription - The subscription cancels. \* activate_subscription - The subscription activates and charges are raised for non-metered items. \* site_default - The action [configured for the site](https://www.chargebee.com/docs/trial_periods.html#how-to-define-the-end-of-trial-actions-for-subscriptions) at the time when the trial ends, takes effect.
|
|
146
|
-
|
|
147
|
-
*/
|
|
148
|
-
|
|
149
|
-
trial_end_action?:'activate_subscription' | 'cancel_subscription' | 'site_default';
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* @description Defines the shipping frequency. Example: to bill customer every 2 weeks, provide "2" here.
|
|
153
|
-
|
|
154
|
-
*/
|
|
155
|
-
|
|
156
|
-
shipping_period?:number;
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* @description Defines the shipping frequency in association with shipping period. \* day - A period of 24 hours. \* week - A period of 7 days. \* year - A period of 1 calendar year. \* month - A period of 1 calendar month.
|
|
160
|
-
|
|
161
|
-
*/
|
|
162
|
-
|
|
163
|
-
shipping_period_unit?:'week' | 'month' | 'year' | 'day';
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* @description The default number of billing cycles a subscription to the plan must run. Can be [overridden](./subscriptions?prod_cat_ver=2) for a subscription.
|
|
167
|
-
|
|
168
|
-
Addons can also [have billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html). However, you must contact [Support](https://chargebee.freshdesk.com/support/home) to enable that. Also, for addons, you can [override this](./attached_items?prod_cat_ver=2) while attaching it to a plan. However, if you provide the value while [applying the addon to a subscription](./subscriptions?prod_cat_ver=2#subscription_subscription_items_item_type), then that value takes still higher precedence.
|
|
169
|
-
If subscriptions, invoices or [differential prices](./differential_prices?prod_cat_ver=2) exist for this item price, `billing_cycles` cannot be changed.
|
|
170
|
-
|
|
171
|
-
*/
|
|
172
|
-
|
|
173
|
-
billing_cycles?:number;
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* @description Free quantity the subscriptions of this item_price will have. Only the quantity more than this will be charged for the subscription.
|
|
177
|
-
|
|
178
|
-
*/
|
|
179
|
-
|
|
180
|
-
free_quantity:number;
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* @description The quantity of the item that is available free-of-charge, represented in decimal. When a subscription is created for this plan or when the plan of a subscription is changed to this one, only the quantity above this number is charged for. Applicable for quantity-based plans and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
|
|
184
|
-
|
|
185
|
-
*/
|
|
186
|
-
|
|
187
|
-
free_quantity_in_decimal?:string;
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* @description The subscription channel this object originated from and is maintained in. \* app_store - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed. \* web - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI. \* play_store - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed.
|
|
191
|
-
|
|
192
|
-
In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.
|
|
193
|
-
|
|
194
|
-
*/
|
|
195
|
-
|
|
196
|
-
channel?:Channel;
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* @description Version number of this resource. The `resource_version` is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
|
|
200
|
-
|
|
201
|
-
*/
|
|
202
|
-
|
|
203
|
-
resource_version?:number;
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* @description Timestamp indicating when this item price was last updated
|
|
207
|
-
|
|
208
|
-
*/
|
|
209
|
-
|
|
210
|
-
updated_at?:number;
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* @description Timestamp indicating when this item price was created
|
|
214
|
-
|
|
215
|
-
*/
|
|
216
|
-
|
|
217
|
-
created_at:number;
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* @description Timestamp indicating when this item price was archived.
|
|
221
|
-
|
|
222
|
-
*/
|
|
223
|
-
|
|
224
|
-
archived_at?:number;
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* @description A customer-facing note added to all invoices associated with this API resource. This note becomes one among [all the notes](/docs/api/invoices#invoice_notes) displayed on the invoice PDF.
|
|
228
|
-
|
|
229
|
-
*/
|
|
230
|
-
|
|
231
|
-
invoice_notes?:string;
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* @description Specifies whether taxes apply to this item price. This value is set and returned even if [Taxes](https://www.chargebee.com/docs/tax.html) have been disabled in Chargebee. However, the value is effective only while Taxes are enabled.
|
|
235
|
-
|
|
236
|
-
*/
|
|
237
|
-
|
|
238
|
-
is_taxable?:boolean;
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* @description A collection of key-value pairs that provides extra information about the item price. [Learn more](advanced-features#metadata).
|
|
242
|
-
|
|
243
|
-
*/
|
|
244
|
-
|
|
245
|
-
metadata?:object;
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* @description Type of item. \* addon - A recurring component that can be added to a subscription in addition to its plan. \* charge - A non-recurring component that can be added to a subscription in addition to its plan. An charge can also be applied to a customer [directly](./invoices?prod_cat_ver=2#create_invoice_for_a_charge-item) without being applied to a subscription. \* plan - An essential component of a subscription. Every subscription has exactly one plan. It has a recurring charge and its period defines the billing period of the subscription.
|
|
249
|
-
|
|
250
|
-
*/
|
|
251
|
-
|
|
252
|
-
item_type?:ItemType;
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* @description Whether the item price's description should be shown on [invoice PDFs](/docs/api/invoices#retrieve_invoice_as_pdf). If this Boolean is changed, only invoices generated (or [regenerated](https://www.chargebee.com/docs/invoice-operations.html#actions-for-payment-due-not-paid-invoices_regenerate-invoice)) after the change are affected; past invoices are not.
|
|
256
|
-
|
|
257
|
-
*/
|
|
258
|
-
|
|
259
|
-
show_description_in_invoices?:boolean;
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* @description Whether the item price's description should be shown on [quote PDFs](/docs/api/quotes#retrieve_quote_as_pdf). If this Boolean is changed, only quotes created after the change are affected; past quotes are not.
|
|
263
|
-
|
|
264
|
-
*/
|
|
265
|
-
|
|
266
|
-
show_description_in_quotes?:boolean;
|
|
267
|
-
|
|
268
|
-
/**
|
|
269
|
-
* @description List of quantity-based pricing tiers for the item price. Applicable only for `tiered`, `volume`, and `stairstep` ` pricing_models`.
|
|
270
|
-
|
|
271
|
-
*/
|
|
272
|
-
|
|
273
|
-
tiers?:ItemPrice.Tier[];
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* @description The tax details for the item price. Includes those details relevant for third-party integrations.
|
|
277
|
-
|
|
278
|
-
*/
|
|
279
|
-
|
|
280
|
-
tax_detail?:ItemPrice.TaxDetail;
|
|
281
|
-
|
|
282
|
-
tax_providers_fields?:ItemPrice.TaxProvidersField[];
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* @description Accounting integration details. The values are typically dependent on the [accounting integration](https://www.chargebee.com/docs/finance-integration-index.html) used.
|
|
286
|
-
|
|
287
|
-
*/
|
|
288
|
-
|
|
289
|
-
accounting_detail?:ItemPrice.AccountingDetail;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
item_family_id?: string;
|
|
10
|
+
item_id?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
status?: 'active' | 'archived' | 'deleted';
|
|
13
|
+
external_name?: string;
|
|
14
|
+
price_variant_id?: string;
|
|
15
|
+
proration_type?: 'site_default' | 'partial_term' | 'full_term';
|
|
16
|
+
pricing_model: PricingModel;
|
|
17
|
+
price?: number;
|
|
18
|
+
price_in_decimal?: string;
|
|
19
|
+
period?: number;
|
|
20
|
+
currency_code: string;
|
|
21
|
+
period_unit?: 'day' | 'week' | 'month' | 'year';
|
|
22
|
+
trial_period?: number;
|
|
23
|
+
trial_period_unit?: 'day' | 'month';
|
|
24
|
+
trial_end_action?:
|
|
25
|
+
| 'site_default'
|
|
26
|
+
| 'activate_subscription'
|
|
27
|
+
| 'cancel_subscription';
|
|
28
|
+
shipping_period?: number;
|
|
29
|
+
shipping_period_unit?: 'day' | 'week' | 'month' | 'year';
|
|
30
|
+
billing_cycles?: number;
|
|
31
|
+
free_quantity: number;
|
|
32
|
+
free_quantity_in_decimal?: string;
|
|
33
|
+
channel?: Channel;
|
|
34
|
+
resource_version?: number;
|
|
35
|
+
updated_at?: number;
|
|
36
|
+
created_at: number;
|
|
37
|
+
archived_at?: number;
|
|
38
|
+
invoice_notes?: string;
|
|
39
|
+
tiers?: ItemPrice.Tier[];
|
|
40
|
+
is_taxable?: boolean;
|
|
41
|
+
tax_detail?: ItemPrice.TaxDetail;
|
|
42
|
+
tax_providers_fields?: ItemPrice.TaxProvidersField[];
|
|
43
|
+
accounting_detail?: ItemPrice.AccountingDetail;
|
|
44
|
+
metadata?: any;
|
|
45
|
+
item_type?: ItemType;
|
|
46
|
+
archivable?: boolean;
|
|
47
|
+
parent_item_id?: string;
|
|
48
|
+
show_description_in_invoices?: boolean;
|
|
49
|
+
show_description_in_quotes?: boolean;
|
|
290
50
|
}
|
|
291
|
-
export namespace ItemPrice {
|
|
292
|
-
export class ItemPriceResource {
|
|
293
|
-
/**
|
|
294
|
-
* @description This API creates an item price (a price point) for an [item](./items?prod_cat_ver=2).
|
|
295
|
-
|
|
296
|
-
*/
|
|
297
|
-
|
|
298
|
-
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* @description This API retrieves a specific item price using the id.
|
|
302
|
-
|
|
303
|
-
*/
|
|
304
|
-
|
|
305
|
-
retrieve(item_price_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
* @description Updates an item price with the changes specified. Unspecified item price attributes are not modified.
|
|
309
|
-
|
|
310
|
-
*/
|
|
311
|
-
|
|
312
|
-
update(item_price_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* @description Returns a list of item prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order.
|
|
316
|
-
|
|
317
|
-
*/
|
|
318
|
-
|
|
319
|
-
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
* @description Deletes an item price, marking its `status` as `deleted`. If it is part of a subscription or invoice, the item price `status` is marked `archived` instead. Once deleted, the `id` and `name` of the item price can be reused to create a new item price.
|
|
323
|
-
|
|
324
|
-
*/
|
|
325
|
-
|
|
326
|
-
delete(item_price_id:string):ChargebeeRequest<DeleteResponse>;
|
|
327
|
-
|
|
328
|
-
/**
|
|
329
|
-
* @description Returns the set of all applicable [addon-items](items?prod_cat_ver=2#addon-items) for a specific [plan-item price](item_prices?prod_cat_ver=2#types). This set consists of all addon-items whose item prices can be applied to a subscription having the plan-item price in it. When determining this set, Chargebee considers the [item_applicability](items?prod_cat_ver=2#item_item_applicability) and [applicable_items](items?prod_cat_ver=2#item_applicable_items) defined for the parent item of the plan-item price.
|
|
330
|
-
|
|
331
|
-
*/
|
|
332
|
-
|
|
333
|
-
find_applicable_items(item_price_id:string, input?:FindApplicableItemsInputParam):ChargebeeRequest<FindApplicableItemsResponse>;
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* @description Returns the set of all applicable [addon-item](item_prices?prod_cat_ver=2#types) prices for a specific plan-item price. This set consists of all the addon-item prices that can be applied to a subscription having the plan-item price. When determining this set, Chargebee considers the following:
|
|
337
51
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
52
|
+
export namespace ItemPrice {
|
|
53
|
+
export class ItemPriceResource {
|
|
54
|
+
create(
|
|
55
|
+
input: CreateInputParam,
|
|
56
|
+
headers?: ChargebeeRequestHeader,
|
|
57
|
+
): Promise<ChargebeeResponse<CreateResponse>>;
|
|
58
|
+
|
|
59
|
+
retrieve(
|
|
60
|
+
item_price_id: string,
|
|
61
|
+
headers?: ChargebeeRequestHeader,
|
|
62
|
+
): Promise<ChargebeeResponse<RetrieveResponse>>;
|
|
63
|
+
|
|
64
|
+
update(
|
|
65
|
+
item_price_id: string,
|
|
66
|
+
input: UpdateInputParam,
|
|
67
|
+
headers?: ChargebeeRequestHeader,
|
|
68
|
+
): Promise<ChargebeeResponse<UpdateResponse>>;
|
|
69
|
+
|
|
70
|
+
list(
|
|
71
|
+
input?: ListInputParam,
|
|
72
|
+
headers?: ChargebeeRequestHeader,
|
|
73
|
+
): Promise<ChargebeeResponse<ListResponse>>;
|
|
74
|
+
|
|
75
|
+
delete(
|
|
76
|
+
item_price_id: string,
|
|
77
|
+
headers?: ChargebeeRequestHeader,
|
|
78
|
+
): Promise<ChargebeeResponse<DeleteResponse>>;
|
|
79
|
+
|
|
80
|
+
findApplicableItems(
|
|
81
|
+
item_price_id: string,
|
|
82
|
+
input?: FindApplicableItemsInputParam,
|
|
83
|
+
headers?: ChargebeeRequestHeader,
|
|
84
|
+
): Promise<ChargebeeResponse<FindApplicableItemsResponse>>;
|
|
85
|
+
|
|
86
|
+
findApplicableItemPrices(
|
|
87
|
+
item_price_id: string,
|
|
88
|
+
input?: FindApplicableItemPricesInputParam,
|
|
89
|
+
headers?: ChargebeeRequestHeader,
|
|
90
|
+
): Promise<ChargebeeResponse<FindApplicableItemPricesResponse>>;
|
|
351
91
|
}
|
|
352
|
-
export interface CreateInputParam {
|
|
353
|
-
[key : string] : any;
|
|
354
|
-
/**
|
|
355
|
-
* @description The identifier for the item price. It is unique and immutable.
|
|
356
|
-
|
|
357
|
-
*/
|
|
358
|
-
|
|
359
|
-
id:string;
|
|
360
|
-
|
|
361
|
-
/**
|
|
362
|
-
* @description A unique display name for the item price in the Chargebee UI. If `external_name` is not provided, this is also used in customer-facing pages and documents such as [invoices](./invoices?prod_cat_ver=2) and [hosted pages](hosted_pages?prod_cat_ver=2).
|
|
363
|
-
|
|
364
|
-
*/
|
|
365
|
-
|
|
366
|
-
name:string;
|
|
367
|
-
|
|
368
|
-
/**
|
|
369
|
-
* @description Description of the item price.
|
|
370
|
-
**Note:**
|
|
371
|
-
If your input contains characters that are subjected to sanitization (like incomplete HTML tags), the sanitization process might increase the length of your input. If the sanitized input exceeds the limit, your request will be rejected.
|
|
372
|
-
|
|
373
|
-
*/
|
|
374
|
-
|
|
375
|
-
description?:string;
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* @description The id of the item that the item price belongs to.
|
|
379
|
-
|
|
380
|
-
*/
|
|
381
|
-
|
|
382
|
-
item_id:string;
|
|
383
|
-
|
|
384
|
-
/**
|
|
385
|
-
* @description A customer-facing note added to all invoices associated with this API resource. This note becomes one among [all the notes](/docs/api/invoices#invoice_notes) displayed on the invoice PDF.
|
|
386
|
-
|
|
387
|
-
*/
|
|
388
|
-
|
|
389
|
-
invoice_notes?:string;
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
* @description **Note**
|
|
393
|
-
|
|
394
|
-
Applicable only for item prices with:
|
|
395
|
-
|
|
396
|
-
* [item_type](item_prices#item_price_item_type) = `addon`.
|
|
397
|
-
* [pricing_model](item_prices#item_price_pricing_model) = `per_unit`.
|
|
398
|
-
Specifies how to manage charges or credits for the addon item price during a [subscription update](subscriptions?prod_cat_ver=2#update_subscription_for_items) or [estimating](estimates?prod_cat_ver=2#estimate_for_updating_a_subscription) a subscription update. \* full_term - Charge the full price of the addon item price or give the full credit. Don't apply any proration. \* site_default - Use the [site-wide proration setting](https://www.chargebee.com/docs/2.0/proration.html#proration-for-subscription-change). \* partial_term - Prorate the charges or credits for the rest of the current term.
|
|
399
|
-
|
|
400
|
-
*/
|
|
401
|
-
|
|
402
|
-
proration_type?:'partial_term' | 'full_term' | 'site_default';
|
|
403
|
-
|
|
404
|
-
/**
|
|
405
|
-
* @description The name of the item price used in customer-facing pages and documents. These include [invoices](./invoices?prod_cat_ver=2) and [hosted pages](hosted_pages?prod_cat_ver=2). If not provided, then `name` is used.
|
|
406
|
-
|
|
407
|
-
*/
|
|
408
|
-
|
|
409
|
-
external_name?:string;
|
|
410
|
-
|
|
411
|
-
/**
|
|
412
|
-
* @description The currency code ([ISO 4217 format](https://www.chargebee.com/docs/supported-currencies.html)) for the item price. Is required when multiple currencies have been enabled.
|
|
413
|
-
|
|
414
|
-
*/
|
|
415
|
-
|
|
416
|
-
currency_code?:string;
|
|
417
|
-
|
|
418
|
-
/**
|
|
419
|
-
* @description An immutable unique identifier of a [price variant](price_variants).
|
|
420
|
-
|
|
421
|
-
*/
|
|
422
|
-
|
|
423
|
-
price_variant_id?:string;
|
|
424
|
-
|
|
425
|
-
/**
|
|
426
|
-
* @description Specifies whether taxes apply to this item price. This value is set and returned even if [Taxes](https://www.chargebee.com/docs/tax.html) have been disabled in Chargebee. However, the value is effective only while Taxes are enabled.
|
|
427
|
-
|
|
428
|
-
*/
|
|
429
|
-
|
|
430
|
-
is_taxable?:boolean;
|
|
431
|
-
|
|
432
|
-
/**
|
|
433
|
-
* @description Free quantity the subscriptions of this item_price will have. Only the quantity more than this will be charged for the subscription.
|
|
434
|
-
|
|
435
|
-
*/
|
|
436
|
-
|
|
437
|
-
free_quantity?:number;
|
|
438
|
-
|
|
439
|
-
/**
|
|
440
|
-
* @description The quantity of the item that is available free-of-charge, represented in decimal. When a subscription is created for this plan or when the plan of a subscription is changed to this one, only the quantity above this number is charged for. Applicable for quantity-based plans and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
|
|
441
|
-
|
|
442
|
-
*/
|
|
443
|
-
|
|
444
|
-
free_quantity_in_decimal?:string;
|
|
445
|
-
|
|
446
|
-
/**
|
|
447
|
-
* @description A collection of key-value pairs that provides extra information about the item price.
|
|
448
|
-
**Note:** There's a character limit of 65,535.
|
|
449
|
-
[Learn more](advanced-features#metadata).
|
|
450
|
-
|
|
451
|
-
*/
|
|
452
|
-
|
|
453
|
-
metadata?:object;
|
|
454
|
-
|
|
455
|
-
/**
|
|
456
|
-
* @description Whether the item price's description should be shown on [invoice PDFs](/docs/api/invoices#retrieve_invoice_as_pdf). If this Boolean is changed, only invoices generated (or [regenerated](https://www.chargebee.com/docs/invoice-operations.html#actions-for-payment-due-not-paid-invoices_regenerate-invoice)) after the change are affected; past invoices are not.
|
|
457
|
-
|
|
458
|
-
*/
|
|
459
|
-
|
|
460
|
-
show_description_in_invoices?:boolean;
|
|
461
|
-
|
|
462
|
-
/**
|
|
463
|
-
* @description Whether the item price's description should be shown on [quote PDFs](/docs/api/quotes#retrieve_quote_as_pdf). If this Boolean is changed, only quotes created after the change are affected; past quotes are not.
|
|
464
|
-
|
|
465
|
-
*/
|
|
466
|
-
|
|
467
|
-
show_description_in_quotes?:boolean;
|
|
468
|
-
|
|
469
|
-
/**
|
|
470
|
-
* @description The [pricing scheme](https://www.chargebee.com/docs/2.0/plans.html#pricing-models) for this item price. If subscriptions, invoices or [differential prices](./differential_prices?prod_cat_ver=2) exist for this item price, `pricing_model` cannot be changed.
|
|
471
|
-
\* tiered - The per unit price is based on the tier that the total quantity falls in.
|
|
472
|
-
\* per_unit - A fixed price per unit quantity.
|
|
473
|
-
\* flat_fee - A fixed price that is not quantity-based.
|
|
474
|
-
\* volume - There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.
|
|
475
|
-
\* stairstep - A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.
|
|
476
|
-
|
|
477
|
-
*/
|
|
478
|
-
|
|
479
|
-
pricing_model?:PricingModel;
|
|
480
|
-
|
|
481
|
-
/**
|
|
482
|
-
* @description The cost of the item price when the pricing model is `flat_fee`. When the pricing model is `per_unit`, it is the price per unit quantity of the item. Not applicable for the other pricing models. The value is in the [minor unit of the currency](https://apidocs.chargebee.com/docs/api#handling_currency_units).
|
|
483
|
-
|
|
484
|
-
*/
|
|
485
|
-
|
|
486
|
-
price?:number;
|
|
487
|
-
|
|
488
|
-
/**
|
|
489
|
-
* @description The price of the item when the pricing_model is `flat_fee`. When the pricing model is `per_unit`, it is the price per unit quantity of the item. Not applicable for the other pricing models. The value is in decimal and in major units of the currency. Also, this is only applicable when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
|
|
490
|
-
|
|
491
|
-
*/
|
|
492
|
-
|
|
493
|
-
price_in_decimal?:string;
|
|
494
|
-
|
|
495
|
-
/**
|
|
496
|
-
* @description The unit of time for `period`. If subscriptions or invoices exist for this item price, `period_unit` cannot be changed. The `period_unit` is mandatory when the item `type` is `plan` or `addon`. \* month - A period of 1 calendar month. \* week - A period of 7 days. \* year - A period of 1 calendar year. \* day - A period of 24 hours.
|
|
497
92
|
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
/**
|
|
503
|
-
* @description
|
|
504
|
-
|
|
505
|
-
* When the item `type` is `plan`: The billing period of the plan in `period_unit`s. For example, create a 6 month plan by providing `period` as 6 and `period_unit` as month.
|
|
506
|
-
* When item `type` is `addon`: The period of the addon in `period_unit`s. For example, create an addon with a 2 month `period` by providing period as 2 and `period_unit` as `month`. The period of an addon is the duration for which its `price` applies. When attached to a plan, the addon is billed for the billing period of the plan. [Learn more.](https://www.chargebee.com/docs/2.0/addons-billingcycle.html)
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
If subscriptions or invoices exist for this item price, `period` cannot be changed. The `period` is mandatory when the item `type` is `plan` or `addon`.
|
|
511
|
-
|
|
512
|
-
*/
|
|
513
|
-
|
|
514
|
-
period?:number;
|
|
515
|
-
|
|
516
|
-
/**
|
|
517
|
-
* @description The unit of time for `trial_period`. \* month - A period of 1 calendar month. \* day - A period of 24 hours.
|
|
518
|
-
|
|
519
|
-
*/
|
|
520
|
-
|
|
521
|
-
trial_period_unit?:'month' | 'day';
|
|
522
|
-
|
|
523
|
-
/**
|
|
524
|
-
* @description The trial period of the plan in `trial_period_unit`s. You can also set [trial periods for addons](https://www.chargebee.com/docs/2.0/addons-trial.html); contact [Support](https://chargebee.freshdesk.com/support/home) to enable that feature.
|
|
525
|
-
|
|
526
|
-
*/
|
|
527
|
-
|
|
528
|
-
trial_period?:number;
|
|
529
|
-
|
|
530
|
-
/**
|
|
531
|
-
* @description Defines the shipping frequency. Example: to bill customer every 2 weeks, provide "2" here.
|
|
532
|
-
|
|
533
|
-
*/
|
|
534
|
-
|
|
535
|
-
shipping_period?:number;
|
|
536
|
-
|
|
537
|
-
/**
|
|
538
|
-
* @description Defines the shipping frequency in association with shipping period. \* day - A period of 24 hours. \* week - A period of 7 days. \* year - A period of 1 calendar year. \* month - A period of 1 calendar month.
|
|
93
|
+
export interface CreateResponse {
|
|
94
|
+
item_price: ItemPrice;
|
|
95
|
+
}
|
|
539
96
|
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
/**
|
|
545
|
-
* @description The default number of billing cycles a subscription to the plan must run. Can be [overridden](./subscriptions?prod_cat_ver=2) for a subscription.
|
|
97
|
+
export interface RetrieveResponse {
|
|
98
|
+
item_price: ItemPrice;
|
|
99
|
+
}
|
|
546
100
|
|
|
547
|
-
|
|
548
|
-
|
|
101
|
+
export interface UpdateResponse {
|
|
102
|
+
item_price: ItemPrice;
|
|
103
|
+
}
|
|
549
104
|
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
/**
|
|
555
|
-
* @description Applicable only when [End-of-trial Action](https://www.chargebee.com/docs/trial_periods.html#how-to-define-the-end-of-trial-actions-for-subscriptions) has been enabled for the site. Specifies the operation to be carried out for the subscription once the trial ends. Whenever the `item.type` is `plan` and a trial period is defined for this item price, this attribute (parameter) is returned (required). This can be overridden at the [subscription-level](subscriptions?prod_cat_ver=2#subscription_trial_end_action). \* cancel_subscription - The subscription cancels. \* activate_subscription - The subscription activates and charges are raised for non-metered items. \* site_default - The action [configured for the site](https://www.chargebee.com/docs/trial_periods.html#how-to-define-the-end-of-trial-actions-for-subscriptions) at the time when the trial ends, takes effect.
|
|
105
|
+
export interface ListResponse {
|
|
106
|
+
list: { item_price: ItemPrice }[];
|
|
107
|
+
next_offset?: string;
|
|
108
|
+
}
|
|
556
109
|
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
/**
|
|
562
|
-
* @description Parameters for tax_detail
|
|
110
|
+
export interface DeleteResponse {
|
|
111
|
+
item_price: ItemPrice;
|
|
112
|
+
}
|
|
563
113
|
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
/**
|
|
569
|
-
* @description Parameters for accounting_detail
|
|
114
|
+
export interface FindApplicableItemsResponse {
|
|
115
|
+
list: { item: Item }[];
|
|
116
|
+
next_offset?: string;
|
|
117
|
+
}
|
|
570
118
|
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
/**
|
|
576
|
-
* @description Parameters for tiers
|
|
119
|
+
export interface FindApplicableItemPricesResponse {
|
|
120
|
+
list: { item_price: ItemPrice }[];
|
|
121
|
+
next_offset?: string;
|
|
122
|
+
}
|
|
577
123
|
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
124
|
+
export interface Tier {
|
|
125
|
+
starting_unit: number;
|
|
126
|
+
ending_unit?: number;
|
|
127
|
+
price: number;
|
|
128
|
+
starting_unit_in_decimal?: string;
|
|
129
|
+
ending_unit_in_decimal?: string;
|
|
130
|
+
price_in_decimal?: string;
|
|
583
131
|
}
|
|
584
|
-
export interface
|
|
585
|
-
|
|
132
|
+
export interface TaxDetail {
|
|
133
|
+
tax_profile_id?: string;
|
|
134
|
+
avalara_sale_type?: AvalaraSaleType;
|
|
135
|
+
avalara_transaction_type?: number;
|
|
136
|
+
avalara_service_type?: number;
|
|
137
|
+
avalara_tax_code?: string;
|
|
138
|
+
hsn_code?: string;
|
|
139
|
+
taxjar_product_code?: string;
|
|
586
140
|
}
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
141
|
+
export interface TaxProvidersField {
|
|
142
|
+
provider_name: string;
|
|
143
|
+
field_id: string;
|
|
144
|
+
field_value: string;
|
|
590
145
|
}
|
|
591
|
-
export interface
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
name?:string;
|
|
599
|
-
|
|
600
|
-
/**
|
|
601
|
-
* @description Description of the item price.
|
|
602
|
-
**Note:**
|
|
603
|
-
If your input contains characters that are subjected to sanitization (like incomplete HTML tags), the sanitization process might increase the length of your input. If the sanitized input exceeds the limit, your request will be rejected.
|
|
604
|
-
|
|
605
|
-
*/
|
|
606
|
-
|
|
607
|
-
description?:string;
|
|
608
|
-
|
|
609
|
-
/**
|
|
610
|
-
* @description **Note**
|
|
611
|
-
|
|
612
|
-
Applicable only for item prices with:
|
|
613
|
-
|
|
614
|
-
* [item_type](item_prices#item_price_item_type) = `addon`.
|
|
615
|
-
* [pricing_model](item_prices#item_price_pricing_model) = `per_unit`.
|
|
616
|
-
Specifies how to manage charges or credits for the addon item price during a [subscription update](subscriptions?prod_cat_ver=2#update_subscription_for_items) or [estimating](estimates?prod_cat_ver=2#estimate_for_updating_a_subscription) a subscription update. \* full_term - Charge the full price of the addon item price or give the full credit. Don't apply any proration. \* site_default - Use the [site-wide proration setting](https://www.chargebee.com/docs/2.0/proration.html#proration-for-subscription-change). \* partial_term - Prorate the charges or credits for the rest of the current term.
|
|
617
|
-
|
|
618
|
-
*/
|
|
619
|
-
|
|
620
|
-
proration_type?:'site_default' | 'partial_term' | 'full_term';
|
|
621
|
-
|
|
622
|
-
/**
|
|
623
|
-
* @description An immutable unique identifier of a [price variant](price_variants).
|
|
624
|
-
|
|
625
|
-
*/
|
|
626
|
-
|
|
627
|
-
price_variant_id?:string;
|
|
628
|
-
|
|
629
|
-
/**
|
|
630
|
-
* @description The status of the item price. \* archived - The item price is no longer active and cannot be used in new subscriptions or added to existing ones. Existing subscriptions that already have this item price will continue to renew with the item price. \* active - The item price can be used in subscriptions. \* deleted - Indicates that the item price has been deleted. The `id` and `name` can be reused.
|
|
631
|
-
|
|
632
|
-
*/
|
|
633
|
-
|
|
634
|
-
status?:'archived' | 'active';
|
|
635
|
-
|
|
636
|
-
/**
|
|
637
|
-
* @description The name of the item price used in customer-facing pages and documents. These include [invoices](./invoices?prod_cat_ver=2) and [hosted pages](hosted_pages?prod_cat_ver=2). If not provided, then `name` is used.
|
|
638
|
-
|
|
639
|
-
*/
|
|
640
|
-
|
|
641
|
-
external_name?:string;
|
|
642
|
-
|
|
643
|
-
/**
|
|
644
|
-
* @description The currency code ([ISO 4217 format](https://www.chargebee.com/docs/2.0/supported-currencies.html)) for the item price. If subscriptions, invoices or [differential prices](./differential_prices?prod_cat_ver=2) exist for this item price, `currency_code` cannot be changed.
|
|
645
|
-
|
|
646
|
-
*/
|
|
647
|
-
|
|
648
|
-
currency_code?:string;
|
|
649
|
-
|
|
650
|
-
/**
|
|
651
|
-
* @description A customer-facing note added to all invoices associated with this API resource. This note becomes one among [all the notes](/docs/api/invoices#invoice_notes) displayed on the invoice PDF.
|
|
652
|
-
|
|
653
|
-
*/
|
|
654
|
-
|
|
655
|
-
invoice_notes?:string;
|
|
656
|
-
|
|
657
|
-
/**
|
|
658
|
-
* @description Specifies whether taxes apply to this item price. This value is set and returned even if [Taxes](https://www.chargebee.com/docs/tax.html) have been disabled in Chargebee. However, the value is effective only while Taxes are enabled.
|
|
659
|
-
|
|
660
|
-
*/
|
|
661
|
-
|
|
662
|
-
is_taxable?:boolean;
|
|
663
|
-
|
|
664
|
-
/**
|
|
665
|
-
* @description Free quantity the subscriptions of this item_price will have. Only the quantity more than this will be charged for the subscription.
|
|
666
|
-
|
|
667
|
-
*/
|
|
668
|
-
|
|
669
|
-
free_quantity?:number;
|
|
670
|
-
|
|
671
|
-
/**
|
|
672
|
-
* @description The quantity of the item that is available free-of-charge, represented in decimal. When a subscription is created for this plan or when the plan of a subscription is changed to this one, only the quantity above this number is charged for. Applicable for quantity-based plans and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
|
|
673
|
-
|
|
674
|
-
*/
|
|
675
|
-
|
|
676
|
-
free_quantity_in_decimal?:string;
|
|
677
|
-
|
|
678
|
-
/**
|
|
679
|
-
* @description A collection of key-value pairs that provides extra information about the item price.
|
|
680
|
-
**Note:** There's a character limit of 65,535.
|
|
681
|
-
[Learn more](advanced-features#metadata).
|
|
682
|
-
|
|
683
|
-
*/
|
|
684
|
-
|
|
685
|
-
metadata?:object;
|
|
686
|
-
|
|
687
|
-
/**
|
|
688
|
-
* @description The [pricing scheme](https://www.chargebee.com/docs/2.0/plans.html#pricing-models) for this item price. If subscriptions, invoices or [differential prices](./differential_prices?prod_cat_ver=2) exist for this item price, `pricing_model` cannot be changed.
|
|
689
|
-
\* tiered - The per unit price is based on the tier that the total quantity falls in.
|
|
690
|
-
\* per_unit - A fixed price per unit quantity.
|
|
691
|
-
\* flat_fee - A fixed price that is not quantity-based.
|
|
692
|
-
\* volume - There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.
|
|
693
|
-
\* stairstep - A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.
|
|
694
|
-
|
|
695
|
-
*/
|
|
696
|
-
|
|
697
|
-
pricing_model?:PricingModel;
|
|
698
|
-
|
|
699
|
-
/**
|
|
700
|
-
* @description The cost of the item price when the pricing model is `flat_fee`. When the pricing model is `per_unit`, it is the price per unit quantity of the item. Not applicable for the other pricing models. The value is in the [minor unit of the currency](https://apidocs.chargebee.com/docs/api#handling_currency_units).
|
|
701
|
-
|
|
702
|
-
*/
|
|
703
|
-
|
|
704
|
-
price?:number;
|
|
705
|
-
|
|
706
|
-
/**
|
|
707
|
-
* @description The price of the item when the pricing_model is `flat_fee`. When the pricing model is `per_unit`, it is the price per unit quantity of the item. Not applicable for the other pricing models. The value is in decimal and in major units of the currency. Also, this is only applicable when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
|
|
708
|
-
|
|
709
|
-
*/
|
|
710
|
-
|
|
711
|
-
price_in_decimal?:string;
|
|
712
|
-
|
|
713
|
-
/**
|
|
714
|
-
* @description The unit of time for `period`. If subscriptions or invoices exist for this item price, `period_unit` cannot be changed. The `period_unit` is mandatory when the item `type` is `plan` or `addon`. \* month - A period of 1 calendar month. \* week - A period of 7 days. \* year - A period of 1 calendar year. \* day - A period of 24 hours.
|
|
715
|
-
|
|
716
|
-
*/
|
|
717
|
-
|
|
718
|
-
period_unit?:'week' | 'month' | 'year' | 'day';
|
|
719
|
-
|
|
720
|
-
/**
|
|
721
|
-
* @description
|
|
722
|
-
|
|
723
|
-
* When the item `type` is `plan`: The billing period of the plan in `period_unit`s. For example, create a 6 month plan by providing `period` as 6 and `period_unit` as month.
|
|
724
|
-
* When item `type` is `addon`: The period of the addon in `period_unit`s. For example, create an addon with a 2 month `period` by providing period as 2 and `period_unit` as `month`. The period of an addon is the duration for which its `price` applies. When attached to a plan, the addon is billed for the billing period of the plan. [Learn more.](https://www.chargebee.com/docs/2.0/addons-billingcycle.html)
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
If subscriptions or invoices exist for this item price, `period` cannot be changed. The `period` is mandatory when the item `type` is `plan` or `addon`.
|
|
729
|
-
|
|
730
|
-
*/
|
|
731
|
-
|
|
732
|
-
period?:number;
|
|
733
|
-
|
|
734
|
-
/**
|
|
735
|
-
* @description The unit of time for `trial_period`. \* month - A period of 1 calendar month. \* day - A period of 24 hours.
|
|
736
|
-
|
|
737
|
-
*/
|
|
738
|
-
|
|
739
|
-
trial_period_unit?:'month' | 'day';
|
|
740
|
-
|
|
741
|
-
/**
|
|
742
|
-
* @description The trial period of the plan in `trial_period_unit`s. You can also set [trial periods for addons](https://www.chargebee.com/docs/2.0/addons-trial.html); contact [Support](https://chargebee.freshdesk.com/support/home) to enable that feature.
|
|
743
|
-
|
|
744
|
-
*/
|
|
745
|
-
|
|
746
|
-
trial_period?:number;
|
|
747
|
-
|
|
748
|
-
/**
|
|
749
|
-
* @description Defines the shipping frequency. Example: to bill customer every 2 weeks, provide "2" here.
|
|
750
|
-
|
|
751
|
-
*/
|
|
752
|
-
|
|
753
|
-
shipping_period?:number;
|
|
754
|
-
|
|
755
|
-
/**
|
|
756
|
-
* @description Defines the shipping frequency in association with shipping period. \* day - A period of 24 hours. \* week - A period of 7 days. \* year - A period of 1 calendar year. \* month - A period of 1 calendar month.
|
|
757
|
-
|
|
758
|
-
*/
|
|
759
|
-
|
|
760
|
-
shipping_period_unit?:'week' | 'month' | 'year' | 'day';
|
|
761
|
-
|
|
762
|
-
/**
|
|
763
|
-
* @description The default number of billing cycles a subscription to the plan must run. Can be [overridden](./subscriptions?prod_cat_ver=2) for a subscription.
|
|
764
|
-
|
|
765
|
-
Addons can also [have billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html). However, you must contact [Support](https://chargebee.freshdesk.com/support/home) to enable that. Also, for addons, you can [override this](./attached_items?prod_cat_ver=2) while attaching it to a plan. However, if you provide the value while [applying the addon to a subscription](./subscriptions?prod_cat_ver=2#subscription_subscription_items_item_type), then that value takes still higher precedence.
|
|
766
|
-
If subscriptions, invoices or [differential prices](./differential_prices?prod_cat_ver=2) exist for this item price, `billing_cycles` cannot be changed.
|
|
767
|
-
|
|
768
|
-
*/
|
|
769
|
-
|
|
770
|
-
billing_cycles?:number;
|
|
771
|
-
|
|
772
|
-
/**
|
|
773
|
-
* @description Applicable only when [End-of-trial Action](https://www.chargebee.com/docs/trial_periods.html#how-to-define-the-end-of-trial-actions-for-subscriptions) has been enabled for the site. Specifies the operation to be carried out for the subscription once the trial ends. Whenever the `item.type` is `plan` and a trial period is defined for this item price, this attribute (parameter) is returned (required). This can be overridden at the [subscription-level](subscriptions?prod_cat_ver=2#subscription_trial_end_action). \* cancel_subscription - The subscription cancels. \* activate_subscription - The subscription activates and charges are raised for non-metered items. \* site_default - The action [configured for the site](https://www.chargebee.com/docs/trial_periods.html#how-to-define-the-end-of-trial-actions-for-subscriptions) at the time when the trial ends, takes effect.
|
|
774
|
-
|
|
775
|
-
*/
|
|
776
|
-
|
|
777
|
-
trial_end_action?:'activate_subscription' | 'cancel_subscription' | 'site_default';
|
|
778
|
-
|
|
779
|
-
/**
|
|
780
|
-
* @description Whether the item price's description should be shown on [invoice PDFs](/docs/api/invoices#retrieve_invoice_as_pdf). If this Boolean is changed, only invoices generated (or [regenerated](https://www.chargebee.com/docs/invoice-operations.html#actions-for-payment-due-not-paid-invoices_regenerate-invoice)) after the change are affected; past invoices are not.
|
|
781
|
-
|
|
782
|
-
*/
|
|
783
|
-
|
|
784
|
-
show_description_in_invoices?:boolean;
|
|
785
|
-
|
|
786
|
-
/**
|
|
787
|
-
* @description Whether the item price's description should be shown on [quote PDFs](/docs/api/quotes#retrieve_quote_as_pdf). If this Boolean is changed, only quotes created after the change are affected; past quotes are not.
|
|
788
|
-
|
|
789
|
-
*/
|
|
790
|
-
|
|
791
|
-
show_description_in_quotes?:boolean;
|
|
792
|
-
|
|
793
|
-
/**
|
|
794
|
-
* @description Parameters for tax_detail
|
|
795
|
-
|
|
796
|
-
*/
|
|
797
|
-
|
|
798
|
-
tax_detail?:{avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_tax_code?:string,avalara_transaction_type?:number,hsn_code?:string,tax_profile_id?:string,taxjar_product_code?:string};
|
|
799
|
-
|
|
800
|
-
/**
|
|
801
|
-
* @description Parameters for accounting_detail
|
|
802
|
-
|
|
803
|
-
*/
|
|
804
|
-
|
|
805
|
-
accounting_detail?:{accounting_category1?:string,accounting_category2?:string,accounting_category3?:string,accounting_category4?:string,accounting_code?:string,sku?:string};
|
|
806
|
-
|
|
807
|
-
/**
|
|
808
|
-
* @description Parameters for tiers
|
|
809
|
-
|
|
810
|
-
*/
|
|
811
|
-
|
|
812
|
-
tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
813
|
-
tax_providers_fields?: { field_id?: string, field_value?: string, provider_name?: string }[];
|
|
146
|
+
export interface AccountingDetail {
|
|
147
|
+
sku?: string;
|
|
148
|
+
accounting_code?: string;
|
|
149
|
+
accounting_category1?: string;
|
|
150
|
+
accounting_category2?: string;
|
|
151
|
+
accounting_category3?: string;
|
|
152
|
+
accounting_category4?: string;
|
|
814
153
|
}
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
* @description Returns a list of item prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order.
|
|
154
|
+
// REQUEST PARAMS
|
|
155
|
+
//---------------
|
|
818
156
|
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
157
|
+
export interface CreateInputParam {
|
|
158
|
+
id: string;
|
|
159
|
+
name: string;
|
|
160
|
+
description?: string;
|
|
161
|
+
item_id: string;
|
|
162
|
+
invoice_notes?: string;
|
|
163
|
+
proration_type?: 'site_default' | 'partial_term' | 'full_term';
|
|
164
|
+
external_name?: string;
|
|
165
|
+
currency_code?: string;
|
|
166
|
+
price_variant_id?: string;
|
|
167
|
+
is_taxable?: boolean;
|
|
168
|
+
free_quantity?: number;
|
|
169
|
+
free_quantity_in_decimal?: string;
|
|
170
|
+
metadata?: any;
|
|
171
|
+
show_description_in_invoices?: boolean;
|
|
172
|
+
show_description_in_quotes?: boolean;
|
|
173
|
+
pricing_model?: PricingModel;
|
|
174
|
+
price?: number;
|
|
175
|
+
price_in_decimal?: string;
|
|
176
|
+
period_unit?: 'day' | 'week' | 'month' | 'year';
|
|
177
|
+
period?: number;
|
|
178
|
+
trial_period_unit?: 'day' | 'month';
|
|
179
|
+
trial_period?: number;
|
|
180
|
+
shipping_period?: number;
|
|
181
|
+
shipping_period_unit?: 'day' | 'week' | 'month' | 'year';
|
|
182
|
+
billing_cycles?: number;
|
|
183
|
+
trial_end_action?:
|
|
184
|
+
| 'site_default'
|
|
185
|
+
| 'activate_subscription'
|
|
186
|
+
| 'cancel_subscription';
|
|
187
|
+
tax_detail?: TaxDetailCreateInputParam;
|
|
188
|
+
accounting_detail?: AccountingDetailCreateInputParam;
|
|
189
|
+
tiers?: TiersCreateInputParam[];
|
|
190
|
+
tax_providers_fields?: TaxProvidersFieldsCreateInputParam[];
|
|
191
|
+
[key: string]: unknown;
|
|
192
|
+
}
|
|
193
|
+
export interface UpdateInputParam {
|
|
194
|
+
name?: string;
|
|
195
|
+
description?: string;
|
|
196
|
+
proration_type?: 'site_default' | 'partial_term' | 'full_term';
|
|
197
|
+
price_variant_id?: string;
|
|
198
|
+
status?: 'active' | 'archived';
|
|
199
|
+
external_name?: string;
|
|
200
|
+
currency_code?: string;
|
|
201
|
+
invoice_notes?: string;
|
|
202
|
+
is_taxable?: boolean;
|
|
203
|
+
free_quantity?: number;
|
|
204
|
+
free_quantity_in_decimal?: string;
|
|
205
|
+
metadata?: any;
|
|
206
|
+
pricing_model?: PricingModel;
|
|
207
|
+
price?: number;
|
|
208
|
+
price_in_decimal?: string;
|
|
209
|
+
period_unit?: 'day' | 'week' | 'month' | 'year';
|
|
210
|
+
period?: number;
|
|
211
|
+
trial_period_unit?: 'day' | 'month';
|
|
212
|
+
trial_period?: number;
|
|
213
|
+
shipping_period?: number;
|
|
214
|
+
shipping_period_unit?: 'day' | 'week' | 'month' | 'year';
|
|
215
|
+
billing_cycles?: number;
|
|
216
|
+
trial_end_action?:
|
|
217
|
+
| 'site_default'
|
|
218
|
+
| 'activate_subscription'
|
|
219
|
+
| 'cancel_subscription';
|
|
220
|
+
show_description_in_invoices?: boolean;
|
|
221
|
+
show_description_in_quotes?: boolean;
|
|
222
|
+
tax_detail?: TaxDetailUpdateInputParam;
|
|
223
|
+
accounting_detail?: AccountingDetailUpdateInputParam;
|
|
224
|
+
tiers?: TiersUpdateInputParam[];
|
|
225
|
+
tax_providers_fields?: TaxProvidersFieldsUpdateInputParam[];
|
|
226
|
+
[key: string]: unknown;
|
|
829
227
|
}
|
|
830
228
|
export interface ListInputParam {
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
852
|
-
|
|
853
|
-
/**
|
|
854
|
-
* @description Returns a list of item prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order.
|
|
855
|
-
|
|
856
|
-
*/
|
|
857
|
-
|
|
858
|
-
name?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
859
|
-
|
|
860
|
-
/**
|
|
861
|
-
* @description Returns a list of item prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order.
|
|
862
|
-
|
|
863
|
-
*/
|
|
864
|
-
|
|
865
|
-
pricing_model?:{in?:string,is?:'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep',is_not?:'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep',not_in?:string};
|
|
866
|
-
|
|
867
|
-
/**
|
|
868
|
-
* @description Returns a list of item prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order.
|
|
869
|
-
|
|
870
|
-
*/
|
|
871
|
-
|
|
872
|
-
item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
873
|
-
|
|
874
|
-
/**
|
|
875
|
-
* @description Returns a list of item prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order.
|
|
876
|
-
|
|
877
|
-
*/
|
|
878
|
-
|
|
879
|
-
item_family_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
880
|
-
|
|
881
|
-
/**
|
|
882
|
-
* @description Returns a list of item prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order.
|
|
883
|
-
|
|
884
|
-
*/
|
|
885
|
-
|
|
886
|
-
item_type?:{in?:string,is?:'charge' | 'addon' | 'plan',is_not?:'charge' | 'addon' | 'plan',not_in?:string};
|
|
887
|
-
|
|
888
|
-
/**
|
|
889
|
-
* @description Returns a list of item prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order.
|
|
890
|
-
|
|
891
|
-
*/
|
|
892
|
-
|
|
893
|
-
currency_code?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
894
|
-
|
|
895
|
-
/**
|
|
896
|
-
* @description Returns a list of item prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order.
|
|
897
|
-
|
|
898
|
-
*/
|
|
899
|
-
|
|
900
|
-
price_variant_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
901
|
-
|
|
902
|
-
/**
|
|
903
|
-
* @description Returns a list of item prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order.
|
|
904
|
-
|
|
905
|
-
*/
|
|
906
|
-
|
|
907
|
-
trial_period?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
908
|
-
|
|
909
|
-
/**
|
|
910
|
-
* @description Returns a list of item prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order.
|
|
911
|
-
|
|
912
|
-
*/
|
|
913
|
-
|
|
914
|
-
trial_period_unit?:{in?:string,is?:'month' | 'day',is_not?:'month' | 'day',not_in?:string};
|
|
915
|
-
|
|
916
|
-
/**
|
|
917
|
-
* @description Returns a list of item prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order.
|
|
918
|
-
|
|
919
|
-
*/
|
|
920
|
-
|
|
921
|
-
status?:{in?:string,is?:'archived' | 'deleted' | 'active',is_not?:'archived' | 'deleted' | 'active',not_in?:string};
|
|
922
|
-
|
|
923
|
-
/**
|
|
924
|
-
* @description Returns a list of item prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order.
|
|
925
|
-
|
|
926
|
-
*/
|
|
927
|
-
|
|
928
|
-
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
929
|
-
|
|
930
|
-
/**
|
|
931
|
-
* @description Returns a list of item prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order.
|
|
932
|
-
|
|
933
|
-
*/
|
|
934
|
-
|
|
935
|
-
period_unit?:{in?:string,is?:'week' | 'month' | 'year' | 'day',is_not?:'week' | 'month' | 'year' | 'day',not_in?:string};
|
|
936
|
-
|
|
937
|
-
/**
|
|
938
|
-
* @description Returns a list of item prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order.
|
|
939
|
-
|
|
940
|
-
*/
|
|
941
|
-
|
|
942
|
-
period?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
943
|
-
|
|
944
|
-
/**
|
|
945
|
-
* @description Returns a list of item prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order.
|
|
946
|
-
|
|
947
|
-
*/
|
|
948
|
-
|
|
949
|
-
channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string};
|
|
950
|
-
|
|
951
|
-
/**
|
|
952
|
-
* @description Returns a list of item prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order.
|
|
953
|
-
|
|
954
|
-
*/
|
|
955
|
-
|
|
956
|
-
sort_by?:{asc?:'updated_at' | 'name' | 'id',desc?:'updated_at' | 'name' | 'id'};
|
|
229
|
+
limit?: number;
|
|
230
|
+
offset?: string;
|
|
231
|
+
id?: filter.String;
|
|
232
|
+
name?: filter.String;
|
|
233
|
+
pricing_model?: filter.Enum;
|
|
234
|
+
item_id?: filter.String;
|
|
235
|
+
item_family_id?: filter.String;
|
|
236
|
+
item_type?: filter.Enum;
|
|
237
|
+
currency_code?: filter.String;
|
|
238
|
+
price_variant_id?: filter.String;
|
|
239
|
+
trial_period?: filter.Number;
|
|
240
|
+
trial_period_unit?: filter.Enum;
|
|
241
|
+
status?: filter.Enum;
|
|
242
|
+
updated_at?: filter.Timestamp;
|
|
243
|
+
period_unit?: filter.Enum;
|
|
244
|
+
period?: filter.Number;
|
|
245
|
+
channel?: filter.Enum;
|
|
246
|
+
'sort_by[asc]'?: string;
|
|
247
|
+
'sort_by[desc]'?: string;
|
|
957
248
|
}
|
|
958
|
-
export interface
|
|
959
|
-
|
|
249
|
+
export interface FindApplicableItemsInputParam {
|
|
250
|
+
limit?: number;
|
|
251
|
+
offset?: string;
|
|
252
|
+
'sort_by[asc]'?: string;
|
|
253
|
+
'sort_by[desc]'?: string;
|
|
960
254
|
}
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
list:{item:Item}[];
|
|
969
|
-
|
|
970
|
-
/**
|
|
971
|
-
* @description Returns the set of all applicable [addon-items](items?prod_cat_ver=2#addon-items) for a specific [plan-item price](item_prices?prod_cat_ver=2#types). This set consists of all addon-items whose item prices can be applied to a subscription having the plan-item price in it. When determining this set, Chargebee considers the [item_applicability](items?prod_cat_ver=2#item_item_applicability) and [applicable_items](items?prod_cat_ver=2#item_applicable_items) defined for the parent item of the plan-item price.
|
|
972
|
-
|
|
973
|
-
*/
|
|
974
|
-
|
|
975
|
-
next_offset?:string;
|
|
255
|
+
export interface FindApplicableItemPricesInputParam {
|
|
256
|
+
limit?: number;
|
|
257
|
+
offset?: string;
|
|
258
|
+
item_id?: string;
|
|
259
|
+
'sort_by[asc]'?: string;
|
|
260
|
+
'sort_by[desc]'?: string;
|
|
976
261
|
}
|
|
977
|
-
export interface
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
/**
|
|
987
|
-
* @description Returns the set of all applicable [addon-items](items?prod_cat_ver=2#addon-items) for a specific [plan-item price](item_prices?prod_cat_ver=2#types). This set consists of all addon-items whose item prices can be applied to a subscription having the plan-item price in it. When determining this set, Chargebee considers the [item_applicability](items?prod_cat_ver=2#item_item_applicability) and [applicable_items](items?prod_cat_ver=2#item_applicable_items) defined for the parent item of the plan-item price.
|
|
988
|
-
|
|
989
|
-
*/
|
|
990
|
-
|
|
991
|
-
offset?:string;
|
|
992
|
-
|
|
993
|
-
/**
|
|
994
|
-
* @description Returns the set of all applicable [addon-items](items?prod_cat_ver=2#addon-items) for a specific [plan-item price](item_prices?prod_cat_ver=2#types). This set consists of all addon-items whose item prices can be applied to a subscription having the plan-item price in it. When determining this set, Chargebee considers the [item_applicability](items?prod_cat_ver=2#item_item_applicability) and [applicable_items](items?prod_cat_ver=2#item_applicable_items) defined for the parent item of the plan-item price.
|
|
995
|
-
|
|
996
|
-
*/
|
|
997
|
-
|
|
998
|
-
sort_by?:{asc?:'updated_at' | 'name' | 'id',desc?:'updated_at' | 'name' | 'id'};
|
|
262
|
+
export interface TaxDetailCreateInputParam {
|
|
263
|
+
tax_profile_id?: string;
|
|
264
|
+
avalara_tax_code?: string;
|
|
265
|
+
hsn_code?: string;
|
|
266
|
+
avalara_sale_type?: AvalaraSaleType;
|
|
267
|
+
avalara_transaction_type?: number;
|
|
268
|
+
avalara_service_type?: number;
|
|
269
|
+
taxjar_product_code?: string;
|
|
999
270
|
}
|
|
1000
|
-
export interface
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
**Note**
|
|
1008
|
-
|
|
1009
|
-
If an addon-item price has [differential pricing](differential_prices?prod_cat_ver=2) defined against the parent item of the plan-item price, then the pricing information in the addon-item price object returned, reflects the differential pricing.
|
|
1010
|
-
|
|
1011
|
-
*/
|
|
1012
|
-
|
|
1013
|
-
list:{item_price:ItemPrice}[];
|
|
1014
|
-
|
|
1015
|
-
/**
|
|
1016
|
-
* @description Returns the set of all applicable [addon-item](item_prices?prod_cat_ver=2#types) prices for a specific plan-item price. This set consists of all the addon-item prices that can be applied to a subscription having the plan-item price. When determining this set, Chargebee considers the following:
|
|
1017
|
-
|
|
1018
|
-
* the [item_applicability](items?prod_cat_ver=2#item_item_applicability) and [applicable_items](items?prod_cat_ver=2#item_applicable_items) defined for the parent item of the plan-item price
|
|
1019
|
-
* the [compatibility](subscriptions?prod_cat_ver=2#compatibility) of the addon-item prices to the plan-item price
|
|
1020
|
-
|
|
1021
|
-
**Note**
|
|
1022
|
-
|
|
1023
|
-
If an addon-item price has [differential pricing](differential_prices?prod_cat_ver=2) defined against the parent item of the plan-item price, then the pricing information in the addon-item price object returned, reflects the differential pricing.
|
|
1024
|
-
|
|
1025
|
-
*/
|
|
1026
|
-
|
|
1027
|
-
next_offset?:string;
|
|
271
|
+
export interface AccountingDetailCreateInputParam {
|
|
272
|
+
sku?: string;
|
|
273
|
+
accounting_code?: string;
|
|
274
|
+
accounting_category1?: string;
|
|
275
|
+
accounting_category2?: string;
|
|
276
|
+
accounting_category3?: string;
|
|
277
|
+
accounting_category4?: string;
|
|
1028
278
|
}
|
|
1029
|
-
export interface FindApplicableItemPricesInputParam {
|
|
1030
|
-
[key : string]: any;
|
|
1031
|
-
/**
|
|
1032
|
-
* @description Returns the set of all applicable [addon-item](item_prices?prod_cat_ver=2#types) prices for a specific plan-item price. This set consists of all the addon-item prices that can be applied to a subscription having the plan-item price. When determining this set, Chargebee considers the following:
|
|
1033
|
-
|
|
1034
|
-
* the [item_applicability](items?prod_cat_ver=2#item_item_applicability) and [applicable_items](items?prod_cat_ver=2#item_applicable_items) defined for the parent item of the plan-item price
|
|
1035
|
-
* the [compatibility](subscriptions?prod_cat_ver=2#compatibility) of the addon-item prices to the plan-item price
|
|
1036
|
-
|
|
1037
|
-
**Note**
|
|
1038
|
-
|
|
1039
|
-
If an addon-item price has [differential pricing](differential_prices?prod_cat_ver=2) defined against the parent item of the plan-item price, then the pricing information in the addon-item price object returned, reflects the differential pricing.
|
|
1040
|
-
|
|
1041
|
-
*/
|
|
1042
|
-
|
|
1043
|
-
limit?:number;
|
|
1044
|
-
|
|
1045
|
-
/**
|
|
1046
|
-
* @description Returns the set of all applicable [addon-item](item_prices?prod_cat_ver=2#types) prices for a specific plan-item price. This set consists of all the addon-item prices that can be applied to a subscription having the plan-item price. When determining this set, Chargebee considers the following:
|
|
1047
|
-
|
|
1048
|
-
* the [item_applicability](items?prod_cat_ver=2#item_item_applicability) and [applicable_items](items?prod_cat_ver=2#item_applicable_items) defined for the parent item of the plan-item price
|
|
1049
|
-
* the [compatibility](subscriptions?prod_cat_ver=2#compatibility) of the addon-item prices to the plan-item price
|
|
1050
|
-
|
|
1051
|
-
**Note**
|
|
1052
|
-
|
|
1053
|
-
If an addon-item price has [differential pricing](differential_prices?prod_cat_ver=2) defined against the parent item of the plan-item price, then the pricing information in the addon-item price object returned, reflects the differential pricing.
|
|
1054
|
-
|
|
1055
|
-
*/
|
|
1056
|
-
|
|
1057
|
-
offset?:string;
|
|
1058
|
-
|
|
1059
|
-
/**
|
|
1060
|
-
* @description Returns the set of all applicable [addon-item](item_prices?prod_cat_ver=2#types) prices for a specific plan-item price. This set consists of all the addon-item prices that can be applied to a subscription having the plan-item price. When determining this set, Chargebee considers the following:
|
|
1061
|
-
|
|
1062
|
-
* the [item_applicability](items?prod_cat_ver=2#item_item_applicability) and [applicable_items](items?prod_cat_ver=2#item_applicable_items) defined for the parent item of the plan-item price
|
|
1063
|
-
* the [compatibility](subscriptions?prod_cat_ver=2#compatibility) of the addon-item prices to the plan-item price
|
|
1064
|
-
|
|
1065
|
-
**Note**
|
|
1066
|
-
|
|
1067
|
-
If an addon-item price has [differential pricing](differential_prices?prod_cat_ver=2) defined against the parent item of the plan-item price, then the pricing information in the addon-item price object returned, reflects the differential pricing.
|
|
1068
|
-
|
|
1069
|
-
*/
|
|
1070
|
-
|
|
1071
|
-
item_id?:string;
|
|
1072
|
-
|
|
1073
|
-
/**
|
|
1074
|
-
* @description Returns the set of all applicable [addon-item](item_prices?prod_cat_ver=2#types) prices for a specific plan-item price. This set consists of all the addon-item prices that can be applied to a subscription having the plan-item price. When determining this set, Chargebee considers the following:
|
|
1075
|
-
|
|
1076
|
-
* the [item_applicability](items?prod_cat_ver=2#item_item_applicability) and [applicable_items](items?prod_cat_ver=2#item_applicable_items) defined for the parent item of the plan-item price
|
|
1077
|
-
* the [compatibility](subscriptions?prod_cat_ver=2#compatibility) of the addon-item prices to the plan-item price
|
|
1078
279
|
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
280
|
+
export interface TiersCreateInputParam {
|
|
281
|
+
starting_unit?: number;
|
|
282
|
+
ending_unit?: number;
|
|
283
|
+
price?: number;
|
|
284
|
+
starting_unit_in_decimal?: string;
|
|
285
|
+
ending_unit_in_decimal?: string;
|
|
286
|
+
price_in_decimal?: string;
|
|
1086
287
|
}
|
|
1087
|
-
export interface
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
*/
|
|
1092
|
-
|
|
1093
|
-
starting_unit:number;
|
|
1094
|
-
|
|
1095
|
-
/**
|
|
1096
|
-
* @description The upper limit of a range of units for the tier
|
|
1097
|
-
|
|
1098
|
-
*/
|
|
1099
|
-
|
|
1100
|
-
ending_unit?:number;
|
|
1101
|
-
|
|
1102
|
-
/**
|
|
1103
|
-
* @description The per-unit price for the tier when the `pricing_model` is `tiered` or `volume`; the total cost for the item price when the `pricing_model` is `stairstep`. The value is in the [minor unit of the currency](https://apidocs.chargebee.com/docs/api#handling_currency_units).
|
|
1104
|
-
|
|
1105
|
-
*/
|
|
1106
|
-
|
|
1107
|
-
price:number;
|
|
1108
|
-
|
|
1109
|
-
starting_unit_in_decimal?:string;
|
|
1110
|
-
|
|
1111
|
-
ending_unit_in_decimal?:string;
|
|
1112
|
-
|
|
1113
|
-
price_in_decimal?:string;
|
|
288
|
+
export interface TaxProvidersFieldsCreateInputParam {
|
|
289
|
+
provider_name: string;
|
|
290
|
+
field_id: string;
|
|
291
|
+
field_value: string;
|
|
1114
292
|
}
|
|
1115
|
-
export interface
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
/**
|
|
1124
|
-
* @description Indicates the [Avalara sale type](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/transaction-information/#lineitem) for the item price. Applicable only if you use the [AvaTax for Communications integration](https://www.chargebee.com/docs/2.0/avatax-for-communication.html). \* vendor_use - Transaction is for an item that is subject to vendor use tax \* consumed - Transaction is for an item that is consumed directly \* wholesale - Transaction is a sale to another company that will resell your product or service to another consumer \* retail - Transaction is a sale to an end user
|
|
1125
|
-
|
|
1126
|
-
*/
|
|
1127
|
-
|
|
1128
|
-
avalara_sale_type?:AvalaraSaleType;
|
|
1129
|
-
|
|
1130
|
-
/**
|
|
1131
|
-
* @description Indicates the [Avalara transaction type](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/transaction-information/#lineitem) for the item price. Applicable only if you use the [AvaTax for Communications integration](https://www.chargebee.com/docs/2.0/avatax-for-communication.html).
|
|
1132
|
-
|
|
1133
|
-
*/
|
|
1134
|
-
|
|
1135
|
-
avalara_transaction_type?:number;
|
|
1136
|
-
|
|
1137
|
-
/**
|
|
1138
|
-
* @description Indicates the [Avalara service type](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/transaction-information/#lineitem) for the item price. Applicable only if you use the [AvaTax for Communications integration](https://www.chargebee.com/docs/2.0/avatax-for-communication.html).
|
|
1139
|
-
|
|
1140
|
-
*/
|
|
1141
|
-
|
|
1142
|
-
avalara_service_type?:number;
|
|
1143
|
-
|
|
1144
|
-
/**
|
|
1145
|
-
* @description The [Avalara tax codes](https://taxcode.avatax.avalara.com) for the item price. Applicable only if you use [AvaTax for Sales integration](https://www.chargebee.com/docs/2.0/avatax-for-sales.html).
|
|
1146
|
-
|
|
1147
|
-
*/
|
|
1148
|
-
|
|
1149
|
-
avalara_tax_code?:string;
|
|
1150
|
-
|
|
1151
|
-
/**
|
|
1152
|
-
* @description The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html) to which the item is mapped for calculating the customer's tax in India. Applicable only when both of the following conditions are true:
|
|
1153
|
-
|
|
1154
|
-
* **[India](https://www.chargebee.com/docs/indian-gst.html#configuring-indian-gst)** has been enabled as a **Tax Region**. (An error is returned when this condition is not true.)
|
|
1155
|
-
* The [**AvaTax for Sales** integration](https://www.chargebee.com/docs/avalara.html) has been enabled in Chargebee.
|
|
1156
|
-
|
|
1157
|
-
*/
|
|
1158
|
-
|
|
1159
|
-
hsn_code?:string;
|
|
1160
|
-
|
|
1161
|
-
/**
|
|
1162
|
-
* @description The [TaxJar product code](https://developers.taxjar.com/api/reference/#get-list-tax-categories) for the item price. Applicable only if you use [TaxJar integration](https://www.chargebee.com/docs/2.0/taxjar.html).
|
|
1163
|
-
|
|
1164
|
-
*/
|
|
1165
|
-
|
|
1166
|
-
taxjar_product_code?:string;
|
|
293
|
+
export interface TaxDetailUpdateInputParam {
|
|
294
|
+
tax_profile_id?: string;
|
|
295
|
+
avalara_tax_code?: string;
|
|
296
|
+
hsn_code?: string;
|
|
297
|
+
avalara_sale_type?: AvalaraSaleType;
|
|
298
|
+
avalara_transaction_type?: number;
|
|
299
|
+
avalara_service_type?: number;
|
|
300
|
+
taxjar_product_code?: string;
|
|
1167
301
|
}
|
|
1168
|
-
export interface
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
302
|
+
export interface AccountingDetailUpdateInputParam {
|
|
303
|
+
sku?: string;
|
|
304
|
+
accounting_code?: string;
|
|
305
|
+
accounting_category1?: string;
|
|
306
|
+
accounting_category2?: string;
|
|
307
|
+
accounting_category3?: string;
|
|
308
|
+
accounting_category4?: string;
|
|
1174
309
|
}
|
|
1175
|
-
export interface AccountingDetail {
|
|
1176
|
-
/**
|
|
1177
|
-
* @description This maps to the sku or product name in the accounting integration.
|
|
1178
310
|
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
* @description Used exclusively with the following [accounting integrations](https://www.chargebee.com/docs/2.0/finance-integration-index.html )
|
|
1192
|
-
|
|
1193
|
-
* [**Xero:**](https://www.chargebee.com/docs/2.0/xero.html )If you've categorized your products in Xero, provide the category name and option. Use the format: `<category-name>: <option>`. For example:`Location: Singapore.`
|
|
1194
|
-
* [**QuickBooks:**](https://www.chargebee.com/docs/2.0/quickbooks.html )If you've categorized your product sales in QuickBooks according to Classes, provide the class name here. Use the following format: `<parent class>:<sub-class-1>:<sub-class-2>...`
|
|
1195
|
-
* [**NetSuite:**](https://www.chargebee.com/docs/2.0/netsuite.html )If you've categorized your products in NetSuite under Classes, provide the class name here. Use the following format: `<parent class>: <sub-class-1>: <sub-class2>....` For example: `Services: Plan.`
|
|
1196
|
-
* [**Intacct:**](https://www.chargebee.com/docs/2.0/intacct.html )If you've classified your products in Intacct under Locations, provide the name of the Location here.
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
*/
|
|
1200
|
-
|
|
1201
|
-
accounting_category1?:string;
|
|
1202
|
-
|
|
1203
|
-
/**
|
|
1204
|
-
* @description Used exclusively with the following [accounting integrations](https://www.chargebee.com/docs/2.0/finance-integration-index.html )
|
|
1205
|
-
|
|
1206
|
-
* [**Xero:**](https://www.chargebee.com/docs/2.0/xero.html )If you've categorized your products in Xero, then provide the second category name and option here. Use the format: `<category-name>: <option>....` For example, `Region: South`
|
|
1207
|
-
* [**QuickBooks:**](https://www.chargebee.com/docs/2.0/quickbooks.html )If you've categorized your product sales in QuickBooks according to Location, provide the Location name here. Use the following format: `<parent-location>:<sub-location-1>:<sub-location-2>....` For example: `Location: North America: Canada`
|
|
1208
|
-
* [**NetSuite:**](https://www.chargebee.com/docs/2.0/netsuite.html )If you've categorized your products in NetSuite under Locations, provide the location name here. Use the following format `<parent-location> : <sub-location-1>: <sub-location-2>....` For example: `NA:US:CA`
|
|
1209
|
-
* [**Intacct:**](https://www.chargebee.com/docs/2.0/intacct.html )If you've classified your products in Intacct under Dimensions, provide the value of the Dimension here.
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
*/
|
|
1213
|
-
|
|
1214
|
-
accounting_category2?:string;
|
|
1215
|
-
|
|
1216
|
-
/**
|
|
1217
|
-
* @description Used exclusively with the following [accounting integrations](https://www.chargebee.com/docs/2.0/finance-integration-index.html )
|
|
1218
|
-
|
|
1219
|
-
* [**NetSuite:**](https://www.chargebee.com/docs/2.0/netsuite.html )If you've categorized your products in NetSuite under Departments, pass the department name here. Use the following format: `<parent-department> : <sub-department-1>: <sub-department-2>....` For example: `Production: Assembly.`
|
|
1220
|
-
* [**Intacct:**](https://www.chargebee.com/docs/2.0/intacct.html )If you've classified your products in Intacct under multiple Dimensions, provide the value of the second Dimension here.
|
|
1221
|
-
|
|
1222
|
-
*/
|
|
1223
|
-
|
|
1224
|
-
accounting_category3?:string;
|
|
1225
|
-
|
|
1226
|
-
/**
|
|
1227
|
-
* @description Used exclusively with the following [accounting integrations](https://www.chargebee.com/docs/1.0/finance-integration-index.html )
|
|
1228
|
-
|
|
1229
|
-
* [**NetSuite:**](https://www.chargebee.com/docs/2.0/netsuite.html )Provide the "Revenue Recognition Rule Id" for the product from NetSuite.
|
|
1230
|
-
* [**Intacct:**](https://www.chargebee.com/docs/2.0/intacct.html )If you have configured "Revenue Recognition Templates" for products in Intacct, provide the template ID for the product.
|
|
1231
|
-
|
|
1232
|
-
*/
|
|
1233
|
-
|
|
1234
|
-
accounting_category4?:string;
|
|
311
|
+
export interface TiersUpdateInputParam {
|
|
312
|
+
starting_unit?: number;
|
|
313
|
+
ending_unit?: number;
|
|
314
|
+
price?: number;
|
|
315
|
+
starting_unit_in_decimal?: string;
|
|
316
|
+
ending_unit_in_decimal?: string;
|
|
317
|
+
price_in_decimal?: string;
|
|
318
|
+
}
|
|
319
|
+
export interface TaxProvidersFieldsUpdateInputParam {
|
|
320
|
+
provider_name: string;
|
|
321
|
+
field_id: string;
|
|
322
|
+
field_value: string;
|
|
1235
323
|
}
|
|
1236
324
|
}
|
|
1237
|
-
}
|
|
325
|
+
}
|