chargebee 2.40.0 → 3.0.0-beta.1
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 +10 -1
- package/LICENSE +1 -1
- package/README.md +90 -172
- package/cjs/RequestWrapper.js +81 -0
- package/cjs/asyncApiSupport.js +39 -0
- package/cjs/chargebee.cjs.js +13 -0
- package/cjs/chargebee.cjs.worker.js +9 -0
- package/cjs/chargebeeError.js +17 -0
- package/cjs/coreCommon.js +72 -0
- package/cjs/createChargebee.js +92 -0
- package/cjs/environment.js +18 -0
- package/cjs/filter.js +1 -0
- package/cjs/net/ClientInterface.js +40 -0
- package/cjs/net/FetchClient.js +86 -0
- package/cjs/net/NodeClient.js +61 -0
- package/cjs/package.json +1 -0
- package/cjs/resources/api_endpoints.js +1086 -0
- package/cjs/util.js +218 -0
- package/esm/RequestWrapper.js +77 -0
- package/esm/asyncApiSupport.js +35 -0
- package/esm/chargebee.esm.js +9 -0
- package/esm/chargebee.esm.worker.js +5 -0
- package/esm/chargebeeError.js +13 -0
- package/esm/coreCommon.js +67 -0
- package/esm/createChargebee.js +88 -0
- package/esm/environment.js +15 -0
- package/esm/filter.js +1 -0
- package/esm/net/ClientInterface.js +35 -0
- package/esm/net/FetchClient.js +81 -0
- package/esm/net/NodeClient.js +56 -0
- package/esm/package.json +1 -0
- package/esm/resources/api_endpoints.js +1083 -0
- package/esm/util.js +202 -0
- package/package.json +69 -38
- package/types/core.d.ts +558 -89
- package/types/index.d.ts +91 -54
- package/types/resources/Address.d.ts +57 -272
- package/types/resources/AdvanceInvoiceSchedule.d.ts +21 -94
- package/types/resources/AttachedItem.d.ts +91 -329
- package/types/resources/Attribute.d.ts +5 -5
- package/types/resources/BusinessEntity.d.ts +49 -69
- package/types/resources/BusinessEntityTransfer.d.ts +11 -17
- package/types/resources/Card.d.ts +146 -424
- package/types/resources/Comment.d.ts +72 -189
- package/types/resources/Contact.d.ts +12 -64
- package/types/resources/ContractTerm.d.ts +15 -96
- package/types/resources/Coupon.d.ts +282 -758
- package/types/resources/CouponCode.d.ts +56 -52
- package/types/resources/CouponSet.d.ts +92 -234
- package/types/resources/CreditNote.d.ts +588 -1758
- package/types/resources/CreditNoteEstimate.d.ts +131 -157
- package/types/resources/Currency.d.ts +75 -62
- package/types/resources/Customer.d.ts +892 -835
- package/types/resources/CustomerEntitlement.d.ts +36 -0
- package/types/resources/DifferentialPrice.d.ts +116 -314
- package/types/resources/Discount.d.ts +20 -125
- package/types/resources/Download.d.ts +6 -22
- package/types/resources/Entitlement.d.ts +51 -160
- package/types/resources/EntitlementOverride.d.ts +58 -139
- package/types/resources/Estimate.d.ts +1178 -527
- package/types/resources/Event.d.ts +67 -178
- package/types/resources/Export.d.ts +563 -723
- package/types/resources/Feature.d.ts +117 -433
- package/types/resources/GatewayErrorDetail.d.ts +16 -72
- package/types/resources/Gift.d.ts +265 -432
- package/types/resources/Hierarchy.d.ts +8 -36
- package/types/resources/HostedPage.d.ts +1017 -1153
- package/types/resources/ImpactedItem.d.ts +13 -50
- package/types/resources/ImpactedItemPrice.d.ts +13 -15
- package/types/resources/ImpactedSubscription.d.ts +13 -45
- package/types/resources/InAppSubscription.d.ts +93 -389
- package/types/resources/Installment.d.ts +35 -110
- package/types/resources/InstallmentConfig.d.ts +54 -155
- package/types/resources/InstallmentDetail.d.ts +19 -27
- package/types/resources/Invoice.d.ts +1574 -3157
- package/types/resources/InvoiceEstimate.d.ts +131 -161
- package/types/resources/Item.d.ts +133 -611
- package/types/resources/ItemEntitlement.d.ts +78 -215
- package/types/resources/ItemFamily.d.ts +69 -178
- package/types/resources/ItemPrice.d.ts +291 -1203
- package/types/resources/Metadata.d.ts +3 -5
- package/types/resources/Order.d.ts +538 -1471
- package/types/resources/PaymentIntent.d.ts +163 -347
- package/types/resources/PaymentReferenceNumber.d.ts +7 -29
- package/types/resources/PaymentSource.d.ts +476 -1272
- package/types/resources/PaymentVoucher.d.ts +87 -306
- package/types/resources/PortalSession.d.ts +71 -207
- package/types/resources/PriceVariant.d.ts +91 -279
- package/types/resources/PricingPageSession.d.ts +92 -41
- package/types/resources/PromotionalCredit.d.ts +90 -346
- package/types/resources/Purchase.d.ts +185 -315
- package/types/resources/Quote.d.ts +1406 -887
- package/types/resources/QuoteLineGroup.d.ts +125 -452
- package/types/resources/QuotedCharge.d.ts +45 -274
- package/types/resources/QuotedSubscription.d.ts +100 -488
- package/types/resources/Ramp.d.ts +233 -724
- package/types/resources/ResourceMigration.d.ts +25 -80
- package/types/resources/SiteMigrationDetail.d.ts +34 -112
- package/types/resources/Subscription.d.ts +2390 -4335
- package/types/resources/SubscriptionEntitlement.d.ts +59 -160
- package/types/resources/SubscriptionEstimate.d.ts +51 -75
- package/types/resources/TaxWithheld.d.ts +15 -40
- package/types/resources/ThirdPartyPaymentMethod.d.ts +7 -29
- package/types/resources/TimeMachine.d.ts +43 -97
- package/types/resources/Token.d.ts +15 -85
- package/types/resources/Transaction.d.ts +278 -900
- package/types/resources/UnbilledCharge.d.ts +189 -164
- package/types/resources/Usage.d.ts +89 -279
- package/types/resources/VirtualBankAccount.d.ts +103 -255
- package/types/resources/filter.d.ts +52 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -81
- package/.github/ISSUE_TEMPLATE/config.yml +0 -6
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -34
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -8
- package/lib/chargebee.js +0 -512
- package/lib/resources/api_endpoints.js +0 -2912
- package/types/resources/NonSubscription.d.ts +0 -30
- package/types/resources/Session.d.ts +0 -41
package/types/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
///<reference path='./resources/CreditNoteEstimate.d.ts' />
|
|
16
16
|
///<reference path='./resources/Currency.d.ts' />
|
|
17
17
|
///<reference path='./resources/Customer.d.ts' />
|
|
18
|
+
///<reference path='./resources/CustomerEntitlement.d.ts' />
|
|
18
19
|
///<reference path='./resources/DifferentialPrice.d.ts' />
|
|
19
20
|
///<reference path='./resources/Discount.d.ts' />
|
|
20
21
|
///<reference path='./resources/Download.d.ts' />
|
|
@@ -42,7 +43,6 @@
|
|
|
42
43
|
///<reference path='./resources/ItemFamily.d.ts' />
|
|
43
44
|
///<reference path='./resources/ItemPrice.d.ts' />
|
|
44
45
|
///<reference path='./resources/Metadata.d.ts' />
|
|
45
|
-
///<reference path='./resources/NonSubscription.d.ts' />
|
|
46
46
|
///<reference path='./resources/Order.d.ts' />
|
|
47
47
|
///<reference path='./resources/PaymentIntent.d.ts' />
|
|
48
48
|
///<reference path='./resources/PaymentReferenceNumber.d.ts' />
|
|
@@ -72,58 +72,95 @@
|
|
|
72
72
|
///<reference path='./resources/Usage.d.ts' />
|
|
73
73
|
///<reference path='./resources/VirtualBankAccount.d.ts' />
|
|
74
74
|
|
|
75
|
+
export type Config = {
|
|
76
|
+
/**
|
|
77
|
+
* @apiKey api key for the site.
|
|
78
|
+
*/
|
|
79
|
+
apiKey: string;
|
|
80
|
+
/**
|
|
81
|
+
* @site api site name.
|
|
82
|
+
*/
|
|
83
|
+
site: string;
|
|
84
|
+
/**
|
|
85
|
+
* @apiPath this value indicates the api version, default value is /api/v2.
|
|
86
|
+
*/
|
|
87
|
+
apiPath?: '/api/v2' | '/api/v1';
|
|
88
|
+
/**
|
|
89
|
+
* @timeout client side request timeout in milliseconds, default value is 80000ms.
|
|
90
|
+
*/
|
|
91
|
+
timeout?: number;
|
|
92
|
+
/**
|
|
93
|
+
* @port url port
|
|
94
|
+
*/
|
|
95
|
+
port?: number;
|
|
96
|
+
/**
|
|
97
|
+
* @timemachineWaitInMillis time interval at which two subsequent retrieve timemachine call in milliseconds, default value is 3000ms.
|
|
98
|
+
*/
|
|
99
|
+
timemachineWaitInMillis?: number;
|
|
100
|
+
/**
|
|
101
|
+
* @exportWaitInMillis time interval at which two subsequent retrieve export call in milliseconds, default value is 3000ms.
|
|
102
|
+
*/
|
|
103
|
+
exportWaitInMillis?: number;
|
|
104
|
+
/**
|
|
105
|
+
* @protocol http protocol, default value is https
|
|
106
|
+
*/
|
|
107
|
+
protocol?: 'https' | 'http';
|
|
108
|
+
/**
|
|
109
|
+
* @hostSuffix url host suffix, default value is .chargebee.com
|
|
110
|
+
*/
|
|
111
|
+
hostSuffix?: string;
|
|
112
|
+
};
|
|
75
113
|
declare module 'chargebee' {
|
|
76
|
-
export default class {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
114
|
+
export default class Chargebee {
|
|
115
|
+
constructor(config: Config);
|
|
116
|
+
address: Address.AddressResource;
|
|
117
|
+
attachedItem: AttachedItem.AttachedItemResource;
|
|
118
|
+
businessEntity: BusinessEntity.BusinessEntityResource;
|
|
119
|
+
card: Card.CardResource;
|
|
120
|
+
comment: Comment.CommentResource;
|
|
121
|
+
coupon: Coupon.CouponResource;
|
|
122
|
+
couponCode: CouponCode.CouponCodeResource;
|
|
123
|
+
couponSet: CouponSet.CouponSetResource;
|
|
124
|
+
creditNote: CreditNote.CreditNoteResource;
|
|
125
|
+
currency: Currency.CurrencyResource;
|
|
126
|
+
customer: Customer.CustomerResource;
|
|
127
|
+
customerEntitlement: CustomerEntitlement.CustomerEntitlementResource;
|
|
128
|
+
differentialPrice: DifferentialPrice.DifferentialPriceResource;
|
|
129
|
+
entitlement: Entitlement.EntitlementResource;
|
|
130
|
+
entitlementOverride: EntitlementOverride.EntitlementOverrideResource;
|
|
131
|
+
estimate: Estimate.EstimateResource;
|
|
132
|
+
event: Event.EventResource;
|
|
133
|
+
export: Export.ExportResource;
|
|
134
|
+
feature: Feature.FeatureResource;
|
|
135
|
+
gift: Gift.GiftResource;
|
|
136
|
+
hostedPage: HostedPage.HostedPageResource;
|
|
137
|
+
inAppSubscription: InAppSubscription.InAppSubscriptionResource;
|
|
138
|
+
installment: Installment.InstallmentResource;
|
|
139
|
+
installmentConfig: InstallmentConfig.InstallmentConfigResource;
|
|
140
|
+
invoice: Invoice.InvoiceResource;
|
|
141
|
+
item: Item.ItemResource;
|
|
142
|
+
itemEntitlement: ItemEntitlement.ItemEntitlementResource;
|
|
143
|
+
itemFamily: ItemFamily.ItemFamilyResource;
|
|
144
|
+
itemPrice: ItemPrice.ItemPriceResource;
|
|
145
|
+
order: Order.OrderResource;
|
|
146
|
+
paymentIntent: PaymentIntent.PaymentIntentResource;
|
|
147
|
+
paymentSource: PaymentSource.PaymentSourceResource;
|
|
148
|
+
paymentVoucher: PaymentVoucher.PaymentVoucherResource;
|
|
149
|
+
portalSession: PortalSession.PortalSessionResource;
|
|
150
|
+
priceVariant: PriceVariant.PriceVariantResource;
|
|
151
|
+
pricingPageSession: PricingPageSession.PricingPageSessionResource;
|
|
152
|
+
promotionalCredit: PromotionalCredit.PromotionalCreditResource;
|
|
153
|
+
purchase: Purchase.PurchaseResource;
|
|
154
|
+
quote: Quote.QuoteResource;
|
|
155
|
+
ramp: Ramp.RampResource;
|
|
156
|
+
resourceMigration: ResourceMigration.ResourceMigrationResource;
|
|
157
|
+
siteMigrationDetail: SiteMigrationDetail.SiteMigrationDetailResource;
|
|
158
|
+
subscription: Subscription.SubscriptionResource;
|
|
159
|
+
subscriptionEntitlement: SubscriptionEntitlement.SubscriptionEntitlementResource;
|
|
160
|
+
timeMachine: TimeMachine.TimeMachineResource;
|
|
161
|
+
transaction: Transaction.TransactionResource;
|
|
162
|
+
unbilledCharge: UnbilledCharge.UnbilledChargeResource;
|
|
163
|
+
usage: Usage.UsageResource;
|
|
164
|
+
virtualBankAccount: VirtualBankAccount.VirtualBankAccountResource;
|
|
128
165
|
}
|
|
129
|
-
}
|
|
166
|
+
}
|
|
@@ -1,286 +1,71 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
2
4
|
declare module 'chargebee' {
|
|
3
5
|
export interface Address {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
* @description Last name
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
last_name?:string;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description Email
|
|
28
|
-
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
email?:string;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @description Company name
|
|
35
|
-
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
company?:string;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @description Phone number
|
|
42
|
-
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
phone?:string;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @description Address line 1
|
|
49
|
-
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
|
-
addr?:string;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* @description Address line 2
|
|
56
|
-
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
|
-
extended_addr?:string;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* @description Address line 3
|
|
63
|
-
|
|
64
|
-
*/
|
|
65
|
-
|
|
66
|
-
extended_addr2?:string;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @description Name of the city
|
|
70
|
-
|
|
71
|
-
*/
|
|
72
|
-
|
|
73
|
-
city?:string;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @description The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`).
|
|
77
|
-
|
|
78
|
-
*/
|
|
79
|
-
|
|
80
|
-
state_code?:string;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* @description State or Province
|
|
84
|
-
|
|
85
|
-
*/
|
|
86
|
-
|
|
87
|
-
state?:string;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* @description The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).
|
|
91
|
-
|
|
92
|
-
**Note** : If you enter an invalid country code, the system will return an error.
|
|
93
|
-
|
|
94
|
-
**Brexit**
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom -- Northern Ireland**) is available as an option.
|
|
98
|
-
|
|
99
|
-
*/
|
|
100
|
-
|
|
101
|
-
country?:string;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @description Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address).
|
|
105
|
-
|
|
106
|
-
*/
|
|
107
|
-
|
|
108
|
-
zip?:string;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* @description The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* not_validated - Address is not yet validated. \* invalid - Address is invalid. \* valid - Address was validated successfully.
|
|
112
|
-
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
|
-
validation_status?:ValidationStatus;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* @description A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
|
|
119
|
-
|
|
120
|
-
*/
|
|
121
|
-
|
|
122
|
-
subscription_id:string;
|
|
6
|
+
label: string;
|
|
7
|
+
first_name?: string;
|
|
8
|
+
last_name?: string;
|
|
9
|
+
email?: string;
|
|
10
|
+
company?: string;
|
|
11
|
+
phone?: string;
|
|
12
|
+
addr?: string;
|
|
13
|
+
extended_addr?: string;
|
|
14
|
+
extended_addr2?: string;
|
|
15
|
+
city?: string;
|
|
16
|
+
state_code?: string;
|
|
17
|
+
state?: string;
|
|
18
|
+
country?: string;
|
|
19
|
+
zip?: string;
|
|
20
|
+
validation_status?: ValidationStatus;
|
|
21
|
+
subscription_id: string;
|
|
123
22
|
}
|
|
124
|
-
export namespace Address {
|
|
125
|
-
export class AddressResource {
|
|
126
|
-
/**
|
|
127
|
-
* @description Retrieves an address resource for a subscription and the specified label.
|
|
128
23
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
retrieve(
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
24
|
+
export namespace Address {
|
|
25
|
+
export class AddressResource {
|
|
26
|
+
retrieve(
|
|
27
|
+
input: RetrieveInputParam,
|
|
28
|
+
headers?: ChargebeeRequestHeader,
|
|
29
|
+
): Promise<ChargebeeResponse<RetrieveResponse>>;
|
|
30
|
+
|
|
31
|
+
update(
|
|
32
|
+
input: UpdateInputParam,
|
|
33
|
+
headers?: ChargebeeRequestHeader,
|
|
34
|
+
): Promise<ChargebeeResponse<UpdateResponse>>;
|
|
35
|
+
}
|
|
135
36
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
update(input:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
|
|
37
|
+
export interface RetrieveResponse {
|
|
38
|
+
address: Address;
|
|
139
39
|
}
|
|
140
|
-
|
|
141
|
-
|
|
40
|
+
|
|
41
|
+
export interface UpdateResponse {
|
|
42
|
+
address: Address;
|
|
142
43
|
}
|
|
143
|
-
export interface RetrieveInputParam {
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* @description Retrieves an address resource for a subscription and the specified label.
|
|
147
44
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
subscription_id:string;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* @description Retrieves an address resource for a subscription and the specified label.
|
|
45
|
+
// REQUEST PARAMS
|
|
46
|
+
//---------------
|
|
154
47
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
label:string;
|
|
158
|
-
}
|
|
159
|
-
export interface UpdateResponse {
|
|
160
|
-
address:Address;
|
|
48
|
+
export interface RetrieveInputParam {
|
|
49
|
+
subscription_id: string;
|
|
50
|
+
label: string;
|
|
161
51
|
}
|
|
162
52
|
export interface UpdateInputParam {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
* @description First name.
|
|
180
|
-
|
|
181
|
-
*/
|
|
182
|
-
|
|
183
|
-
first_name?:string;
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* @description Last name.
|
|
187
|
-
|
|
188
|
-
*/
|
|
189
|
-
|
|
190
|
-
last_name?:string;
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* @description Email.
|
|
194
|
-
|
|
195
|
-
*/
|
|
196
|
-
|
|
197
|
-
email?:string;
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* @description Company name.
|
|
201
|
-
|
|
202
|
-
*/
|
|
203
|
-
|
|
204
|
-
company?:string;
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* @description Phone number.
|
|
208
|
-
|
|
209
|
-
*/
|
|
210
|
-
|
|
211
|
-
phone?:string;
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* @description Address line 1.
|
|
215
|
-
|
|
216
|
-
*/
|
|
217
|
-
|
|
218
|
-
addr?:string;
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* @description Address line 2.
|
|
222
|
-
|
|
223
|
-
*/
|
|
224
|
-
|
|
225
|
-
extended_addr?:string;
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* @description Address line 3.
|
|
229
|
-
|
|
230
|
-
*/
|
|
231
|
-
|
|
232
|
-
extended_addr2?:string;
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* @description Name of the city.
|
|
236
|
-
|
|
237
|
-
*/
|
|
238
|
-
|
|
239
|
-
city?:string;
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* @description The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`).
|
|
243
|
-
|
|
244
|
-
*/
|
|
245
|
-
|
|
246
|
-
state_code?:string;
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* @description The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided.
|
|
250
|
-
|
|
251
|
-
*/
|
|
252
|
-
|
|
253
|
-
state?:string;
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* @description Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address).
|
|
257
|
-
|
|
258
|
-
*/
|
|
259
|
-
|
|
260
|
-
zip?:string;
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* @description The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).
|
|
264
|
-
|
|
265
|
-
**Note** : If you enter an invalid country code, the system will return an error.
|
|
266
|
-
|
|
267
|
-
**Brexit**
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom -- Northern Ireland**) is available as an option.
|
|
271
|
-
.
|
|
272
|
-
|
|
273
|
-
*/
|
|
274
|
-
|
|
275
|
-
country?:string;
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* @description The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* not_validated - Address is not yet validated. \* invalid - Address is invalid. \* valid - Address was validated successfully.
|
|
279
|
-
|
|
280
|
-
*/
|
|
281
|
-
|
|
282
|
-
validation_status?:ValidationStatus;
|
|
53
|
+
subscription_id: string;
|
|
54
|
+
label: string;
|
|
55
|
+
first_name?: string;
|
|
56
|
+
last_name?: string;
|
|
57
|
+
email?: string;
|
|
58
|
+
company?: string;
|
|
59
|
+
phone?: string;
|
|
60
|
+
addr?: string;
|
|
61
|
+
extended_addr?: string;
|
|
62
|
+
extended_addr2?: string;
|
|
63
|
+
city?: string;
|
|
64
|
+
state_code?: string;
|
|
65
|
+
state?: string;
|
|
66
|
+
zip?: string;
|
|
67
|
+
country?: string;
|
|
68
|
+
validation_status?: ValidationStatus;
|
|
283
69
|
}
|
|
284
|
-
|
|
285
70
|
}
|
|
286
|
-
}
|
|
71
|
+
}
|
|
@@ -1,102 +1,29 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
2
4
|
declare module 'chargebee' {
|
|
3
5
|
export interface AdvanceInvoiceSchedule {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
id:string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description The type of advance invoice or advance invoicing schedule. \* specific_dates - The advance charges occur on specific dates. For each date, [a fixed number of billing cycles](advance_invoice_schedules#advance_invoice_schedule_specific_dates_schedule_terms_to_charge) is charged for. There can be up to 5 dates configured. \* fixed_intervals - The advance charges occur at [fixed intervals of time](advance_invoice_schedules#advance_invoice_schedule_fixed_interval_schedule_terms_to_charge).
|
|
14
|
-
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
schedule_type?:'specific_dates' | 'fixed_intervals';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @description When the `schedule_type` is `fixed_intervals`, this object gives further details of the schedule.
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
fixed_interval_schedule?:AdvanceInvoiceSchedule.FixedIntervalSchedule;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description The advance charges occur on specific dates. For each date, [a fixed number of billing cycles](advance_invoice_schedules#advance_invoice_schedule_specific_dates_schedule_terms_to_charge) is charged for. There can be up to 5 dates configured.
|
|
28
|
-
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
specific_dates_schedule?:AdvanceInvoiceSchedule.SpecificDatesSchedule;
|
|
6
|
+
id: string;
|
|
7
|
+
schedule_type?: 'fixed_intervals' | 'specific_dates';
|
|
8
|
+
fixed_interval_schedule?: AdvanceInvoiceSchedule.FixedIntervalSchedule;
|
|
9
|
+
specific_dates_schedule?: AdvanceInvoiceSchedule.SpecificDatesSchedule;
|
|
32
10
|
}
|
|
33
|
-
export namespace AdvanceInvoiceSchedule {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
export interface FixedIntervalSchedule {
|
|
37
|
-
/**
|
|
38
|
-
* @description Specifies when the schedule should end. \* after_number_of_intervals - Advance invoices are generated a `specified number of times` \* subscription_end - Advance invoices are generated for as long as the subscription is active. \* specific_date - End the advance invoicing schedule on a `specific date`.
|
|
39
|
-
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
|
-
end_schedule_on?:EndScheduleOn;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* @description The number of advance invoices to generate. The schedule is created such that the total number of billing cycles in the schedule does not exceed the [`remaining_billing_cycles`](subscriptions#subscription_remaining_billing_cycles) of the subscription. This parameter is applicable only when [`fixed_interval_schedule[end_schedule_on]`](advance_invoice_schedules#advance_invoice_schedule_fixed_interval_schedule_end_schedule_on) = `after_number_of_intervals`
|
|
46
|
-
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
number_of_occurrences?:number;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* @description The number of days before each interval that advance invoices are generated.
|
|
53
11
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
end_date?:number;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* @description The date when this advance invoicing schedule was created.
|
|
67
|
-
|
|
68
|
-
*/
|
|
69
|
-
|
|
70
|
-
created_at?:number;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* @description The number of billing cycles in one interval.
|
|
74
|
-
|
|
75
|
-
*/
|
|
76
|
-
|
|
77
|
-
terms_to_charge?:number;
|
|
12
|
+
export namespace AdvanceInvoiceSchedule {
|
|
13
|
+
export interface FixedIntervalSchedule {
|
|
14
|
+
end_schedule_on?: EndScheduleOn;
|
|
15
|
+
number_of_occurrences?: number;
|
|
16
|
+
days_before_renewal?: number;
|
|
17
|
+
end_date?: number;
|
|
18
|
+
created_at: number;
|
|
19
|
+
terms_to_charge?: number;
|
|
78
20
|
}
|
|
79
|
-
export interface SpecificDatesSchedule {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
*/
|
|
84
|
-
|
|
85
|
-
terms_to_charge?:number;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* @description The unique id of the member of the advance_invoice_schedule array which corresponds to the specific_dates_schedule that you intend to modify. Only applicable when [`schedule_type`](advance_invoice_schedules#advance_invoice_schedule_schedule_type) is `specific_dates`.
|
|
89
|
-
|
|
90
|
-
*/
|
|
91
|
-
|
|
92
|
-
date?:number;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* @description The date when this advance invoicing schedule was created.
|
|
96
|
-
|
|
97
|
-
*/
|
|
98
|
-
|
|
99
|
-
created_at?:number;
|
|
21
|
+
export interface SpecificDatesSchedule {
|
|
22
|
+
terms_to_charge?: number;
|
|
23
|
+
date?: number;
|
|
24
|
+
created_at: number;
|
|
100
25
|
}
|
|
26
|
+
// REQUEST PARAMS
|
|
27
|
+
//---------------
|
|
101
28
|
}
|
|
102
|
-
}
|
|
29
|
+
}
|