chargebee 3.11.0 → 3.12.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 +64 -0
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +75 -4
- package/cjs/util.js +5 -14
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +75 -4
- package/esm/util.js +5 -14
- package/package.json +5 -1
- package/types/core.d.ts +8 -1
- package/types/index.d.ts +8 -0
- package/types/resources/Comment.d.ts +4 -0
- package/types/resources/CreditNote.d.ts +83 -76
- package/types/resources/Customer.d.ts +1 -0
- package/types/resources/CustomerEntitlement.d.ts +1 -0
- package/types/resources/Discount.d.ts +2 -1
- package/types/resources/Estimate.d.ts +4 -0
- package/types/resources/HostedPage.d.ts +3 -0
- package/types/resources/ImpactedCustomer.d.ts +19 -0
- package/types/resources/Invoice.d.ts +86 -79
- package/types/resources/OmnichannelOneTimeOrder.d.ts +62 -0
- package/types/resources/OmnichannelOneTimeOrderItem.d.ts +20 -0
- package/types/resources/OmnichannelSubscriptionItemScheduledChange.d.ts +1 -1
- package/types/resources/PricingPageSession.d.ts +2 -0
- package/types/resources/PromotionalCredit.d.ts +1 -0
- package/types/resources/Purchase.d.ts +2 -0
- package/types/resources/Quote.d.ts +6 -0
- package/types/resources/QuotedCharge.d.ts +5 -0
- package/types/resources/RecordedPurchase.d.ts +6 -0
- package/types/resources/Subscription.d.ts +9 -2
- package/types/resources/SubscriptionEntitlementsCreatedDetail.d.ts +9 -0
- package/types/resources/SubscriptionEntitlementsUpdatedDetail.d.ts +9 -0
- package/types/resources/UsageFile.d.ts +8 -8
- package/types/resources/WebhookEndpoint.d.ts +98 -0
|
@@ -36,7 +36,6 @@ declare module 'chargebee' {
|
|
|
36
36
|
resource_version?: number;
|
|
37
37
|
updated_at?: number;
|
|
38
38
|
channel?: ChannelEnum;
|
|
39
|
-
einvoice?: CreditNote.Einvoice;
|
|
40
39
|
sub_total: number;
|
|
41
40
|
sub_total_in_local_currency?: number;
|
|
42
41
|
total_in_local_currency?: number;
|
|
@@ -44,11 +43,13 @@ declare module 'chargebee' {
|
|
|
44
43
|
round_off_amount?: number;
|
|
45
44
|
fractional_correction?: number;
|
|
46
45
|
line_items?: CreditNote.LineItem[];
|
|
47
|
-
discounts?: CreditNote.Discount[];
|
|
48
|
-
line_item_discounts?: CreditNote.LineItemDiscount[];
|
|
49
46
|
line_item_tiers?: CreditNote.LineItemTier[];
|
|
50
|
-
|
|
47
|
+
line_item_discounts?: CreditNote.LineItemDiscount[];
|
|
51
48
|
line_item_taxes?: CreditNote.LineItemTax[];
|
|
49
|
+
line_item_addresses?: CreditNote.LineItemAddress[];
|
|
50
|
+
discounts?: CreditNote.Discount[];
|
|
51
|
+
taxes?: CreditNote.Tax[];
|
|
52
|
+
tax_origin?: CreditNote.TaxOrigin;
|
|
52
53
|
linked_refunds?: CreditNote.LinkedRefund[];
|
|
53
54
|
allocations?: CreditNote.Allocation[];
|
|
54
55
|
deleted: boolean;
|
|
@@ -59,9 +60,8 @@ declare module 'chargebee' {
|
|
|
59
60
|
business_entity_id?: string;
|
|
60
61
|
shipping_address?: CreditNote.ShippingAddress;
|
|
61
62
|
billing_address?: CreditNote.BillingAddress;
|
|
63
|
+
einvoice?: CreditNote.Einvoice;
|
|
62
64
|
site_details_at_creation?: CreditNote.SiteDetailsAtCreation;
|
|
63
|
-
tax_origin?: CreditNote.TaxOrigin;
|
|
64
|
-
line_item_addresses?: CreditNote.LineItemAddress[];
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
export namespace CreditNote {
|
|
@@ -206,18 +206,6 @@ declare module 'chargebee' {
|
|
|
206
206
|
credit_note: CreditNote;
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
export interface Einvoice {
|
|
210
|
-
id: string;
|
|
211
|
-
reference_number?: string;
|
|
212
|
-
status:
|
|
213
|
-
| 'scheduled'
|
|
214
|
-
| 'skipped'
|
|
215
|
-
| 'in_progress'
|
|
216
|
-
| 'success'
|
|
217
|
-
| 'failed'
|
|
218
|
-
| 'registered';
|
|
219
|
-
message?: string;
|
|
220
|
-
}
|
|
221
209
|
export interface LineItem {
|
|
222
210
|
id?: string;
|
|
223
211
|
subscription_id?: string;
|
|
@@ -267,33 +255,6 @@ declare module 'chargebee' {
|
|
|
267
255
|
entity_id?: string;
|
|
268
256
|
customer_id?: string;
|
|
269
257
|
}
|
|
270
|
-
export interface Discount {
|
|
271
|
-
amount: number;
|
|
272
|
-
description?: string;
|
|
273
|
-
entity_type:
|
|
274
|
-
| 'item_level_coupon'
|
|
275
|
-
| 'document_level_coupon'
|
|
276
|
-
| 'promotional_credits'
|
|
277
|
-
| 'prorated_credits'
|
|
278
|
-
| 'item_level_discount'
|
|
279
|
-
| 'document_level_discount';
|
|
280
|
-
discount_type?: 'fixed_amount' | 'percentage';
|
|
281
|
-
entity_id?: string;
|
|
282
|
-
coupon_set_code?: string;
|
|
283
|
-
}
|
|
284
|
-
export interface LineItemDiscount {
|
|
285
|
-
line_item_id: string;
|
|
286
|
-
discount_type:
|
|
287
|
-
| 'item_level_coupon'
|
|
288
|
-
| 'document_level_coupon'
|
|
289
|
-
| 'promotional_credits'
|
|
290
|
-
| 'prorated_credits'
|
|
291
|
-
| 'item_level_discount'
|
|
292
|
-
| 'document_level_discount';
|
|
293
|
-
coupon_id?: string;
|
|
294
|
-
entity_id?: string;
|
|
295
|
-
discount_amount: number;
|
|
296
|
-
}
|
|
297
258
|
export interface LineItemTier {
|
|
298
259
|
line_item_id?: string;
|
|
299
260
|
starting_unit: number;
|
|
@@ -307,10 +268,18 @@ declare module 'chargebee' {
|
|
|
307
268
|
pricing_type?: 'per_unit' | 'flat_fee' | 'package';
|
|
308
269
|
package_size?: number;
|
|
309
270
|
}
|
|
310
|
-
export interface
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
271
|
+
export interface LineItemDiscount {
|
|
272
|
+
line_item_id: string;
|
|
273
|
+
discount_type:
|
|
274
|
+
| 'item_level_coupon'
|
|
275
|
+
| 'document_level_coupon'
|
|
276
|
+
| 'promotional_credits'
|
|
277
|
+
| 'prorated_credits'
|
|
278
|
+
| 'item_level_discount'
|
|
279
|
+
| 'document_level_discount';
|
|
280
|
+
coupon_id?: string;
|
|
281
|
+
entity_id?: string;
|
|
282
|
+
discount_amount: number;
|
|
314
283
|
}
|
|
315
284
|
export interface LineItemTax {
|
|
316
285
|
line_item_id?: string;
|
|
@@ -337,6 +306,50 @@ declare module 'chargebee' {
|
|
|
337
306
|
tax_amount_in_local_currency?: number;
|
|
338
307
|
local_currency_code?: string;
|
|
339
308
|
}
|
|
309
|
+
export interface LineItemAddress {
|
|
310
|
+
line_item_id?: string;
|
|
311
|
+
first_name?: string;
|
|
312
|
+
last_name?: string;
|
|
313
|
+
email?: string;
|
|
314
|
+
company?: string;
|
|
315
|
+
phone?: string;
|
|
316
|
+
line1?: string;
|
|
317
|
+
line2?: string;
|
|
318
|
+
line3?: string;
|
|
319
|
+
city?: string;
|
|
320
|
+
state_code?: string;
|
|
321
|
+
state?: string;
|
|
322
|
+
country?: string;
|
|
323
|
+
zip?: string;
|
|
324
|
+
validation_status?:
|
|
325
|
+
| 'not_validated'
|
|
326
|
+
| 'valid'
|
|
327
|
+
| 'partially_valid'
|
|
328
|
+
| 'invalid';
|
|
329
|
+
}
|
|
330
|
+
export interface Discount {
|
|
331
|
+
amount: number;
|
|
332
|
+
description?: string;
|
|
333
|
+
entity_type:
|
|
334
|
+
| 'item_level_coupon'
|
|
335
|
+
| 'document_level_coupon'
|
|
336
|
+
| 'promotional_credits'
|
|
337
|
+
| 'prorated_credits'
|
|
338
|
+
| 'item_level_discount'
|
|
339
|
+
| 'document_level_discount';
|
|
340
|
+
discount_type?: 'fixed_amount' | 'percentage';
|
|
341
|
+
entity_id?: string;
|
|
342
|
+
coupon_set_code?: string;
|
|
343
|
+
}
|
|
344
|
+
export interface Tax {
|
|
345
|
+
name: string;
|
|
346
|
+
amount: number;
|
|
347
|
+
description?: string;
|
|
348
|
+
}
|
|
349
|
+
export interface TaxOrigin {
|
|
350
|
+
country?: string;
|
|
351
|
+
registration_number?: string;
|
|
352
|
+
}
|
|
340
353
|
export interface LinkedRefund {
|
|
341
354
|
txn_id: string;
|
|
342
355
|
applied_amount: number;
|
|
@@ -400,35 +413,22 @@ declare module 'chargebee' {
|
|
|
400
413
|
zip?: string;
|
|
401
414
|
validation_status?: ValidationStatusEnum;
|
|
402
415
|
}
|
|
416
|
+
export interface Einvoice {
|
|
417
|
+
id: string;
|
|
418
|
+
reference_number?: string;
|
|
419
|
+
status:
|
|
420
|
+
| 'scheduled'
|
|
421
|
+
| 'skipped'
|
|
422
|
+
| 'in_progress'
|
|
423
|
+
| 'success'
|
|
424
|
+
| 'failed'
|
|
425
|
+
| 'registered';
|
|
426
|
+
message?: string;
|
|
427
|
+
}
|
|
403
428
|
export interface SiteDetailsAtCreation {
|
|
404
429
|
timezone?: string;
|
|
405
430
|
organization_address?: object;
|
|
406
431
|
}
|
|
407
|
-
export interface TaxOrigin {
|
|
408
|
-
country?: string;
|
|
409
|
-
registration_number?: string;
|
|
410
|
-
}
|
|
411
|
-
export interface LineItemAddress {
|
|
412
|
-
line_item_id?: string;
|
|
413
|
-
first_name?: string;
|
|
414
|
-
last_name?: string;
|
|
415
|
-
email?: string;
|
|
416
|
-
company?: string;
|
|
417
|
-
phone?: string;
|
|
418
|
-
line1?: string;
|
|
419
|
-
line2?: string;
|
|
420
|
-
line3?: string;
|
|
421
|
-
city?: string;
|
|
422
|
-
state_code?: string;
|
|
423
|
-
state?: string;
|
|
424
|
-
country?: string;
|
|
425
|
-
zip?: string;
|
|
426
|
-
validation_status?:
|
|
427
|
-
| 'not_validated'
|
|
428
|
-
| 'valid'
|
|
429
|
-
| 'partially_valid'
|
|
430
|
-
| 'invalid';
|
|
431
|
-
}
|
|
432
432
|
// REQUEST PARAMS
|
|
433
433
|
//---------------
|
|
434
434
|
|
|
@@ -543,7 +543,9 @@ declare module 'chargebee' {
|
|
|
543
543
|
| 'adhoc'
|
|
544
544
|
| 'plan_item_price'
|
|
545
545
|
| 'addon_item_price'
|
|
546
|
-
| 'charge_item_price'
|
|
546
|
+
| 'charge_item_price'
|
|
547
|
+
| 'plan'
|
|
548
|
+
| 'addon';
|
|
547
549
|
entity_id?: string;
|
|
548
550
|
}
|
|
549
551
|
export interface LineItemRetrieveInputParam {
|
|
@@ -558,6 +560,7 @@ declare module 'chargebee' {
|
|
|
558
560
|
}
|
|
559
561
|
|
|
560
562
|
export interface TransactionRecordRefundInputParam {
|
|
563
|
+
id?: string;
|
|
561
564
|
amount?: number;
|
|
562
565
|
payment_method: PaymentMethodEnum;
|
|
563
566
|
reference_number?: string;
|
|
@@ -590,6 +593,7 @@ declare module 'chargebee' {
|
|
|
590
593
|
amount: number;
|
|
591
594
|
}
|
|
592
595
|
export interface LinkedRefundsImportCreditNoteInputParam {
|
|
596
|
+
id?: string;
|
|
593
597
|
amount: number;
|
|
594
598
|
payment_method: PaymentMethodEnum;
|
|
595
599
|
date: number;
|
|
@@ -640,7 +644,10 @@ declare module 'chargebee' {
|
|
|
640
644
|
| 'adhoc'
|
|
641
645
|
| 'plan_item_price'
|
|
642
646
|
| 'addon_item_price'
|
|
643
|
-
| 'charge_item_price'
|
|
647
|
+
| 'charge_item_price'
|
|
648
|
+
| 'plan_setup'
|
|
649
|
+
| 'plan'
|
|
650
|
+
| 'addon';
|
|
644
651
|
entity_id?: string;
|
|
645
652
|
item_level_discount1_entity_id?: string;
|
|
646
653
|
item_level_discount1_amount?: number;
|
|
@@ -5,9 +5,10 @@ declare module 'chargebee' {
|
|
|
5
5
|
export interface Discount {
|
|
6
6
|
id: string;
|
|
7
7
|
invoice_name?: string;
|
|
8
|
-
type: 'fixed_amount' | 'percentage';
|
|
8
|
+
type: 'fixed_amount' | 'percentage' | 'offer_quantity';
|
|
9
9
|
percentage?: number;
|
|
10
10
|
amount?: number;
|
|
11
|
+
quantity?: number;
|
|
11
12
|
currency_code?: string;
|
|
12
13
|
duration_type: DurationTypeEnum;
|
|
13
14
|
period?: number;
|
|
@@ -625,6 +625,7 @@ declare module 'chargebee' {
|
|
|
625
625
|
period_unit?: PeriodUnitEnum;
|
|
626
626
|
included_in_mrr?: boolean;
|
|
627
627
|
item_price_id?: string;
|
|
628
|
+
quantity?: number;
|
|
628
629
|
}
|
|
629
630
|
export interface ItemTiersCreateSubItemEstimateInputParam {
|
|
630
631
|
item_price_id?: string;
|
|
@@ -765,6 +766,7 @@ declare module 'chargebee' {
|
|
|
765
766
|
period_unit?: PeriodUnitEnum;
|
|
766
767
|
included_in_mrr?: boolean;
|
|
767
768
|
item_price_id?: string;
|
|
769
|
+
quantity?: number;
|
|
768
770
|
}
|
|
769
771
|
export interface ItemTiersCreateSubItemForCustomerEstimateInputParam {
|
|
770
772
|
item_price_id?: string;
|
|
@@ -927,6 +929,7 @@ declare module 'chargebee' {
|
|
|
927
929
|
period_unit?: PeriodUnitEnum;
|
|
928
930
|
included_in_mrr?: boolean;
|
|
929
931
|
item_price_id?: string;
|
|
932
|
+
quantity?: number;
|
|
930
933
|
operation_type: OperationTypeEnum;
|
|
931
934
|
id?: string;
|
|
932
935
|
}
|
|
@@ -1232,6 +1235,7 @@ declare module 'chargebee' {
|
|
|
1232
1235
|
export interface DiscountsCreateInvoiceForItemsInputParam {
|
|
1233
1236
|
percentage?: number;
|
|
1234
1237
|
amount?: number;
|
|
1238
|
+
quantity?: number;
|
|
1235
1239
|
apply_on: ApplyOnEnum;
|
|
1236
1240
|
item_price_id?: string;
|
|
1237
1241
|
}
|
|
@@ -720,6 +720,7 @@ declare module 'chargebee' {
|
|
|
720
720
|
export interface DiscountsCheckoutOneTimeForItemsInputParam {
|
|
721
721
|
percentage?: number;
|
|
722
722
|
amount?: number;
|
|
723
|
+
quantity?: number;
|
|
723
724
|
apply_on: ApplyOnEnum;
|
|
724
725
|
item_price_id?: string;
|
|
725
726
|
}
|
|
@@ -850,6 +851,7 @@ declare module 'chargebee' {
|
|
|
850
851
|
period_unit?: PeriodUnitEnum;
|
|
851
852
|
included_in_mrr?: boolean;
|
|
852
853
|
item_price_id?: string;
|
|
854
|
+
quantity?: number;
|
|
853
855
|
}
|
|
854
856
|
export interface EntityIdentifiersCheckoutNewForItemsInputParam {
|
|
855
857
|
id?: string;
|
|
@@ -985,6 +987,7 @@ declare module 'chargebee' {
|
|
|
985
987
|
period_unit?: PeriodUnitEnum;
|
|
986
988
|
included_in_mrr?: boolean;
|
|
987
989
|
item_price_id?: string;
|
|
990
|
+
quantity?: number;
|
|
988
991
|
operation_type: OperationTypeEnum;
|
|
989
992
|
id?: string;
|
|
990
993
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
4
|
+
declare module 'chargebee' {
|
|
5
|
+
export interface ImpactedCustomer {
|
|
6
|
+
action_type?: string;
|
|
7
|
+
download?: ImpactedCustomer.Download;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export namespace ImpactedCustomer {
|
|
11
|
+
export interface Download {
|
|
12
|
+
download_url: string;
|
|
13
|
+
valid_till: number;
|
|
14
|
+
mime_type?: string;
|
|
15
|
+
}
|
|
16
|
+
// REQUEST PARAMS
|
|
17
|
+
//---------------
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
declare module 'chargebee' {
|
|
5
5
|
export interface Invoice {
|
|
6
6
|
id: string;
|
|
7
|
-
po_number?: string;
|
|
8
7
|
customer_id: string;
|
|
8
|
+
payment_owner?: string;
|
|
9
9
|
subscription_id?: string;
|
|
10
10
|
recurring: boolean;
|
|
11
11
|
status:
|
|
@@ -15,31 +15,32 @@ declare module 'chargebee' {
|
|
|
15
15
|
| 'not_paid'
|
|
16
16
|
| 'voided'
|
|
17
17
|
| 'pending';
|
|
18
|
-
vat_number?: string;
|
|
19
|
-
price_type: PriceTypeEnum;
|
|
20
18
|
date?: number;
|
|
21
19
|
due_date?: number;
|
|
22
20
|
net_term_days?: number;
|
|
21
|
+
po_number?: string;
|
|
22
|
+
vat_number?: string;
|
|
23
|
+
price_type: PriceTypeEnum;
|
|
23
24
|
exchange_rate?: number;
|
|
25
|
+
local_currency_exchange_rate?: number;
|
|
24
26
|
currency_code: string;
|
|
27
|
+
local_currency_code?: string;
|
|
28
|
+
tax: number;
|
|
29
|
+
sub_total: number;
|
|
30
|
+
sub_total_in_local_currency?: number;
|
|
25
31
|
total?: number;
|
|
26
|
-
|
|
32
|
+
total_in_local_currency?: number;
|
|
33
|
+
amount_due?: number;
|
|
27
34
|
amount_adjusted?: number;
|
|
35
|
+
amount_paid?: number;
|
|
36
|
+
paid_at?: number;
|
|
28
37
|
write_off_amount?: number;
|
|
29
38
|
credits_applied?: number;
|
|
30
|
-
amount_due?: number;
|
|
31
|
-
paid_at?: number;
|
|
32
39
|
dunning_status?: 'in_progress' | 'exhausted' | 'stopped' | 'success';
|
|
33
40
|
next_retry_at?: number;
|
|
34
41
|
voided_at?: number;
|
|
35
42
|
resource_version?: number;
|
|
36
43
|
updated_at?: number;
|
|
37
|
-
sub_total: number;
|
|
38
|
-
sub_total_in_local_currency?: number;
|
|
39
|
-
total_in_local_currency?: number;
|
|
40
|
-
local_currency_code?: string;
|
|
41
|
-
tax: number;
|
|
42
|
-
local_currency_exchange_rate?: number;
|
|
43
44
|
first_invoice?: boolean;
|
|
44
45
|
new_sales_amount?: number;
|
|
45
46
|
has_advance_charges?: boolean;
|
|
@@ -50,12 +51,14 @@ declare module 'chargebee' {
|
|
|
50
51
|
amount_to_collect?: number;
|
|
51
52
|
round_off_amount?: number;
|
|
52
53
|
line_items?: Invoice.LineItem[];
|
|
53
|
-
|
|
54
|
+
line_item_tiers?: Invoice.LineItemTier[];
|
|
54
55
|
line_item_discounts?: Invoice.LineItemDiscount[];
|
|
55
|
-
taxes?: Invoice.Tax[];
|
|
56
56
|
line_item_taxes?: Invoice.LineItemTax[];
|
|
57
57
|
line_item_credits?: Invoice.LineItemCredit[];
|
|
58
|
-
|
|
58
|
+
line_item_addresses?: Invoice.LineItemAddress[];
|
|
59
|
+
discounts?: Invoice.Discount[];
|
|
60
|
+
taxes?: Invoice.Tax[];
|
|
61
|
+
tax_origin?: Invoice.TaxOrigin;
|
|
59
62
|
linked_payments?: Invoice.LinkedPayment[];
|
|
60
63
|
dunning_attempts?: Invoice.DunningAttempt[];
|
|
61
64
|
applied_credits?: Invoice.AppliedCredit[];
|
|
@@ -64,10 +67,9 @@ declare module 'chargebee' {
|
|
|
64
67
|
linked_orders?: Invoice.LinkedOrder[];
|
|
65
68
|
notes?: Invoice.Note[];
|
|
66
69
|
shipping_address?: Invoice.ShippingAddress;
|
|
67
|
-
statement_descriptor?: Invoice.StatementDescriptor;
|
|
68
70
|
billing_address?: Invoice.BillingAddress;
|
|
71
|
+
statement_descriptor?: Invoice.StatementDescriptor;
|
|
69
72
|
einvoice?: Invoice.Einvoice;
|
|
70
|
-
payment_owner?: string;
|
|
71
73
|
void_reason_code?: string;
|
|
72
74
|
deleted: boolean;
|
|
73
75
|
tax_category?: string;
|
|
@@ -75,8 +77,6 @@ declare module 'chargebee' {
|
|
|
75
77
|
channel?: ChannelEnum;
|
|
76
78
|
business_entity_id?: string;
|
|
77
79
|
site_details_at_creation?: Invoice.SiteDetailsAtCreation;
|
|
78
|
-
tax_origin?: Invoice.TaxOrigin;
|
|
79
|
-
line_item_addresses?: Invoice.LineItemAddress[];
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
export namespace Invoice {
|
|
@@ -533,19 +533,18 @@ declare module 'chargebee' {
|
|
|
533
533
|
entity_id?: string;
|
|
534
534
|
customer_id?: string;
|
|
535
535
|
}
|
|
536
|
-
export interface
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
coupon_set_code?: string;
|
|
536
|
+
export interface LineItemTier {
|
|
537
|
+
line_item_id?: string;
|
|
538
|
+
starting_unit: number;
|
|
539
|
+
ending_unit?: number;
|
|
540
|
+
quantity_used: number;
|
|
541
|
+
unit_amount: number;
|
|
542
|
+
starting_unit_in_decimal?: string;
|
|
543
|
+
ending_unit_in_decimal?: string;
|
|
544
|
+
quantity_used_in_decimal?: string;
|
|
545
|
+
unit_amount_in_decimal?: string;
|
|
546
|
+
pricing_type?: 'per_unit' | 'flat_fee' | 'package';
|
|
547
|
+
package_size?: number;
|
|
549
548
|
}
|
|
550
549
|
export interface LineItemDiscount {
|
|
551
550
|
line_item_id: string;
|
|
@@ -560,11 +559,6 @@ declare module 'chargebee' {
|
|
|
560
559
|
entity_id?: string;
|
|
561
560
|
discount_amount: number;
|
|
562
561
|
}
|
|
563
|
-
export interface Tax {
|
|
564
|
-
name: string;
|
|
565
|
-
amount: number;
|
|
566
|
-
description?: string;
|
|
567
|
-
}
|
|
568
562
|
export interface LineItemTax {
|
|
569
563
|
line_item_id?: string;
|
|
570
564
|
tax_name: string;
|
|
@@ -595,18 +589,49 @@ declare module 'chargebee' {
|
|
|
595
589
|
applied_amount: number;
|
|
596
590
|
line_item_id?: string;
|
|
597
591
|
}
|
|
598
|
-
export interface
|
|
592
|
+
export interface LineItemAddress {
|
|
599
593
|
line_item_id?: string;
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
594
|
+
first_name?: string;
|
|
595
|
+
last_name?: string;
|
|
596
|
+
email?: string;
|
|
597
|
+
company?: string;
|
|
598
|
+
phone?: string;
|
|
599
|
+
line1?: string;
|
|
600
|
+
line2?: string;
|
|
601
|
+
line3?: string;
|
|
602
|
+
city?: string;
|
|
603
|
+
state_code?: string;
|
|
604
|
+
state?: string;
|
|
605
|
+
country?: string;
|
|
606
|
+
zip?: string;
|
|
607
|
+
validation_status?:
|
|
608
|
+
| 'not_validated'
|
|
609
|
+
| 'valid'
|
|
610
|
+
| 'partially_valid'
|
|
611
|
+
| 'invalid';
|
|
612
|
+
}
|
|
613
|
+
export interface Discount {
|
|
614
|
+
amount: number;
|
|
615
|
+
description?: string;
|
|
616
|
+
entity_type:
|
|
617
|
+
| 'item_level_coupon'
|
|
618
|
+
| 'document_level_coupon'
|
|
619
|
+
| 'promotional_credits'
|
|
620
|
+
| 'prorated_credits'
|
|
621
|
+
| 'item_level_discount'
|
|
622
|
+
| 'document_level_discount';
|
|
623
|
+
discount_type?: 'fixed_amount' | 'percentage';
|
|
624
|
+
entity_id?: string;
|
|
625
|
+
coupon_set_code?: string;
|
|
626
|
+
}
|
|
627
|
+
export interface Tax {
|
|
628
|
+
name: string;
|
|
629
|
+
amount: number;
|
|
630
|
+
description?: string;
|
|
631
|
+
}
|
|
632
|
+
export interface TaxOrigin {
|
|
633
|
+
country?: string;
|
|
634
|
+
registration_number?: string;
|
|
610
635
|
}
|
|
611
636
|
export interface LinkedPayment {
|
|
612
637
|
txn_id: string;
|
|
@@ -753,10 +778,6 @@ declare module 'chargebee' {
|
|
|
753
778
|
validation_status?: ValidationStatusEnum;
|
|
754
779
|
index: number;
|
|
755
780
|
}
|
|
756
|
-
export interface StatementDescriptor {
|
|
757
|
-
id: string;
|
|
758
|
-
descriptor?: string;
|
|
759
|
-
}
|
|
760
781
|
export interface BillingAddress {
|
|
761
782
|
first_name?: string;
|
|
762
783
|
last_name?: string;
|
|
@@ -773,6 +794,10 @@ declare module 'chargebee' {
|
|
|
773
794
|
zip?: string;
|
|
774
795
|
validation_status?: ValidationStatusEnum;
|
|
775
796
|
}
|
|
797
|
+
export interface StatementDescriptor {
|
|
798
|
+
id: string;
|
|
799
|
+
descriptor?: string;
|
|
800
|
+
}
|
|
776
801
|
export interface Einvoice {
|
|
777
802
|
id: string;
|
|
778
803
|
reference_number?: string;
|
|
@@ -789,31 +814,6 @@ declare module 'chargebee' {
|
|
|
789
814
|
timezone?: string;
|
|
790
815
|
organization_address?: object;
|
|
791
816
|
}
|
|
792
|
-
export interface TaxOrigin {
|
|
793
|
-
country?: string;
|
|
794
|
-
registration_number?: string;
|
|
795
|
-
}
|
|
796
|
-
export interface LineItemAddress {
|
|
797
|
-
line_item_id?: string;
|
|
798
|
-
first_name?: string;
|
|
799
|
-
last_name?: string;
|
|
800
|
-
email?: string;
|
|
801
|
-
company?: string;
|
|
802
|
-
phone?: string;
|
|
803
|
-
line1?: string;
|
|
804
|
-
line2?: string;
|
|
805
|
-
line3?: string;
|
|
806
|
-
city?: string;
|
|
807
|
-
state_code?: string;
|
|
808
|
-
state?: string;
|
|
809
|
-
country?: string;
|
|
810
|
-
zip?: string;
|
|
811
|
-
validation_status?:
|
|
812
|
-
| 'not_validated'
|
|
813
|
-
| 'valid'
|
|
814
|
-
| 'partially_valid'
|
|
815
|
-
| 'invalid';
|
|
816
|
-
}
|
|
817
817
|
// REQUEST PARAMS
|
|
818
818
|
//---------------
|
|
819
819
|
|
|
@@ -1421,6 +1421,7 @@ declare module 'chargebee' {
|
|
|
1421
1421
|
export interface DiscountsCreateForChargeItemsAndChargesInputParam {
|
|
1422
1422
|
percentage?: number;
|
|
1423
1423
|
amount?: number;
|
|
1424
|
+
quantity?: number;
|
|
1424
1425
|
apply_on: ApplyOnEnum;
|
|
1425
1426
|
item_price_id?: string;
|
|
1426
1427
|
}
|
|
@@ -1524,7 +1525,9 @@ declare module 'chargebee' {
|
|
|
1524
1525
|
| 'coupon'
|
|
1525
1526
|
| 'plan_item_price'
|
|
1526
1527
|
| 'addon_item_price'
|
|
1527
|
-
| 'charge_item_price'
|
|
1528
|
+
| 'charge_item_price'
|
|
1529
|
+
| 'plan'
|
|
1530
|
+
| 'addon';
|
|
1528
1531
|
entity_id?: string;
|
|
1529
1532
|
note?: string;
|
|
1530
1533
|
}
|
|
@@ -1540,6 +1543,7 @@ declare module 'chargebee' {
|
|
|
1540
1543
|
amount: number;
|
|
1541
1544
|
}
|
|
1542
1545
|
export interface PaymentsImportInvoiceInputParam {
|
|
1546
|
+
id?: string;
|
|
1543
1547
|
amount: number;
|
|
1544
1548
|
payment_method: PaymentMethodEnum;
|
|
1545
1549
|
date?: number;
|
|
@@ -1606,7 +1610,10 @@ declare module 'chargebee' {
|
|
|
1606
1610
|
| 'adhoc'
|
|
1607
1611
|
| 'plan_item_price'
|
|
1608
1612
|
| 'addon_item_price'
|
|
1609
|
-
| 'charge_item_price'
|
|
1613
|
+
| 'charge_item_price'
|
|
1614
|
+
| 'plan_setup'
|
|
1615
|
+
| 'plan'
|
|
1616
|
+
| 'addon';
|
|
1610
1617
|
entity_id?: string;
|
|
1611
1618
|
item_level_discount1_entity_id?: string;
|
|
1612
1619
|
item_level_discount1_amount?: number;
|
|
@@ -0,0 +1,62 @@
|
|
|
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 OmnichannelOneTimeOrder {
|
|
6
|
+
id: string;
|
|
7
|
+
app_id: string;
|
|
8
|
+
customer_id?: string;
|
|
9
|
+
id_at_source: string;
|
|
10
|
+
origin?: string;
|
|
11
|
+
source: 'apple_app_store' | 'google_play_store';
|
|
12
|
+
created_at: number;
|
|
13
|
+
resource_version?: number;
|
|
14
|
+
omnichannel_one_time_order_items: OmnichannelOneTimeOrderItem[];
|
|
15
|
+
purchase_transaction?: OmnichannelOneTimeOrder.OmnichannelTransaction;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export namespace OmnichannelOneTimeOrder {
|
|
19
|
+
export class OmnichannelOneTimeOrderResource {
|
|
20
|
+
retrieve(
|
|
21
|
+
omnichannel_one_time_order_id: string,
|
|
22
|
+
headers?: ChargebeeRequestHeader,
|
|
23
|
+
): Promise<ChargebeeResponse<RetrieveResponse>>;
|
|
24
|
+
|
|
25
|
+
list(
|
|
26
|
+
input?: ListInputParam,
|
|
27
|
+
headers?: ChargebeeRequestHeader,
|
|
28
|
+
): Promise<ChargebeeResponse<ListResponse>>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface RetrieveResponse {
|
|
32
|
+
omnichannel_one_time_order: OmnichannelOneTimeOrder;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface ListResponse {
|
|
36
|
+
list: { omnichannel_one_time_order: OmnichannelOneTimeOrder }[];
|
|
37
|
+
next_offset?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface OmnichannelTransaction {
|
|
41
|
+
id: string;
|
|
42
|
+
id_at_source: string;
|
|
43
|
+
app_id: string;
|
|
44
|
+
price_currency?: string;
|
|
45
|
+
price_units?: number;
|
|
46
|
+
price_nanos?: number;
|
|
47
|
+
type: 'purchase' | 'renewal';
|
|
48
|
+
transacted_at?: number;
|
|
49
|
+
created_at: number;
|
|
50
|
+
resource_version?: number;
|
|
51
|
+
}
|
|
52
|
+
// REQUEST PARAMS
|
|
53
|
+
//---------------
|
|
54
|
+
|
|
55
|
+
export interface ListInputParam {
|
|
56
|
+
limit?: number;
|
|
57
|
+
offset?: string;
|
|
58
|
+
source?: filter.Enum;
|
|
59
|
+
customer_id?: filter.String;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|