chargebee 2.51.0 → 2.53.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 +83 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +103 -5
- package/package.json +1 -1
- package/types/core.d.ts +6 -6
- package/types/index.d.ts +10 -0
- package/types/resources/Addon.d.ts +3 -3
- package/types/resources/Address.d.ts +2 -194
- package/types/resources/AdvanceInvoiceSchedule.d.ts +5 -67
- package/types/resources/AttachedItem.d.ts +1 -1
- package/types/resources/Attribute.d.ts +4 -1
- package/types/resources/BillingConfiguration.d.ts +21 -0
- package/types/resources/Brand.d.ts +12 -0
- package/types/resources/BusinessEntity.d.ts +10 -8
- package/types/resources/BusinessEntityTransfer.d.ts +10 -7
- package/types/resources/Card.d.ts +11 -311
- package/types/resources/Comment.d.ts +10 -125
- package/types/resources/Contact.d.ts +2 -44
- package/types/resources/ContractTerm.d.ts +4 -72
- package/types/resources/Coupon.d.ts +4 -41
- package/types/resources/CouponCode.d.ts +67 -35
- package/types/resources/CouponSet.d.ts +12 -121
- package/types/resources/CreditNote.d.ts +89 -95
- package/types/resources/Currency.d.ts +8 -5
- package/types/resources/Customer.d.ts +96 -95
- package/types/resources/CustomerEntitlement.d.ts +3 -1
- package/types/resources/DifferentialPrice.d.ts +1 -1
- package/types/resources/Discount.d.ts +5 -90
- package/types/resources/Download.d.ts +2 -14
- package/types/resources/Entitlement.d.ts +15 -103
- package/types/resources/EntitlementOverride.d.ts +4 -89
- package/types/resources/Estimate.d.ts +6 -14
- package/types/resources/Event.d.ts +24 -109
- package/types/resources/Export.d.ts +116 -432
- package/types/resources/Feature.d.ts +19 -321
- package/types/resources/GatewayErrorDetail.d.ts +6 -48
- package/types/resources/Gift.d.ts +34 -294
- package/types/resources/Hierarchy.d.ts +4 -24
- package/types/resources/HostedPage.d.ts +4 -4
- package/types/resources/ImpactedCustomer.d.ts +23 -0
- package/types/resources/ImpactedItem.d.ts +4 -36
- package/types/resources/ImpactedItemPrice.d.ts +5 -2
- package/types/resources/ImpactedSubscription.d.ts +3 -30
- package/types/resources/InAppSubscription.d.ts +13 -355
- package/types/resources/Invoice.d.ts +112 -126
- package/types/resources/InvoiceEstimate.d.ts +1 -1
- package/types/resources/Item.d.ts +4 -11
- package/types/resources/ItemEntitlement.d.ts +15 -155
- package/types/resources/ItemFamily.d.ts +3 -3
- package/types/resources/ItemPrice.d.ts +7 -7
- package/types/resources/NonSubscription.d.ts +9 -6
- package/types/resources/OmnichannelOneTimeOrder.d.ts +90 -0
- package/types/resources/OmnichannelOneTimeOrderItem.d.ts +24 -0
- package/types/resources/OmnichannelSubscription.d.ts +2 -2
- package/types/resources/OmnichannelSubscriptionItem.d.ts +1 -1
- package/types/resources/OmnichannelSubscriptionItemScheduledChange.d.ts +1 -1
- package/types/resources/Order.d.ts +3 -3
- package/types/resources/PaymentIntent.d.ts +9 -255
- package/types/resources/PaymentReferenceNumber.d.ts +3 -20
- package/types/resources/PaymentSource.d.ts +4 -4
- package/types/resources/PaymentVoucher.d.ts +22 -205
- package/types/resources/Plan.d.ts +3 -3
- package/types/resources/PortalSession.d.ts +4 -146
- package/types/resources/PriceVariant.d.ts +2 -2
- package/types/resources/PricingPageSession.d.ts +2 -2
- package/types/resources/PromotionalCredit.d.ts +12 -215
- package/types/resources/Purchase.d.ts +5 -3
- package/types/resources/Quote.d.ts +32 -14
- package/types/resources/QuotedCharge.d.ts +7 -0
- package/types/resources/QuotedRamp.d.ts +11 -16
- package/types/resources/Ramp.d.ts +7 -7
- package/types/resources/RecordedPurchase.d.ts +8 -1
- package/types/resources/ResourceMigration.d.ts +2 -54
- package/types/resources/SiteMigrationDetail.d.ts +13 -55
- package/types/resources/Subscription.d.ts +33 -29
- package/types/resources/SubscriptionEntitlement.d.ts +6 -106
- package/types/resources/SubscriptionEntitlementsCreatedDetail.d.ts +12 -0
- package/types/resources/SubscriptionEntitlementsUpdatedDetail.d.ts +12 -0
- package/types/resources/SubscriptionEstimate.d.ts +14 -11
- package/types/resources/TaxWithheld.d.ts +14 -26
- package/types/resources/ThirdPartyPaymentMethod.d.ts +2 -19
- package/types/resources/TimeMachine.d.ts +3 -64
- package/types/resources/Token.d.ts +3 -60
- package/types/resources/Transaction.d.ts +8 -8
- package/types/resources/UnbilledCharge.d.ts +1 -1
- package/types/resources/Usage.d.ts +21 -165
- package/types/resources/UsageFile.d.ts +5 -5
- package/types/resources/VirtualBankAccount.d.ts +1 -1
- package/types/resources/WebhookEndpoint.d.ts +117 -0
|
@@ -1,290 +1,76 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
2
3
|
declare module 'chargebee' {
|
|
3
4
|
export interface Card {
|
|
4
5
|
|
|
5
|
-
/**
|
|
6
|
-
* @description Identifier of the payment source
|
|
7
6
|
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
7
|
payment_source_id:string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description Current status of the card. \* valid - A valid and active credit card \* expiring - A card which is expiring in the current month. \* expired - An expired card
|
|
14
8
|
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
9
|
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. \* bluepay - BluePay is a payment gateway. \* paypal_express_checkout - PayPal Express Checkout 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. \* 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. \* worldpay - WorldPay 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 \* stripe - Stripe is a payment gateway. \* moneris - Moneris is a payment gateway. \* chargebee - Chargebee test gateway. \* cybersource - CyberSource is a payment gateway. \* ecentric - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities. \* first_data_global - First Data Global Gateway Virtual Terminal Account \* exact - Exact Payments is a payment gateway. \* eway - eWAY Account is a payment gateway. \* metrics_global - Metrics global is a leading payment service provider providing unified payment services in the US. \* amazon_payments - Amazon Payments is a payment service provider. \* windcave - Windcave provides an end to end payment processing solution in ANZ and other leading global markets. \* quickbooks - Intuit QuickBooks Payments gateway \* wepay - WePay 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. \* 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. \* vantiv - Vantiv is a payment gateway. \* bank_of_america - Bank of America 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 \* ebanx - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.
|
|
21
10
|
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
11
|
gateway:Gateway;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description The gateway account to which this payment source is stored with.
|
|
28
12
|
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
13
|
gateway_account_id?:string;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @description Reference transaction id which used for transactions
|
|
35
14
|
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
15
|
ref_tx_id?:string;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @description Cardholder's first name
|
|
42
16
|
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
17
|
first_name?:string;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @description Cardholder's last name
|
|
49
18
|
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
19
|
last_name?:string;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* @description The Issuer Identification Number, i.e. the first six digits of the card number
|
|
56
20
|
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
21
|
iin:string;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* @description Last four digits of the card number
|
|
63
22
|
|
|
64
|
-
*/
|
|
65
|
-
|
|
66
23
|
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
24
|
|
|
71
|
-
*/
|
|
72
|
-
|
|
73
25
|
card_type?:'visa' | 'mastercard' | 'american_express' | 'discover' | 'jcb' | 'diners_club' | 'bancontact' | 'cmr_falabella' | 'tarjeta_naranja' | 'nativa' | 'cencosud' | 'cabal' | 'argencard' | 'elo' | 'hipercard' | 'carnet' | 'rupay' | 'maestro' | 'dankort' | 'cartes_bancaires' | 'other' | 'not_applicable';
|
|
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
26
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
funding_type:'not_known' | 'prepaid' | 'not_applicable' | 'credit' | 'debit';
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* @description Card expiry month.
|
|
27
|
+
funding_type:'credit' | 'debit' | 'prepaid' | 'not_known' | 'not_applicable';
|
|
84
28
|
|
|
85
|
-
*/
|
|
86
|
-
|
|
87
29
|
expiry_month:number;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* @description Card expiry year.
|
|
91
30
|
|
|
92
|
-
*/
|
|
93
|
-
|
|
94
31
|
expiry_year:number;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* @description [two-letter(alpha2)](https://www.iso.org/iso-3166-country-codes.html) ISO country code.
|
|
98
32
|
|
|
99
|
-
*/
|
|
100
|
-
|
|
101
33
|
issuing_country?:string;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @description Address line 1, as available in card billing address.
|
|
105
34
|
|
|
106
|
-
*/
|
|
107
|
-
|
|
108
35
|
billing_addr1?:string;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* @description Address line 2, as available in card billing address.
|
|
112
36
|
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
37
|
billing_addr2?:string;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* @description City, as available in card billing address.
|
|
119
38
|
|
|
120
|
-
*/
|
|
121
|
-
|
|
122
39
|
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
40
|
|
|
127
|
-
*/
|
|
128
|
-
|
|
129
41
|
billing_state_code?:string;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* @description The state/province name.
|
|
133
42
|
|
|
134
|
-
*/
|
|
135
|
-
|
|
136
43
|
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
44
|
|
|
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
45
|
billing_country?:string;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* @description Postal or Zip code, as available in card billing address.
|
|
154
46
|
|
|
155
|
-
*/
|
|
156
|
-
|
|
157
47
|
billing_zip?:string;
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* @description Timestamp indicating when this card resource is created.
|
|
161
48
|
|
|
162
|
-
*/
|
|
163
|
-
|
|
164
49
|
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
50
|
|
|
169
|
-
*/
|
|
170
|
-
|
|
171
51
|
resource_version?:number;
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* @description Timestamp indicating when this credit card resource was last updated.
|
|
175
52
|
|
|
176
|
-
*/
|
|
177
|
-
|
|
178
53
|
updated_at?:number;
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* @description The IP address of the customer. Used primarily for referral integration and EU VAT validation.
|
|
182
54
|
|
|
183
|
-
*/
|
|
184
|
-
|
|
185
55
|
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
56
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
powered_by?:'giropay' | 'bancontact' | 'ideal' | 'latam_local_card' | 'not_applicable' | 'sofort' | 'card';
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* @description Identifier of the customer.
|
|
57
|
+
powered_by?:'ideal' | 'sofort' | 'bancontact' | 'giropay' | 'card' | 'latam_local_card' | 'payconiq' | 'not_applicable';
|
|
196
58
|
|
|
197
|
-
*/
|
|
198
|
-
|
|
199
59
|
customer_id:string;
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* @description Masked credit card number that is safe to show.
|
|
203
60
|
|
|
204
|
-
*/
|
|
205
|
-
|
|
206
61
|
masked_number?:string;
|
|
62
|
+
|
|
207
63
|
}
|
|
208
64
|
export namespace Card {
|
|
209
65
|
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
66
|
retrieve(customer_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
220
67
|
|
|
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
68
|
update_card_for_customer(customer_id:string, input:UpdateCardForCustomerInputParam):ChargebeeRequest<UpdateCardForCustomerResponse>;
|
|
250
69
|
|
|
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
|
-
|
|
258
|
-
**Limitation**
|
|
259
|
-
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.
|
|
260
|
-
|
|
261
|
-
*/
|
|
262
|
-
|
|
263
70
|
switch_gateway_for_customer(customer_id:string, input:SwitchGatewayForCustomerInputParam):ChargebeeRequest<SwitchGatewayForCustomerResponse>;
|
|
264
71
|
|
|
265
|
-
/**
|
|
266
|
-
* @description #### deprecated
|
|
267
|
-
|
|
268
|
-
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).
|
|
269
|
-
|
|
270
|
-
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.
|
|
271
|
-
|
|
272
|
-
**Limitation**
|
|
273
|
-
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.
|
|
274
|
-
|
|
275
|
-
*/
|
|
276
|
-
|
|
277
72
|
copy_card_for_customer(customer_id:string, input:CopyCardForCustomerInputParam):ChargebeeRequest<CopyCardForCustomerResponse>;
|
|
278
73
|
|
|
279
|
-
/**
|
|
280
|
-
* @description #### deprecated
|
|
281
|
-
|
|
282
|
-
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).
|
|
283
|
-
|
|
284
|
-
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.
|
|
285
|
-
|
|
286
|
-
*/
|
|
287
|
-
|
|
288
74
|
delete_card_for_customer(customer_id:string):ChargebeeRequest<DeleteCardForCustomerResponse>;
|
|
289
75
|
}
|
|
290
76
|
export interface RetrieveResponse {
|
|
@@ -298,121 +84,43 @@ Deletes the card for a customer. Upon successful deletion the `auto_collect
|
|
|
298
84
|
}
|
|
299
85
|
export interface UpdateCardForCustomerInputParam {
|
|
300
86
|
|
|
301
|
-
|
|
302
|
-
* @description The gateway account in which this payment source is stored.
|
|
303
|
-
|
|
304
|
-
*/
|
|
87
|
+
customer?:{vat_number?:string};
|
|
305
88
|
|
|
306
|
-
|
|
89
|
+
gateway?:Gateway;
|
|
307
90
|
|
|
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
|
-
|
|
312
|
-
*/
|
|
91
|
+
gateway_account_id?:string;
|
|
313
92
|
|
|
314
93
|
tmp_token?:string;
|
|
315
94
|
|
|
316
|
-
/**
|
|
317
|
-
* @description Cardholder's first name.
|
|
318
|
-
|
|
319
|
-
*/
|
|
320
|
-
|
|
321
95
|
first_name?:string;
|
|
322
96
|
|
|
323
|
-
/**
|
|
324
|
-
* @description Cardholder's last name.
|
|
325
|
-
|
|
326
|
-
*/
|
|
327
|
-
|
|
328
97
|
last_name?:string;
|
|
329
98
|
|
|
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
99
|
number:string;
|
|
336
100
|
|
|
337
|
-
/**
|
|
338
|
-
* @description Card expiry month.
|
|
339
|
-
|
|
340
|
-
*/
|
|
341
|
-
|
|
342
101
|
expiry_month:number;
|
|
343
102
|
|
|
344
|
-
/**
|
|
345
|
-
* @description Card expiry year.
|
|
346
|
-
|
|
347
|
-
*/
|
|
348
|
-
|
|
349
103
|
expiry_year:number;
|
|
350
104
|
|
|
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.
|
|
353
|
-
|
|
354
|
-
*/
|
|
355
|
-
|
|
356
105
|
cvv?:string;
|
|
357
106
|
|
|
358
|
-
|
|
359
|
-
* @description Address line 1, as available in card billing address.
|
|
360
|
-
|
|
361
|
-
*/
|
|
107
|
+
preferred_scheme?:'cartes_bancaires' | 'mastercard' | 'visa';
|
|
362
108
|
|
|
363
109
|
billing_addr1?:string;
|
|
364
110
|
|
|
365
|
-
/**
|
|
366
|
-
* @description Address line 2, as available in card billing address.
|
|
367
|
-
|
|
368
|
-
*/
|
|
369
|
-
|
|
370
111
|
billing_addr2?:string;
|
|
371
112
|
|
|
372
|
-
/**
|
|
373
|
-
* @description City, as available in card billing address.
|
|
374
|
-
|
|
375
|
-
*/
|
|
376
|
-
|
|
377
113
|
billing_city?:string;
|
|
378
114
|
|
|
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`).
|
|
381
|
-
|
|
382
|
-
*/
|
|
383
|
-
|
|
384
115
|
billing_state_code?:string;
|
|
385
116
|
|
|
386
|
-
/**
|
|
387
|
-
* @description The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided.
|
|
388
|
-
|
|
389
|
-
*/
|
|
390
|
-
|
|
391
117
|
billing_state?:string;
|
|
392
118
|
|
|
393
|
-
/**
|
|
394
|
-
* @description Postal or Zip code, as available in card billing address.
|
|
395
|
-
|
|
396
|
-
*/
|
|
397
|
-
|
|
398
119
|
billing_zip?:string;
|
|
399
120
|
|
|
400
|
-
/**
|
|
401
|
-
* @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).
|
|
402
|
-
|
|
403
|
-
**Note** : If you enter an invalid country code, the system will return an error.
|
|
404
|
-
|
|
405
|
-
**Brexit**
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
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.
|
|
409
|
-
.
|
|
410
|
-
|
|
411
|
-
*/
|
|
412
|
-
|
|
413
121
|
billing_country?:string;
|
|
414
|
-
|
|
415
|
-
|
|
122
|
+
|
|
123
|
+
ip_address?:string;
|
|
416
124
|
}
|
|
417
125
|
export interface SwitchGatewayForCustomerResponse {
|
|
418
126
|
customer:Customer;
|
|
@@ -421,10 +129,7 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
|
|
|
421
129
|
}
|
|
422
130
|
export interface SwitchGatewayForCustomerInputParam {
|
|
423
131
|
|
|
424
|
-
|
|
425
|
-
* @description The gateway account you want to switch to.
|
|
426
|
-
|
|
427
|
-
*/
|
|
132
|
+
gateway?:Gateway;
|
|
428
133
|
|
|
429
134
|
gateway_account_id:string;
|
|
430
135
|
}
|
|
@@ -433,11 +138,6 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
|
|
|
433
138
|
}
|
|
434
139
|
export interface CopyCardForCustomerInputParam {
|
|
435
140
|
|
|
436
|
-
/**
|
|
437
|
-
* @description The gateway account you want to copy the card.
|
|
438
|
-
|
|
439
|
-
*/
|
|
440
|
-
|
|
441
141
|
gateway_account_id:string;
|
|
442
142
|
}
|
|
443
143
|
export interface DeleteCardForCustomerResponse {
|
|
@@ -1,88 +1,34 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
2
3
|
declare module 'chargebee' {
|
|
3
4
|
export interface Comment {
|
|
4
5
|
|
|
5
|
-
/**
|
|
6
|
-
* @description Unique identifier for the comment.
|
|
7
6
|
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
7
|
id:string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description Type of the entity this comment generated for \* item - Entity that represents item \* invoice - Invoice description \* product - Entity that represents product \* plan - Entity that represents a subscription plan \* item_family - Entity that represents item family \* transaction - Entity that represents a transaction. \* quote - Entity that represents a quote \* order - Entity that represents an order \* item_price - Entity that represents item price \* customer - Entity that represents a customer \* variant - Entity that represents product variants \* business_entity - Entity that represents item of type business entity \* coupon - Entity that represents a discount coupon \* subscription - Entity that represents a subscription of a customer \* addon - Entity that represents an addon \* credit_note - Credit note description
|
|
14
8
|
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
9
|
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
10
|
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
11
|
added_by?:string;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description Actual notes for the comment.
|
|
28
12
|
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
13
|
notes:string;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @description The time at which this comment was created
|
|
35
14
|
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
15
|
created_at:number;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @description Type of comment this is. \* system - Comment generated by Chargebee when any backend changes happen for an entity \* user - Comment generated by user either via API or Admin console.
|
|
42
16
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
type:'system' | 'user';
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @description Unique identifier of the entity.
|
|
17
|
+
type:'user' | 'system';
|
|
49
18
|
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
19
|
entity_id:string;
|
|
20
|
+
|
|
21
|
+
business_entity_id?:string;
|
|
22
|
+
|
|
53
23
|
}
|
|
54
24
|
export namespace Comment {
|
|
55
25
|
export class CommentResource {
|
|
56
|
-
/**
|
|
57
|
-
* @description Create a new comment for an entity. The newly added comment will be shown in the web interface as well.
|
|
58
|
-
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
26
|
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
62
27
|
|
|
63
|
-
/**
|
|
64
|
-
* @description Retrieve a comment for an entity identified by comment ID.
|
|
65
|
-
|
|
66
|
-
*/
|
|
67
|
-
|
|
68
28
|
retrieve(comment_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
69
29
|
|
|
70
|
-
/**
|
|
71
|
-
* @description Retrieve the list of comments sorted by the recent ones on the top.
|
|
72
|
-
|
|
73
|
-
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.
|
|
74
|
-
|
|
75
|
-
*/
|
|
76
|
-
|
|
77
30
|
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
78
31
|
|
|
79
|
-
/**
|
|
80
|
-
* @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.
|
|
81
|
-
|
|
82
|
-
Only the comments that are added via Admin console and API can be deleted. Chargebee generated "System" comments cannot be deleted.
|
|
83
|
-
|
|
84
|
-
*/
|
|
85
|
-
|
|
86
32
|
delete(comment_id:string):ChargebeeRequest<DeleteResponse>;
|
|
87
33
|
}
|
|
88
34
|
export interface CreateResponse {
|
|
@@ -90,32 +36,12 @@ Only the comments that are added via Admin console and API can be deleted. Charg
|
|
|
90
36
|
}
|
|
91
37
|
export interface CreateInputParam {
|
|
92
38
|
|
|
93
|
-
/**
|
|
94
|
-
* @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 \* variant - Entity that represents product variants \* invoice - Invoice description \* product - Entity that represents product \* 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
|
|
95
|
-
|
|
96
|
-
*/
|
|
97
|
-
|
|
98
39
|
entity_type:EntityType;
|
|
99
40
|
|
|
100
|
-
/**
|
|
101
|
-
* @description Unique identifier of the entity.
|
|
102
|
-
|
|
103
|
-
*/
|
|
104
|
-
|
|
105
41
|
entity_id:string;
|
|
106
42
|
|
|
107
|
-
/**
|
|
108
|
-
* @description Actual notes for the comment.
|
|
109
|
-
|
|
110
|
-
*/
|
|
111
|
-
|
|
112
43
|
notes:string;
|
|
113
44
|
|
|
114
|
-
/**
|
|
115
|
-
* @description The user who created the comment. If created via API, this contains the name given for the API key used.
|
|
116
|
-
|
|
117
|
-
*/
|
|
118
|
-
|
|
119
45
|
added_by?:string;
|
|
120
46
|
}
|
|
121
47
|
export interface RetrieveResponse {
|
|
@@ -123,79 +49,38 @@ Only the comments that are added via Admin console and API can be deleted. Charg
|
|
|
123
49
|
}
|
|
124
50
|
|
|
125
51
|
export interface ListResponse {
|
|
126
|
-
/**
|
|
127
|
-
* @description Retrieve the list of comments sorted by the recent ones on the top.
|
|
128
|
-
|
|
129
|
-
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.
|
|
130
|
-
|
|
131
|
-
*/
|
|
132
|
-
|
|
133
52
|
list:{comment:Comment}[];
|
|
134
53
|
|
|
135
|
-
/**
|
|
136
|
-
* @description Retrieve the list of comments sorted by the recent ones on the top.
|
|
137
|
-
|
|
138
|
-
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.
|
|
139
|
-
|
|
140
|
-
*/
|
|
141
|
-
|
|
142
54
|
next_offset?:string;
|
|
143
55
|
}
|
|
144
56
|
export interface ListInputParam {
|
|
145
57
|
[key : string]: any;
|
|
146
58
|
/**
|
|
147
|
-
* @description
|
|
148
|
-
|
|
149
|
-
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.
|
|
59
|
+
* @description The number of resources to be returned.
|
|
150
60
|
|
|
151
61
|
*/
|
|
152
62
|
|
|
153
63
|
limit?:number;
|
|
154
64
|
|
|
155
65
|
/**
|
|
156
|
-
* @description
|
|
157
|
-
|
|
158
|
-
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.
|
|
66
|
+
* @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.
|
|
159
67
|
|
|
160
68
|
*/
|
|
161
69
|
|
|
162
70
|
offset?:string;
|
|
163
71
|
|
|
164
|
-
|
|
165
|
-
* @description Retrieve the list of comments sorted by the recent ones on the top.
|
|
166
|
-
|
|
167
|
-
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.
|
|
168
|
-
|
|
169
|
-
*/
|
|
170
|
-
|
|
171
|
-
entity_type?:'item' | 'product' | 'coupon' | 'addon' | 'item_price' | 'business_entity' | 'subscription' | 'item_family' | 'credit_note' | 'quote' | 'variant' | 'invoice' | 'plan' | 'transaction' | 'customer' | 'order';
|
|
72
|
+
entity_type?:'customer' | 'subscription' | 'invoice' | 'quote' | 'credit_note' | 'transaction' | 'plan' | 'addon' | 'coupon' | 'order' | 'business_entity' | 'omnichannel_subscription' | 'omnichannel_subscription_item' | 'omnichannel_transaction' | 'recorded_purchase' | 'omnichannel_subscription_item_scheduled_change' | 'sales_order' | 'omnichannel_one_time_order' | 'omnichannel_one_time_order_item' | 'usage_file' | 'item_family' | 'item' | 'item_price' | 'price_variant';
|
|
172
73
|
|
|
173
|
-
/**
|
|
174
|
-
* @description Retrieve the list of comments sorted by the recent ones on the top.
|
|
175
|
-
|
|
176
|
-
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.
|
|
177
|
-
|
|
178
|
-
*/
|
|
179
|
-
|
|
180
74
|
entity_id?:string;
|
|
181
75
|
|
|
182
76
|
/**
|
|
183
|
-
* @description
|
|
184
|
-
|
|
185
|
-
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.
|
|
77
|
+
* @description The time at which this comment was created
|
|
186
78
|
|
|
187
79
|
*/
|
|
188
80
|
|
|
189
81
|
created_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
190
82
|
|
|
191
|
-
|
|
192
|
-
* @description Retrieve the list of comments sorted by the recent ones on the top.
|
|
193
|
-
|
|
194
|
-
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.
|
|
195
|
-
|
|
196
|
-
*/
|
|
197
|
-
|
|
198
|
-
sort_by?:{asc?:'created_at',desc?:'created_at'};
|
|
83
|
+
sort_by?:object;
|
|
199
84
|
}
|
|
200
85
|
export interface DeleteResponse {
|
|
201
86
|
comment:Comment;
|