chargebee 3.6.1 → 3.7.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 +34 -0
- package/cjs/resources/api_endpoints.js +22 -0
- package/esm/resources/api_endpoints.js +22 -0
- package/package.json +1 -1
- package/types/core.d.ts +1 -0
- package/types/index.d.ts +2 -0
- package/types/resources/Estimate.d.ts +3 -3
- package/types/resources/HostedPage.d.ts +2 -2
- package/types/resources/Invoice.d.ts +18 -0
- package/types/resources/OmnichannelSubscription.d.ts +1 -0
- package/types/resources/OmnichannelSubscriptionItem.d.ts +4 -2
- package/types/resources/PricingPageSession.d.ts +2 -2
- package/types/resources/Quote.d.ts +4 -4
- package/types/resources/Subscription.d.ts +3 -3
- package/types/resources/UsageFile.d.ts +56 -0
- package/types/resources/VirtualBankAccount.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
1
|
+
### v3.7.0 (2025-05-15)
|
|
2
|
+
* * *
|
|
3
|
+
|
|
4
|
+
### New Resources
|
|
5
|
+
* UsageFile has been added.
|
|
6
|
+
|
|
7
|
+
### Input Parameter
|
|
8
|
+
* discount[apply_on] has been made optional from required in Estimate#CreateSubItemEstimateRequest.
|
|
9
|
+
* discount[apply_on] has been made optional from required in Estimate#CreateSubItemForCustomerEstimateRequest.
|
|
10
|
+
* discount[apply_on] has been made optional from required in Estimate#UpdateSubscriptionForItemsRequest.
|
|
11
|
+
* discount[apply_on] has been made optional from required in HostedPage#CheckoutNewForItemsRequest.
|
|
12
|
+
* discount[apply_on] has been made optional from required in HostedPage#CheckoutNewForItemsRequest.
|
|
13
|
+
* discount[apply_on] has been made optional from required in HostedPage#CheckoutNewForItemsRequest.
|
|
14
|
+
* discount[apply_on] has been made optional from required in HostedPage#CheckoutNewForItemsRequest.
|
|
15
|
+
* discount[apply_on] has been made optional from required in PricingPageSession#CheckoutNewForItemsRequest.
|
|
16
|
+
* discount[apply_on] has been made optional from required in PricingPageSession#CreateForExistingSubscriptionRequest.
|
|
17
|
+
* discount[apply_on] has been made optional from required in Quote#CreateSubItemsForCustomerQuoteRequest.
|
|
18
|
+
* discount[apply_on] has been made optional from required in Quote#EditCreateSubCustomerQuoteForItemsRequest.
|
|
19
|
+
* discount[apply_on] has been made optional from required in Quote#UpdateSubscriptionQuoteForItemsRequest.
|
|
20
|
+
* discount[apply_on] has been made optional from required in Quote#EditUpdateSubscriptionQuoteForItemsRequest.
|
|
21
|
+
* discount[apply_on] has been made optional from required in Subscription#CreateWithItemsRequest.
|
|
22
|
+
* discount[apply_on] has been made optional from required in Subscription#UpdateForItemsRequest.
|
|
23
|
+
* discount[apply_on] has been made optional from required in Subscription#ImportForItemsRequest.
|
|
24
|
+
* line_item_addresses[] has been added to Invoice#ImportInvoiceRequest.
|
|
25
|
+
* source has been added to OmnichannelSubscription#OmnichannelSubscriptionListRequest.
|
|
26
|
+
|
|
27
|
+
### Attributes:
|
|
28
|
+
* swift_code has been made optional from required in VirtualBankAccount.
|
|
29
|
+
|
|
30
|
+
### Enum Attributes:
|
|
31
|
+
* OMNICHANNEL_SUBSCRIPTION_ITEM_PAUSED has been added to EventTypeEnum.
|
|
32
|
+
* PAUSED has been added to OmnichannelSubscriptionItem#StatusEnum.
|
|
33
|
+
* MERCHANT_REVOKED has been added to OmnichannelSubscriptionItem#CancellationReasonEnum.
|
|
34
|
+
|
|
1
35
|
### v3.6.1 (2025-04-25)
|
|
2
36
|
* * *
|
|
3
37
|
|
|
@@ -2860,4 +2860,26 @@ exports.Endpoints = {
|
|
|
2860
2860
|
],
|
|
2861
2861
|
],
|
|
2862
2862
|
omnichannelSubscriptionItemScheduledChange: [],
|
|
2863
|
+
usageFile: [
|
|
2864
|
+
[
|
|
2865
|
+
'upload',
|
|
2866
|
+
'POST',
|
|
2867
|
+
'/usage_files',
|
|
2868
|
+
'/upload',
|
|
2869
|
+
false,
|
|
2870
|
+
'file-ingest',
|
|
2871
|
+
false,
|
|
2872
|
+
{},
|
|
2873
|
+
],
|
|
2874
|
+
[
|
|
2875
|
+
'status',
|
|
2876
|
+
'GET',
|
|
2877
|
+
'/usage_files',
|
|
2878
|
+
'/status',
|
|
2879
|
+
true,
|
|
2880
|
+
'file-ingest',
|
|
2881
|
+
false,
|
|
2882
|
+
{},
|
|
2883
|
+
],
|
|
2884
|
+
],
|
|
2863
2885
|
};
|
|
@@ -2857,4 +2857,26 @@ export const Endpoints = {
|
|
|
2857
2857
|
],
|
|
2858
2858
|
],
|
|
2859
2859
|
omnichannelSubscriptionItemScheduledChange: [],
|
|
2860
|
+
usageFile: [
|
|
2861
|
+
[
|
|
2862
|
+
'upload',
|
|
2863
|
+
'POST',
|
|
2864
|
+
'/usage_files',
|
|
2865
|
+
'/upload',
|
|
2866
|
+
false,
|
|
2867
|
+
'file-ingest',
|
|
2868
|
+
false,
|
|
2869
|
+
{},
|
|
2870
|
+
],
|
|
2871
|
+
[
|
|
2872
|
+
'status',
|
|
2873
|
+
'GET',
|
|
2874
|
+
'/usage_files',
|
|
2875
|
+
'/status',
|
|
2876
|
+
true,
|
|
2877
|
+
'file-ingest',
|
|
2878
|
+
false,
|
|
2879
|
+
{},
|
|
2880
|
+
],
|
|
2881
|
+
],
|
|
2860
2882
|
};
|
package/package.json
CHANGED
package/types/core.d.ts
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
///<reference path='./resources/UnbilledCharge.d.ts' />
|
|
82
82
|
///<reference path='./resources/Usage.d.ts' />
|
|
83
83
|
///<reference path='./resources/UsageEvent.d.ts' />
|
|
84
|
+
///<reference path='./resources/UsageFile.d.ts' />
|
|
84
85
|
///<reference path='./resources/VirtualBankAccount.d.ts' />
|
|
85
86
|
|
|
86
87
|
export type Config = {
|
|
@@ -180,6 +181,7 @@ declare module 'chargebee' {
|
|
|
180
181
|
unbilledCharge: UnbilledCharge.UnbilledChargeResource;
|
|
181
182
|
usage: Usage.UsageResource;
|
|
182
183
|
usageEvent: UsageEvent.UsageEventResource;
|
|
184
|
+
usageFile: UsageFile.UsageFileResource;
|
|
183
185
|
virtualBankAccount: VirtualBankAccount.VirtualBankAccountResource;
|
|
184
186
|
}
|
|
185
187
|
}
|
|
@@ -615,7 +615,7 @@ declare module 'chargebee' {
|
|
|
615
615
|
charge_on_option?: ChargeOnOptionEnum;
|
|
616
616
|
}
|
|
617
617
|
export interface DiscountsCreateSubItemEstimateInputParam {
|
|
618
|
-
apply_on
|
|
618
|
+
apply_on?: ApplyOnEnum;
|
|
619
619
|
duration_type: DurationTypeEnum;
|
|
620
620
|
percentage?: number;
|
|
621
621
|
amount?: number;
|
|
@@ -751,7 +751,7 @@ declare module 'chargebee' {
|
|
|
751
751
|
charge_on_option?: ChargeOnOptionEnum;
|
|
752
752
|
}
|
|
753
753
|
export interface DiscountsCreateSubItemForCustomerEstimateInputParam {
|
|
754
|
-
apply_on
|
|
754
|
+
apply_on?: ApplyOnEnum;
|
|
755
755
|
duration_type: DurationTypeEnum;
|
|
756
756
|
percentage?: number;
|
|
757
757
|
amount?: number;
|
|
@@ -909,7 +909,7 @@ declare module 'chargebee' {
|
|
|
909
909
|
proration_type?: ProrationTypeEnum;
|
|
910
910
|
}
|
|
911
911
|
export interface DiscountsUpdateSubscriptionForItemsInputParam {
|
|
912
|
-
apply_on
|
|
912
|
+
apply_on?: ApplyOnEnum;
|
|
913
913
|
duration_type: DurationTypeEnum;
|
|
914
914
|
percentage?: number;
|
|
915
915
|
amount?: number;
|
|
@@ -842,7 +842,7 @@ declare module 'chargebee' {
|
|
|
842
842
|
charge_on_option?: ChargeOnOptionEnum;
|
|
843
843
|
}
|
|
844
844
|
export interface DiscountsCheckoutNewForItemsInputParam {
|
|
845
|
-
apply_on
|
|
845
|
+
apply_on?: ApplyOnEnum;
|
|
846
846
|
duration_type: DurationTypeEnum;
|
|
847
847
|
percentage?: number;
|
|
848
848
|
amount?: number;
|
|
@@ -977,7 +977,7 @@ declare module 'chargebee' {
|
|
|
977
977
|
item_type?: ItemTypeEnum;
|
|
978
978
|
}
|
|
979
979
|
export interface DiscountsCheckoutExistingForItemsInputParam {
|
|
980
|
-
apply_on
|
|
980
|
+
apply_on?: ApplyOnEnum;
|
|
981
981
|
duration_type: DurationTypeEnum;
|
|
982
982
|
percentage?: number;
|
|
983
983
|
amount?: number;
|
|
@@ -956,6 +956,7 @@ declare module 'chargebee' {
|
|
|
956
956
|
taxes?: TaxesImportInvoiceInputParam[];
|
|
957
957
|
payments?: PaymentsImportInvoiceInputParam[];
|
|
958
958
|
notes?: NotesImportInvoiceInputParam[];
|
|
959
|
+
line_item_addresses?: LineItemAddressesImportInvoiceInputParam[];
|
|
959
960
|
}
|
|
960
961
|
export interface ApplyPaymentsInputParam {
|
|
961
962
|
comment?: string;
|
|
@@ -1539,6 +1540,23 @@ declare module 'chargebee' {
|
|
|
1539
1540
|
quantity_used_in_decimal?: string;
|
|
1540
1541
|
unit_amount_in_decimal?: string;
|
|
1541
1542
|
}
|
|
1543
|
+
export interface LineItemAddressesImportInvoiceInputParam {
|
|
1544
|
+
line_item_id?: string;
|
|
1545
|
+
first_name?: string;
|
|
1546
|
+
last_name?: string;
|
|
1547
|
+
email?: string;
|
|
1548
|
+
company?: string;
|
|
1549
|
+
phone?: string;
|
|
1550
|
+
line1?: string;
|
|
1551
|
+
line2?: string;
|
|
1552
|
+
line3?: string;
|
|
1553
|
+
city?: string;
|
|
1554
|
+
state_code?: string;
|
|
1555
|
+
state?: string;
|
|
1556
|
+
zip?: string;
|
|
1557
|
+
country?: string;
|
|
1558
|
+
validation_status?: ValidationStatusEnum;
|
|
1559
|
+
}
|
|
1542
1560
|
export interface LineItemsImportInvoiceInputParam {
|
|
1543
1561
|
id?: string;
|
|
1544
1562
|
date_from?: number;
|
|
@@ -11,7 +11,8 @@ declare module 'chargebee' {
|
|
|
11
11
|
| 'expired'
|
|
12
12
|
| 'cancelled'
|
|
13
13
|
| 'in_dunning'
|
|
14
|
-
| 'in_grace_period'
|
|
14
|
+
| 'in_grace_period'
|
|
15
|
+
| 'paused';
|
|
15
16
|
auto_renew_status?: 'off' | 'on';
|
|
16
17
|
current_term_start?: number;
|
|
17
18
|
current_term_end?: number;
|
|
@@ -22,7 +23,8 @@ declare module 'chargebee' {
|
|
|
22
23
|
| 'customer_cancelled'
|
|
23
24
|
| 'customer_did_not_consent_to_price_increase'
|
|
24
25
|
| 'refunded_due_to_app_issue'
|
|
25
|
-
| 'refunded_for_other_reason'
|
|
26
|
+
| 'refunded_for_other_reason'
|
|
27
|
+
| 'merchant_revoked';
|
|
26
28
|
grace_period_expires_at?: number;
|
|
27
29
|
has_scheduled_changes: boolean;
|
|
28
30
|
resource_version?: number;
|
|
@@ -98,7 +98,7 @@ declare module 'chargebee' {
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
export interface DiscountsCreateForNewSubscriptionInputParam {
|
|
101
|
-
apply_on
|
|
101
|
+
apply_on?: ApplyOnEnum;
|
|
102
102
|
duration_type: DurationTypeEnum;
|
|
103
103
|
percentage?: number;
|
|
104
104
|
amount?: number;
|
|
@@ -116,7 +116,7 @@ declare module 'chargebee' {
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
export interface DiscountsCreateForExistingSubscriptionInputParam {
|
|
119
|
-
apply_on
|
|
119
|
+
apply_on?: ApplyOnEnum;
|
|
120
120
|
duration_type: DurationTypeEnum;
|
|
121
121
|
percentage?: number;
|
|
122
122
|
amount?: number;
|
|
@@ -1083,7 +1083,7 @@ declare module 'chargebee' {
|
|
|
1083
1083
|
charge_on_option?: ChargeOnOptionEnum;
|
|
1084
1084
|
}
|
|
1085
1085
|
export interface DiscountsCreateSubItemsForCustomerQuoteInputParam {
|
|
1086
|
-
apply_on
|
|
1086
|
+
apply_on?: ApplyOnEnum;
|
|
1087
1087
|
duration_type: DurationTypeEnum;
|
|
1088
1088
|
percentage?: number;
|
|
1089
1089
|
amount?: number;
|
|
@@ -1153,7 +1153,7 @@ declare module 'chargebee' {
|
|
|
1153
1153
|
charge_on_option?: ChargeOnOptionEnum;
|
|
1154
1154
|
}
|
|
1155
1155
|
export interface DiscountsEditCreateSubCustomerQuoteForItemsInputParam {
|
|
1156
|
-
apply_on
|
|
1156
|
+
apply_on?: ApplyOnEnum;
|
|
1157
1157
|
duration_type: DurationTypeEnum;
|
|
1158
1158
|
percentage?: number;
|
|
1159
1159
|
amount?: number;
|
|
@@ -1249,7 +1249,7 @@ declare module 'chargebee' {
|
|
|
1249
1249
|
item_type?: ItemTypeEnum;
|
|
1250
1250
|
}
|
|
1251
1251
|
export interface DiscountsUpdateSubscriptionQuoteForItemsInputParam {
|
|
1252
|
-
apply_on
|
|
1252
|
+
apply_on?: ApplyOnEnum;
|
|
1253
1253
|
duration_type: DurationTypeEnum;
|
|
1254
1254
|
percentage?: number;
|
|
1255
1255
|
amount?: number;
|
|
@@ -1346,7 +1346,7 @@ declare module 'chargebee' {
|
|
|
1346
1346
|
item_type?: ItemTypeEnum;
|
|
1347
1347
|
}
|
|
1348
1348
|
export interface DiscountsEditUpdateSubscriptionQuoteForItemsInputParam {
|
|
1349
|
-
apply_on
|
|
1349
|
+
apply_on?: ApplyOnEnum;
|
|
1350
1350
|
duration_type: DurationTypeEnum;
|
|
1351
1351
|
percentage?: number;
|
|
1352
1352
|
amount?: number;
|
|
@@ -1644,7 +1644,7 @@ declare module 'chargebee' {
|
|
|
1644
1644
|
usage_accumulation_reset_frequency?: UsageAccumulationResetFrequencyEnum;
|
|
1645
1645
|
}
|
|
1646
1646
|
export interface DiscountsCreateWithItemsInputParam {
|
|
1647
|
-
apply_on
|
|
1647
|
+
apply_on?: ApplyOnEnum;
|
|
1648
1648
|
duration_type: DurationTypeEnum;
|
|
1649
1649
|
percentage?: number;
|
|
1650
1650
|
amount?: number;
|
|
@@ -1981,7 +1981,7 @@ declare module 'chargebee' {
|
|
|
1981
1981
|
usage_accumulation_reset_frequency?: UsageAccumulationResetFrequencyEnum;
|
|
1982
1982
|
}
|
|
1983
1983
|
export interface DiscountsUpdateForItemsInputParam {
|
|
1984
|
-
apply_on
|
|
1984
|
+
apply_on?: ApplyOnEnum;
|
|
1985
1985
|
duration_type: DurationTypeEnum;
|
|
1986
1986
|
percentage?: number;
|
|
1987
1987
|
amount?: number;
|
|
@@ -2389,7 +2389,7 @@ declare module 'chargebee' {
|
|
|
2389
2389
|
item_type?: ItemTypeEnum;
|
|
2390
2390
|
}
|
|
2391
2391
|
export interface DiscountsImportForItemsInputParam {
|
|
2392
|
-
apply_on
|
|
2392
|
+
apply_on?: ApplyOnEnum;
|
|
2393
2393
|
duration_type: DurationTypeEnum;
|
|
2394
2394
|
percentage?: number;
|
|
2395
2395
|
amount?: number;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
4
|
+
declare module 'chargebee' {
|
|
5
|
+
export interface UsageFile {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
mime_type: string;
|
|
9
|
+
error_code?: string;
|
|
10
|
+
error_reason?: string;
|
|
11
|
+
status?: 'queued' | 'imported' | 'processing' | 'processed' | 'failed';
|
|
12
|
+
total_records_count?: number;
|
|
13
|
+
processed_records_count?: number;
|
|
14
|
+
failed_records_count?: number;
|
|
15
|
+
file_size_in_bytes?: number;
|
|
16
|
+
processing_started_at?: number;
|
|
17
|
+
processing_completed_at?: number;
|
|
18
|
+
uploaded_by?: string;
|
|
19
|
+
uploaded_at?: number;
|
|
20
|
+
upload_details?: UsageFile.UploadDetail;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export namespace UsageFile {
|
|
24
|
+
export class UsageFileResource {
|
|
25
|
+
upload(
|
|
26
|
+
input: UploadInputParam,
|
|
27
|
+
headers?: ChargebeeRequestHeader,
|
|
28
|
+
): Promise<ChargebeeResponse<UploadResponse>>;
|
|
29
|
+
|
|
30
|
+
status(
|
|
31
|
+
usage_file_id: string,
|
|
32
|
+
headers?: ChargebeeRequestHeader,
|
|
33
|
+
): Promise<ChargebeeResponse<StatusResponse>>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface UploadResponse {
|
|
37
|
+
usage_file: UsageFile;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface StatusResponse {
|
|
41
|
+
usage_file: UsageFile;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface UploadDetail {
|
|
45
|
+
url: string;
|
|
46
|
+
expires_at: number;
|
|
47
|
+
}
|
|
48
|
+
// REQUEST PARAMS
|
|
49
|
+
//---------------
|
|
50
|
+
|
|
51
|
+
export interface UploadInputParam {
|
|
52
|
+
file_name: string;
|
|
53
|
+
mime_type: string;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|