chargebee 2.41.0 → 3.0.0-beta.2
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 +11 -15
- package/LICENSE +1 -1
- package/README.md +90 -170
- package/cjs/RequestWrapper.js +84 -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 +80 -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 +90 -55
- 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 +24 -35
- 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 +230 -747
- package/types/resources/ResourceMigration.d.ts +25 -80
- package/types/resources/SiteMigrationDetail.d.ts +34 -112
- package/types/resources/Subscription.d.ts +2390 -4336
- 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 +276 -911
- 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 -2935
- package/types/resources/NonSubscription.d.ts +0 -30
- package/types/resources/Session.d.ts +0 -41
|
@@ -1,447 +1,169 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
2
4
|
declare module 'chargebee' {
|
|
3
5
|
export interface Card {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
*/
|
|
65
|
-
|
|
66
|
-
last4:string;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @description Card type \* bancontact - A Bancontact card. \* american_express - An American Express card. \* not_applicable - Used for offline entries in transactions. Not applicable for cards \* diners_club - A Diner's Club card. \* discover - A Discover card. \* other - Card belonging to types other than those listed above. \* mastercard - A MasterCard. \* jcb - A JCB card. \* visa - A Visa card.
|
|
70
|
-
|
|
71
|
-
*/
|
|
72
|
-
|
|
73
|
-
card_type?:'discover' | 'other' | 'argencard' | 'jcb' | 'mastercard' | 'elo' | 'cencosud' | 'cmr_falabella' | 'american_express' | 'cabal' | 'nativa' | 'bancontact' | 'tarjeta_naranja' | 'carnet' | 'visa' | 'diners_club' | 'rupay' | 'not_applicable' | 'hipercard' | 'maestro';
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @description Card Funding type \* credit - A credit card. \* prepaid - A prepaid card. \* debit - A debit card. \* not_applicable - Used for ACH. Not applicable for cards \* not_known - An unknown card.
|
|
77
|
-
|
|
78
|
-
*/
|
|
79
|
-
|
|
80
|
-
funding_type:'not_known' | 'prepaid' | 'not_applicable' | 'credit' | 'debit';
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* @description Card expiry month.
|
|
84
|
-
|
|
85
|
-
*/
|
|
86
|
-
|
|
87
|
-
expiry_month:number;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* @description Card expiry year.
|
|
91
|
-
|
|
92
|
-
*/
|
|
93
|
-
|
|
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
|
-
|
|
101
|
-
issuing_country?:string;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @description Address line 1, as available in card billing address.
|
|
105
|
-
|
|
106
|
-
*/
|
|
107
|
-
|
|
108
|
-
billing_addr1?:string;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* @description Address line 2, as available in card billing address.
|
|
112
|
-
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
|
-
billing_addr2?:string;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* @description City, as available in card billing address.
|
|
119
|
-
|
|
120
|
-
*/
|
|
121
|
-
|
|
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
|
-
|
|
129
|
-
billing_state_code?:string;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* @description The state/province name.
|
|
133
|
-
|
|
134
|
-
*/
|
|
135
|
-
|
|
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
|
-
|
|
150
|
-
billing_country?:string;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* @description Postal or Zip code, as available in card billing address.
|
|
154
|
-
|
|
155
|
-
*/
|
|
156
|
-
|
|
157
|
-
billing_zip?:string;
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* @description Timestamp indicating when this card resource is created.
|
|
161
|
-
|
|
162
|
-
*/
|
|
163
|
-
|
|
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
|
-
|
|
171
|
-
resource_version?:number;
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* @description Timestamp indicating when this credit card resource was last updated.
|
|
175
|
-
|
|
176
|
-
*/
|
|
177
|
-
|
|
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
|
-
|
|
185
|
-
ip_address?:string;
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* @description Card is powered by payment method. \* card - card \* ideal - ideal \* sofort - sofort \* bancontact - bancontact \* giropay - giropay \* latam_local_card - latam_local_card \* not_applicable - not_applicable
|
|
189
|
-
|
|
190
|
-
*/
|
|
191
|
-
|
|
192
|
-
powered_by?:'giropay' | 'bancontact' | 'ideal' | 'latam_local_card' | 'not_applicable' | 'sofort' | 'card';
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* @description Identifier of the customer.
|
|
196
|
-
|
|
197
|
-
*/
|
|
198
|
-
|
|
199
|
-
customer_id:string;
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* @description Masked credit card number that is safe to show.
|
|
203
|
-
|
|
204
|
-
*/
|
|
205
|
-
|
|
206
|
-
masked_number?:string;
|
|
6
|
+
payment_source_id: string;
|
|
7
|
+
status: 'valid' | 'expiring' | 'expired';
|
|
8
|
+
gateway: Gateway;
|
|
9
|
+
gateway_account_id?: string;
|
|
10
|
+
ref_tx_id?: string;
|
|
11
|
+
first_name?: string;
|
|
12
|
+
last_name?: string;
|
|
13
|
+
iin: string;
|
|
14
|
+
last4: string;
|
|
15
|
+
card_type?:
|
|
16
|
+
| 'visa'
|
|
17
|
+
| 'mastercard'
|
|
18
|
+
| 'american_express'
|
|
19
|
+
| 'discover'
|
|
20
|
+
| 'jcb'
|
|
21
|
+
| 'diners_club'
|
|
22
|
+
| 'bancontact'
|
|
23
|
+
| 'cmr_falabella'
|
|
24
|
+
| 'tarjeta_naranja'
|
|
25
|
+
| 'nativa'
|
|
26
|
+
| 'cencosud'
|
|
27
|
+
| 'cabal'
|
|
28
|
+
| 'argencard'
|
|
29
|
+
| 'elo'
|
|
30
|
+
| 'hipercard'
|
|
31
|
+
| 'carnet'
|
|
32
|
+
| 'rupay'
|
|
33
|
+
| 'maestro'
|
|
34
|
+
| 'other'
|
|
35
|
+
| 'not_applicable';
|
|
36
|
+
funding_type:
|
|
37
|
+
| 'credit'
|
|
38
|
+
| 'debit'
|
|
39
|
+
| 'prepaid'
|
|
40
|
+
| 'not_known'
|
|
41
|
+
| 'not_applicable';
|
|
42
|
+
expiry_month: number;
|
|
43
|
+
expiry_year: number;
|
|
44
|
+
issuing_country?: string;
|
|
45
|
+
billing_addr1?: string;
|
|
46
|
+
billing_addr2?: string;
|
|
47
|
+
billing_city?: string;
|
|
48
|
+
billing_state_code?: string;
|
|
49
|
+
billing_state?: string;
|
|
50
|
+
billing_country?: string;
|
|
51
|
+
billing_zip?: string;
|
|
52
|
+
created_at: number;
|
|
53
|
+
resource_version?: number;
|
|
54
|
+
updated_at?: number;
|
|
55
|
+
ip_address?: string;
|
|
56
|
+
powered_by?:
|
|
57
|
+
| 'ideal'
|
|
58
|
+
| 'sofort'
|
|
59
|
+
| 'bancontact'
|
|
60
|
+
| 'giropay'
|
|
61
|
+
| 'card'
|
|
62
|
+
| 'latam_local_card'
|
|
63
|
+
| 'not_applicable';
|
|
64
|
+
customer_id: string;
|
|
65
|
+
masked_number?: string;
|
|
207
66
|
}
|
|
208
|
-
export namespace Card {
|
|
209
|
-
export class CardResource {
|
|
210
|
-
/**
|
|
211
|
-
* @description #### Deprecated
|
|
212
|
-
|
|
213
|
-
This operation is obsoleted by the [Retrieve a payment source API](/docs/api/payment_sources#retrieve_a_payment_source).
|
|
214
|
-
|
|
215
|
-
Retrieves the credit card for the customer id.
|
|
216
|
-
|
|
217
|
-
*/
|
|
218
|
-
|
|
219
|
-
retrieve(customer_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* @description #### Deprecated
|
|
223
|
-
|
|
224
|
-
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:
|
|
225
|
-
|
|
226
|
-
* [Create using temporary token](/docs/api/payment_sources#create_using_temporary_token)
|
|
227
|
-
* [Create using permanent token](/docs/api/payment_sources#create_using_permanent_token)
|
|
228
|
-
* [Create a card payment source](/docs/api/payment_sources#create_a_card_payment_source)
|
|
229
|
-
|
|
230
|
-
Adds or replaces card details of a customer. Updating card details replaces the present payment method.
|
|
231
|
-
|
|
232
|
-
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
|
|
233
|
-
|
|
234
|
-
* If you are using Stripe gateway, you can use [Stripe.js](https://stripe.com/docs/stripe.js) with your card update form.
|
|
235
|
-
* If you are using Braintree gateway, you can use [Braintree.js](https://www.braintreepayments.com/docs/javascript) with your card update form.
|
|
236
|
-
* 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.
|
|
237
|
-
* In case you are using the Adyen gateway, you will have to use the Adyen's [Client Side Encryption](https://docs.adyen.com/online-payments/classic-integrations/api-integration-ecommerce/cse-integration-ecommerce) to encrypt sensitive cardholder data. Once the cardholder data is encrypted, pass the value in adyen.encrypted.data as temp token in this API.
|
|
238
|
-
* 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.
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
**Legacy behavior:**
|
|
243
|
-
|
|
244
|
-
* **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.
|
|
245
|
-
* **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.
|
|
246
|
-
|
|
247
|
-
*/
|
|
248
|
-
|
|
249
|
-
update_card_for_customer(customer_id:string, input:UpdateCardForCustomerInputParam):ChargebeeRequest<UpdateCardForCustomerResponse>;
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* @description #### Deprecated
|
|
253
|
-
|
|
254
|
-
This request is obsoleted by the [Switch gateway account API](/docs/api/payment_sources#switch_gateway_account) for Payment Sources.
|
|
255
|
-
|
|
256
|
-
Switches the gateway in which customer's card information is stored. This is applicable only if the payment method is `card`.
|
|
257
67
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
delete_card_for_customer(customer_id:string):ChargebeeRequest<DeleteCardForCustomerResponse>;
|
|
289
|
-
}
|
|
290
|
-
export interface RetrieveResponse {
|
|
291
|
-
card:Card;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
export interface UpdateCardForCustomerResponse {
|
|
295
|
-
customer:Customer;
|
|
296
|
-
|
|
297
|
-
card:Card;
|
|
68
|
+
export namespace Card {
|
|
69
|
+
export class CardResource {
|
|
70
|
+
retrieve(
|
|
71
|
+
customer_id: string,
|
|
72
|
+
headers?: ChargebeeRequestHeader,
|
|
73
|
+
): Promise<ChargebeeResponse<RetrieveResponse>>;
|
|
74
|
+
|
|
75
|
+
updateCardForCustomer(
|
|
76
|
+
customer_id: string,
|
|
77
|
+
input: UpdateCardForCustomerInputParam,
|
|
78
|
+
headers?: ChargebeeRequestHeader,
|
|
79
|
+
): Promise<ChargebeeResponse<UpdateCardForCustomerResponse>>;
|
|
80
|
+
|
|
81
|
+
switchGatewayForCustomer(
|
|
82
|
+
customer_id: string,
|
|
83
|
+
input: SwitchGatewayForCustomerInputParam,
|
|
84
|
+
headers?: ChargebeeRequestHeader,
|
|
85
|
+
): Promise<ChargebeeResponse<SwitchGatewayForCustomerResponse>>;
|
|
86
|
+
|
|
87
|
+
copyCardForCustomer(
|
|
88
|
+
customer_id: string,
|
|
89
|
+
input: CopyCardForCustomerInputParam,
|
|
90
|
+
headers?: ChargebeeRequestHeader,
|
|
91
|
+
): Promise<ChargebeeResponse<CopyCardForCustomerResponse>>;
|
|
92
|
+
|
|
93
|
+
deleteCardForCustomer(
|
|
94
|
+
customer_id: string,
|
|
95
|
+
headers?: ChargebeeRequestHeader,
|
|
96
|
+
): Promise<ChargebeeResponse<DeleteCardForCustomerResponse>>;
|
|
298
97
|
}
|
|
299
|
-
export interface UpdateCardForCustomerInputParam {
|
|
300
|
-
|
|
301
|
-
/**
|
|
302
|
-
* @description The gateway account in which this payment source is stored.
|
|
303
|
-
|
|
304
|
-
*/
|
|
305
|
-
|
|
306
|
-
gateway_account_id?:string;
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* @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.
|
|
310
|
-
**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).
|
|
311
98
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* @description Cardholder's first name.
|
|
318
|
-
|
|
319
|
-
*/
|
|
320
|
-
|
|
321
|
-
first_name?:string;
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
* @description Cardholder's last name.
|
|
325
|
-
|
|
326
|
-
*/
|
|
327
|
-
|
|
328
|
-
last_name?:string;
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* @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.
|
|
332
|
-
|
|
333
|
-
*/
|
|
334
|
-
|
|
335
|
-
number:string;
|
|
336
|
-
|
|
337
|
-
/**
|
|
338
|
-
* @description Card expiry month.
|
|
339
|
-
|
|
340
|
-
*/
|
|
341
|
-
|
|
342
|
-
expiry_month:number;
|
|
343
|
-
|
|
344
|
-
/**
|
|
345
|
-
* @description Card expiry year.
|
|
346
|
-
|
|
347
|
-
*/
|
|
348
|
-
|
|
349
|
-
expiry_year:number;
|
|
350
|
-
|
|
351
|
-
/**
|
|
352
|
-
* @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.
|
|
99
|
+
export interface RetrieveResponse {
|
|
100
|
+
card: Card;
|
|
101
|
+
}
|
|
353
102
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
* @description Address line 1, as available in card billing address.
|
|
103
|
+
export interface UpdateCardForCustomerResponse {
|
|
104
|
+
customer: Customer;
|
|
105
|
+
card: Card;
|
|
106
|
+
}
|
|
360
107
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* @description Address line 2, as available in card billing address.
|
|
108
|
+
export interface SwitchGatewayForCustomerResponse {
|
|
109
|
+
customer: Customer;
|
|
110
|
+
card: Card;
|
|
111
|
+
}
|
|
367
112
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
/**
|
|
373
|
-
* @description City, as available in card billing address.
|
|
113
|
+
export interface CopyCardForCustomerResponse {
|
|
114
|
+
third_party_payment_method: ThirdPartyPaymentMethod;
|
|
115
|
+
}
|
|
374
116
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
/**
|
|
380
|
-
* @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`).
|
|
117
|
+
export interface DeleteCardForCustomerResponse {
|
|
118
|
+
customer: Customer;
|
|
119
|
+
}
|
|
381
120
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
billing_state_code?:string;
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* @description The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided.
|
|
121
|
+
// REQUEST PARAMS
|
|
122
|
+
//---------------
|
|
388
123
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
billing_state?:string;
|
|
392
|
-
|
|
393
|
-
/**
|
|
394
|
-
* @description Postal or Zip code, as available in card billing address.
|
|
395
|
-
|
|
396
|
-
*/
|
|
397
|
-
|
|
398
|
-
billing_zip?:string;
|
|
399
|
-
|
|
124
|
+
export interface UpdateCardForCustomerInputParam {
|
|
400
125
|
/**
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
126
|
+
* @deprecated Please refer API docs to use other attributes
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
gateway?: Gateway;
|
|
130
|
+
gateway_account_id?: string;
|
|
131
|
+
tmp_token?: string;
|
|
132
|
+
first_name?: string;
|
|
133
|
+
last_name?: string;
|
|
134
|
+
number: string;
|
|
135
|
+
expiry_month: number;
|
|
136
|
+
expiry_year: number;
|
|
137
|
+
cvv?: string;
|
|
138
|
+
billing_addr1?: string;
|
|
139
|
+
billing_addr2?: string;
|
|
140
|
+
billing_city?: string;
|
|
141
|
+
billing_state_code?: string;
|
|
142
|
+
billing_state?: string;
|
|
143
|
+
billing_zip?: string;
|
|
144
|
+
billing_country?: string /**
|
|
145
|
+
* @deprecated Please refer API docs to use other attributes
|
|
146
|
+
*/;
|
|
147
|
+
|
|
148
|
+
ip_address?: string;
|
|
149
|
+
customer?: CustomerUpdateCardForCustomerInputParam;
|
|
419
150
|
}
|
|
420
151
|
export interface SwitchGatewayForCustomerInputParam {
|
|
421
|
-
|
|
422
152
|
/**
|
|
423
|
-
|
|
153
|
+
* @deprecated Please refer API docs to use other attributes
|
|
154
|
+
*/
|
|
424
155
|
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
gateway_account_id:string;
|
|
428
|
-
}
|
|
429
|
-
export interface CopyCardForCustomerResponse {
|
|
430
|
-
third_party_payment_method:ThirdPartyPaymentMethod;
|
|
156
|
+
gateway?: Gateway;
|
|
157
|
+
gateway_account_id: string;
|
|
431
158
|
}
|
|
432
159
|
export interface CopyCardForCustomerInputParam {
|
|
433
|
-
|
|
434
|
-
/**
|
|
435
|
-
* @description The gateway account you want to copy the card.
|
|
436
|
-
|
|
437
|
-
*/
|
|
438
|
-
|
|
439
|
-
gateway_account_id:string;
|
|
160
|
+
gateway_account_id: string;
|
|
440
161
|
}
|
|
441
|
-
export interface
|
|
442
|
-
|
|
162
|
+
export interface CustomerUpdateCardForCustomerInputParam {
|
|
163
|
+
/**
|
|
164
|
+
* @deprecated Please refer API docs to use other attributes
|
|
165
|
+
*/
|
|
166
|
+
vat_number?: string;
|
|
443
167
|
}
|
|
444
|
-
|
|
445
|
-
|
|
446
168
|
}
|
|
447
|
-
}
|
|
169
|
+
}
|