chargebee 3.0.0-beta.4 → 3.0.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.
Files changed (84) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +4 -3
  3. package/cjs/environment.js +1 -1
  4. package/cjs/util.js +1 -1
  5. package/esm/environment.js +1 -1
  6. package/esm/util.js +1 -1
  7. package/package.json +1 -1
  8. package/types/core.d.ts +0 -564
  9. package/types/index.d.ts +0 -167
  10. package/types/resources/Address.d.ts +0 -71
  11. package/types/resources/AdvanceInvoiceSchedule.d.ts +0 -29
  12. package/types/resources/AttachedItem.d.ts +0 -114
  13. package/types/resources/Attribute.d.ts +0 -9
  14. package/types/resources/BusinessEntity.d.ts +0 -64
  15. package/types/resources/BusinessEntityTransfer.d.ts +0 -15
  16. package/types/resources/Card.d.ts +0 -171
  17. package/types/resources/Comment.d.ts +0 -89
  18. package/types/resources/Contact.d.ts +0 -16
  19. package/types/resources/ContractTerm.d.ts +0 -19
  20. package/types/resources/Coupon.d.ts +0 -314
  21. package/types/resources/CouponCode.d.ts +0 -70
  22. package/types/resources/CouponSet.d.ts +0 -111
  23. package/types/resources/CreditNote.d.ts +0 -628
  24. package/types/resources/CreditNoteEstimate.d.ts +0 -143
  25. package/types/resources/Currency.d.ts +0 -91
  26. package/types/resources/Customer.d.ts +0 -962
  27. package/types/resources/CustomerEntitlement.d.ts +0 -36
  28. package/types/resources/DifferentialPrice.d.ts +0 -142
  29. package/types/resources/Discount.d.ts +0 -24
  30. package/types/resources/Download.d.ts +0 -10
  31. package/types/resources/Entitlement.d.ts +0 -66
  32. package/types/resources/EntitlementOverride.d.ts +0 -76
  33. package/types/resources/Estimate.d.ts +0 -1237
  34. package/types/resources/Event.d.ts +0 -81
  35. package/types/resources/Export.d.ts +0 -607
  36. package/types/resources/Feature.d.ts +0 -142
  37. package/types/resources/GatewayErrorDetail.d.ts +0 -20
  38. package/types/resources/Gift.d.ts +0 -296
  39. package/types/resources/Hierarchy.d.ts +0 -12
  40. package/types/resources/HostedPage.d.ts +0 -1112
  41. package/types/resources/ImpactedItem.d.ts +0 -20
  42. package/types/resources/ImpactedItemPrice.d.ts +0 -20
  43. package/types/resources/ImpactedSubscription.d.ts +0 -20
  44. package/types/resources/InAppSubscription.d.ts +0 -116
  45. package/types/resources/Invoice.d.ts +0 -1691
  46. package/types/resources/InvoiceEstimate.d.ts +0 -143
  47. package/types/resources/Item.d.ts +0 -204
  48. package/types/resources/ItemEntitlement.d.ts +0 -103
  49. package/types/resources/ItemFamily.d.ts +0 -89
  50. package/types/resources/ItemPrice.d.ts +0 -328
  51. package/types/resources/Metadata.d.ts +0 -8
  52. package/types/resources/NonSubscription.d.ts +0 -48
  53. package/types/resources/Order.d.ts +0 -586
  54. package/types/resources/PaymentIntent.d.ts +0 -178
  55. package/types/resources/PaymentReferenceNumber.d.ts +0 -11
  56. package/types/resources/PaymentSchedule.d.ts +0 -28
  57. package/types/resources/PaymentScheduleEstimate.d.ts +0 -25
  58. package/types/resources/PaymentScheduleScheme.d.ts +0 -62
  59. package/types/resources/PaymentSource.d.ts +0 -529
  60. package/types/resources/PaymentVoucher.d.ts +0 -107
  61. package/types/resources/PortalSession.d.ts +0 -88
  62. package/types/resources/PriceVariant.d.ts +0 -112
  63. package/types/resources/PricingPageSession.d.ts +0 -130
  64. package/types/resources/PromotionalCredit.d.ts +0 -111
  65. package/types/resources/Purchase.d.ts +0 -202
  66. package/types/resources/Quote.d.ts +0 -1467
  67. package/types/resources/QuoteLineGroup.d.ts +0 -136
  68. package/types/resources/QuotedCharge.d.ts +0 -56
  69. package/types/resources/QuotedSubscription.d.ts +0 -114
  70. package/types/resources/Ramp.d.ts +0 -260
  71. package/types/resources/ResourceMigration.d.ts +0 -36
  72. package/types/resources/SiteMigrationDetail.d.ts +0 -46
  73. package/types/resources/Subscription.d.ts +0 -2443
  74. package/types/resources/SubscriptionEntitlement.d.ts +0 -79
  75. package/types/resources/SubscriptionEstimate.d.ts +0 -59
  76. package/types/resources/TaxWithheld.d.ts +0 -19
  77. package/types/resources/ThirdPartyPaymentMethod.d.ts +0 -11
  78. package/types/resources/TimeMachine.d.ts +0 -57
  79. package/types/resources/Token.d.ts +0 -19
  80. package/types/resources/Transaction.d.ts +0 -313
  81. package/types/resources/UnbilledCharge.d.ts +0 -209
  82. package/types/resources/Usage.d.ts +0 -113
  83. package/types/resources/VirtualBankAccount.d.ts +0 -125
  84. package/types/resources/filter.d.ts +0 -52
@@ -1,529 +0,0 @@
1
- ///<reference path='./../core.d.ts'/>
2
- ///<reference path='./../index.d.ts'/>
3
- ///<reference path='./filter.d.ts'/>
4
- declare module 'chargebee' {
5
- export interface PaymentSource {
6
- id: string;
7
- resource_version?: number;
8
- updated_at?: number;
9
- created_at: number;
10
- customer_id: string;
11
- type: Type;
12
- reference_id: string;
13
- status:
14
- | 'valid'
15
- | 'expiring'
16
- | 'expired'
17
- | 'invalid'
18
- | 'pending_verification';
19
- gateway: Gateway;
20
- gateway_account_id?: string;
21
- ip_address?: string;
22
- issuing_country?: string;
23
- card?: PaymentSource.Card;
24
- bank_account?: PaymentSource.BankAccount;
25
- boleto?: PaymentSource.CustVoucherSource;
26
- billing_address?: PaymentSource.BillingAddress;
27
- amazon_payment?: PaymentSource.AmazonPayment;
28
- upi?: PaymentSource.Upi;
29
- paypal?: PaymentSource.Paypal;
30
- venmo?: PaymentSource.Venmo;
31
- klarna_pay_now?: PaymentSource.KlarnaPayNow;
32
- mandates?: PaymentSource.Mandate[];
33
- deleted: boolean;
34
- business_entity_id?: string;
35
- }
36
-
37
- export namespace PaymentSource {
38
- export class PaymentSourceResource {
39
- createUsingTempToken(
40
- input: CreateUsingTempTokenInputParam,
41
- headers?: ChargebeeRequestHeader,
42
- ): Promise<ChargebeeResponse<CreateUsingTempTokenResponse>>;
43
-
44
- createUsingPermanentToken(
45
- input: CreateUsingPermanentTokenInputParam,
46
- headers?: ChargebeeRequestHeader,
47
- ): Promise<ChargebeeResponse<CreateUsingPermanentTokenResponse>>;
48
-
49
- createUsingToken(
50
- input: CreateUsingTokenInputParam,
51
- headers?: ChargebeeRequestHeader,
52
- ): Promise<ChargebeeResponse<CreateUsingTokenResponse>>;
53
-
54
- createUsingPaymentIntent(
55
- input: CreateUsingPaymentIntentInputParam,
56
- headers?: ChargebeeRequestHeader,
57
- ): Promise<ChargebeeResponse<CreateUsingPaymentIntentResponse>>;
58
-
59
- createVoucherPaymentSource(
60
- input: CreateVoucherPaymentSourceInputParam,
61
- headers?: ChargebeeRequestHeader,
62
- ): Promise<ChargebeeResponse<CreateVoucherPaymentSourceResponse>>;
63
-
64
- createCard(
65
- input: CreateCardInputParam,
66
- headers?: ChargebeeRequestHeader,
67
- ): Promise<ChargebeeResponse<CreateCardResponse>>;
68
-
69
- createBankAccount(
70
- input: CreateBankAccountInputParam,
71
- headers?: ChargebeeRequestHeader,
72
- ): Promise<ChargebeeResponse<CreateBankAccountResponse>>;
73
-
74
- updateCard(
75
- cust_payment_source_id: string,
76
- input?: UpdateCardInputParam,
77
- headers?: ChargebeeRequestHeader,
78
- ): Promise<ChargebeeResponse<UpdateCardResponse>>;
79
-
80
- updateBankAccount(
81
- cust_payment_source_id: string,
82
- input?: UpdateBankAccountInputParam,
83
- headers?: ChargebeeRequestHeader,
84
- ): Promise<ChargebeeResponse<UpdateBankAccountResponse>>;
85
-
86
- verifyBankAccount(
87
- cust_payment_source_id: string,
88
- input: VerifyBankAccountInputParam,
89
- headers?: ChargebeeRequestHeader,
90
- ): Promise<ChargebeeResponse<VerifyBankAccountResponse>>;
91
-
92
- retrieve(
93
- cust_payment_source_id: string,
94
- headers?: ChargebeeRequestHeader,
95
- ): Promise<ChargebeeResponse<RetrieveResponse>>;
96
-
97
- list(
98
- input?: ListInputParam,
99
- headers?: ChargebeeRequestHeader,
100
- ): Promise<ChargebeeResponse<ListResponse>>;
101
-
102
- switchGatewayAccount(
103
- cust_payment_source_id: string,
104
- input: SwitchGatewayAccountInputParam,
105
- headers?: ChargebeeRequestHeader,
106
- ): Promise<ChargebeeResponse<SwitchGatewayAccountResponse>>;
107
-
108
- exportPaymentSource(
109
- cust_payment_source_id: string,
110
- input: ExportPaymentSourceInputParam,
111
- headers?: ChargebeeRequestHeader,
112
- ): Promise<ChargebeeResponse<ExportPaymentSourceResponse>>;
113
-
114
- delete(
115
- cust_payment_source_id: string,
116
- headers?: ChargebeeRequestHeader,
117
- ): Promise<ChargebeeResponse<DeleteResponse>>;
118
-
119
- deleteLocal(
120
- cust_payment_source_id: string,
121
- headers?: ChargebeeRequestHeader,
122
- ): Promise<ChargebeeResponse<DeleteLocalResponse>>;
123
- }
124
-
125
- export interface CreateUsingTempTokenResponse {
126
- customer: Customer;
127
- payment_source: PaymentSource;
128
- }
129
-
130
- export interface CreateUsingPermanentTokenResponse {
131
- customer: Customer;
132
- payment_source: PaymentSource;
133
- }
134
-
135
- export interface CreateUsingTokenResponse {
136
- customer: Customer;
137
- payment_source: PaymentSource;
138
- }
139
-
140
- export interface CreateUsingPaymentIntentResponse {
141
- customer: Customer;
142
- payment_source: PaymentSource;
143
- }
144
-
145
- export interface CreateVoucherPaymentSourceResponse {
146
- customer: Customer;
147
- payment_source: PaymentSource;
148
- }
149
-
150
- export interface CreateCardResponse {
151
- customer: Customer;
152
- payment_source: PaymentSource;
153
- }
154
-
155
- export interface CreateBankAccountResponse {
156
- customer: Customer;
157
- payment_source: PaymentSource;
158
- }
159
-
160
- export interface UpdateCardResponse {
161
- customer: Customer;
162
- payment_source: PaymentSource;
163
- }
164
-
165
- export interface UpdateBankAccountResponse {
166
- customer: Customer;
167
- payment_source: PaymentSource;
168
- }
169
-
170
- export interface VerifyBankAccountResponse {
171
- payment_source: PaymentSource;
172
- }
173
-
174
- export interface RetrieveResponse {
175
- payment_source: PaymentSource;
176
- }
177
-
178
- export interface ListResponse {
179
- list: { payment_source: PaymentSource }[];
180
- next_offset?: string;
181
- }
182
-
183
- export interface SwitchGatewayAccountResponse {
184
- customer: Customer;
185
- payment_source: PaymentSource;
186
- }
187
-
188
- export interface ExportPaymentSourceResponse {
189
- third_party_payment_method: ThirdPartyPaymentMethod;
190
- }
191
-
192
- export interface DeleteResponse {
193
- customer: Customer;
194
- payment_source: PaymentSource;
195
- }
196
-
197
- export interface DeleteLocalResponse {
198
- customer: Customer;
199
- payment_source: PaymentSource;
200
- }
201
-
202
- export interface Card {
203
- first_name?: string;
204
- last_name?: string;
205
- iin: string;
206
- last4: string;
207
- brand:
208
- | 'visa'
209
- | 'mastercard'
210
- | 'american_express'
211
- | 'discover'
212
- | 'jcb'
213
- | 'diners_club'
214
- | 'other'
215
- | 'bancontact'
216
- | 'cmr_falabella'
217
- | 'tarjeta_naranja'
218
- | 'nativa'
219
- | 'cencosud'
220
- | 'cabal'
221
- | 'argencard'
222
- | 'elo'
223
- | 'hipercard'
224
- | 'carnet'
225
- | 'rupay'
226
- | 'maestro'
227
- | 'dankort'
228
- | 'cartes_bancaires'
229
- | 'not_applicable';
230
- funding_type:
231
- | 'credit'
232
- | 'debit'
233
- | 'prepaid'
234
- | 'not_known'
235
- | 'not_applicable';
236
- expiry_month: number;
237
- expiry_year: number;
238
- billing_addr1?: string;
239
- billing_addr2?: string;
240
- billing_city?: string;
241
- billing_state_code?: string;
242
- billing_state?: string;
243
- billing_country?: string;
244
- billing_zip?: string;
245
- masked_number?: string;
246
- }
247
- export interface BankAccount {
248
- last4: string;
249
- name_on_account?: string;
250
- first_name?: string;
251
- last_name?: string;
252
- direct_debit_scheme?: DirectDebitScheme;
253
- bank_name?: string;
254
- mandate_id?: string;
255
- account_type?: AccountType;
256
- echeck_type?: EcheckType;
257
- account_holder_type?: AccountHolderType;
258
- email?: string;
259
- }
260
- export interface CustVoucherSource {
261
- last4: string;
262
- first_name?: string;
263
- last_name?: string;
264
- email?: string;
265
- }
266
- export interface BillingAddress {
267
- first_name?: string;
268
- last_name?: string;
269
- email?: string;
270
- company?: string;
271
- phone?: string;
272
- line1?: string;
273
- line2?: string;
274
- line3?: string;
275
- city?: string;
276
- state_code?: string;
277
- state?: string;
278
- country?: string;
279
- zip?: string;
280
- validation_status?: ValidationStatus;
281
- }
282
- export interface AmazonPayment {
283
- email?: string;
284
- agreement_id?: string;
285
- }
286
- export interface Upi {
287
- vpa?: string;
288
- }
289
- export interface Paypal {
290
- email?: string;
291
- agreement_id?: string;
292
- }
293
- export interface Venmo {
294
- user_name?: string;
295
- }
296
- export interface KlarnaPayNow {
297
- email?: string;
298
- }
299
- export interface Mandate {
300
- id: string;
301
- subscription_id: string;
302
- created_at: number;
303
- }
304
- // REQUEST PARAMS
305
- //---------------
306
-
307
- export interface CreateUsingTempTokenInputParam {
308
- customer_id: string;
309
- gateway_account_id?: string;
310
- type: Type;
311
- tmp_token: string;
312
- issuing_country?: string;
313
- replace_primary_payment_source?: boolean;
314
- additional_information?: any;
315
- }
316
- export interface CreateUsingPermanentTokenInputParam {
317
- customer_id: string;
318
- type: Type;
319
- gateway_account_id?: string;
320
- reference_id?: string;
321
- issuing_country?: string;
322
- replace_primary_payment_source?: boolean;
323
- payment_method_token?: string;
324
- customer_profile_token?: string;
325
- network_transaction_id?: string;
326
- mandate_id?: string;
327
- skip_retrieval?: boolean;
328
- additional_information?: any;
329
- card?: CardCreateUsingPermanentTokenInputParam;
330
- billing_address?: BillingAddressCreateUsingPermanentTokenInputParam;
331
- }
332
- export interface CreateUsingTokenInputParam {
333
- customer_id: string;
334
- replace_primary_payment_source?: boolean;
335
- token_id: string;
336
- }
337
- export interface CreateUsingPaymentIntentInputParam {
338
- customer_id: string;
339
- replace_primary_payment_source?: boolean;
340
- payment_intent?: PaymentIntentCreateUsingPaymentIntentInputParam;
341
- }
342
- export interface CreateVoucherPaymentSourceInputParam {
343
- customer_id: string;
344
- voucher_payment_source?: VoucherPaymentSourceCreateVoucherPaymentSourceInputParam;
345
- }
346
- export interface CreateCardInputParam {
347
- customer_id: string;
348
- replace_primary_payment_source?: boolean;
349
- card?: CardCreateCardInputParam;
350
- }
351
- export interface CreateBankAccountInputParam {
352
- customer_id: string;
353
- issuing_country?: string;
354
- replace_primary_payment_source?: boolean;
355
- bank_account?: BankAccountCreateBankAccountInputParam;
356
- }
357
- export interface UpdateCardInputParam {
358
- gateway_meta_data?: any;
359
- reference_transaction?: string;
360
- card?: CardUpdateCardInputParam;
361
- }
362
- export interface UpdateBankAccountInputParam {
363
- bank_account?: BankAccountUpdateBankAccountInputParam;
364
- }
365
- export interface VerifyBankAccountInputParam {
366
- amount1: number;
367
- amount2: number;
368
- }
369
- export interface ListInputParam {
370
- limit?: number;
371
- offset?: string;
372
- subscription_id?: string;
373
- customer_id?: filter.String;
374
- type?: filter.Enum;
375
- status?: filter.Enum;
376
- updated_at?: filter.Timestamp;
377
- created_at?: filter.Timestamp;
378
- 'sort_by[asc]'?: string;
379
- 'sort_by[desc]'?: string;
380
- }
381
- export interface SwitchGatewayAccountInputParam {
382
- gateway_account_id: string;
383
- }
384
- export interface ExportPaymentSourceInputParam {
385
- gateway_account_id: string;
386
- }
387
- export interface BillingAddressCreateUsingPermanentTokenInputParam {
388
- first_name?: string;
389
- last_name?: string;
390
- email?: string;
391
- line1?: string;
392
- line2?: string;
393
- line3?: string;
394
- city?: string;
395
- state_code?: string;
396
- state?: string;
397
- zip?: string;
398
- country?: string;
399
- }
400
- export interface CardCreateUsingPermanentTokenInputParam {
401
- last4?: string;
402
- iin?: string;
403
- expiry_month?: number;
404
- expiry_year?: number;
405
- brand?:
406
- | 'visa'
407
- | 'mastercard'
408
- | 'american_express'
409
- | 'discover'
410
- | 'jcb'
411
- | 'diners_club'
412
- | 'other'
413
- | 'bancontact'
414
- | 'cmr_falabella'
415
- | 'tarjeta_naranja'
416
- | 'nativa'
417
- | 'cencosud'
418
- | 'cabal'
419
- | 'argencard'
420
- | 'elo'
421
- | 'hipercard'
422
- | 'carnet'
423
- | 'rupay'
424
- | 'maestro'
425
- | 'dankort'
426
- | 'cartes_bancaires';
427
- funding_type?: 'credit' | 'debit' | 'prepaid' | 'not_known';
428
- }
429
-
430
- export interface PaymentIntentCreateUsingPaymentIntentInputParam {
431
- id?: string;
432
- gateway_account_id?: string;
433
- gw_token?: string;
434
- payment_method_type?:
435
- | 'card'
436
- | 'ideal'
437
- | 'sofort'
438
- | 'bancontact'
439
- | 'google_pay'
440
- | 'dotpay'
441
- | 'giropay'
442
- | 'apple_pay'
443
- | 'upi'
444
- | 'netbanking_emandates'
445
- | 'paypal_express_checkout'
446
- | 'direct_debit'
447
- | 'boleto'
448
- | 'venmo'
449
- | 'amazon_payments'
450
- | 'pay_to'
451
- | 'faster_payments'
452
- | 'sepa_instant_transfer'
453
- | 'klarna_pay_now'
454
- | 'online_banking_poland';
455
- reference_id?: string;
456
- /**
457
- * @deprecated Please refer API docs to use other attributes
458
- */
459
- gw_payment_method_id?: string;
460
- additional_info?: any;
461
- additional_information?: any;
462
- }
463
-
464
- export interface VoucherPaymentSourceCreateVoucherPaymentSourceInputParam {
465
- voucher_type: VoucherType;
466
- gateway_account_id?: string;
467
- tax_id?: string;
468
- billing_address?: any;
469
- }
470
-
471
- export interface CardCreateCardInputParam {
472
- gateway_account_id?: string;
473
- first_name?: string;
474
- last_name?: string;
475
- number: string;
476
- expiry_month: number;
477
- expiry_year: number;
478
- cvv?: string;
479
- billing_addr1?: string;
480
- billing_addr2?: string;
481
- billing_city?: string;
482
- billing_state_code?: string;
483
- billing_state?: string;
484
- billing_zip?: string;
485
- billing_country?: string;
486
- additional_information?: any;
487
- }
488
-
489
- export interface BankAccountCreateBankAccountInputParam {
490
- gateway_account_id?: string;
491
- iban?: string;
492
- first_name?: string;
493
- last_name?: string;
494
- company?: string;
495
- email?: string;
496
- phone?: string;
497
- bank_name?: string;
498
- account_number?: string;
499
- routing_number?: string;
500
- bank_code?: string;
501
- account_type?: AccountType;
502
- account_holder_type?: AccountHolderType;
503
- echeck_type?: EcheckType;
504
- swedish_identity_number?: string;
505
- billing_address?: any;
506
- }
507
-
508
- export interface CardUpdateCardInputParam {
509
- first_name?: string;
510
- last_name?: string;
511
- expiry_month?: number;
512
- expiry_year?: number;
513
- billing_addr1?: string;
514
- billing_addr2?: string;
515
- billing_city?: string;
516
- billing_zip?: string;
517
- billing_state_code?: string;
518
- billing_state?: string;
519
- billing_country?: string;
520
- additional_information?: any;
521
- }
522
-
523
- export interface BankAccountUpdateBankAccountInputParam {
524
- first_name?: string;
525
- last_name?: string;
526
- email?: string;
527
- }
528
- }
529
- }
@@ -1,107 +0,0 @@
1
- ///<reference path='./../core.d.ts'/>
2
- ///<reference path='./../index.d.ts'/>
3
- ///<reference path='./filter.d.ts'/>
4
- declare module 'chargebee' {
5
- export interface PaymentVoucher {
6
- id: string;
7
- id_at_gateway?: string;
8
- payment_voucher_type: PaymentVoucherType;
9
- expires_at?: number;
10
- status?: 'active' | 'consumed' | 'expired' | 'failure';
11
- subscription_id?: string;
12
- currency_code: string;
13
- amount?: number;
14
- gateway_account_id?: string;
15
- payment_source_id?: string;
16
- gateway: Gateway;
17
- payload?: string;
18
- error_code?: string;
19
- error_text?: string;
20
- url?: string;
21
- date?: number;
22
- resource_version?: number;
23
- updated_at?: number;
24
- customer_id: string;
25
- linked_invoices?: PaymentVoucher.LinkedInvoice[];
26
- }
27
-
28
- export namespace PaymentVoucher {
29
- export class PaymentVoucherResource {
30
- create(
31
- input: CreateInputParam,
32
- headers?: ChargebeeRequestHeader,
33
- ): Promise<ChargebeeResponse<CreateResponse>>;
34
-
35
- retrieve(
36
- payment_voucher_id: string,
37
- headers?: ChargebeeRequestHeader,
38
- ): Promise<ChargebeeResponse<RetrieveResponse>>;
39
-
40
- payment_vouchersForInvoice(
41
- invoice_id: string,
42
- input?: PaymentVouchersForInvoiceInputParam,
43
- headers?: ChargebeeRequestHeader,
44
- ): Promise<ChargebeeResponse<Payment_vouchersForInvoiceResponse>>;
45
-
46
- payment_vouchersForCustomer(
47
- customer_id: string,
48
- input?: PaymentVouchersForCustomerInputParam,
49
- headers?: ChargebeeRequestHeader,
50
- ): Promise<ChargebeeResponse<Payment_vouchersForCustomerResponse>>;
51
- }
52
-
53
- export interface CreateResponse {
54
- payment_voucher: PaymentVoucher;
55
- }
56
-
57
- export interface RetrieveResponse {
58
- payment_voucher: PaymentVoucher;
59
- }
60
-
61
- export interface Payment_vouchersForInvoiceResponse {
62
- list: { payment_voucher: PaymentVoucher }[];
63
- next_offset?: string;
64
- }
65
-
66
- export interface Payment_vouchersForCustomerResponse {
67
- list: { payment_voucher: PaymentVoucher }[];
68
- next_offset?: string;
69
- }
70
-
71
- export interface LinkedInvoice {
72
- invoice_id: string;
73
- txn_id: string;
74
- applied_at: number;
75
- }
76
- // REQUEST PARAMS
77
- //---------------
78
-
79
- export interface CreateInputParam {
80
- customer_id: string;
81
- payment_source_id?: string;
82
- voucher_payment_source?: VoucherPaymentSourceCreateInputParam;
83
- invoice_allocations?: InvoiceAllocationsCreateInputParam[];
84
- }
85
- export interface PaymentVouchersForInvoiceInputParam {
86
- limit?: number;
87
- offset?: string;
88
- status?: filter.Enum;
89
- 'sort_by[asc]'?: string;
90
- 'sort_by[desc]'?: string;
91
- }
92
- export interface PaymentVouchersForCustomerInputParam {
93
- limit?: number;
94
- offset?: string;
95
- status?: filter.Enum;
96
- 'sort_by[asc]'?: string;
97
- 'sort_by[desc]'?: string;
98
- }
99
- export interface VoucherPaymentSourceCreateInputParam {
100
- voucher_type: VoucherType;
101
- }
102
-
103
- export interface InvoiceAllocationsCreateInputParam {
104
- invoice_id: string;
105
- }
106
- }
107
- }
@@ -1,88 +0,0 @@
1
- ///<reference path='./../core.d.ts'/>
2
- ///<reference path='./../index.d.ts'/>
3
-
4
- declare module 'chargebee' {
5
- export interface PortalSession {
6
- id: string;
7
- token: string;
8
- access_url: string;
9
- redirect_url?: string;
10
- status:
11
- | 'created'
12
- | 'logged_in'
13
- | 'logged_out'
14
- | 'not_yet_activated'
15
- | 'activated';
16
- created_at: number;
17
- expires_at?: number;
18
- customer_id: string;
19
- login_at?: number;
20
- logout_at?: number;
21
- login_ipaddress?: string;
22
- logout_ipaddress?: string;
23
- linked_customers?: PortalSession.LinkedCustomer[];
24
- }
25
-
26
- export namespace PortalSession {
27
- export class PortalSessionResource {
28
- create(
29
- input: CreateInputParam,
30
- headers?: ChargebeeRequestHeader,
31
- ): Promise<ChargebeeResponse<CreateResponse>>;
32
-
33
- retrieve(
34
- portal_session_id: string,
35
- headers?: ChargebeeRequestHeader,
36
- ): Promise<ChargebeeResponse<RetrieveResponse>>;
37
-
38
- logout(
39
- portal_session_id: string,
40
- headers?: ChargebeeRequestHeader,
41
- ): Promise<ChargebeeResponse<LogoutResponse>>;
42
-
43
- activate(
44
- portal_session_id: string,
45
- input: ActivateInputParam,
46
- headers?: ChargebeeRequestHeader,
47
- ): Promise<ChargebeeResponse<ActivateResponse>>;
48
- }
49
-
50
- export interface CreateResponse {
51
- portal_session: PortalSession;
52
- }
53
-
54
- export interface RetrieveResponse {
55
- portal_session: PortalSession;
56
- }
57
-
58
- export interface LogoutResponse {
59
- portal_session: PortalSession;
60
- }
61
-
62
- export interface ActivateResponse {
63
- portal_session: PortalSession;
64
- }
65
-
66
- export interface LinkedCustomer {
67
- customer_id: string;
68
- email?: string;
69
- has_billing_address: boolean;
70
- has_payment_method: boolean;
71
- has_active_subscription: boolean;
72
- }
73
- // REQUEST PARAMS
74
- //---------------
75
-
76
- export interface CreateInputParam {
77
- redirect_url?: string;
78
- forward_url?: string;
79
- customer?: CustomerCreateInputParam;
80
- }
81
- export interface ActivateInputParam {
82
- token: string;
83
- }
84
- export interface CustomerCreateInputParam {
85
- id: string;
86
- }
87
- }
88
- }