chargebee 2.26.0 → 2.27.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 +24 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +8 -1
- package/package.json +1 -1
- package/types/core.d.ts +1 -0
- package/types/resources/Address.d.ts +235 -5
- package/types/resources/AdvanceInvoiceSchedule.d.ts +78 -2
- package/types/resources/AttachedItem.d.ts +285 -13
- package/types/resources/Card.d.ts +375 -13
- package/types/resources/Comment.d.ts +160 -11
- package/types/resources/Contact.d.ts +54 -0
- package/types/resources/ContractTerm.d.ts +83 -0
- package/types/resources/Coupon.d.ts +628 -20
- package/types/resources/CouponCode.d.ts +46 -5
- package/types/resources/CouponSet.d.ts +194 -17
- package/types/resources/CreditNote.d.ts +1100 -44
- package/types/resources/CreditNoteEstimate.d.ts +75 -6
- package/types/resources/Customer.d.ts +1819 -73
- package/types/resources/DifferentialPrice.d.ts +246 -15
- package/types/resources/Discount.d.ts +107 -0
- package/types/resources/Download.d.ts +18 -0
- package/types/resources/EntitlementOverride.d.ts +101 -7
- package/types/resources/Estimate.d.ts +1021 -27
- package/types/resources/Event.d.ts +138 -8
- package/types/resources/Export.d.ts +622 -32
- package/types/resources/Feature.d.ts +287 -22
- package/types/resources/Gift.d.ts +296 -24
- package/types/resources/Hierarchy.d.ts +30 -0
- package/types/resources/HostedPage.d.ts +1046 -37
- package/types/resources/ImpactedItem.d.ts +41 -1
- package/types/resources/ImpactedSubscription.d.ts +36 -1
- package/types/resources/InAppSubscription.d.ts +369 -9
- package/types/resources/Invoice.d.ts +1942 -92
- package/types/resources/InvoiceEstimate.d.ts +75 -6
- package/types/resources/Item.d.ts +522 -16
- package/types/resources/ItemEntitlement.d.ts +162 -13
- package/types/resources/ItemFamily.d.ts +153 -15
- package/types/resources/ItemPrice.d.ts +951 -26
- package/types/resources/Media.d.ts +24 -0
- package/types/resources/NonSubscription.d.ts +46 -3
- package/types/resources/Order.d.ts +1172 -32
- package/types/resources/PaymentIntent.d.ts +293 -8
- package/types/resources/PaymentReferenceNumber.d.ts +24 -0
- package/types/resources/PaymentSource.d.ts +984 -55
- package/types/resources/PaymentVoucher.d.ts +252 -14
- package/types/resources/PortalSession.d.ts +154 -10
- package/types/resources/PromotionalCredit.d.ts +300 -16
- package/types/resources/Purchase.d.ts +206 -5
- package/types/resources/Quote.d.ts +1430 -62
- package/types/resources/QuoteLineGroup.d.ts +134 -5
- package/types/resources/QuotedCharge.d.ts +63 -5
- package/types/resources/QuotedSubscription.d.ts +192 -5
- package/types/resources/ResourceMigration.d.ts +68 -3
- package/types/resources/SiteMigrationDetail.d.ts +98 -5
- package/types/resources/Subscription.d.ts +2564 -137
- package/types/resources/SubscriptionEntitlement.d.ts +116 -8
- package/types/resources/SubscriptionEstimate.d.ts +36 -2
- package/types/resources/TaxWithheld.d.ts +32 -0
- package/types/resources/ThirdPartyPaymentMethod.d.ts +24 -0
- package/types/resources/TimeMachine.d.ts +82 -7
- package/types/resources/Token.d.ts +164 -7
- package/types/resources/Transaction.d.ts +567 -25
- package/types/resources/UnbilledCharge.d.ts +309 -14
- package/types/resources/Usage.d.ts +237 -13
- package/types/resources/VirtualBankAccount.d.ts +220 -17
|
@@ -1,83 +1,445 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
2
|
declare module 'chargebee' {
|
|
3
3
|
export interface Card {
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @description Identifier of the payment source
|
|
7
|
+
|
|
8
|
+
*/
|
|
9
|
+
|
|
4
10
|
payment_source_id:string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @description Current status of the card. \* valid - A valid and active credit card \* expired - An expired card \* expiring - A card which is expiring in the current month.
|
|
14
|
+
|
|
15
|
+
*/
|
|
16
|
+
|
|
5
17
|
status:'valid' | 'expiring' | 'expired';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @description Name of the gateway this payment source is stored with. \* bluesnap - BlueSnap is a payment gateway. \* tco - 2Checkout is a payment gateway. \* first_data_global - First Data Global Gateway Virtual Terminal Account \* exact - Exact Payments is a payment gateway. \* bluepay - BluePay is a payment gateway. \* paypal_express_checkout - PayPal Express Checkout is a payment gateway. \* eway - eWAY Account is a payment gateway. \* paypal_payflow_pro - PayPal Payflow Pro is a payment gateway. \* razorpay - Razorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc. \* global_payments - Global Payments is a payment service provider. \* amazon_payments - Amazon Payments is a payment service provider. \* not_applicable - Indicates that payment gateway is not applicable for this resource. \* checkout_com - Checkout.com is a payment gateway. \* adyen - Adyen is a payment gateway. \* braintree - Braintree is a payment gateway. \* nmi - NMI is a payment gateway. \* quickbooks - Intuit QuickBooks Payments gateway \* wepay - WePay is a payment gateway. \* worldpay - WorldPay is a payment gateway \* wirecard - WireCard Account is a payment service provider. \* chargebee_payments - Chargebee Payments gateway \* sage_pay - Sage Pay is a payment gateway. \* moneris_us - Moneris USA is a payment gateway. \* pin - Pin is a payment gateway \* authorize_net - Authorize.net is a payment gateway \* elavon - Elavon Virtual Merchant is a payment solution. \* paypal_pro - PayPal Pro Account is a payment gateway. \* orbital - Chase Paymentech(Orbital) is a payment gateway. \* paypal - PayPal Commerce is a payment gateway. \* beanstream - Bambora(formerly known as Beanstream) is a payment gateway. \* hdfc - HDFC Account is a payment gateway. \* ingenico_direct - Worldline Online Payments is a payment gateway. \* ogone - Ingenico ePayments (formerly known as Ogone) is a payment gateway. \* migs - MasterCard Internet Gateway Service payment gateway. \* stripe - Stripe is a payment gateway. \* vantiv - Vantiv is a payment gateway. \* moneris - Moneris is a payment gateway. \* chargebee - Chargebee test gateway. \* eway_rapid - eWAY Rapid is a payment gateway. \* gocardless - GoCardless is a payment service provider. \* mollie - Mollie is a payment gateway. \* paymill - PAYMILL is a payment gateway. \* balanced_payments - Balanced is a payment gateway \* cybersource - CyberSource is a payment gateway.
|
|
21
|
+
|
|
22
|
+
*/
|
|
23
|
+
|
|
6
24
|
gateway:Gateway;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @description The gateway account to which this payment source is stored with.
|
|
28
|
+
|
|
29
|
+
*/
|
|
30
|
+
|
|
7
31
|
gateway_account_id?:string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @description Reference transaction id which used for transactions
|
|
35
|
+
|
|
36
|
+
*/
|
|
37
|
+
|
|
8
38
|
ref_tx_id?:string;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @description Cardholder's first name
|
|
42
|
+
|
|
43
|
+
*/
|
|
44
|
+
|
|
9
45
|
first_name?:string;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @description Cardholder's last name
|
|
49
|
+
|
|
50
|
+
*/
|
|
51
|
+
|
|
10
52
|
last_name?:string;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @description The Issuer Identification Number, i.e. the first six digits of the card number
|
|
56
|
+
|
|
57
|
+
*/
|
|
58
|
+
|
|
11
59
|
iin:string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @description Last four digits of the card number
|
|
63
|
+
|
|
64
|
+
*/
|
|
65
|
+
|
|
12
66
|
last4:string;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @description Card type \* other - Card belonging to types other than those listed above. \* bancontact - A Bancontact card. \* american_express - An American Express card. \* mastercard - A MasterCard. \* jcb - A JCB card. \* not_applicable - Used for offline entries in transactions. Not applicable for cards \* visa - A Visa card. \* diners_club - A Diner's Club card. \* discover - A Discover card.
|
|
70
|
+
|
|
71
|
+
*/
|
|
72
|
+
|
|
13
73
|
card_type?:'discover' | 'bancontact' | 'other' | 'visa' | 'jcb' | 'diners_club' | 'mastercard' | 'not_applicable' | 'american_express';
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @description Card Funding type \* prepaid - A prepaid card. \* debit - A debit card. \* not_applicable - Used for ACH. Not applicable for cards \* credit - A credit card. \* not_known - An unknown card.
|
|
77
|
+
|
|
78
|
+
*/
|
|
79
|
+
|
|
14
80
|
funding_type:'not_known' | 'prepaid' | 'not_applicable' | 'credit' | 'debit';
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @description Card expiry month.
|
|
84
|
+
|
|
85
|
+
*/
|
|
86
|
+
|
|
15
87
|
expiry_month:number;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @description Card expiry year.
|
|
91
|
+
|
|
92
|
+
*/
|
|
93
|
+
|
|
16
94
|
expiry_year:number;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @description [two-letter(alpha2)](https://www.iso.org/iso-3166-country-codes.html) ISO country code.
|
|
98
|
+
|
|
99
|
+
*/
|
|
100
|
+
|
|
17
101
|
issuing_country?:string;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @description Address line 1, as available in card billing address.
|
|
105
|
+
|
|
106
|
+
*/
|
|
107
|
+
|
|
18
108
|
billing_addr1?:string;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @description Address line 2, as available in card billing address.
|
|
112
|
+
|
|
113
|
+
*/
|
|
114
|
+
|
|
19
115
|
billing_addr2?:string;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @description City, as available in card billing address.
|
|
119
|
+
|
|
120
|
+
*/
|
|
121
|
+
|
|
20
122
|
billing_city?:string;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @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`).
|
|
126
|
+
|
|
127
|
+
*/
|
|
128
|
+
|
|
21
129
|
billing_state_code?:string;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @description The state/province name.
|
|
133
|
+
|
|
134
|
+
*/
|
|
135
|
+
|
|
22
136
|
billing_state?:string;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* @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).
|
|
140
|
+
|
|
141
|
+
**Note** : If you enter an invalid country code, the system will return an error.
|
|
142
|
+
|
|
143
|
+
**Brexit**
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
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.
|
|
147
|
+
|
|
148
|
+
*/
|
|
149
|
+
|
|
23
150
|
billing_country?:string;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* @description Postal or Zip code, as available in card billing address.
|
|
154
|
+
|
|
155
|
+
*/
|
|
156
|
+
|
|
24
157
|
billing_zip?:string;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @description Timestamp indicating when this card resource is created.
|
|
161
|
+
|
|
162
|
+
*/
|
|
163
|
+
|
|
25
164
|
created_at:number;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* @description Version number of this resource. The `resource_version` is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
|
|
168
|
+
|
|
169
|
+
*/
|
|
170
|
+
|
|
26
171
|
resource_version?:number;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* @description Timestamp indicating when this credit card resource was last updated.
|
|
175
|
+
|
|
176
|
+
*/
|
|
177
|
+
|
|
27
178
|
updated_at?:number;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @description The IP address of the customer. Used primarily for referral integration and EU VAT validation.
|
|
182
|
+
|
|
183
|
+
*/
|
|
184
|
+
|
|
28
185
|
ip_address?:string;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* @description Card is powered by payment method. \* ideal - ideal \* sofort - sofort \* bancontact - bancontact \* giropay - giropay \* latam_local_card - latam_local_card \* not_applicable - not_applicable \* card - card
|
|
189
|
+
|
|
190
|
+
*/
|
|
191
|
+
|
|
29
192
|
powered_by?:'giropay' | 'bancontact' | 'ideal' | 'latam_local_card' | 'not_applicable' | 'sofort' | 'card';
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* @description Identifier of the customer.
|
|
196
|
+
|
|
197
|
+
*/
|
|
198
|
+
|
|
30
199
|
customer_id:string;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* @description Masked credit card number that is safe to show.
|
|
203
|
+
|
|
204
|
+
*/
|
|
205
|
+
|
|
31
206
|
masked_number?:string;
|
|
32
207
|
}
|
|
33
208
|
export namespace Card {
|
|
34
|
-
export class CardResource {
|
|
209
|
+
export class CardResource {
|
|
210
|
+
/**
|
|
211
|
+
* @description #### deprecated
|
|
212
|
+
|
|
213
|
+
The [Payment Sources API](/docs/api/payment_sources), with its additional options and improvements, obsoletes the Cards APIs. This request is obsoleted by the [Export payment source API](/docs/api/payment_sources#export_payment_source).
|
|
214
|
+
|
|
215
|
+
Copies the customer's card information to another payment gateway. This is useful if you want to port your customer's card details to another gateway.
|
|
216
|
+
|
|
217
|
+
**Limitation**
|
|
218
|
+
This request does not support copying of cards between Braintree and Stripe payment gateways. Contact [Chargebee Support](https://chargebee.freshdesk.com/support/home) to perform those actions.
|
|
219
|
+
|
|
220
|
+
*/
|
|
221
|
+
|
|
35
222
|
copy_card_for_customer(customer_id:string, input:CopyCardForCustomerInputParam):ChargebeeRequest<CopyCardForCustomerResponse>;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* @description #### Deprecated
|
|
226
|
+
|
|
227
|
+
This operation is obsoleted by the [Retrieve a payment source API](/docs/api/payment_sources#retrieve_a_payment_source).
|
|
228
|
+
|
|
229
|
+
Retrieves the credit card for the customer id.
|
|
230
|
+
|
|
231
|
+
*/
|
|
232
|
+
|
|
36
233
|
retrieve(customer_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* @description #### Deprecated
|
|
237
|
+
|
|
238
|
+
This request is obsoleted by the [Switch gateway account API](/docs/api/payment_sources#switch_gateway_account) for Payment Sources.
|
|
239
|
+
|
|
240
|
+
Switches the gateway in which customer's card information is stored. This is applicable only if the payment method is `card`.
|
|
241
|
+
|
|
242
|
+
**Limitation**
|
|
243
|
+
This request does not support switching between Braintree and Stripe payment gateways. Contact [Chargebee Support](https://chargebee.freshdesk.com/support/home) to perform those actions.
|
|
244
|
+
|
|
245
|
+
*/
|
|
246
|
+
|
|
37
247
|
switch_gateway_for_customer(customer_id:string, input:SwitchGatewayForCustomerInputParam):ChargebeeRequest<SwitchGatewayForCustomerResponse>;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* @description #### deprecated
|
|
251
|
+
|
|
252
|
+
The [Payment Sources API](/docs/api/payment_sources), with its additional options and improvements, obsoletes the Cards APIs. This request is obsoleted by the [Delete a payment source API](/docs/api/payment_sources#delete_a_payment_source).
|
|
253
|
+
|
|
254
|
+
Deletes the card for a customer. Upon successful deletion the `auto_collection` attribute for the customer is set to `off` and a `card_deleted` event is triggered. If there is no card found at the gateway for the customer, this API returns without errors.
|
|
255
|
+
|
|
256
|
+
*/
|
|
257
|
+
|
|
38
258
|
delete_card_for_customer(customer_id:string):ChargebeeRequest<DeleteCardForCustomerResponse>;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* @description #### Deprecated
|
|
262
|
+
|
|
263
|
+
The [Payment Sources API](/docs/api/payment_sources), with its additional options and improvements, obsoletes the [Cards APIs](/docs/api/cards). This operation is obsoleted by the following:
|
|
264
|
+
|
|
265
|
+
* [Create using temporary token](/docs/api/payment_sources#create_using_temporary_token)
|
|
266
|
+
* [Create using permanent token](/docs/api/payment_sources#create_using_permanent_token)
|
|
267
|
+
* [Create a card payment source](/docs/api/payment_sources#create_a_card_payment_source)
|
|
268
|
+
|
|
269
|
+
Adds or replaces card details of a customer. Updating card details replaces the present payment method.
|
|
270
|
+
|
|
271
|
+
Passing credit card details to this API involves PCI liability at your end as sensitive card info passes through your servers. If you wish to avoid that, you can use one of the following integration methodologies if applicable
|
|
272
|
+
|
|
273
|
+
* If you are using Stripe gateway, you can use [Stripe.js](https://stripe.com/docs/stripe.js) with your card update form.
|
|
274
|
+
* If you are using Braintree gateway, you can use [Braintree.js](https://www.braintreepayments.com/docs/javascript) with your card update form.
|
|
275
|
+
* If you are using Authorize.Net gateway, you use [Accept.js](https://developer.authorize.net/api/reference/features/acceptjs.html) with your card update form.
|
|
276
|
+
* In case you are using the Adyen gateway, you will have to use the Adyen's [Client Side Encryption](https://docs.adyen.com/developers/features/client-side-encryption) to encrypt sensitive cardholder data. Once the cardholder data is encrypted, pass the value in adyen.encrypted.data as temp token in this API.
|
|
277
|
+
* You can also use our [Hosted Pages](https://www.chargebee.com/docs/hosted_pages.html) based integration. Use our [Hosted Page - Update Card](/docs/api/hosted_pages#update_card) API to generate a 'Update Card' Hosted Page link.
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
**Legacy behavior:**
|
|
282
|
+
|
|
283
|
+
* **For [sites](https://www.chargebee.com/docs/sites-intro.html) created before March 1st, 2014:** On making this request, the `billing_address` and `vat_number` of the customer are **deleted** and replaced by the values passed with this request. Ensure that you pass the [billing address parameters](/docs/api/subscriptions?prod_cat_ver=1#create_a_subscription_card_billing_addr1) and the `vat_number` parameters each time you make this request, to avoid losing the same information at the customer-level.
|
|
284
|
+
* **For [sites](https://www.chargebee.com/docs/sites-intro.html) created on or after March 1st, 2014:** This request does not alter the `billing_address` and `vat_number` of the customer.
|
|
285
|
+
|
|
286
|
+
*/
|
|
287
|
+
|
|
39
288
|
update_card_for_customer(customer_id:string, input:UpdateCardForCustomerInputParam):ChargebeeRequest<UpdateCardForCustomerResponse>;
|
|
40
289
|
}
|
|
41
|
-
export interface CopyCardForCustomerResponse {
|
|
42
|
-
|
|
290
|
+
export interface CopyCardForCustomerResponse {
|
|
291
|
+
third_party_payment_method:ThirdPartyPaymentMethod;
|
|
43
292
|
}
|
|
44
293
|
export interface CopyCardForCustomerInputParam {
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* @description The gateway account you want to copy the card.
|
|
297
|
+
|
|
298
|
+
*/
|
|
299
|
+
|
|
45
300
|
gateway_account_id:string;
|
|
46
301
|
}
|
|
47
|
-
export interface RetrieveResponse {
|
|
48
|
-
|
|
302
|
+
export interface RetrieveResponse {
|
|
303
|
+
card:Card;
|
|
49
304
|
}
|
|
50
305
|
|
|
51
|
-
export interface SwitchGatewayForCustomerResponse {
|
|
52
|
-
|
|
53
|
-
|
|
306
|
+
export interface SwitchGatewayForCustomerResponse {
|
|
307
|
+
customer:Customer;
|
|
308
|
+
|
|
309
|
+
card:Card;
|
|
54
310
|
}
|
|
55
311
|
export interface SwitchGatewayForCustomerInputParam {
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* @description The gateway account you want to switch to.
|
|
315
|
+
|
|
316
|
+
*/
|
|
317
|
+
|
|
56
318
|
gateway_account_id:string;
|
|
57
319
|
}
|
|
58
|
-
export interface DeleteCardForCustomerResponse {
|
|
59
|
-
|
|
320
|
+
export interface DeleteCardForCustomerResponse {
|
|
321
|
+
customer:Customer;
|
|
60
322
|
}
|
|
61
323
|
|
|
62
|
-
export interface UpdateCardForCustomerResponse {
|
|
63
|
-
|
|
64
|
-
|
|
324
|
+
export interface UpdateCardForCustomerResponse {
|
|
325
|
+
customer:Customer;
|
|
326
|
+
|
|
327
|
+
card:Card;
|
|
65
328
|
}
|
|
66
329
|
export interface UpdateCardForCustomerInputParam {
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* @description The gateway account in which this payment source is stored.
|
|
333
|
+
|
|
334
|
+
*/
|
|
335
|
+
|
|
67
336
|
gateway_account_id?:string;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* @description The single-use card token returned by vaults like Stripe/Braintree which act as a substitute for your card details. Before calling this API, you should have submitted your card details to the gateway and gotten this token in return.
|
|
340
|
+
**Note:** Supported only for Stripe, Braintree and Authorize.Net. If this value is specified, there is no need to specify other card details (like number, cvv, etc).
|
|
341
|
+
|
|
342
|
+
*/
|
|
343
|
+
|
|
68
344
|
tmp_token?:string;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* @description Cardholder's first name.
|
|
348
|
+
|
|
349
|
+
*/
|
|
350
|
+
|
|
69
351
|
first_name?:string;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* @description Cardholder's last name.
|
|
355
|
+
|
|
356
|
+
*/
|
|
357
|
+
|
|
70
358
|
last_name?:string;
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* @description The credit card number without any format. If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js), you can specify the Braintree encrypted card number here.
|
|
362
|
+
|
|
363
|
+
*/
|
|
364
|
+
|
|
71
365
|
number:string;
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* @description Card expiry month.
|
|
369
|
+
|
|
370
|
+
*/
|
|
371
|
+
|
|
72
372
|
expiry_month:number;
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* @description Card expiry year.
|
|
376
|
+
|
|
377
|
+
*/
|
|
378
|
+
|
|
73
379
|
expiry_year:number;
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* @description The card verification value (CVV). If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js), you can specify the Braintree encrypted CVV here.
|
|
383
|
+
|
|
384
|
+
*/
|
|
385
|
+
|
|
74
386
|
cvv?:string;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* @description Address line 1, as available in card billing address.
|
|
390
|
+
|
|
391
|
+
*/
|
|
392
|
+
|
|
75
393
|
billing_addr1?:string;
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* @description Address line 2, as available in card billing address.
|
|
397
|
+
|
|
398
|
+
*/
|
|
399
|
+
|
|
76
400
|
billing_addr2?:string;
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* @description City, as available in card billing address.
|
|
404
|
+
|
|
405
|
+
*/
|
|
406
|
+
|
|
77
407
|
billing_city?:string;
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* @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`).
|
|
411
|
+
|
|
412
|
+
*/
|
|
413
|
+
|
|
78
414
|
billing_state_code?:string;
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* @description The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided.
|
|
418
|
+
|
|
419
|
+
*/
|
|
420
|
+
|
|
79
421
|
billing_state?:string;
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* @description Postal or Zip code, as available in card billing address.
|
|
425
|
+
|
|
426
|
+
*/
|
|
427
|
+
|
|
80
428
|
billing_zip?:string;
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* @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).
|
|
432
|
+
|
|
433
|
+
**Note** : If you enter an invalid country code, the system will return an error.
|
|
434
|
+
|
|
435
|
+
**Brexit**
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
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.
|
|
439
|
+
.
|
|
440
|
+
|
|
441
|
+
*/
|
|
442
|
+
|
|
81
443
|
billing_country?:string;
|
|
82
444
|
}
|
|
83
445
|
|
|
@@ -1,49 +1,198 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
2
|
declare module 'chargebee' {
|
|
3
3
|
export interface Comment {
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @description Unique identifier for the comment.
|
|
7
|
+
|
|
8
|
+
*/
|
|
9
|
+
|
|
4
10
|
id:string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @description Type of the entity this comment generated for \* item - Entity that represents item \* order - Entity that represents an order \* item_price - Entity that represents item price \* customer - Entity that represents a customer \* invoice - Invoice description \* business_entity - Entity that represents item of type business entity \* plan - Entity that represents a subscription plan \* coupon - Entity that represents a discount coupon \* subscription - Entity that represents a subscription of a customer \* item_family - Entity that represents item family \* transaction - Entity that represents a transaction. \* addon - Entity that represents an addon \* credit_note - Credit note description \* quote - Entity that represents a quote
|
|
14
|
+
|
|
15
|
+
*/
|
|
16
|
+
|
|
5
17
|
entity_type:EntityType;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @description The user who created the comment. If created via API, this contains the name given for the API key used.
|
|
21
|
+
|
|
22
|
+
*/
|
|
23
|
+
|
|
6
24
|
added_by?:string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @description Actual notes for the comment.
|
|
28
|
+
|
|
29
|
+
*/
|
|
30
|
+
|
|
7
31
|
notes:string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @description The time at which this comment was created
|
|
35
|
+
|
|
36
|
+
*/
|
|
37
|
+
|
|
8
38
|
created_at:number;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @description Type of comment this is. \* user - Comment generated by user either via API or Admin console. \* system - Comment generated by Chargebee when any backend changes happen for an entity
|
|
42
|
+
|
|
43
|
+
*/
|
|
44
|
+
|
|
9
45
|
type:'system' | 'user';
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @description Unique identifier of the entity.
|
|
49
|
+
|
|
50
|
+
*/
|
|
51
|
+
|
|
10
52
|
entity_id:string;
|
|
11
53
|
}
|
|
12
54
|
export namespace Comment {
|
|
13
|
-
export class CommentResource {
|
|
55
|
+
export class CommentResource {
|
|
56
|
+
/**
|
|
57
|
+
* @description Delete a comment for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver=1#create_a_comment_entity_type) identified by comment ID.
|
|
58
|
+
|
|
59
|
+
Only the comments that are added via Admin console and API can be deleted. Chargebee generated "System" comments cannot be deleted.
|
|
60
|
+
|
|
61
|
+
*/
|
|
62
|
+
|
|
14
63
|
delete(comment_id:string):ChargebeeRequest<DeleteResponse>;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @description Retrieve a comment for an entity identified by comment ID.
|
|
67
|
+
|
|
68
|
+
*/
|
|
69
|
+
|
|
15
70
|
retrieve(comment_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @description Retrieve the list of comments sorted by the recent ones on the top.
|
|
74
|
+
|
|
75
|
+
If you want to retrieve the list of comments for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver=1#list_comments_entity_type), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID.
|
|
76
|
+
|
|
77
|
+
*/
|
|
78
|
+
|
|
16
79
|
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @description Create a new comment for an entity. The newly added comment will be shown in the web interface as well.
|
|
83
|
+
|
|
84
|
+
*/
|
|
85
|
+
|
|
17
86
|
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
18
87
|
}
|
|
19
|
-
export interface DeleteResponse {
|
|
20
|
-
|
|
88
|
+
export interface DeleteResponse {
|
|
89
|
+
comment:Comment;
|
|
21
90
|
}
|
|
22
91
|
|
|
23
|
-
export interface RetrieveResponse {
|
|
24
|
-
|
|
92
|
+
export interface RetrieveResponse {
|
|
93
|
+
comment:Comment;
|
|
25
94
|
}
|
|
26
95
|
|
|
27
|
-
export interface ListResponse {
|
|
28
|
-
|
|
29
|
-
|
|
96
|
+
export interface ListResponse {
|
|
97
|
+
/**
|
|
98
|
+
* @description Retrieve the list of comments sorted by the recent ones on the top.
|
|
99
|
+
|
|
100
|
+
If you want to retrieve the list of comments for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver=1#list_comments_entity_type), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID.
|
|
101
|
+
|
|
102
|
+
*/
|
|
103
|
+
|
|
104
|
+
list:{comment:Comment}[];
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @description Retrieve the list of comments sorted by the recent ones on the top.
|
|
108
|
+
|
|
109
|
+
If you want to retrieve the list of comments for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver=1#list_comments_entity_type), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID.
|
|
110
|
+
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
next_offset?:string;
|
|
30
114
|
}
|
|
31
115
|
export interface ListInputParam {
|
|
32
|
-
[key : string]: any;
|
|
116
|
+
[key : string]: any;
|
|
117
|
+
/**
|
|
118
|
+
* @description The number of resources to be returned.
|
|
119
|
+
|
|
120
|
+
*/
|
|
121
|
+
|
|
33
122
|
limit?:number;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \`offset\` to the value of \`next_offset\` obtained in the previous iteration of the API call.
|
|
126
|
+
|
|
127
|
+
*/
|
|
128
|
+
|
|
34
129
|
offset?:string;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @description Retrieve the list of comments sorted by the recent ones on the top.
|
|
133
|
+
|
|
134
|
+
If you want to retrieve the list of comments for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver=1#list_comments_entity_type), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID.
|
|
135
|
+
|
|
136
|
+
*/
|
|
137
|
+
|
|
35
138
|
entity_type?:'item' | 'product' | 'coupon' | 'addon' | 'item_price' | 'business_entity' | 'subscription' | 'item_family' | 'credit_note' | 'quote' | 'variant' | 'invoice' | 'plan' | 'transaction' | 'customer' | 'order';
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @description Retrieve the list of comments sorted by the recent ones on the top.
|
|
142
|
+
|
|
143
|
+
If you want to retrieve the list of comments for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver=1#list_comments_entity_type), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID.
|
|
144
|
+
|
|
145
|
+
*/
|
|
146
|
+
|
|
36
147
|
entity_id?:string;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* @description The time at which this comment was created
|
|
151
|
+
|
|
152
|
+
*/
|
|
153
|
+
|
|
37
154
|
created_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* @description Retrieve the list of comments sorted by the recent ones on the top.
|
|
158
|
+
|
|
159
|
+
If you want to retrieve the list of comments for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver=1#list_comments_entity_type), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID.
|
|
160
|
+
|
|
161
|
+
*/
|
|
162
|
+
|
|
38
163
|
sort_by?:{asc?:'created_at',desc?:'created_at'};
|
|
39
164
|
}
|
|
40
|
-
export interface CreateResponse {
|
|
41
|
-
|
|
165
|
+
export interface CreateResponse {
|
|
166
|
+
comment:Comment;
|
|
42
167
|
}
|
|
43
168
|
export interface CreateInputParam {
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @description Type of the entity to create the comment for. \* item - Entity that represents item \* order - Entity that represents an order \* item_price - Entity that represents item price \* customer - Entity that represents a customer \* invoice - Invoice description \* business_entity - Entity that represents item of type business entity \* plan - Entity that represents a subscription plan \* coupon - Entity that represents a discount coupon \* subscription - Entity that represents a subscription of a customer \* item_family - Entity that represents item family \* transaction - Entity that represents a transaction. \* addon - Entity that represents an addon \* credit_note - Credit note description \* quote - Entity that represents a quote
|
|
172
|
+
|
|
173
|
+
*/
|
|
174
|
+
|
|
44
175
|
entity_type:EntityType;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* @description Unique identifier of the entity.
|
|
179
|
+
|
|
180
|
+
*/
|
|
181
|
+
|
|
45
182
|
entity_id:string;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @description Actual notes for the comment.
|
|
186
|
+
|
|
187
|
+
*/
|
|
188
|
+
|
|
46
189
|
notes:string;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* @description The user who created the comment. If created via API, this contains the name given for the API key used.
|
|
193
|
+
|
|
194
|
+
*/
|
|
195
|
+
|
|
47
196
|
added_by?:string;
|
|
48
197
|
}
|
|
49
198
|
|