chargebee 3.0.0-beta.2 → 3.0.0-beta.4
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 +81 -0
- package/cjs/chargebee.cjs.js +1 -1
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +23 -10
- package/cjs/util.js +1 -1
- package/esm/chargebee.esm.js +1 -1
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +23 -10
- package/esm/util.js +1 -1
- package/package.json +2 -2
- package/types/core.d.ts +10 -7
- package/types/index.d.ts +6 -5
- package/types/resources/Card.d.ts +2 -0
- package/types/resources/Coupon.d.ts +8 -8
- package/types/resources/Customer.d.ts +3 -3
- package/types/resources/Estimate.d.ts +16 -0
- package/types/resources/Feature.d.ts +3 -3
- package/types/resources/Invoice.d.ts +15 -6
- package/types/resources/Item.d.ts +53 -2
- package/types/resources/ItemFamily.d.ts +3 -3
- package/types/resources/ItemPrice.d.ts +5 -2
- package/types/resources/NonSubscription.d.ts +48 -0
- package/types/resources/PaymentSchedule.d.ts +28 -0
- package/types/resources/PaymentScheduleEstimate.d.ts +25 -0
- package/types/resources/{InstallmentConfig.d.ts → PaymentScheduleScheme.d.ts} +13 -19
- package/types/resources/PaymentSource.d.ts +5 -1
- package/types/resources/PricingPageSession.d.ts +25 -0
- package/types/resources/Purchase.d.ts +5 -5
- package/types/resources/Quote.d.ts +1 -0
- package/types/resources/QuotedSubscription.d.ts +3 -0
- package/types/resources/Subscription.d.ts +14 -9
- package/types/resources/Installment.d.ts +0 -48
- package/types/resources/InstallmentDetail.d.ts +0 -26
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,84 @@
|
|
|
1
|
+
### v3.0.0-beta.4 (2024-10-18)
|
|
2
|
+
|
|
3
|
+
#### New Resource:
|
|
4
|
+
* PaymentScheduleEstimate has been added.
|
|
5
|
+
|
|
6
|
+
### New Attributes:
|
|
7
|
+
* payment_schedule_estimates has been added to Estimate.
|
|
8
|
+
* usage_accumulation_reset_frequency has been added to ItemPrice.
|
|
9
|
+
* name has been added to PaymentScheduleScheme.
|
|
10
|
+
* usage_accumulation_reset_frequency has been added to QuotedSubscription#SubscriptionItem.
|
|
11
|
+
* usage_accumulation_reset_frequency has been added to Subscription#SubscriptionItem.
|
|
12
|
+
|
|
13
|
+
### New Endpoints:
|
|
14
|
+
* Estimate#PaymentSchedule has been added.
|
|
15
|
+
|
|
16
|
+
### New Input Params:
|
|
17
|
+
* usage_accumulation_reset_frequency has been added to ItemPrice#CreateParams.
|
|
18
|
+
* usage_accumulation_reset_frequency has been added to ItemPrice#UpdateParams.
|
|
19
|
+
* discounts has been added to PricingPageSession#CreateForNewSubscriptionParams.
|
|
20
|
+
* discounts has been added to PricingPageSession#CreateForExistingSubscriptionParams.
|
|
21
|
+
* invoice_immediately has been added to Quote#ConvertParams.
|
|
22
|
+
|
|
23
|
+
### Bug Fixes:
|
|
24
|
+
* metadata field not working bug fixed.
|
|
25
|
+
|
|
26
|
+
### Dependency
|
|
27
|
+
* moved @types/node to devDependencies.
|
|
28
|
+
|
|
29
|
+
### v3.0.0-beta.3 (2024-09-20)
|
|
30
|
+
* * *
|
|
31
|
+
|
|
32
|
+
#### New Resource:
|
|
33
|
+
* PaymentScheduleScheme has been added.
|
|
34
|
+
* PaymentSchedule has been added.
|
|
35
|
+
|
|
36
|
+
### New Endpoints:
|
|
37
|
+
* Invoice#ApplyPaymentScheduleScheme has been added.
|
|
38
|
+
* Invoice#PaymentSchedules has been added.
|
|
39
|
+
|
|
40
|
+
### New Attributes
|
|
41
|
+
* bundle_items[] has been added to Items.
|
|
42
|
+
* bundle_configuration has been added to Items.
|
|
43
|
+
|
|
44
|
+
#### New Input parameters:
|
|
45
|
+
* bundle_configuration has been added to Items#CreateParams, Items#UpdateParams & Items#ListParams.
|
|
46
|
+
* bundle_items_to_add[] has been added to Items#CreateParams & Items#UpdateParams.
|
|
47
|
+
* bundle_items_to_update[] has been added to Items#UpdateParams.
|
|
48
|
+
* bundle_items_to_remove[] has been added to Items#UpdateParams.
|
|
49
|
+
* payment_schedule has been added to Purchase#CreateParams.
|
|
50
|
+
|
|
51
|
+
### New Enum Values:
|
|
52
|
+
* payment_schedules_created has been added to EventTypeEnum.
|
|
53
|
+
* payment_schedules_updated has been added to EventTypeEnum.
|
|
54
|
+
* payment_schedule_scheme_created has been added to EventTypeEnum.
|
|
55
|
+
* payment_schedule_scheme_deleted has been added to EventTypeEnum.
|
|
56
|
+
|
|
57
|
+
### Removed Resource:
|
|
58
|
+
* Installment has been removed.
|
|
59
|
+
* InstallmentConfig has been removed.
|
|
60
|
+
* InstallmentDetail has been removed.
|
|
61
|
+
|
|
62
|
+
### Removed Endpoints:
|
|
63
|
+
* Invoice#Installments has been removed.
|
|
64
|
+
|
|
65
|
+
### Removed Input parameters:
|
|
66
|
+
* installment_info has been removed from Purchase#CreateParams.
|
|
67
|
+
|
|
68
|
+
### Removed Enum Values:
|
|
69
|
+
* invoice_installments_created has been removed from EventTypeEnum.
|
|
70
|
+
* invoice_installment_updated has been removed from EventTypeEnum.
|
|
71
|
+
* installment_config_created has been removed from EventTypeEnum.
|
|
72
|
+
* installment_config_deleted has been removed from EventTypeEnum.
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
#### Bug Fixes:
|
|
76
|
+
* HttpClient wrong configuration fixed.
|
|
77
|
+
* Missed Resource Non-Subscription has been added.
|
|
78
|
+
|
|
79
|
+
#### Enhancements:
|
|
80
|
+
* Better type support for custom fields.
|
|
81
|
+
|
|
1
82
|
### v3.0.0-beta.2 (2024-08-29)
|
|
2
83
|
* * *
|
|
3
84
|
|
package/cjs/chargebee.cjs.js
CHANGED
|
@@ -4,7 +4,7 @@ const createChargebee_js_1 = require("./createChargebee.js");
|
|
|
4
4
|
const NodeClient_js_1 = require("./net/NodeClient.js");
|
|
5
5
|
const FetchClient_js_1 = require("./net/FetchClient.js");
|
|
6
6
|
//@ts-ignore
|
|
7
|
-
const httpClient = globalThis.fetch
|
|
7
|
+
const httpClient = !globalThis.fetch
|
|
8
8
|
? new NodeClient_js_1.NodeHttpClient()
|
|
9
9
|
: new FetchClient_js_1.FetchHttpClient();
|
|
10
10
|
const Chargebee = (0, createChargebee_js_1.CreateChargebee)(httpClient);
|
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.4',
|
|
15
15
|
port: DEFAULT_PORT,
|
|
16
16
|
timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
|
|
17
17
|
exportWaitInMillis: DEFAULT_EXPORT_WAIT,
|
|
@@ -373,11 +373,19 @@ exports.Endpoints = {
|
|
|
373
373
|
['writeOff', 'POST', '/invoices', '/write_off', true],
|
|
374
374
|
['delete', 'POST', '/invoices', '/delete', true],
|
|
375
375
|
['updateDetails', 'POST', '/invoices', '/update_details', true],
|
|
376
|
-
[
|
|
376
|
+
[
|
|
377
|
+
'applyPaymentScheduleScheme',
|
|
378
|
+
'POST',
|
|
379
|
+
'/invoices',
|
|
380
|
+
'/apply_payment_schedule_scheme',
|
|
381
|
+
true,
|
|
382
|
+
],
|
|
383
|
+
['paymentSchedules', 'GET', '/invoices', '/payment_schedules', true],
|
|
377
384
|
['resendEinvoice', 'POST', '/invoices', '/resend_einvoice', true],
|
|
378
385
|
['sendEinvoice', 'POST', '/invoices', '/send_einvoice', true],
|
|
379
386
|
],
|
|
380
387
|
paymentReferenceNumber: [],
|
|
388
|
+
paymentSchedule: [],
|
|
381
389
|
taxWithheld: [],
|
|
382
390
|
creditNote: [
|
|
383
391
|
['create', 'POST', '/credit_notes', null, false],
|
|
@@ -657,6 +665,7 @@ exports.Endpoints = {
|
|
|
657
665
|
'/create_invoice_for_items',
|
|
658
666
|
false,
|
|
659
667
|
],
|
|
668
|
+
['paymentSchedules', 'POST', '/estimates', '/payment_schedules', false],
|
|
660
669
|
],
|
|
661
670
|
quote: [
|
|
662
671
|
['retrieve', 'GET', '/quotes', null, true],
|
|
@@ -1000,6 +1009,15 @@ exports.Endpoints = {
|
|
|
1000
1009
|
],
|
|
1001
1010
|
['retrieveStoreSubs', 'POST', '/in_app_subscriptions', '/retrieve', true],
|
|
1002
1011
|
],
|
|
1012
|
+
nonSubscription: [
|
|
1013
|
+
[
|
|
1014
|
+
'processReceipt',
|
|
1015
|
+
'POST',
|
|
1016
|
+
'/non_subscriptions',
|
|
1017
|
+
'/one_time_purchase',
|
|
1018
|
+
true,
|
|
1019
|
+
],
|
|
1020
|
+
],
|
|
1003
1021
|
entitlementOverride: [
|
|
1004
1022
|
[
|
|
1005
1023
|
'addEntitlementOverrideForSubscription',
|
|
@@ -1057,16 +1075,11 @@ exports.Endpoints = {
|
|
|
1057
1075
|
['delete', 'POST', '/ramps', '/delete', true],
|
|
1058
1076
|
['list', 'GET', '/ramps', null, false],
|
|
1059
1077
|
],
|
|
1060
|
-
|
|
1061
|
-
['create', 'POST', '/
|
|
1062
|
-
['retrieve', 'GET', '/
|
|
1063
|
-
['delete', 'POST', '/
|
|
1064
|
-
],
|
|
1065
|
-
installment: [
|
|
1066
|
-
['retrieve', 'GET', '/installments', null, true],
|
|
1067
|
-
['list', 'GET', '/installments', null, false],
|
|
1078
|
+
paymentScheduleScheme: [
|
|
1079
|
+
['create', 'POST', '/payment_schedule_schemes', null, false],
|
|
1080
|
+
['retrieve', 'GET', '/payment_schedule_schemes', null, true],
|
|
1081
|
+
['delete', 'POST', '/payment_schedule_schemes', '/delete', true],
|
|
1068
1082
|
],
|
|
1069
|
-
installmentDetail: [],
|
|
1070
1083
|
pricingPageSession: [
|
|
1071
1084
|
[
|
|
1072
1085
|
'createForNewSubscription',
|
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/chargebee.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import { CreateChargebee } from './createChargebee.js';
|
|
|
2
2
|
import { NodeHttpClient } from './net/NodeClient.js';
|
|
3
3
|
import { FetchHttpClient } from './net/FetchClient.js';
|
|
4
4
|
//@ts-ignore
|
|
5
|
-
const httpClient = globalThis.fetch
|
|
5
|
+
const httpClient = !globalThis.fetch
|
|
6
6
|
? new NodeHttpClient()
|
|
7
7
|
: new FetchHttpClient();
|
|
8
8
|
const Chargebee = CreateChargebee(httpClient);
|
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.4',
|
|
12
12
|
port: DEFAULT_PORT,
|
|
13
13
|
timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
|
|
14
14
|
exportWaitInMillis: DEFAULT_EXPORT_WAIT,
|
|
@@ -370,11 +370,19 @@ export const Endpoints = {
|
|
|
370
370
|
['writeOff', 'POST', '/invoices', '/write_off', true],
|
|
371
371
|
['delete', 'POST', '/invoices', '/delete', true],
|
|
372
372
|
['updateDetails', 'POST', '/invoices', '/update_details', true],
|
|
373
|
-
[
|
|
373
|
+
[
|
|
374
|
+
'applyPaymentScheduleScheme',
|
|
375
|
+
'POST',
|
|
376
|
+
'/invoices',
|
|
377
|
+
'/apply_payment_schedule_scheme',
|
|
378
|
+
true,
|
|
379
|
+
],
|
|
380
|
+
['paymentSchedules', 'GET', '/invoices', '/payment_schedules', true],
|
|
374
381
|
['resendEinvoice', 'POST', '/invoices', '/resend_einvoice', true],
|
|
375
382
|
['sendEinvoice', 'POST', '/invoices', '/send_einvoice', true],
|
|
376
383
|
],
|
|
377
384
|
paymentReferenceNumber: [],
|
|
385
|
+
paymentSchedule: [],
|
|
378
386
|
taxWithheld: [],
|
|
379
387
|
creditNote: [
|
|
380
388
|
['create', 'POST', '/credit_notes', null, false],
|
|
@@ -654,6 +662,7 @@ export const Endpoints = {
|
|
|
654
662
|
'/create_invoice_for_items',
|
|
655
663
|
false,
|
|
656
664
|
],
|
|
665
|
+
['paymentSchedules', 'POST', '/estimates', '/payment_schedules', false],
|
|
657
666
|
],
|
|
658
667
|
quote: [
|
|
659
668
|
['retrieve', 'GET', '/quotes', null, true],
|
|
@@ -997,6 +1006,15 @@ export const Endpoints = {
|
|
|
997
1006
|
],
|
|
998
1007
|
['retrieveStoreSubs', 'POST', '/in_app_subscriptions', '/retrieve', true],
|
|
999
1008
|
],
|
|
1009
|
+
nonSubscription: [
|
|
1010
|
+
[
|
|
1011
|
+
'processReceipt',
|
|
1012
|
+
'POST',
|
|
1013
|
+
'/non_subscriptions',
|
|
1014
|
+
'/one_time_purchase',
|
|
1015
|
+
true,
|
|
1016
|
+
],
|
|
1017
|
+
],
|
|
1000
1018
|
entitlementOverride: [
|
|
1001
1019
|
[
|
|
1002
1020
|
'addEntitlementOverrideForSubscription',
|
|
@@ -1054,16 +1072,11 @@ export const Endpoints = {
|
|
|
1054
1072
|
['delete', 'POST', '/ramps', '/delete', true],
|
|
1055
1073
|
['list', 'GET', '/ramps', null, false],
|
|
1056
1074
|
],
|
|
1057
|
-
|
|
1058
|
-
['create', 'POST', '/
|
|
1059
|
-
['retrieve', 'GET', '/
|
|
1060
|
-
['delete', 'POST', '/
|
|
1061
|
-
],
|
|
1062
|
-
installment: [
|
|
1063
|
-
['retrieve', 'GET', '/installments', null, true],
|
|
1064
|
-
['list', 'GET', '/installments', null, false],
|
|
1075
|
+
paymentScheduleScheme: [
|
|
1076
|
+
['create', 'POST', '/payment_schedule_schemes', null, false],
|
|
1077
|
+
['retrieve', 'GET', '/payment_schedule_schemes', null, true],
|
|
1078
|
+
['delete', 'POST', '/payment_schedule_schemes', '/delete', true],
|
|
1065
1079
|
],
|
|
1066
|
-
installmentDetail: [],
|
|
1067
1080
|
pricingPageSession: [
|
|
1068
1081
|
[
|
|
1069
1082
|
'createForNewSubscription',
|
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.4",
|
|
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
|
@@ -189,10 +189,10 @@ declare module 'chargebee' {
|
|
|
189
189
|
| 'credit_note_created_with_backdating'
|
|
190
190
|
| 'credit_note_updated'
|
|
191
191
|
| 'credit_note_deleted'
|
|
192
|
-
| '
|
|
193
|
-
| '
|
|
194
|
-
| '
|
|
195
|
-
| '
|
|
192
|
+
| 'payment_schedules_created'
|
|
193
|
+
| 'payment_schedules_updated'
|
|
194
|
+
| 'payment_schedule_scheme_created'
|
|
195
|
+
| 'payment_schedule_scheme_deleted'
|
|
196
196
|
| 'subscription_renewal_reminder'
|
|
197
197
|
| 'add_usages_reminder'
|
|
198
198
|
| 'transaction_created'
|
|
@@ -294,9 +294,9 @@ declare module 'chargebee' {
|
|
|
294
294
|
| 'voucher_create_failed'
|
|
295
295
|
| 'item_price_entitlements_updated'
|
|
296
296
|
| 'item_price_entitlements_removed'
|
|
297
|
-
| '
|
|
298
|
-
| '
|
|
299
|
-
| '
|
|
297
|
+
| 'subscription_ramp_created'
|
|
298
|
+
| 'subscription_ramp_deleted'
|
|
299
|
+
| 'subscription_ramp_applied'
|
|
300
300
|
| 'subscription_ramp_drafted'
|
|
301
301
|
| 'subscription_ramp_updated'
|
|
302
302
|
| 'price_variant_created'
|
|
@@ -551,6 +551,9 @@ declare module 'chargebee' {
|
|
|
551
551
|
type UnbilledChargesHandling = 'no_action' | 'invoice';
|
|
552
552
|
type UnbilledChargesOption = 'invoice' | 'delete';
|
|
553
553
|
type UnpaidInvoicesHandling = 'no_action' | 'schedule_payment_collection';
|
|
554
|
+
type UsageAccumulationResetFrequency =
|
|
555
|
+
| 'never'
|
|
556
|
+
| 'subscription_billing_frequency';
|
|
554
557
|
type ValidationStatus =
|
|
555
558
|
| 'not_validated'
|
|
556
559
|
| 'valid'
|
package/types/index.d.ts
CHANGED
|
@@ -33,9 +33,6 @@
|
|
|
33
33
|
///<reference path='./resources/ImpactedItemPrice.d.ts' />
|
|
34
34
|
///<reference path='./resources/ImpactedSubscription.d.ts' />
|
|
35
35
|
///<reference path='./resources/InAppSubscription.d.ts' />
|
|
36
|
-
///<reference path='./resources/Installment.d.ts' />
|
|
37
|
-
///<reference path='./resources/InstallmentConfig.d.ts' />
|
|
38
|
-
///<reference path='./resources/InstallmentDetail.d.ts' />
|
|
39
36
|
///<reference path='./resources/Invoice.d.ts' />
|
|
40
37
|
///<reference path='./resources/InvoiceEstimate.d.ts' />
|
|
41
38
|
///<reference path='./resources/Item.d.ts' />
|
|
@@ -43,9 +40,13 @@
|
|
|
43
40
|
///<reference path='./resources/ItemFamily.d.ts' />
|
|
44
41
|
///<reference path='./resources/ItemPrice.d.ts' />
|
|
45
42
|
///<reference path='./resources/Metadata.d.ts' />
|
|
43
|
+
///<reference path='./resources/NonSubscription.d.ts' />
|
|
46
44
|
///<reference path='./resources/Order.d.ts' />
|
|
47
45
|
///<reference path='./resources/PaymentIntent.d.ts' />
|
|
48
46
|
///<reference path='./resources/PaymentReferenceNumber.d.ts' />
|
|
47
|
+
///<reference path='./resources/PaymentSchedule.d.ts' />
|
|
48
|
+
///<reference path='./resources/PaymentScheduleEstimate.d.ts' />
|
|
49
|
+
///<reference path='./resources/PaymentScheduleScheme.d.ts' />
|
|
49
50
|
///<reference path='./resources/PaymentSource.d.ts' />
|
|
50
51
|
///<reference path='./resources/PaymentVoucher.d.ts' />
|
|
51
52
|
///<reference path='./resources/PortalSession.d.ts' />
|
|
@@ -135,15 +136,15 @@ declare module 'chargebee' {
|
|
|
135
136
|
gift: Gift.GiftResource;
|
|
136
137
|
hostedPage: HostedPage.HostedPageResource;
|
|
137
138
|
inAppSubscription: InAppSubscription.InAppSubscriptionResource;
|
|
138
|
-
installment: Installment.InstallmentResource;
|
|
139
|
-
installmentConfig: InstallmentConfig.InstallmentConfigResource;
|
|
140
139
|
invoice: Invoice.InvoiceResource;
|
|
141
140
|
item: Item.ItemResource;
|
|
142
141
|
itemEntitlement: ItemEntitlement.ItemEntitlementResource;
|
|
143
142
|
itemFamily: ItemFamily.ItemFamilyResource;
|
|
144
143
|
itemPrice: ItemPrice.ItemPriceResource;
|
|
144
|
+
nonSubscription: NonSubscription.NonSubscriptionResource;
|
|
145
145
|
order: Order.OrderResource;
|
|
146
146
|
paymentIntent: PaymentIntent.PaymentIntentResource;
|
|
147
|
+
paymentScheduleScheme: PaymentScheduleScheme.PaymentScheduleSchemeResource;
|
|
147
148
|
paymentSource: PaymentSource.PaymentSourceResource;
|
|
148
149
|
paymentVoucher: PaymentVoucher.PaymentVoucherResource;
|
|
149
150
|
portalSession: PortalSession.PortalSessionResource;
|
|
@@ -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;
|
|
@@ -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 /**
|
|
@@ -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 /**
|
|
@@ -202,12 +202,12 @@ declare module 'chargebee' {
|
|
|
202
202
|
item_constraints?: ItemConstraintsCreateForItemsInputParam[];
|
|
203
203
|
item_constraint_criteria?: ItemConstraintCriteriaCreateForItemsInputParam[];
|
|
204
204
|
coupon_constraints?: CouponConstraintsCreateForItemsInputParam[];
|
|
205
|
-
[key: string]: unknown;
|
|
205
|
+
[key: `cf_${string}`]: unknown;
|
|
206
206
|
}
|
|
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 /**
|
|
@@ -228,7 +228,7 @@ declare module 'chargebee' {
|
|
|
228
228
|
item_constraints?: ItemConstraintsUpdateForItemsInputParam[];
|
|
229
229
|
item_constraint_criteria?: ItemConstraintCriteriaUpdateForItemsInputParam[];
|
|
230
230
|
coupon_constraints?: CouponConstraintsUpdateForItemsInputParam[];
|
|
231
|
-
[key: string]: unknown;
|
|
231
|
+
[key: `cf_${string}`]: unknown;
|
|
232
232
|
}
|
|
233
233
|
export interface ListInputParam {
|
|
234
234
|
limit?: number;
|
|
@@ -244,12 +244,12 @@ declare module 'chargebee' {
|
|
|
244
244
|
currency_code?: filter.String;
|
|
245
245
|
'sort_by[asc]'?: string;
|
|
246
246
|
'sort_by[desc]'?: string;
|
|
247
|
-
[key: string]: unknown;
|
|
247
|
+
[key: `cf_${string}`]: unknown;
|
|
248
248
|
}
|
|
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 /**
|
|
@@ -480,7 +480,7 @@ declare module 'chargebee' {
|
|
|
480
480
|
billing_address?: BillingAddressCreateInputParam;
|
|
481
481
|
entity_identifiers?: EntityIdentifiersCreateInputParam[];
|
|
482
482
|
tax_providers_fields?: TaxProvidersFieldsCreateInputParam[];
|
|
483
|
-
[key: string]: unknown;
|
|
483
|
+
[key: `cf_${string}`]: unknown;
|
|
484
484
|
}
|
|
485
485
|
export interface ListInputParam {
|
|
486
486
|
limit?: number;
|
|
@@ -503,7 +503,7 @@ declare module 'chargebee' {
|
|
|
503
503
|
business_entity_id?: filter.String;
|
|
504
504
|
'sort_by[asc]'?: string;
|
|
505
505
|
'sort_by[desc]'?: string;
|
|
506
|
-
[key: string]: unknown;
|
|
506
|
+
[key: `cf_${string}`]: unknown;
|
|
507
507
|
}
|
|
508
508
|
export interface UpdateInputParam {
|
|
509
509
|
first_name?: string;
|
|
@@ -530,7 +530,7 @@ declare module 'chargebee' {
|
|
|
530
530
|
fraud_flag?: 'safe' | 'fraudulent';
|
|
531
531
|
consolidated_invoicing?: boolean;
|
|
532
532
|
tax_providers_fields?: TaxProvidersFieldsUpdateInputParam[];
|
|
533
|
-
[key: string]: unknown;
|
|
533
|
+
[key: `cf_${string}`]: unknown;
|
|
534
534
|
}
|
|
535
535
|
export interface UpdatePaymentMethodInputParam {
|
|
536
536
|
payment_method?: PaymentMethodUpdatePaymentMethodInputParam;
|
|
@@ -8,6 +8,7 @@ declare module 'chargebee' {
|
|
|
8
8
|
subscription_estimates?: SubscriptionEstimate[];
|
|
9
9
|
invoice_estimate?: InvoiceEstimate;
|
|
10
10
|
invoice_estimates?: InvoiceEstimate[];
|
|
11
|
+
payment_schedule_estimates?: PaymentScheduleEstimate[];
|
|
11
12
|
next_invoice_estimate?: InvoiceEstimate;
|
|
12
13
|
credit_note_estimates?: CreditNoteEstimate[];
|
|
13
14
|
unbilled_charge_estimates?: UnbilledCharge[];
|
|
@@ -119,6 +120,11 @@ declare module 'chargebee' {
|
|
|
119
120
|
input: CreateInvoiceForItemsInputParam,
|
|
120
121
|
headers?: ChargebeeRequestHeader,
|
|
121
122
|
): Promise<ChargebeeResponse<CreateInvoiceForItemsResponse>>;
|
|
123
|
+
|
|
124
|
+
paymentSchedules(
|
|
125
|
+
input: PaymentSchedulesInputParam,
|
|
126
|
+
headers?: ChargebeeRequestHeader,
|
|
127
|
+
): Promise<ChargebeeResponse<PaymentSchedulesResponse>>;
|
|
122
128
|
}
|
|
123
129
|
|
|
124
130
|
export interface CreateSubscriptionResponse {
|
|
@@ -197,6 +203,10 @@ declare module 'chargebee' {
|
|
|
197
203
|
estimate: Estimate;
|
|
198
204
|
}
|
|
199
205
|
|
|
206
|
+
export interface PaymentSchedulesResponse {
|
|
207
|
+
estimate: Estimate;
|
|
208
|
+
}
|
|
209
|
+
|
|
200
210
|
// REQUEST PARAMS
|
|
201
211
|
//---------------
|
|
202
212
|
|
|
@@ -444,6 +454,12 @@ declare module 'chargebee' {
|
|
|
444
454
|
discounts?: DiscountsCreateInvoiceForItemsInputParam[];
|
|
445
455
|
tax_providers_fields?: TaxProvidersFieldsCreateInvoiceForItemsInputParam[];
|
|
446
456
|
}
|
|
457
|
+
export interface PaymentSchedulesInputParam {
|
|
458
|
+
scheme_id: string;
|
|
459
|
+
amount?: number;
|
|
460
|
+
invoice_id?: string;
|
|
461
|
+
payment_schedule_start_date?: number;
|
|
462
|
+
}
|
|
447
463
|
export interface BillingAddressCreateSubscriptionInputParam {
|
|
448
464
|
line1?: string;
|
|
449
465
|
line2?: string;
|
|
@@ -108,7 +108,7 @@ declare module 'chargebee' {
|
|
|
108
108
|
id?: filter.String;
|
|
109
109
|
status?: filter.Enum;
|
|
110
110
|
type?: filter.Enum;
|
|
111
|
-
[key: string]: unknown;
|
|
111
|
+
[key: `cf_${string}`]: unknown;
|
|
112
112
|
}
|
|
113
113
|
export interface CreateInputParam {
|
|
114
114
|
id?: string;
|
|
@@ -117,14 +117,14 @@ declare module 'chargebee' {
|
|
|
117
117
|
type?: 'switch' | 'custom' | 'quantity' | 'range';
|
|
118
118
|
unit?: string;
|
|
119
119
|
levels?: LevelsCreateInputParam[];
|
|
120
|
-
[key: string]: unknown;
|
|
120
|
+
[key: `cf_${string}`]: unknown;
|
|
121
121
|
}
|
|
122
122
|
export interface UpdateInputParam {
|
|
123
123
|
name?: string;
|
|
124
124
|
description?: string;
|
|
125
125
|
unit?: string;
|
|
126
126
|
levels?: LevelsUpdateInputParam[];
|
|
127
|
-
[key: string]: unknown;
|
|
127
|
+
[key: `cf_${string}`]: unknown;
|
|
128
128
|
}
|
|
129
129
|
export interface LevelsCreateInputParam {
|
|
130
130
|
name?: string;
|
|
@@ -272,11 +272,16 @@ declare module 'chargebee' {
|
|
|
272
272
|
headers?: ChargebeeRequestHeader,
|
|
273
273
|
): Promise<ChargebeeResponse<UpdateDetailsResponse>>;
|
|
274
274
|
|
|
275
|
-
|
|
275
|
+
applyPaymentScheduleScheme(
|
|
276
276
|
invoice_id: string,
|
|
277
|
-
input:
|
|
277
|
+
input: ApplyPaymentScheduleSchemeInputParam,
|
|
278
278
|
headers?: ChargebeeRequestHeader,
|
|
279
|
-
): Promise<ChargebeeResponse<
|
|
279
|
+
): Promise<ChargebeeResponse<ApplyPaymentScheduleSchemeResponse>>;
|
|
280
|
+
|
|
281
|
+
paymentSchedules(
|
|
282
|
+
invoice_id: string,
|
|
283
|
+
headers?: ChargebeeRequestHeader,
|
|
284
|
+
): Promise<ChargebeeResponse<PaymentSchedulesResponse>>;
|
|
280
285
|
|
|
281
286
|
resendEinvoice(
|
|
282
287
|
invoice_id: string,
|
|
@@ -440,10 +445,14 @@ declare module 'chargebee' {
|
|
|
440
445
|
invoice: Invoice;
|
|
441
446
|
}
|
|
442
447
|
|
|
443
|
-
export interface
|
|
448
|
+
export interface ApplyPaymentScheduleSchemeResponse {
|
|
444
449
|
invoice: Invoice;
|
|
445
450
|
}
|
|
446
451
|
|
|
452
|
+
export interface PaymentSchedulesResponse {
|
|
453
|
+
payment_schedules: PaymentSchedule[];
|
|
454
|
+
}
|
|
455
|
+
|
|
447
456
|
export interface ResendEinvoiceResponse {
|
|
448
457
|
invoice: Invoice;
|
|
449
458
|
}
|
|
@@ -1062,8 +1071,8 @@ declare module 'chargebee' {
|
|
|
1062
1071
|
shipping_address?: ShippingAddressUpdateDetailsInputParam;
|
|
1063
1072
|
statement_descriptor?: StatementDescriptorUpdateDetailsInputParam;
|
|
1064
1073
|
}
|
|
1065
|
-
export interface
|
|
1066
|
-
|
|
1074
|
+
export interface ApplyPaymentScheduleSchemeInputParam {
|
|
1075
|
+
scheme_id: string;
|
|
1067
1076
|
amount?: number;
|
|
1068
1077
|
}
|
|
1069
1078
|
export interface StatementDescriptorCreateInputParam {
|
|
@@ -27,6 +27,8 @@ declare module 'chargebee' {
|
|
|
27
27
|
archived_at?: number;
|
|
28
28
|
channel?: Channel;
|
|
29
29
|
applicable_items?: Item.ApplicableItem[];
|
|
30
|
+
bundle_items?: Item.BundleItem[];
|
|
31
|
+
bundle_configuration?: Item.BundleConfiguration;
|
|
30
32
|
metadata?: any;
|
|
31
33
|
}
|
|
32
34
|
|
|
@@ -83,6 +85,15 @@ declare module 'chargebee' {
|
|
|
83
85
|
export interface ApplicableItem {
|
|
84
86
|
id?: string;
|
|
85
87
|
}
|
|
88
|
+
export interface BundleItem {
|
|
89
|
+
item_id: string;
|
|
90
|
+
item_type?: 'plan' | 'addon' | 'charge';
|
|
91
|
+
quantity?: number;
|
|
92
|
+
price_allocation?: number;
|
|
93
|
+
}
|
|
94
|
+
export interface BundleConfiguration {
|
|
95
|
+
type?: 'fixed';
|
|
96
|
+
}
|
|
86
97
|
// REQUEST PARAMS
|
|
87
98
|
//---------------
|
|
88
99
|
|
|
@@ -106,7 +117,9 @@ declare module 'chargebee' {
|
|
|
106
117
|
metered?: boolean;
|
|
107
118
|
usage_calculation?: 'sum_of_usages' | 'last_usage' | 'max_usage';
|
|
108
119
|
metadata?: any;
|
|
109
|
-
|
|
120
|
+
bundle_configuration?: BundleConfigurationCreateInputParam;
|
|
121
|
+
bundle_items_to_add?: BundleItemsToAddCreateInputParam[];
|
|
122
|
+
[key: `cf_${string}`]: unknown;
|
|
110
123
|
}
|
|
111
124
|
export interface UpdateInputParam {
|
|
112
125
|
name?: string;
|
|
@@ -128,11 +141,16 @@ declare module 'chargebee' {
|
|
|
128
141
|
metadata?: any;
|
|
129
142
|
included_in_mrr?: boolean;
|
|
130
143
|
status?: 'active' | 'archived';
|
|
131
|
-
|
|
144
|
+
bundle_configuration?: BundleConfigurationUpdateInputParam;
|
|
145
|
+
bundle_items_to_add?: BundleItemsToAddUpdateInputParam[];
|
|
146
|
+
bundle_items_to_update?: BundleItemsToUpdateUpdateInputParam[];
|
|
147
|
+
bundle_items_to_remove?: BundleItemsToRemoveUpdateInputParam[];
|
|
148
|
+
[key: `cf_${string}`]: unknown;
|
|
132
149
|
}
|
|
133
150
|
export interface ListInputParam {
|
|
134
151
|
limit?: number;
|
|
135
152
|
offset?: string;
|
|
153
|
+
bundle_configuration?: BundleConfigurationItemListInputParam;
|
|
136
154
|
id?: filter.String;
|
|
137
155
|
item_family_id?: filter.String;
|
|
138
156
|
type?: filter.Enum;
|
|
@@ -149,5 +167,38 @@ declare module 'chargebee' {
|
|
|
149
167
|
'sort_by[asc]'?: string;
|
|
150
168
|
'sort_by[desc]'?: string;
|
|
151
169
|
}
|
|
170
|
+
export interface BundleConfigurationCreateInputParam {
|
|
171
|
+
type?: 'fixed';
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface BundleItemsToAddCreateInputParam {
|
|
175
|
+
item_id?: string;
|
|
176
|
+
item_type?: ItemType;
|
|
177
|
+
quantity?: number;
|
|
178
|
+
price_allocation?: number;
|
|
179
|
+
}
|
|
180
|
+
export interface BundleConfigurationUpdateInputParam {
|
|
181
|
+
type?: 'fixed';
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export interface BundleItemsToAddUpdateInputParam {
|
|
185
|
+
item_id?: string;
|
|
186
|
+
item_type?: ItemType;
|
|
187
|
+
quantity?: number;
|
|
188
|
+
price_allocation?: number;
|
|
189
|
+
}
|
|
190
|
+
export interface BundleItemsToUpdateUpdateInputParam {
|
|
191
|
+
item_id?: string;
|
|
192
|
+
item_type?: ItemType;
|
|
193
|
+
quantity?: number;
|
|
194
|
+
price_allocation?: number;
|
|
195
|
+
}
|
|
196
|
+
export interface BundleItemsToRemoveUpdateInputParam {
|
|
197
|
+
item_id?: string;
|
|
198
|
+
item_type?: ItemType;
|
|
199
|
+
}
|
|
200
|
+
export interface BundleConfigurationItemListInputParam {
|
|
201
|
+
type?: filter.Enum;
|
|
202
|
+
}
|
|
152
203
|
}
|
|
153
204
|
}
|
|
@@ -70,7 +70,7 @@ declare module 'chargebee' {
|
|
|
70
70
|
id: string;
|
|
71
71
|
name: string;
|
|
72
72
|
description?: string;
|
|
73
|
-
[key: string]: unknown;
|
|
73
|
+
[key: `cf_${string}`]: unknown;
|
|
74
74
|
}
|
|
75
75
|
export interface ListInputParam {
|
|
76
76
|
limit?: number;
|
|
@@ -78,12 +78,12 @@ declare module 'chargebee' {
|
|
|
78
78
|
id?: filter.String;
|
|
79
79
|
name?: filter.String;
|
|
80
80
|
updated_at?: filter.Timestamp;
|
|
81
|
-
[key: string]: unknown;
|
|
81
|
+
[key: `cf_${string}`]: unknown;
|
|
82
82
|
}
|
|
83
83
|
export interface UpdateInputParam {
|
|
84
84
|
name?: string;
|
|
85
85
|
description?: string;
|
|
86
|
-
[key: string]: unknown;
|
|
86
|
+
[key: `cf_${string}`]: unknown;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
}
|
|
@@ -34,6 +34,7 @@ declare module 'chargebee' {
|
|
|
34
34
|
resource_version?: number;
|
|
35
35
|
updated_at?: number;
|
|
36
36
|
created_at: number;
|
|
37
|
+
usage_accumulation_reset_frequency?: UsageAccumulationResetFrequency;
|
|
37
38
|
archived_at?: number;
|
|
38
39
|
invoice_notes?: string;
|
|
39
40
|
tiers?: ItemPrice.Tier[];
|
|
@@ -170,6 +171,7 @@ declare module 'chargebee' {
|
|
|
170
171
|
metadata?: any;
|
|
171
172
|
show_description_in_invoices?: boolean;
|
|
172
173
|
show_description_in_quotes?: boolean;
|
|
174
|
+
usage_accumulation_reset_frequency?: UsageAccumulationResetFrequency;
|
|
173
175
|
pricing_model?: PricingModel;
|
|
174
176
|
price?: number;
|
|
175
177
|
price_in_decimal?: string;
|
|
@@ -188,7 +190,7 @@ declare module 'chargebee' {
|
|
|
188
190
|
accounting_detail?: AccountingDetailCreateInputParam;
|
|
189
191
|
tiers?: TiersCreateInputParam[];
|
|
190
192
|
tax_providers_fields?: TaxProvidersFieldsCreateInputParam[];
|
|
191
|
-
[key: string]: unknown;
|
|
193
|
+
[key: `cf_${string}`]: unknown;
|
|
192
194
|
}
|
|
193
195
|
export interface UpdateInputParam {
|
|
194
196
|
name?: string;
|
|
@@ -197,6 +199,7 @@ declare module 'chargebee' {
|
|
|
197
199
|
price_variant_id?: string;
|
|
198
200
|
status?: 'active' | 'archived';
|
|
199
201
|
external_name?: string;
|
|
202
|
+
usage_accumulation_reset_frequency?: UsageAccumulationResetFrequency;
|
|
200
203
|
currency_code?: string;
|
|
201
204
|
invoice_notes?: string;
|
|
202
205
|
is_taxable?: boolean;
|
|
@@ -223,7 +226,7 @@ declare module 'chargebee' {
|
|
|
223
226
|
accounting_detail?: AccountingDetailUpdateInputParam;
|
|
224
227
|
tiers?: TiersUpdateInputParam[];
|
|
225
228
|
tax_providers_fields?: TaxProvidersFieldsUpdateInputParam[];
|
|
226
|
-
[key: string]: unknown;
|
|
229
|
+
[key: `cf_${string}`]: unknown;
|
|
227
230
|
}
|
|
228
231
|
export interface ListInputParam {
|
|
229
232
|
limit?: number;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
4
|
+
declare module 'chargebee' {
|
|
5
|
+
export interface NonSubscription {
|
|
6
|
+
app_id: string;
|
|
7
|
+
invoice_id: string;
|
|
8
|
+
customer_id?: string;
|
|
9
|
+
charge_id: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export namespace NonSubscription {
|
|
13
|
+
export class NonSubscriptionResource {
|
|
14
|
+
processReceipt(
|
|
15
|
+
non_subscription_app_id: string,
|
|
16
|
+
input: ProcessReceiptInputParam,
|
|
17
|
+
headers?: ChargebeeRequestHeader,
|
|
18
|
+
): Promise<ChargebeeResponse<ProcessReceiptResponse>>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ProcessReceiptResponse {
|
|
22
|
+
non_subscription: NonSubscription;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// REQUEST PARAMS
|
|
26
|
+
//---------------
|
|
27
|
+
|
|
28
|
+
export interface ProcessReceiptInputParam {
|
|
29
|
+
receipt: string;
|
|
30
|
+
product?: ProductProcessReceiptInputParam;
|
|
31
|
+
customer?: CustomerProcessReceiptInputParam;
|
|
32
|
+
}
|
|
33
|
+
export interface CustomerProcessReceiptInputParam {
|
|
34
|
+
id?: string;
|
|
35
|
+
email?: string;
|
|
36
|
+
first_name?: string;
|
|
37
|
+
last_name?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface ProductProcessReceiptInputParam {
|
|
40
|
+
id: string;
|
|
41
|
+
currency_code: string;
|
|
42
|
+
price: number;
|
|
43
|
+
type: 'consumable' | 'non_consumable' | 'non_renewing_subscription';
|
|
44
|
+
name?: string;
|
|
45
|
+
price_in_decimal?: string;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
4
|
+
declare module 'chargebee' {
|
|
5
|
+
export interface PaymentSchedule {
|
|
6
|
+
id: string;
|
|
7
|
+
scheme_id: string;
|
|
8
|
+
entity_type: 'invoice';
|
|
9
|
+
entity_id: string;
|
|
10
|
+
amount?: number;
|
|
11
|
+
created_at: number;
|
|
12
|
+
resource_version?: number;
|
|
13
|
+
updated_at?: number;
|
|
14
|
+
currency_code?: string;
|
|
15
|
+
schedule_entries?: PaymentSchedule.ScheduleEntry[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export namespace PaymentSchedule {
|
|
19
|
+
export interface ScheduleEntry {
|
|
20
|
+
id: string;
|
|
21
|
+
date: number;
|
|
22
|
+
amount: number;
|
|
23
|
+
status: 'posted' | 'payment_due' | 'paid';
|
|
24
|
+
}
|
|
25
|
+
// REQUEST PARAMS
|
|
26
|
+
//---------------
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
4
|
+
declare module 'chargebee' {
|
|
5
|
+
export interface PaymentScheduleEstimate {
|
|
6
|
+
id: string;
|
|
7
|
+
scheme_id: string;
|
|
8
|
+
entity_type: 'invoice';
|
|
9
|
+
entity_id?: string;
|
|
10
|
+
amount: number;
|
|
11
|
+
currency_code?: string;
|
|
12
|
+
schedule_entries?: PaymentScheduleEstimate.ScheduleEntry[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export namespace PaymentScheduleEstimate {
|
|
16
|
+
export interface ScheduleEntry {
|
|
17
|
+
id: string;
|
|
18
|
+
date: number;
|
|
19
|
+
amount: number;
|
|
20
|
+
status: 'posted' | 'payment_due' | 'paid';
|
|
21
|
+
}
|
|
22
|
+
// REQUEST PARAMS
|
|
23
|
+
//---------------
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -2,50 +2,50 @@
|
|
|
2
2
|
///<reference path='./../index.d.ts'/>
|
|
3
3
|
|
|
4
4
|
declare module 'chargebee' {
|
|
5
|
-
export interface
|
|
5
|
+
export interface PaymentScheduleScheme {
|
|
6
6
|
id: string;
|
|
7
|
+
name?: string;
|
|
7
8
|
description?: string;
|
|
8
|
-
|
|
9
|
+
number_of_schedules: number;
|
|
9
10
|
period_unit: 'day' | 'week' | 'month';
|
|
10
11
|
period?: number;
|
|
11
|
-
preferred_day?: number;
|
|
12
12
|
created_at: number;
|
|
13
13
|
resource_version?: number;
|
|
14
14
|
updated_at?: number;
|
|
15
|
-
|
|
15
|
+
preferred_schedules?: PaymentScheduleScheme.PreferredSchedule[];
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
export namespace
|
|
19
|
-
export class
|
|
18
|
+
export namespace PaymentScheduleScheme {
|
|
19
|
+
export class PaymentScheduleSchemeResource {
|
|
20
20
|
create(
|
|
21
21
|
input: CreateInputParam,
|
|
22
22
|
headers?: ChargebeeRequestHeader,
|
|
23
23
|
): Promise<ChargebeeResponse<CreateResponse>>;
|
|
24
24
|
|
|
25
25
|
retrieve(
|
|
26
|
-
|
|
26
|
+
payment_schedule_scheme_id: string,
|
|
27
27
|
headers?: ChargebeeRequestHeader,
|
|
28
28
|
): Promise<ChargebeeResponse<RetrieveResponse>>;
|
|
29
29
|
|
|
30
30
|
delete(
|
|
31
|
-
|
|
31
|
+
payment_schedule_scheme_id: string,
|
|
32
32
|
headers?: ChargebeeRequestHeader,
|
|
33
33
|
): Promise<ChargebeeResponse<DeleteResponse>>;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export interface CreateResponse {
|
|
37
|
-
|
|
37
|
+
payment_schedule_scheme: PaymentScheduleScheme;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export interface RetrieveResponse {
|
|
41
|
-
|
|
41
|
+
payment_schedule_scheme: PaymentScheduleScheme;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
export interface DeleteResponse {
|
|
45
|
-
|
|
45
|
+
payment_schedule_scheme: PaymentScheduleScheme;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
export interface
|
|
48
|
+
export interface PreferredSchedule {
|
|
49
49
|
period?: number;
|
|
50
50
|
amount_percentage?: number;
|
|
51
51
|
}
|
|
@@ -53,16 +53,10 @@ declare module 'chargebee' {
|
|
|
53
53
|
//---------------
|
|
54
54
|
|
|
55
55
|
export interface CreateInputParam {
|
|
56
|
-
|
|
56
|
+
number_of_schedules: number;
|
|
57
57
|
period_unit: 'day' | 'week' | 'month';
|
|
58
58
|
period?: number;
|
|
59
|
-
preferred_day?: number;
|
|
60
59
|
description?: string;
|
|
61
|
-
installments?: InstallmentsCreateInputParam[];
|
|
62
|
-
}
|
|
63
|
-
export interface InstallmentsCreateInputParam {
|
|
64
|
-
period?: number;
|
|
65
|
-
amount_percentage?: number;
|
|
66
60
|
}
|
|
67
61
|
}
|
|
68
62
|
}
|
|
@@ -224,6 +224,8 @@ declare module 'chargebee' {
|
|
|
224
224
|
| 'carnet'
|
|
225
225
|
| 'rupay'
|
|
226
226
|
| 'maestro'
|
|
227
|
+
| 'dankort'
|
|
228
|
+
| 'cartes_bancaires'
|
|
227
229
|
| 'not_applicable';
|
|
228
230
|
funding_type:
|
|
229
231
|
| 'credit'
|
|
@@ -419,7 +421,9 @@ declare module 'chargebee' {
|
|
|
419
421
|
| 'hipercard'
|
|
420
422
|
| 'carnet'
|
|
421
423
|
| 'rupay'
|
|
422
|
-
| 'maestro'
|
|
424
|
+
| 'maestro'
|
|
425
|
+
| 'dankort'
|
|
426
|
+
| 'cartes_bancaires';
|
|
423
427
|
funding_type?: 'credit' | 'debit' | 'prepaid' | 'not_known';
|
|
424
428
|
}
|
|
425
429
|
|
|
@@ -41,11 +41,13 @@ declare module 'chargebee' {
|
|
|
41
41
|
customer?: CustomerCreateForNewSubscriptionInputParam;
|
|
42
42
|
billing_address?: BillingAddressCreateForNewSubscriptionInputParam;
|
|
43
43
|
shipping_address?: ShippingAddressCreateForNewSubscriptionInputParam;
|
|
44
|
+
discounts?: DiscountsCreateForNewSubscriptionInputParam[];
|
|
44
45
|
}
|
|
45
46
|
export interface CreateForExistingSubscriptionInputParam {
|
|
46
47
|
redirect_url?: string;
|
|
47
48
|
pricing_page?: PricingPageCreateForExistingSubscriptionInputParam;
|
|
48
49
|
subscription?: SubscriptionCreateForExistingSubscriptionInputParam;
|
|
50
|
+
discounts?: DiscountsCreateForExistingSubscriptionInputParam[];
|
|
49
51
|
}
|
|
50
52
|
export interface BillingAddressCreateForNewSubscriptionInputParam {
|
|
51
53
|
first_name?: string;
|
|
@@ -95,11 +97,34 @@ declare module 'chargebee' {
|
|
|
95
97
|
id?: string;
|
|
96
98
|
}
|
|
97
99
|
|
|
100
|
+
export interface DiscountsCreateForNewSubscriptionInputParam {
|
|
101
|
+
apply_on: ApplyOn;
|
|
102
|
+
duration_type: DurationType;
|
|
103
|
+
percentage?: number;
|
|
104
|
+
amount?: number;
|
|
105
|
+
period?: number;
|
|
106
|
+
period_unit?: PeriodUnit;
|
|
107
|
+
included_in_mrr?: boolean;
|
|
108
|
+
item_price_id?: string;
|
|
109
|
+
label?: string;
|
|
110
|
+
}
|
|
98
111
|
export interface PricingPageCreateForExistingSubscriptionInputParam {
|
|
99
112
|
id: string;
|
|
100
113
|
}
|
|
101
114
|
export interface SubscriptionCreateForExistingSubscriptionInputParam {
|
|
102
115
|
id: string;
|
|
103
116
|
}
|
|
117
|
+
|
|
118
|
+
export interface DiscountsCreateForExistingSubscriptionInputParam {
|
|
119
|
+
apply_on: ApplyOn;
|
|
120
|
+
duration_type: DurationType;
|
|
121
|
+
percentage?: number;
|
|
122
|
+
amount?: number;
|
|
123
|
+
period?: number;
|
|
124
|
+
period_unit?: PeriodUnit;
|
|
125
|
+
included_in_mrr?: boolean;
|
|
126
|
+
item_price_id?: string;
|
|
127
|
+
label?: string;
|
|
128
|
+
}
|
|
104
129
|
}
|
|
105
130
|
}
|
|
@@ -39,8 +39,8 @@ declare module 'chargebee' {
|
|
|
39
39
|
customer_id: string;
|
|
40
40
|
payment_source_id?: string;
|
|
41
41
|
invoice_info?: InvoiceInfoCreateInputParam;
|
|
42
|
+
payment_schedule?: PaymentScheduleCreateInputParam;
|
|
42
43
|
statement_descriptor?: StatementDescriptorCreateInputParam;
|
|
43
|
-
installment_info?: InstallmentInfoCreateInputParam;
|
|
44
44
|
purchase_items?: PurchaseItemsCreateInputParam[];
|
|
45
45
|
item_tiers?: ItemTiersCreateInputParam[];
|
|
46
46
|
shipping_addresses?: ShippingAddressesCreateInputParam[];
|
|
@@ -63,14 +63,14 @@ declare module 'chargebee' {
|
|
|
63
63
|
export interface StatementDescriptorCreateInputParam {
|
|
64
64
|
descriptor?: string;
|
|
65
65
|
}
|
|
66
|
+
export interface PaymentScheduleCreateInputParam {
|
|
67
|
+
scheme_id?: string;
|
|
68
|
+
amount?: number;
|
|
69
|
+
}
|
|
66
70
|
export interface InvoiceInfoCreateInputParam {
|
|
67
71
|
po_number?: string;
|
|
68
72
|
notes?: string;
|
|
69
73
|
}
|
|
70
|
-
export interface InstallmentInfoCreateInputParam {
|
|
71
|
-
config_id?: string;
|
|
72
|
-
amount?: number;
|
|
73
|
-
}
|
|
74
74
|
|
|
75
75
|
export interface SubscriptionInfoCreateInputParam {
|
|
76
76
|
index: number;
|
|
@@ -656,6 +656,7 @@ declare module 'chargebee' {
|
|
|
656
656
|
}
|
|
657
657
|
export interface ConvertInputParam {
|
|
658
658
|
invoice_date?: number;
|
|
659
|
+
invoice_immediately?: boolean;
|
|
659
660
|
create_pending_invoices?: boolean;
|
|
660
661
|
first_invoice_pending?: boolean;
|
|
661
662
|
subscription?: SubscriptionConvertInputParam;
|
|
@@ -86,6 +86,9 @@ declare module 'chargebee' {
|
|
|
86
86
|
charge_once?: boolean;
|
|
87
87
|
charge_on_option?: 'immediately' | 'on_event';
|
|
88
88
|
proration_type?: 'full_term' | 'partial_term' | 'none';
|
|
89
|
+
usage_accumulation_reset_frequency?:
|
|
90
|
+
| 'never'
|
|
91
|
+
| 'subscription_billing_frequency';
|
|
89
92
|
}
|
|
90
93
|
export interface ItemTier {
|
|
91
94
|
item_price_id: string;
|
|
@@ -575,6 +575,9 @@ declare module 'chargebee' {
|
|
|
575
575
|
charge_once?: boolean;
|
|
576
576
|
charge_on_option?: 'immediately' | 'on_event';
|
|
577
577
|
proration_type?: 'full_term' | 'partial_term' | 'none';
|
|
578
|
+
usage_accumulation_reset_frequency?:
|
|
579
|
+
| 'never'
|
|
580
|
+
| 'subscription_billing_frequency';
|
|
578
581
|
}
|
|
579
582
|
export interface ItemTier {
|
|
580
583
|
item_price_id: string;
|
|
@@ -748,7 +751,7 @@ declare module 'chargebee' {
|
|
|
748
751
|
addons?: AddonsCreateInputParam[];
|
|
749
752
|
event_based_addons?: EventBasedAddonsCreateInputParam[];
|
|
750
753
|
coupons?: CouponsCreateInputParam[];
|
|
751
|
-
[key: string]: unknown;
|
|
754
|
+
[key: `cf_${string}`]: unknown;
|
|
752
755
|
}
|
|
753
756
|
export interface CreateForCustomerInputParam {
|
|
754
757
|
id?: string;
|
|
@@ -791,7 +794,7 @@ declare module 'chargebee' {
|
|
|
791
794
|
addons?: AddonsCreateForCustomerInputParam[];
|
|
792
795
|
event_based_addons?: EventBasedAddonsCreateForCustomerInputParam[];
|
|
793
796
|
coupons?: CouponsCreateForCustomerInputParam[];
|
|
794
|
-
[key: string]: unknown;
|
|
797
|
+
[key: `cf_${string}`]: unknown;
|
|
795
798
|
}
|
|
796
799
|
export interface CreateWithItemsInputParam {
|
|
797
800
|
id?: string;
|
|
@@ -837,7 +840,7 @@ declare module 'chargebee' {
|
|
|
837
840
|
discounts?: DiscountsCreateWithItemsInputParam[];
|
|
838
841
|
item_tiers?: ItemTiersCreateWithItemsInputParam[];
|
|
839
842
|
coupons?: CouponsCreateWithItemsInputParam[];
|
|
840
|
-
[key: string]: unknown;
|
|
843
|
+
[key: `cf_${string}`]: unknown;
|
|
841
844
|
}
|
|
842
845
|
export interface ListInputParam {
|
|
843
846
|
limit?: number;
|
|
@@ -865,7 +868,7 @@ declare module 'chargebee' {
|
|
|
865
868
|
channel?: filter.Enum;
|
|
866
869
|
'sort_by[asc]'?: string;
|
|
867
870
|
'sort_by[desc]'?: string;
|
|
868
|
-
[key: string]: unknown;
|
|
871
|
+
[key: `cf_${string}`]: unknown;
|
|
869
872
|
}
|
|
870
873
|
export interface SubscriptionsForCustomerInputParam {
|
|
871
874
|
limit?: number;
|
|
@@ -936,7 +939,7 @@ declare module 'chargebee' {
|
|
|
936
939
|
addons?: AddonsUpdateInputParam[];
|
|
937
940
|
coupons?: CouponsUpdateInputParam[];
|
|
938
941
|
event_based_addons?: EventBasedAddonsUpdateInputParam[];
|
|
939
|
-
[key: string]: unknown;
|
|
942
|
+
[key: `cf_${string}`]: unknown;
|
|
940
943
|
}
|
|
941
944
|
export interface UpdateForItemsInputParam {
|
|
942
945
|
mandatory_items_to_remove?: string[];
|
|
@@ -993,7 +996,7 @@ declare module 'chargebee' {
|
|
|
993
996
|
discounts?: DiscountsUpdateForItemsInputParam[];
|
|
994
997
|
item_tiers?: ItemTiersUpdateForItemsInputParam[];
|
|
995
998
|
coupons?: CouponsUpdateForItemsInputParam[];
|
|
996
|
-
[key: string]: unknown;
|
|
999
|
+
[key: `cf_${string}`]: unknown;
|
|
997
1000
|
}
|
|
998
1001
|
export interface ChangeTermEndInputParam {
|
|
999
1002
|
term_ends_at: number;
|
|
@@ -1106,7 +1109,7 @@ declare module 'chargebee' {
|
|
|
1106
1109
|
event_based_addons?: EventBasedAddonsImportSubscriptionInputParam[];
|
|
1107
1110
|
charged_event_based_addons?: ChargedEventBasedAddonsImportSubscriptionInputParam[];
|
|
1108
1111
|
coupons?: CouponsImportSubscriptionInputParam[];
|
|
1109
|
-
[key: string]: unknown;
|
|
1112
|
+
[key: `cf_${string}`]: unknown;
|
|
1110
1113
|
}
|
|
1111
1114
|
export interface ImportForCustomerInputParam {
|
|
1112
1115
|
id?: string;
|
|
@@ -1150,7 +1153,7 @@ declare module 'chargebee' {
|
|
|
1150
1153
|
event_based_addons?: EventBasedAddonsImportForCustomerInputParam[];
|
|
1151
1154
|
charged_event_based_addons?: ChargedEventBasedAddonsImportForCustomerInputParam[];
|
|
1152
1155
|
coupons?: CouponsImportForCustomerInputParam[];
|
|
1153
|
-
[key: string]: unknown;
|
|
1156
|
+
[key: `cf_${string}`]: unknown;
|
|
1154
1157
|
}
|
|
1155
1158
|
export interface ImportContractTermInputParam {
|
|
1156
1159
|
contract_term_billing_cycle_on_renewal?: number;
|
|
@@ -1206,7 +1209,7 @@ declare module 'chargebee' {
|
|
|
1206
1209
|
charged_items?: ChargedItemsImportForItemsInputParam[];
|
|
1207
1210
|
item_tiers?: ItemTiersImportForItemsInputParam[];
|
|
1208
1211
|
coupons?: CouponsImportForItemsInputParam[];
|
|
1209
|
-
[key: string]: unknown;
|
|
1212
|
+
[key: `cf_${string}`]: unknown;
|
|
1210
1213
|
}
|
|
1211
1214
|
export interface OverrideBillingProfileInputParam {
|
|
1212
1215
|
payment_source_id?: string;
|
|
@@ -1621,6 +1624,7 @@ declare module 'chargebee' {
|
|
|
1621
1624
|
*/
|
|
1622
1625
|
item_type?: ItemType;
|
|
1623
1626
|
charge_on_option?: ChargeOnOption;
|
|
1627
|
+
usage_accumulation_reset_frequency?: UsageAccumulationResetFrequency;
|
|
1624
1628
|
}
|
|
1625
1629
|
export interface DiscountsCreateWithItemsInputParam {
|
|
1626
1630
|
apply_on: ApplyOn;
|
|
@@ -1949,6 +1953,7 @@ declare module 'chargebee' {
|
|
|
1949
1953
|
*/
|
|
1950
1954
|
item_type?: ItemType;
|
|
1951
1955
|
proration_type?: ProrationType;
|
|
1956
|
+
usage_accumulation_reset_frequency?: UsageAccumulationResetFrequency;
|
|
1952
1957
|
}
|
|
1953
1958
|
export interface DiscountsUpdateForItemsInputParam {
|
|
1954
1959
|
apply_on: ApplyOn;
|
|
@@ -1,48 +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 Installment {
|
|
6
|
-
id: string;
|
|
7
|
-
invoice_id: string;
|
|
8
|
-
date: number;
|
|
9
|
-
amount: number;
|
|
10
|
-
status: 'posted' | 'payment_due' | 'paid';
|
|
11
|
-
created_at: number;
|
|
12
|
-
resource_version?: number;
|
|
13
|
-
updated_at?: number;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export namespace Installment {
|
|
17
|
-
export class InstallmentResource {
|
|
18
|
-
retrieve(
|
|
19
|
-
installment_id: string,
|
|
20
|
-
headers?: ChargebeeRequestHeader,
|
|
21
|
-
): Promise<ChargebeeResponse<RetrieveResponse>>;
|
|
22
|
-
|
|
23
|
-
list(
|
|
24
|
-
input: ListInputParam,
|
|
25
|
-
headers?: ChargebeeRequestHeader,
|
|
26
|
-
): Promise<ChargebeeResponse<ListResponse>>;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface RetrieveResponse {
|
|
30
|
-
installment: Installment;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface ListResponse {
|
|
34
|
-
list: { installment: Installment }[];
|
|
35
|
-
next_offset?: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// REQUEST PARAMS
|
|
39
|
-
//---------------
|
|
40
|
-
|
|
41
|
-
export interface ListInputParam {
|
|
42
|
-
limit?: number;
|
|
43
|
-
offset?: string;
|
|
44
|
-
sort_by?: string;
|
|
45
|
-
invoice_id: filter.String;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
///<reference path='./../core.d.ts'/>
|
|
2
|
-
///<reference path='./../index.d.ts'/>
|
|
3
|
-
|
|
4
|
-
declare module 'chargebee' {
|
|
5
|
-
export interface InstallmentDetail {
|
|
6
|
-
id?: string;
|
|
7
|
-
invoice_id?: string;
|
|
8
|
-
amount?: number;
|
|
9
|
-
installments?: InstallmentDetail.Installment[];
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export namespace InstallmentDetail {
|
|
13
|
-
export interface Installment {
|
|
14
|
-
id: string;
|
|
15
|
-
invoice_id: string;
|
|
16
|
-
date: number;
|
|
17
|
-
amount: number;
|
|
18
|
-
status: 'posted' | 'payment_due' | 'paid';
|
|
19
|
-
created_at: number;
|
|
20
|
-
resource_version?: number;
|
|
21
|
-
updated_at?: number;
|
|
22
|
-
}
|
|
23
|
-
// REQUEST PARAMS
|
|
24
|
-
//---------------
|
|
25
|
-
}
|
|
26
|
-
}
|