chargebee 3.0.0-beta.3 → 3.0.0-beta.5
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 +37 -0
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +1 -0
- package/cjs/util.js +1 -1
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +1 -0
- package/esm/util.js +1 -1
- package/package.json +2 -2
- package/types/core.d.ts +93 -80
- package/types/index.d.ts +1 -0
- package/types/resources/Address.d.ts +2 -2
- package/types/resources/AdvanceInvoiceSchedule.d.ts +1 -1
- package/types/resources/AttachedItem.d.ts +4 -4
- package/types/resources/Card.d.ts +5 -3
- package/types/resources/Comment.d.ts +2 -2
- package/types/resources/Coupon.d.ts +10 -10
- package/types/resources/CreditNote.d.ts +7 -7
- package/types/resources/CreditNoteEstimate.d.ts +1 -1
- package/types/resources/Customer.d.ts +46 -46
- package/types/resources/Discount.d.ts +3 -3
- package/types/resources/Entitlement.d.ts +1 -1
- package/types/resources/EntitlementOverride.d.ts +1 -1
- package/types/resources/Estimate.d.ts +116 -100
- package/types/resources/Event.d.ts +3 -3
- package/types/resources/Export.d.ts +4 -4
- package/types/resources/Gift.d.ts +2 -2
- package/types/resources/HostedPage.d.ts +64 -64
- package/types/resources/Invoice.d.ts +44 -44
- package/types/resources/InvoiceEstimate.d.ts +1 -1
- package/types/resources/Item.d.ts +5 -5
- package/types/resources/ItemEntitlement.d.ts +2 -2
- package/types/resources/ItemFamily.d.ts +1 -1
- package/types/resources/ItemPrice.d.ts +11 -8
- package/types/resources/Order.d.ts +6 -6
- package/types/resources/PaymentScheduleEstimate.d.ts +25 -0
- package/types/resources/PaymentScheduleScheme.d.ts +1 -0
- package/types/resources/PaymentSource.d.ts +18 -14
- package/types/resources/PaymentVoucher.d.ts +9 -9
- package/types/resources/PricingPageSession.d.ts +27 -2
- package/types/resources/PromotionalCredit.d.ts +4 -4
- package/types/resources/Purchase.d.ts +6 -6
- package/types/resources/Quote.d.ts +84 -83
- package/types/resources/QuotedSubscription.d.ts +4 -1
- package/types/resources/Ramp.d.ts +6 -6
- package/types/resources/Subscription.d.ts +147 -142
- package/types/resources/SubscriptionEstimate.d.ts +2 -2
- package/types/resources/ThirdPartyPaymentMethod.d.ts +2 -2
- package/types/resources/Token.d.ts +2 -2
- package/types/resources/Transaction.d.ts +3 -3
- package/types/resources/UnbilledCharge.d.ts +3 -3
- package/types/resources/Usage.d.ts +3 -3
- package/types/resources/VirtualBankAccount.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,40 @@
|
|
|
1
|
+
### v3.0.0-beta.5 (2024-11-05)
|
|
2
|
+
|
|
3
|
+
#### Naming Convention Fix:
|
|
4
|
+
* New suffix Enum has been added to global type.
|
|
5
|
+
* payment_vouchersForInvoice has been renamed to paymentVouchersForInvoice.
|
|
6
|
+
* payment_vouchersForCustomer has been renamed to paymentVouchersForCustomer.
|
|
7
|
+
* Payment_vouchersForInvoiceResponse has been renamed to PaymentVouchersForInvoiceResponse.
|
|
8
|
+
* Payment_vouchersForCustomerResponse has been renmed to PaymentVouchersForCustomerResponse.
|
|
9
|
+
|
|
10
|
+
### v3.0.0-beta.4 (2024-10-18)
|
|
11
|
+
|
|
12
|
+
#### New Resource:
|
|
13
|
+
* PaymentScheduleEstimate has been added.
|
|
14
|
+
|
|
15
|
+
### New Attributes:
|
|
16
|
+
* payment_schedule_estimates has been added to Estimate.
|
|
17
|
+
* usage_accumulation_reset_frequency has been added to ItemPrice.
|
|
18
|
+
* name has been added to PaymentScheduleScheme.
|
|
19
|
+
* usage_accumulation_reset_frequency has been added to QuotedSubscription#SubscriptionItem.
|
|
20
|
+
* usage_accumulation_reset_frequency has been added to Subscription#SubscriptionItem.
|
|
21
|
+
|
|
22
|
+
### New Endpoints:
|
|
23
|
+
* Estimate#PaymentSchedule has been added.
|
|
24
|
+
|
|
25
|
+
### New Input Params:
|
|
26
|
+
* usage_accumulation_reset_frequency has been added to ItemPrice#CreateParams.
|
|
27
|
+
* usage_accumulation_reset_frequency has been added to ItemPrice#UpdateParams.
|
|
28
|
+
* discounts has been added to PricingPageSession#CreateForNewSubscriptionParams.
|
|
29
|
+
* discounts has been added to PricingPageSession#CreateForExistingSubscriptionParams.
|
|
30
|
+
* invoice_immediately has been added to Quote#ConvertParams.
|
|
31
|
+
|
|
32
|
+
### Bug Fixes:
|
|
33
|
+
* metadata field not working bug fixed.
|
|
34
|
+
|
|
35
|
+
### Dependency
|
|
36
|
+
* moved @types/node to devDependencies.
|
|
37
|
+
|
|
1
38
|
### v3.0.0-beta.3 (2024-09-20)
|
|
2
39
|
* * *
|
|
3
40
|
|
package/cjs/environment.js
CHANGED
|
@@ -11,7 +11,7 @@ exports.Environment = {
|
|
|
11
11
|
hostSuffix: '.chargebee.com',
|
|
12
12
|
apiPath: '/api/v2',
|
|
13
13
|
timeout: DEFAULT_TIME_OUT,
|
|
14
|
-
clientVersion: 'v3.0.0-beta.
|
|
14
|
+
clientVersion: 'v3.0.0-beta.5',
|
|
15
15
|
port: DEFAULT_PORT,
|
|
16
16
|
timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
|
|
17
17
|
exportWaitInMillis: DEFAULT_EXPORT_WAIT,
|
package/cjs/util.js
CHANGED
|
@@ -194,7 +194,7 @@ function encodeParams(paramObj, serialized, scope, index) {
|
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
else if (key === 'meta_data') {
|
|
197
|
+
else if (key === 'meta_data' || key === 'metadata') {
|
|
198
198
|
let attrVal = '';
|
|
199
199
|
if (value !== null) {
|
|
200
200
|
attrVal = encodeURIComponent(Object.prototype.toString.call(value) === '[object String]'
|
package/esm/environment.js
CHANGED
|
@@ -8,7 +8,7 @@ export const Environment = {
|
|
|
8
8
|
hostSuffix: '.chargebee.com',
|
|
9
9
|
apiPath: '/api/v2',
|
|
10
10
|
timeout: DEFAULT_TIME_OUT,
|
|
11
|
-
clientVersion: 'v3.0.0-beta.
|
|
11
|
+
clientVersion: 'v3.0.0-beta.5',
|
|
12
12
|
port: DEFAULT_PORT,
|
|
13
13
|
timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
|
|
14
14
|
exportWaitInMillis: DEFAULT_EXPORT_WAIT,
|
package/esm/util.js
CHANGED
|
@@ -178,7 +178,7 @@ export function encodeParams(paramObj, serialized, scope, index) {
|
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
else if (key === 'meta_data') {
|
|
181
|
+
else if (key === 'meta_data' || key === 'metadata') {
|
|
182
182
|
let attrVal = '';
|
|
183
183
|
if (value !== null) {
|
|
184
184
|
attrVal = encodeURIComponent(Object.prototype.toString.call(value) === '[object String]'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chargebee",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.5",
|
|
4
4
|
"description": "A library for integrating with Chargebee.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prepack": "npm install && npm run build",
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
}
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@types/node": "20.0.0"
|
|
37
36
|
},
|
|
38
37
|
"exports": {
|
|
39
38
|
"types": "./types/index.d.ts",
|
|
@@ -59,6 +58,7 @@
|
|
|
59
58
|
}
|
|
60
59
|
},
|
|
61
60
|
"devDependencies": {
|
|
61
|
+
"@types/node": "20.0.0",
|
|
62
62
|
"prettier": "^3.3.3",
|
|
63
63
|
"typescript": "^5.5.4"
|
|
64
64
|
},
|
package/types/core.d.ts
CHANGED
|
@@ -19,49 +19,53 @@ declare module 'chargebee' {
|
|
|
19
19
|
'chargebee-request-origin-user-encoded'?: string;
|
|
20
20
|
'chargebee-request-origin-device'?: string;
|
|
21
21
|
};
|
|
22
|
-
type
|
|
23
|
-
type
|
|
22
|
+
type AccountHolderTypeEnum = 'individual' | 'company';
|
|
23
|
+
type AccountReceivablesHandlingEnum =
|
|
24
24
|
| 'no_action'
|
|
25
25
|
| 'schedule_payment_collection'
|
|
26
26
|
| 'write_off';
|
|
27
|
-
type
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
type
|
|
33
|
-
type
|
|
34
|
-
type
|
|
35
|
-
type
|
|
36
|
-
type
|
|
27
|
+
type AccountTypeEnum =
|
|
28
|
+
| 'checking'
|
|
29
|
+
| 'savings'
|
|
30
|
+
| 'business_checking'
|
|
31
|
+
| 'current';
|
|
32
|
+
type ActionEnum = 'upsert' | 'remove';
|
|
33
|
+
type ApiVersionEnum = 'v1' | 'v2';
|
|
34
|
+
type ApplyOnEnum = 'invoice_amount' | 'specific_item_price';
|
|
35
|
+
type AutoCollectionEnum = 'on' | 'off';
|
|
36
|
+
type AvalaraSaleTypeEnum = 'wholesale' | 'retail' | 'consumed' | 'vendor_use';
|
|
37
|
+
type BillingAlignmentModeEnum = 'immediate' | 'delayed';
|
|
38
|
+
type BillingDateModeEnum = 'using_defaults' | 'manually_set';
|
|
39
|
+
type BillingDayOfWeekModeEnum = 'using_defaults' | 'manually_set';
|
|
40
|
+
type CancelOptionEnum =
|
|
37
41
|
| 'immediately'
|
|
38
42
|
| 'end_of_term'
|
|
39
43
|
| 'specific_date'
|
|
40
44
|
| 'end_of_billing_term';
|
|
41
|
-
type
|
|
42
|
-
type
|
|
43
|
-
type
|
|
44
|
-
type
|
|
45
|
+
type ChangeOptionEnum = 'immediately' | 'end_of_term' | 'specific_date';
|
|
46
|
+
type ChannelEnum = 'web' | 'app_store' | 'play_store';
|
|
47
|
+
type ChargeModelEnum = 'full_charge' | 'prorate';
|
|
48
|
+
type ChargeOnEventEnum =
|
|
45
49
|
| 'subscription_creation'
|
|
46
50
|
| 'subscription_trial_start'
|
|
47
51
|
| 'plan_activation'
|
|
48
52
|
| 'subscription_activation'
|
|
49
53
|
| 'contract_termination'
|
|
50
54
|
| 'on_demand';
|
|
51
|
-
type
|
|
52
|
-
type
|
|
53
|
-
type
|
|
55
|
+
type ChargeOnOptionEnum = 'immediately' | 'on_event';
|
|
56
|
+
type ChargesHandlingEnum = 'invoice_immediately' | 'add_to_unbilled_charges';
|
|
57
|
+
type ContractTermCancelOptionEnum =
|
|
54
58
|
| 'terminate_immediately'
|
|
55
59
|
| 'end_of_contract_term';
|
|
56
|
-
type
|
|
57
|
-
type
|
|
58
|
-
type
|
|
60
|
+
type CreditOptionForCurrentTermChargesEnum = 'none' | 'prorate' | 'full';
|
|
61
|
+
type CreditTypeEnum = 'loyalty_credits' | 'referral_rewards' | 'general';
|
|
62
|
+
type CustomerTypeEnum =
|
|
59
63
|
| 'residential'
|
|
60
64
|
| 'business'
|
|
61
65
|
| 'senior_citizen'
|
|
62
66
|
| 'industrial';
|
|
63
|
-
type
|
|
64
|
-
type
|
|
67
|
+
type DedupeOptionEnum = 'skip' | 'update_existing';
|
|
68
|
+
type DirectDebitSchemeEnum =
|
|
65
69
|
| 'ach'
|
|
66
70
|
| 'bacs'
|
|
67
71
|
| 'sepa_core'
|
|
@@ -70,16 +74,16 @@ declare module 'chargebee' {
|
|
|
70
74
|
| 'becs_nz'
|
|
71
75
|
| 'pad'
|
|
72
76
|
| 'not_applicable';
|
|
73
|
-
type
|
|
74
|
-
type
|
|
75
|
-
type
|
|
76
|
-
type
|
|
77
|
-
type
|
|
78
|
-
type
|
|
77
|
+
type DispositionTypeEnum = 'attachment' | 'inline';
|
|
78
|
+
type DunningTypeEnum = 'auto_collect' | 'offline' | 'direct_debit';
|
|
79
|
+
type DurationTypeEnum = 'one_time' | 'forever' | 'limited_period';
|
|
80
|
+
type EcheckTypeEnum = 'web' | 'ppd' | 'ccd';
|
|
81
|
+
type EinvoicingMethodEnum = 'automatic' | 'manual' | 'site_default';
|
|
82
|
+
type EndScheduleOnEnum =
|
|
79
83
|
| 'after_number_of_intervals'
|
|
80
84
|
| 'specific_date'
|
|
81
85
|
| 'subscription_end';
|
|
82
|
-
type
|
|
86
|
+
type EntityCodeEnum =
|
|
83
87
|
| 'a'
|
|
84
88
|
| 'b'
|
|
85
89
|
| 'c'
|
|
@@ -99,7 +103,7 @@ declare module 'chargebee' {
|
|
|
99
103
|
| 'r'
|
|
100
104
|
| 'med1'
|
|
101
105
|
| 'med2';
|
|
102
|
-
type
|
|
106
|
+
type EntityTypeEnum =
|
|
103
107
|
| 'customer'
|
|
104
108
|
| 'subscription'
|
|
105
109
|
| 'coupon'
|
|
@@ -129,8 +133,8 @@ declare module 'chargebee' {
|
|
|
129
133
|
| 'item_entitlement'
|
|
130
134
|
| 'business_entity'
|
|
131
135
|
| 'price_variant';
|
|
132
|
-
type
|
|
133
|
-
type
|
|
136
|
+
type EventNameEnum = 'cancellation_page_loaded';
|
|
137
|
+
type EventTypeEnum =
|
|
134
138
|
| 'coupon_created'
|
|
135
139
|
| 'coupon_updated'
|
|
136
140
|
| 'coupon_deleted'
|
|
@@ -294,9 +298,9 @@ declare module 'chargebee' {
|
|
|
294
298
|
| 'voucher_create_failed'
|
|
295
299
|
| 'item_price_entitlements_updated'
|
|
296
300
|
| 'item_price_entitlements_removed'
|
|
297
|
-
| '
|
|
298
|
-
| '
|
|
299
|
-
| '
|
|
301
|
+
| 'subscription_ramp_created'
|
|
302
|
+
| 'subscription_ramp_deleted'
|
|
303
|
+
| 'subscription_ramp_applied'
|
|
300
304
|
| 'subscription_ramp_drafted'
|
|
301
305
|
| 'subscription_ramp_updated'
|
|
302
306
|
| 'price_variant_created'
|
|
@@ -312,10 +316,10 @@ declare module 'chargebee' {
|
|
|
312
316
|
| 'addon_created'
|
|
313
317
|
| 'addon_updated'
|
|
314
318
|
| 'addon_deleted';
|
|
315
|
-
type
|
|
316
|
-
type
|
|
317
|
-
type
|
|
318
|
-
type
|
|
319
|
+
type ExportTypeEnum = 'data' | 'import_friendly_data';
|
|
320
|
+
type FreePeriodUnitEnum = 'day' | 'week' | 'month' | 'year';
|
|
321
|
+
type FriendOfferTypeEnum = 'none' | 'coupon' | 'coupon_code';
|
|
322
|
+
type GatewayEnum =
|
|
319
323
|
| 'chargebee'
|
|
320
324
|
| 'chargebee_payments'
|
|
321
325
|
| 'stripe'
|
|
@@ -368,15 +372,18 @@ declare module 'chargebee' {
|
|
|
368
372
|
| 'nuvei'
|
|
369
373
|
| 'gocardless'
|
|
370
374
|
| 'not_applicable';
|
|
371
|
-
type
|
|
375
|
+
type HierarchyOperationTypeEnum =
|
|
372
376
|
| 'complete_hierarchy'
|
|
373
377
|
| 'subordinates'
|
|
374
378
|
| 'path_to_root';
|
|
375
|
-
type
|
|
376
|
-
type
|
|
377
|
-
type
|
|
378
|
-
type
|
|
379
|
-
|
|
379
|
+
type InvoiceDunningHandlingEnum = 'continue' | 'stop';
|
|
380
|
+
type ItemTypeEnum = 'plan' | 'addon' | 'charge';
|
|
381
|
+
type LayoutEnum = 'in_app' | 'full_page';
|
|
382
|
+
type NotifyReferralSystemEnum =
|
|
383
|
+
| 'none'
|
|
384
|
+
| 'first_paid_conversion'
|
|
385
|
+
| 'all_invoices';
|
|
386
|
+
type OfflinePaymentMethodEnum =
|
|
380
387
|
| 'no_preference'
|
|
381
388
|
| 'cash'
|
|
382
389
|
| 'check'
|
|
@@ -390,21 +397,21 @@ declare module 'chargebee' {
|
|
|
390
397
|
| 'jp_automated_bank_transfer'
|
|
391
398
|
| 'mx_automated_bank_transfer'
|
|
392
399
|
| 'custom';
|
|
393
|
-
type
|
|
400
|
+
type OnEventEnum =
|
|
394
401
|
| 'subscription_creation'
|
|
395
402
|
| 'subscription_trial_start'
|
|
396
403
|
| 'plan_activation'
|
|
397
404
|
| 'subscription_activation'
|
|
398
405
|
| 'contract_termination';
|
|
399
|
-
type
|
|
400
|
-
type
|
|
401
|
-
type
|
|
406
|
+
type OperationEnum = 'create' | 'update' | 'delete';
|
|
407
|
+
type OperationTypeEnum = 'add' | 'remove';
|
|
408
|
+
type PauseOptionEnum =
|
|
402
409
|
| 'immediately'
|
|
403
410
|
| 'end_of_term'
|
|
404
411
|
| 'specific_date'
|
|
405
412
|
| 'billing_cycles';
|
|
406
|
-
type
|
|
407
|
-
type
|
|
413
|
+
type PaymentInitiatorEnum = 'customer' | 'merchant';
|
|
414
|
+
type PaymentMethodEnum =
|
|
408
415
|
| 'cash'
|
|
409
416
|
| 'check'
|
|
410
417
|
| 'bank_transfer'
|
|
@@ -437,7 +444,7 @@ declare module 'chargebee' {
|
|
|
437
444
|
| 'automated_bank_transfer'
|
|
438
445
|
| 'klarna_pay_now'
|
|
439
446
|
| 'online_banking_poland';
|
|
440
|
-
type
|
|
447
|
+
type PaymentMethodTypeEnum =
|
|
441
448
|
| 'card'
|
|
442
449
|
| 'paypal_express_checkout'
|
|
443
450
|
| 'amazon_payments'
|
|
@@ -462,28 +469,31 @@ declare module 'chargebee' {
|
|
|
462
469
|
| 'automated_bank_transfer'
|
|
463
470
|
| 'klarna_pay_now'
|
|
464
471
|
| 'online_banking_poland';
|
|
465
|
-
type
|
|
466
|
-
type
|
|
467
|
-
type
|
|
468
|
-
type
|
|
472
|
+
type PaymentVoucherTypeEnum = 'boleto';
|
|
473
|
+
type PeriodUnitEnum = 'day' | 'week' | 'month' | 'year';
|
|
474
|
+
type PriceTypeEnum = 'tax_exclusive' | 'tax_inclusive';
|
|
475
|
+
type PricingModelEnum =
|
|
469
476
|
| 'flat_fee'
|
|
470
477
|
| 'per_unit'
|
|
471
478
|
| 'tiered'
|
|
472
479
|
| 'volume'
|
|
473
480
|
| 'stairstep';
|
|
474
|
-
type
|
|
475
|
-
type
|
|
476
|
-
|
|
481
|
+
type ProrationTypeEnum = 'full_term' | 'partial_term' | 'none';
|
|
482
|
+
type ReferralSystemEnum =
|
|
483
|
+
| 'referral_candy'
|
|
484
|
+
| 'referral_saasquatch'
|
|
485
|
+
| 'friendbuy';
|
|
486
|
+
type ReferrerRewardTypeEnum =
|
|
477
487
|
| 'none'
|
|
478
488
|
| 'referral_direct_reward'
|
|
479
489
|
| 'custom_promotional_credit'
|
|
480
490
|
| 'custom_revenue_percent_based';
|
|
481
|
-
type
|
|
482
|
-
type
|
|
483
|
-
type
|
|
484
|
-
type
|
|
485
|
-
type
|
|
486
|
-
type
|
|
491
|
+
type RefundableCreditsHandlingEnum = 'no_action' | 'schedule_refund';
|
|
492
|
+
type ReportByEnum = 'customer' | 'invoice' | 'product' | 'subscription';
|
|
493
|
+
type ResumeOptionEnum = 'immediately' | 'specific_date';
|
|
494
|
+
type RoleEnum = 'primary' | 'backup' | 'none';
|
|
495
|
+
type ScheduleTypeEnum = 'immediate' | 'specific_dates' | 'fixed_intervals';
|
|
496
|
+
type SourceEnum =
|
|
487
497
|
| 'admin_console'
|
|
488
498
|
| 'api'
|
|
489
499
|
| 'bulk_operation'
|
|
@@ -495,7 +505,7 @@ declare module 'chargebee' {
|
|
|
495
505
|
| 'js_api'
|
|
496
506
|
| 'migration'
|
|
497
507
|
| 'external_service';
|
|
498
|
-
type
|
|
508
|
+
type TaxExemptReasonEnum =
|
|
499
509
|
| 'tax_not_configured'
|
|
500
510
|
| 'region_non_taxable'
|
|
501
511
|
| 'export'
|
|
@@ -506,7 +516,7 @@ declare module 'chargebee' {
|
|
|
506
516
|
| 'high_value_physical_goods'
|
|
507
517
|
| 'zero_value_item'
|
|
508
518
|
| 'tax_not_configured_external_provider';
|
|
509
|
-
type
|
|
519
|
+
type TaxJurisTypeEnum =
|
|
510
520
|
| 'country'
|
|
511
521
|
| 'federal'
|
|
512
522
|
| 'state'
|
|
@@ -515,15 +525,15 @@ declare module 'chargebee' {
|
|
|
515
525
|
| 'special'
|
|
516
526
|
| 'unincorporated'
|
|
517
527
|
| 'other';
|
|
518
|
-
type
|
|
519
|
-
type
|
|
520
|
-
type
|
|
521
|
-
type
|
|
528
|
+
type TaxOverrideReasonEnum = 'id_exempt' | 'customer_exempt' | 'export';
|
|
529
|
+
type TaxabilityEnum = 'taxable' | 'exempt';
|
|
530
|
+
type TaxjarExemptionCategoryEnum = 'wholesale' | 'government' | 'other';
|
|
531
|
+
type TrialEndActionEnum =
|
|
522
532
|
| 'site_default'
|
|
523
533
|
| 'plan_default'
|
|
524
534
|
| 'activate_subscription'
|
|
525
535
|
| 'cancel_subscription';
|
|
526
|
-
type
|
|
536
|
+
type TypeEnum =
|
|
527
537
|
| 'card'
|
|
528
538
|
| 'paypal_express_checkout'
|
|
529
539
|
| 'amazon_payments'
|
|
@@ -548,14 +558,17 @@ declare module 'chargebee' {
|
|
|
548
558
|
| 'automated_bank_transfer'
|
|
549
559
|
| 'klarna_pay_now'
|
|
550
560
|
| 'online_banking_poland';
|
|
551
|
-
type
|
|
552
|
-
type
|
|
553
|
-
type
|
|
554
|
-
type
|
|
561
|
+
type UnbilledChargesHandlingEnum = 'no_action' | 'invoice';
|
|
562
|
+
type UnbilledChargesOptionEnum = 'invoice' | 'delete';
|
|
563
|
+
type UnpaidInvoicesHandlingEnum = 'no_action' | 'schedule_payment_collection';
|
|
564
|
+
type UsageAccumulationResetFrequencyEnum =
|
|
565
|
+
| 'never'
|
|
566
|
+
| 'subscription_billing_frequency';
|
|
567
|
+
type ValidationStatusEnum =
|
|
555
568
|
| 'not_validated'
|
|
556
569
|
| 'valid'
|
|
557
570
|
| 'partially_valid'
|
|
558
571
|
| 'invalid';
|
|
559
|
-
type
|
|
560
|
-
type
|
|
572
|
+
type VoucherTypeEnum = 'boleto';
|
|
573
|
+
type ChargeOnEnum = 'immediately' | 'on_event';
|
|
561
574
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
///<reference path='./resources/PaymentIntent.d.ts' />
|
|
46
46
|
///<reference path='./resources/PaymentReferenceNumber.d.ts' />
|
|
47
47
|
///<reference path='./resources/PaymentSchedule.d.ts' />
|
|
48
|
+
///<reference path='./resources/PaymentScheduleEstimate.d.ts' />
|
|
48
49
|
///<reference path='./resources/PaymentScheduleScheme.d.ts' />
|
|
49
50
|
///<reference path='./resources/PaymentSource.d.ts' />
|
|
50
51
|
///<reference path='./resources/PaymentVoucher.d.ts' />
|
|
@@ -17,7 +17,7 @@ declare module 'chargebee' {
|
|
|
17
17
|
state?: string;
|
|
18
18
|
country?: string;
|
|
19
19
|
zip?: string;
|
|
20
|
-
validation_status?:
|
|
20
|
+
validation_status?: ValidationStatusEnum;
|
|
21
21
|
subscription_id: string;
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -65,7 +65,7 @@ declare module 'chargebee' {
|
|
|
65
65
|
state?: string;
|
|
66
66
|
zip?: string;
|
|
67
67
|
country?: string;
|
|
68
|
-
validation_status?:
|
|
68
|
+
validation_status?: ValidationStatusEnum;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -11,7 +11,7 @@ declare module 'chargebee' {
|
|
|
11
11
|
|
|
12
12
|
export namespace AdvanceInvoiceSchedule {
|
|
13
13
|
export interface FixedIntervalSchedule {
|
|
14
|
-
end_schedule_on?:
|
|
14
|
+
end_schedule_on?: EndScheduleOnEnum;
|
|
15
15
|
number_of_occurrences?: number;
|
|
16
16
|
days_before_renewal?: number;
|
|
17
17
|
end_date?: number;
|
|
@@ -11,12 +11,12 @@ declare module 'chargebee' {
|
|
|
11
11
|
quantity?: number;
|
|
12
12
|
quantity_in_decimal?: string;
|
|
13
13
|
billing_cycles?: number;
|
|
14
|
-
charge_on_event:
|
|
14
|
+
charge_on_event: ChargeOnEventEnum;
|
|
15
15
|
charge_once: boolean;
|
|
16
16
|
created_at: number;
|
|
17
17
|
resource_version?: number;
|
|
18
18
|
updated_at?: number;
|
|
19
|
-
channel?:
|
|
19
|
+
channel?: ChannelEnum;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export namespace AttachedItem {
|
|
@@ -82,7 +82,7 @@ declare module 'chargebee' {
|
|
|
82
82
|
billing_cycles?: number;
|
|
83
83
|
quantity?: number;
|
|
84
84
|
quantity_in_decimal?: string;
|
|
85
|
-
charge_on_event?:
|
|
85
|
+
charge_on_event?: ChargeOnEventEnum;
|
|
86
86
|
charge_once?: boolean;
|
|
87
87
|
}
|
|
88
88
|
export interface UpdateInputParam {
|
|
@@ -91,7 +91,7 @@ declare module 'chargebee' {
|
|
|
91
91
|
billing_cycles?: number;
|
|
92
92
|
quantity?: number;
|
|
93
93
|
quantity_in_decimal?: string;
|
|
94
|
-
charge_on_event?:
|
|
94
|
+
charge_on_event?: ChargeOnEventEnum;
|
|
95
95
|
charge_once?: boolean;
|
|
96
96
|
}
|
|
97
97
|
export interface RetrieveInputParam {
|
|
@@ -5,7 +5,7 @@ declare module 'chargebee' {
|
|
|
5
5
|
export interface Card {
|
|
6
6
|
payment_source_id: string;
|
|
7
7
|
status: 'valid' | 'expiring' | 'expired';
|
|
8
|
-
gateway:
|
|
8
|
+
gateway: GatewayEnum;
|
|
9
9
|
gateway_account_id?: string;
|
|
10
10
|
ref_tx_id?: string;
|
|
11
11
|
first_name?: string;
|
|
@@ -31,6 +31,8 @@ declare module 'chargebee' {
|
|
|
31
31
|
| 'carnet'
|
|
32
32
|
| 'rupay'
|
|
33
33
|
| 'maestro'
|
|
34
|
+
| 'dankort'
|
|
35
|
+
| 'cartes_bancaires'
|
|
34
36
|
| 'other'
|
|
35
37
|
| 'not_applicable';
|
|
36
38
|
funding_type:
|
|
@@ -126,7 +128,7 @@ declare module 'chargebee' {
|
|
|
126
128
|
* @deprecated Please refer API docs to use other attributes
|
|
127
129
|
*/
|
|
128
130
|
|
|
129
|
-
gateway?:
|
|
131
|
+
gateway?: GatewayEnum;
|
|
130
132
|
gateway_account_id?: string;
|
|
131
133
|
tmp_token?: string;
|
|
132
134
|
first_name?: string;
|
|
@@ -153,7 +155,7 @@ declare module 'chargebee' {
|
|
|
153
155
|
* @deprecated Please refer API docs to use other attributes
|
|
154
156
|
*/
|
|
155
157
|
|
|
156
|
-
gateway?:
|
|
158
|
+
gateway?: GatewayEnum;
|
|
157
159
|
gateway_account_id: string;
|
|
158
160
|
}
|
|
159
161
|
export interface CopyCardForCustomerInputParam {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
declare module 'chargebee' {
|
|
5
5
|
export interface Comment {
|
|
6
6
|
id: string;
|
|
7
|
-
entity_type:
|
|
7
|
+
entity_type: EntityTypeEnum;
|
|
8
8
|
added_by?: string;
|
|
9
9
|
notes: string;
|
|
10
10
|
created_at: number;
|
|
@@ -56,7 +56,7 @@ declare module 'chargebee' {
|
|
|
56
56
|
//---------------
|
|
57
57
|
|
|
58
58
|
export interface CreateInputParam {
|
|
59
|
-
entity_type:
|
|
59
|
+
entity_type: EntityTypeEnum;
|
|
60
60
|
entity_id: string;
|
|
61
61
|
notes: string;
|
|
62
62
|
added_by?: string;
|
|
@@ -7,7 +7,7 @@ declare module 'chargebee' {
|
|
|
7
7
|
id: string;
|
|
8
8
|
name: string;
|
|
9
9
|
invoice_name?: string;
|
|
10
|
-
discount_type: 'fixed_amount' | 'percentage';
|
|
10
|
+
discount_type: 'fixed_amount' | 'percentage' | 'offer_quantity';
|
|
11
11
|
discount_percentage?: number;
|
|
12
12
|
discount_amount?: number;
|
|
13
13
|
discount_quantity?: number;
|
|
@@ -31,7 +31,7 @@ declare module 'chargebee' {
|
|
|
31
31
|
updated_at?: number;
|
|
32
32
|
included_in_mrr?: boolean;
|
|
33
33
|
period?: number;
|
|
34
|
-
period_unit?:
|
|
34
|
+
period_unit?: PeriodUnitEnum;
|
|
35
35
|
plan_ids?: string[];
|
|
36
36
|
addon_ids?: string[];
|
|
37
37
|
item_constraints?: Coupon.ItemConstraint[];
|
|
@@ -152,7 +152,7 @@ declare module 'chargebee' {
|
|
|
152
152
|
id: string;
|
|
153
153
|
name: string;
|
|
154
154
|
invoice_name?: string;
|
|
155
|
-
discount_type?: 'fixed_amount' | 'percentage';
|
|
155
|
+
discount_type?: 'fixed_amount' | 'percentage' | 'offer_quantity';
|
|
156
156
|
discount_amount?: number;
|
|
157
157
|
currency_code?: string;
|
|
158
158
|
discount_percentage?: number /**
|
|
@@ -169,7 +169,7 @@ declare module 'chargebee' {
|
|
|
169
169
|
meta_data?: any;
|
|
170
170
|
included_in_mrr?: boolean;
|
|
171
171
|
period?: number;
|
|
172
|
-
period_unit?:
|
|
172
|
+
period_unit?: PeriodUnitEnum;
|
|
173
173
|
plan_constraint?: 'none' | 'all' | 'specific';
|
|
174
174
|
addon_constraint?: 'none' | 'all' | 'specific';
|
|
175
175
|
plan_ids?: string[];
|
|
@@ -180,7 +180,7 @@ declare module 'chargebee' {
|
|
|
180
180
|
id: string;
|
|
181
181
|
name: string;
|
|
182
182
|
invoice_name?: string;
|
|
183
|
-
discount_type?: 'fixed_amount' | 'percentage';
|
|
183
|
+
discount_type?: 'fixed_amount' | 'percentage' | 'offer_quantity';
|
|
184
184
|
discount_amount?: number;
|
|
185
185
|
currency_code?: string;
|
|
186
186
|
discount_percentage?: number /**
|
|
@@ -197,7 +197,7 @@ declare module 'chargebee' {
|
|
|
197
197
|
meta_data?: any;
|
|
198
198
|
included_in_mrr?: boolean;
|
|
199
199
|
period?: number;
|
|
200
|
-
period_unit?:
|
|
200
|
+
period_unit?: PeriodUnitEnum;
|
|
201
201
|
status?: 'active' | 'archived';
|
|
202
202
|
item_constraints?: ItemConstraintsCreateForItemsInputParam[];
|
|
203
203
|
item_constraint_criteria?: ItemConstraintCriteriaCreateForItemsInputParam[];
|
|
@@ -207,7 +207,7 @@ declare module 'chargebee' {
|
|
|
207
207
|
export interface UpdateForItemsInputParam {
|
|
208
208
|
name?: string;
|
|
209
209
|
invoice_name?: string;
|
|
210
|
-
discount_type?: 'fixed_amount' | 'percentage';
|
|
210
|
+
discount_type?: 'fixed_amount' | 'percentage' | 'offer_quantity';
|
|
211
211
|
discount_amount?: number;
|
|
212
212
|
currency_code?: string;
|
|
213
213
|
discount_percentage?: number /**
|
|
@@ -224,7 +224,7 @@ declare module 'chargebee' {
|
|
|
224
224
|
meta_data?: any;
|
|
225
225
|
included_in_mrr?: boolean;
|
|
226
226
|
period?: number;
|
|
227
|
-
period_unit?:
|
|
227
|
+
period_unit?: PeriodUnitEnum;
|
|
228
228
|
item_constraints?: ItemConstraintsUpdateForItemsInputParam[];
|
|
229
229
|
item_constraint_criteria?: ItemConstraintCriteriaUpdateForItemsInputParam[];
|
|
230
230
|
coupon_constraints?: CouponConstraintsUpdateForItemsInputParam[];
|
|
@@ -249,7 +249,7 @@ declare module 'chargebee' {
|
|
|
249
249
|
export interface UpdateInputParam {
|
|
250
250
|
name?: string;
|
|
251
251
|
invoice_name?: string;
|
|
252
|
-
discount_type?: 'fixed_amount' | 'percentage';
|
|
252
|
+
discount_type?: 'fixed_amount' | 'percentage' | 'offer_quantity';
|
|
253
253
|
discount_amount?: number;
|
|
254
254
|
currency_code?: string;
|
|
255
255
|
discount_percentage?: number /**
|
|
@@ -266,7 +266,7 @@ declare module 'chargebee' {
|
|
|
266
266
|
meta_data?: any;
|
|
267
267
|
included_in_mrr?: boolean;
|
|
268
268
|
period?: number;
|
|
269
|
-
period_unit?:
|
|
269
|
+
period_unit?: PeriodUnitEnum;
|
|
270
270
|
plan_constraint?: 'none' | 'all' | 'specific';
|
|
271
271
|
addon_constraint?: 'none' | 'all' | 'specific';
|
|
272
272
|
plan_ids?: string[];
|