@usethrottle/api-client 6.3.0 → 6.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/index.d.ts +1 -0
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +1 -0
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/services/CartsService.d.ts +279 -0
- package/dist/generated/services/CartsService.d.ts.map +1 -1
- package/dist/generated/services/CartsService.js.map +1 -1
- package/dist/generated/services/CustomerInvoicesService.d.ts +3 -3
- package/dist/generated/services/CustomerInvoicesService.js +3 -3
- package/dist/generated/services/DefaultService.d.ts +22 -0
- package/dist/generated/services/DefaultService.d.ts.map +1 -1
- package/dist/generated/services/DefaultService.js.map +1 -1
- package/dist/generated/services/FeesService.d.ts +1023 -0
- package/dist/generated/services/FeesService.d.ts.map +1 -0
- package/dist/generated/services/FeesService.js +555 -0
- package/dist/generated/services/FeesService.js.map +1 -0
- package/dist/generated/services/OrdersService.d.ts +485 -0
- package/dist/generated/services/OrdersService.d.ts.map +1 -1
- package/dist/generated/services/OrdersService.js +1 -0
- package/dist/generated/services/OrdersService.js.map +1 -1
- package/dist/generated/services/QuotesService.d.ts +241 -0
- package/dist/generated/services/QuotesService.d.ts.map +1 -1
- package/dist/generated/services/QuotesService.js.map +1 -1
- package/dist/generated/services/SubscriptionsService.d.ts +390 -0
- package/dist/generated/services/SubscriptionsService.d.ts.map +1 -1
- package/dist/generated/services/SubscriptionsService.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,1023 @@
|
|
|
1
|
+
import type { CancelablePromise } from '../core/CancelablePromise.js';
|
|
2
|
+
export declare class FeesService {
|
|
3
|
+
/**
|
|
4
|
+
* List the environment's fee definitions in display order (archived fees excluded).
|
|
5
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
6
|
+
* @returns any Default Response
|
|
7
|
+
* @throws ApiError
|
|
8
|
+
*/
|
|
9
|
+
static getApiV1Fees(xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
10
|
+
data?: Array<{
|
|
11
|
+
id?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Shown to the buyer (with the rate for a percentage fee).
|
|
14
|
+
*/
|
|
15
|
+
name?: string;
|
|
16
|
+
kind?: 'percentage' | 'flat';
|
|
17
|
+
/**
|
|
18
|
+
* Percentage fees: 1..10000 (250 = 2.5%). `null` for a flat fee.
|
|
19
|
+
*/
|
|
20
|
+
rateBps?: number | null;
|
|
21
|
+
/**
|
|
22
|
+
* Flat fees: the amount, by ISO-4217 currency code, in minor units of that currency.
|
|
23
|
+
*/
|
|
24
|
+
flatAmounts?: Record<string, number>;
|
|
25
|
+
/**
|
|
26
|
+
* Smallest charge for a percentage fee, by ISO-4217 currency code, in minor units of that currency.
|
|
27
|
+
*/
|
|
28
|
+
minAmounts?: Record<string, number>;
|
|
29
|
+
/**
|
|
30
|
+
* Largest charge for a percentage fee, by ISO-4217 currency code, in minor units of that currency.
|
|
31
|
+
*/
|
|
32
|
+
maxAmounts?: Record<string, number>;
|
|
33
|
+
/**
|
|
34
|
+
* Smallest order (items after discounts) the fee applies to, by ISO-4217 currency code, in minor units of that currency.
|
|
35
|
+
*/
|
|
36
|
+
minOrderAmounts?: Record<string, number>;
|
|
37
|
+
taxable?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Tax code sent to Avalara for a taxable fee; the default item tax code when `null`.
|
|
40
|
+
*/
|
|
41
|
+
taxCode?: string | null;
|
|
42
|
+
/**
|
|
43
|
+
* Charge on one-time orders.
|
|
44
|
+
*/
|
|
45
|
+
appliesToOneTime?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Charge on subscriptions: at signup and on every renewal.
|
|
48
|
+
*/
|
|
49
|
+
appliesToSubscription?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* `null` or `[]`: every customer.
|
|
52
|
+
*/
|
|
53
|
+
customerGroupIds?: Array<string> | null;
|
|
54
|
+
/**
|
|
55
|
+
* An inactive fee is kept but never charged automatically.
|
|
56
|
+
*/
|
|
57
|
+
active?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Display order; fees are priced and shown in this order.
|
|
60
|
+
*/
|
|
61
|
+
sortOrder?: number;
|
|
62
|
+
createdAt?: string;
|
|
63
|
+
updatedAt?: string;
|
|
64
|
+
}>;
|
|
65
|
+
meta?: {
|
|
66
|
+
/**
|
|
67
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
68
|
+
*/
|
|
69
|
+
requestId?: string;
|
|
70
|
+
pagination?: {
|
|
71
|
+
cursor?: string | null;
|
|
72
|
+
hasMore?: boolean;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
}>;
|
|
76
|
+
/**
|
|
77
|
+
* Create a fee definition: name (1-100), kind (percentage|flat), rateBps (1..10000, percentage only), flatAmounts / minAmounts / maxAmounts / minOrderAmounts (currency code to minor units), taxable, taxCode, appliesToOneTime, appliesToSubscription, customerGroupIds (null or [] = every customer), active. Fees charge only while order fees are enabled (`PUT /api/v1/fees/settings`). Errors: 422 fee_invalid (`details.field` names the input), 400 for an unknown field.
|
|
78
|
+
* @param requestBody
|
|
79
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
80
|
+
* @returns any Default Response
|
|
81
|
+
* @throws ApiError
|
|
82
|
+
*/
|
|
83
|
+
static postApiV1Fees(requestBody: {
|
|
84
|
+
/**
|
|
85
|
+
* String, 1-100 characters.
|
|
86
|
+
*/
|
|
87
|
+
name?: any;
|
|
88
|
+
/**
|
|
89
|
+
* String: `percentage` or `flat`.
|
|
90
|
+
*/
|
|
91
|
+
kind?: any;
|
|
92
|
+
/**
|
|
93
|
+
* Integer, percentage fees only: 1..10000 (250 = 2.5%).
|
|
94
|
+
*/
|
|
95
|
+
rateBps?: any;
|
|
96
|
+
/**
|
|
97
|
+
* Object: ISO-4217 currency code to integer minor units. Flat fees: the amount.
|
|
98
|
+
*/
|
|
99
|
+
flatAmounts?: any;
|
|
100
|
+
/**
|
|
101
|
+
* Object: ISO-4217 currency code to integer minor units. Smallest charge for a percentage fee.
|
|
102
|
+
*/
|
|
103
|
+
minAmounts?: any;
|
|
104
|
+
/**
|
|
105
|
+
* Object: ISO-4217 currency code to integer minor units. Largest charge for a percentage fee.
|
|
106
|
+
*/
|
|
107
|
+
maxAmounts?: any;
|
|
108
|
+
/**
|
|
109
|
+
* Object: ISO-4217 currency code to integer minor units. Smallest order the fee applies to.
|
|
110
|
+
*/
|
|
111
|
+
minOrderAmounts?: any;
|
|
112
|
+
/**
|
|
113
|
+
* Boolean.
|
|
114
|
+
*/
|
|
115
|
+
taxable?: any;
|
|
116
|
+
/**
|
|
117
|
+
* String.
|
|
118
|
+
*/
|
|
119
|
+
taxCode?: any;
|
|
120
|
+
/**
|
|
121
|
+
* Boolean.
|
|
122
|
+
*/
|
|
123
|
+
appliesToOneTime?: any;
|
|
124
|
+
/**
|
|
125
|
+
* Boolean.
|
|
126
|
+
*/
|
|
127
|
+
appliesToSubscription?: any;
|
|
128
|
+
/**
|
|
129
|
+
* Array of customer group ids, or `null` / `[]` for every customer.
|
|
130
|
+
*/
|
|
131
|
+
customerGroupIds?: any;
|
|
132
|
+
/**
|
|
133
|
+
* Boolean.
|
|
134
|
+
*/
|
|
135
|
+
active?: any;
|
|
136
|
+
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
137
|
+
data?: {
|
|
138
|
+
id?: string;
|
|
139
|
+
/**
|
|
140
|
+
* Shown to the buyer (with the rate for a percentage fee).
|
|
141
|
+
*/
|
|
142
|
+
name?: string;
|
|
143
|
+
kind?: 'percentage' | 'flat';
|
|
144
|
+
/**
|
|
145
|
+
* Percentage fees: 1..10000 (250 = 2.5%). `null` for a flat fee.
|
|
146
|
+
*/
|
|
147
|
+
rateBps?: number | null;
|
|
148
|
+
/**
|
|
149
|
+
* Flat fees: the amount, by ISO-4217 currency code, in minor units of that currency.
|
|
150
|
+
*/
|
|
151
|
+
flatAmounts?: Record<string, number>;
|
|
152
|
+
/**
|
|
153
|
+
* Smallest charge for a percentage fee, by ISO-4217 currency code, in minor units of that currency.
|
|
154
|
+
*/
|
|
155
|
+
minAmounts?: Record<string, number>;
|
|
156
|
+
/**
|
|
157
|
+
* Largest charge for a percentage fee, by ISO-4217 currency code, in minor units of that currency.
|
|
158
|
+
*/
|
|
159
|
+
maxAmounts?: Record<string, number>;
|
|
160
|
+
/**
|
|
161
|
+
* Smallest order (items after discounts) the fee applies to, by ISO-4217 currency code, in minor units of that currency.
|
|
162
|
+
*/
|
|
163
|
+
minOrderAmounts?: Record<string, number>;
|
|
164
|
+
taxable?: boolean;
|
|
165
|
+
/**
|
|
166
|
+
* Tax code sent to Avalara for a taxable fee; the default item tax code when `null`.
|
|
167
|
+
*/
|
|
168
|
+
taxCode?: string | null;
|
|
169
|
+
/**
|
|
170
|
+
* Charge on one-time orders.
|
|
171
|
+
*/
|
|
172
|
+
appliesToOneTime?: boolean;
|
|
173
|
+
/**
|
|
174
|
+
* Charge on subscriptions: at signup and on every renewal.
|
|
175
|
+
*/
|
|
176
|
+
appliesToSubscription?: boolean;
|
|
177
|
+
/**
|
|
178
|
+
* `null` or `[]`: every customer.
|
|
179
|
+
*/
|
|
180
|
+
customerGroupIds?: Array<string> | null;
|
|
181
|
+
/**
|
|
182
|
+
* An inactive fee is kept but never charged automatically.
|
|
183
|
+
*/
|
|
184
|
+
active?: boolean;
|
|
185
|
+
/**
|
|
186
|
+
* Display order; fees are priced and shown in this order.
|
|
187
|
+
*/
|
|
188
|
+
sortOrder?: number;
|
|
189
|
+
createdAt?: string;
|
|
190
|
+
updatedAt?: string;
|
|
191
|
+
};
|
|
192
|
+
meta?: {
|
|
193
|
+
/**
|
|
194
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
195
|
+
*/
|
|
196
|
+
requestId?: string;
|
|
197
|
+
pagination?: {
|
|
198
|
+
cursor?: string | null;
|
|
199
|
+
hasMore?: boolean;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
}>;
|
|
203
|
+
/**
|
|
204
|
+
* Set the display order. `ids` must list every current fee exactly once, else 422 fee_invalid (`details.field` = `ids`).
|
|
205
|
+
* @param requestBody
|
|
206
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
207
|
+
* @returns any Default Response
|
|
208
|
+
* @throws ApiError
|
|
209
|
+
*/
|
|
210
|
+
static postApiV1FeesReorder(requestBody: {
|
|
211
|
+
/**
|
|
212
|
+
* Array of fee ids: every current fee exactly once.
|
|
213
|
+
*/
|
|
214
|
+
ids?: any;
|
|
215
|
+
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
216
|
+
data?: Array<{
|
|
217
|
+
id?: string;
|
|
218
|
+
/**
|
|
219
|
+
* Shown to the buyer (with the rate for a percentage fee).
|
|
220
|
+
*/
|
|
221
|
+
name?: string;
|
|
222
|
+
kind?: 'percentage' | 'flat';
|
|
223
|
+
/**
|
|
224
|
+
* Percentage fees: 1..10000 (250 = 2.5%). `null` for a flat fee.
|
|
225
|
+
*/
|
|
226
|
+
rateBps?: number | null;
|
|
227
|
+
/**
|
|
228
|
+
* Flat fees: the amount, by ISO-4217 currency code, in minor units of that currency.
|
|
229
|
+
*/
|
|
230
|
+
flatAmounts?: Record<string, number>;
|
|
231
|
+
/**
|
|
232
|
+
* Smallest charge for a percentage fee, by ISO-4217 currency code, in minor units of that currency.
|
|
233
|
+
*/
|
|
234
|
+
minAmounts?: Record<string, number>;
|
|
235
|
+
/**
|
|
236
|
+
* Largest charge for a percentage fee, by ISO-4217 currency code, in minor units of that currency.
|
|
237
|
+
*/
|
|
238
|
+
maxAmounts?: Record<string, number>;
|
|
239
|
+
/**
|
|
240
|
+
* Smallest order (items after discounts) the fee applies to, by ISO-4217 currency code, in minor units of that currency.
|
|
241
|
+
*/
|
|
242
|
+
minOrderAmounts?: Record<string, number>;
|
|
243
|
+
taxable?: boolean;
|
|
244
|
+
/**
|
|
245
|
+
* Tax code sent to Avalara for a taxable fee; the default item tax code when `null`.
|
|
246
|
+
*/
|
|
247
|
+
taxCode?: string | null;
|
|
248
|
+
/**
|
|
249
|
+
* Charge on one-time orders.
|
|
250
|
+
*/
|
|
251
|
+
appliesToOneTime?: boolean;
|
|
252
|
+
/**
|
|
253
|
+
* Charge on subscriptions: at signup and on every renewal.
|
|
254
|
+
*/
|
|
255
|
+
appliesToSubscription?: boolean;
|
|
256
|
+
/**
|
|
257
|
+
* `null` or `[]`: every customer.
|
|
258
|
+
*/
|
|
259
|
+
customerGroupIds?: Array<string> | null;
|
|
260
|
+
/**
|
|
261
|
+
* An inactive fee is kept but never charged automatically.
|
|
262
|
+
*/
|
|
263
|
+
active?: boolean;
|
|
264
|
+
/**
|
|
265
|
+
* Display order; fees are priced and shown in this order.
|
|
266
|
+
*/
|
|
267
|
+
sortOrder?: number;
|
|
268
|
+
createdAt?: string;
|
|
269
|
+
updatedAt?: string;
|
|
270
|
+
}>;
|
|
271
|
+
meta?: {
|
|
272
|
+
/**
|
|
273
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
274
|
+
*/
|
|
275
|
+
requestId?: string;
|
|
276
|
+
pagination?: {
|
|
277
|
+
cursor?: string | null;
|
|
278
|
+
hasMore?: boolean;
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
}>;
|
|
282
|
+
/**
|
|
283
|
+
* Whether order fees are enabled for this environment. This flag is a kill switch: while it is off nothing is charged, and new orders, carts and quotes read `fees: []` and `feeTotal: 0` (a subscription keeps its stored snapshot; orders, payment links and invoices already created keep their fees). `available` says whether this application may turn fees on yet.
|
|
284
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
285
|
+
* @returns any Default Response
|
|
286
|
+
* @throws ApiError
|
|
287
|
+
*/
|
|
288
|
+
static getApiV1FeesSettings(xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
289
|
+
data?: {
|
|
290
|
+
enabled?: boolean;
|
|
291
|
+
/**
|
|
292
|
+
* Whether order fees can be turned on for this application. When false, `PUT` with `enabled: true` answers 403 `fees_not_available`.
|
|
293
|
+
*/
|
|
294
|
+
available?: boolean;
|
|
295
|
+
};
|
|
296
|
+
meta?: {
|
|
297
|
+
/**
|
|
298
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
299
|
+
*/
|
|
300
|
+
requestId?: string;
|
|
301
|
+
pagination?: {
|
|
302
|
+
cursor?: string | null;
|
|
303
|
+
hasMore?: boolean;
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
}>;
|
|
307
|
+
/**
|
|
308
|
+
* Enable or disable order fees for this environment. Other settings are untouched. Turning fees off stops charging at once, including on already-issued quotes and on renewals; orders, payment links and invoices already created keep their fees. Turning fees on answers 403 `fees_not_available` while fees are not available for the application yet (`available: false` on GET); turning them off is always allowed.
|
|
309
|
+
* @param requestBody
|
|
310
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
311
|
+
* @returns any Default Response
|
|
312
|
+
* @throws ApiError
|
|
313
|
+
*/
|
|
314
|
+
static putApiV1FeesSettings(requestBody: {
|
|
315
|
+
/**
|
|
316
|
+
* Boolean (a string such as "false" is refused).
|
|
317
|
+
*/
|
|
318
|
+
enabled?: any;
|
|
319
|
+
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
320
|
+
data?: {
|
|
321
|
+
enabled?: boolean;
|
|
322
|
+
};
|
|
323
|
+
meta?: {
|
|
324
|
+
/**
|
|
325
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
326
|
+
*/
|
|
327
|
+
requestId?: string;
|
|
328
|
+
pagination?: {
|
|
329
|
+
cursor?: string | null;
|
|
330
|
+
hasMore?: boolean;
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
}>;
|
|
334
|
+
/**
|
|
335
|
+
* Update a fee definition (any subset of the create fields). Documents that already froze the fee keep their rows. Errors: 422 fee_invalid, 404 not_found, 400 for an unknown field.
|
|
336
|
+
* @param id Fee definition id (UUID).
|
|
337
|
+
* @param requestBody
|
|
338
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
339
|
+
* @returns any Default Response
|
|
340
|
+
* @throws ApiError
|
|
341
|
+
*/
|
|
342
|
+
static patchApiV1Fees(id: string, requestBody: {
|
|
343
|
+
/**
|
|
344
|
+
* String, 1-100 characters.
|
|
345
|
+
*/
|
|
346
|
+
name?: any;
|
|
347
|
+
/**
|
|
348
|
+
* String: `percentage` or `flat`.
|
|
349
|
+
*/
|
|
350
|
+
kind?: any;
|
|
351
|
+
/**
|
|
352
|
+
* Integer, percentage fees only: 1..10000 (250 = 2.5%).
|
|
353
|
+
*/
|
|
354
|
+
rateBps?: any;
|
|
355
|
+
/**
|
|
356
|
+
* Object: ISO-4217 currency code to integer minor units. Flat fees: the amount.
|
|
357
|
+
*/
|
|
358
|
+
flatAmounts?: any;
|
|
359
|
+
/**
|
|
360
|
+
* Object: ISO-4217 currency code to integer minor units. Smallest charge for a percentage fee.
|
|
361
|
+
*/
|
|
362
|
+
minAmounts?: any;
|
|
363
|
+
/**
|
|
364
|
+
* Object: ISO-4217 currency code to integer minor units. Largest charge for a percentage fee.
|
|
365
|
+
*/
|
|
366
|
+
maxAmounts?: any;
|
|
367
|
+
/**
|
|
368
|
+
* Object: ISO-4217 currency code to integer minor units. Smallest order the fee applies to.
|
|
369
|
+
*/
|
|
370
|
+
minOrderAmounts?: any;
|
|
371
|
+
/**
|
|
372
|
+
* Boolean.
|
|
373
|
+
*/
|
|
374
|
+
taxable?: any;
|
|
375
|
+
/**
|
|
376
|
+
* String.
|
|
377
|
+
*/
|
|
378
|
+
taxCode?: any;
|
|
379
|
+
/**
|
|
380
|
+
* Boolean.
|
|
381
|
+
*/
|
|
382
|
+
appliesToOneTime?: any;
|
|
383
|
+
/**
|
|
384
|
+
* Boolean.
|
|
385
|
+
*/
|
|
386
|
+
appliesToSubscription?: any;
|
|
387
|
+
/**
|
|
388
|
+
* Array of customer group ids, or `null` / `[]` for every customer.
|
|
389
|
+
*/
|
|
390
|
+
customerGroupIds?: any;
|
|
391
|
+
/**
|
|
392
|
+
* Boolean.
|
|
393
|
+
*/
|
|
394
|
+
active?: any;
|
|
395
|
+
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
396
|
+
data?: {
|
|
397
|
+
id?: string;
|
|
398
|
+
/**
|
|
399
|
+
* Shown to the buyer (with the rate for a percentage fee).
|
|
400
|
+
*/
|
|
401
|
+
name?: string;
|
|
402
|
+
kind?: 'percentage' | 'flat';
|
|
403
|
+
/**
|
|
404
|
+
* Percentage fees: 1..10000 (250 = 2.5%). `null` for a flat fee.
|
|
405
|
+
*/
|
|
406
|
+
rateBps?: number | null;
|
|
407
|
+
/**
|
|
408
|
+
* Flat fees: the amount, by ISO-4217 currency code, in minor units of that currency.
|
|
409
|
+
*/
|
|
410
|
+
flatAmounts?: Record<string, number>;
|
|
411
|
+
/**
|
|
412
|
+
* Smallest charge for a percentage fee, by ISO-4217 currency code, in minor units of that currency.
|
|
413
|
+
*/
|
|
414
|
+
minAmounts?: Record<string, number>;
|
|
415
|
+
/**
|
|
416
|
+
* Largest charge for a percentage fee, by ISO-4217 currency code, in minor units of that currency.
|
|
417
|
+
*/
|
|
418
|
+
maxAmounts?: Record<string, number>;
|
|
419
|
+
/**
|
|
420
|
+
* Smallest order (items after discounts) the fee applies to, by ISO-4217 currency code, in minor units of that currency.
|
|
421
|
+
*/
|
|
422
|
+
minOrderAmounts?: Record<string, number>;
|
|
423
|
+
taxable?: boolean;
|
|
424
|
+
/**
|
|
425
|
+
* Tax code sent to Avalara for a taxable fee; the default item tax code when `null`.
|
|
426
|
+
*/
|
|
427
|
+
taxCode?: string | null;
|
|
428
|
+
/**
|
|
429
|
+
* Charge on one-time orders.
|
|
430
|
+
*/
|
|
431
|
+
appliesToOneTime?: boolean;
|
|
432
|
+
/**
|
|
433
|
+
* Charge on subscriptions: at signup and on every renewal.
|
|
434
|
+
*/
|
|
435
|
+
appliesToSubscription?: boolean;
|
|
436
|
+
/**
|
|
437
|
+
* `null` or `[]`: every customer.
|
|
438
|
+
*/
|
|
439
|
+
customerGroupIds?: Array<string> | null;
|
|
440
|
+
/**
|
|
441
|
+
* An inactive fee is kept but never charged automatically.
|
|
442
|
+
*/
|
|
443
|
+
active?: boolean;
|
|
444
|
+
/**
|
|
445
|
+
* Display order; fees are priced and shown in this order.
|
|
446
|
+
*/
|
|
447
|
+
sortOrder?: number;
|
|
448
|
+
createdAt?: string;
|
|
449
|
+
updatedAt?: string;
|
|
450
|
+
};
|
|
451
|
+
meta?: {
|
|
452
|
+
/**
|
|
453
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
454
|
+
*/
|
|
455
|
+
requestId?: string;
|
|
456
|
+
pagination?: {
|
|
457
|
+
cursor?: string | null;
|
|
458
|
+
hasMore?: boolean;
|
|
459
|
+
};
|
|
460
|
+
};
|
|
461
|
+
}>;
|
|
462
|
+
/**
|
|
463
|
+
* Archive a fee definition. Documents that already froze it keep their rows. 404 not_found for an unknown or already archived id.
|
|
464
|
+
* @param id Fee definition id (UUID).
|
|
465
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
466
|
+
* @returns any Default Response
|
|
467
|
+
* @throws ApiError
|
|
468
|
+
*/
|
|
469
|
+
static deleteApiV1Fees(id: string, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
470
|
+
data?: {
|
|
471
|
+
id?: string;
|
|
472
|
+
/**
|
|
473
|
+
* Shown to the buyer (with the rate for a percentage fee).
|
|
474
|
+
*/
|
|
475
|
+
name?: string;
|
|
476
|
+
kind?: 'percentage' | 'flat';
|
|
477
|
+
/**
|
|
478
|
+
* Percentage fees: 1..10000 (250 = 2.5%). `null` for a flat fee.
|
|
479
|
+
*/
|
|
480
|
+
rateBps?: number | null;
|
|
481
|
+
/**
|
|
482
|
+
* Flat fees: the amount, by ISO-4217 currency code, in minor units of that currency.
|
|
483
|
+
*/
|
|
484
|
+
flatAmounts?: Record<string, number>;
|
|
485
|
+
/**
|
|
486
|
+
* Smallest charge for a percentage fee, by ISO-4217 currency code, in minor units of that currency.
|
|
487
|
+
*/
|
|
488
|
+
minAmounts?: Record<string, number>;
|
|
489
|
+
/**
|
|
490
|
+
* Largest charge for a percentage fee, by ISO-4217 currency code, in minor units of that currency.
|
|
491
|
+
*/
|
|
492
|
+
maxAmounts?: Record<string, number>;
|
|
493
|
+
/**
|
|
494
|
+
* Smallest order (items after discounts) the fee applies to, by ISO-4217 currency code, in minor units of that currency.
|
|
495
|
+
*/
|
|
496
|
+
minOrderAmounts?: Record<string, number>;
|
|
497
|
+
taxable?: boolean;
|
|
498
|
+
/**
|
|
499
|
+
* Tax code sent to Avalara for a taxable fee; the default item tax code when `null`.
|
|
500
|
+
*/
|
|
501
|
+
taxCode?: string | null;
|
|
502
|
+
/**
|
|
503
|
+
* Charge on one-time orders.
|
|
504
|
+
*/
|
|
505
|
+
appliesToOneTime?: boolean;
|
|
506
|
+
/**
|
|
507
|
+
* Charge on subscriptions: at signup and on every renewal.
|
|
508
|
+
*/
|
|
509
|
+
appliesToSubscription?: boolean;
|
|
510
|
+
/**
|
|
511
|
+
* `null` or `[]`: every customer.
|
|
512
|
+
*/
|
|
513
|
+
customerGroupIds?: Array<string> | null;
|
|
514
|
+
/**
|
|
515
|
+
* An inactive fee is kept but never charged automatically.
|
|
516
|
+
*/
|
|
517
|
+
active?: boolean;
|
|
518
|
+
/**
|
|
519
|
+
* Display order; fees are priced and shown in this order.
|
|
520
|
+
*/
|
|
521
|
+
sortOrder?: number;
|
|
522
|
+
createdAt?: string;
|
|
523
|
+
updatedAt?: string;
|
|
524
|
+
};
|
|
525
|
+
meta?: {
|
|
526
|
+
/**
|
|
527
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
528
|
+
*/
|
|
529
|
+
requestId?: string;
|
|
530
|
+
pagination?: {
|
|
531
|
+
cursor?: string | null;
|
|
532
|
+
hasMore?: boolean;
|
|
533
|
+
};
|
|
534
|
+
};
|
|
535
|
+
}>;
|
|
536
|
+
/**
|
|
537
|
+
* Add a fee to this cart: `{ feeDefinitionId }` for a global fee, or a custom fee (`name`, `kind`, `rateBps` | `flatAmount`, `taxable`, ...). Returns the cart with its totals recomputed. Merchant credentials only: the route needs `orders:write` plus the `application:orders:write` permission (quote revision routes: `quotes:write` plus `application:quotes:write`; subscription routes: `subscriptions:write` plus `application:orders:write`). Publishable keys, extension sessions and payment-method tokens answer 403 `permission_denied`. Errors: 409 `fees_locked` (money is on the document: an order with a payment, an order that is not draft or awaiting payment, a comped order, a cart that became an order, an issued quote revision), 409 `fee_already_added` (adding a global fee the document already has), 409 `order_has_cart` (the order is priced from a cart whose fees were never frozen, such as a connector snapshot order, so a fee set on it would not survive payment), 409 `fees_disabled` (order fees are turned off; removing a fee is still allowed on an order without a cart and on a subscription), 422 `fee_invalid` (`details.field` names the input; a taxable fee on a direct order), 422 `fee_recalculation_failed` (tax or pricing could not be re-run; nothing changed), 422 for a fee in a different currency than the document, 400 `validation_error` for an unknown field, 404 `not_found`.
|
|
538
|
+
* @param id The cart, order or quote id (UUID).
|
|
539
|
+
* @param requestBody
|
|
540
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
541
|
+
* @returns any Default Response
|
|
542
|
+
* @throws ApiError
|
|
543
|
+
*/
|
|
544
|
+
static postApiV1CartsFees(id: string, requestBody: {
|
|
545
|
+
/**
|
|
546
|
+
* String. Add a global fee by id. Send it alone, or send the custom-fee fields instead.
|
|
547
|
+
*/
|
|
548
|
+
feeDefinitionId?: any;
|
|
549
|
+
/**
|
|
550
|
+
* String, 1-100 characters.
|
|
551
|
+
*/
|
|
552
|
+
name?: any;
|
|
553
|
+
/**
|
|
554
|
+
* String: `percentage` or `flat`.
|
|
555
|
+
*/
|
|
556
|
+
kind?: any;
|
|
557
|
+
/**
|
|
558
|
+
* Integer, percentage fees: 1..10000.
|
|
559
|
+
*/
|
|
560
|
+
rateBps?: any;
|
|
561
|
+
/**
|
|
562
|
+
* Integer, flat fees: minor units of the document currency.
|
|
563
|
+
*/
|
|
564
|
+
flatAmount?: any;
|
|
565
|
+
/**
|
|
566
|
+
* Boolean. Default false.
|
|
567
|
+
*/
|
|
568
|
+
taxable?: any;
|
|
569
|
+
/**
|
|
570
|
+
* String.
|
|
571
|
+
*/
|
|
572
|
+
taxCode?: any;
|
|
573
|
+
/**
|
|
574
|
+
* Boolean. Default true.
|
|
575
|
+
*/
|
|
576
|
+
appliesToOneTime?: any;
|
|
577
|
+
/**
|
|
578
|
+
* Boolean. Default false.
|
|
579
|
+
*/
|
|
580
|
+
appliesToSubscription?: any;
|
|
581
|
+
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
582
|
+
/**
|
|
583
|
+
* The cart, with `fees`, `feeTotal` and its other totals recomputed.
|
|
584
|
+
*/
|
|
585
|
+
data?: Record<string, any>;
|
|
586
|
+
meta?: {
|
|
587
|
+
/**
|
|
588
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
589
|
+
*/
|
|
590
|
+
requestId?: string;
|
|
591
|
+
pagination?: {
|
|
592
|
+
cursor?: string | null;
|
|
593
|
+
hasMore?: boolean;
|
|
594
|
+
};
|
|
595
|
+
};
|
|
596
|
+
}>;
|
|
597
|
+
/**
|
|
598
|
+
* Change the rate (`rateBps`) or amount (`flatAmount`) of one fee on this cart only. Returns the cart with totals recomputed. Merchant credentials only: the route needs `orders:write` plus the `application:orders:write` permission (quote revision routes: `quotes:write` plus `application:quotes:write`; subscription routes: `subscriptions:write` plus `application:orders:write`). Publishable keys, extension sessions and payment-method tokens answer 403 `permission_denied`. Errors: 409 `fees_locked` (money is on the document: an order with a payment, an order that is not draft or awaiting payment, a comped order, a cart that became an order, an issued quote revision), 409 `fee_already_added` (adding a global fee the document already has), 409 `order_has_cart` (the order is priced from a cart whose fees were never frozen, such as a connector snapshot order, so a fee set on it would not survive payment), 409 `fees_disabled` (order fees are turned off; removing a fee is still allowed on an order without a cart and on a subscription), 422 `fee_invalid` (`details.field` names the input; a taxable fee on a direct order), 422 `fee_recalculation_failed` (tax or pricing could not be re-run; nothing changed), 422 for a fee in a different currency than the document, 400 `validation_error` for an unknown field, 404 `not_found`.
|
|
599
|
+
* @param id
|
|
600
|
+
* @param feeId The fee row id on this document (the `id` inside `fees`).
|
|
601
|
+
* @param requestBody
|
|
602
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
603
|
+
* @returns any Default Response
|
|
604
|
+
* @throws ApiError
|
|
605
|
+
*/
|
|
606
|
+
static patchApiV1CartsFees(id: string, feeId: string, requestBody: {
|
|
607
|
+
/**
|
|
608
|
+
* Integer: new rate for a percentage fee (1..10000), this document only.
|
|
609
|
+
*/
|
|
610
|
+
rateBps?: any;
|
|
611
|
+
/**
|
|
612
|
+
* Integer: new amount for a flat fee (minor units), this document only.
|
|
613
|
+
*/
|
|
614
|
+
flatAmount?: any;
|
|
615
|
+
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
616
|
+
/**
|
|
617
|
+
* The cart, with `fees`, `feeTotal` and its other totals recomputed.
|
|
618
|
+
*/
|
|
619
|
+
data?: Record<string, any>;
|
|
620
|
+
meta?: {
|
|
621
|
+
/**
|
|
622
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
623
|
+
*/
|
|
624
|
+
requestId?: string;
|
|
625
|
+
pagination?: {
|
|
626
|
+
cursor?: string | null;
|
|
627
|
+
hasMore?: boolean;
|
|
628
|
+
};
|
|
629
|
+
};
|
|
630
|
+
}>;
|
|
631
|
+
/**
|
|
632
|
+
* Remove a fee from this cart (kept as a removed row, so automatic fees do not come back). Returns the cart. Merchant credentials only: the route needs `orders:write` plus the `application:orders:write` permission (quote revision routes: `quotes:write` plus `application:quotes:write`; subscription routes: `subscriptions:write` plus `application:orders:write`). Publishable keys, extension sessions and payment-method tokens answer 403 `permission_denied`. Errors: 409 `fees_locked` (money is on the document: an order with a payment, an order that is not draft or awaiting payment, a comped order, a cart that became an order, an issued quote revision), 409 `fee_already_added` (adding a global fee the document already has), 409 `order_has_cart` (the order is priced from a cart whose fees were never frozen, such as a connector snapshot order, so a fee set on it would not survive payment), 409 `fees_disabled` (order fees are turned off; removing a fee is still allowed on an order without a cart and on a subscription), 422 `fee_invalid` (`details.field` names the input; a taxable fee on a direct order), 422 `fee_recalculation_failed` (tax or pricing could not be re-run; nothing changed), 422 for a fee in a different currency than the document, 400 `validation_error` for an unknown field, 404 `not_found`.
|
|
633
|
+
* @param id
|
|
634
|
+
* @param feeId The fee row id on this document (the `id` inside `fees`).
|
|
635
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
636
|
+
* @returns any Default Response
|
|
637
|
+
* @throws ApiError
|
|
638
|
+
*/
|
|
639
|
+
static deleteApiV1CartsFees(id: string, feeId: string, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
640
|
+
/**
|
|
641
|
+
* The cart, with `fees`, `feeTotal` and its other totals recomputed.
|
|
642
|
+
*/
|
|
643
|
+
data?: Record<string, any>;
|
|
644
|
+
meta?: {
|
|
645
|
+
/**
|
|
646
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
647
|
+
*/
|
|
648
|
+
requestId?: string;
|
|
649
|
+
pagination?: {
|
|
650
|
+
cursor?: string | null;
|
|
651
|
+
hasMore?: boolean;
|
|
652
|
+
};
|
|
653
|
+
};
|
|
654
|
+
}>;
|
|
655
|
+
/**
|
|
656
|
+
* Bring a removed fee back. Returns the cart. Merchant credentials only: the route needs `orders:write` plus the `application:orders:write` permission (quote revision routes: `quotes:write` plus `application:quotes:write`; subscription routes: `subscriptions:write` plus `application:orders:write`). Publishable keys, extension sessions and payment-method tokens answer 403 `permission_denied`. Errors: 409 `fees_locked` (money is on the document: an order with a payment, an order that is not draft or awaiting payment, a comped order, a cart that became an order, an issued quote revision), 409 `fee_already_added` (adding a global fee the document already has), 409 `order_has_cart` (the order is priced from a cart whose fees were never frozen, such as a connector snapshot order, so a fee set on it would not survive payment), 409 `fees_disabled` (order fees are turned off; removing a fee is still allowed on an order without a cart and on a subscription), 422 `fee_invalid` (`details.field` names the input; a taxable fee on a direct order), 422 `fee_recalculation_failed` (tax or pricing could not be re-run; nothing changed), 422 for a fee in a different currency than the document, 400 `validation_error` for an unknown field, 404 `not_found`.
|
|
657
|
+
* @param id
|
|
658
|
+
* @param feeId The fee row id on this document (the `id` inside `fees`).
|
|
659
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
660
|
+
* @returns any Default Response
|
|
661
|
+
* @throws ApiError
|
|
662
|
+
*/
|
|
663
|
+
static postApiV1CartsFeesRestore(id: string, feeId: string, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
664
|
+
/**
|
|
665
|
+
* The cart, with `fees`, `feeTotal` and its other totals recomputed.
|
|
666
|
+
*/
|
|
667
|
+
data?: Record<string, any>;
|
|
668
|
+
meta?: {
|
|
669
|
+
/**
|
|
670
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
671
|
+
*/
|
|
672
|
+
requestId?: string;
|
|
673
|
+
pagination?: {
|
|
674
|
+
cursor?: string | null;
|
|
675
|
+
hasMore?: boolean;
|
|
676
|
+
};
|
|
677
|
+
};
|
|
678
|
+
}>;
|
|
679
|
+
/**
|
|
680
|
+
* Add a fee to this order: `{ feeDefinitionId }` for a global fee, or a custom fee (`name`, `kind`, `rateBps` | `flatAmount`, `taxable`, ...). Returns the order with its totals recomputed. Merchant credentials only: the route needs `orders:write` plus the `application:orders:write` permission (quote revision routes: `quotes:write` plus `application:quotes:write`; subscription routes: `subscriptions:write` plus `application:orders:write`). Publishable keys, extension sessions and payment-method tokens answer 403 `permission_denied`. Errors: 409 `fees_locked` (money is on the document: an order with a payment, an order that is not draft or awaiting payment, a comped order, a cart that became an order, an issued quote revision), 409 `fee_already_added` (adding a global fee the document already has), 409 `order_has_cart` (the order is priced from a cart whose fees were never frozen, such as a connector snapshot order, so a fee set on it would not survive payment), 409 `fees_disabled` (order fees are turned off; removing a fee is still allowed on an order without a cart and on a subscription), 422 `fee_invalid` (`details.field` names the input; a taxable fee on a direct order), 422 `fee_recalculation_failed` (tax or pricing could not be re-run; nothing changed), 422 for a fee in a different currency than the document, 400 `validation_error` for an unknown field, 404 `not_found`.
|
|
681
|
+
* @param id The cart, order or quote id (UUID).
|
|
682
|
+
* @param requestBody
|
|
683
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
684
|
+
* @returns any Default Response
|
|
685
|
+
* @throws ApiError
|
|
686
|
+
*/
|
|
687
|
+
static postApiV1OrdersFees(id: string, requestBody: {
|
|
688
|
+
/**
|
|
689
|
+
* String. Add a global fee by id. Send it alone, or send the custom-fee fields instead.
|
|
690
|
+
*/
|
|
691
|
+
feeDefinitionId?: any;
|
|
692
|
+
/**
|
|
693
|
+
* String, 1-100 characters.
|
|
694
|
+
*/
|
|
695
|
+
name?: any;
|
|
696
|
+
/**
|
|
697
|
+
* String: `percentage` or `flat`.
|
|
698
|
+
*/
|
|
699
|
+
kind?: any;
|
|
700
|
+
/**
|
|
701
|
+
* Integer, percentage fees: 1..10000.
|
|
702
|
+
*/
|
|
703
|
+
rateBps?: any;
|
|
704
|
+
/**
|
|
705
|
+
* Integer, flat fees: minor units of the document currency.
|
|
706
|
+
*/
|
|
707
|
+
flatAmount?: any;
|
|
708
|
+
/**
|
|
709
|
+
* Boolean. Default false.
|
|
710
|
+
*/
|
|
711
|
+
taxable?: any;
|
|
712
|
+
/**
|
|
713
|
+
* String.
|
|
714
|
+
*/
|
|
715
|
+
taxCode?: any;
|
|
716
|
+
/**
|
|
717
|
+
* Boolean. Default true.
|
|
718
|
+
*/
|
|
719
|
+
appliesToOneTime?: any;
|
|
720
|
+
/**
|
|
721
|
+
* Boolean. Default false.
|
|
722
|
+
*/
|
|
723
|
+
appliesToSubscription?: any;
|
|
724
|
+
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
725
|
+
/**
|
|
726
|
+
* The order, with `fees`, `feeTotal` and its other totals recomputed.
|
|
727
|
+
*/
|
|
728
|
+
data?: Record<string, any>;
|
|
729
|
+
meta?: {
|
|
730
|
+
/**
|
|
731
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
732
|
+
*/
|
|
733
|
+
requestId?: string;
|
|
734
|
+
pagination?: {
|
|
735
|
+
cursor?: string | null;
|
|
736
|
+
hasMore?: boolean;
|
|
737
|
+
};
|
|
738
|
+
};
|
|
739
|
+
}>;
|
|
740
|
+
/**
|
|
741
|
+
* Change the rate (`rateBps`) or amount (`flatAmount`) of one fee on this order only. Returns the order with totals recomputed. Merchant credentials only: the route needs `orders:write` plus the `application:orders:write` permission (quote revision routes: `quotes:write` plus `application:quotes:write`; subscription routes: `subscriptions:write` plus `application:orders:write`). Publishable keys, extension sessions and payment-method tokens answer 403 `permission_denied`. Errors: 409 `fees_locked` (money is on the document: an order with a payment, an order that is not draft or awaiting payment, a comped order, a cart that became an order, an issued quote revision), 409 `fee_already_added` (adding a global fee the document already has), 409 `order_has_cart` (the order is priced from a cart whose fees were never frozen, such as a connector snapshot order, so a fee set on it would not survive payment), 409 `fees_disabled` (order fees are turned off; removing a fee is still allowed on an order without a cart and on a subscription), 422 `fee_invalid` (`details.field` names the input; a taxable fee on a direct order), 422 `fee_recalculation_failed` (tax or pricing could not be re-run; nothing changed), 422 for a fee in a different currency than the document, 400 `validation_error` for an unknown field, 404 `not_found`.
|
|
742
|
+
* @param id
|
|
743
|
+
* @param feeId The fee row id on this document (the `id` inside `fees`).
|
|
744
|
+
* @param requestBody
|
|
745
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
746
|
+
* @returns any Default Response
|
|
747
|
+
* @throws ApiError
|
|
748
|
+
*/
|
|
749
|
+
static patchApiV1OrdersFees(id: string, feeId: string, requestBody: {
|
|
750
|
+
/**
|
|
751
|
+
* Integer: new rate for a percentage fee (1..10000), this document only.
|
|
752
|
+
*/
|
|
753
|
+
rateBps?: any;
|
|
754
|
+
/**
|
|
755
|
+
* Integer: new amount for a flat fee (minor units), this document only.
|
|
756
|
+
*/
|
|
757
|
+
flatAmount?: any;
|
|
758
|
+
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
759
|
+
/**
|
|
760
|
+
* The order, with `fees`, `feeTotal` and its other totals recomputed.
|
|
761
|
+
*/
|
|
762
|
+
data?: Record<string, any>;
|
|
763
|
+
meta?: {
|
|
764
|
+
/**
|
|
765
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
766
|
+
*/
|
|
767
|
+
requestId?: string;
|
|
768
|
+
pagination?: {
|
|
769
|
+
cursor?: string | null;
|
|
770
|
+
hasMore?: boolean;
|
|
771
|
+
};
|
|
772
|
+
};
|
|
773
|
+
}>;
|
|
774
|
+
/**
|
|
775
|
+
* Remove a fee from this order (kept as a removed row, so automatic fees do not come back). Returns the order. Merchant credentials only: the route needs `orders:write` plus the `application:orders:write` permission (quote revision routes: `quotes:write` plus `application:quotes:write`; subscription routes: `subscriptions:write` plus `application:orders:write`). Publishable keys, extension sessions and payment-method tokens answer 403 `permission_denied`. Errors: 409 `fees_locked` (money is on the document: an order with a payment, an order that is not draft or awaiting payment, a comped order, a cart that became an order, an issued quote revision), 409 `fee_already_added` (adding a global fee the document already has), 409 `order_has_cart` (the order is priced from a cart whose fees were never frozen, such as a connector snapshot order, so a fee set on it would not survive payment), 409 `fees_disabled` (order fees are turned off; removing a fee is still allowed on an order without a cart and on a subscription), 422 `fee_invalid` (`details.field` names the input; a taxable fee on a direct order), 422 `fee_recalculation_failed` (tax or pricing could not be re-run; nothing changed), 422 for a fee in a different currency than the document, 400 `validation_error` for an unknown field, 404 `not_found`.
|
|
776
|
+
* @param id
|
|
777
|
+
* @param feeId The fee row id on this document (the `id` inside `fees`).
|
|
778
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
779
|
+
* @returns any Default Response
|
|
780
|
+
* @throws ApiError
|
|
781
|
+
*/
|
|
782
|
+
static deleteApiV1OrdersFees(id: string, feeId: string, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
783
|
+
/**
|
|
784
|
+
* The order, with `fees`, `feeTotal` and its other totals recomputed.
|
|
785
|
+
*/
|
|
786
|
+
data?: Record<string, any>;
|
|
787
|
+
meta?: {
|
|
788
|
+
/**
|
|
789
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
790
|
+
*/
|
|
791
|
+
requestId?: string;
|
|
792
|
+
pagination?: {
|
|
793
|
+
cursor?: string | null;
|
|
794
|
+
hasMore?: boolean;
|
|
795
|
+
};
|
|
796
|
+
};
|
|
797
|
+
}>;
|
|
798
|
+
/**
|
|
799
|
+
* Bring a removed fee back. Returns the order. Merchant credentials only: the route needs `orders:write` plus the `application:orders:write` permission (quote revision routes: `quotes:write` plus `application:quotes:write`; subscription routes: `subscriptions:write` plus `application:orders:write`). Publishable keys, extension sessions and payment-method tokens answer 403 `permission_denied`. Errors: 409 `fees_locked` (money is on the document: an order with a payment, an order that is not draft or awaiting payment, a comped order, a cart that became an order, an issued quote revision), 409 `fee_already_added` (adding a global fee the document already has), 409 `order_has_cart` (the order is priced from a cart whose fees were never frozen, such as a connector snapshot order, so a fee set on it would not survive payment), 409 `fees_disabled` (order fees are turned off; removing a fee is still allowed on an order without a cart and on a subscription), 422 `fee_invalid` (`details.field` names the input; a taxable fee on a direct order), 422 `fee_recalculation_failed` (tax or pricing could not be re-run; nothing changed), 422 for a fee in a different currency than the document, 400 `validation_error` for an unknown field, 404 `not_found`.
|
|
800
|
+
* @param id
|
|
801
|
+
* @param feeId The fee row id on this document (the `id` inside `fees`).
|
|
802
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
803
|
+
* @returns any Default Response
|
|
804
|
+
* @throws ApiError
|
|
805
|
+
*/
|
|
806
|
+
static postApiV1OrdersFeesRestore(id: string, feeId: string, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
807
|
+
/**
|
|
808
|
+
* The order, with `fees`, `feeTotal` and its other totals recomputed.
|
|
809
|
+
*/
|
|
810
|
+
data?: Record<string, any>;
|
|
811
|
+
meta?: {
|
|
812
|
+
/**
|
|
813
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
814
|
+
*/
|
|
815
|
+
requestId?: string;
|
|
816
|
+
pagination?: {
|
|
817
|
+
cursor?: string | null;
|
|
818
|
+
hasMore?: boolean;
|
|
819
|
+
};
|
|
820
|
+
};
|
|
821
|
+
}>;
|
|
822
|
+
/**
|
|
823
|
+
* Add a fee to this quote revision: `{ feeDefinitionId }` for a global fee, or a custom fee (`name`, `kind`, `rateBps` | `flatAmount`, `taxable`, ...). Returns the quote revision with its totals recomputed. Merchant credentials only: the route needs `orders:write` plus the `application:orders:write` permission (quote revision routes: `quotes:write` plus `application:quotes:write`; subscription routes: `subscriptions:write` plus `application:orders:write`). Publishable keys, extension sessions and payment-method tokens answer 403 `permission_denied`. Errors: 409 `fees_locked` (money is on the document: an order with a payment, an order that is not draft or awaiting payment, a comped order, a cart that became an order, an issued quote revision), 409 `fee_already_added` (adding a global fee the document already has), 409 `order_has_cart` (the order is priced from a cart whose fees were never frozen, such as a connector snapshot order, so a fee set on it would not survive payment), 409 `fees_disabled` (order fees are turned off; removing a fee is still allowed on an order without a cart and on a subscription), 422 `fee_invalid` (`details.field` names the input; a taxable fee on a direct order), 422 `fee_recalculation_failed` (tax or pricing could not be re-run; nothing changed), 422 for a fee in a different currency than the document, 400 `validation_error` for an unknown field, 404 `not_found`.
|
|
824
|
+
* @param id Quote id.
|
|
825
|
+
* @param revId Revision id (the working revision).
|
|
826
|
+
* @param requestBody
|
|
827
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
828
|
+
* @returns any Default Response
|
|
829
|
+
* @throws ApiError
|
|
830
|
+
*/
|
|
831
|
+
static postApiV1QuotesRevisionsFees(id: string, revId: string, requestBody: {
|
|
832
|
+
/**
|
|
833
|
+
* String. Add a global fee by id. Send it alone, or send the custom-fee fields instead.
|
|
834
|
+
*/
|
|
835
|
+
feeDefinitionId?: any;
|
|
836
|
+
/**
|
|
837
|
+
* String, 1-100 characters.
|
|
838
|
+
*/
|
|
839
|
+
name?: any;
|
|
840
|
+
/**
|
|
841
|
+
* String: `percentage` or `flat`.
|
|
842
|
+
*/
|
|
843
|
+
kind?: any;
|
|
844
|
+
/**
|
|
845
|
+
* Integer, percentage fees: 1..10000.
|
|
846
|
+
*/
|
|
847
|
+
rateBps?: any;
|
|
848
|
+
/**
|
|
849
|
+
* Integer, flat fees: minor units of the document currency.
|
|
850
|
+
*/
|
|
851
|
+
flatAmount?: any;
|
|
852
|
+
/**
|
|
853
|
+
* Boolean. Default false.
|
|
854
|
+
*/
|
|
855
|
+
taxable?: any;
|
|
856
|
+
/**
|
|
857
|
+
* String.
|
|
858
|
+
*/
|
|
859
|
+
taxCode?: any;
|
|
860
|
+
/**
|
|
861
|
+
* Boolean. Default true.
|
|
862
|
+
*/
|
|
863
|
+
appliesToOneTime?: any;
|
|
864
|
+
/**
|
|
865
|
+
* Boolean. Default false.
|
|
866
|
+
*/
|
|
867
|
+
appliesToSubscription?: any;
|
|
868
|
+
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
869
|
+
/**
|
|
870
|
+
* The quote revision, with `fees`, `feeTotal` and its other totals recomputed.
|
|
871
|
+
*/
|
|
872
|
+
data?: Record<string, any>;
|
|
873
|
+
meta?: {
|
|
874
|
+
/**
|
|
875
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
876
|
+
*/
|
|
877
|
+
requestId?: string;
|
|
878
|
+
pagination?: {
|
|
879
|
+
cursor?: string | null;
|
|
880
|
+
hasMore?: boolean;
|
|
881
|
+
};
|
|
882
|
+
};
|
|
883
|
+
}>;
|
|
884
|
+
/**
|
|
885
|
+
* Change the rate (`rateBps`) or amount (`flatAmount`) of one fee on this quote revision only. Returns the quote revision with totals recomputed. Merchant credentials only: the route needs `orders:write` plus the `application:orders:write` permission (quote revision routes: `quotes:write` plus `application:quotes:write`; subscription routes: `subscriptions:write` plus `application:orders:write`). Publishable keys, extension sessions and payment-method tokens answer 403 `permission_denied`. Errors: 409 `fees_locked` (money is on the document: an order with a payment, an order that is not draft or awaiting payment, a comped order, a cart that became an order, an issued quote revision), 409 `fee_already_added` (adding a global fee the document already has), 409 `order_has_cart` (the order is priced from a cart whose fees were never frozen, such as a connector snapshot order, so a fee set on it would not survive payment), 409 `fees_disabled` (order fees are turned off; removing a fee is still allowed on an order without a cart and on a subscription), 422 `fee_invalid` (`details.field` names the input; a taxable fee on a direct order), 422 `fee_recalculation_failed` (tax or pricing could not be re-run; nothing changed), 422 for a fee in a different currency than the document, 400 `validation_error` for an unknown field, 404 `not_found`.
|
|
886
|
+
* @param id Quote id.
|
|
887
|
+
* @param revId Revision id (the working revision).
|
|
888
|
+
* @param feeId The fee row id on this revision.
|
|
889
|
+
* @param requestBody
|
|
890
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
891
|
+
* @returns any Default Response
|
|
892
|
+
* @throws ApiError
|
|
893
|
+
*/
|
|
894
|
+
static patchApiV1QuotesRevisionsFees(id: string, revId: string, feeId: string, requestBody: {
|
|
895
|
+
/**
|
|
896
|
+
* Integer: new rate for a percentage fee (1..10000), this document only.
|
|
897
|
+
*/
|
|
898
|
+
rateBps?: any;
|
|
899
|
+
/**
|
|
900
|
+
* Integer: new amount for a flat fee (minor units), this document only.
|
|
901
|
+
*/
|
|
902
|
+
flatAmount?: any;
|
|
903
|
+
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
904
|
+
/**
|
|
905
|
+
* The quote revision, with `fees`, `feeTotal` and its other totals recomputed.
|
|
906
|
+
*/
|
|
907
|
+
data?: Record<string, any>;
|
|
908
|
+
meta?: {
|
|
909
|
+
/**
|
|
910
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
911
|
+
*/
|
|
912
|
+
requestId?: string;
|
|
913
|
+
pagination?: {
|
|
914
|
+
cursor?: string | null;
|
|
915
|
+
hasMore?: boolean;
|
|
916
|
+
};
|
|
917
|
+
};
|
|
918
|
+
}>;
|
|
919
|
+
/**
|
|
920
|
+
* Remove a fee from this quote revision (kept as a removed row, so automatic fees do not come back). Returns the quote revision. Merchant credentials only: the route needs `orders:write` plus the `application:orders:write` permission (quote revision routes: `quotes:write` plus `application:quotes:write`; subscription routes: `subscriptions:write` plus `application:orders:write`). Publishable keys, extension sessions and payment-method tokens answer 403 `permission_denied`. Errors: 409 `fees_locked` (money is on the document: an order with a payment, an order that is not draft or awaiting payment, a comped order, a cart that became an order, an issued quote revision), 409 `fee_already_added` (adding a global fee the document already has), 409 `order_has_cart` (the order is priced from a cart whose fees were never frozen, such as a connector snapshot order, so a fee set on it would not survive payment), 409 `fees_disabled` (order fees are turned off; removing a fee is still allowed on an order without a cart and on a subscription), 422 `fee_invalid` (`details.field` names the input; a taxable fee on a direct order), 422 `fee_recalculation_failed` (tax or pricing could not be re-run; nothing changed), 422 for a fee in a different currency than the document, 400 `validation_error` for an unknown field, 404 `not_found`.
|
|
921
|
+
* @param id Quote id.
|
|
922
|
+
* @param revId Revision id (the working revision).
|
|
923
|
+
* @param feeId The fee row id on this revision.
|
|
924
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
925
|
+
* @returns any Default Response
|
|
926
|
+
* @throws ApiError
|
|
927
|
+
*/
|
|
928
|
+
static deleteApiV1QuotesRevisionsFees(id: string, revId: string, feeId: string, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
929
|
+
/**
|
|
930
|
+
* The quote revision, with `fees`, `feeTotal` and its other totals recomputed.
|
|
931
|
+
*/
|
|
932
|
+
data?: Record<string, any>;
|
|
933
|
+
meta?: {
|
|
934
|
+
/**
|
|
935
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
936
|
+
*/
|
|
937
|
+
requestId?: string;
|
|
938
|
+
pagination?: {
|
|
939
|
+
cursor?: string | null;
|
|
940
|
+
hasMore?: boolean;
|
|
941
|
+
};
|
|
942
|
+
};
|
|
943
|
+
}>;
|
|
944
|
+
/**
|
|
945
|
+
* Bring a removed fee back. Returns the quote revision. Merchant credentials only: the route needs `orders:write` plus the `application:orders:write` permission (quote revision routes: `quotes:write` plus `application:quotes:write`; subscription routes: `subscriptions:write` plus `application:orders:write`). Publishable keys, extension sessions and payment-method tokens answer 403 `permission_denied`. Errors: 409 `fees_locked` (money is on the document: an order with a payment, an order that is not draft or awaiting payment, a comped order, a cart that became an order, an issued quote revision), 409 `fee_already_added` (adding a global fee the document already has), 409 `order_has_cart` (the order is priced from a cart whose fees were never frozen, such as a connector snapshot order, so a fee set on it would not survive payment), 409 `fees_disabled` (order fees are turned off; removing a fee is still allowed on an order without a cart and on a subscription), 422 `fee_invalid` (`details.field` names the input; a taxable fee on a direct order), 422 `fee_recalculation_failed` (tax or pricing could not be re-run; nothing changed), 422 for a fee in a different currency than the document, 400 `validation_error` for an unknown field, 404 `not_found`.
|
|
946
|
+
* @param id Quote id.
|
|
947
|
+
* @param revId Revision id (the working revision).
|
|
948
|
+
* @param feeId The fee row id on this revision.
|
|
949
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
950
|
+
* @returns any Default Response
|
|
951
|
+
* @throws ApiError
|
|
952
|
+
*/
|
|
953
|
+
static postApiV1QuotesRevisionsFeesRestore(id: string, revId: string, feeId: string, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
954
|
+
/**
|
|
955
|
+
* The quote revision, with `fees`, `feeTotal` and its other totals recomputed.
|
|
956
|
+
*/
|
|
957
|
+
data?: Record<string, any>;
|
|
958
|
+
meta?: {
|
|
959
|
+
/**
|
|
960
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
961
|
+
*/
|
|
962
|
+
requestId?: string;
|
|
963
|
+
pagination?: {
|
|
964
|
+
cursor?: string | null;
|
|
965
|
+
hasMore?: boolean;
|
|
966
|
+
};
|
|
967
|
+
};
|
|
968
|
+
}>;
|
|
969
|
+
/**
|
|
970
|
+
* Add a global fee to this subscription: `{ feeDefinitionId }`. Renewals charge it from the next one; the current period is not charged. Merchant credentials only: the route needs `orders:write` plus the `application:orders:write` permission (quote revision routes: `quotes:write` plus `application:quotes:write`; subscription routes: `subscriptions:write` plus `application:orders:write`). Publishable keys, extension sessions and payment-method tokens answer 403 `permission_denied`. Errors: 404 `not_found`, 409 `fees_disabled` when order fees are off, 409 `fee_already_added`, 422 `fee_invalid` when the fee does not apply to subscriptions. Returns the subscription with its `fees`.
|
|
971
|
+
* @param id The cart, order or quote id (UUID).
|
|
972
|
+
* @param requestBody
|
|
973
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
974
|
+
* @returns any Default Response
|
|
975
|
+
* @throws ApiError
|
|
976
|
+
*/
|
|
977
|
+
static postApiV1SubscriptionsFees(id: string, requestBody: {
|
|
978
|
+
/**
|
|
979
|
+
* Global fee id (string).
|
|
980
|
+
*/
|
|
981
|
+
feeDefinitionId?: any;
|
|
982
|
+
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
983
|
+
/**
|
|
984
|
+
* The subscription, with `fees`, `feeTotal` and its other totals recomputed.
|
|
985
|
+
*/
|
|
986
|
+
data?: Record<string, any>;
|
|
987
|
+
meta?: {
|
|
988
|
+
/**
|
|
989
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
990
|
+
*/
|
|
991
|
+
requestId?: string;
|
|
992
|
+
pagination?: {
|
|
993
|
+
cursor?: string | null;
|
|
994
|
+
hasMore?: boolean;
|
|
995
|
+
};
|
|
996
|
+
};
|
|
997
|
+
}>;
|
|
998
|
+
/**
|
|
999
|
+
* Remove a fee from this subscription: renewals stop charging it. Allowed with order fees off. Merchant credentials only: the route needs `orders:write` plus the `application:orders:write` permission (quote revision routes: `quotes:write` plus `application:quotes:write`; subscription routes: `subscriptions:write` plus `application:orders:write`). Publishable keys, extension sessions and payment-method tokens answer 403 `permission_denied`. Returns the subscription with its `fees`.
|
|
1000
|
+
* @param id
|
|
1001
|
+
* @param feeId The fee row id on this document (the `id` inside `fees`).
|
|
1002
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
1003
|
+
* @returns any Default Response
|
|
1004
|
+
* @throws ApiError
|
|
1005
|
+
*/
|
|
1006
|
+
static deleteApiV1SubscriptionsFees(id: string, feeId: string, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
1007
|
+
/**
|
|
1008
|
+
* The subscription, with `fees`, `feeTotal` and its other totals recomputed.
|
|
1009
|
+
*/
|
|
1010
|
+
data?: Record<string, any>;
|
|
1011
|
+
meta?: {
|
|
1012
|
+
/**
|
|
1013
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
1014
|
+
*/
|
|
1015
|
+
requestId?: string;
|
|
1016
|
+
pagination?: {
|
|
1017
|
+
cursor?: string | null;
|
|
1018
|
+
hasMore?: boolean;
|
|
1019
|
+
};
|
|
1020
|
+
};
|
|
1021
|
+
}>;
|
|
1022
|
+
}
|
|
1023
|
+
//# sourceMappingURL=FeesService.d.ts.map
|