chargebee 2.25.3 → 2.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/README.md +55 -49
- package/lib/chargebee.js +1 -1
- package/package.json +1 -1
- package/types/core.d.ts +1 -0
- package/types/resources/Address.d.ts +245 -5
- package/types/resources/AdvanceInvoiceSchedule.d.ts +78 -2
- package/types/resources/AttachedItem.d.ts +305 -13
- package/types/resources/Card.d.ts +485 -13
- package/types/resources/Comment.d.ts +177 -11
- package/types/resources/Contact.d.ts +54 -0
- package/types/resources/ContractTerm.d.ts +83 -0
- package/types/resources/Coupon.d.ts +665 -20
- package/types/resources/CouponCode.d.ts +56 -5
- package/types/resources/CouponSet.d.ts +224 -17
- package/types/resources/CreditNote.d.ts +1202 -44
- package/types/resources/CreditNoteEstimate.d.ts +75 -6
- package/types/resources/Customer.d.ts +2132 -73
- package/types/resources/DifferentialPrice.d.ts +266 -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 +1181 -27
- package/types/resources/Event.d.ts +145 -8
- package/types/resources/Export.d.ts +703 -32
- package/types/resources/Feature.d.ts +356 -22
- package/types/resources/Gift.d.ts +351 -24
- package/types/resources/Hierarchy.d.ts +30 -0
- package/types/resources/HostedPage.d.ts +1212 -37
- package/types/resources/ImpactedItem.d.ts +41 -1
- package/types/resources/ImpactedSubscription.d.ts +36 -1
- package/types/resources/InAppSubscription.d.ts +636 -9
- package/types/resources/Invoice.d.ts +2293 -93
- package/types/resources/InvoiceEstimate.d.ts +75 -6
- package/types/resources/Item.d.ts +542 -16
- package/types/resources/ItemEntitlement.d.ts +172 -13
- package/types/resources/ItemFamily.d.ts +173 -15
- package/types/resources/ItemPrice.d.ts +971 -26
- package/types/resources/Media.d.ts +24 -0
- package/types/resources/NonSubscription.d.ts +51 -3
- package/types/resources/Order.d.ts +1224 -32
- package/types/resources/PaymentIntent.d.ts +318 -8
- package/types/resources/PaymentReferenceNumber.d.ts +24 -0
- package/types/resources/PaymentSource.d.ts +1259 -55
- package/types/resources/PaymentVoucher.d.ts +262 -14
- package/types/resources/PortalSession.d.ts +187 -10
- package/types/resources/PromotionalCredit.d.ts +351 -16
- package/types/resources/Purchase.d.ts +274 -5
- package/types/resources/Quote.d.ts +1595 -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 +73 -3
- package/types/resources/SiteMigrationDetail.d.ts +98 -5
- package/types/resources/Subscription.d.ts +3462 -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 +99 -7
- package/types/resources/Token.d.ts +179 -7
- package/types/resources/Transaction.d.ts +597 -25
- package/types/resources/UnbilledCharge.d.ts +355 -14
- package/types/resources/Usage.d.ts +259 -13
- package/types/resources/VirtualBankAccount.d.ts +255 -17
|
@@ -1,46 +1,218 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
2
|
declare module 'chargebee' {
|
|
3
3
|
export interface Token {
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @description Identifier of the Chargebee Token
|
|
7
|
+
|
|
8
|
+
*/
|
|
9
|
+
|
|
4
10
|
id:string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @description Name of the gateway this token is stored in. \* 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.
|
|
14
|
+
|
|
15
|
+
*/
|
|
16
|
+
|
|
5
17
|
gateway:Gateway;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @description The gateway account in which this token is stored.
|
|
21
|
+
|
|
22
|
+
*/
|
|
23
|
+
|
|
6
24
|
gateway_account_id:string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @description Type of payment method of the token. \* google_pay - Payments made via Google Pay. \* apple_pay - Payments made via Apple Pay. \* unionpay - Payments made via UnionPay. \* ideal - Payments made via iDEAL. \* bancontact - Payments made via Bancontact Card. \* netbanking_emandates - Netbanking (eMandates) Payments. \* alipay - Payments made via Alipay. \* dotpay - Payments made via Dotpay. \* giropay - Payments made via giropay. \* sofort - Payments made via Sofort. \* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* paypal_express_checkout - Payments made via PayPal Express Checkout. \* amazon_payments - Payments made via Amazon Payments. \* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource. \* upi - UPI Payments. \* generic - Payments made via Generic Payment Method. \* wechat_pay - Payments made via WeChat Pay.
|
|
28
|
+
|
|
29
|
+
*/
|
|
30
|
+
|
|
7
31
|
payment_method_type:PaymentMethodType;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @description Status of the token \* new - new \* consumed - The token is already used \* expired - expired
|
|
35
|
+
|
|
36
|
+
*/
|
|
37
|
+
|
|
8
38
|
status:'consumed' | 'new' | 'expired';
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @description The id with which this token is referred in gateway
|
|
42
|
+
|
|
43
|
+
*/
|
|
44
|
+
|
|
9
45
|
id_at_vault:string;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @description Name of the gateway/vault provider where the payment method is tokenized \* gateway - gateway \* spreedly - spreedly
|
|
49
|
+
|
|
50
|
+
*/
|
|
51
|
+
|
|
10
52
|
vault:'spreedly' | 'gateway';
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @description The IP address from where the token is created. Used primarily for EU VAT validation.
|
|
56
|
+
|
|
57
|
+
*/
|
|
58
|
+
|
|
11
59
|
ip_address?:string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @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.
|
|
63
|
+
|
|
64
|
+
*/
|
|
65
|
+
|
|
12
66
|
resource_version?:number;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @description Timestamp indicating when this token resource was last updated.
|
|
70
|
+
|
|
71
|
+
*/
|
|
72
|
+
|
|
13
73
|
updated_at?:number;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @description Timestamp indicating when this token resource is created.
|
|
77
|
+
|
|
78
|
+
*/
|
|
79
|
+
|
|
14
80
|
created_at:number;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @description Timestamp indicating when this token is expired
|
|
84
|
+
|
|
85
|
+
*/
|
|
86
|
+
|
|
15
87
|
expired_at?:number;
|
|
16
88
|
}
|
|
17
89
|
export namespace Token {
|
|
18
|
-
export class TokenResource {
|
|
90
|
+
export class TokenResource {
|
|
91
|
+
/**
|
|
92
|
+
* @description Generate a token using the one time token created by payment gateways for any specific payment method.
|
|
93
|
+
|
|
94
|
+
*/
|
|
95
|
+
|
|
19
96
|
create_using_temp_token(input:CreateUsingTempTokenInputParam):ChargebeeRequest<CreateUsingTempTokenResponse>;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @description Generate a token that holds card related information.
|
|
100
|
+
|
|
101
|
+
*/
|
|
102
|
+
|
|
20
103
|
create_for_card(input?:CreateForCardInputParam):ChargebeeRequest<CreateForCardResponse>;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @description Retrieve a token using token ID.
|
|
107
|
+
|
|
108
|
+
*/
|
|
109
|
+
|
|
21
110
|
retrieve(cb_token_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
22
111
|
}
|
|
23
|
-
export interface CreateUsingTempTokenResponse {
|
|
24
|
-
|
|
112
|
+
export interface CreateUsingTempTokenResponse {
|
|
113
|
+
/**
|
|
114
|
+
* @description Generate a token using the one time token created by payment gateways for any specific payment method.
|
|
115
|
+
|
|
116
|
+
*/
|
|
117
|
+
|
|
118
|
+
token:Token;
|
|
25
119
|
}
|
|
26
120
|
export interface CreateUsingTempTokenInputParam {
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @description The gateway account to which the token is associated.
|
|
124
|
+
|
|
125
|
+
*/
|
|
126
|
+
|
|
27
127
|
gateway_account_id?:string;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @description Type of payment method of the token. \* google_pay - Payments made via Google Pay. \* apple_pay - Payments made via Apple Pay. \* unionpay - Payments made via UnionPay. \* ideal - Payments made via iDEAL. \* amazon_payments - Payments made via Amazon Payments. \* bancontact - Payments made via Bancontact Card. \* netbanking_emandates - Netbanking (eMandates) Payments. \* alipay - Payments made via Alipay. \* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource. \* dotpay - Payments made via Dotpay. \* giropay - Payments made via giropay. \* upi - UPI Payments. \* sofort - Payments made via Sofort. \* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* generic - Payments made via Generic Payment Method. \* wechat_pay - Payments made via WeChat Pay. \* paypal_express_checkout - Payments made via PayPal Express Checkout.
|
|
131
|
+
|
|
132
|
+
*/
|
|
133
|
+
|
|
28
134
|
payment_method_type:PaymentMethodType;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @description Single-use token created by payment gateways. In Stripe, a single-use token is created for Apple Pay Wallet, card details or direct debit. In Braintree, a nonce is created for Apple Pay Wallet, PayPal, or card details. In Authorize.net, a nonce is created for card details. In Adyen, an encrypted data is created from the card details.
|
|
138
|
+
|
|
139
|
+
*/
|
|
140
|
+
|
|
29
141
|
id_at_vault:string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @description Represents what type of object at gateway eg. "token" in case Stripe token and "source" in case of Stripe Source.
|
|
145
|
+
|
|
146
|
+
*/
|
|
147
|
+
|
|
30
148
|
gw_obj_type?:string;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* @description Used to derieve Bank Account Scheme by default will take site default currency.
|
|
152
|
+
|
|
153
|
+
*/
|
|
154
|
+
|
|
31
155
|
currency_code?:string;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* @description * `checkout_com`: While adding a new payment method using [permanent token](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://docs.checkout.com/payment-methods/cards/dlocal).
|
|
159
|
+
* `payer`: User related information.
|
|
160
|
+
* `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).
|
|
161
|
+
* `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.
|
|
162
|
+
* `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.
|
|
163
|
+
* `fraud`: Fraud identification related information.
|
|
164
|
+
* `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.
|
|
165
|
+
* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.
|
|
166
|
+
* `fraud`: Fraud identification related information.
|
|
167
|
+
* `device_session_id`: Session ID associated with the user's device.
|
|
168
|
+
* `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.
|
|
169
|
+
* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.
|
|
170
|
+
* `fraud`: Fraud identification related information.
|
|
171
|
+
* `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.
|
|
172
|
+
.
|
|
173
|
+
|
|
174
|
+
*/
|
|
175
|
+
|
|
32
176
|
additional_information?:object;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* @description Parameters for token_additional_detail
|
|
180
|
+
|
|
181
|
+
*/
|
|
182
|
+
|
|
33
183
|
token_additional_detail?:{expiry_month?:number,expiry_year?:number,first_name?:string,last_name?:string};
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* @description Parameters for token_billing_address
|
|
187
|
+
|
|
188
|
+
*/
|
|
189
|
+
|
|
34
190
|
token_billing_address?:{city?:string,country_code?:string,line1?:string,line2?:string,state?:string,state_code?:string,zip?:string};
|
|
35
191
|
}
|
|
36
|
-
export interface CreateForCardResponse {
|
|
37
|
-
|
|
192
|
+
export interface CreateForCardResponse {
|
|
193
|
+
/**
|
|
194
|
+
* @description Generate a token that holds card related information.
|
|
195
|
+
|
|
196
|
+
*/
|
|
197
|
+
|
|
198
|
+
token:Token;
|
|
38
199
|
}
|
|
39
200
|
export interface CreateForCardInputParam {
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* @description Parameters for card
|
|
204
|
+
|
|
205
|
+
*/
|
|
206
|
+
|
|
40
207
|
card?:{additional_information?:object,billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,card_type?:'discover' | 'bancontact' | 'other' | 'visa' | 'jcb' | 'diners_club' | 'mastercard' | 'not_applicable' | 'american_express',cvv?:string,expiry_month:number,expiry_year:number,first_name?:string,gateway_account_id?:string,last_name?:string,number:string};
|
|
41
208
|
}
|
|
42
|
-
export interface RetrieveResponse {
|
|
43
|
-
|
|
209
|
+
export interface RetrieveResponse {
|
|
210
|
+
/**
|
|
211
|
+
* @description Retrieve a token using token ID.
|
|
212
|
+
|
|
213
|
+
*/
|
|
214
|
+
|
|
215
|
+
token:Token;
|
|
44
216
|
}
|
|
45
217
|
|
|
46
218
|
|