chargebee 3.15.0 → 3.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/cjs/RequestWrapper.js +10 -9
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +16 -0
- package/esm/RequestWrapper.js +10 -9
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +16 -0
- package/package.json +1 -1
- package/types/core.d.ts +4 -1
- package/types/index.d.ts +2 -0
- package/types/resources/Content.d.ts +2 -0
- package/types/resources/CreditNote.d.ts +3 -0
- package/types/resources/Einvoice.d.ts +17 -0
- package/types/resources/Estimate.d.ts +12 -0
- package/types/resources/Event.d.ts +7 -1
- package/types/resources/Gift.d.ts +13 -0
- package/types/resources/HostedPage.d.ts +12 -0
- package/types/resources/Invoice.d.ts +3 -0
- package/types/resources/ItemPrice.d.ts +13 -0
- package/types/resources/PricingPageSession.d.ts +1 -0
- package/types/resources/QuotedDeltaRamp.d.ts +16 -0
- package/types/resources/SalesOrder.d.ts +9 -0
- package/types/resources/WebhookEvent.d.ts +30 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,49 @@
|
|
|
1
|
+
### v3.16.0 (2025-12-01)
|
|
2
|
+
* * *
|
|
3
|
+
|
|
4
|
+
### New Resources:
|
|
5
|
+
* Einvoice has been added.
|
|
6
|
+
* QuotedDeltaRamp has been added.
|
|
7
|
+
|
|
8
|
+
### New Attributes:
|
|
9
|
+
* line_items_next_offset has been added to CreditNote.
|
|
10
|
+
* line_items_next_offset has been added to Invoice.
|
|
11
|
+
* credit_lines has been added to SalesOrder.
|
|
12
|
+
* billable_unit_price has been added to SalesOrder#LineItem.
|
|
13
|
+
* billable_quantity has been added to SalesOrder#LineItem.
|
|
14
|
+
* billable_amount has been added to SalesOrder#LineItem.
|
|
15
|
+
|
|
16
|
+
### New Endpoint:
|
|
17
|
+
* move action has been added to ItemPrice.
|
|
18
|
+
|
|
19
|
+
### New Parameters:
|
|
20
|
+
* line_items_limit has been added to CreditNote#RetrieveRequest.
|
|
21
|
+
* line_items_offset has been added to CreditNote#RetrieveRequest.
|
|
22
|
+
* line_items_limit has been added to Invoice#RetrieveRequest.
|
|
23
|
+
* line_items_offset has been added to Invoice#RetrieveRequest.
|
|
24
|
+
* item_tiers has been added to Estimate#GiftSubscriptionForItemsRequest.
|
|
25
|
+
* unit_price has been added to Estimate#SubscriptionItems#GiftSubscriptionForItemsRequest.
|
|
26
|
+
* unit_price_in_decimal has been added to Estimate#SubscriptionItems#GiftSubscriptionForItemsRequest.
|
|
27
|
+
* item_tiers has been added to Gift#CreateForItemsRequest.
|
|
28
|
+
* meta_data has been added to Gift#CreateForItemsRequest.
|
|
29
|
+
* unit_price has been added to Gift#SubscriptionItems#CreateForItemsRequest.
|
|
30
|
+
* unit_price_in_decimal has been added to Gift#SubscriptionItems#CreateForItemsRequest.
|
|
31
|
+
* item_tiers has been added to HostedPage#CheckoutGiftForItemsRequest.
|
|
32
|
+
* unit_price has been added to HostedPage#SubscriptionItems#CheckoutGiftForItemsRequest.
|
|
33
|
+
* unit_price_in_decimal has been added to HostedPage#SubscriptionItems#CheckoutGiftForItemsRequest.
|
|
34
|
+
* auto_select_local_currency has been added to PricingPageSession#CreateForNewSubscriptionRequest.
|
|
35
|
+
|
|
36
|
+
### New Enums:
|
|
37
|
+
* EZIDEBIT has been added to GatewayEnum.
|
|
38
|
+
* BUSINESS_RULE has been added to EntityTypeEnum.
|
|
39
|
+
* RULESET has been added to EntityTypeEnum.
|
|
40
|
+
|
|
41
|
+
### v3.15.1 (2025-10-29)
|
|
42
|
+
* * *
|
|
43
|
+
|
|
44
|
+
### Bug Fixes:
|
|
45
|
+
* Resolves(#88): an issue where requests made with the GET methods incorrectly included a request body, causing the Request interface to throw an error.
|
|
46
|
+
|
|
1
47
|
### v3.15.0 (2025-10-28)
|
|
2
48
|
* * *
|
|
3
49
|
|
package/cjs/RequestWrapper.js
CHANGED
|
@@ -38,7 +38,7 @@ class RequestWrapper {
|
|
|
38
38
|
const env = _env;
|
|
39
39
|
const retryConfig = Object.assign({ enabled: false, maxRetries: 3, delayMs: 200, retryOn: [500, 502, 503, 504] }, env.retryConfig);
|
|
40
40
|
const urlIdParam = this.apiCall.hasIdInUrl ? this.args[0] : null;
|
|
41
|
-
|
|
41
|
+
const params = this.apiCall.hasIdInUrl
|
|
42
42
|
? this.args[1]
|
|
43
43
|
: this.args[0];
|
|
44
44
|
let headers = this.apiCall.hasIdInUrl ? this.args[2] : this.args[1];
|
|
@@ -52,20 +52,21 @@ class RequestWrapper {
|
|
|
52
52
|
}
|
|
53
53
|
const makeRequest = async (attempt = 0) => {
|
|
54
54
|
let path = (0, util_js_1.getApiURL)(env, this.apiCall.urlPrefix, this.apiCall.urlSuffix, urlIdParam);
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
let requestParams = params;
|
|
56
|
+
if (typeof requestParams === 'undefined' || requestParams === null) {
|
|
57
|
+
requestParams = {};
|
|
57
58
|
}
|
|
58
59
|
if (this.apiCall.httpMethod === 'GET') {
|
|
59
60
|
const queryParam = this.apiCall.isListReq
|
|
60
|
-
? (0, util_js_1.encodeListParams)((0, util_js_1.serialize)(
|
|
61
|
-
: (0, util_js_1.encodeParams)((0, util_js_1.serialize)(
|
|
61
|
+
? (0, util_js_1.encodeListParams)((0, util_js_1.serialize)(requestParams))
|
|
62
|
+
: (0, util_js_1.encodeParams)((0, util_js_1.serialize)(requestParams));
|
|
62
63
|
path += '?' + queryParam;
|
|
63
|
-
|
|
64
|
+
requestParams = {};
|
|
64
65
|
}
|
|
65
66
|
const jsonKeys = this.apiCall.jsonKeys;
|
|
66
67
|
const data = this.apiCall.isJsonRequest
|
|
67
|
-
? JSON.stringify(
|
|
68
|
-
: (0, util_js_1.encodeParams)(
|
|
68
|
+
? JSON.stringify(requestParams)
|
|
69
|
+
: (0, util_js_1.encodeParams)(requestParams, undefined, undefined, undefined, jsonKeys);
|
|
69
70
|
const requestHeaders = Object.assign({}, this.httpHeaders);
|
|
70
71
|
if (data.length) {
|
|
71
72
|
(0, util_js_1.extend)(true, requestHeaders, {
|
|
@@ -89,7 +90,7 @@ class RequestWrapper {
|
|
|
89
90
|
const url = new URL(path, `${env.protocol}://${(0, util_js_1.getHost)(env, this.apiCall.subDomain)}${env.port ? `:${env.port}` : ''}`);
|
|
90
91
|
const request = new Request(url, {
|
|
91
92
|
method: this.apiCall.httpMethod,
|
|
92
|
-
body: data
|
|
93
|
+
body: data ? data : undefined,
|
|
93
94
|
headers: this._createHeaders(requestHeaders),
|
|
94
95
|
});
|
|
95
96
|
const resp = await this.envArg.httpClient.makeApiRequest(request, env.timeout);
|
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.
|
|
14
|
+
clientVersion: 'v3.16.0',
|
|
15
15
|
port: DEFAULT_PORT,
|
|
16
16
|
timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
|
|
17
17
|
exportWaitInMillis: DEFAULT_EXPORT_WAIT,
|
|
@@ -1671,6 +1671,7 @@ exports.Endpoints = {
|
|
|
1671
1671
|
],
|
|
1672
1672
|
paymentReferenceNumber: [],
|
|
1673
1673
|
paymentSchedule: [],
|
|
1674
|
+
einvoice: [],
|
|
1674
1675
|
taxWithheld: [],
|
|
1675
1676
|
creditNote: [
|
|
1676
1677
|
[
|
|
@@ -2051,6 +2052,7 @@ exports.Endpoints = {
|
|
|
2051
2052
|
null,
|
|
2052
2053
|
false,
|
|
2053
2054
|
{
|
|
2055
|
+
meta_data: 0,
|
|
2054
2056
|
additional_information: 1,
|
|
2055
2057
|
},
|
|
2056
2058
|
{
|
|
@@ -2951,6 +2953,7 @@ exports.Endpoints = {
|
|
|
2951
2953
|
quotedSubscription: [],
|
|
2952
2954
|
quotedCharge: [],
|
|
2953
2955
|
quotedRamp: [],
|
|
2956
|
+
quotedDeltaRamp: [],
|
|
2954
2957
|
billingConfiguration: [],
|
|
2955
2958
|
quoteLineGroup: [],
|
|
2956
2959
|
plan: [
|
|
@@ -3960,6 +3963,19 @@ exports.Endpoints = {
|
|
|
3960
3963
|
{},
|
|
3961
3964
|
{},
|
|
3962
3965
|
],
|
|
3966
|
+
[
|
|
3967
|
+
'moveItemPrice',
|
|
3968
|
+
'POST',
|
|
3969
|
+
'/item_prices',
|
|
3970
|
+
'/move',
|
|
3971
|
+
true,
|
|
3972
|
+
null,
|
|
3973
|
+
false,
|
|
3974
|
+
{},
|
|
3975
|
+
{
|
|
3976
|
+
isIdempotent: true,
|
|
3977
|
+
},
|
|
3978
|
+
],
|
|
3963
3979
|
],
|
|
3964
3980
|
attachedItem: [
|
|
3965
3981
|
[
|
package/esm/RequestWrapper.js
CHANGED
|
@@ -35,7 +35,7 @@ export class RequestWrapper {
|
|
|
35
35
|
const env = _env;
|
|
36
36
|
const retryConfig = Object.assign({ enabled: false, maxRetries: 3, delayMs: 200, retryOn: [500, 502, 503, 504] }, env.retryConfig);
|
|
37
37
|
const urlIdParam = this.apiCall.hasIdInUrl ? this.args[0] : null;
|
|
38
|
-
|
|
38
|
+
const params = this.apiCall.hasIdInUrl
|
|
39
39
|
? this.args[1]
|
|
40
40
|
: this.args[0];
|
|
41
41
|
let headers = this.apiCall.hasIdInUrl ? this.args[2] : this.args[1];
|
|
@@ -49,20 +49,21 @@ export class RequestWrapper {
|
|
|
49
49
|
}
|
|
50
50
|
const makeRequest = async (attempt = 0) => {
|
|
51
51
|
let path = getApiURL(env, this.apiCall.urlPrefix, this.apiCall.urlSuffix, urlIdParam);
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
let requestParams = params;
|
|
53
|
+
if (typeof requestParams === 'undefined' || requestParams === null) {
|
|
54
|
+
requestParams = {};
|
|
54
55
|
}
|
|
55
56
|
if (this.apiCall.httpMethod === 'GET') {
|
|
56
57
|
const queryParam = this.apiCall.isListReq
|
|
57
|
-
? encodeListParams(serialize(
|
|
58
|
-
: encodeParams(serialize(
|
|
58
|
+
? encodeListParams(serialize(requestParams))
|
|
59
|
+
: encodeParams(serialize(requestParams));
|
|
59
60
|
path += '?' + queryParam;
|
|
60
|
-
|
|
61
|
+
requestParams = {};
|
|
61
62
|
}
|
|
62
63
|
const jsonKeys = this.apiCall.jsonKeys;
|
|
63
64
|
const data = this.apiCall.isJsonRequest
|
|
64
|
-
? JSON.stringify(
|
|
65
|
-
: encodeParams(
|
|
65
|
+
? JSON.stringify(requestParams)
|
|
66
|
+
: encodeParams(requestParams, undefined, undefined, undefined, jsonKeys);
|
|
66
67
|
const requestHeaders = Object.assign({}, this.httpHeaders);
|
|
67
68
|
if (data.length) {
|
|
68
69
|
extend(true, requestHeaders, {
|
|
@@ -86,7 +87,7 @@ export class RequestWrapper {
|
|
|
86
87
|
const url = new URL(path, `${env.protocol}://${getHost(env, this.apiCall.subDomain)}${env.port ? `:${env.port}` : ''}`);
|
|
87
88
|
const request = new Request(url, {
|
|
88
89
|
method: this.apiCall.httpMethod,
|
|
89
|
-
body: data
|
|
90
|
+
body: data ? data : undefined,
|
|
90
91
|
headers: this._createHeaders(requestHeaders),
|
|
91
92
|
});
|
|
92
93
|
const resp = await this.envArg.httpClient.makeApiRequest(request, env.timeout);
|
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.
|
|
11
|
+
clientVersion: 'v3.16.0',
|
|
12
12
|
port: DEFAULT_PORT,
|
|
13
13
|
timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
|
|
14
14
|
exportWaitInMillis: DEFAULT_EXPORT_WAIT,
|
|
@@ -1668,6 +1668,7 @@ export const Endpoints = {
|
|
|
1668
1668
|
],
|
|
1669
1669
|
paymentReferenceNumber: [],
|
|
1670
1670
|
paymentSchedule: [],
|
|
1671
|
+
einvoice: [],
|
|
1671
1672
|
taxWithheld: [],
|
|
1672
1673
|
creditNote: [
|
|
1673
1674
|
[
|
|
@@ -2048,6 +2049,7 @@ export const Endpoints = {
|
|
|
2048
2049
|
null,
|
|
2049
2050
|
false,
|
|
2050
2051
|
{
|
|
2052
|
+
meta_data: 0,
|
|
2051
2053
|
additional_information: 1,
|
|
2052
2054
|
},
|
|
2053
2055
|
{
|
|
@@ -2948,6 +2950,7 @@ export const Endpoints = {
|
|
|
2948
2950
|
quotedSubscription: [],
|
|
2949
2951
|
quotedCharge: [],
|
|
2950
2952
|
quotedRamp: [],
|
|
2953
|
+
quotedDeltaRamp: [],
|
|
2951
2954
|
billingConfiguration: [],
|
|
2952
2955
|
quoteLineGroup: [],
|
|
2953
2956
|
plan: [
|
|
@@ -3957,6 +3960,19 @@ export const Endpoints = {
|
|
|
3957
3960
|
{},
|
|
3958
3961
|
{},
|
|
3959
3962
|
],
|
|
3963
|
+
[
|
|
3964
|
+
'moveItemPrice',
|
|
3965
|
+
'POST',
|
|
3966
|
+
'/item_prices',
|
|
3967
|
+
'/move',
|
|
3968
|
+
true,
|
|
3969
|
+
null,
|
|
3970
|
+
false,
|
|
3971
|
+
{},
|
|
3972
|
+
{
|
|
3973
|
+
isIdempotent: true,
|
|
3974
|
+
},
|
|
3975
|
+
],
|
|
3960
3976
|
],
|
|
3961
3977
|
attachedItem: [
|
|
3962
3978
|
[
|
package/package.json
CHANGED
package/types/core.d.ts
CHANGED
|
@@ -149,7 +149,9 @@ declare module 'chargebee' {
|
|
|
149
149
|
| 'sales_order'
|
|
150
150
|
| 'omnichannel_one_time_order'
|
|
151
151
|
| 'omnichannel_one_time_order_item'
|
|
152
|
-
| 'usage_file'
|
|
152
|
+
| 'usage_file'
|
|
153
|
+
| 'business_rule'
|
|
154
|
+
| 'ruleset';
|
|
153
155
|
type EventNameEnum = 'cancellation_page_loaded';
|
|
154
156
|
type EventTypeEnum =
|
|
155
157
|
| 'coupon_created'
|
|
@@ -425,6 +427,7 @@ declare module 'chargebee' {
|
|
|
425
427
|
| 'paystack'
|
|
426
428
|
| 'jp_morgan'
|
|
427
429
|
| 'deutsche_bank'
|
|
430
|
+
| 'ezidebit'
|
|
428
431
|
| 'gocardless'
|
|
429
432
|
| 'not_applicable';
|
|
430
433
|
type HierarchyOperationTypeEnum =
|
package/types/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
///<reference path='./resources/DifferentialPrice.d.ts' />
|
|
25
25
|
///<reference path='./resources/Discount.d.ts' />
|
|
26
26
|
///<reference path='./resources/Download.d.ts' />
|
|
27
|
+
///<reference path='./resources/Einvoice.d.ts' />
|
|
27
28
|
///<reference path='./resources/Entitlement.d.ts' />
|
|
28
29
|
///<reference path='./resources/EntitlementOverride.d.ts' />
|
|
29
30
|
///<reference path='./resources/Estimate.d.ts' />
|
|
@@ -75,6 +76,7 @@
|
|
|
75
76
|
///<reference path='./resources/Quote.d.ts' />
|
|
76
77
|
///<reference path='./resources/QuoteLineGroup.d.ts' />
|
|
77
78
|
///<reference path='./resources/QuotedCharge.d.ts' />
|
|
79
|
+
///<reference path='./resources/QuotedDeltaRamp.d.ts' />
|
|
78
80
|
///<reference path='./resources/QuotedRamp.d.ts' />
|
|
79
81
|
///<reference path='./resources/QuotedSubscription.d.ts' />
|
|
80
82
|
///<reference path='./resources/Ramp.d.ts' />
|
|
@@ -29,6 +29,7 @@ declare module 'chargebee' {
|
|
|
29
29
|
differential_price: DifferentialPrice;
|
|
30
30
|
discount: Discount;
|
|
31
31
|
download: Download;
|
|
32
|
+
einvoice: Einvoice;
|
|
32
33
|
entitlement: Entitlement;
|
|
33
34
|
entitlement_override: EntitlementOverride;
|
|
34
35
|
estimate: Estimate;
|
|
@@ -80,6 +81,7 @@ declare module 'chargebee' {
|
|
|
80
81
|
quote: Quote;
|
|
81
82
|
quote_line_group: QuoteLineGroup;
|
|
82
83
|
quoted_charge: QuotedCharge;
|
|
84
|
+
quoted_delta_ramp: QuotedDeltaRamp;
|
|
83
85
|
quoted_ramp: QuotedRamp;
|
|
84
86
|
quoted_subscription: QuotedSubscription;
|
|
85
87
|
ramp: Ramp;
|
|
@@ -37,6 +37,7 @@ declare module 'chargebee' {
|
|
|
37
37
|
resource_version?: number;
|
|
38
38
|
updated_at?: number;
|
|
39
39
|
channel?: ChannelEnum;
|
|
40
|
+
line_items_next_offset?: string;
|
|
40
41
|
sub_total: number;
|
|
41
42
|
sub_total_in_local_currency?: number;
|
|
42
43
|
total_in_local_currency?: number;
|
|
@@ -454,6 +455,8 @@ declare module 'chargebee' {
|
|
|
454
455
|
[key: `cf_${string}`]: unknown;
|
|
455
456
|
}
|
|
456
457
|
export interface RetrieveInputParam {
|
|
458
|
+
line_items_limit?: number;
|
|
459
|
+
line_items_offset?: string;
|
|
457
460
|
line_item?: LineItemRetrieveInputParam;
|
|
458
461
|
}
|
|
459
462
|
export interface PdfInputParam {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
4
|
+
declare module 'chargebee' {
|
|
5
|
+
export interface Einvoice {
|
|
6
|
+
id: string;
|
|
7
|
+
reference_number?: string;
|
|
8
|
+
status:
|
|
9
|
+
| 'scheduled'
|
|
10
|
+
| 'skipped'
|
|
11
|
+
| 'in_progress'
|
|
12
|
+
| 'success'
|
|
13
|
+
| 'failed'
|
|
14
|
+
| 'registered';
|
|
15
|
+
message?: string;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -413,6 +413,7 @@ declare module 'chargebee' {
|
|
|
413
413
|
payment_intent?: PaymentIntentGiftSubscriptionForItemsInputParam;
|
|
414
414
|
shipping_address?: ShippingAddressGiftSubscriptionForItemsInputParam;
|
|
415
415
|
subscription_items?: SubscriptionItemsGiftSubscriptionForItemsInputParam[];
|
|
416
|
+
item_tiers?: ItemTiersGiftSubscriptionForItemsInputParam[];
|
|
416
417
|
}
|
|
417
418
|
export interface CreateInvoiceInputParam {
|
|
418
419
|
currency_code?: string;
|
|
@@ -1131,6 +1132,17 @@ declare module 'chargebee' {
|
|
|
1131
1132
|
item_price_id?: string;
|
|
1132
1133
|
quantity?: number;
|
|
1133
1134
|
quantity_in_decimal?: string;
|
|
1135
|
+
unit_price?: number;
|
|
1136
|
+
unit_price_in_decimal?: string;
|
|
1137
|
+
}
|
|
1138
|
+
export interface ItemTiersGiftSubscriptionForItemsInputParam {
|
|
1139
|
+
item_price_id?: string;
|
|
1140
|
+
starting_unit?: number;
|
|
1141
|
+
ending_unit?: number;
|
|
1142
|
+
price?: number;
|
|
1143
|
+
starting_unit_in_decimal?: string;
|
|
1144
|
+
ending_unit_in_decimal?: string;
|
|
1145
|
+
price_in_decimal?: string;
|
|
1134
1146
|
}
|
|
1135
1147
|
export interface InvoiceCreateInvoiceInputParam {
|
|
1136
1148
|
customer_id?: string;
|
|
@@ -228,7 +228,13 @@ declare module 'chargebee' {
|
|
|
228
228
|
PaymentSourceUpdatedContent &
|
|
229
229
|
BusinessEntityDeletedContent &
|
|
230
230
|
AuthorizationVoidedContent &
|
|
231
|
-
SubscriptionRampDeletedContent
|
|
231
|
+
SubscriptionRampDeletedContent &
|
|
232
|
+
PlanDeletedContent &
|
|
233
|
+
AddonDeletedContent &
|
|
234
|
+
AddonUpdatedContent &
|
|
235
|
+
AddonCreatedContent &
|
|
236
|
+
PlanCreatedContent &
|
|
237
|
+
PlanUpdatedContent;
|
|
232
238
|
origin_user?: string;
|
|
233
239
|
}
|
|
234
240
|
|
|
@@ -131,11 +131,13 @@ declare module 'chargebee' {
|
|
|
131
131
|
no_expiry?: boolean;
|
|
132
132
|
claim_expiry_date?: number;
|
|
133
133
|
coupon_ids?: string[];
|
|
134
|
+
meta_data?: any;
|
|
134
135
|
gifter?: GifterCreateForItemsInputParam;
|
|
135
136
|
gift_receiver?: GiftReceiverCreateForItemsInputParam;
|
|
136
137
|
payment_intent?: PaymentIntentCreateForItemsInputParam;
|
|
137
138
|
shipping_address?: ShippingAddressCreateForItemsInputParam;
|
|
138
139
|
subscription_items?: SubscriptionItemsCreateForItemsInputParam[];
|
|
140
|
+
item_tiers?: ItemTiersCreateForItemsInputParam[];
|
|
139
141
|
}
|
|
140
142
|
export interface ListInputParam {
|
|
141
143
|
limit?: number;
|
|
@@ -286,6 +288,17 @@ declare module 'chargebee' {
|
|
|
286
288
|
item_price_id?: string;
|
|
287
289
|
quantity?: number;
|
|
288
290
|
quantity_in_decimal?: string;
|
|
291
|
+
unit_price?: number;
|
|
292
|
+
unit_price_in_decimal?: string;
|
|
293
|
+
}
|
|
294
|
+
export interface ItemTiersCreateForItemsInputParam {
|
|
295
|
+
item_price_id?: string;
|
|
296
|
+
starting_unit?: number;
|
|
297
|
+
ending_unit?: number;
|
|
298
|
+
price?: number;
|
|
299
|
+
starting_unit_in_decimal?: string;
|
|
300
|
+
ending_unit_in_decimal?: string;
|
|
301
|
+
price_in_decimal?: string;
|
|
289
302
|
}
|
|
290
303
|
export interface GifterGiftListInputParam {
|
|
291
304
|
customer_id?: filter.String;
|
|
@@ -435,6 +435,7 @@ declare module 'chargebee' {
|
|
|
435
435
|
coupon_ids?: string[];
|
|
436
436
|
gifter?: GifterCheckoutGiftForItemsInputParam;
|
|
437
437
|
subscription_items?: SubscriptionItemsCheckoutGiftForItemsInputParam[];
|
|
438
|
+
item_tiers?: ItemTiersCheckoutGiftForItemsInputParam[];
|
|
438
439
|
}
|
|
439
440
|
export interface ClaimGiftInputParam {
|
|
440
441
|
redirect_url?: string;
|
|
@@ -1105,6 +1106,17 @@ declare module 'chargebee' {
|
|
|
1105
1106
|
item_price_id?: string;
|
|
1106
1107
|
quantity?: number;
|
|
1107
1108
|
quantity_in_decimal?: string;
|
|
1109
|
+
unit_price?: number;
|
|
1110
|
+
unit_price_in_decimal?: string;
|
|
1111
|
+
}
|
|
1112
|
+
export interface ItemTiersCheckoutGiftForItemsInputParam {
|
|
1113
|
+
item_price_id?: string;
|
|
1114
|
+
starting_unit?: number;
|
|
1115
|
+
ending_unit?: number;
|
|
1116
|
+
price?: number;
|
|
1117
|
+
starting_unit_in_decimal?: string;
|
|
1118
|
+
ending_unit_in_decimal?: string;
|
|
1119
|
+
price_in_decimal?: string;
|
|
1108
1120
|
}
|
|
1109
1121
|
export interface GiftClaimGiftInputParam {
|
|
1110
1122
|
id: string;
|
|
@@ -42,6 +42,7 @@ declare module 'chargebee' {
|
|
|
42
42
|
voided_at?: number;
|
|
43
43
|
resource_version?: number;
|
|
44
44
|
updated_at?: number;
|
|
45
|
+
line_items_next_offset?: string;
|
|
45
46
|
first_invoice?: boolean;
|
|
46
47
|
new_sales_amount?: number;
|
|
47
48
|
has_advance_charges?: boolean;
|
|
@@ -1062,6 +1063,8 @@ declare module 'chargebee' {
|
|
|
1062
1063
|
offset?: string;
|
|
1063
1064
|
}
|
|
1064
1065
|
export interface RetrieveInputParam {
|
|
1066
|
+
line_items_limit?: number;
|
|
1067
|
+
line_items_offset?: string;
|
|
1065
1068
|
line_item?: LineItemRetrieveInputParam;
|
|
1066
1069
|
}
|
|
1067
1070
|
export interface PdfInputParam {
|
|
@@ -91,6 +91,12 @@ declare module 'chargebee' {
|
|
|
91
91
|
input?: FindApplicableItemPricesInputParam,
|
|
92
92
|
headers?: ChargebeeRequestHeader,
|
|
93
93
|
): Promise<ChargebeeResponse<FindApplicableItemPricesResponse>>;
|
|
94
|
+
|
|
95
|
+
moveItemPrice(
|
|
96
|
+
item_price_id: string,
|
|
97
|
+
input: MoveItemPriceInputParam,
|
|
98
|
+
headers?: ChargebeeRequestHeader,
|
|
99
|
+
): Promise<ChargebeeResponse<MoveItemPriceResponse>>;
|
|
94
100
|
}
|
|
95
101
|
|
|
96
102
|
export interface CreateResponse {
|
|
@@ -124,6 +130,10 @@ declare module 'chargebee' {
|
|
|
124
130
|
next_offset?: string;
|
|
125
131
|
}
|
|
126
132
|
|
|
133
|
+
export interface MoveItemPriceResponse {
|
|
134
|
+
item_price: ItemPrice;
|
|
135
|
+
}
|
|
136
|
+
|
|
127
137
|
export interface Tier {
|
|
128
138
|
starting_unit: number;
|
|
129
139
|
ending_unit?: number;
|
|
@@ -269,6 +279,9 @@ declare module 'chargebee' {
|
|
|
269
279
|
'sort_by[asc]'?: string;
|
|
270
280
|
'sort_by[desc]'?: string;
|
|
271
281
|
}
|
|
282
|
+
export interface MoveItemPriceInputParam {
|
|
283
|
+
destination_item_id: string;
|
|
284
|
+
}
|
|
272
285
|
export interface TaxDetailCreateInputParam {
|
|
273
286
|
tax_profile_id?: string;
|
|
274
287
|
avalara_tax_code?: string;
|
|
@@ -36,6 +36,7 @@ declare module 'chargebee' {
|
|
|
36
36
|
export interface CreateForNewSubscriptionInputParam {
|
|
37
37
|
redirect_url?: string;
|
|
38
38
|
business_entity_id?: string;
|
|
39
|
+
auto_select_local_currency?: boolean;
|
|
39
40
|
pricing_page?: PricingPageCreateForNewSubscriptionInputParam;
|
|
40
41
|
subscription?: SubscriptionCreateForNewSubscriptionInputParam;
|
|
41
42
|
customer?: CustomerCreateForNewSubscriptionInputParam;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
4
|
+
declare module 'chargebee' {
|
|
5
|
+
export interface QuotedDeltaRamp {
|
|
6
|
+
line_items?: QuotedDeltaRamp.LineItem[];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export namespace QuotedDeltaRamp {
|
|
10
|
+
export interface LineItem {
|
|
11
|
+
item_level_discount_per_billing_cycle_in_decimal?: string;
|
|
12
|
+
}
|
|
13
|
+
// REQUEST PARAMS
|
|
14
|
+
//---------------
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -27,6 +27,7 @@ declare module 'chargebee' {
|
|
|
27
27
|
billing_configuration?: SalesOrder.BillingConfiguration;
|
|
28
28
|
renewal_term?: SalesOrder.RenewalTerm;
|
|
29
29
|
status: 'active' | 'completed';
|
|
30
|
+
credit_lines?: SalesOrder.CreditLine[];
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
export namespace SalesOrder {
|
|
@@ -37,6 +38,9 @@ declare module 'chargebee' {
|
|
|
37
38
|
name?: string;
|
|
38
39
|
quantity: string;
|
|
39
40
|
unit_price: string;
|
|
41
|
+
billable_unit_price?: string;
|
|
42
|
+
billable_quantity?: string;
|
|
43
|
+
billable_amount?: string;
|
|
40
44
|
billing_period?: number;
|
|
41
45
|
billing_period_unit?: 'day' | 'week' | 'month' | 'year';
|
|
42
46
|
service_period_days?: number;
|
|
@@ -137,6 +141,11 @@ declare module 'chargebee' {
|
|
|
137
141
|
cancellation_cutoff_period?: number;
|
|
138
142
|
renewal_billing_cycles?: number;
|
|
139
143
|
}
|
|
144
|
+
export interface CreditLine {
|
|
145
|
+
amount: string;
|
|
146
|
+
unit_price: string;
|
|
147
|
+
line_item_association_id?: string;
|
|
148
|
+
}
|
|
140
149
|
// REQUEST PARAMS
|
|
141
150
|
//---------------
|
|
142
151
|
}
|
|
@@ -213,6 +213,12 @@ declare module 'chargebee' {
|
|
|
213
213
|
BusinessEntityDeleted = 'business_entity_deleted',
|
|
214
214
|
AuthorizationVoided = 'authorization_voided',
|
|
215
215
|
SubscriptionRampDeleted = 'subscription_ramp_deleted',
|
|
216
|
+
PlanDeleted = 'plan_deleted',
|
|
217
|
+
AddonDeleted = 'addon_deleted',
|
|
218
|
+
AddonUpdated = 'addon_updated',
|
|
219
|
+
AddonCreated = 'addon_created',
|
|
220
|
+
PlanCreated = 'plan_created',
|
|
221
|
+
PlanUpdated = 'plan_updated',
|
|
216
222
|
}
|
|
217
223
|
|
|
218
224
|
export type WebhookContentMap = {
|
|
@@ -425,6 +431,12 @@ declare module 'chargebee' {
|
|
|
425
431
|
[WebhookContentType.BusinessEntityDeleted]: BusinessEntityDeletedContent;
|
|
426
432
|
[WebhookContentType.AuthorizationVoided]: AuthorizationVoidedContent;
|
|
427
433
|
[WebhookContentType.SubscriptionRampDeleted]: SubscriptionRampDeletedContent;
|
|
434
|
+
[WebhookContentType.PlanDeleted]: PlanDeletedContent;
|
|
435
|
+
[WebhookContentType.AddonDeleted]: AddonDeletedContent;
|
|
436
|
+
[WebhookContentType.AddonUpdated]: AddonUpdatedContent;
|
|
437
|
+
[WebhookContentType.AddonCreated]: AddonCreatedContent;
|
|
438
|
+
[WebhookContentType.PlanCreated]: PlanCreatedContent;
|
|
439
|
+
[WebhookContentType.PlanUpdated]: PlanUpdatedContent;
|
|
428
440
|
};
|
|
429
441
|
|
|
430
442
|
export type ContentFor<T extends WebhookContentType> = WebhookContentMap[T];
|
|
@@ -1621,4 +1633,22 @@ declare module 'chargebee' {
|
|
|
1621
1633
|
export type SubscriptionRampDeletedContent = {
|
|
1622
1634
|
ramp: Ramp;
|
|
1623
1635
|
};
|
|
1636
|
+
export type PlanDeletedContent = {
|
|
1637
|
+
plan: Plan;
|
|
1638
|
+
};
|
|
1639
|
+
export type AddonDeletedContent = {
|
|
1640
|
+
addon: Addon;
|
|
1641
|
+
};
|
|
1642
|
+
export type AddonUpdatedContent = {
|
|
1643
|
+
addon: Addon;
|
|
1644
|
+
};
|
|
1645
|
+
export type AddonCreatedContent = {
|
|
1646
|
+
addon: Addon;
|
|
1647
|
+
};
|
|
1648
|
+
export type PlanCreatedContent = {
|
|
1649
|
+
plan: Plan;
|
|
1650
|
+
};
|
|
1651
|
+
export type PlanUpdatedContent = {
|
|
1652
|
+
plan: Plan;
|
|
1653
|
+
};
|
|
1624
1654
|
}
|