chargebee 3.18.0 → 3.20.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 +57 -1
- package/README.md +1 -1
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +0 -13
- package/cjs/resources/webhook/eventType.js +1 -0
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +0 -13
- package/esm/resources/webhook/eventType.js +1 -0
- package/package.json +1 -1
- package/types/core.d.ts +20 -3
- package/types/index.d.ts +0 -7
- package/types/resources/Content.d.ts +0 -5
- package/types/resources/Coupon.d.ts +1 -0
- package/types/resources/CreditNote.d.ts +8 -1
- package/types/resources/Customer.d.ts +14 -2
- package/types/resources/Einvoice.d.ts +8 -1
- package/types/resources/EntitlementOverride.d.ts +5 -0
- package/types/resources/Estimate.d.ts +14 -2
- package/types/resources/Event.d.ts +1 -0
- package/types/resources/Export.d.ts +1 -0
- package/types/resources/Gift.d.ts +14 -2
- package/types/resources/HostedPage.d.ts +1 -0
- package/types/resources/Invoice.d.ts +22 -3
- package/types/resources/ItemPrice.d.ts +0 -18
- package/types/resources/OmnichannelSubscription.d.ts +5 -0
- package/types/resources/PaymentIntent.d.ts +35 -5
- package/types/resources/PaymentSource.d.ts +7 -1
- package/types/resources/PricingPageSession.d.ts +1 -1
- package/types/resources/Purchase.d.ts +7 -1
- package/types/resources/Subscription.d.ts +51 -7
- package/types/resources/WebhookEvent.d.ts +9 -12
- package/types/resources/BusinessEntityChange.d.ts +0 -16
- package/types/resources/Product.d.ts +0 -135
- package/types/resources/SalesOrder.d.ts +0 -153
- package/types/resources/UsageReminderInfo.d.ts +0 -9
- package/types/resources/Variant.d.ts +0 -116
|
@@ -36,7 +36,13 @@ declare module 'chargebee' {
|
|
|
36
36
|
| 'kbc_payment_button'
|
|
37
37
|
| 'pay_by_bank'
|
|
38
38
|
| 'trustly'
|
|
39
|
-
| 'stablecoin'
|
|
39
|
+
| 'stablecoin'
|
|
40
|
+
| 'kakao_pay'
|
|
41
|
+
| 'naver_pay'
|
|
42
|
+
| 'revolut_pay'
|
|
43
|
+
| 'cash_app_pay'
|
|
44
|
+
| 'wechat_pay'
|
|
45
|
+
| 'alipay';
|
|
40
46
|
success_url?: string;
|
|
41
47
|
failure_url?: string;
|
|
42
48
|
created_at: number;
|
|
@@ -117,7 +123,13 @@ declare module 'chargebee' {
|
|
|
117
123
|
| 'kbc_payment_button'
|
|
118
124
|
| 'pay_by_bank'
|
|
119
125
|
| 'trustly'
|
|
120
|
-
| 'stablecoin'
|
|
126
|
+
| 'stablecoin'
|
|
127
|
+
| 'kakao_pay'
|
|
128
|
+
| 'naver_pay'
|
|
129
|
+
| 'revolut_pay'
|
|
130
|
+
| 'cash_app_pay'
|
|
131
|
+
| 'wechat_pay'
|
|
132
|
+
| 'alipay';
|
|
121
133
|
id_at_gateway?: string;
|
|
122
134
|
error_code?: string;
|
|
123
135
|
error_text?: string;
|
|
@@ -162,7 +174,13 @@ declare module 'chargebee' {
|
|
|
162
174
|
| 'kbc_payment_button'
|
|
163
175
|
| 'pay_by_bank'
|
|
164
176
|
| 'trustly'
|
|
165
|
-
| 'stablecoin'
|
|
177
|
+
| 'stablecoin'
|
|
178
|
+
| 'kakao_pay'
|
|
179
|
+
| 'naver_pay'
|
|
180
|
+
| 'revolut_pay'
|
|
181
|
+
| 'cash_app_pay'
|
|
182
|
+
| 'wechat_pay'
|
|
183
|
+
| 'alipay';
|
|
166
184
|
id_at_gateway?: string;
|
|
167
185
|
error_code?: string;
|
|
168
186
|
error_text?: string;
|
|
@@ -207,7 +225,13 @@ declare module 'chargebee' {
|
|
|
207
225
|
| 'kbc_payment_button'
|
|
208
226
|
| 'pay_by_bank'
|
|
209
227
|
| 'trustly'
|
|
210
|
-
| 'stablecoin'
|
|
228
|
+
| 'stablecoin'
|
|
229
|
+
| 'kakao_pay'
|
|
230
|
+
| 'naver_pay'
|
|
231
|
+
| 'revolut_pay'
|
|
232
|
+
| 'cash_app_pay'
|
|
233
|
+
| 'wechat_pay'
|
|
234
|
+
| 'alipay';
|
|
211
235
|
success_url?: string;
|
|
212
236
|
failure_url?: string;
|
|
213
237
|
}
|
|
@@ -241,7 +265,13 @@ declare module 'chargebee' {
|
|
|
241
265
|
| 'kbc_payment_button'
|
|
242
266
|
| 'pay_by_bank'
|
|
243
267
|
| 'trustly'
|
|
244
|
-
| 'stablecoin'
|
|
268
|
+
| 'stablecoin'
|
|
269
|
+
| 'kakao_pay'
|
|
270
|
+
| 'naver_pay'
|
|
271
|
+
| 'revolut_pay'
|
|
272
|
+
| 'cash_app_pay'
|
|
273
|
+
| 'wechat_pay'
|
|
274
|
+
| 'alipay';
|
|
245
275
|
success_url?: string;
|
|
246
276
|
failure_url?: string;
|
|
247
277
|
}
|
|
@@ -458,7 +458,13 @@ declare module 'chargebee' {
|
|
|
458
458
|
| 'kbc_payment_button'
|
|
459
459
|
| 'pay_by_bank'
|
|
460
460
|
| 'trustly'
|
|
461
|
-
| 'stablecoin'
|
|
461
|
+
| 'stablecoin'
|
|
462
|
+
| 'kakao_pay'
|
|
463
|
+
| 'naver_pay'
|
|
464
|
+
| 'revolut_pay'
|
|
465
|
+
| 'cash_app_pay'
|
|
466
|
+
| 'wechat_pay'
|
|
467
|
+
| 'alipay';
|
|
462
468
|
reference_id?: string;
|
|
463
469
|
/**
|
|
464
470
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -113,7 +113,7 @@ declare module 'chargebee' {
|
|
|
113
113
|
label?: string;
|
|
114
114
|
}
|
|
115
115
|
export interface PricingPageCreateForExistingSubscriptionInputParam {
|
|
116
|
-
id
|
|
116
|
+
id?: string;
|
|
117
117
|
}
|
|
118
118
|
export interface SubscriptionCreateForExistingSubscriptionInputParam {
|
|
119
119
|
id: string;
|
|
@@ -103,7 +103,13 @@ declare module 'chargebee' {
|
|
|
103
103
|
| 'kbc_payment_button'
|
|
104
104
|
| 'pay_by_bank'
|
|
105
105
|
| 'trustly'
|
|
106
|
-
| 'stablecoin'
|
|
106
|
+
| 'stablecoin'
|
|
107
|
+
| 'kakao_pay'
|
|
108
|
+
| 'naver_pay'
|
|
109
|
+
| 'revolut_pay'
|
|
110
|
+
| 'cash_app_pay'
|
|
111
|
+
| 'wechat_pay'
|
|
112
|
+
| 'alipay';
|
|
107
113
|
reference_id?: string;
|
|
108
114
|
/**
|
|
109
115
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -96,6 +96,7 @@ declare module 'chargebee' {
|
|
|
96
96
|
auto_close_invoices?: boolean;
|
|
97
97
|
discounts?: Subscription.Discount[];
|
|
98
98
|
business_entity_id?: string;
|
|
99
|
+
decommissioned: boolean;
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
export namespace Subscription {
|
|
@@ -1268,6 +1269,7 @@ declare module 'chargebee' {
|
|
|
1268
1269
|
contract_term_cancel_option?: ContractTermCancelOptionEnum;
|
|
1269
1270
|
invoice_date?: number;
|
|
1270
1271
|
cancel_reason_code?: string;
|
|
1272
|
+
decommissioned?: boolean;
|
|
1271
1273
|
subscription_items?: SubscriptionItemsCancelForItemsInputParam[];
|
|
1272
1274
|
}
|
|
1273
1275
|
export interface ResumeInputParam {
|
|
@@ -1410,7 +1412,13 @@ declare module 'chargebee' {
|
|
|
1410
1412
|
| 'kbc_payment_button'
|
|
1411
1413
|
| 'pay_by_bank'
|
|
1412
1414
|
| 'trustly'
|
|
1413
|
-
| 'stablecoin'
|
|
1415
|
+
| 'stablecoin'
|
|
1416
|
+
| 'kakao_pay'
|
|
1417
|
+
| 'naver_pay'
|
|
1418
|
+
| 'revolut_pay'
|
|
1419
|
+
| 'cash_app_pay'
|
|
1420
|
+
| 'wechat_pay'
|
|
1421
|
+
| 'alipay';
|
|
1414
1422
|
reference_id?: string;
|
|
1415
1423
|
/**
|
|
1416
1424
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -1543,7 +1551,13 @@ declare module 'chargebee' {
|
|
|
1543
1551
|
| 'kbc_payment_button'
|
|
1544
1552
|
| 'pay_by_bank'
|
|
1545
1553
|
| 'trustly'
|
|
1546
|
-
| 'stablecoin'
|
|
1554
|
+
| 'stablecoin'
|
|
1555
|
+
| 'kakao_pay'
|
|
1556
|
+
| 'naver_pay'
|
|
1557
|
+
| 'revolut_pay'
|
|
1558
|
+
| 'cash_app_pay'
|
|
1559
|
+
| 'wechat_pay'
|
|
1560
|
+
| 'alipay';
|
|
1547
1561
|
reference_id?: string;
|
|
1548
1562
|
/**
|
|
1549
1563
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -1643,7 +1657,13 @@ declare module 'chargebee' {
|
|
|
1643
1657
|
| 'kbc_payment_button'
|
|
1644
1658
|
| 'pay_by_bank'
|
|
1645
1659
|
| 'trustly'
|
|
1646
|
-
| 'stablecoin'
|
|
1660
|
+
| 'stablecoin'
|
|
1661
|
+
| 'kakao_pay'
|
|
1662
|
+
| 'naver_pay'
|
|
1663
|
+
| 'revolut_pay'
|
|
1664
|
+
| 'cash_app_pay'
|
|
1665
|
+
| 'wechat_pay'
|
|
1666
|
+
| 'alipay';
|
|
1647
1667
|
reference_id?: string;
|
|
1648
1668
|
/**
|
|
1649
1669
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -1798,7 +1818,13 @@ declare module 'chargebee' {
|
|
|
1798
1818
|
| 'kbc_payment_button'
|
|
1799
1819
|
| 'pay_by_bank'
|
|
1800
1820
|
| 'trustly'
|
|
1801
|
-
| 'stablecoin'
|
|
1821
|
+
| 'stablecoin'
|
|
1822
|
+
| 'kakao_pay'
|
|
1823
|
+
| 'naver_pay'
|
|
1824
|
+
| 'revolut_pay'
|
|
1825
|
+
| 'cash_app_pay'
|
|
1826
|
+
| 'wechat_pay'
|
|
1827
|
+
| 'alipay';
|
|
1802
1828
|
reference_id?: string;
|
|
1803
1829
|
/**
|
|
1804
1830
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -1967,7 +1993,13 @@ declare module 'chargebee' {
|
|
|
1967
1993
|
| 'kbc_payment_button'
|
|
1968
1994
|
| 'pay_by_bank'
|
|
1969
1995
|
| 'trustly'
|
|
1970
|
-
| 'stablecoin'
|
|
1996
|
+
| 'stablecoin'
|
|
1997
|
+
| 'kakao_pay'
|
|
1998
|
+
| 'naver_pay'
|
|
1999
|
+
| 'revolut_pay'
|
|
2000
|
+
| 'cash_app_pay'
|
|
2001
|
+
| 'wechat_pay'
|
|
2002
|
+
| 'alipay';
|
|
1971
2003
|
reference_id?: string;
|
|
1972
2004
|
/**
|
|
1973
2005
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -2092,7 +2124,13 @@ declare module 'chargebee' {
|
|
|
2092
2124
|
| 'kbc_payment_button'
|
|
2093
2125
|
| 'pay_by_bank'
|
|
2094
2126
|
| 'trustly'
|
|
2095
|
-
| 'stablecoin'
|
|
2127
|
+
| 'stablecoin'
|
|
2128
|
+
| 'kakao_pay'
|
|
2129
|
+
| 'naver_pay'
|
|
2130
|
+
| 'revolut_pay'
|
|
2131
|
+
| 'cash_app_pay'
|
|
2132
|
+
| 'wechat_pay'
|
|
2133
|
+
| 'alipay';
|
|
2096
2134
|
reference_id?: string;
|
|
2097
2135
|
/**
|
|
2098
2136
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -2523,7 +2561,13 @@ declare module 'chargebee' {
|
|
|
2523
2561
|
| 'kbc_payment_button'
|
|
2524
2562
|
| 'pay_by_bank'
|
|
2525
2563
|
| 'trustly'
|
|
2526
|
-
| 'stablecoin'
|
|
2564
|
+
| 'stablecoin'
|
|
2565
|
+
| 'kakao_pay'
|
|
2566
|
+
| 'naver_pay'
|
|
2567
|
+
| 'revolut_pay'
|
|
2568
|
+
| 'cash_app_pay'
|
|
2569
|
+
| 'wechat_pay'
|
|
2570
|
+
| 'alipay';
|
|
2527
2571
|
reference_id?: string;
|
|
2528
2572
|
/**
|
|
2529
2573
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -106,6 +106,7 @@ declare module 'chargebee' {
|
|
|
106
106
|
CardUpdated = 'card_updated',
|
|
107
107
|
CustomerCreated = 'customer_created',
|
|
108
108
|
SubscriptionRenewalReminder = 'subscription_renewal_reminder',
|
|
109
|
+
PaymentDueReminder = 'payment_due_reminder',
|
|
109
110
|
OrderDelivered = 'order_delivered',
|
|
110
111
|
OmnichannelSubscriptionItemCancellationScheduled = 'omnichannel_subscription_item_cancellation_scheduled',
|
|
111
112
|
OmnichannelSubscriptionItemGracePeriodExpired = 'omnichannel_subscription_item_grace_period_expired',
|
|
@@ -329,6 +330,7 @@ declare module 'chargebee' {
|
|
|
329
330
|
[WebhookEventType.CardUpdated]: CardUpdatedContent;
|
|
330
331
|
[WebhookEventType.CustomerCreated]: CustomerCreatedContent;
|
|
331
332
|
[WebhookEventType.SubscriptionRenewalReminder]: SubscriptionRenewalReminderContent;
|
|
333
|
+
[WebhookEventType.PaymentDueReminder]: PaymentDueReminderContent;
|
|
332
334
|
[WebhookEventType.OrderDelivered]: OrderDeliveredContent;
|
|
333
335
|
[WebhookEventType.OmnichannelSubscriptionItemCancellationScheduled]: OmnichannelSubscriptionItemCancellationScheduledContent;
|
|
334
336
|
[WebhookEventType.OmnichannelSubscriptionItemGracePeriodExpired]: OmnichannelSubscriptionItemGracePeriodExpiredContent;
|
|
@@ -477,8 +479,6 @@ declare module 'chargebee' {
|
|
|
477
479
|
advance_invoice_schedule: AdvanceInvoiceSchedule;
|
|
478
480
|
};
|
|
479
481
|
export type CustomerBusinessEntityChangedContent = {
|
|
480
|
-
business_entity_change: BusinessEntityChange;
|
|
481
|
-
|
|
482
482
|
business_entity_transfer: BusinessEntityTransfer;
|
|
483
483
|
|
|
484
484
|
customer: Customer;
|
|
@@ -657,8 +657,6 @@ declare module 'chargebee' {
|
|
|
657
657
|
subscription: Subscription;
|
|
658
658
|
|
|
659
659
|
customer: Customer;
|
|
660
|
-
|
|
661
|
-
usage_reminder_info: UsageReminderInfo;
|
|
662
660
|
};
|
|
663
661
|
export type VoucherCreatedContent = {
|
|
664
662
|
payment_voucher: PaymentVoucher;
|
|
@@ -1051,6 +1049,11 @@ declare module 'chargebee' {
|
|
|
1051
1049
|
|
|
1052
1050
|
advance_invoice_schedule: AdvanceInvoiceSchedule;
|
|
1053
1051
|
};
|
|
1052
|
+
export type PaymentDueReminderContent = {
|
|
1053
|
+
customer: Customer;
|
|
1054
|
+
|
|
1055
|
+
invoice: Invoice;
|
|
1056
|
+
};
|
|
1054
1057
|
export type OrderDeliveredContent = {
|
|
1055
1058
|
order: Order;
|
|
1056
1059
|
};
|
|
@@ -1115,8 +1118,6 @@ declare module 'chargebee' {
|
|
|
1115
1118
|
customer: Customer;
|
|
1116
1119
|
};
|
|
1117
1120
|
export type SubscriptionBusinessEntityChangedContent = {
|
|
1118
|
-
business_entity_change: BusinessEntityChange;
|
|
1119
|
-
|
|
1120
1121
|
business_entity_transfer: BusinessEntityTransfer;
|
|
1121
1122
|
|
|
1122
1123
|
subscription: Subscription;
|
|
@@ -1364,9 +1365,7 @@ declare module 'chargebee' {
|
|
|
1364
1365
|
export type AttachedItemCreatedContent = {
|
|
1365
1366
|
attached_item: AttachedItem;
|
|
1366
1367
|
};
|
|
1367
|
-
export type SalesOrderCreatedContent = {
|
|
1368
|
-
sales_order: SalesOrder;
|
|
1369
|
-
};
|
|
1368
|
+
export type SalesOrderCreatedContent = {};
|
|
1370
1369
|
export type CustomerChangedContent = {
|
|
1371
1370
|
customer: Customer;
|
|
1372
1371
|
|
|
@@ -1596,9 +1595,7 @@ declare module 'chargebee' {
|
|
|
1596
1595
|
|
|
1597
1596
|
impacted_subscription: ImpactedSubscription;
|
|
1598
1597
|
};
|
|
1599
|
-
export type SalesOrderUpdatedContent = {
|
|
1600
|
-
sales_order: SalesOrder;
|
|
1601
|
-
};
|
|
1598
|
+
export type SalesOrderUpdatedContent = {};
|
|
1602
1599
|
export type OmnichannelSubscriptionItemDunningStartedContent = {
|
|
1603
1600
|
omnichannel_subscription: OmnichannelSubscription;
|
|
1604
1601
|
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
///<reference path='./../core.d.ts'/>
|
|
2
|
-
///<reference path='./../index.d.ts'/>
|
|
3
|
-
|
|
4
|
-
declare module 'chargebee' {
|
|
5
|
-
export interface BusinessEntityChange {
|
|
6
|
-
id: string;
|
|
7
|
-
business_entity_id: string;
|
|
8
|
-
reason?: 'correction';
|
|
9
|
-
active_from: number;
|
|
10
|
-
active_to?: number;
|
|
11
|
-
resource_type: 'customer' | 'subscription';
|
|
12
|
-
modified_at: number;
|
|
13
|
-
resource_id: string;
|
|
14
|
-
active_resource_id: string;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
///<reference path='./../core.d.ts'/>
|
|
2
|
-
///<reference path='./../index.d.ts'/>
|
|
3
|
-
///<reference path='./filter.d.ts'/>
|
|
4
|
-
declare module 'chargebee' {
|
|
5
|
-
export interface Product {
|
|
6
|
-
id: string;
|
|
7
|
-
name: string;
|
|
8
|
-
external_name: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
has_variant: boolean;
|
|
11
|
-
status: 'active' | 'inactive';
|
|
12
|
-
shippable: boolean;
|
|
13
|
-
sku?: string;
|
|
14
|
-
created_at: number;
|
|
15
|
-
resource_version?: number;
|
|
16
|
-
updated_at?: number;
|
|
17
|
-
deleted: boolean;
|
|
18
|
-
options?: Product.Option[];
|
|
19
|
-
metadata?: any;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export namespace Product {
|
|
23
|
-
export class ProductResource {
|
|
24
|
-
create(
|
|
25
|
-
input: CreateInputParam,
|
|
26
|
-
headers?: ChargebeeRequestHeader,
|
|
27
|
-
): Promise<ChargebeeResponse<CreateResponse>>;
|
|
28
|
-
|
|
29
|
-
retrieve(
|
|
30
|
-
product_id: string,
|
|
31
|
-
headers?: ChargebeeRequestHeader,
|
|
32
|
-
): Promise<ChargebeeResponse<RetrieveResponse>>;
|
|
33
|
-
|
|
34
|
-
update(
|
|
35
|
-
product_id: string,
|
|
36
|
-
input?: UpdateInputParam,
|
|
37
|
-
headers?: ChargebeeRequestHeader,
|
|
38
|
-
): Promise<ChargebeeResponse<UpdateResponse>>;
|
|
39
|
-
|
|
40
|
-
delete(
|
|
41
|
-
product_id: string,
|
|
42
|
-
headers?: ChargebeeRequestHeader,
|
|
43
|
-
): Promise<ChargebeeResponse<DeleteResponse>>;
|
|
44
|
-
|
|
45
|
-
updateOptions(
|
|
46
|
-
product_id: string,
|
|
47
|
-
input: UpdateOptionsInputParam,
|
|
48
|
-
headers?: ChargebeeRequestHeader,
|
|
49
|
-
): Promise<ChargebeeResponse<UpdateOptionsResponse>>;
|
|
50
|
-
|
|
51
|
-
list(
|
|
52
|
-
input?: ListInputParam,
|
|
53
|
-
headers?: ChargebeeRequestHeader,
|
|
54
|
-
): Promise<ChargebeeResponse<ListResponse>>;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface CreateResponse {
|
|
58
|
-
product: Product;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export interface RetrieveResponse {
|
|
62
|
-
product: Product;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export interface UpdateResponse {
|
|
66
|
-
product: Product;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export interface DeleteResponse {
|
|
70
|
-
product: Product;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export interface UpdateOptionsResponse {
|
|
74
|
-
product: Product;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export interface ListResponse {
|
|
78
|
-
list: { product: Product }[];
|
|
79
|
-
next_offset?: string;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export interface Option {
|
|
83
|
-
id?: string;
|
|
84
|
-
name?: string;
|
|
85
|
-
values?: any[];
|
|
86
|
-
default_value?: string;
|
|
87
|
-
type?: 'select';
|
|
88
|
-
}
|
|
89
|
-
// REQUEST PARAMS
|
|
90
|
-
//---------------
|
|
91
|
-
|
|
92
|
-
export interface CreateInputParam {
|
|
93
|
-
name: string;
|
|
94
|
-
external_name: string;
|
|
95
|
-
status: 'active' | 'inactive';
|
|
96
|
-
id?: string;
|
|
97
|
-
description?: string;
|
|
98
|
-
sku?: string;
|
|
99
|
-
metadata?: any;
|
|
100
|
-
shippable?: boolean;
|
|
101
|
-
}
|
|
102
|
-
export interface UpdateInputParam {
|
|
103
|
-
name?: string;
|
|
104
|
-
external_name?: string;
|
|
105
|
-
description?: string;
|
|
106
|
-
status?: 'active' | 'inactive';
|
|
107
|
-
sku?: string;
|
|
108
|
-
shippable?: boolean;
|
|
109
|
-
metadata?: any;
|
|
110
|
-
}
|
|
111
|
-
export interface UpdateOptionsInputParam {
|
|
112
|
-
remove_options?: string[];
|
|
113
|
-
options?: OptionsUpdateOptionsInputParam[];
|
|
114
|
-
}
|
|
115
|
-
export interface ListInputParam {
|
|
116
|
-
limit?: number;
|
|
117
|
-
offset?: string;
|
|
118
|
-
include_deleted?: boolean;
|
|
119
|
-
id?: filter.String;
|
|
120
|
-
name?: filter.String;
|
|
121
|
-
status?: filter.Enum;
|
|
122
|
-
shippable?: filter.Boolean;
|
|
123
|
-
has_variant?: filter.Boolean;
|
|
124
|
-
created_at?: filter.Timestamp;
|
|
125
|
-
updated_at?: filter.Timestamp;
|
|
126
|
-
'sort_by[asc]'?: string;
|
|
127
|
-
'sort_by[desc]'?: string;
|
|
128
|
-
}
|
|
129
|
-
export interface OptionsUpdateOptionsInputParam {
|
|
130
|
-
name: string;
|
|
131
|
-
values?: any;
|
|
132
|
-
default_value?: string;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
///<reference path='./../core.d.ts'/>
|
|
2
|
-
///<reference path='./../index.d.ts'/>
|
|
3
|
-
|
|
4
|
-
declare module 'chargebee' {
|
|
5
|
-
export interface SalesOrder {
|
|
6
|
-
id: string;
|
|
7
|
-
version: number;
|
|
8
|
-
renewed_from_order_id?: string;
|
|
9
|
-
updated_at?: number;
|
|
10
|
-
created_at: number;
|
|
11
|
-
po_number?: string;
|
|
12
|
-
meta_data?: string;
|
|
13
|
-
quote_id?: string;
|
|
14
|
-
effective_date: number;
|
|
15
|
-
end_date?: number;
|
|
16
|
-
business_entity_id?: string;
|
|
17
|
-
customer_id: string;
|
|
18
|
-
subscription_id: string;
|
|
19
|
-
currency_code: string;
|
|
20
|
-
line_items?: SalesOrder.LineItem[];
|
|
21
|
-
billing_addresses?: SalesOrder.BillingAddress[];
|
|
22
|
-
discounts?: SalesOrder.Discount[];
|
|
23
|
-
shipping_addresses?: SalesOrder.ShippingAddress[];
|
|
24
|
-
subscription_ids?: string[];
|
|
25
|
-
line_item_tiers?: SalesOrder.LineItemTier[];
|
|
26
|
-
payment_configuration?: SalesOrder.PaymentConfiguration;
|
|
27
|
-
billing_configuration?: SalesOrder.BillingConfiguration;
|
|
28
|
-
renewal_term?: SalesOrder.RenewalTerm;
|
|
29
|
-
status: 'active' | 'completed';
|
|
30
|
-
credit_lines?: SalesOrder.CreditLine[];
|
|
31
|
-
deleted: boolean;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export namespace SalesOrder {
|
|
35
|
-
export interface LineItem {
|
|
36
|
-
id: string;
|
|
37
|
-
association_id?: string;
|
|
38
|
-
item_price_id: string;
|
|
39
|
-
name?: string;
|
|
40
|
-
quantity: string;
|
|
41
|
-
unit_price: string;
|
|
42
|
-
billable_unit_price?: string;
|
|
43
|
-
billable_quantity?: string;
|
|
44
|
-
billable_amount?: string;
|
|
45
|
-
billing_period?: number;
|
|
46
|
-
billing_period_unit?: 'day' | 'week' | 'month' | 'year';
|
|
47
|
-
service_period_days?: number;
|
|
48
|
-
charge_on_event?:
|
|
49
|
-
| 'subscription_creation'
|
|
50
|
-
| 'subscription_trial_start'
|
|
51
|
-
| 'plan_activation'
|
|
52
|
-
| 'subscription_activation'
|
|
53
|
-
| 'contract_termination';
|
|
54
|
-
charge_once?: boolean;
|
|
55
|
-
billing_cycles?: number;
|
|
56
|
-
billing_type: 'recurring' | 'one_time' | 'event_based';
|
|
57
|
-
start_date: number;
|
|
58
|
-
end_date?: number;
|
|
59
|
-
trial_end?: number;
|
|
60
|
-
}
|
|
61
|
-
export interface BillingAddress {
|
|
62
|
-
first_name?: string;
|
|
63
|
-
last_name?: string;
|
|
64
|
-
email?: string;
|
|
65
|
-
company?: string;
|
|
66
|
-
phone?: string;
|
|
67
|
-
line1?: string;
|
|
68
|
-
line2?: string;
|
|
69
|
-
line3?: string;
|
|
70
|
-
city?: string;
|
|
71
|
-
state_code?: string;
|
|
72
|
-
state?: string;
|
|
73
|
-
country?: string;
|
|
74
|
-
zip?: string;
|
|
75
|
-
validation_status?:
|
|
76
|
-
| 'not_validated'
|
|
77
|
-
| 'valid'
|
|
78
|
-
| 'partially_valid'
|
|
79
|
-
| 'invalid';
|
|
80
|
-
}
|
|
81
|
-
export interface Discount {
|
|
82
|
-
id: string;
|
|
83
|
-
invoice_name?: string;
|
|
84
|
-
type: 'fixed_amount' | 'percentage' | 'offer_quantity';
|
|
85
|
-
apply_on: 'invoice_amount' | 'specific_item_price';
|
|
86
|
-
duration_type: 'one_time' | 'forever' | 'limited_period';
|
|
87
|
-
percentage?: number;
|
|
88
|
-
amount?: string;
|
|
89
|
-
coupon_id?: string;
|
|
90
|
-
period?: number;
|
|
91
|
-
period_unit?: 'day' | 'week' | 'month' | 'year';
|
|
92
|
-
item_price_id?: string;
|
|
93
|
-
start_date: number;
|
|
94
|
-
end_date?: number;
|
|
95
|
-
}
|
|
96
|
-
export interface ShippingAddress {
|
|
97
|
-
first_name?: string;
|
|
98
|
-
last_name?: string;
|
|
99
|
-
email?: string;
|
|
100
|
-
company?: string;
|
|
101
|
-
phone?: string;
|
|
102
|
-
line1?: string;
|
|
103
|
-
line2?: string;
|
|
104
|
-
line3?: string;
|
|
105
|
-
city?: string;
|
|
106
|
-
state_code?: string;
|
|
107
|
-
state?: string;
|
|
108
|
-
country?: string;
|
|
109
|
-
zip?: string;
|
|
110
|
-
validation_status?:
|
|
111
|
-
| 'not_validated'
|
|
112
|
-
| 'valid'
|
|
113
|
-
| 'partially_valid'
|
|
114
|
-
| 'invalid';
|
|
115
|
-
}
|
|
116
|
-
export interface LineItemTier {
|
|
117
|
-
starting_unit: string;
|
|
118
|
-
ending_unit?: string;
|
|
119
|
-
price: string;
|
|
120
|
-
pricing_type?: 'per_unit' | 'flat_fee' | 'package';
|
|
121
|
-
package_size?: number;
|
|
122
|
-
line_item_association_id?: string;
|
|
123
|
-
}
|
|
124
|
-
export interface PaymentConfiguration {
|
|
125
|
-
auto_collection?: AutoCollectionEnum;
|
|
126
|
-
payment_source_id?: string;
|
|
127
|
-
payment_intent_id?: string;
|
|
128
|
-
offline_payment_method?: OfflinePaymentMethodEnum;
|
|
129
|
-
}
|
|
130
|
-
export interface BillingConfiguration {
|
|
131
|
-
create_pending_invoices?: boolean;
|
|
132
|
-
invoice_immediately?: boolean;
|
|
133
|
-
first_invoice_pending?: boolean;
|
|
134
|
-
invoice_usages?: boolean;
|
|
135
|
-
net_term_days?: number;
|
|
136
|
-
invoice_date?: number;
|
|
137
|
-
billing_cycles_to_invoice?: number;
|
|
138
|
-
billing_alignment_mode?: BillingAlignmentModeEnum;
|
|
139
|
-
}
|
|
140
|
-
export interface RenewalTerm {
|
|
141
|
-
end_of_term_action: 'renew' | 'cancel' | 'evergreen';
|
|
142
|
-
cancellation_cutoff_period?: number;
|
|
143
|
-
renewal_billing_cycles?: number;
|
|
144
|
-
}
|
|
145
|
-
export interface CreditLine {
|
|
146
|
-
amount: string;
|
|
147
|
-
unit_price: string;
|
|
148
|
-
line_item_association_id?: string;
|
|
149
|
-
}
|
|
150
|
-
// REQUEST PARAMS
|
|
151
|
-
//---------------
|
|
152
|
-
}
|
|
153
|
-
}
|