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