@whop/sdk 0.0.35 → 0.0.37

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 (102) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/client.d.mts +6 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs +1 -1
  8. package/client.mjs.map +1 -1
  9. package/internal/utils/env.js +2 -2
  10. package/internal/utils/env.js.map +1 -1
  11. package/internal/utils/env.mjs +2 -2
  12. package/internal/utils/env.mjs.map +1 -1
  13. package/package.json +1 -1
  14. package/resources/affiliates/affiliates.d.mts +20 -12
  15. package/resources/affiliates/affiliates.d.mts.map +1 -1
  16. package/resources/affiliates/affiliates.d.ts +20 -12
  17. package/resources/affiliates/affiliates.d.ts.map +1 -1
  18. package/resources/affiliates/affiliates.js.map +1 -1
  19. package/resources/affiliates/affiliates.mjs.map +1 -1
  20. package/resources/affiliates/overrides.d.mts +16 -8
  21. package/resources/affiliates/overrides.d.mts.map +1 -1
  22. package/resources/affiliates/overrides.d.ts +16 -8
  23. package/resources/affiliates/overrides.d.ts.map +1 -1
  24. package/resources/apps.d.mts +26 -0
  25. package/resources/apps.d.mts.map +1 -1
  26. package/resources/apps.d.ts +26 -0
  27. package/resources/apps.d.ts.map +1 -1
  28. package/resources/checkout-configurations.d.mts +70 -0
  29. package/resources/checkout-configurations.d.mts.map +1 -1
  30. package/resources/checkout-configurations.d.ts +70 -0
  31. package/resources/checkout-configurations.d.ts.map +1 -1
  32. package/resources/checkout-configurations.js.map +1 -1
  33. package/resources/checkout-configurations.mjs.map +1 -1
  34. package/resources/companies.d.mts +19 -0
  35. package/resources/companies.d.mts.map +1 -1
  36. package/resources/companies.d.ts +19 -0
  37. package/resources/companies.d.ts.map +1 -1
  38. package/resources/index.d.mts +3 -3
  39. package/resources/index.d.mts.map +1 -1
  40. package/resources/index.d.ts +3 -3
  41. package/resources/index.d.ts.map +1 -1
  42. package/resources/index.js.map +1 -1
  43. package/resources/index.mjs.map +1 -1
  44. package/resources/invoices.d.mts +472 -329
  45. package/resources/invoices.d.mts.map +1 -1
  46. package/resources/invoices.d.ts +472 -329
  47. package/resources/invoices.d.ts.map +1 -1
  48. package/resources/invoices.js +90 -2
  49. package/resources/invoices.js.map +1 -1
  50. package/resources/invoices.mjs +90 -2
  51. package/resources/invoices.mjs.map +1 -1
  52. package/resources/memberships.d.mts +1 -1
  53. package/resources/memberships.d.mts.map +1 -1
  54. package/resources/memberships.d.ts +1 -1
  55. package/resources/memberships.d.ts.map +1 -1
  56. package/resources/payments.d.mts +21 -2
  57. package/resources/payments.d.mts.map +1 -1
  58. package/resources/payments.d.ts +21 -2
  59. package/resources/payments.d.ts.map +1 -1
  60. package/resources/plans.d.mts +56 -1
  61. package/resources/plans.d.mts.map +1 -1
  62. package/resources/plans.d.ts +56 -1
  63. package/resources/plans.d.ts.map +1 -1
  64. package/resources/plans.js.map +1 -1
  65. package/resources/plans.mjs.map +1 -1
  66. package/resources/products.d.mts +2 -2
  67. package/resources/products.d.ts +2 -2
  68. package/resources/refunds.d.mts +1 -1
  69. package/resources/refunds.d.mts.map +1 -1
  70. package/resources/refunds.d.ts +1 -1
  71. package/resources/refunds.d.ts.map +1 -1
  72. package/resources/shared.d.mts +54 -5
  73. package/resources/shared.d.mts.map +1 -1
  74. package/resources/shared.d.ts +54 -5
  75. package/resources/shared.d.ts.map +1 -1
  76. package/resources/webhooks.d.mts +653 -3
  77. package/resources/webhooks.d.mts.map +1 -1
  78. package/resources/webhooks.d.ts +653 -3
  79. package/resources/webhooks.d.ts.map +1 -1
  80. package/resources/webhooks.js.map +1 -1
  81. package/resources/webhooks.mjs.map +1 -1
  82. package/src/client.ts +28 -1
  83. package/src/internal/utils/env.ts +2 -2
  84. package/src/resources/affiliates/affiliates.ts +20 -12
  85. package/src/resources/affiliates/overrides.ts +16 -8
  86. package/src/resources/apps.ts +31 -0
  87. package/src/resources/checkout-configurations.ts +82 -0
  88. package/src/resources/companies.ts +23 -0
  89. package/src/resources/index.ts +11 -0
  90. package/src/resources/invoices.ts +656 -366
  91. package/src/resources/memberships.ts +1 -1
  92. package/src/resources/payments.ts +31 -1
  93. package/src/resources/plans.ts +67 -0
  94. package/src/resources/products.ts +2 -2
  95. package/src/resources/refunds.ts +3 -1
  96. package/src/resources/shared.ts +64 -5
  97. package/src/resources/webhooks.ts +818 -0
  98. package/src/version.ts +1 -1
  99. package/version.d.mts +1 -1
  100. package/version.d.ts +1 -1
  101. package/version.js +1 -1
  102. package/version.mjs +1 -1
@@ -1,6 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
+ import * as InvoicesAPI from './invoices';
4
5
  import * as PaymentsAPI from './payments';
5
6
  import * as Shared from './shared';
6
7
  import { InvoiceListItemsCursorPage } from './shared';
@@ -26,8 +27,6 @@ export class Invoices extends APIResource {
26
27
  * const invoice = await client.invoices.create({
27
28
  * collection_method: 'send_invoice',
28
29
  * company_id: 'biz_xxxxxxxxxxxxxx',
29
- * due_date: '2023-12-01T05:00:00.401Z',
30
- * member_id: 'mber_xxxxxxxxxxxxx',
31
30
  * plan: {},
32
31
  * product: { title: 'title' },
33
32
  * });
@@ -43,11 +42,40 @@ export class Invoices extends APIResource {
43
42
  * Required permissions:
44
43
  *
45
44
  * - `invoice:basic:read`
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * const invoice = await client.invoices.retrieve(
49
+ * 'inv_xxxxxxxxxxxxxx',
50
+ * );
51
+ * ```
46
52
  */
47
53
  retrieve(id: string, options?: RequestOptions): APIPromise<Shared.Invoice> {
48
54
  return this._client.get(path`/invoices/${id}`, options);
49
55
  }
50
56
 
57
+ /**
58
+ * Update a draft invoice's details.
59
+ *
60
+ * Required permissions:
61
+ *
62
+ * - `invoice:update`
63
+ *
64
+ * @example
65
+ * ```ts
66
+ * const invoice = await client.invoices.update(
67
+ * 'inv_xxxxxxxxxxxxxx',
68
+ * );
69
+ * ```
70
+ */
71
+ update(
72
+ id: string,
73
+ body: InvoiceUpdateParams | null | undefined = {},
74
+ options?: RequestOptions,
75
+ ): APIPromise<Shared.Invoice> {
76
+ return this._client.patch(path`/invoices/${id}`, { body, ...options });
77
+ }
78
+
51
79
  /**
52
80
  * Returns a paginated list of invoices for a company, with optional filtering by
53
81
  * product, status, collection method, and creation date.
@@ -55,6 +83,14 @@ export class Invoices extends APIResource {
55
83
  * Required permissions:
56
84
  *
57
85
  * - `invoice:basic:read`
86
+ *
87
+ * @example
88
+ * ```ts
89
+ * // Automatically fetches more pages as needed.
90
+ * for await (const invoiceListItem of client.invoices.list()) {
91
+ * // ...
92
+ * }
93
+ * ```
58
94
  */
59
95
  list(
60
96
  query: InvoiceListParams | null | undefined = {},
@@ -63,6 +99,60 @@ export class Invoices extends APIResource {
63
99
  return this._client.getAPIList('/invoices', CursorPage<Shared.InvoiceListItem>, { query, ...options });
64
100
  }
65
101
 
102
+ /**
103
+ * Delete a draft invoice.
104
+ *
105
+ * Required permissions:
106
+ *
107
+ * - `invoice:update`
108
+ *
109
+ * @example
110
+ * ```ts
111
+ * const invoice = await client.invoices.delete(
112
+ * 'inv_xxxxxxxxxxxxxx',
113
+ * );
114
+ * ```
115
+ */
116
+ delete(id: string, options?: RequestOptions): APIPromise<InvoiceDeleteResponse> {
117
+ return this._client.delete(path`/invoices/${id}`, options);
118
+ }
119
+
120
+ /**
121
+ * Mark an open invoice as paid when payment was collected outside of Whop.
122
+ *
123
+ * Required permissions:
124
+ *
125
+ * - `invoice:update`
126
+ *
127
+ * @example
128
+ * ```ts
129
+ * const response = await client.invoices.markPaid(
130
+ * 'inv_xxxxxxxxxxxxxx',
131
+ * );
132
+ * ```
133
+ */
134
+ markPaid(id: string, options?: RequestOptions): APIPromise<InvoiceMarkPaidResponse> {
135
+ return this._client.post(path`/invoices/${id}/mark_paid`, options);
136
+ }
137
+
138
+ /**
139
+ * Mark an open invoice as uncollectible when payment is not expected.
140
+ *
141
+ * Required permissions:
142
+ *
143
+ * - `invoice:update`
144
+ *
145
+ * @example
146
+ * ```ts
147
+ * const response = await client.invoices.markUncollectible(
148
+ * 'inv_xxxxxxxxxxxxxx',
149
+ * );
150
+ * ```
151
+ */
152
+ markUncollectible(id: string, options?: RequestOptions): APIPromise<InvoiceMarkUncollectibleResponse> {
153
+ return this._client.post(path`/invoices/${id}/mark_uncollectible`, options);
154
+ }
155
+
66
156
  /**
67
157
  * Void an open invoice so it can no longer be paid. Voiding is permanent and
68
158
  * cannot be undone.
@@ -70,25 +160,161 @@ export class Invoices extends APIResource {
70
160
  * Required permissions:
71
161
  *
72
162
  * - `invoice:update`
163
+ *
164
+ * @example
165
+ * ```ts
166
+ * const response = await client.invoices.void(
167
+ * 'inv_xxxxxxxxxxxxxx',
168
+ * );
169
+ * ```
73
170
  */
74
171
  void(id: string, options?: RequestOptions): APIPromise<InvoiceVoidResponse> {
75
172
  return this._client.post(path`/invoices/${id}/void`, options);
76
173
  }
77
174
  }
78
175
 
176
+ /**
177
+ * The type of tax identifier
178
+ */
179
+ export type TaxIdentifierType =
180
+ | 'ad_nrt'
181
+ | 'ao_tin'
182
+ | 'ar_cuit'
183
+ | 'am_tin'
184
+ | 'aw_tin'
185
+ | 'au_abn'
186
+ | 'au_arn'
187
+ | 'eu_vat'
188
+ | 'az_tin'
189
+ | 'bs_tin'
190
+ | 'bh_vat'
191
+ | 'bd_bin'
192
+ | 'bb_tin'
193
+ | 'by_tin'
194
+ | 'bj_ifu'
195
+ | 'bo_tin'
196
+ | 'ba_tin'
197
+ | 'br_cnpj'
198
+ | 'br_cpf'
199
+ | 'bg_uic'
200
+ | 'bf_ifu'
201
+ | 'kh_tin'
202
+ | 'cm_niu'
203
+ | 'ca_bn'
204
+ | 'ca_gst_hst'
205
+ | 'ca_pst_bc'
206
+ | 'ca_pst_mb'
207
+ | 'ca_pst_sk'
208
+ | 'ca_qst'
209
+ | 'cv_nif'
210
+ | 'cl_tin'
211
+ | 'cn_tin'
212
+ | 'co_nit'
213
+ | 'cd_nif'
214
+ | 'cr_tin'
215
+ | 'hr_oib'
216
+ | 'do_rcn'
217
+ | 'ec_ruc'
218
+ | 'eg_tin'
219
+ | 'sv_nit'
220
+ | 'et_tin'
221
+ | 'eu_oss_vat'
222
+ | 'ge_vat'
223
+ | 'de_stn'
224
+ | 'gb_vat'
225
+ | 'gn_nif'
226
+ | 'hk_br'
227
+ | 'hu_tin'
228
+ | 'is_vat'
229
+ | 'in_gst'
230
+ | 'id_npwp'
231
+ | 'il_vat'
232
+ | 'jp_cn'
233
+ | 'jp_rn'
234
+ | 'jp_trn'
235
+ | 'kz_bin'
236
+ | 'ke_pin'
237
+ | 'kg_tin'
238
+ | 'la_tin'
239
+ | 'li_uid'
240
+ | 'li_vat'
241
+ | 'my_frp'
242
+ | 'my_itn'
243
+ | 'my_sst'
244
+ | 'mr_nif'
245
+ | 'mx_rfc'
246
+ | 'md_vat'
247
+ | 'me_pib'
248
+ | 'ma_vat'
249
+ | 'np_pan'
250
+ | 'nz_gst'
251
+ | 'ng_tin'
252
+ | 'mk_vat'
253
+ | 'no_vat'
254
+ | 'no_voec'
255
+ | 'om_vat'
256
+ | 'pe_ruc'
257
+ | 'ph_tin'
258
+ | 'pl_nip'
259
+ | 'ro_tin'
260
+ | 'ru_inn'
261
+ | 'ru_kpp'
262
+ | 'sa_vat'
263
+ | 'sn_ninea'
264
+ | 'rs_pib'
265
+ | 'sg_gst'
266
+ | 'sg_uen'
267
+ | 'si_tin'
268
+ | 'za_vat'
269
+ | 'kr_brn'
270
+ | 'es_cif'
271
+ | 'ch_uid'
272
+ | 'ch_vat'
273
+ | 'tw_vat'
274
+ | 'tj_tin'
275
+ | 'tz_vat'
276
+ | 'th_vat'
277
+ | 'tr_tin'
278
+ | 'ug_tin'
279
+ | 'ua_vat'
280
+ | 'ae_trn'
281
+ | 'us_ein'
282
+ | 'uy_ruc'
283
+ | 'uz_tin'
284
+ | 'uz_vat'
285
+ | 've_rif'
286
+ | 'vn_tin'
287
+ | 'zm_tin'
288
+ | 'zw_tin'
289
+ | 'sr_fin'
290
+ | 'xi_vat';
291
+
292
+ /**
293
+ * Represents `true` or `false` values.
294
+ */
295
+ export type InvoiceDeleteResponse = boolean;
296
+
297
+ /**
298
+ * Represents `true` or `false` values.
299
+ */
300
+ export type InvoiceMarkPaidResponse = boolean;
301
+
302
+ /**
303
+ * Represents `true` or `false` values.
304
+ */
305
+ export type InvoiceMarkUncollectibleResponse = boolean;
306
+
79
307
  /**
80
308
  * Represents `true` or `false` values.
81
309
  */
82
310
  export type InvoiceVoidResponse = boolean;
83
311
 
84
312
  export type InvoiceCreateParams =
85
- | InvoiceCreateParams.CreateInvoiceInputWithProductAndMemberID
86
- | InvoiceCreateParams.CreateInvoiceInputWithProductAndEmailAddress
87
- | InvoiceCreateParams.CreateInvoiceInputWithProductIDAndMemberID
88
- | InvoiceCreateParams.CreateInvoiceInputWithProductIDAndEmailAddress;
313
+ | InvoiceCreateParams.CreateInvoiceInputWithProduct
314
+ | InvoiceCreateParams.CreateInvoiceInputWithProductID;
89
315
 
90
316
  export declare namespace InvoiceCreateParams {
91
- export interface CreateInvoiceInputWithProductAndMemberID {
317
+ export interface CreateInvoiceInputWithProduct {
92
318
  /**
93
319
  * How the invoice should be collected. Use charge_automatically to charge a stored
94
320
  * payment method, or send_invoice to email the customer.
@@ -100,28 +326,17 @@ export declare namespace InvoiceCreateParams {
100
326
  */
101
327
  company_id: string;
102
328
 
103
- /**
104
- * The date by which the invoice must be paid.
105
- */
106
- due_date: string;
107
-
108
- /**
109
- * The unique identifier of an existing member to create this invoice for. If not
110
- * provided, you must supply an email_address and customer_name.
111
- */
112
- member_id: string;
113
-
114
329
  /**
115
330
  * The plan attributes defining the price, currency, and billing interval for this
116
331
  * invoice.
117
332
  */
118
- plan: CreateInvoiceInputWithProductAndMemberID.Plan;
333
+ plan: CreateInvoiceInputWithProduct.Plan;
119
334
 
120
335
  /**
121
336
  * The properties of the product to create for this invoice. Provide this to create
122
337
  * a new product inline.
123
338
  */
124
- product: CreateInvoiceInputWithProductAndMemberID.Product;
339
+ product: CreateInvoiceInputWithProduct.Product;
125
340
 
126
341
  /**
127
342
  * The date and time when the invoice will be automatically finalized and charged.
@@ -130,6 +345,12 @@ export declare namespace InvoiceCreateParams {
130
345
  */
131
346
  automatically_finalizes_at?: string | null;
132
347
 
348
+ /**
349
+ * Inline billing address to create a new mailing address for this invoice. Cannot
350
+ * be used together with mailing_address_id.
351
+ */
352
+ billing_address?: CreateInvoiceInputWithProduct.BillingAddress | null;
353
+
133
354
  /**
134
355
  * Whether to charge the customer a buyer fee on this invoice.
135
356
  */
@@ -141,6 +362,36 @@ export declare namespace InvoiceCreateParams {
141
362
  */
142
363
  customer_name?: string | null;
143
364
 
365
+ /**
366
+ * The date by which the invoice must be paid. Required unless save_as_draft is
367
+ * true.
368
+ */
369
+ due_date?: string | null;
370
+
371
+ /**
372
+ * The email address of the customer. Required when creating an invoice for a
373
+ * customer who is not yet a member of the company.
374
+ */
375
+ email_address?: string | null;
376
+
377
+ /**
378
+ * Optional line items that break down the invoice total. When provided, the sum of
379
+ * (quantity \* unit_price) for all items must equal the plan price.
380
+ */
381
+ line_items?: Array<CreateInvoiceInputWithProduct.LineItem> | null;
382
+
383
+ /**
384
+ * The unique identifier of an existing mailing address to attach to this invoice.
385
+ * Cannot be used together with billing_address.
386
+ */
387
+ mailing_address_id?: string | null;
388
+
389
+ /**
390
+ * The unique identifier of an existing member to create this invoice for. If not
391
+ * provided, you must supply an email_address and customer_name.
392
+ */
393
+ member_id?: string | null;
394
+
144
395
  /**
145
396
  * The unique identifier of the payment method to charge. Required when
146
397
  * collection_method is charge_automatically.
@@ -152,9 +403,15 @@ export declare namespace InvoiceCreateParams {
152
403
  * must provide a payment_token.
153
404
  */
154
405
  payment_token_id?: string | null;
406
+
407
+ /**
408
+ * When true, creates the invoice as a draft without sending or charging. Relaxes
409
+ * customer and due date requirements.
410
+ */
411
+ save_as_draft?: boolean | null;
155
412
  }
156
413
 
157
- export namespace CreateInvoiceInputWithProductAndMemberID {
414
+ export namespace CreateInvoiceInputWithProduct {
158
415
  /**
159
416
  * The plan attributes defining the price, currency, and billing interval for this
160
417
  * invoice.
@@ -318,42 +575,108 @@ export declare namespace InvoiceCreateParams {
318
575
  */
319
576
  product_tax_code_id?: string | null;
320
577
  }
321
- }
322
578
 
323
- export interface CreateInvoiceInputWithProductAndEmailAddress {
324
579
  /**
325
- * How the invoice should be collected. Use charge_automatically to charge a stored
326
- * payment method, or send_invoice to email the customer.
580
+ * Inline billing address to create a new mailing address for this invoice. Cannot
581
+ * be used together with mailing_address_id.
327
582
  */
328
- collection_method: Shared.CollectionMethod;
583
+ export interface BillingAddress {
584
+ /**
585
+ * The city of the address.
586
+ */
587
+ city?: string | null;
588
+
589
+ /**
590
+ * The country of the address.
591
+ */
592
+ country?: string | null;
593
+
594
+ /**
595
+ * The line 1 of the address.
596
+ */
597
+ line1?: string | null;
598
+
599
+ /**
600
+ * The line 2 of the address.
601
+ */
602
+ line2?: string | null;
603
+
604
+ /**
605
+ * The name of the customer.
606
+ */
607
+ name?: string | null;
608
+
609
+ /**
610
+ * The phone number of the customer.
611
+ */
612
+ phone?: string | null;
613
+
614
+ /**
615
+ * The postal code of the address.
616
+ */
617
+ postal_code?: string | null;
618
+
619
+ /**
620
+ * The state of the address.
621
+ */
622
+ state?: string | null;
623
+
624
+ /**
625
+ * The type of tax identifier
626
+ */
627
+ tax_id_type?: InvoicesAPI.TaxIdentifierType | null;
628
+
629
+ /**
630
+ * The value of the tax identifier.
631
+ */
632
+ tax_id_value?: string | null;
633
+ }
329
634
 
330
635
  /**
331
- * The unique identifier of the company to create this invoice for.
636
+ * A single line item to include on the invoice, with a label, quantity, and unit
637
+ * price.
332
638
  */
333
- company_id: string;
639
+ export interface LineItem {
640
+ /**
641
+ * The label or description for this line item.
642
+ */
643
+ label: string;
644
+
645
+ /**
646
+ * The unit price for this line item. Provided as a number in the specified
647
+ * currency. Eg: 10.43 for $10.43
648
+ */
649
+ unit_price: number;
650
+
651
+ /**
652
+ * The quantity of this line item. Defaults to 1.
653
+ */
654
+ quantity?: number | null;
655
+ }
656
+ }
334
657
 
658
+ export interface CreateInvoiceInputWithProductID {
335
659
  /**
336
- * The date by which the invoice must be paid.
660
+ * How the invoice should be collected. Use charge_automatically to charge a stored
661
+ * payment method, or send_invoice to email the customer.
337
662
  */
338
- due_date: string;
663
+ collection_method: Shared.CollectionMethod;
339
664
 
340
665
  /**
341
- * The email address of the customer. Required when creating an invoice for a
342
- * customer who is not yet a member of the company.
666
+ * The unique identifier of the company to create this invoice for.
343
667
  */
344
- email_address: string;
668
+ company_id: string;
345
669
 
346
670
  /**
347
671
  * The plan attributes defining the price, currency, and billing interval for this
348
672
  * invoice.
349
673
  */
350
- plan: CreateInvoiceInputWithProductAndEmailAddress.Plan;
674
+ plan: CreateInvoiceInputWithProductID.Plan;
351
675
 
352
676
  /**
353
- * The properties of the product to create for this invoice. Provide this to create
354
- * a new product inline.
677
+ * The unique identifier of an existing product to create this invoice for.
355
678
  */
356
- product: CreateInvoiceInputWithProductAndEmailAddress.Product;
679
+ product_id: string;
357
680
 
358
681
  /**
359
682
  * The date and time when the invoice will be automatically finalized and charged.
@@ -362,6 +685,12 @@ export declare namespace InvoiceCreateParams {
362
685
  */
363
686
  automatically_finalizes_at?: string | null;
364
687
 
688
+ /**
689
+ * Inline billing address to create a new mailing address for this invoice. Cannot
690
+ * be used together with mailing_address_id.
691
+ */
692
+ billing_address?: CreateInvoiceInputWithProductID.BillingAddress | null;
693
+
365
694
  /**
366
695
  * Whether to charge the customer a buyer fee on this invoice.
367
696
  */
@@ -373,6 +702,36 @@ export declare namespace InvoiceCreateParams {
373
702
  */
374
703
  customer_name?: string | null;
375
704
 
705
+ /**
706
+ * The date by which the invoice must be paid. Required unless save_as_draft is
707
+ * true.
708
+ */
709
+ due_date?: string | null;
710
+
711
+ /**
712
+ * The email address of the customer. Required when creating an invoice for a
713
+ * customer who is not yet a member of the company.
714
+ */
715
+ email_address?: string | null;
716
+
717
+ /**
718
+ * Optional line items that break down the invoice total. When provided, the sum of
719
+ * (quantity \* unit_price) for all items must equal the plan price.
720
+ */
721
+ line_items?: Array<CreateInvoiceInputWithProductID.LineItem> | null;
722
+
723
+ /**
724
+ * The unique identifier of an existing mailing address to attach to this invoice.
725
+ * Cannot be used together with billing_address.
726
+ */
727
+ mailing_address_id?: string | null;
728
+
729
+ /**
730
+ * The unique identifier of an existing member to create this invoice for. If not
731
+ * provided, you must supply an email_address and customer_name.
732
+ */
733
+ member_id?: string | null;
734
+
376
735
  /**
377
736
  * The unique identifier of the payment method to charge. Required when
378
737
  * collection_method is charge_automatically.
@@ -384,9 +743,15 @@ export declare namespace InvoiceCreateParams {
384
743
  * must provide a payment_token.
385
744
  */
386
745
  payment_token_id?: string | null;
746
+
747
+ /**
748
+ * When true, creates the invoice as a draft without sending or charging. Relaxes
749
+ * customer and due date requirements.
750
+ */
751
+ save_as_draft?: boolean | null;
387
752
  }
388
753
 
389
- export namespace CreateInvoiceInputWithProductAndEmailAddress {
754
+ export namespace CreateInvoiceInputWithProductID {
390
755
  /**
391
756
  * The plan attributes defining the price, currency, and billing interval for this
392
757
  * invoice.
@@ -536,449 +901,369 @@ export declare namespace InvoiceCreateParams {
536
901
  }
537
902
 
538
903
  /**
539
- * The properties of the product to create for this invoice. Provide this to create
540
- * a new product inline.
904
+ * Inline billing address to create a new mailing address for this invoice. Cannot
905
+ * be used together with mailing_address_id.
541
906
  */
542
- export interface Product {
907
+ export interface BillingAddress {
543
908
  /**
544
- * The title of the product.
909
+ * The city of the address.
545
910
  */
546
- title: string;
911
+ city?: string | null;
547
912
 
548
913
  /**
549
- * The ID of the product tax code to apply to this product.
914
+ * The country of the address.
550
915
  */
551
- product_tax_code_id?: string | null;
552
- }
553
- }
916
+ country?: string | null;
554
917
 
555
- export interface CreateInvoiceInputWithProductIDAndMemberID {
556
- /**
557
- * How the invoice should be collected. Use charge_automatically to charge a stored
558
- * payment method, or send_invoice to email the customer.
559
- */
560
- collection_method: Shared.CollectionMethod;
918
+ /**
919
+ * The line 1 of the address.
920
+ */
921
+ line1?: string | null;
561
922
 
562
- /**
563
- * The unique identifier of the company to create this invoice for.
564
- */
565
- company_id: string;
923
+ /**
924
+ * The line 2 of the address.
925
+ */
926
+ line2?: string | null;
566
927
 
567
- /**
568
- * The date by which the invoice must be paid.
569
- */
570
- due_date: string;
928
+ /**
929
+ * The name of the customer.
930
+ */
931
+ name?: string | null;
571
932
 
572
- /**
573
- * The unique identifier of an existing member to create this invoice for. If not
574
- * provided, you must supply an email_address and customer_name.
575
- */
576
- member_id: string;
933
+ /**
934
+ * The phone number of the customer.
935
+ */
936
+ phone?: string | null;
577
937
 
578
- /**
579
- * The plan attributes defining the price, currency, and billing interval for this
580
- * invoice.
581
- */
582
- plan: CreateInvoiceInputWithProductIDAndMemberID.Plan;
938
+ /**
939
+ * The postal code of the address.
940
+ */
941
+ postal_code?: string | null;
583
942
 
584
- /**
585
- * The unique identifier of an existing product to create this invoice for.
586
- */
587
- product_id: string;
943
+ /**
944
+ * The state of the address.
945
+ */
946
+ state?: string | null;
588
947
 
589
- /**
590
- * The date and time when the invoice will be automatically finalized and charged.
591
- * Only valid when collection_method is charge_automatically. If not provided, the
592
- * charge will be processed immediately.
593
- */
594
- automatically_finalizes_at?: string | null;
948
+ /**
949
+ * The type of tax identifier
950
+ */
951
+ tax_id_type?: InvoicesAPI.TaxIdentifierType | null;
595
952
 
596
- /**
597
- * Whether to charge the customer a buyer fee on this invoice.
598
- */
599
- charge_buyer_fee?: boolean | null;
953
+ /**
954
+ * The value of the tax identifier.
955
+ */
956
+ tax_id_value?: string | null;
957
+ }
600
958
 
601
959
  /**
602
- * The name of the customer. Required when creating an invoice for a customer who
603
- * is not yet a member of the company.
960
+ * A single line item to include on the invoice, with a label, quantity, and unit
961
+ * price.
604
962
  */
605
- customer_name?: string | null;
963
+ export interface LineItem {
964
+ /**
965
+ * The label or description for this line item.
966
+ */
967
+ label: string;
606
968
 
607
- /**
608
- * The unique identifier of the payment method to charge. Required when
609
- * collection_method is charge_automatically.
610
- */
611
- payment_method_id?: string | null;
612
-
613
- /**
614
- * The payment token ID to use for this invoice. If using charge_automatically, you
615
- * must provide a payment_token.
616
- */
617
- payment_token_id?: string | null;
618
- }
619
-
620
- export namespace CreateInvoiceInputWithProductIDAndMemberID {
621
- /**
622
- * The plan attributes defining the price, currency, and billing interval for this
623
- * invoice.
624
- */
625
- export interface Plan {
626
969
  /**
627
- * The interval in days at which the plan charges (renewal plans).
970
+ * The unit price for this line item. Provided as a number in the specified
971
+ * currency. Eg: 10.43 for $10.43
628
972
  */
629
- billing_period?: number | null;
973
+ unit_price: number;
630
974
 
631
975
  /**
632
- * An array of custom field objects.
976
+ * The quantity of this line item. Defaults to 1.
633
977
  */
634
- custom_fields?: Array<Plan.CustomField> | null;
978
+ quantity?: number | null;
979
+ }
980
+ }
981
+ }
635
982
 
636
- /**
637
- * The description of the plan.
638
- */
639
- description?: string | null;
983
+ export interface InvoiceUpdateParams {
984
+ /**
985
+ * The date and time when the invoice will be automatically finalized and charged.
986
+ */
987
+ automatically_finalizes_at?: string | null;
640
988
 
641
- /**
642
- * The number of days until the membership expires and revokes access (expiration
643
- * plans). For example, 365 for a one-year access period.
644
- */
645
- expiration_days?: number | null;
989
+ /**
990
+ * Inline billing address to create or update a mailing address for this invoice.
991
+ */
992
+ billing_address?: InvoiceUpdateParams.BillingAddress | null;
646
993
 
647
- /**
648
- * An additional amount charged upon first purchase. Use only if a one time payment
649
- * OR you want to charge an additional amount on top of the renewal price. Provided
650
- * as a number in the specified currency. Eg: 10.43 for $10.43
651
- */
652
- initial_price?: number | null;
994
+ /**
995
+ * Whether to charge the customer a buyer fee on this invoice.
996
+ */
997
+ charge_buyer_fee?: boolean | null;
653
998
 
654
- /**
655
- * A personal description or notes section for the business.
656
- */
657
- internal_notes?: string | null;
999
+ /**
1000
+ * The method of collection for an invoice.
1001
+ */
1002
+ collection_method?: Shared.CollectionMethod | null;
658
1003
 
659
- /**
660
- * Whether this plan uses legacy payment method controls
661
- */
662
- legacy_payment_method_controls?: boolean | null;
1004
+ /**
1005
+ * The name of the customer.
1006
+ */
1007
+ customer_name?: string | null;
663
1008
 
664
- /**
665
- * The explicit payment method configuration for the plan. If not provided, the
666
- * platform or company's defaults will apply.
667
- */
668
- payment_method_configuration?: Plan.PaymentMethodConfiguration | null;
1009
+ /**
1010
+ * The date by which the invoice must be paid.
1011
+ */
1012
+ due_date?: string | null;
669
1013
 
670
- /**
671
- * The type of plan that can be attached to a product
672
- */
673
- plan_type?: Shared.PlanType | null;
1014
+ /**
1015
+ * The email address of the customer.
1016
+ */
1017
+ email_address?: string | null;
674
1018
 
675
- /**
676
- * The methods of how a plan can be released.
677
- */
678
- release_method?: Shared.ReleaseMethod | null;
1019
+ /**
1020
+ * Line items that break down the invoice total.
1021
+ */
1022
+ line_items?: Array<InvoiceUpdateParams.LineItem> | null;
679
1023
 
680
- /**
681
- * The amount the customer is charged every billing period. Use only if a recurring
682
- * payment. Provided as a number in the specified currency. Eg: 10.43 for $10.43
683
- */
684
- renewal_price?: number | null;
1024
+ /**
1025
+ * The unique identifier of an existing mailing address to attach.
1026
+ */
1027
+ mailing_address_id?: string | null;
685
1028
 
686
- /**
687
- * The number of units available for purchase.
688
- */
689
- stock?: number | null;
1029
+ /**
1030
+ * The unique identifier of a member to assign as the customer.
1031
+ */
1032
+ member_id?: string | null;
690
1033
 
691
- /**
692
- * The number of free trial days added before a renewal plan.
693
- */
694
- trial_period_days?: number | null;
1034
+ /**
1035
+ * The unique identifier of the payment method to charge.
1036
+ */
1037
+ payment_method_id?: string | null;
695
1038
 
696
- /**
697
- * When true, the plan has unlimited stock (stock field is ignored). When false,
698
- * purchases are limited by the stock field.
699
- */
700
- unlimited_stock?: boolean | null;
1039
+ /**
1040
+ * Updated plan attributes.
1041
+ */
1042
+ plan?: InvoiceUpdateParams.Plan | null;
1043
+ }
701
1044
 
702
- /**
703
- * Visibility of a resource
704
- */
705
- visibility?: Shared.Visibility | null;
706
- }
1045
+ export namespace InvoiceUpdateParams {
1046
+ /**
1047
+ * Inline billing address to create or update a mailing address for this invoice.
1048
+ */
1049
+ export interface BillingAddress {
1050
+ /**
1051
+ * The city of the address.
1052
+ */
1053
+ city?: string | null;
707
1054
 
708
- export namespace Plan {
709
- export interface CustomField {
710
- /**
711
- * The type of the custom field.
712
- */
713
- field_type: 'text';
1055
+ /**
1056
+ * The country of the address.
1057
+ */
1058
+ country?: string | null;
714
1059
 
715
- /**
716
- * The name of the custom field.
717
- */
718
- name: string;
1060
+ /**
1061
+ * The line 1 of the address.
1062
+ */
1063
+ line1?: string | null;
719
1064
 
720
- /**
721
- * The ID of the custom field (if being updated)
722
- */
723
- id?: string | null;
1065
+ /**
1066
+ * The line 2 of the address.
1067
+ */
1068
+ line2?: string | null;
724
1069
 
725
- /**
726
- * The order of the field.
727
- */
728
- order?: number | null;
1070
+ /**
1071
+ * The name of the customer.
1072
+ */
1073
+ name?: string | null;
729
1074
 
730
- /**
731
- * The placeholder value of the field.
732
- */
733
- placeholder?: string | null;
1075
+ /**
1076
+ * The phone number of the customer.
1077
+ */
1078
+ phone?: string | null;
734
1079
 
735
- /**
736
- * Whether or not the field is required.
737
- */
738
- required?: boolean | null;
739
- }
1080
+ /**
1081
+ * The postal code of the address.
1082
+ */
1083
+ postal_code?: string | null;
740
1084
 
741
- /**
742
- * The explicit payment method configuration for the plan. If not provided, the
743
- * platform or company's defaults will apply.
744
- */
745
- export interface PaymentMethodConfiguration {
746
- /**
747
- * An array of payment method identifiers that are explicitly disabled. Only
748
- * applies if the include_platform_defaults is true.
749
- */
750
- disabled: Array<PaymentsAPI.PaymentMethodTypes>;
1085
+ /**
1086
+ * The state of the address.
1087
+ */
1088
+ state?: string | null;
751
1089
 
752
- /**
753
- * An array of payment method identifiers that are explicitly enabled. This means
754
- * these payment methods will be shown on checkout. Example use case is to only
755
- * enable a specific payment method like cashapp, or extending the platform
756
- * defaults with additional methods.
757
- */
758
- enabled: Array<PaymentsAPI.PaymentMethodTypes>;
1090
+ /**
1091
+ * The type of tax identifier
1092
+ */
1093
+ tax_id_type?: InvoicesAPI.TaxIdentifierType | null;
759
1094
 
760
- /**
761
- * Whether Whop's platform default payment method enablement settings are included
762
- * in this configuration. The full list of default payment methods can be found in
763
- * the documentation at docs.whop.com/payments.
764
- */
765
- include_platform_defaults: boolean;
766
- }
767
- }
1095
+ /**
1096
+ * The value of the tax identifier.
1097
+ */
1098
+ tax_id_value?: string | null;
768
1099
  }
769
1100
 
770
- export interface CreateInvoiceInputWithProductIDAndEmailAddress {
1101
+ /**
1102
+ * A single line item to include on the invoice, with a label, quantity, and unit
1103
+ * price.
1104
+ */
1105
+ export interface LineItem {
771
1106
  /**
772
- * How the invoice should be collected. Use charge_automatically to charge a stored
773
- * payment method, or send_invoice to email the customer.
1107
+ * The label or description for this line item.
774
1108
  */
775
- collection_method: Shared.CollectionMethod;
1109
+ label: string;
776
1110
 
777
1111
  /**
778
- * The unique identifier of the company to create this invoice for.
1112
+ * The unit price for this line item. Provided as a number in the specified
1113
+ * currency. Eg: 10.43 for $10.43
779
1114
  */
780
- company_id: string;
1115
+ unit_price: number;
781
1116
 
782
1117
  /**
783
- * The date by which the invoice must be paid.
1118
+ * The quantity of this line item. Defaults to 1.
784
1119
  */
785
- due_date: string;
1120
+ quantity?: number | null;
1121
+ }
786
1122
 
1123
+ /**
1124
+ * Updated plan attributes.
1125
+ */
1126
+ export interface Plan {
787
1127
  /**
788
- * The email address of the customer. Required when creating an invoice for a
789
- * customer who is not yet a member of the company.
1128
+ * The interval in days at which the plan charges (renewal plans).
790
1129
  */
791
- email_address: string;
1130
+ billing_period?: number | null;
792
1131
 
793
1132
  /**
794
- * The plan attributes defining the price, currency, and billing interval for this
795
- * invoice.
1133
+ * An array of custom field objects.
796
1134
  */
797
- plan: CreateInvoiceInputWithProductIDAndEmailAddress.Plan;
1135
+ custom_fields?: Array<Plan.CustomField> | null;
798
1136
 
799
1137
  /**
800
- * The unique identifier of an existing product to create this invoice for.
1138
+ * The description of the plan.
801
1139
  */
802
- product_id: string;
1140
+ description?: string | null;
803
1141
 
804
1142
  /**
805
- * The date and time when the invoice will be automatically finalized and charged.
806
- * Only valid when collection_method is charge_automatically. If not provided, the
807
- * charge will be processed immediately.
1143
+ * The number of days until the membership expires and revokes access (expiration
1144
+ * plans). For example, 365 for a one-year access period.
808
1145
  */
809
- automatically_finalizes_at?: string | null;
1146
+ expiration_days?: number | null;
810
1147
 
811
1148
  /**
812
- * Whether to charge the customer a buyer fee on this invoice.
1149
+ * An additional amount charged upon first purchase. Use only if a one time payment
1150
+ * OR you want to charge an additional amount on top of the renewal price. Provided
1151
+ * as a number in the specified currency. Eg: 10.43 for $10.43
813
1152
  */
814
- charge_buyer_fee?: boolean | null;
1153
+ initial_price?: number | null;
815
1154
 
816
1155
  /**
817
- * The name of the customer. Required when creating an invoice for a customer who
818
- * is not yet a member of the company.
1156
+ * A personal description or notes section for the business.
819
1157
  */
820
- customer_name?: string | null;
1158
+ internal_notes?: string | null;
821
1159
 
822
1160
  /**
823
- * The unique identifier of the payment method to charge. Required when
824
- * collection_method is charge_automatically.
1161
+ * Whether this plan uses legacy payment method controls
825
1162
  */
826
- payment_method_id?: string | null;
1163
+ legacy_payment_method_controls?: boolean | null;
827
1164
 
828
1165
  /**
829
- * The payment token ID to use for this invoice. If using charge_automatically, you
830
- * must provide a payment_token.
1166
+ * The explicit payment method configuration for the plan. If not provided, the
1167
+ * platform or company's defaults will apply.
831
1168
  */
832
- payment_token_id?: string | null;
833
- }
1169
+ payment_method_configuration?: Plan.PaymentMethodConfiguration | null;
834
1170
 
835
- export namespace CreateInvoiceInputWithProductIDAndEmailAddress {
836
1171
  /**
837
- * The plan attributes defining the price, currency, and billing interval for this
838
- * invoice.
1172
+ * The type of plan that can be attached to a product
839
1173
  */
840
- export interface Plan {
841
- /**
842
- * The interval in days at which the plan charges (renewal plans).
843
- */
844
- billing_period?: number | null;
1174
+ plan_type?: Shared.PlanType | null;
845
1175
 
846
- /**
847
- * An array of custom field objects.
848
- */
849
- custom_fields?: Array<Plan.CustomField> | null;
1176
+ /**
1177
+ * The methods of how a plan can be released.
1178
+ */
1179
+ release_method?: Shared.ReleaseMethod | null;
850
1180
 
851
- /**
852
- * The description of the plan.
853
- */
854
- description?: string | null;
1181
+ /**
1182
+ * The amount the customer is charged every billing period. Use only if a recurring
1183
+ * payment. Provided as a number in the specified currency. Eg: 10.43 for $10.43
1184
+ */
1185
+ renewal_price?: number | null;
855
1186
 
856
- /**
857
- * The number of days until the membership expires and revokes access (expiration
858
- * plans). For example, 365 for a one-year access period.
859
- */
860
- expiration_days?: number | null;
1187
+ /**
1188
+ * The number of units available for purchase.
1189
+ */
1190
+ stock?: number | null;
861
1191
 
862
- /**
863
- * An additional amount charged upon first purchase. Use only if a one time payment
864
- * OR you want to charge an additional amount on top of the renewal price. Provided
865
- * as a number in the specified currency. Eg: 10.43 for $10.43
866
- */
867
- initial_price?: number | null;
1192
+ /**
1193
+ * The number of free trial days added before a renewal plan.
1194
+ */
1195
+ trial_period_days?: number | null;
868
1196
 
869
- /**
870
- * A personal description or notes section for the business.
871
- */
872
- internal_notes?: string | null;
1197
+ /**
1198
+ * When true, the plan has unlimited stock (stock field is ignored). When false,
1199
+ * purchases are limited by the stock field.
1200
+ */
1201
+ unlimited_stock?: boolean | null;
873
1202
 
874
- /**
875
- * Whether this plan uses legacy payment method controls
876
- */
877
- legacy_payment_method_controls?: boolean | null;
1203
+ /**
1204
+ * Visibility of a resource
1205
+ */
1206
+ visibility?: Shared.Visibility | null;
1207
+ }
878
1208
 
1209
+ export namespace Plan {
1210
+ export interface CustomField {
879
1211
  /**
880
- * The explicit payment method configuration for the plan. If not provided, the
881
- * platform or company's defaults will apply.
1212
+ * The type of the custom field.
882
1213
  */
883
- payment_method_configuration?: Plan.PaymentMethodConfiguration | null;
1214
+ field_type: 'text';
884
1215
 
885
1216
  /**
886
- * The type of plan that can be attached to a product
1217
+ * The name of the custom field.
887
1218
  */
888
- plan_type?: Shared.PlanType | null;
1219
+ name: string;
889
1220
 
890
1221
  /**
891
- * The methods of how a plan can be released.
1222
+ * The ID of the custom field (if being updated)
892
1223
  */
893
- release_method?: Shared.ReleaseMethod | null;
1224
+ id?: string | null;
894
1225
 
895
1226
  /**
896
- * The amount the customer is charged every billing period. Use only if a recurring
897
- * payment. Provided as a number in the specified currency. Eg: 10.43 for $10.43
1227
+ * The order of the field.
898
1228
  */
899
- renewal_price?: number | null;
1229
+ order?: number | null;
900
1230
 
901
1231
  /**
902
- * The number of units available for purchase.
1232
+ * The placeholder value of the field.
903
1233
  */
904
- stock?: number | null;
1234
+ placeholder?: string | null;
905
1235
 
906
1236
  /**
907
- * The number of free trial days added before a renewal plan.
1237
+ * Whether or not the field is required.
908
1238
  */
909
- trial_period_days?: number | null;
1239
+ required?: boolean | null;
1240
+ }
910
1241
 
1242
+ /**
1243
+ * The explicit payment method configuration for the plan. If not provided, the
1244
+ * platform or company's defaults will apply.
1245
+ */
1246
+ export interface PaymentMethodConfiguration {
911
1247
  /**
912
- * When true, the plan has unlimited stock (stock field is ignored). When false,
913
- * purchases are limited by the stock field.
1248
+ * An array of payment method identifiers that are explicitly disabled. Only
1249
+ * applies if the include_platform_defaults is true.
914
1250
  */
915
- unlimited_stock?: boolean | null;
1251
+ disabled: Array<PaymentsAPI.PaymentMethodTypes>;
916
1252
 
917
1253
  /**
918
- * Visibility of a resource
1254
+ * An array of payment method identifiers that are explicitly enabled. This means
1255
+ * these payment methods will be shown on checkout. Example use case is to only
1256
+ * enable a specific payment method like cashapp, or extending the platform
1257
+ * defaults with additional methods.
919
1258
  */
920
- visibility?: Shared.Visibility | null;
921
- }
922
-
923
- export namespace Plan {
924
- export interface CustomField {
925
- /**
926
- * The type of the custom field.
927
- */
928
- field_type: 'text';
929
-
930
- /**
931
- * The name of the custom field.
932
- */
933
- name: string;
934
-
935
- /**
936
- * The ID of the custom field (if being updated)
937
- */
938
- id?: string | null;
939
-
940
- /**
941
- * The order of the field.
942
- */
943
- order?: number | null;
944
-
945
- /**
946
- * The placeholder value of the field.
947
- */
948
- placeholder?: string | null;
949
-
950
- /**
951
- * Whether or not the field is required.
952
- */
953
- required?: boolean | null;
954
- }
1259
+ enabled: Array<PaymentsAPI.PaymentMethodTypes>;
955
1260
 
956
1261
  /**
957
- * The explicit payment method configuration for the plan. If not provided, the
958
- * platform or company's defaults will apply.
1262
+ * Whether Whop's platform default payment method enablement settings are included
1263
+ * in this configuration. The full list of default payment methods can be found in
1264
+ * the documentation at docs.whop.com/payments.
959
1265
  */
960
- export interface PaymentMethodConfiguration {
961
- /**
962
- * An array of payment method identifiers that are explicitly disabled. Only
963
- * applies if the include_platform_defaults is true.
964
- */
965
- disabled: Array<PaymentsAPI.PaymentMethodTypes>;
966
-
967
- /**
968
- * An array of payment method identifiers that are explicitly enabled. This means
969
- * these payment methods will be shown on checkout. Example use case is to only
970
- * enable a specific payment method like cashapp, or extending the platform
971
- * defaults with additional methods.
972
- */
973
- enabled: Array<PaymentsAPI.PaymentMethodTypes>;
974
-
975
- /**
976
- * Whether Whop's platform default payment method enablement settings are included
977
- * in this configuration. The full list of default payment methods can be found in
978
- * the documentation at docs.whop.com/payments.
979
- */
980
- include_platform_defaults: boolean;
981
- }
1266
+ include_platform_defaults: boolean;
982
1267
  }
983
1268
  }
984
1269
  }
@@ -1043,8 +1328,13 @@ export interface InvoiceListParams extends CursorPageParams {
1043
1328
 
1044
1329
  export declare namespace Invoices {
1045
1330
  export {
1331
+ type TaxIdentifierType as TaxIdentifierType,
1332
+ type InvoiceDeleteResponse as InvoiceDeleteResponse,
1333
+ type InvoiceMarkPaidResponse as InvoiceMarkPaidResponse,
1334
+ type InvoiceMarkUncollectibleResponse as InvoiceMarkUncollectibleResponse,
1046
1335
  type InvoiceVoidResponse as InvoiceVoidResponse,
1047
1336
  type InvoiceCreateParams as InvoiceCreateParams,
1337
+ type InvoiceUpdateParams as InvoiceUpdateParams,
1048
1338
  type InvoiceListParams as InvoiceListParams,
1049
1339
  };
1050
1340
  }