@whop/sdk 0.0.2 → 0.0.4

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 (196) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/client.d.mts +30 -12
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +30 -12
  5. package/client.d.ts.map +1 -1
  6. package/client.js +19 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs +21 -3
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/app-builds.d.mts +16 -13
  12. package/resources/app-builds.d.mts.map +1 -1
  13. package/resources/app-builds.d.ts +16 -13
  14. package/resources/app-builds.d.ts.map +1 -1
  15. package/resources/app-builds.js +1 -1
  16. package/resources/app-builds.mjs +1 -1
  17. package/resources/apps.d.mts +15 -10
  18. package/resources/apps.d.mts.map +1 -1
  19. package/resources/apps.d.ts +15 -10
  20. package/resources/apps.d.ts.map +1 -1
  21. package/resources/checkout-configurations.d.mts +252 -140
  22. package/resources/checkout-configurations.d.mts.map +1 -1
  23. package/resources/checkout-configurations.d.ts +252 -140
  24. package/resources/checkout-configurations.d.ts.map +1 -1
  25. package/resources/checkout-configurations.js +6 -20
  26. package/resources/checkout-configurations.js.map +1 -1
  27. package/resources/checkout-configurations.mjs +6 -20
  28. package/resources/checkout-configurations.mjs.map +1 -1
  29. package/resources/companies.d.mts +157 -0
  30. package/resources/companies.d.mts.map +1 -1
  31. package/resources/companies.d.ts +157 -0
  32. package/resources/companies.d.ts.map +1 -1
  33. package/resources/companies.js +22 -0
  34. package/resources/companies.js.map +1 -1
  35. package/resources/companies.mjs +22 -0
  36. package/resources/companies.mjs.map +1 -1
  37. package/resources/course-chapters.d.mts +185 -0
  38. package/resources/course-chapters.d.mts.map +1 -0
  39. package/resources/course-chapters.d.ts +185 -0
  40. package/resources/course-chapters.d.ts.map +1 -0
  41. package/resources/course-chapters.js +103 -0
  42. package/resources/course-chapters.js.map +1 -0
  43. package/resources/course-chapters.mjs +99 -0
  44. package/resources/course-chapters.mjs.map +1 -0
  45. package/resources/course-lesson-interactions.d.mts +2 -2
  46. package/resources/course-lesson-interactions.d.ts +2 -2
  47. package/resources/course-lesson-interactions.js +2 -2
  48. package/resources/course-lesson-interactions.mjs +2 -2
  49. package/resources/course-lessons.d.mts +563 -0
  50. package/resources/course-lessons.d.mts.map +1 -0
  51. package/resources/course-lessons.d.ts +563 -0
  52. package/resources/course-lessons.d.ts.map +1 -0
  53. package/resources/course-lessons.js +101 -0
  54. package/resources/course-lessons.js.map +1 -0
  55. package/resources/course-lessons.mjs +97 -0
  56. package/resources/course-lessons.mjs.map +1 -0
  57. package/resources/course-students.d.mts +187 -0
  58. package/resources/course-students.d.mts.map +1 -0
  59. package/resources/course-students.d.ts +187 -0
  60. package/resources/course-students.d.ts.map +1 -0
  61. package/resources/course-students.js +36 -0
  62. package/resources/course-students.js.map +1 -0
  63. package/resources/course-students.mjs +32 -0
  64. package/resources/course-students.mjs.map +1 -0
  65. package/resources/courses.d.mts +485 -0
  66. package/resources/courses.d.mts.map +1 -0
  67. package/resources/courses.d.ts +485 -0
  68. package/resources/courses.d.ts.map +1 -0
  69. package/resources/courses.js +98 -0
  70. package/resources/courses.js.map +1 -0
  71. package/resources/courses.mjs +94 -0
  72. package/resources/courses.mjs.map +1 -0
  73. package/resources/experiences.d.mts +42 -11
  74. package/resources/experiences.d.mts.map +1 -1
  75. package/resources/experiences.d.ts +42 -11
  76. package/resources/experiences.d.ts.map +1 -1
  77. package/resources/experiences.js +22 -0
  78. package/resources/experiences.js.map +1 -1
  79. package/resources/experiences.mjs +22 -0
  80. package/resources/experiences.mjs.map +1 -1
  81. package/resources/forum-posts.d.mts +75 -10
  82. package/resources/forum-posts.d.mts.map +1 -1
  83. package/resources/forum-posts.d.ts +75 -10
  84. package/resources/forum-posts.d.ts.map +1 -1
  85. package/resources/forum-posts.js +11 -0
  86. package/resources/forum-posts.js.map +1 -1
  87. package/resources/forum-posts.mjs +11 -0
  88. package/resources/forum-posts.mjs.map +1 -1
  89. package/resources/index.d.mts +12 -6
  90. package/resources/index.d.mts.map +1 -1
  91. package/resources/index.d.ts +12 -6
  92. package/resources/index.d.ts.map +1 -1
  93. package/resources/index.js +13 -1
  94. package/resources/index.js.map +1 -1
  95. package/resources/index.mjs +7 -1
  96. package/resources/index.mjs.map +1 -1
  97. package/resources/invoices.d.mts +529 -146
  98. package/resources/invoices.d.mts.map +1 -1
  99. package/resources/invoices.d.ts +529 -146
  100. package/resources/invoices.d.ts.map +1 -1
  101. package/resources/invoices.js +2 -24
  102. package/resources/invoices.js.map +1 -1
  103. package/resources/invoices.mjs +2 -24
  104. package/resources/invoices.mjs.map +1 -1
  105. package/resources/ledger-accounts.d.mts +1 -1
  106. package/resources/ledger-accounts.d.mts.map +1 -1
  107. package/resources/ledger-accounts.d.ts +1 -1
  108. package/resources/ledger-accounts.d.ts.map +1 -1
  109. package/resources/members.d.mts +4 -0
  110. package/resources/members.d.mts.map +1 -1
  111. package/resources/members.d.ts +4 -0
  112. package/resources/members.d.ts.map +1 -1
  113. package/resources/memberships.d.mts +26 -5
  114. package/resources/memberships.d.mts.map +1 -1
  115. package/resources/memberships.d.ts +26 -5
  116. package/resources/memberships.d.ts.map +1 -1
  117. package/resources/memberships.js +1 -1
  118. package/resources/memberships.js.map +1 -1
  119. package/resources/memberships.mjs +1 -1
  120. package/resources/memberships.mjs.map +1 -1
  121. package/resources/messages.d.mts +57 -10
  122. package/resources/messages.d.mts.map +1 -1
  123. package/resources/messages.d.ts +57 -10
  124. package/resources/messages.d.ts.map +1 -1
  125. package/resources/messages.js +6 -0
  126. package/resources/messages.js.map +1 -1
  127. package/resources/messages.mjs +6 -0
  128. package/resources/messages.mjs.map +1 -1
  129. package/resources/payments.d.mts +35 -13
  130. package/resources/payments.d.mts.map +1 -1
  131. package/resources/payments.d.ts +35 -13
  132. package/resources/payments.d.ts.map +1 -1
  133. package/resources/plans.d.mts +161 -17
  134. package/resources/plans.d.mts.map +1 -1
  135. package/resources/plans.d.ts +161 -17
  136. package/resources/plans.d.ts.map +1 -1
  137. package/resources/plans.js.map +1 -1
  138. package/resources/plans.mjs.map +1 -1
  139. package/resources/products.d.mts +30 -33
  140. package/resources/products.d.mts.map +1 -1
  141. package/resources/products.d.ts +30 -33
  142. package/resources/products.d.ts.map +1 -1
  143. package/resources/promo-codes.d.mts +394 -0
  144. package/resources/promo-codes.d.mts.map +1 -0
  145. package/resources/promo-codes.d.ts +394 -0
  146. package/resources/promo-codes.d.ts.map +1 -0
  147. package/resources/promo-codes.js +91 -0
  148. package/resources/promo-codes.js.map +1 -0
  149. package/resources/promo-codes.mjs +87 -0
  150. package/resources/promo-codes.mjs.map +1 -0
  151. package/resources/reviews.d.mts +277 -0
  152. package/resources/reviews.d.mts.map +1 -0
  153. package/resources/reviews.d.ts +277 -0
  154. package/resources/reviews.d.ts.map +1 -0
  155. package/resources/reviews.js +23 -0
  156. package/resources/reviews.js.map +1 -0
  157. package/resources/reviews.mjs +19 -0
  158. package/resources/reviews.mjs.map +1 -0
  159. package/resources/shared.d.mts +117 -14
  160. package/resources/shared.d.mts.map +1 -1
  161. package/resources/shared.d.ts +117 -14
  162. package/resources/shared.d.ts.map +1 -1
  163. package/resources/transfers.d.mts +12 -0
  164. package/resources/transfers.d.mts.map +1 -1
  165. package/resources/transfers.d.ts +12 -0
  166. package/resources/transfers.d.ts.map +1 -1
  167. package/src/client.ts +166 -11
  168. package/src/resources/app-builds.ts +19 -14
  169. package/src/resources/apps.ts +16 -11
  170. package/src/resources/checkout-configurations.ts +278 -143
  171. package/src/resources/companies.ts +196 -0
  172. package/src/resources/course-chapters.ts +236 -0
  173. package/src/resources/course-lesson-interactions.ts +2 -2
  174. package/src/resources/course-lessons.ts +699 -0
  175. package/src/resources/course-students.ts +238 -0
  176. package/src/resources/courses.ts +622 -0
  177. package/src/resources/experiences.ts +54 -11
  178. package/src/resources/forum-posts.ts +95 -10
  179. package/src/resources/index.ts +73 -2
  180. package/src/resources/invoices.ts +620 -149
  181. package/src/resources/ledger-accounts.ts +13 -1
  182. package/src/resources/members.ts +5 -0
  183. package/src/resources/memberships.ts +31 -6
  184. package/src/resources/messages.ts +74 -10
  185. package/src/resources/payments.ts +146 -19
  186. package/src/resources/plans.ts +184 -17
  187. package/src/resources/products.ts +36 -37
  188. package/src/resources/promo-codes.ts +490 -0
  189. package/src/resources/reviews.ts +348 -0
  190. package/src/resources/shared.ts +128 -14
  191. package/src/resources/transfers.ts +10 -0
  192. package/src/version.ts +1 -1
  193. package/version.d.mts +1 -1
  194. package/version.d.ts +1 -1
  195. package/version.js +1 -1
  196. package/version.mjs +1 -1
@@ -19,11 +19,13 @@ export declare class Invoices extends APIResource {
19
19
  * collection_method: 'send_invoice',
20
20
  * company_id: 'biz_xxxxxxxxxxxxxx',
21
21
  * due_date: '2023-12-01T05:00:00.401Z',
22
+ * member_id: 'mber_xxxxxxxxxxxxx',
22
23
  * plan: {},
24
+ * product: { title: 'title' },
23
25
  * });
24
26
  * ```
25
27
  */
26
- create(body: InvoiceCreateParams, options?: RequestOptions): APIPromise<InvoiceCreateResponse>;
28
+ create(body: InvoiceCreateParams, options?: RequestOptions): APIPromise<Shared.Invoice>;
27
29
  /**
28
30
  * Retrieves an invoice by ID or token
29
31
  *
@@ -31,13 +33,6 @@ export declare class Invoices extends APIResource {
31
33
  *
32
34
  * - `invoice:basic:read`
33
35
  * - `plan:basic:read`
34
- *
35
- * @example
36
- * ```ts
37
- * const invoice = await client.invoices.retrieve(
38
- * 'inv_xxxxxxxxxxxxxx',
39
- * );
40
- * ```
41
36
  */
42
37
  retrieve(id: string, options?: RequestOptions): APIPromise<Shared.Invoice>;
43
38
  /**
@@ -47,16 +42,6 @@ export declare class Invoices extends APIResource {
47
42
  *
48
43
  * - `invoice:basic:read`
49
44
  * - `plan:basic:read`
50
- *
51
- * @example
52
- * ```ts
53
- * // Automatically fetches more pages as needed.
54
- * for await (const invoiceListItem of client.invoices.list({
55
- * company_id: 'biz_xxxxxxxxxxxxxx',
56
- * })) {
57
- * // ...
58
- * }
59
- * ```
60
45
  */
61
46
  list(query: InvoiceListParams, options?: RequestOptions): PagePromise<InvoiceListItemsCursorPage, Shared.InvoiceListItem>;
62
47
  /**
@@ -65,182 +50,580 @@ export declare class Invoices extends APIResource {
65
50
  * Required permissions:
66
51
  *
67
52
  * - `invoice:update`
68
- *
69
- * @example
70
- * ```ts
71
- * const response = await client.invoices.void(
72
- * 'inv_xxxxxxxxxxxxxx',
73
- * );
74
- * ```
75
53
  */
76
54
  void(id: string, options?: RequestOptions): APIPromise<InvoiceVoidResponse>;
77
55
  }
78
- /**
79
- * Autogenerated return type of CreateInvoice.
80
- */
81
- export interface InvoiceCreateResponse {
82
- /**
83
- * The ID of the checkout job that was created for this invoice.
84
- */
85
- checkout_job_id: string | null;
86
- /**
87
- * The invoice that was created for this invoice.
88
- */
89
- invoice: Shared.Invoice;
90
- }
91
56
  /**
92
57
  * Represents `true` or `false` values.
93
58
  */
94
59
  export type InvoiceVoidResponse = boolean;
95
- export interface InvoiceCreateParams {
96
- /**
97
- * The method of collection for this invoice. If using charge_automatically, you
98
- * must provide a payment_token.
99
- */
100
- collection_method: Shared.CollectionMethod;
101
- /**
102
- * The company ID to create this invoice for.
103
- */
104
- company_id: string;
105
- /**
106
- * The date the invoice is due, if applicable.
107
- */
108
- due_date: string;
109
- /**
110
- * The properties of the plan to create for this invoice.
111
- */
112
- plan: InvoiceCreateParams.Plan;
113
- /**
114
- * Whether or not to charge the customer a buyer fee.
115
- */
116
- charge_buyer_fee?: boolean | null;
117
- /**
118
- * The name of the customer to create this invoice for. This is required if you
119
- * want to create an invoice for a customer who does not have a member of your
120
- * company yet.
121
- */
122
- customer_name?: string | null;
123
- /**
124
- * The email address to create this invoice for. This is required if you want to
125
- * create an invoice for a user who does not have a member of your company yet.
126
- */
127
- email_address?: string | null;
128
- /**
129
- * The member ID to create this invoice for. Include this if you want to create an
130
- * invoice for an existing member. If you do not have a member ID, you must provide
131
- * an email_address and customer_name.
132
- */
133
- member_id?: string | null;
134
- /**
135
- * The payment token ID to use for this invoice. If using charge_automatically, you
136
- * must provide a payment_token.
137
- */
138
- payment_token_id?: string | null;
139
- /**
140
- * The properties of the product to create for this invoice. Include this if you
141
- * want to create an invoice for a new product.
142
- */
143
- product?: InvoiceCreateParams.Product | null;
144
- /**
145
- * The product ID to create this invoice for. Include this if you want to create an
146
- * invoice for an existing product.
147
- */
148
- product_id?: string | null;
149
- }
60
+ export type InvoiceCreateParams = InvoiceCreateParams.CreateInvoiceInputWithProductAndMemberID | InvoiceCreateParams.CreateInvoiceInputWithProductAndEmailAddress | InvoiceCreateParams.CreateInvoiceInputWithProductIDAndMemberID | InvoiceCreateParams.CreateInvoiceInputWithProductIDAndEmailAddress;
150
61
  export declare namespace InvoiceCreateParams {
151
- /**
152
- * The properties of the plan to create for this invoice.
153
- */
154
- interface Plan {
62
+ interface CreateInvoiceInputWithProductAndMemberID {
63
+ /**
64
+ * The method of collection for this invoice. If using charge_automatically, you
65
+ * must provide a payment_token.
66
+ */
67
+ collection_method: Shared.CollectionMethod;
68
+ /**
69
+ * The company ID to create this invoice for.
70
+ */
71
+ company_id: string;
72
+ /**
73
+ * The date the invoice is due, if applicable.
74
+ */
75
+ due_date: string;
76
+ /**
77
+ * The member ID to create this invoice for. Include this if you want to create an
78
+ * invoice for an existing member. If you do not have a member ID, you must provide
79
+ * an email_address and customer_name.
80
+ */
81
+ member_id: string;
82
+ /**
83
+ * The properties of the plan to create for this invoice.
84
+ */
85
+ plan: CreateInvoiceInputWithProductAndMemberID.Plan;
86
+ /**
87
+ * The properties of the product to create for this invoice. Include this if you
88
+ * want to create an invoice for a new product.
89
+ */
90
+ product: CreateInvoiceInputWithProductAndMemberID.Product;
91
+ /**
92
+ * Whether or not to charge the customer a buyer fee.
93
+ */
94
+ charge_buyer_fee?: boolean | null;
95
+ /**
96
+ * The name of the customer to create this invoice for. This is required if you
97
+ * want to create an invoice for a customer who does not have a member of your
98
+ * company yet.
99
+ */
100
+ customer_name?: string | null;
101
+ /**
102
+ * The payment token ID to use for this invoice. If using charge_automatically, you
103
+ * must provide a payment_token.
104
+ */
105
+ payment_token_id?: string | null;
106
+ }
107
+ namespace CreateInvoiceInputWithProductAndMemberID {
108
+ /**
109
+ * The properties of the plan to create for this invoice.
110
+ */
111
+ interface Plan {
112
+ /**
113
+ * The interval at which the plan charges (renewal plans).
114
+ */
115
+ billing_period?: number | null;
116
+ /**
117
+ * An array of custom field objects.
118
+ */
119
+ custom_fields?: Array<Plan.CustomField> | null;
120
+ /**
121
+ * The description of the plan.
122
+ */
123
+ description?: string | null;
124
+ /**
125
+ * The interval at which the plan charges (expiration plans).
126
+ */
127
+ expiration_days?: number | null;
128
+ /**
129
+ * An additional amount charged upon first purchase. Use only if a one time payment
130
+ * OR you want to charge an additional amount on top of the renewal price. Provided
131
+ * as a number in dollars. Eg: 10.43 for $10.43
132
+ */
133
+ initial_price?: number | null;
134
+ /**
135
+ * A personal description or notes section for the business.
136
+ */
137
+ internal_notes?: string | null;
138
+ /**
139
+ * The type of plan that can be attached to an access pass
140
+ */
141
+ plan_type?: Shared.PlanType | null;
142
+ /**
143
+ * The methods of how a plan can be released.
144
+ */
145
+ release_method?: Shared.ReleaseMethod | null;
146
+ /**
147
+ * The amount the customer is charged every billing period. Use only if a recurring
148
+ * payment. Provided as a number in dollars. Eg: 10.43 for $10.43
149
+ */
150
+ renewal_price?: number | null;
151
+ /**
152
+ * The number of units available for purchase.
153
+ */
154
+ stock?: number | null;
155
+ /**
156
+ * The number of free trial days added before a renewal plan.
157
+ */
158
+ trial_period_days?: number | null;
159
+ /**
160
+ * Limits/doesn't limit the number of units available for purchase.
161
+ */
162
+ unlimited_stock?: boolean | null;
163
+ /**
164
+ * Visibility of a resource
165
+ */
166
+ visibility?: Shared.Visibility | null;
167
+ }
168
+ namespace Plan {
169
+ interface CustomField {
170
+ /**
171
+ * The type of the custom field.
172
+ */
173
+ field_type: 'text';
174
+ /**
175
+ * The name of the custom field.
176
+ */
177
+ name: string;
178
+ /**
179
+ * The ID of the custom field (if being updated)
180
+ */
181
+ id?: string | null;
182
+ /**
183
+ * The order of the field.
184
+ */
185
+ order?: number | null;
186
+ /**
187
+ * The placeholder value of the field.
188
+ */
189
+ placeholder?: string | null;
190
+ /**
191
+ * Whether or not the field is required.
192
+ */
193
+ required?: boolean | null;
194
+ }
195
+ }
196
+ /**
197
+ * The properties of the product to create for this invoice. Include this if you
198
+ * want to create an invoice for a new product.
199
+ */
200
+ interface Product {
201
+ /**
202
+ * The title of the product.
203
+ */
204
+ title: string;
205
+ /**
206
+ * The ID of the product tax code to apply to this product.
207
+ */
208
+ product_tax_code_id?: string | null;
209
+ }
210
+ }
211
+ interface CreateInvoiceInputWithProductAndEmailAddress {
212
+ /**
213
+ * The method of collection for this invoice. If using charge_automatically, you
214
+ * must provide a payment_token.
215
+ */
216
+ collection_method: Shared.CollectionMethod;
217
+ /**
218
+ * The company ID to create this invoice for.
219
+ */
220
+ company_id: string;
221
+ /**
222
+ * The date the invoice is due, if applicable.
223
+ */
224
+ due_date: string;
225
+ /**
226
+ * The email address to create this invoice for. This is required if you want to
227
+ * create an invoice for a user who does not have a member of your company yet.
228
+ */
229
+ email_address: string;
155
230
  /**
156
- * The interval at which the plan charges (renewal plans).
231
+ * The properties of the plan to create for this invoice.
157
232
  */
158
- billing_period?: number | null;
233
+ plan: CreateInvoiceInputWithProductAndEmailAddress.Plan;
159
234
  /**
160
- * An array of custom field objects.
235
+ * The properties of the product to create for this invoice. Include this if you
236
+ * want to create an invoice for a new product.
161
237
  */
162
- custom_fields?: Array<Plan.CustomField> | null;
238
+ product: CreateInvoiceInputWithProductAndEmailAddress.Product;
163
239
  /**
164
- * The description of the plan.
240
+ * Whether or not to charge the customer a buyer fee.
165
241
  */
166
- description?: string | null;
242
+ charge_buyer_fee?: boolean | null;
167
243
  /**
168
- * The interval at which the plan charges (expiration plans).
244
+ * The name of the customer to create this invoice for. This is required if you
245
+ * want to create an invoice for a customer who does not have a member of your
246
+ * company yet.
169
247
  */
170
- expiration_days?: number | null;
248
+ customer_name?: string | null;
171
249
  /**
172
- * An additional amount charged upon first purchase. Use only if a one time payment
173
- * OR you want to charge an additional amount on top of the renewal price. Provided
174
- * as a number in dollars. Eg: 10.43 for $10.43
250
+ * The payment token ID to use for this invoice. If using charge_automatically, you
251
+ * must provide a payment_token.
175
252
  */
176
- initial_price?: number | null;
253
+ payment_token_id?: string | null;
254
+ }
255
+ namespace CreateInvoiceInputWithProductAndEmailAddress {
177
256
  /**
178
- * A personal description or notes section for the business.
257
+ * The properties of the plan to create for this invoice.
179
258
  */
180
- internal_notes?: string | null;
259
+ interface Plan {
260
+ /**
261
+ * The interval at which the plan charges (renewal plans).
262
+ */
263
+ billing_period?: number | null;
264
+ /**
265
+ * An array of custom field objects.
266
+ */
267
+ custom_fields?: Array<Plan.CustomField> | null;
268
+ /**
269
+ * The description of the plan.
270
+ */
271
+ description?: string | null;
272
+ /**
273
+ * The interval at which the plan charges (expiration plans).
274
+ */
275
+ expiration_days?: number | null;
276
+ /**
277
+ * An additional amount charged upon first purchase. Use only if a one time payment
278
+ * OR you want to charge an additional amount on top of the renewal price. Provided
279
+ * as a number in dollars. Eg: 10.43 for $10.43
280
+ */
281
+ initial_price?: number | null;
282
+ /**
283
+ * A personal description or notes section for the business.
284
+ */
285
+ internal_notes?: string | null;
286
+ /**
287
+ * The type of plan that can be attached to an access pass
288
+ */
289
+ plan_type?: Shared.PlanType | null;
290
+ /**
291
+ * The methods of how a plan can be released.
292
+ */
293
+ release_method?: Shared.ReleaseMethod | null;
294
+ /**
295
+ * The amount the customer is charged every billing period. Use only if a recurring
296
+ * payment. Provided as a number in dollars. Eg: 10.43 for $10.43
297
+ */
298
+ renewal_price?: number | null;
299
+ /**
300
+ * The number of units available for purchase.
301
+ */
302
+ stock?: number | null;
303
+ /**
304
+ * The number of free trial days added before a renewal plan.
305
+ */
306
+ trial_period_days?: number | null;
307
+ /**
308
+ * Limits/doesn't limit the number of units available for purchase.
309
+ */
310
+ unlimited_stock?: boolean | null;
311
+ /**
312
+ * Visibility of a resource
313
+ */
314
+ visibility?: Shared.Visibility | null;
315
+ }
316
+ namespace Plan {
317
+ interface CustomField {
318
+ /**
319
+ * The type of the custom field.
320
+ */
321
+ field_type: 'text';
322
+ /**
323
+ * The name of the custom field.
324
+ */
325
+ name: string;
326
+ /**
327
+ * The ID of the custom field (if being updated)
328
+ */
329
+ id?: string | null;
330
+ /**
331
+ * The order of the field.
332
+ */
333
+ order?: number | null;
334
+ /**
335
+ * The placeholder value of the field.
336
+ */
337
+ placeholder?: string | null;
338
+ /**
339
+ * Whether or not the field is required.
340
+ */
341
+ required?: boolean | null;
342
+ }
343
+ }
344
+ /**
345
+ * The properties of the product to create for this invoice. Include this if you
346
+ * want to create an invoice for a new product.
347
+ */
348
+ interface Product {
349
+ /**
350
+ * The title of the product.
351
+ */
352
+ title: string;
353
+ /**
354
+ * The ID of the product tax code to apply to this product.
355
+ */
356
+ product_tax_code_id?: string | null;
357
+ }
358
+ }
359
+ interface CreateInvoiceInputWithProductIDAndMemberID {
360
+ /**
361
+ * The method of collection for this invoice. If using charge_automatically, you
362
+ * must provide a payment_token.
363
+ */
364
+ collection_method: Shared.CollectionMethod;
365
+ /**
366
+ * The company ID to create this invoice for.
367
+ */
368
+ company_id: string;
181
369
  /**
182
- * The type of plan that can be attached to an access pass
370
+ * The date the invoice is due, if applicable.
183
371
  */
184
- plan_type?: Shared.PlanType | null;
372
+ due_date: string;
185
373
  /**
186
- * The methods of how a plan can be released.
374
+ * The member ID to create this invoice for. Include this if you want to create an
375
+ * invoice for an existing member. If you do not have a member ID, you must provide
376
+ * an email_address and customer_name.
187
377
  */
188
- release_method?: Shared.ReleaseMethod | null;
378
+ member_id: string;
189
379
  /**
190
- * The amount the customer is charged every billing period. Use only if a recurring
191
- * payment. Provided as a number in dollars. Eg: 10.43 for $10.43
380
+ * The properties of the plan to create for this invoice.
192
381
  */
193
- renewal_price?: number | null;
382
+ plan: CreateInvoiceInputWithProductIDAndMemberID.Plan;
194
383
  /**
195
- * The number of free trial days added before a renewal plan.
384
+ * The product ID to create this invoice for. Include this if you want to create an
385
+ * invoice for an existing product.
196
386
  */
197
- trial_period_days?: number | null;
387
+ product_id: string;
198
388
  /**
199
- * Visibility of a resource
389
+ * Whether or not to charge the customer a buyer fee.
200
390
  */
201
- visibility?: Shared.Visibility | null;
391
+ charge_buyer_fee?: boolean | null;
392
+ /**
393
+ * The name of the customer to create this invoice for. This is required if you
394
+ * want to create an invoice for a customer who does not have a member of your
395
+ * company yet.
396
+ */
397
+ customer_name?: string | null;
398
+ /**
399
+ * The payment token ID to use for this invoice. If using charge_automatically, you
400
+ * must provide a payment_token.
401
+ */
402
+ payment_token_id?: string | null;
202
403
  }
203
- namespace Plan {
204
- interface CustomField {
404
+ namespace CreateInvoiceInputWithProductIDAndMemberID {
405
+ /**
406
+ * The properties of the plan to create for this invoice.
407
+ */
408
+ interface Plan {
409
+ /**
410
+ * The interval at which the plan charges (renewal plans).
411
+ */
412
+ billing_period?: number | null;
413
+ /**
414
+ * An array of custom field objects.
415
+ */
416
+ custom_fields?: Array<Plan.CustomField> | null;
417
+ /**
418
+ * The description of the plan.
419
+ */
420
+ description?: string | null;
421
+ /**
422
+ * The interval at which the plan charges (expiration plans).
423
+ */
424
+ expiration_days?: number | null;
425
+ /**
426
+ * An additional amount charged upon first purchase. Use only if a one time payment
427
+ * OR you want to charge an additional amount on top of the renewal price. Provided
428
+ * as a number in dollars. Eg: 10.43 for $10.43
429
+ */
430
+ initial_price?: number | null;
431
+ /**
432
+ * A personal description or notes section for the business.
433
+ */
434
+ internal_notes?: string | null;
435
+ /**
436
+ * The type of plan that can be attached to an access pass
437
+ */
438
+ plan_type?: Shared.PlanType | null;
205
439
  /**
206
- * The type of the custom field.
440
+ * The methods of how a plan can be released.
207
441
  */
208
- field_type: 'text';
442
+ release_method?: Shared.ReleaseMethod | null;
209
443
  /**
210
- * The name of the custom field.
444
+ * The amount the customer is charged every billing period. Use only if a recurring
445
+ * payment. Provided as a number in dollars. Eg: 10.43 for $10.43
211
446
  */
212
- name: string;
447
+ renewal_price?: number | null;
213
448
  /**
214
- * The ID of the custom field (if being updated)
449
+ * The number of units available for purchase.
215
450
  */
216
- id?: string | null;
451
+ stock?: number | null;
217
452
  /**
218
- * The order of the field.
453
+ * The number of free trial days added before a renewal plan.
219
454
  */
220
- order?: number | null;
455
+ trial_period_days?: number | null;
221
456
  /**
222
- * The placeholder value of the field.
457
+ * Limits/doesn't limit the number of units available for purchase.
223
458
  */
224
- placeholder?: string | null;
459
+ unlimited_stock?: boolean | null;
225
460
  /**
226
- * Whether or not the field is required.
461
+ * Visibility of a resource
227
462
  */
228
- required?: boolean | null;
463
+ visibility?: Shared.Visibility | null;
464
+ }
465
+ namespace Plan {
466
+ interface CustomField {
467
+ /**
468
+ * The type of the custom field.
469
+ */
470
+ field_type: 'text';
471
+ /**
472
+ * The name of the custom field.
473
+ */
474
+ name: string;
475
+ /**
476
+ * The ID of the custom field (if being updated)
477
+ */
478
+ id?: string | null;
479
+ /**
480
+ * The order of the field.
481
+ */
482
+ order?: number | null;
483
+ /**
484
+ * The placeholder value of the field.
485
+ */
486
+ placeholder?: string | null;
487
+ /**
488
+ * Whether or not the field is required.
489
+ */
490
+ required?: boolean | null;
491
+ }
229
492
  }
230
493
  }
231
- /**
232
- * The properties of the product to create for this invoice. Include this if you
233
- * want to create an invoice for a new product.
234
- */
235
- interface Product {
494
+ interface CreateInvoiceInputWithProductIDAndEmailAddress {
495
+ /**
496
+ * The method of collection for this invoice. If using charge_automatically, you
497
+ * must provide a payment_token.
498
+ */
499
+ collection_method: Shared.CollectionMethod;
500
+ /**
501
+ * The company ID to create this invoice for.
502
+ */
503
+ company_id: string;
236
504
  /**
237
- * The title of the product.
505
+ * The date the invoice is due, if applicable.
238
506
  */
239
- title: string;
507
+ due_date: string;
240
508
  /**
241
- * The ID of the product tax code to apply to this product.
509
+ * The email address to create this invoice for. This is required if you want to
510
+ * create an invoice for a user who does not have a member of your company yet.
242
511
  */
243
- product_tax_code_id?: string | null;
512
+ email_address: string;
513
+ /**
514
+ * The properties of the plan to create for this invoice.
515
+ */
516
+ plan: CreateInvoiceInputWithProductIDAndEmailAddress.Plan;
517
+ /**
518
+ * The product ID to create this invoice for. Include this if you want to create an
519
+ * invoice for an existing product.
520
+ */
521
+ product_id: string;
522
+ /**
523
+ * Whether or not to charge the customer a buyer fee.
524
+ */
525
+ charge_buyer_fee?: boolean | null;
526
+ /**
527
+ * The name of the customer to create this invoice for. This is required if you
528
+ * want to create an invoice for a customer who does not have a member of your
529
+ * company yet.
530
+ */
531
+ customer_name?: string | null;
532
+ /**
533
+ * The payment token ID to use for this invoice. If using charge_automatically, you
534
+ * must provide a payment_token.
535
+ */
536
+ payment_token_id?: string | null;
537
+ }
538
+ namespace CreateInvoiceInputWithProductIDAndEmailAddress {
539
+ /**
540
+ * The properties of the plan to create for this invoice.
541
+ */
542
+ interface Plan {
543
+ /**
544
+ * The interval at which the plan charges (renewal plans).
545
+ */
546
+ billing_period?: number | null;
547
+ /**
548
+ * An array of custom field objects.
549
+ */
550
+ custom_fields?: Array<Plan.CustomField> | null;
551
+ /**
552
+ * The description of the plan.
553
+ */
554
+ description?: string | null;
555
+ /**
556
+ * The interval at which the plan charges (expiration plans).
557
+ */
558
+ expiration_days?: number | null;
559
+ /**
560
+ * An additional amount charged upon first purchase. Use only if a one time payment
561
+ * OR you want to charge an additional amount on top of the renewal price. Provided
562
+ * as a number in dollars. Eg: 10.43 for $10.43
563
+ */
564
+ initial_price?: number | null;
565
+ /**
566
+ * A personal description or notes section for the business.
567
+ */
568
+ internal_notes?: string | null;
569
+ /**
570
+ * The type of plan that can be attached to an access pass
571
+ */
572
+ plan_type?: Shared.PlanType | null;
573
+ /**
574
+ * The methods of how a plan can be released.
575
+ */
576
+ release_method?: Shared.ReleaseMethod | null;
577
+ /**
578
+ * The amount the customer is charged every billing period. Use only if a recurring
579
+ * payment. Provided as a number in dollars. Eg: 10.43 for $10.43
580
+ */
581
+ renewal_price?: number | null;
582
+ /**
583
+ * The number of units available for purchase.
584
+ */
585
+ stock?: number | null;
586
+ /**
587
+ * The number of free trial days added before a renewal plan.
588
+ */
589
+ trial_period_days?: number | null;
590
+ /**
591
+ * Limits/doesn't limit the number of units available for purchase.
592
+ */
593
+ unlimited_stock?: boolean | null;
594
+ /**
595
+ * Visibility of a resource
596
+ */
597
+ visibility?: Shared.Visibility | null;
598
+ }
599
+ namespace Plan {
600
+ interface CustomField {
601
+ /**
602
+ * The type of the custom field.
603
+ */
604
+ field_type: 'text';
605
+ /**
606
+ * The name of the custom field.
607
+ */
608
+ name: string;
609
+ /**
610
+ * The ID of the custom field (if being updated)
611
+ */
612
+ id?: string | null;
613
+ /**
614
+ * The order of the field.
615
+ */
616
+ order?: number | null;
617
+ /**
618
+ * The placeholder value of the field.
619
+ */
620
+ placeholder?: string | null;
621
+ /**
622
+ * Whether or not the field is required.
623
+ */
624
+ required?: boolean | null;
625
+ }
626
+ }
244
627
  }
245
628
  }
246
629
  export interface InvoiceListParams extends CursorPageParams {
@@ -293,7 +676,7 @@ export declare namespace InvoiceListParams {
293
676
  }
294
677
  }
295
678
  export declare namespace Invoices {
296
- export { type InvoiceCreateResponse as InvoiceCreateResponse, type InvoiceVoidResponse as InvoiceVoidResponse, type InvoiceCreateParams as InvoiceCreateParams, type InvoiceListParams as InvoiceListParams, };
679
+ export { type InvoiceVoidResponse as InvoiceVoidResponse, type InvoiceCreateParams as InvoiceCreateParams, type InvoiceListParams as InvoiceListParams, };
297
680
  }
298
681
  export { type InvoiceListItemsCursorPage };
299
682
  //# sourceMappingURL=invoices.d.ts.map