@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
package/resources/invoices.d.mts
CHANGED
|
@@ -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<
|
|
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
|
|
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
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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
|
|
231
|
+
* The properties of the plan to create for this invoice.
|
|
157
232
|
*/
|
|
158
|
-
|
|
233
|
+
plan: CreateInvoiceInputWithProductAndEmailAddress.Plan;
|
|
159
234
|
/**
|
|
160
|
-
*
|
|
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
|
-
|
|
238
|
+
product: CreateInvoiceInputWithProductAndEmailAddress.Product;
|
|
163
239
|
/**
|
|
164
|
-
*
|
|
240
|
+
* Whether or not to charge the customer a buyer fee.
|
|
165
241
|
*/
|
|
166
|
-
|
|
242
|
+
charge_buyer_fee?: boolean | null;
|
|
167
243
|
/**
|
|
168
|
-
* The
|
|
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
|
-
|
|
248
|
+
customer_name?: string | null;
|
|
171
249
|
/**
|
|
172
|
-
*
|
|
173
|
-
*
|
|
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
|
-
|
|
253
|
+
payment_token_id?: string | null;
|
|
254
|
+
}
|
|
255
|
+
namespace CreateInvoiceInputWithProductAndEmailAddress {
|
|
177
256
|
/**
|
|
178
|
-
*
|
|
257
|
+
* The properties of the plan to create for this invoice.
|
|
179
258
|
*/
|
|
180
|
-
|
|
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
|
|
370
|
+
* The date the invoice is due, if applicable.
|
|
183
371
|
*/
|
|
184
|
-
|
|
372
|
+
due_date: string;
|
|
185
373
|
/**
|
|
186
|
-
* The
|
|
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
|
-
|
|
378
|
+
member_id: string;
|
|
189
379
|
/**
|
|
190
|
-
* The
|
|
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
|
-
|
|
382
|
+
plan: CreateInvoiceInputWithProductIDAndMemberID.Plan;
|
|
194
383
|
/**
|
|
195
|
-
* The
|
|
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
|
-
|
|
387
|
+
product_id: string;
|
|
198
388
|
/**
|
|
199
|
-
*
|
|
389
|
+
* Whether or not to charge the customer a buyer fee.
|
|
200
390
|
*/
|
|
201
|
-
|
|
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
|
|
204
|
-
|
|
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
|
|
440
|
+
* The methods of how a plan can be released.
|
|
207
441
|
*/
|
|
208
|
-
|
|
442
|
+
release_method?: Shared.ReleaseMethod | null;
|
|
209
443
|
/**
|
|
210
|
-
* The
|
|
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
|
-
|
|
447
|
+
renewal_price?: number | null;
|
|
213
448
|
/**
|
|
214
|
-
* The
|
|
449
|
+
* The number of units available for purchase.
|
|
215
450
|
*/
|
|
216
|
-
|
|
451
|
+
stock?: number | null;
|
|
217
452
|
/**
|
|
218
|
-
* The
|
|
453
|
+
* The number of free trial days added before a renewal plan.
|
|
219
454
|
*/
|
|
220
|
-
|
|
455
|
+
trial_period_days?: number | null;
|
|
221
456
|
/**
|
|
222
|
-
*
|
|
457
|
+
* Limits/doesn't limit the number of units available for purchase.
|
|
223
458
|
*/
|
|
224
|
-
|
|
459
|
+
unlimited_stock?: boolean | null;
|
|
225
460
|
/**
|
|
226
|
-
*
|
|
461
|
+
* Visibility of a resource
|
|
227
462
|
*/
|
|
228
|
-
|
|
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
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
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
|
|
505
|
+
* The date the invoice is due, if applicable.
|
|
238
506
|
*/
|
|
239
|
-
|
|
507
|
+
due_date: string;
|
|
240
508
|
/**
|
|
241
|
-
* The
|
|
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
|
-
|
|
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
|
|
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.mts.map
|