chargebee 2.24.0 → 2.25.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 +4 -0
- package/lib/chargebee.js +1 -1
- package/package.json +2 -1
- package/types/core.d.ts +80 -0
- package/types/index.d.ts +92 -0
- package/types/resources/Address.d.ts +58 -0
- package/types/resources/AdvanceInvoiceSchedule.d.ts +26 -0
- package/types/resources/AttachedItem.d.ts +84 -0
- package/types/resources/Card.d.ts +88 -0
- package/types/resources/Comment.d.ts +52 -0
- package/types/resources/Contact.d.ts +15 -0
- package/types/resources/ContractTerm.d.ts +18 -0
- package/types/resources/Coupon.d.ts +150 -0
- package/types/resources/CouponCode.d.ts +25 -0
- package/types/resources/CouponSet.d.ts +75 -0
- package/types/resources/CreditNote.d.ts +337 -0
- package/types/resources/CreditNoteEstimate.d.ts +96 -0
- package/types/resources/Customer.d.ts +440 -0
- package/types/resources/DifferentialPrice.d.ts +88 -0
- package/types/resources/Discount.d.ts +23 -0
- package/types/resources/Download.d.ts +9 -0
- package/types/resources/EntitlementOverride.d.ts +37 -0
- package/types/resources/Estimate.d.ts +214 -0
- package/types/resources/Event.d.ts +42 -0
- package/types/resources/Export.d.ts +182 -0
- package/types/resources/Feature.d.ts +90 -0
- package/types/resources/Gift.d.ts +97 -0
- package/types/resources/Hierarchy.d.ts +11 -0
- package/types/resources/HostedPage.d.ts +242 -0
- package/types/resources/ImpactedItem.d.ts +17 -0
- package/types/resources/ImpactedSubscription.d.ts +17 -0
- package/types/resources/InAppSubscription.d.ts +52 -0
- package/types/resources/Invoice.d.ts +590 -0
- package/types/resources/InvoiceEstimate.d.ts +96 -0
- package/types/resources/Item.d.ts +118 -0
- package/types/resources/ItemEntitlement.d.ts +55 -0
- package/types/resources/ItemFamily.d.ts +59 -0
- package/types/resources/ItemPrice.d.ts +195 -0
- package/types/resources/Media.d.ts +10 -0
- package/types/resources/NonSubscription.d.ts +23 -0
- package/types/resources/Order.d.ts +305 -0
- package/types/resources/PaymentIntent.d.ts +71 -0
- package/types/resources/PaymentReferenceNumber.d.ts +10 -0
- package/types/resources/PaymentSource.d.ts +264 -0
- package/types/resources/PaymentVoucher.d.ts +74 -0
- package/types/resources/PortalSession.d.ts +57 -0
- package/types/resources/PromotionalCredit.d.ts +86 -0
- package/types/resources/Purchase.d.ts +46 -0
- package/types/resources/Quote.d.ts +388 -0
- package/types/resources/QuoteLineGroup.d.ts +83 -0
- package/types/resources/QuotedCharge.d.ts +57 -0
- package/types/resources/QuotedSubscription.d.ts +82 -0
- package/types/resources/ResourceMigration.d.ts +27 -0
- package/types/resources/SiteMigrationDetail.d.ts +31 -0
- package/types/resources/Subscription.d.ts +619 -0
- package/types/resources/SubscriptionEntitlement.d.ts +41 -0
- package/types/resources/SubscriptionEstimate.d.ts +49 -0
- package/types/resources/TaxWithheld.d.ts +13 -0
- package/types/resources/ThirdPartyPaymentMethod.d.ts +10 -0
- package/types/resources/TimeMachine.d.ts +38 -0
- package/types/resources/Token.d.ts +50 -0
- package/types/resources/Transaction.d.ts +170 -0
- package/types/resources/UnbilledCharge.d.ts +91 -0
- package/types/resources/Usage.d.ts +76 -0
- package/types/resources/VirtualBankAccount.d.ts +75 -0
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
declare module 'chargebee' {
|
|
2
|
+
export interface Order {
|
|
3
|
+
|
|
4
|
+
id:string;
|
|
5
|
+
document_number?:string;
|
|
6
|
+
invoice_id?:string;
|
|
7
|
+
subscription_id?:string;
|
|
8
|
+
customer_id?:string;
|
|
9
|
+
status?:'new' | 'partially_delivered' | 'queued' | 'delivered' | 'on_hold' | 'shipped' | 'processing' | 'cancelled' | 'voided' | 'complete' | 'awaiting_shipment' | 'returned';
|
|
10
|
+
cancellation_reason?:'delivery_date_missed' | 'subscription_cancelled' | 'product_unsatisfactory' | 'fraudulent_transaction' | 'third_party_cancellation' | 'order_resent' | 'payment_declined' | 'product_not_required' | 'invoice_voided' | 'invoice_written_off' | 'product_not_available' | 'shipping_cut_off_passed' | 'others' | 'alternative_found';
|
|
11
|
+
payment_status?:'paid' | 'not_paid';
|
|
12
|
+
order_type?:'system_generated' | 'manual';
|
|
13
|
+
price_type:PriceType;
|
|
14
|
+
reference_id?:string;
|
|
15
|
+
fulfillment_status?:string;
|
|
16
|
+
order_date?:number;
|
|
17
|
+
shipping_date?:number;
|
|
18
|
+
note?:string;
|
|
19
|
+
tracking_id?:string;
|
|
20
|
+
tracking_url?:string;
|
|
21
|
+
batch_id?:string;
|
|
22
|
+
created_by?:string;
|
|
23
|
+
shipment_carrier?:string;
|
|
24
|
+
invoice_round_off_amount?:number;
|
|
25
|
+
tax?:number;
|
|
26
|
+
amount_paid?:number;
|
|
27
|
+
amount_adjusted?:number;
|
|
28
|
+
refundable_credits_issued?:number;
|
|
29
|
+
refundable_credits?:number;
|
|
30
|
+
rounding_adjustement?:number;
|
|
31
|
+
paid_on?:number;
|
|
32
|
+
shipping_cut_off_date?:number;
|
|
33
|
+
created_at:number;
|
|
34
|
+
status_update_at?:number;
|
|
35
|
+
delivered_at?:number;
|
|
36
|
+
shipped_at?:number;
|
|
37
|
+
resource_version?:number;
|
|
38
|
+
updated_at?:number;
|
|
39
|
+
cancelled_at?:number;
|
|
40
|
+
resent_status?:'fully_resent' | 'partially_resent';
|
|
41
|
+
is_resent:boolean;
|
|
42
|
+
original_order_id?:string;
|
|
43
|
+
discount?:number;
|
|
44
|
+
sub_total?:number;
|
|
45
|
+
total?:number;
|
|
46
|
+
deleted:boolean;
|
|
47
|
+
currency_code?:string;
|
|
48
|
+
is_gifted?:boolean;
|
|
49
|
+
gift_note?:string;
|
|
50
|
+
gift_id?:string;
|
|
51
|
+
resend_reason?:string;
|
|
52
|
+
business_entity_id?:string;
|
|
53
|
+
order_line_items?:Order.OrderLineItem[];
|
|
54
|
+
shipping_address?:Order.ShippingAddress;
|
|
55
|
+
billing_address?:Order.BillingAddress;
|
|
56
|
+
line_item_taxes?:Order.LineItemTax[];
|
|
57
|
+
line_item_discounts?:Order.LineItemDiscount[];
|
|
58
|
+
linked_credit_notes?:Order.OrderLineItemLinkedCredit[];
|
|
59
|
+
resent_orders?:Order.ResentOrder[];
|
|
60
|
+
}
|
|
61
|
+
export namespace Order {
|
|
62
|
+
export class OrderResource {
|
|
63
|
+
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
64
|
+
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
65
|
+
import_order(input:ImportOrderInputParam):ChargebeeRequest<ImportOrderResponse>;
|
|
66
|
+
assign_order_number(order_id:string):ChargebeeRequest<AssignOrderNumberResponse>;
|
|
67
|
+
resend(order_id:string, input?:ResendInputParam):ChargebeeRequest<ResendResponse>;
|
|
68
|
+
reopen(order_id:string, input?:ReopenInputParam):ChargebeeRequest<ReopenResponse>;
|
|
69
|
+
cancel(order_id:string, input:CancelInputParam):ChargebeeRequest<CancelResponse>;
|
|
70
|
+
retrieve(order_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
71
|
+
update(order_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
|
|
72
|
+
delete(order_id:string):ChargebeeRequest<DeleteResponse>;
|
|
73
|
+
create_refundable_credit_note(order_id:string, input?:CreateRefundableCreditNoteInputParam):ChargebeeRequest<CreateRefundableCreditNoteResponse>;
|
|
74
|
+
}
|
|
75
|
+
export interface ListResponse {
|
|
76
|
+
list:{order:Order}[];
|
|
77
|
+
next_offset?:string;
|
|
78
|
+
}
|
|
79
|
+
export interface ListInputParam {
|
|
80
|
+
[key: string]: string | number | object | boolean;
|
|
81
|
+
limit?:number;
|
|
82
|
+
offset?:string;
|
|
83
|
+
include_deleted?:boolean;
|
|
84
|
+
exclude_deleted_credit_notes?:boolean;
|
|
85
|
+
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
86
|
+
invoice_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
87
|
+
subscription_id?:{is?:string,is_not?:string,starts_with?:string};
|
|
88
|
+
status?:{in?:string,is?:'new' | 'partially_delivered' | 'queued' | 'delivered' | 'on_hold' | 'shipped' | 'processing' | 'cancelled' | 'voided' | 'complete' | 'awaiting_shipment' | 'returned',is_not?:'new' | 'partially_delivered' | 'queued' | 'delivered' | 'on_hold' | 'shipped' | 'processing' | 'cancelled' | 'voided' | 'complete' | 'awaiting_shipment' | 'returned',not_in?:string};
|
|
89
|
+
shipping_date?:{after?:string,before?:string,between?:string,on?:string};
|
|
90
|
+
shipped_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
91
|
+
order_type?:{in?:string,is?:'system_generated' | 'manual',is_not?:'system_generated' | 'manual',not_in?:string};
|
|
92
|
+
order_date?:{after?:string,before?:string,between?:string,on?:string};
|
|
93
|
+
paid_on?:{after?:string,before?:string,between?:string,on?:string};
|
|
94
|
+
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
95
|
+
created_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
96
|
+
resent_status?:{in?:string,is?:'fully_resent' | 'partially_resent',is_not?:'fully_resent' | 'partially_resent',not_in?:string};
|
|
97
|
+
is_resent?:{is?:'true' | 'false'};
|
|
98
|
+
original_order_id?:{is?:string,is_not?:string,starts_with?:string};
|
|
99
|
+
sort_by?:{asc?:'updated_at' | 'created_at',desc?:'updated_at' | 'created_at'};
|
|
100
|
+
}
|
|
101
|
+
export interface CreateResponse {
|
|
102
|
+
order:Order;
|
|
103
|
+
}
|
|
104
|
+
export interface CreateInputParam {
|
|
105
|
+
|
|
106
|
+
id?:string;
|
|
107
|
+
invoice_id:string;
|
|
108
|
+
status?:'new' | 'processing' | 'cancelled' | 'voided' | 'complete';
|
|
109
|
+
reference_id?:string;
|
|
110
|
+
fulfillment_status?:string;
|
|
111
|
+
note?:string;
|
|
112
|
+
tracking_id?:string;
|
|
113
|
+
tracking_url?:string;
|
|
114
|
+
batch_id?:string;
|
|
115
|
+
}
|
|
116
|
+
export interface ImportOrderResponse {
|
|
117
|
+
order:Order;
|
|
118
|
+
}
|
|
119
|
+
export interface ImportOrderInputParam {
|
|
120
|
+
|
|
121
|
+
id?:string;
|
|
122
|
+
document_number?:string;
|
|
123
|
+
invoice_id:string;
|
|
124
|
+
status:'shipped' | 'partially_delivered' | 'queued' | 'cancelled' | 'delivered' | 'on_hold' | 'awaiting_shipment' | 'returned';
|
|
125
|
+
subscription_id?:string;
|
|
126
|
+
customer_id?:string;
|
|
127
|
+
created_at:number;
|
|
128
|
+
order_date:number;
|
|
129
|
+
shipping_date:number;
|
|
130
|
+
reference_id?:string;
|
|
131
|
+
fulfillment_status?:string;
|
|
132
|
+
note?:string;
|
|
133
|
+
tracking_id?:string;
|
|
134
|
+
tracking_url?:string;
|
|
135
|
+
batch_id?:string;
|
|
136
|
+
shipment_carrier?:string;
|
|
137
|
+
shipping_cut_off_date?:number;
|
|
138
|
+
delivered_at?:number;
|
|
139
|
+
shipped_at?:number;
|
|
140
|
+
cancelled_at?:number;
|
|
141
|
+
cancellation_reason?:'delivery_date_missed' | 'subscription_cancelled' | 'product_unsatisfactory' | 'fraudulent_transaction' | 'third_party_cancellation' | 'order_resent' | 'payment_declined' | 'product_not_required' | 'invoice_voided' | 'invoice_written_off' | 'product_not_available' | 'shipping_cut_off_passed' | 'others' | 'alternative_found';
|
|
142
|
+
refundable_credits_issued?:number;
|
|
143
|
+
shipping_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
144
|
+
billing_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
145
|
+
}
|
|
146
|
+
export interface AssignOrderNumberResponse {
|
|
147
|
+
order:Order;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface ResendResponse {
|
|
151
|
+
order:Order;
|
|
152
|
+
}
|
|
153
|
+
export interface ResendInputParam {
|
|
154
|
+
|
|
155
|
+
shipping_date?:number;
|
|
156
|
+
resend_reason?:string;
|
|
157
|
+
order_line_items?:{fulfillment_quantity?:number,id?:string}[];
|
|
158
|
+
}
|
|
159
|
+
export interface ReopenResponse {
|
|
160
|
+
order:Order;
|
|
161
|
+
}
|
|
162
|
+
export interface ReopenInputParam {
|
|
163
|
+
|
|
164
|
+
void_cancellation_credit_notes?:boolean;
|
|
165
|
+
}
|
|
166
|
+
export interface CancelResponse {
|
|
167
|
+
order:Order;
|
|
168
|
+
}
|
|
169
|
+
export interface CancelInputParam {
|
|
170
|
+
|
|
171
|
+
cancellation_reason:'delivery_date_missed' | 'subscription_cancelled' | 'product_unsatisfactory' | 'fraudulent_transaction' | 'third_party_cancellation' | 'order_resent' | 'payment_declined' | 'product_not_required' | 'invoice_voided' | 'invoice_written_off' | 'product_not_available' | 'shipping_cut_off_passed' | 'others' | 'alternative_found';
|
|
172
|
+
customer_notes?:string;
|
|
173
|
+
comment?:string;
|
|
174
|
+
cancelled_at?:number;
|
|
175
|
+
credit_note?:{total?:number};
|
|
176
|
+
}
|
|
177
|
+
export interface RetrieveResponse {
|
|
178
|
+
order:Order;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export interface UpdateResponse {
|
|
182
|
+
order:Order;
|
|
183
|
+
}
|
|
184
|
+
export interface UpdateInputParam {
|
|
185
|
+
|
|
186
|
+
reference_id?:string;
|
|
187
|
+
batch_id?:string;
|
|
188
|
+
note?:string;
|
|
189
|
+
shipping_date?:number;
|
|
190
|
+
order_date?:number;
|
|
191
|
+
cancelled_at?:number;
|
|
192
|
+
cancellation_reason?:'delivery_date_missed' | 'subscription_cancelled' | 'product_unsatisfactory' | 'fraudulent_transaction' | 'third_party_cancellation' | 'order_resent' | 'payment_declined' | 'product_not_required' | 'invoice_voided' | 'invoice_written_off' | 'product_not_available' | 'shipping_cut_off_passed' | 'others' | 'alternative_found';
|
|
193
|
+
shipped_at?:number;
|
|
194
|
+
delivered_at?:number;
|
|
195
|
+
tracking_url?:string;
|
|
196
|
+
tracking_id?:string;
|
|
197
|
+
shipment_carrier?:string;
|
|
198
|
+
fulfillment_status?:string;
|
|
199
|
+
status?:'new' | 'partially_delivered' | 'queued' | 'delivered' | 'on_hold' | 'shipped' | 'processing' | 'cancelled' | 'voided' | 'complete' | 'awaiting_shipment' | 'returned';
|
|
200
|
+
shipping_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
201
|
+
order_line_items?:{id?:string,sku?:string,status?:'shipped' | 'partially_delivered' | 'queued' | 'cancelled' | 'delivered' | 'on_hold' | 'awaiting_shipment' | 'returned'}[];
|
|
202
|
+
}
|
|
203
|
+
export interface DeleteResponse {
|
|
204
|
+
order:Order;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export interface CreateRefundableCreditNoteResponse {
|
|
208
|
+
order:Order;
|
|
209
|
+
}
|
|
210
|
+
export interface CreateRefundableCreditNoteInputParam {
|
|
211
|
+
|
|
212
|
+
customer_notes?:string;
|
|
213
|
+
comment?:string;
|
|
214
|
+
credit_note?:{reason_code:'other' | 'product_unsatisfactory' | 'subscription_pause' | 'order_cancellation' | 'service_unsatisfactory' | 'subscription_cancellation' | 'chargeback' | 'order_change' | 'write_off' | 'waiver' | 'subscription_change' | 'fraudulent',total:number};
|
|
215
|
+
}
|
|
216
|
+
export interface OrderLineItem {
|
|
217
|
+
id?:string;
|
|
218
|
+
invoice_id?:string;
|
|
219
|
+
invoice_line_item_id?:string;
|
|
220
|
+
unit_price?:number;
|
|
221
|
+
description?:string;
|
|
222
|
+
amount?:number;
|
|
223
|
+
fulfillment_quantity?:number;
|
|
224
|
+
fulfillment_amount?:number;
|
|
225
|
+
tax_amount?:number;
|
|
226
|
+
amount_paid?:number;
|
|
227
|
+
amount_adjusted?:number;
|
|
228
|
+
refundable_credits_issued?:number;
|
|
229
|
+
refundable_credits?:number;
|
|
230
|
+
is_shippable?:boolean;
|
|
231
|
+
sku?:string;
|
|
232
|
+
status?:'shipped' | 'partially_delivered' | 'queued' | 'cancelled' | 'delivered' | 'on_hold' | 'awaiting_shipment' | 'returned';
|
|
233
|
+
entity_type?:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc';
|
|
234
|
+
item_level_discount_amount?:number;
|
|
235
|
+
discount_amount?:number;
|
|
236
|
+
entity_id?:string;
|
|
237
|
+
}
|
|
238
|
+
export interface ShippingAddress {
|
|
239
|
+
first_name?:string;
|
|
240
|
+
last_name?:string;
|
|
241
|
+
email?:string;
|
|
242
|
+
company?:string;
|
|
243
|
+
phone?:string;
|
|
244
|
+
line1?:string;
|
|
245
|
+
line2?:string;
|
|
246
|
+
line3?:string;
|
|
247
|
+
city?:string;
|
|
248
|
+
state_code?:string;
|
|
249
|
+
state?:string;
|
|
250
|
+
country?:string;
|
|
251
|
+
zip?:string;
|
|
252
|
+
validation_status?:ValidationStatus;
|
|
253
|
+
index?:number;
|
|
254
|
+
}
|
|
255
|
+
export interface BillingAddress {
|
|
256
|
+
first_name?:string;
|
|
257
|
+
last_name?:string;
|
|
258
|
+
email?:string;
|
|
259
|
+
company?:string;
|
|
260
|
+
phone?:string;
|
|
261
|
+
line1?:string;
|
|
262
|
+
line2?:string;
|
|
263
|
+
line3?:string;
|
|
264
|
+
city?:string;
|
|
265
|
+
state_code?:string;
|
|
266
|
+
state?:string;
|
|
267
|
+
country?:string;
|
|
268
|
+
zip?:string;
|
|
269
|
+
validation_status?:ValidationStatus;
|
|
270
|
+
}
|
|
271
|
+
export interface LineItemTax {
|
|
272
|
+
line_item_id?:string;
|
|
273
|
+
tax_name?:string;
|
|
274
|
+
tax_rate?:number;
|
|
275
|
+
is_partial_tax_applied?:boolean;
|
|
276
|
+
is_non_compliance_tax?:boolean;
|
|
277
|
+
taxable_amount?:number;
|
|
278
|
+
tax_amount?:number;
|
|
279
|
+
tax_juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state';
|
|
280
|
+
tax_juris_name?:string;
|
|
281
|
+
tax_juris_code?:string;
|
|
282
|
+
tax_amount_in_local_currency?:number;
|
|
283
|
+
local_currency_code?:string;
|
|
284
|
+
}
|
|
285
|
+
export interface LineItemDiscount {
|
|
286
|
+
line_item_id?:string;
|
|
287
|
+
discount_type?:'custom_discount' | 'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
|
|
288
|
+
entity_id?:string;
|
|
289
|
+
discount_amount?:number;
|
|
290
|
+
}
|
|
291
|
+
export interface OrderLineItemLinkedCredit {
|
|
292
|
+
amount?:number;
|
|
293
|
+
type?:'adjustment' | 'refundable';
|
|
294
|
+
id?:string;
|
|
295
|
+
status?:'refund_due' | 'adjusted' | 'refunded' | 'voided';
|
|
296
|
+
amount_adjusted?:number;
|
|
297
|
+
amount_refunded?:number;
|
|
298
|
+
}
|
|
299
|
+
export interface ResentOrder {
|
|
300
|
+
order_id?:string;
|
|
301
|
+
reason?:string;
|
|
302
|
+
amount?:number;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
declare module 'chargebee' {
|
|
2
|
+
export interface PaymentIntent {
|
|
3
|
+
|
|
4
|
+
id:string;
|
|
5
|
+
status:'consumed' | 'in_progress' | 'inited' | 'expired' | 'authorized';
|
|
6
|
+
currency_code?:string;
|
|
7
|
+
amount:number;
|
|
8
|
+
gateway_account_id:string;
|
|
9
|
+
expires_at:number;
|
|
10
|
+
reference_id?:string;
|
|
11
|
+
payment_method_type?:'giropay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'boleto' | 'direct_debit' | 'sofort' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'card';
|
|
12
|
+
success_url?:string;
|
|
13
|
+
failure_url?:string;
|
|
14
|
+
created_at:number;
|
|
15
|
+
modified_at:number;
|
|
16
|
+
resource_version?:number;
|
|
17
|
+
updated_at?:number;
|
|
18
|
+
customer_id:string;
|
|
19
|
+
gateway?:string;
|
|
20
|
+
business_entity_id?:string;
|
|
21
|
+
active_payment_attempt?:PaymentIntent.PaymentAttempt;
|
|
22
|
+
}
|
|
23
|
+
export namespace PaymentIntent {
|
|
24
|
+
export class PaymentIntentResource {
|
|
25
|
+
retrieve(payment_intent_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
26
|
+
update(payment_intent_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
|
|
27
|
+
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
28
|
+
}
|
|
29
|
+
export interface RetrieveResponse {
|
|
30
|
+
payment_intent:PaymentIntent;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface UpdateResponse {
|
|
34
|
+
payment_intent:PaymentIntent;
|
|
35
|
+
}
|
|
36
|
+
export interface UpdateInputParam {
|
|
37
|
+
|
|
38
|
+
amount?:number;
|
|
39
|
+
currency_code?:string;
|
|
40
|
+
gateway_account_id?:string;
|
|
41
|
+
payment_method_type?:'giropay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'boleto' | 'direct_debit' | 'sofort' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'card';
|
|
42
|
+
success_url?:string;
|
|
43
|
+
failure_url?:string;
|
|
44
|
+
}
|
|
45
|
+
export interface CreateResponse {
|
|
46
|
+
payment_intent:PaymentIntent;
|
|
47
|
+
}
|
|
48
|
+
export interface CreateInputParam {
|
|
49
|
+
|
|
50
|
+
business_entity_id?:string;
|
|
51
|
+
customer_id?:string;
|
|
52
|
+
amount:number;
|
|
53
|
+
currency_code:string;
|
|
54
|
+
gateway_account_id?:string;
|
|
55
|
+
reference_id?:string;
|
|
56
|
+
payment_method_type?:'giropay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'boleto' | 'direct_debit' | 'sofort' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'card';
|
|
57
|
+
success_url?:string;
|
|
58
|
+
failure_url?:string;
|
|
59
|
+
}
|
|
60
|
+
export interface PaymentAttempt {
|
|
61
|
+
id?:string;
|
|
62
|
+
status?:'pending_authorization' | 'inited' | 'refused' | 'requires_challenge' | 'authorized' | 'requires_identification' | 'requires_redirection';
|
|
63
|
+
payment_method_type?:'giropay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'boleto' | 'direct_debit' | 'sofort' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'card';
|
|
64
|
+
id_at_gateway?:string;
|
|
65
|
+
error_code?:string;
|
|
66
|
+
error_text?:string;
|
|
67
|
+
created_at?:number;
|
|
68
|
+
modified_at?:number;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
declare module 'chargebee' {
|
|
2
|
+
export interface PaymentSource {
|
|
3
|
+
|
|
4
|
+
id:string;
|
|
5
|
+
resource_version?:number;
|
|
6
|
+
updated_at?:number;
|
|
7
|
+
created_at:number;
|
|
8
|
+
customer_id:string;
|
|
9
|
+
type:Type;
|
|
10
|
+
reference_id:string;
|
|
11
|
+
status:'valid' | 'expiring' | 'expired' | 'invalid' | 'pending_verification';
|
|
12
|
+
gateway:Gateway;
|
|
13
|
+
gateway_account_id?:string;
|
|
14
|
+
ip_address?:string;
|
|
15
|
+
issuing_country?:string;
|
|
16
|
+
deleted:boolean;
|
|
17
|
+
business_entity_id?:string;
|
|
18
|
+
card?:PaymentSource.Card;
|
|
19
|
+
bank_account?:PaymentSource.BankAccount;
|
|
20
|
+
boleto?:PaymentSource.CustVoucherSource;
|
|
21
|
+
billing_address?:PaymentSource.BillingAddress;
|
|
22
|
+
amazon_payment?:PaymentSource.AmazonPayment;
|
|
23
|
+
upi?:PaymentSource.Upi;
|
|
24
|
+
paypal?:PaymentSource.Paypal;
|
|
25
|
+
mandates?:PaymentSource.Mandate[];
|
|
26
|
+
}
|
|
27
|
+
export namespace PaymentSource {
|
|
28
|
+
export class PaymentSourceResource {
|
|
29
|
+
create_using_permanent_token(input:CreateUsingPermanentTokenInputParam):ChargebeeRequest<CreateUsingPermanentTokenResponse>;
|
|
30
|
+
delete(cust_payment_source_id:string):ChargebeeRequest<DeleteResponse>;
|
|
31
|
+
create_card(input:CreateCardInputParam):ChargebeeRequest<CreateCardResponse>;
|
|
32
|
+
verify_bank_account(cust_payment_source_id:string, input:VerifyBankAccountInputParam):ChargebeeRequest<VerifyBankAccountResponse>;
|
|
33
|
+
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
34
|
+
export_payment_source(cust_payment_source_id:string, input:ExportPaymentSourceInputParam):ChargebeeRequest<ExportPaymentSourceResponse>;
|
|
35
|
+
create_using_payment_intent(input:CreateUsingPaymentIntentInputParam):ChargebeeRequest<CreateUsingPaymentIntentResponse>;
|
|
36
|
+
retrieve(cust_payment_source_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
37
|
+
create_voucher_payment_source(input:CreateVoucherPaymentSourceInputParam):ChargebeeRequest<CreateVoucherPaymentSourceResponse>;
|
|
38
|
+
create_using_temp_token(input:CreateUsingTempTokenInputParam):ChargebeeRequest<CreateUsingTempTokenResponse>;
|
|
39
|
+
update_card(cust_payment_source_id:string, input?:UpdateCardInputParam):ChargebeeRequest<UpdateCardResponse>;
|
|
40
|
+
switch_gateway_account(cust_payment_source_id:string, input:SwitchGatewayAccountInputParam):ChargebeeRequest<SwitchGatewayAccountResponse>;
|
|
41
|
+
create_using_token(input:CreateUsingTokenInputParam):ChargebeeRequest<CreateUsingTokenResponse>;
|
|
42
|
+
delete_local(cust_payment_source_id:string):ChargebeeRequest<DeleteLocalResponse>;
|
|
43
|
+
create_bank_account(input:CreateBankAccountInputParam):ChargebeeRequest<CreateBankAccountResponse>;
|
|
44
|
+
update_bank_account(cust_payment_source_id:string, input?:UpdateBankAccountInputParam):ChargebeeRequest<UpdateBankAccountResponse>;
|
|
45
|
+
}
|
|
46
|
+
export interface CreateUsingPermanentTokenResponse {
|
|
47
|
+
customer:Customer;
|
|
48
|
+
payment_source:PaymentSource;
|
|
49
|
+
}
|
|
50
|
+
export interface CreateUsingPermanentTokenInputParam {
|
|
51
|
+
|
|
52
|
+
customer_id:string;
|
|
53
|
+
type:Type;
|
|
54
|
+
gateway_account_id?:string;
|
|
55
|
+
reference_id:string;
|
|
56
|
+
issuing_country?:string;
|
|
57
|
+
replace_primary_payment_source?:boolean;
|
|
58
|
+
additional_information?:object;
|
|
59
|
+
}
|
|
60
|
+
export interface DeleteResponse {
|
|
61
|
+
customer:Customer;
|
|
62
|
+
payment_source:PaymentSource;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface CreateCardResponse {
|
|
66
|
+
customer:Customer;
|
|
67
|
+
payment_source:PaymentSource;
|
|
68
|
+
}
|
|
69
|
+
export interface CreateCardInputParam {
|
|
70
|
+
|
|
71
|
+
customer_id:string;
|
|
72
|
+
replace_primary_payment_source?:boolean;
|
|
73
|
+
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,cvv?:string,expiry_month:number,expiry_year:number,first_name?:string,gateway_account_id?:string,last_name?:string,number:string};
|
|
74
|
+
}
|
|
75
|
+
export interface VerifyBankAccountResponse {
|
|
76
|
+
payment_source:PaymentSource;
|
|
77
|
+
}
|
|
78
|
+
export interface VerifyBankAccountInputParam {
|
|
79
|
+
|
|
80
|
+
amount1:number;
|
|
81
|
+
amount2:number;
|
|
82
|
+
}
|
|
83
|
+
export interface ListResponse {
|
|
84
|
+
list:{payment_source:PaymentSource}[];
|
|
85
|
+
next_offset?:string;
|
|
86
|
+
}
|
|
87
|
+
export interface ListInputParam {
|
|
88
|
+
[key: string]: string | number | object | boolean;
|
|
89
|
+
limit?:number;
|
|
90
|
+
offset?:string;
|
|
91
|
+
subscription_id?:string;
|
|
92
|
+
customer_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
93
|
+
type?:{in?:string,is?:'giropay' | 'alipay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'unionpay' | 'direct_debit' | 'generic' | 'sofort' | 'amazon_payments' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'wechat_pay' | 'card',is_not?:'giropay' | 'alipay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'unionpay' | 'direct_debit' | 'generic' | 'sofort' | 'amazon_payments' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'wechat_pay' | 'card',not_in?:string};
|
|
94
|
+
status?:{in?:string,is?:'valid' | 'expiring' | 'expired' | 'invalid' | 'pending_verification',is_not?:'valid' | 'expiring' | 'expired' | 'invalid' | 'pending_verification',not_in?:string};
|
|
95
|
+
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
96
|
+
created_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
97
|
+
sort_by?:{asc?:'updated_at' | 'created_at',desc?:'updated_at' | 'created_at'};
|
|
98
|
+
}
|
|
99
|
+
export interface ExportPaymentSourceResponse {
|
|
100
|
+
third_party_payment_method:ThirdPartyPaymentMethod;
|
|
101
|
+
}
|
|
102
|
+
export interface ExportPaymentSourceInputParam {
|
|
103
|
+
|
|
104
|
+
gateway_account_id:string;
|
|
105
|
+
}
|
|
106
|
+
export interface CreateUsingPaymentIntentResponse {
|
|
107
|
+
customer:Customer;
|
|
108
|
+
payment_source:PaymentSource;
|
|
109
|
+
}
|
|
110
|
+
export interface CreateUsingPaymentIntentInputParam {
|
|
111
|
+
|
|
112
|
+
customer_id:string;
|
|
113
|
+
replace_primary_payment_source?:boolean;
|
|
114
|
+
payment_intent?:{additional_info?:object,additional_information?:object,gateway_account_id?:string,gw_token?:string,id?:string,payment_method_type?:'giropay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'boleto' | 'direct_debit' | 'sofort' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'card',reference_id?:string};
|
|
115
|
+
}
|
|
116
|
+
export interface RetrieveResponse {
|
|
117
|
+
payment_source:PaymentSource;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface CreateVoucherPaymentSourceResponse {
|
|
121
|
+
customer:Customer;
|
|
122
|
+
payment_source:PaymentSource;
|
|
123
|
+
}
|
|
124
|
+
export interface CreateVoucherPaymentSourceInputParam {
|
|
125
|
+
|
|
126
|
+
customer_id:string;
|
|
127
|
+
voucher_payment_source?:{billing_address?:object,gateway_account_id?:string,tax_id?:string,voucher_type:VoucherType};
|
|
128
|
+
}
|
|
129
|
+
export interface CreateUsingTempTokenResponse {
|
|
130
|
+
customer:Customer;
|
|
131
|
+
payment_source:PaymentSource;
|
|
132
|
+
}
|
|
133
|
+
export interface CreateUsingTempTokenInputParam {
|
|
134
|
+
|
|
135
|
+
customer_id:string;
|
|
136
|
+
gateway_account_id?:string;
|
|
137
|
+
type:Type;
|
|
138
|
+
tmp_token:string;
|
|
139
|
+
issuing_country?:string;
|
|
140
|
+
replace_primary_payment_source?:boolean;
|
|
141
|
+
additional_information?:object;
|
|
142
|
+
}
|
|
143
|
+
export interface UpdateCardResponse {
|
|
144
|
+
customer:Customer;
|
|
145
|
+
payment_source:PaymentSource;
|
|
146
|
+
}
|
|
147
|
+
export interface UpdateCardInputParam {
|
|
148
|
+
|
|
149
|
+
gateway_meta_data?:object;
|
|
150
|
+
reference_transaction?:string;
|
|
151
|
+
card?:{billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,expiry_month?:number,expiry_year?:number,first_name?:string,last_name?:string};
|
|
152
|
+
}
|
|
153
|
+
export interface SwitchGatewayAccountResponse {
|
|
154
|
+
customer:Customer;
|
|
155
|
+
payment_source:PaymentSource;
|
|
156
|
+
}
|
|
157
|
+
export interface SwitchGatewayAccountInputParam {
|
|
158
|
+
|
|
159
|
+
gateway_account_id:string;
|
|
160
|
+
}
|
|
161
|
+
export interface CreateUsingTokenResponse {
|
|
162
|
+
customer:Customer;
|
|
163
|
+
payment_source:PaymentSource;
|
|
164
|
+
}
|
|
165
|
+
export interface CreateUsingTokenInputParam {
|
|
166
|
+
|
|
167
|
+
customer_id:string;
|
|
168
|
+
replace_primary_payment_source?:boolean;
|
|
169
|
+
token_id:string;
|
|
170
|
+
}
|
|
171
|
+
export interface DeleteLocalResponse {
|
|
172
|
+
customer:Customer;
|
|
173
|
+
payment_source:PaymentSource;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export interface CreateBankAccountResponse {
|
|
177
|
+
customer:Customer;
|
|
178
|
+
payment_source:PaymentSource;
|
|
179
|
+
}
|
|
180
|
+
export interface CreateBankAccountInputParam {
|
|
181
|
+
|
|
182
|
+
customer_id:string;
|
|
183
|
+
issuing_country?:string;
|
|
184
|
+
replace_primary_payment_source?:boolean;
|
|
185
|
+
bank_account?:{account_holder_type?:AccountHolderType,account_number?:string,account_type?:AccountType,bank_code?:string,bank_name?:string,billing_address?:object,company?:string,echeck_type?:EcheckType,email?:string,first_name?:string,gateway_account_id?:string,iban?:string,last_name?:string,phone?:string,routing_number?:string,swedish_identity_number?:string};
|
|
186
|
+
}
|
|
187
|
+
export interface UpdateBankAccountResponse {
|
|
188
|
+
customer:Customer;
|
|
189
|
+
payment_source:PaymentSource;
|
|
190
|
+
}
|
|
191
|
+
export interface UpdateBankAccountInputParam {
|
|
192
|
+
|
|
193
|
+
bank_account?:{email?:string,first_name?:string,last_name?:string};
|
|
194
|
+
}
|
|
195
|
+
export interface Card {
|
|
196
|
+
first_name?:string;
|
|
197
|
+
last_name?:string;
|
|
198
|
+
iin?:string;
|
|
199
|
+
last4?:string;
|
|
200
|
+
brand?:'discover' | 'other' | 'bancontact' | 'visa' | 'jcb' | 'diners_club' | 'mastercard' | 'not_applicable' | 'american_express';
|
|
201
|
+
funding_type?:'not_known' | 'prepaid' | 'not_applicable' | 'credit' | 'debit';
|
|
202
|
+
expiry_month?:number;
|
|
203
|
+
expiry_year?:number;
|
|
204
|
+
billing_addr1?:string;
|
|
205
|
+
billing_addr2?:string;
|
|
206
|
+
billing_city?:string;
|
|
207
|
+
billing_state_code?:string;
|
|
208
|
+
billing_state?:string;
|
|
209
|
+
billing_country?:string;
|
|
210
|
+
billing_zip?:string;
|
|
211
|
+
masked_number?:string;
|
|
212
|
+
}
|
|
213
|
+
export interface BankAccount {
|
|
214
|
+
last4?:string;
|
|
215
|
+
name_on_account?:string;
|
|
216
|
+
first_name?:string;
|
|
217
|
+
last_name?:string;
|
|
218
|
+
bank_name?:string;
|
|
219
|
+
mandate_id?:string;
|
|
220
|
+
account_type?:AccountType;
|
|
221
|
+
echeck_type?:EcheckType;
|
|
222
|
+
account_holder_type?:AccountHolderType;
|
|
223
|
+
email?:string;
|
|
224
|
+
}
|
|
225
|
+
export interface CustVoucherSource {
|
|
226
|
+
last4?:string;
|
|
227
|
+
first_name?:string;
|
|
228
|
+
last_name?:string;
|
|
229
|
+
email?:string;
|
|
230
|
+
}
|
|
231
|
+
export interface BillingAddress {
|
|
232
|
+
first_name?:string;
|
|
233
|
+
last_name?:string;
|
|
234
|
+
email?:string;
|
|
235
|
+
company?:string;
|
|
236
|
+
phone?:string;
|
|
237
|
+
line1?:string;
|
|
238
|
+
line2?:string;
|
|
239
|
+
line3?:string;
|
|
240
|
+
city?:string;
|
|
241
|
+
state_code?:string;
|
|
242
|
+
state?:string;
|
|
243
|
+
country?:string;
|
|
244
|
+
zip?:string;
|
|
245
|
+
validation_status?:ValidationStatus;
|
|
246
|
+
}
|
|
247
|
+
export interface AmazonPayment {
|
|
248
|
+
email?:string;
|
|
249
|
+
agreement_id?:string;
|
|
250
|
+
}
|
|
251
|
+
export interface Upi {
|
|
252
|
+
vpa?:string;
|
|
253
|
+
}
|
|
254
|
+
export interface Paypal {
|
|
255
|
+
email?:string;
|
|
256
|
+
agreement_id?:string;
|
|
257
|
+
}
|
|
258
|
+
export interface Mandate {
|
|
259
|
+
id?:string;
|
|
260
|
+
subscription_id?:string;
|
|
261
|
+
created_at?:number;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|