chargebee 2.42.0 → 2.44.0
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 +82 -0
- package/README.md +3 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +47 -0
- package/package.json +1 -1
- package/types/core.d.ts +3 -2
- package/types/index.d.ts +6 -0
- package/types/resources/AttachedItem.d.ts +4 -0
- package/types/resources/Card.d.ts +5 -1
- package/types/resources/Coupon.d.ts +204 -522
- package/types/resources/Customer.d.ts +2 -2
- package/types/resources/DifferentialPrice.d.ts +4 -0
- package/types/resources/Estimate.d.ts +26 -7
- package/types/resources/Export.d.ts +16 -0
- package/types/resources/Invoice.d.ts +2 -2
- package/types/resources/Item.d.ts +17 -0
- package/types/resources/ItemFamily.d.ts +25 -100
- package/types/resources/ItemPrice.d.ts +91 -840
- package/types/resources/OmnichannelSubscription.d.ts +96 -0
- package/types/resources/OmnichannelTransaction.d.ts +26 -0
- package/types/resources/PaymentScheduleEstimate.d.ts +35 -0
- package/types/resources/PaymentScheduleScheme.d.ts +5 -1
- package/types/resources/PaymentSource.d.ts +25 -896
- package/types/resources/PriceVariant.d.ts +6 -0
- package/types/resources/PricingPageSession.d.ts +4 -0
- package/types/resources/Quote.d.ts +41 -38
- package/types/resources/QuotedSubscription.d.ts +53 -378
- package/types/resources/RecordedPurchase.d.ts +56 -0
- package/types/resources/Subscription.d.ts +729 -3247
- package/types/resources/Transaction.d.ts +99 -581
|
@@ -1,349 +1,108 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
2
3
|
declare module 'chargebee' {
|
|
3
4
|
export interface ItemPrice {
|
|
4
5
|
[key : string] : any;
|
|
5
|
-
/**
|
|
6
|
-
* @description The identifier for the item price. It is unique and immutable.
|
|
7
6
|
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
7
|
id:string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @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).
|
|
14
8
|
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
9
|
name:string;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @description Id of the item_family
|
|
21
10
|
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
11
|
item_family_id?:string;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description The id of the item that the item price belongs to.
|
|
28
12
|
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
13
|
item_id?:string;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @description Description of the item price.
|
|
35
|
-
**Note:**
|
|
36
|
-
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.
|
|
37
14
|
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
15
|
description?:string;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* @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.
|
|
44
16
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
status?:'archived' | 'deleted' | 'active';
|
|
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
|
|
17
|
+
status?:'active' | 'archived' | 'deleted';
|
|
51
18
|
|
|
52
|
-
*/
|
|
53
|
-
|
|
54
19
|
external_name?:string;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @description An immutable unique identifier of a [price variant](price_variants).
|
|
58
20
|
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
21
|
price_variant_id?:string;
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* @description **Note**
|
|
65
22
|
|
|
66
|
-
|
|
23
|
+
proration_type?:'site_default' | 'partial_term' | 'full_term';
|
|
67
24
|
|
|
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
25
|
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
26
|
|
|
91
|
-
*/
|
|
92
|
-
|
|
93
27
|
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
28
|
|
|
98
|
-
*/
|
|
99
|
-
|
|
100
29
|
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
30
|
|
|
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
31
|
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
32
|
|
|
119
|
-
*/
|
|
120
|
-
|
|
121
33
|
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
34
|
|
|
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.
|
|
35
|
+
period_unit?:'day' | 'week' | 'month' | 'year';
|
|
132
36
|
|
|
133
|
-
*/
|
|
134
|
-
|
|
135
37
|
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
38
|
|
|
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.
|
|
39
|
+
trial_period_unit?:'day' | 'month';
|
|
146
40
|
|
|
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.
|
|
41
|
+
trial_end_action?:'site_default' | 'activate_subscription' | 'cancel_subscription';
|
|
153
42
|
|
|
154
|
-
*/
|
|
155
|
-
|
|
156
43
|
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
44
|
|
|
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.
|
|
45
|
+
shipping_period_unit?:'day' | 'week' | 'month' | 'year';
|
|
167
46
|
|
|
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
47
|
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
48
|
|
|
178
|
-
*/
|
|
179
|
-
|
|
180
49
|
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
50
|
|
|
185
|
-
*/
|
|
186
|
-
|
|
187
51
|
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
52
|
|
|
194
|
-
*/
|
|
195
|
-
|
|
196
53
|
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
54
|
|
|
201
|
-
*/
|
|
202
|
-
|
|
203
55
|
resource_version?:number;
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* @description Timestamp indicating when this item price was last updated
|
|
207
56
|
|
|
208
|
-
*/
|
|
209
|
-
|
|
210
57
|
updated_at?:number;
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* @description Timestamp indicating when this item price was created
|
|
214
58
|
|
|
215
|
-
*/
|
|
216
|
-
|
|
217
59
|
created_at:number;
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* @description Timestamp indicating when this item price was archived.
|
|
221
60
|
|
|
222
|
-
|
|
223
|
-
|
|
61
|
+
usage_accumulation_reset_frequency?:UsageAccumulationResetFrequency;
|
|
62
|
+
|
|
224
63
|
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
64
|
|
|
229
|
-
*/
|
|
230
|
-
|
|
231
65
|
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
66
|
|
|
236
|
-
|
|
237
|
-
|
|
67
|
+
tiers?:ItemPrice.Tier[];
|
|
68
|
+
|
|
238
69
|
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
70
|
|
|
243
|
-
|
|
244
|
-
|
|
71
|
+
tax_detail?:ItemPrice.TaxDetail;
|
|
72
|
+
|
|
73
|
+
tax_providers_fields?:ItemPrice.TaxProvidersField[];
|
|
74
|
+
|
|
75
|
+
accounting_detail?:ItemPrice.AccountingDetail;
|
|
76
|
+
|
|
245
77
|
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
78
|
|
|
250
|
-
*/
|
|
251
|
-
|
|
252
79
|
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
80
|
|
|
257
|
-
|
|
258
|
-
|
|
81
|
+
archivable?:boolean;
|
|
82
|
+
|
|
83
|
+
parent_item_id?:string;
|
|
84
|
+
|
|
259
85
|
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
86
|
|
|
264
|
-
*/
|
|
265
|
-
|
|
266
87
|
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
88
|
|
|
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.
|
|
89
|
+
business_entity_id?:string;
|
|
277
90
|
|
|
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;
|
|
290
91
|
}
|
|
291
92
|
export namespace ItemPrice {
|
|
292
93
|
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
94
|
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
299
95
|
|
|
300
|
-
/**
|
|
301
|
-
* @description This API retrieves a specific item price using the id.
|
|
302
|
-
|
|
303
|
-
*/
|
|
304
|
-
|
|
305
96
|
retrieve(item_price_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
306
97
|
|
|
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>;
|
|
98
|
+
update(item_price_id:string, input:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
|
|
313
99
|
|
|
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
100
|
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
320
101
|
|
|
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
102
|
delete(item_price_id:string):ChargebeeRequest<DeleteResponse>;
|
|
327
103
|
|
|
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
104
|
find_applicable_items(item_price_id:string, input?:FindApplicableItemsInputParam):ChargebeeRequest<FindApplicableItemsResponse>;
|
|
334
105
|
|
|
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
|
-
|
|
338
|
-
* 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
|
|
339
|
-
* the [compatibility](subscriptions?prod_cat_ver=2#compatibility) of the addon-item prices to the plan-item price
|
|
340
|
-
|
|
341
|
-
**Note**
|
|
342
|
-
|
|
343
|
-
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.
|
|
344
|
-
|
|
345
|
-
*/
|
|
346
|
-
|
|
347
106
|
find_applicable_item_prices(item_price_id:string, input?:FindApplicableItemPricesInputParam):ChargebeeRequest<FindApplicableItemPricesResponse>;
|
|
348
107
|
}
|
|
349
108
|
export interface CreateResponse {
|
|
@@ -351,235 +110,69 @@ If an addon-item price has [differential pricing](differential_prices?prod_cat_v
|
|
|
351
110
|
}
|
|
352
111
|
export interface CreateInputParam {
|
|
353
112
|
[key : string] : any;
|
|
354
|
-
|
|
355
|
-
* @description The identifier for the item price. It is unique and immutable.
|
|
356
|
-
|
|
357
|
-
*/
|
|
113
|
+
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};
|
|
358
114
|
|
|
359
|
-
|
|
115
|
+
accounting_detail?:{accounting_category1?:string,accounting_category2?:string,accounting_category3?:string,accounting_category4?:string,accounting_code?:string,sku?:string};
|
|
360
116
|
|
|
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
|
-
*/
|
|
117
|
+
tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
365
118
|
|
|
366
|
-
|
|
119
|
+
tax_providers_fields:{field_id:string,field_value:string,provider_name:string}[];
|
|
367
120
|
|
|
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
|
-
*/
|
|
121
|
+
id:string;
|
|
374
122
|
|
|
375
|
-
|
|
123
|
+
name:string;
|
|
376
124
|
|
|
377
|
-
|
|
378
|
-
* @description The id of the item that the item price belongs to.
|
|
379
|
-
|
|
380
|
-
*/
|
|
125
|
+
description?:string;
|
|
381
126
|
|
|
382
127
|
item_id:string;
|
|
383
128
|
|
|
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
129
|
invoice_notes?:string;
|
|
390
130
|
|
|
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
|
-
*/
|
|
131
|
+
proration_type?:'site_default' | 'partial_term' | 'full_term';
|
|
408
132
|
|
|
409
133
|
external_name?:string;
|
|
410
134
|
|
|
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
135
|
currency_code?:string;
|
|
417
136
|
|
|
418
|
-
/**
|
|
419
|
-
* @description An immutable unique identifier of a [price variant](price_variants).
|
|
420
|
-
|
|
421
|
-
*/
|
|
422
|
-
|
|
423
137
|
price_variant_id?:string;
|
|
424
138
|
|
|
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
139
|
is_taxable?:boolean;
|
|
431
140
|
|
|
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
141
|
free_quantity?:number;
|
|
438
142
|
|
|
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
143
|
free_quantity_in_decimal?:string;
|
|
445
144
|
|
|
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
145
|
metadata?:object;
|
|
454
146
|
|
|
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
147
|
show_description_in_invoices?:boolean;
|
|
461
148
|
|
|
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
149
|
show_description_in_quotes?:boolean;
|
|
468
150
|
|
|
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
|
-
*/
|
|
151
|
+
usage_accumulation_reset_frequency?:UsageAccumulationResetFrequency;
|
|
478
152
|
|
|
479
|
-
|
|
153
|
+
business_entity_id?:string;
|
|
480
154
|
|
|
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
|
-
*/
|
|
155
|
+
pricing_model?:PricingModel;
|
|
485
156
|
|
|
486
157
|
price?:number;
|
|
487
158
|
|
|
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
159
|
price_in_decimal?:string;
|
|
494
160
|
|
|
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
|
-
|
|
498
|
-
*/
|
|
499
|
-
|
|
500
|
-
period_unit?:'week' | 'month' | 'year' | 'day';
|
|
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
|
-
*/
|
|
161
|
+
period_unit?:'day' | 'week' | 'month' | 'year';
|
|
513
162
|
|
|
514
163
|
period?:number;
|
|
515
164
|
|
|
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
|
-
*/
|
|
165
|
+
trial_period_unit?:'day' | 'month';
|
|
527
166
|
|
|
528
167
|
trial_period?:number;
|
|
529
168
|
|
|
530
|
-
/**
|
|
531
|
-
* @description Defines the shipping frequency. Example: to bill customer every 2 weeks, provide "2" here.
|
|
532
|
-
|
|
533
|
-
*/
|
|
534
|
-
|
|
535
169
|
shipping_period?:number;
|
|
536
170
|
|
|
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.
|
|
539
|
-
|
|
540
|
-
*/
|
|
541
|
-
|
|
542
|
-
shipping_period_unit?:'week' | 'month' | 'year' | 'day';
|
|
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.
|
|
546
|
-
|
|
547
|
-
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.
|
|
548
|
-
If subscriptions, invoices or [differential prices](./differential_prices?prod_cat_ver=2) exist for this item price, `billing_cycles` cannot be changed.
|
|
549
|
-
|
|
550
|
-
*/
|
|
171
|
+
shipping_period_unit?:'day' | 'week' | 'month' | 'year';
|
|
551
172
|
|
|
552
173
|
billing_cycles?:number;
|
|
553
174
|
|
|
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.
|
|
556
|
-
|
|
557
|
-
*/
|
|
558
|
-
|
|
559
|
-
trial_end_action?:'activate_subscription' | 'cancel_subscription' | 'site_default';
|
|
560
|
-
|
|
561
|
-
/**
|
|
562
|
-
* @description Parameters for tax_detail
|
|
563
|
-
|
|
564
|
-
*/
|
|
565
|
-
|
|
566
|
-
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};
|
|
567
|
-
|
|
568
|
-
/**
|
|
569
|
-
* @description Parameters for accounting_detail
|
|
570
|
-
|
|
571
|
-
*/
|
|
572
|
-
|
|
573
|
-
accounting_detail?:{accounting_category1?:string,accounting_category2?:string,accounting_category3?:string,accounting_category4?:string,accounting_code?:string,sku?:string};
|
|
574
|
-
|
|
575
|
-
/**
|
|
576
|
-
* @description Parameters for tiers
|
|
577
|
-
|
|
578
|
-
*/
|
|
579
|
-
|
|
580
|
-
tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
581
|
-
tax_providers_fields?: { field_id?: string, field_value?: string, provider_name?: string }[];
|
|
582
|
-
|
|
175
|
+
trial_end_action?:'site_default' | 'activate_subscription' | 'cancel_subscription';
|
|
583
176
|
}
|
|
584
177
|
export interface RetrieveResponse {
|
|
585
178
|
item_price:ItemPrice;
|
|
@@ -590,520 +183,264 @@ If subscriptions, invoices or [differential prices](./differential_prices?prod_c
|
|
|
590
183
|
}
|
|
591
184
|
export interface UpdateInputParam {
|
|
592
185
|
[key : string] : any;
|
|
593
|
-
|
|
594
|
-
* @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).
|
|
595
|
-
|
|
596
|
-
*/
|
|
186
|
+
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};
|
|
597
187
|
|
|
598
|
-
|
|
188
|
+
accounting_detail?:{accounting_category1?:string,accounting_category2?:string,accounting_category3?:string,accounting_category4?:string,accounting_code?:string,sku?:string};
|
|
599
189
|
|
|
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
|
-
*/
|
|
190
|
+
tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
606
191
|
|
|
607
|
-
|
|
192
|
+
tax_providers_fields:{field_id:string,field_value:string,provider_name:string}[];
|
|
608
193
|
|
|
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
|
-
*/
|
|
194
|
+
name?:string;
|
|
619
195
|
|
|
620
|
-
|
|
196
|
+
description?:string;
|
|
621
197
|
|
|
622
|
-
|
|
623
|
-
* @description An immutable unique identifier of a [price variant](price_variants).
|
|
624
|
-
|
|
625
|
-
*/
|
|
198
|
+
proration_type?:'site_default' | 'partial_term' | 'full_term';
|
|
626
199
|
|
|
627
200
|
price_variant_id?:string;
|
|
628
201
|
|
|
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
|
-
*/
|
|
202
|
+
status?:'active' | 'archived';
|
|
640
203
|
|
|
641
204
|
external_name?:string;
|
|
642
205
|
|
|
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
|
-
*/
|
|
206
|
+
usage_accumulation_reset_frequency?:UsageAccumulationResetFrequency;
|
|
647
207
|
|
|
648
208
|
currency_code?:string;
|
|
649
209
|
|
|
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
210
|
invoice_notes?:string;
|
|
656
211
|
|
|
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
212
|
is_taxable?:boolean;
|
|
663
213
|
|
|
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
214
|
free_quantity?:number;
|
|
670
215
|
|
|
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
216
|
free_quantity_in_decimal?:string;
|
|
677
217
|
|
|
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
218
|
metadata?:object;
|
|
686
219
|
|
|
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
220
|
pricing_model?:PricingModel;
|
|
698
221
|
|
|
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
222
|
price?:number;
|
|
705
223
|
|
|
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
224
|
price_in_decimal?:string;
|
|
712
225
|
|
|
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
|
-
*/
|
|
226
|
+
period_unit?:'day' | 'week' | 'month' | 'year';
|
|
731
227
|
|
|
732
228
|
period?:number;
|
|
733
229
|
|
|
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
|
-
*/
|
|
230
|
+
trial_period_unit?:'day' | 'month';
|
|
745
231
|
|
|
746
232
|
trial_period?:number;
|
|
747
233
|
|
|
748
|
-
/**
|
|
749
|
-
* @description Defines the shipping frequency. Example: to bill customer every 2 weeks, provide "2" here.
|
|
750
|
-
|
|
751
|
-
*/
|
|
752
|
-
|
|
753
234
|
shipping_period?:number;
|
|
754
235
|
|
|
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
|
-
*/
|
|
236
|
+
shipping_period_unit?:'day' | 'week' | 'month' | 'year';
|
|
769
237
|
|
|
770
238
|
billing_cycles?:number;
|
|
771
239
|
|
|
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
|
-
*/
|
|
240
|
+
trial_end_action?:'site_default' | 'activate_subscription' | 'cancel_subscription';
|
|
783
241
|
|
|
784
242
|
show_description_in_invoices?:boolean;
|
|
785
243
|
|
|
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
244
|
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 }[];
|
|
814
245
|
}
|
|
815
246
|
export interface ListResponse {
|
|
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.
|
|
818
|
-
|
|
819
|
-
*/
|
|
820
|
-
|
|
821
247
|
list:{item_price:ItemPrice}[];
|
|
822
248
|
|
|
823
|
-
/**
|
|
824
|
-
* @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.
|
|
825
|
-
|
|
826
|
-
*/
|
|
827
|
-
|
|
828
249
|
next_offset?:string;
|
|
829
250
|
}
|
|
830
251
|
export interface ListInputParam {
|
|
831
252
|
[key : string]: any;
|
|
832
253
|
/**
|
|
833
|
-
* @description
|
|
254
|
+
* @description The number of resources to be returned.
|
|
834
255
|
|
|
835
256
|
*/
|
|
836
257
|
|
|
837
258
|
limit?:number;
|
|
838
259
|
|
|
839
260
|
/**
|
|
840
|
-
* @description
|
|
261
|
+
* @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \`offset\` to the value of \`next_offset\` obtained in the previous iteration of the API call.
|
|
841
262
|
|
|
842
263
|
*/
|
|
843
264
|
|
|
844
265
|
offset?:string;
|
|
845
266
|
|
|
846
267
|
/**
|
|
847
|
-
* @description
|
|
268
|
+
* @description Filter item prices based on their [id](#).
|
|
848
269
|
|
|
849
270
|
*/
|
|
850
271
|
|
|
851
272
|
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
852
273
|
|
|
853
274
|
/**
|
|
854
|
-
* @description
|
|
275
|
+
* @description Filter item prices based on their `name`s.
|
|
855
276
|
|
|
856
277
|
*/
|
|
857
278
|
|
|
858
279
|
name?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
859
280
|
|
|
860
281
|
/**
|
|
861
|
-
* @description
|
|
282
|
+
* @description Filter item prices based on their `pricing_model`.
|
|
862
283
|
|
|
863
284
|
*/
|
|
864
285
|
|
|
865
|
-
pricing_model?:{in?:string,is?:'
|
|
286
|
+
pricing_model?:{in?:string,is?:'flat_fee' | 'per_unit' | 'tiered' | 'volume' | 'stairstep',is_not?:'flat_fee' | 'per_unit' | 'tiered' | 'volume' | 'stairstep',not_in?:string};
|
|
866
287
|
|
|
867
288
|
/**
|
|
868
|
-
* @description
|
|
289
|
+
* @description Filter item prices based on their `item_id`.
|
|
869
290
|
|
|
870
291
|
*/
|
|
871
292
|
|
|
872
293
|
item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
873
294
|
|
|
874
295
|
/**
|
|
875
|
-
* @description
|
|
296
|
+
* @description Filter item prices based on `item_family_id`.
|
|
876
297
|
|
|
877
298
|
*/
|
|
878
299
|
|
|
879
300
|
item_family_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
880
301
|
|
|
881
302
|
/**
|
|
882
|
-
* @description
|
|
303
|
+
* @description Filter item prices based on `item_type`.
|
|
883
304
|
|
|
884
305
|
*/
|
|
885
306
|
|
|
886
|
-
item_type?:{in?:string,is?:'
|
|
307
|
+
item_type?:{in?:string,is?:'plan' | 'addon' | 'charge',is_not?:'plan' | 'addon' | 'charge',not_in?:string};
|
|
887
308
|
|
|
888
309
|
/**
|
|
889
|
-
* @description
|
|
310
|
+
* @description Filter item prices based on their `currency_code`.
|
|
890
311
|
|
|
891
312
|
*/
|
|
892
313
|
|
|
893
314
|
currency_code?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
894
315
|
|
|
895
316
|
/**
|
|
896
|
-
* @description
|
|
317
|
+
* @description Filter item prices based on their `price_variant_id`.
|
|
897
318
|
|
|
898
319
|
*/
|
|
899
320
|
|
|
900
321
|
price_variant_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
901
322
|
|
|
902
323
|
/**
|
|
903
|
-
* @description
|
|
324
|
+
* @description Filter item prices based on their `trial_period`.
|
|
904
325
|
|
|
905
326
|
*/
|
|
906
327
|
|
|
907
328
|
trial_period?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
908
329
|
|
|
909
330
|
/**
|
|
910
|
-
* @description
|
|
331
|
+
* @description Filter item prices based on their `trial_period_unit`.
|
|
911
332
|
|
|
912
333
|
*/
|
|
913
334
|
|
|
914
|
-
trial_period_unit?:{in?:string,is?:'
|
|
335
|
+
trial_period_unit?:{in?:string,is?:'day' | 'month',is_not?:'day' | 'month',not_in?:string};
|
|
915
336
|
|
|
916
337
|
/**
|
|
917
|
-
* @description
|
|
338
|
+
* @description Filter item prices based on their `status`.
|
|
918
339
|
|
|
919
340
|
*/
|
|
920
341
|
|
|
921
|
-
status?:{in?:string,is?:'
|
|
342
|
+
status?:{in?:string,is?:'active' | 'archived' | 'deleted',is_not?:'active' | 'archived' | 'deleted',not_in?:string};
|
|
922
343
|
|
|
923
344
|
/**
|
|
924
|
-
* @description
|
|
345
|
+
* @description Filter item prices based on their `updated_at`.
|
|
925
346
|
|
|
926
347
|
*/
|
|
927
348
|
|
|
928
349
|
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
929
350
|
|
|
930
351
|
/**
|
|
931
|
-
* @description
|
|
352
|
+
* @description The unique ID of the [business entity](/docs/api?prod_cat_ver=2#mbe) of this subscription. This is always the same as the [business entity](/docs/api/subscriptions?prod_cat_ver=2#subscription_customer_id) of the customer.
|
|
353
|
+
The ID of the business entity created for the site. For Product Catalog 1.0, all the site data is tied to this business entity.
|
|
354
|
+
**Note**
|
|
355
|
+
|
|
356
|
+
[Multiple Business Entities](/docs/api?prod_cat_ver=2#mbe) is a feature available only on Product Catalog 2.0.
|
|
932
357
|
|
|
933
358
|
*/
|
|
934
359
|
|
|
935
|
-
|
|
360
|
+
business_entity_id?:{is?:string,is_present?:'true' | 'false'};
|
|
361
|
+
|
|
362
|
+
include_site_level_resources?:{is?:'true' | 'false'};
|
|
936
363
|
|
|
937
364
|
/**
|
|
938
|
-
* @description
|
|
365
|
+
* @description Filter item prices based on their `period_unit`.
|
|
939
366
|
|
|
940
367
|
*/
|
|
941
368
|
|
|
942
|
-
|
|
369
|
+
period_unit?:{in?:string,is?:'day' | 'week' | 'month' | 'year',is_not?:'day' | 'week' | 'month' | 'year',not_in?:string};
|
|
943
370
|
|
|
944
371
|
/**
|
|
945
|
-
* @description
|
|
372
|
+
* @description Filter item prices based on their `period`.
|
|
946
373
|
|
|
947
374
|
*/
|
|
948
375
|
|
|
949
|
-
|
|
376
|
+
period?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
950
377
|
|
|
951
378
|
/**
|
|
952
|
-
* @description
|
|
379
|
+
* @description The subscription channel this object originated from and is maintained in.
|
|
953
380
|
|
|
954
381
|
*/
|
|
955
382
|
|
|
956
|
-
|
|
383
|
+
channel?:{in?:string,is?:'web' | 'app_store' | 'play_store',is_not?:'web' | 'app_store' | 'play_store',not_in?:string};
|
|
384
|
+
|
|
385
|
+
sort_by?:{asc?:'name' | 'id' | 'updated_at',desc?:'name' | 'id' | 'updated_at'};
|
|
957
386
|
}
|
|
958
387
|
export interface DeleteResponse {
|
|
959
388
|
item_price:ItemPrice;
|
|
960
389
|
}
|
|
961
390
|
|
|
962
391
|
export interface FindApplicableItemsResponse {
|
|
963
|
-
/**
|
|
964
|
-
* @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.
|
|
965
|
-
|
|
966
|
-
*/
|
|
967
|
-
|
|
968
392
|
list:{item:Item}[];
|
|
969
393
|
|
|
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
394
|
next_offset?:string;
|
|
976
395
|
}
|
|
977
396
|
export interface FindApplicableItemsInputParam {
|
|
978
397
|
[key : string]: any;
|
|
979
398
|
/**
|
|
980
|
-
* @description
|
|
399
|
+
* @description The number of resources to be returned.
|
|
981
400
|
|
|
982
401
|
*/
|
|
983
402
|
|
|
984
403
|
limit?:number;
|
|
985
404
|
|
|
986
405
|
/**
|
|
987
|
-
* @description
|
|
406
|
+
* @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \`offset\` to the value of \`next_offset\` obtained in the previous iteration of the API call.
|
|
988
407
|
|
|
989
408
|
*/
|
|
990
409
|
|
|
991
410
|
offset?:string;
|
|
992
411
|
|
|
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'};
|
|
412
|
+
sort_by?:{asc?:'name' | 'id' | 'updated_at',desc?:'name' | 'id' | 'updated_at'};
|
|
999
413
|
}
|
|
1000
414
|
export interface FindApplicableItemPricesResponse {
|
|
1001
|
-
/**
|
|
1002
|
-
* @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:
|
|
1003
|
-
|
|
1004
|
-
* 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
|
|
1005
|
-
* the [compatibility](subscriptions?prod_cat_ver=2#compatibility) of the addon-item prices to the plan-item price
|
|
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
415
|
list:{item_price:ItemPrice}[];
|
|
1014
416
|
|
|
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
417
|
next_offset?:string;
|
|
1028
418
|
}
|
|
1029
419
|
export interface FindApplicableItemPricesInputParam {
|
|
1030
420
|
[key : string]: any;
|
|
1031
421
|
/**
|
|
1032
|
-
* @description
|
|
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.
|
|
422
|
+
* @description The number of resources to be returned.
|
|
1040
423
|
|
|
1041
424
|
*/
|
|
1042
425
|
|
|
1043
426
|
limit?:number;
|
|
1044
427
|
|
|
1045
428
|
/**
|
|
1046
|
-
* @description
|
|
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.
|
|
429
|
+
* @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \`offset\` to the value of \`next_offset\` obtained in the previous iteration of the API call.
|
|
1054
430
|
|
|
1055
431
|
*/
|
|
1056
432
|
|
|
1057
433
|
offset?:string;
|
|
1058
434
|
|
|
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
435
|
item_id?:string;
|
|
1072
436
|
|
|
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
|
-
|
|
1079
|
-
**Note**
|
|
1080
|
-
|
|
1081
|
-
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.
|
|
1082
|
-
|
|
1083
|
-
*/
|
|
1084
|
-
|
|
1085
|
-
sort_by?:{asc?:'updated_at' | 'name' | 'id',desc?:'updated_at' | 'name' | 'id'};
|
|
437
|
+
sort_by?:{asc?:'name' | 'id' | 'updated_at',desc?:'name' | 'id' | 'updated_at'};
|
|
1086
438
|
}
|
|
1087
439
|
export interface Tier {
|
|
1088
|
-
/**
|
|
1089
|
-
* @description The lower limit of a range of units for the tier
|
|
1090
|
-
|
|
1091
|
-
*/
|
|
1092
|
-
|
|
1093
440
|
starting_unit:number;
|
|
1094
441
|
|
|
1095
|
-
/**
|
|
1096
|
-
* @description The upper limit of a range of units for the tier
|
|
1097
|
-
|
|
1098
|
-
*/
|
|
1099
|
-
|
|
1100
442
|
ending_unit?:number;
|
|
1101
443
|
|
|
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
444
|
price:number;
|
|
1108
445
|
|
|
1109
446
|
starting_unit_in_decimal?:string;
|
|
@@ -1113,56 +450,18 @@ If an addon-item price has [differential pricing](differential_prices?prod_cat_v
|
|
|
1113
450
|
price_in_decimal?:string;
|
|
1114
451
|
}
|
|
1115
452
|
export interface TaxDetail {
|
|
1116
|
-
/**
|
|
1117
|
-
* @description The tax profile of the item price.
|
|
1118
|
-
|
|
1119
|
-
*/
|
|
1120
|
-
|
|
1121
453
|
tax_profile_id?:string;
|
|
1122
454
|
|
|
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
455
|
avalara_sale_type?:AvalaraSaleType;
|
|
1129
456
|
|
|
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
457
|
avalara_transaction_type?:number;
|
|
1136
458
|
|
|
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
459
|
avalara_service_type?:number;
|
|
1143
460
|
|
|
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
461
|
avalara_tax_code?:string;
|
|
1150
462
|
|
|
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
463
|
hsn_code?:string;
|
|
1160
464
|
|
|
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
465
|
taxjar_product_code?:string;
|
|
1167
466
|
}
|
|
1168
467
|
export interface TaxProvidersField {
|
|
@@ -1173,64 +472,16 @@ If an addon-item price has [differential pricing](differential_prices?prod_cat_v
|
|
|
1173
472
|
field_value:string;
|
|
1174
473
|
}
|
|
1175
474
|
export interface AccountingDetail {
|
|
1176
|
-
/**
|
|
1177
|
-
* @description This maps to the sku or product name in the accounting integration.
|
|
1178
|
-
|
|
1179
|
-
*/
|
|
1180
|
-
|
|
1181
475
|
sku?:string;
|
|
1182
476
|
|
|
1183
|
-
/**
|
|
1184
|
-
* @description The identifier of the chart of accounts under which the item price falls in the accounting system.
|
|
1185
|
-
|
|
1186
|
-
*/
|
|
1187
|
-
|
|
1188
477
|
accounting_code?:string;
|
|
1189
478
|
|
|
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
479
|
accounting_category1?:string;
|
|
1202
480
|
|
|
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
481
|
accounting_category2?:string;
|
|
1215
482
|
|
|
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
483
|
accounting_category3?:string;
|
|
1225
484
|
|
|
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
485
|
accounting_category4?:string;
|
|
1235
486
|
}
|
|
1236
487
|
}
|