chargebee 3.0.0-beta.1 → 3.0.0-beta.3
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 +59 -0
- package/README.md +3 -1
- package/cjs/RequestWrapper.js +5 -2
- package/cjs/chargebee.cjs.js +1 -1
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +22 -10
- package/esm/RequestWrapper.js +5 -2
- package/esm/chargebee.esm.js +1 -1
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +22 -10
- package/package.json +1 -1
- package/types/core.d.ts +4 -4
- package/types/index.d.ts +5 -5
- package/types/resources/Coupon.d.ts +3 -3
- package/types/resources/Customer.d.ts +3 -3
- 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 +2 -2
- package/types/resources/NonSubscription.d.ts +48 -0
- package/types/resources/PaymentSchedule.d.ts +28 -0
- package/types/resources/{InstallmentConfig.d.ts → PaymentScheduleScheme.d.ts} +12 -19
- package/types/resources/Purchase.d.ts +5 -5
- package/types/resources/Subscription.d.ts +9 -9
- package/types/resources/Installment.d.ts +0 -48
- package/types/resources/InstallmentDetail.d.ts +0 -26
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,62 @@
|
|
|
1
|
+
### v3.0.0-beta.3 (2024-09-20)
|
|
2
|
+
* * *
|
|
3
|
+
|
|
4
|
+
#### New Resource:
|
|
5
|
+
* PaymentScheduleScheme has been added.
|
|
6
|
+
* PaymentSchedule has been added.
|
|
7
|
+
|
|
8
|
+
### New Endpoints:
|
|
9
|
+
* Invoice#ApplyPaymentScheduleScheme has been added.
|
|
10
|
+
* Invoice#PaymentSchedules has been added.
|
|
11
|
+
|
|
12
|
+
### New Attributes
|
|
13
|
+
* bundle_items[] has been added to Items.
|
|
14
|
+
* bundle_configuration has been added to Items.
|
|
15
|
+
|
|
16
|
+
#### New Input parameters:
|
|
17
|
+
* bundle_configuration has been added to Items#CreateParams, Items#UpdateParams & Items#ListParams.
|
|
18
|
+
* bundle_items_to_add[] has been added to Items#CreateParams & Items#UpdateParams.
|
|
19
|
+
* bundle_items_to_update[] has been added to Items#UpdateParams.
|
|
20
|
+
* bundle_items_to_remove[] has been added to Items#UpdateParams.
|
|
21
|
+
* payment_schedule has been added to Purchase#CreateParams.
|
|
22
|
+
|
|
23
|
+
### New Enum Values:
|
|
24
|
+
* payment_schedules_created has been added to EventTypeEnum.
|
|
25
|
+
* payment_schedules_updated has been added to EventTypeEnum.
|
|
26
|
+
* payment_schedule_scheme_created has been added to EventTypeEnum.
|
|
27
|
+
* payment_schedule_scheme_deleted has been added to EventTypeEnum.
|
|
28
|
+
|
|
29
|
+
### Removed Resource:
|
|
30
|
+
* Installment has been removed.
|
|
31
|
+
* InstallmentConfig has been removed.
|
|
32
|
+
* InstallmentDetail has been removed.
|
|
33
|
+
|
|
34
|
+
### Removed Endpoints:
|
|
35
|
+
* Invoice#Installments has been removed.
|
|
36
|
+
|
|
37
|
+
### Removed Input parameters:
|
|
38
|
+
* installment_info has been removed from Purchase#CreateParams.
|
|
39
|
+
|
|
40
|
+
### Removed Enum Values:
|
|
41
|
+
* invoice_installments_created has been removed from EventTypeEnum.
|
|
42
|
+
* invoice_installment_updated has been removed from EventTypeEnum.
|
|
43
|
+
* installment_config_created has been removed from EventTypeEnum.
|
|
44
|
+
* installment_config_deleted has been removed from EventTypeEnum.
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
#### Bug Fixes:
|
|
48
|
+
* HttpClient wrong configuration fixed.
|
|
49
|
+
* Missed Resource Non-Subscription has been added.
|
|
50
|
+
|
|
51
|
+
#### Enhancements:
|
|
52
|
+
* Better type support for custom fields.
|
|
53
|
+
|
|
54
|
+
### v3.0.0-beta.2 (2024-08-29)
|
|
55
|
+
* * *
|
|
56
|
+
|
|
57
|
+
#### Bug Fixes:
|
|
58
|
+
* content-length bug fixes for fetch.
|
|
59
|
+
|
|
1
60
|
### v3.0.0-beta.1 (2024-08-26)
|
|
2
61
|
* * *
|
|
3
62
|
|
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
This is the [Node.js](http://nodejs.org/) library for integrating with Chargebee. Sign up for a Chargebee account [here](https://www.chargebee.com).
|
|
4
4
|
|
|
5
|
+
Please refer to the [migration guide](https://github.com/chargebee/chargebee-node/wiki/Migration-guide-for-v3) if you are migrating from the older versions of [chargebee-typescript](https://www.npmjs.com/package/chargebee-typescript) or [chargebee](https://www.npmjs.com/package/chargebee/v/2.40.0).
|
|
6
|
+
|
|
5
7
|
## Requirements
|
|
6
8
|
|
|
7
9
|
Node.js 18 or higher.
|
|
@@ -144,4 +146,4 @@ If you find any bugs or have any feedback, open an issue in this repository or e
|
|
|
144
146
|
|
|
145
147
|
## License
|
|
146
148
|
|
|
147
|
-
See the [LICENSE](./LICENSE) file.
|
|
149
|
+
See the [LICENSE](./LICENSE) file.
|
package/cjs/RequestWrapper.js
CHANGED
|
@@ -4,7 +4,6 @@ exports.RequestWrapper = void 0;
|
|
|
4
4
|
const util_js_1 = require("./util.js");
|
|
5
5
|
const coreCommon_js_1 = require("./coreCommon.js");
|
|
6
6
|
const node_buffer_1 = require("node:buffer");
|
|
7
|
-
const IDEMPOTENCY_HEADER = 'chargebee-idempotency-key';
|
|
8
7
|
class RequestWrapper {
|
|
9
8
|
constructor(args, apiCall, envArg) {
|
|
10
9
|
this.getRequest = () => {
|
|
@@ -55,11 +54,15 @@ class RequestWrapper {
|
|
|
55
54
|
params = {};
|
|
56
55
|
}
|
|
57
56
|
let data = (0, util_js_1.encodeParams)(params);
|
|
57
|
+
if (data.length) {
|
|
58
|
+
(0, util_js_1.extend)(true, this.httpHeaders, {
|
|
59
|
+
'Content-Length': data.length,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
58
62
|
(0, util_js_1.extend)(true, this.httpHeaders, {
|
|
59
63
|
Authorization: 'Basic ' + node_buffer_1.Buffer.from(env.apiKey + ':').toString('base64'),
|
|
60
64
|
Accept: 'application/json',
|
|
61
65
|
'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8',
|
|
62
|
-
'Content-Length': data.length,
|
|
63
66
|
'User-Agent': 'Chargebee-NodeJs-Client ' + env.clientVersion,
|
|
64
67
|
'Lang-Version': typeof process === 'undefined' ? '' : process.version,
|
|
65
68
|
});
|
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.3',
|
|
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],
|
|
@@ -1000,6 +1008,15 @@ exports.Endpoints = {
|
|
|
1000
1008
|
],
|
|
1001
1009
|
['retrieveStoreSubs', 'POST', '/in_app_subscriptions', '/retrieve', true],
|
|
1002
1010
|
],
|
|
1011
|
+
nonSubscription: [
|
|
1012
|
+
[
|
|
1013
|
+
'processReceipt',
|
|
1014
|
+
'POST',
|
|
1015
|
+
'/non_subscriptions',
|
|
1016
|
+
'/one_time_purchase',
|
|
1017
|
+
true,
|
|
1018
|
+
],
|
|
1019
|
+
],
|
|
1003
1020
|
entitlementOverride: [
|
|
1004
1021
|
[
|
|
1005
1022
|
'addEntitlementOverrideForSubscription',
|
|
@@ -1057,16 +1074,11 @@ exports.Endpoints = {
|
|
|
1057
1074
|
['delete', 'POST', '/ramps', '/delete', true],
|
|
1058
1075
|
['list', 'GET', '/ramps', null, false],
|
|
1059
1076
|
],
|
|
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],
|
|
1077
|
+
paymentScheduleScheme: [
|
|
1078
|
+
['create', 'POST', '/payment_schedule_schemes', null, false],
|
|
1079
|
+
['retrieve', 'GET', '/payment_schedule_schemes', null, true],
|
|
1080
|
+
['delete', 'POST', '/payment_schedule_schemes', '/delete', true],
|
|
1068
1081
|
],
|
|
1069
|
-
installmentDetail: [],
|
|
1070
1082
|
pricingPageSession: [
|
|
1071
1083
|
[
|
|
1072
1084
|
'createForNewSubscription',
|
package/esm/RequestWrapper.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { extend, callbackifyPromise, getApiURL, encodeListParams, encodeParams, serialize, getHost, } from './util.js';
|
|
2
2
|
import { handleResponse } from './coreCommon.js';
|
|
3
3
|
import { Buffer } from 'node:buffer';
|
|
4
|
-
const IDEMPOTENCY_HEADER = 'chargebee-idempotency-key';
|
|
5
4
|
export class RequestWrapper {
|
|
6
5
|
constructor(args, apiCall, envArg) {
|
|
7
6
|
this.getRequest = () => {
|
|
@@ -52,11 +51,15 @@ export class RequestWrapper {
|
|
|
52
51
|
params = {};
|
|
53
52
|
}
|
|
54
53
|
let data = encodeParams(params);
|
|
54
|
+
if (data.length) {
|
|
55
|
+
extend(true, this.httpHeaders, {
|
|
56
|
+
'Content-Length': data.length,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
55
59
|
extend(true, this.httpHeaders, {
|
|
56
60
|
Authorization: 'Basic ' + Buffer.from(env.apiKey + ':').toString('base64'),
|
|
57
61
|
Accept: 'application/json',
|
|
58
62
|
'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8',
|
|
59
|
-
'Content-Length': data.length,
|
|
60
63
|
'User-Agent': 'Chargebee-NodeJs-Client ' + env.clientVersion,
|
|
61
64
|
'Lang-Version': typeof process === 'undefined' ? '' : process.version,
|
|
62
65
|
});
|
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.3',
|
|
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],
|
|
@@ -997,6 +1005,15 @@ export const Endpoints = {
|
|
|
997
1005
|
],
|
|
998
1006
|
['retrieveStoreSubs', 'POST', '/in_app_subscriptions', '/retrieve', true],
|
|
999
1007
|
],
|
|
1008
|
+
nonSubscription: [
|
|
1009
|
+
[
|
|
1010
|
+
'processReceipt',
|
|
1011
|
+
'POST',
|
|
1012
|
+
'/non_subscriptions',
|
|
1013
|
+
'/one_time_purchase',
|
|
1014
|
+
true,
|
|
1015
|
+
],
|
|
1016
|
+
],
|
|
1000
1017
|
entitlementOverride: [
|
|
1001
1018
|
[
|
|
1002
1019
|
'addEntitlementOverrideForSubscription',
|
|
@@ -1054,16 +1071,11 @@ export const Endpoints = {
|
|
|
1054
1071
|
['delete', 'POST', '/ramps', '/delete', true],
|
|
1055
1072
|
['list', 'GET', '/ramps', null, false],
|
|
1056
1073
|
],
|
|
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],
|
|
1074
|
+
paymentScheduleScheme: [
|
|
1075
|
+
['create', 'POST', '/payment_schedule_schemes', null, false],
|
|
1076
|
+
['retrieve', 'GET', '/payment_schedule_schemes', null, true],
|
|
1077
|
+
['delete', 'POST', '/payment_schedule_schemes', '/delete', true],
|
|
1065
1078
|
],
|
|
1066
|
-
installmentDetail: [],
|
|
1067
1079
|
pricingPageSession: [
|
|
1068
1080
|
[
|
|
1069
1081
|
'createForNewSubscription',
|
package/package.json
CHANGED
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'
|
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,12 @@
|
|
|
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/PaymentScheduleScheme.d.ts' />
|
|
49
49
|
///<reference path='./resources/PaymentSource.d.ts' />
|
|
50
50
|
///<reference path='./resources/PaymentVoucher.d.ts' />
|
|
51
51
|
///<reference path='./resources/PortalSession.d.ts' />
|
|
@@ -135,15 +135,15 @@ declare module 'chargebee' {
|
|
|
135
135
|
gift: Gift.GiftResource;
|
|
136
136
|
hostedPage: HostedPage.HostedPageResource;
|
|
137
137
|
inAppSubscription: InAppSubscription.InAppSubscriptionResource;
|
|
138
|
-
installment: Installment.InstallmentResource;
|
|
139
|
-
installmentConfig: InstallmentConfig.InstallmentConfigResource;
|
|
140
138
|
invoice: Invoice.InvoiceResource;
|
|
141
139
|
item: Item.ItemResource;
|
|
142
140
|
itemEntitlement: ItemEntitlement.ItemEntitlementResource;
|
|
143
141
|
itemFamily: ItemFamily.ItemFamilyResource;
|
|
144
142
|
itemPrice: ItemPrice.ItemPriceResource;
|
|
143
|
+
nonSubscription: NonSubscription.NonSubscriptionResource;
|
|
145
144
|
order: Order.OrderResource;
|
|
146
145
|
paymentIntent: PaymentIntent.PaymentIntentResource;
|
|
146
|
+
paymentScheduleScheme: PaymentScheduleScheme.PaymentScheduleSchemeResource;
|
|
147
147
|
paymentSource: PaymentSource.PaymentSourceResource;
|
|
148
148
|
paymentVoucher: PaymentVoucher.PaymentVoucherResource;
|
|
149
149
|
portalSession: PortalSession.PortalSessionResource;
|
|
@@ -202,7 +202,7 @@ 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;
|
|
@@ -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,7 +244,7 @@ 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;
|
|
@@ -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;
|
|
@@ -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
|
}
|
|
@@ -188,7 +188,7 @@ declare module 'chargebee' {
|
|
|
188
188
|
accounting_detail?: AccountingDetailCreateInputParam;
|
|
189
189
|
tiers?: TiersCreateInputParam[];
|
|
190
190
|
tax_providers_fields?: TaxProvidersFieldsCreateInputParam[];
|
|
191
|
-
[key: string]: unknown;
|
|
191
|
+
[key: `cf_${string}`]: unknown;
|
|
192
192
|
}
|
|
193
193
|
export interface UpdateInputParam {
|
|
194
194
|
name?: string;
|
|
@@ -223,7 +223,7 @@ declare module 'chargebee' {
|
|
|
223
223
|
accounting_detail?: AccountingDetailUpdateInputParam;
|
|
224
224
|
tiers?: TiersUpdateInputParam[];
|
|
225
225
|
tax_providers_fields?: TaxProvidersFieldsUpdateInputParam[];
|
|
226
|
-
[key: string]: unknown;
|
|
226
|
+
[key: `cf_${string}`]: unknown;
|
|
227
227
|
}
|
|
228
228
|
export interface ListInputParam {
|
|
229
229
|
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
|
+
}
|
|
@@ -2,50 +2,49 @@
|
|
|
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
7
|
description?: string;
|
|
8
|
-
|
|
8
|
+
number_of_schedules: number;
|
|
9
9
|
period_unit: 'day' | 'week' | 'month';
|
|
10
10
|
period?: number;
|
|
11
|
-
preferred_day?: number;
|
|
12
11
|
created_at: number;
|
|
13
12
|
resource_version?: number;
|
|
14
13
|
updated_at?: number;
|
|
15
|
-
|
|
14
|
+
preferred_schedules?: PaymentScheduleScheme.PreferredSchedule[];
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
export namespace
|
|
19
|
-
export class
|
|
17
|
+
export namespace PaymentScheduleScheme {
|
|
18
|
+
export class PaymentScheduleSchemeResource {
|
|
20
19
|
create(
|
|
21
20
|
input: CreateInputParam,
|
|
22
21
|
headers?: ChargebeeRequestHeader,
|
|
23
22
|
): Promise<ChargebeeResponse<CreateResponse>>;
|
|
24
23
|
|
|
25
24
|
retrieve(
|
|
26
|
-
|
|
25
|
+
payment_schedule_scheme_id: string,
|
|
27
26
|
headers?: ChargebeeRequestHeader,
|
|
28
27
|
): Promise<ChargebeeResponse<RetrieveResponse>>;
|
|
29
28
|
|
|
30
29
|
delete(
|
|
31
|
-
|
|
30
|
+
payment_schedule_scheme_id: string,
|
|
32
31
|
headers?: ChargebeeRequestHeader,
|
|
33
32
|
): Promise<ChargebeeResponse<DeleteResponse>>;
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
export interface CreateResponse {
|
|
37
|
-
|
|
36
|
+
payment_schedule_scheme: PaymentScheduleScheme;
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
export interface RetrieveResponse {
|
|
41
|
-
|
|
40
|
+
payment_schedule_scheme: PaymentScheduleScheme;
|
|
42
41
|
}
|
|
43
42
|
|
|
44
43
|
export interface DeleteResponse {
|
|
45
|
-
|
|
44
|
+
payment_schedule_scheme: PaymentScheduleScheme;
|
|
46
45
|
}
|
|
47
46
|
|
|
48
|
-
export interface
|
|
47
|
+
export interface PreferredSchedule {
|
|
49
48
|
period?: number;
|
|
50
49
|
amount_percentage?: number;
|
|
51
50
|
}
|
|
@@ -53,16 +52,10 @@ declare module 'chargebee' {
|
|
|
53
52
|
//---------------
|
|
54
53
|
|
|
55
54
|
export interface CreateInputParam {
|
|
56
|
-
|
|
55
|
+
number_of_schedules: number;
|
|
57
56
|
period_unit: 'day' | 'week' | 'month';
|
|
58
57
|
period?: number;
|
|
59
|
-
preferred_day?: number;
|
|
60
58
|
description?: string;
|
|
61
|
-
installments?: InstallmentsCreateInputParam[];
|
|
62
|
-
}
|
|
63
|
-
export interface InstallmentsCreateInputParam {
|
|
64
|
-
period?: number;
|
|
65
|
-
amount_percentage?: number;
|
|
66
59
|
}
|
|
67
60
|
}
|
|
68
61
|
}
|
|
@@ -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;
|
|
@@ -748,7 +748,7 @@ declare module 'chargebee' {
|
|
|
748
748
|
addons?: AddonsCreateInputParam[];
|
|
749
749
|
event_based_addons?: EventBasedAddonsCreateInputParam[];
|
|
750
750
|
coupons?: CouponsCreateInputParam[];
|
|
751
|
-
[key: string]: unknown;
|
|
751
|
+
[key: `cf_${string}`]: unknown;
|
|
752
752
|
}
|
|
753
753
|
export interface CreateForCustomerInputParam {
|
|
754
754
|
id?: string;
|
|
@@ -791,7 +791,7 @@ declare module 'chargebee' {
|
|
|
791
791
|
addons?: AddonsCreateForCustomerInputParam[];
|
|
792
792
|
event_based_addons?: EventBasedAddonsCreateForCustomerInputParam[];
|
|
793
793
|
coupons?: CouponsCreateForCustomerInputParam[];
|
|
794
|
-
[key: string]: unknown;
|
|
794
|
+
[key: `cf_${string}`]: unknown;
|
|
795
795
|
}
|
|
796
796
|
export interface CreateWithItemsInputParam {
|
|
797
797
|
id?: string;
|
|
@@ -837,7 +837,7 @@ declare module 'chargebee' {
|
|
|
837
837
|
discounts?: DiscountsCreateWithItemsInputParam[];
|
|
838
838
|
item_tiers?: ItemTiersCreateWithItemsInputParam[];
|
|
839
839
|
coupons?: CouponsCreateWithItemsInputParam[];
|
|
840
|
-
[key: string]: unknown;
|
|
840
|
+
[key: `cf_${string}`]: unknown;
|
|
841
841
|
}
|
|
842
842
|
export interface ListInputParam {
|
|
843
843
|
limit?: number;
|
|
@@ -865,7 +865,7 @@ declare module 'chargebee' {
|
|
|
865
865
|
channel?: filter.Enum;
|
|
866
866
|
'sort_by[asc]'?: string;
|
|
867
867
|
'sort_by[desc]'?: string;
|
|
868
|
-
[key: string]: unknown;
|
|
868
|
+
[key: `cf_${string}`]: unknown;
|
|
869
869
|
}
|
|
870
870
|
export interface SubscriptionsForCustomerInputParam {
|
|
871
871
|
limit?: number;
|
|
@@ -936,7 +936,7 @@ declare module 'chargebee' {
|
|
|
936
936
|
addons?: AddonsUpdateInputParam[];
|
|
937
937
|
coupons?: CouponsUpdateInputParam[];
|
|
938
938
|
event_based_addons?: EventBasedAddonsUpdateInputParam[];
|
|
939
|
-
[key: string]: unknown;
|
|
939
|
+
[key: `cf_${string}`]: unknown;
|
|
940
940
|
}
|
|
941
941
|
export interface UpdateForItemsInputParam {
|
|
942
942
|
mandatory_items_to_remove?: string[];
|
|
@@ -993,7 +993,7 @@ declare module 'chargebee' {
|
|
|
993
993
|
discounts?: DiscountsUpdateForItemsInputParam[];
|
|
994
994
|
item_tiers?: ItemTiersUpdateForItemsInputParam[];
|
|
995
995
|
coupons?: CouponsUpdateForItemsInputParam[];
|
|
996
|
-
[key: string]: unknown;
|
|
996
|
+
[key: `cf_${string}`]: unknown;
|
|
997
997
|
}
|
|
998
998
|
export interface ChangeTermEndInputParam {
|
|
999
999
|
term_ends_at: number;
|
|
@@ -1106,7 +1106,7 @@ declare module 'chargebee' {
|
|
|
1106
1106
|
event_based_addons?: EventBasedAddonsImportSubscriptionInputParam[];
|
|
1107
1107
|
charged_event_based_addons?: ChargedEventBasedAddonsImportSubscriptionInputParam[];
|
|
1108
1108
|
coupons?: CouponsImportSubscriptionInputParam[];
|
|
1109
|
-
[key: string]: unknown;
|
|
1109
|
+
[key: `cf_${string}`]: unknown;
|
|
1110
1110
|
}
|
|
1111
1111
|
export interface ImportForCustomerInputParam {
|
|
1112
1112
|
id?: string;
|
|
@@ -1150,7 +1150,7 @@ declare module 'chargebee' {
|
|
|
1150
1150
|
event_based_addons?: EventBasedAddonsImportForCustomerInputParam[];
|
|
1151
1151
|
charged_event_based_addons?: ChargedEventBasedAddonsImportForCustomerInputParam[];
|
|
1152
1152
|
coupons?: CouponsImportForCustomerInputParam[];
|
|
1153
|
-
[key: string]: unknown;
|
|
1153
|
+
[key: `cf_${string}`]: unknown;
|
|
1154
1154
|
}
|
|
1155
1155
|
export interface ImportContractTermInputParam {
|
|
1156
1156
|
contract_term_billing_cycle_on_renewal?: number;
|
|
@@ -1206,7 +1206,7 @@ declare module 'chargebee' {
|
|
|
1206
1206
|
charged_items?: ChargedItemsImportForItemsInputParam[];
|
|
1207
1207
|
item_tiers?: ItemTiersImportForItemsInputParam[];
|
|
1208
1208
|
coupons?: CouponsImportForItemsInputParam[];
|
|
1209
|
-
[key: string]: unknown;
|
|
1209
|
+
[key: `cf_${string}`]: unknown;
|
|
1210
1210
|
}
|
|
1211
1211
|
export interface OverrideBillingProfileInputParam {
|
|
1212
1212
|
payment_source_id?: string;
|
|
@@ -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
|
-
}
|