@leaflow/sdk 0.0.0-dev.25.g6c5751f → 0.0.0-dev.250.g6df166c
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/README.md +22 -1
- package/dist/account/v1/client.d.ts +4 -0
- package/dist/account/v1/client.js +7 -0
- package/dist/account/v1/index.d.ts +33 -22
- package/dist/account/v1/index.js +4 -4
- package/dist/account/v1/schema.d.ts +307 -89
- package/dist/assistant/v1/client.d.ts +4 -0
- package/dist/assistant/v1/client.js +7 -0
- package/dist/assistant/v1/index.d.ts +71 -40
- package/dist/assistant/v1/index.js +4 -4
- package/dist/assistant/v1/schema.d.ts +1204 -139
- package/dist/billing/account/v1/client.d.ts +4 -0
- package/dist/billing/account/v1/client.js +7 -0
- package/dist/billing/account/v1/index.d.ts +169 -0
- package/dist/billing/account/v1/index.js +5 -0
- package/dist/billing/account/v1/schema.d.ts +4385 -0
- package/dist/billing/account/v1/schema.js +5 -0
- package/dist/billing/catalog/v1/client.d.ts +4 -0
- package/dist/billing/catalog/v1/client.js +7 -0
- package/dist/billing/catalog/v1/index.d.ts +33 -0
- package/dist/billing/catalog/v1/index.js +5 -0
- package/dist/billing/catalog/v1/schema.d.ts +915 -0
- package/dist/billing/catalog/v1/schema.js +5 -0
- package/dist/billing/index.d.ts +3 -0
- package/dist/billing/index.js +6 -0
- package/dist/billing/project/v1/client.d.ts +4 -0
- package/dist/billing/project/v1/client.js +7 -0
- package/dist/billing/project/v1/index.d.ts +59 -0
- package/dist/billing/project/v1/index.js +5 -0
- package/dist/billing/project/v1/schema.d.ts +1892 -0
- package/dist/billing/project/v1/schema.js +5 -0
- package/dist/canopy/v1/client.d.ts +4 -0
- package/dist/canopy/v1/client.js +7 -0
- package/dist/canopy/v1/index.d.ts +24 -23
- package/dist/canopy/v1/index.js +4 -4
- package/dist/canopy/v1/schema.d.ts +113 -109
- package/dist/compute/v1/client.d.ts +4 -0
- package/dist/compute/v1/client.js +7 -0
- package/dist/compute/v1/index.d.ts +207 -134
- package/dist/compute/v1/index.js +4 -4
- package/dist/compute/v1/schema.d.ts +1945 -553
- package/dist/dns/v1/client.d.ts +4 -0
- package/dist/dns/v1/client.js +7 -0
- package/dist/dns/v1/index.d.ts +43 -0
- package/dist/dns/v1/index.js +5 -0
- package/dist/dns/v1/schema.d.ts +887 -0
- package/dist/dns/v1/schema.js +5 -0
- package/dist/iam/v1/client.d.ts +4 -0
- package/dist/iam/v1/client.js +7 -0
- package/dist/iam/v1/index.d.ts +55 -32
- package/dist/iam/v1/index.js +4 -4
- package/dist/iam/v1/schema.d.ts +521 -88
- package/dist/index.d.ts +11 -7
- package/dist/index.js +19 -5
- package/dist/monitoring/v1/client.d.ts +4 -0
- package/dist/monitoring/v1/client.js +7 -0
- package/dist/monitoring/v1/index.d.ts +130 -49
- package/dist/monitoring/v1/index.js +4 -4
- package/dist/monitoring/v1/schema.d.ts +2420 -527
- package/dist/notification/v1/client.d.ts +4 -0
- package/dist/notification/v1/client.js +7 -0
- package/dist/notification/v1/index.d.ts +81 -0
- package/dist/notification/v1/index.js +5 -0
- package/dist/notification/v1/schema.d.ts +2048 -0
- package/dist/notification/v1/schema.js +5 -0
- package/dist/routes.d.ts +3234 -0
- package/dist/routes.js +3639 -0
- package/dist/support/v1/client.d.ts +4 -0
- package/dist/support/v1/client.js +7 -0
- package/dist/support/v1/index.d.ts +51 -0
- package/dist/support/v1/index.js +5 -0
- package/dist/support/v1/schema.d.ts +1082 -0
- package/dist/support/v1/schema.js +5 -0
- package/dist/tunnel/v1/client.d.ts +4 -0
- package/dist/tunnel/v1/client.js +7 -0
- package/dist/tunnel/v1/index.d.ts +8 -7
- package/dist/tunnel/v1/index.js +4 -4
- package/dist/tunnel/v1/schema.d.ts +40 -34
- package/package.json +34 -10
|
@@ -0,0 +1,4385 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
export interface paths {
|
|
6
|
+
"/account/v1/currencies": {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* List currencies accounts can be opened in
|
|
15
|
+
* @description The currencies a new billing account can be opened in. A retired currency is not listed,
|
|
16
|
+
* although accounts already opened in it keep working. Results are paginated.
|
|
17
|
+
*/
|
|
18
|
+
get: operations["list-currencies"];
|
|
19
|
+
put?: never;
|
|
20
|
+
post?: never;
|
|
21
|
+
delete?: never;
|
|
22
|
+
options?: never;
|
|
23
|
+
head?: never;
|
|
24
|
+
patch?: never;
|
|
25
|
+
trace?: never;
|
|
26
|
+
};
|
|
27
|
+
"/account/v1/billing-accounts": {
|
|
28
|
+
parameters: {
|
|
29
|
+
query?: never;
|
|
30
|
+
header?: never;
|
|
31
|
+
path?: never;
|
|
32
|
+
cookie?: never;
|
|
33
|
+
};
|
|
34
|
+
/** List billing accounts */
|
|
35
|
+
get: operations["list-billing-accounts"];
|
|
36
|
+
put?: never;
|
|
37
|
+
/**
|
|
38
|
+
* Create billing account
|
|
39
|
+
* @description The currency is chosen here and cannot be changed afterwards. Everything charged to the
|
|
40
|
+
* account — prices, orders, invoices, balance — is denominated in it.
|
|
41
|
+
*
|
|
42
|
+
* One person may hold several accounts, for example a personal one and one for a team.
|
|
43
|
+
*/
|
|
44
|
+
post: operations["create-billing-account"];
|
|
45
|
+
delete?: never;
|
|
46
|
+
options?: never;
|
|
47
|
+
head?: never;
|
|
48
|
+
patch?: never;
|
|
49
|
+
trace?: never;
|
|
50
|
+
};
|
|
51
|
+
"/account/v1/billing-accounts/{accountId}": {
|
|
52
|
+
parameters: {
|
|
53
|
+
query?: never;
|
|
54
|
+
header?: never;
|
|
55
|
+
path: {
|
|
56
|
+
accountId: components["parameters"]["AccountId"];
|
|
57
|
+
};
|
|
58
|
+
cookie?: never;
|
|
59
|
+
};
|
|
60
|
+
/** Get billing account */
|
|
61
|
+
get: operations["get-billing-account"];
|
|
62
|
+
put?: never;
|
|
63
|
+
post?: never;
|
|
64
|
+
delete?: never;
|
|
65
|
+
options?: never;
|
|
66
|
+
head?: never;
|
|
67
|
+
/**
|
|
68
|
+
* Update billing account
|
|
69
|
+
* @description The legal name, address and tax identifier are copied onto each invoice when it is
|
|
70
|
+
* issued. Changing them here affects invoices issued afterwards, not those already sent.
|
|
71
|
+
*
|
|
72
|
+
* The currency cannot be changed.
|
|
73
|
+
*/
|
|
74
|
+
patch: operations["update-billing-account"];
|
|
75
|
+
trace?: never;
|
|
76
|
+
};
|
|
77
|
+
"/account/v1/billing-accounts/{accountId}/balance": {
|
|
78
|
+
parameters: {
|
|
79
|
+
query?: never;
|
|
80
|
+
header?: never;
|
|
81
|
+
path: {
|
|
82
|
+
accountId: components["parameters"]["AccountId"];
|
|
83
|
+
};
|
|
84
|
+
cookie?: never;
|
|
85
|
+
};
|
|
86
|
+
/** Get account balance */
|
|
87
|
+
get: operations["get-account-balance"];
|
|
88
|
+
put?: never;
|
|
89
|
+
post?: never;
|
|
90
|
+
delete?: never;
|
|
91
|
+
options?: never;
|
|
92
|
+
head?: never;
|
|
93
|
+
patch?: never;
|
|
94
|
+
trace?: never;
|
|
95
|
+
};
|
|
96
|
+
"/account/v1/billing-accounts/{accountId}/metered-usage": {
|
|
97
|
+
parameters: {
|
|
98
|
+
query?: never;
|
|
99
|
+
header?: never;
|
|
100
|
+
path: {
|
|
101
|
+
accountId: components["parameters"]["AccountId"];
|
|
102
|
+
};
|
|
103
|
+
cookie?: never;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Get account metered usage
|
|
107
|
+
* @description Whether the account has anything billed by usage, and what that usage has cost over the last
|
|
108
|
+
* seven days. Usage is paid from the balance, so this tells how much of the balance it is likely
|
|
109
|
+
* to need: the balance divided by `average_daily_amount` is roughly how many days it lasts.
|
|
110
|
+
*/
|
|
111
|
+
get: operations["get-account-metered-usage"];
|
|
112
|
+
put?: never;
|
|
113
|
+
post?: never;
|
|
114
|
+
delete?: never;
|
|
115
|
+
options?: never;
|
|
116
|
+
head?: never;
|
|
117
|
+
patch?: never;
|
|
118
|
+
trace?: never;
|
|
119
|
+
};
|
|
120
|
+
"/account/v1/billing-accounts/{accountId}/payment-options": {
|
|
121
|
+
parameters: {
|
|
122
|
+
query?: never;
|
|
123
|
+
header?: never;
|
|
124
|
+
path: {
|
|
125
|
+
accountId: components["parameters"]["AccountId"];
|
|
126
|
+
};
|
|
127
|
+
cookie?: never;
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* List payment options
|
|
131
|
+
* @description Lists the payment gateways and methods that currently accept payment in this account's currency, the
|
|
132
|
+
* preferred gateway first. Top-ups and invoice payments must name a gateway and method listed here;
|
|
133
|
+
* others are refused. An empty result means no online payment is available for this account.
|
|
134
|
+
* Results are paginated.
|
|
135
|
+
*/
|
|
136
|
+
get: operations["list-payment-options"];
|
|
137
|
+
put?: never;
|
|
138
|
+
post?: never;
|
|
139
|
+
delete?: never;
|
|
140
|
+
options?: never;
|
|
141
|
+
head?: never;
|
|
142
|
+
patch?: never;
|
|
143
|
+
trace?: never;
|
|
144
|
+
};
|
|
145
|
+
"/account/v1/projects": {
|
|
146
|
+
parameters: {
|
|
147
|
+
query?: never;
|
|
148
|
+
header?: never;
|
|
149
|
+
path?: never;
|
|
150
|
+
cookie?: never;
|
|
151
|
+
};
|
|
152
|
+
/** List projects linked to billing accounts */
|
|
153
|
+
get: operations["list-billing-account-projects"];
|
|
154
|
+
put?: never;
|
|
155
|
+
post?: never;
|
|
156
|
+
delete?: never;
|
|
157
|
+
options?: never;
|
|
158
|
+
head?: never;
|
|
159
|
+
patch?: never;
|
|
160
|
+
trace?: never;
|
|
161
|
+
};
|
|
162
|
+
"/account/v1/projects/{projectId}/billing-account": {
|
|
163
|
+
parameters: {
|
|
164
|
+
query?: never;
|
|
165
|
+
header?: never;
|
|
166
|
+
path: {
|
|
167
|
+
projectId: components["parameters"]["ProjectId"];
|
|
168
|
+
};
|
|
169
|
+
cookie?: never;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* Get project billing account
|
|
173
|
+
* @description Returns 404 when the project has no billing account. No resources can be created until one is linked.
|
|
174
|
+
*/
|
|
175
|
+
get: operations["get-project-billing-account"];
|
|
176
|
+
/**
|
|
177
|
+
* Set project billing account
|
|
178
|
+
* @description Charges already incurred remain with the billing account that was linked when they
|
|
179
|
+
* occurred, and are still invoiced to it. Metered resources are settled up to the moment of
|
|
180
|
+
* the change. Amounts owed by the previous billing account remain owed by it and do not
|
|
181
|
+
* prevent the change.
|
|
182
|
+
*
|
|
183
|
+
* Orders keep the billing account they were placed with and are fulfilled as placed. Periods
|
|
184
|
+
* already paid for are unaffected; renewals are charged to the new billing account.
|
|
185
|
+
*
|
|
186
|
+
* The request is refused once the project no longer accepts purchases because it is being
|
|
187
|
+
* deleted, and while a subscription or an order in progress in the project uses a currency
|
|
188
|
+
* other than that of the new billing account.
|
|
189
|
+
*/
|
|
190
|
+
put: operations["set-project-billing-account"];
|
|
191
|
+
post?: never;
|
|
192
|
+
/**
|
|
193
|
+
* Unlink project billing account
|
|
194
|
+
* @description Permitted only when nothing in the project is still running or in progress: no metered
|
|
195
|
+
* resources, no subscriptions that have not ended, and no orders in progress, including
|
|
196
|
+
* changes scheduled for the end of a period. Orders are not modified by this request; wait
|
|
197
|
+
* for them to complete, and have the service that scheduled a change call it off.
|
|
198
|
+
*
|
|
199
|
+
* Charges already incurred remain with the billing account and are invoiced to it as usual.
|
|
200
|
+
* Amounts the billing account owes do not prevent unlinking.
|
|
201
|
+
*
|
|
202
|
+
* After this the project cannot make purchases until a billing account is linked again.
|
|
203
|
+
*/
|
|
204
|
+
delete: operations["unlink-project-billing-account"];
|
|
205
|
+
options?: never;
|
|
206
|
+
head?: never;
|
|
207
|
+
patch?: never;
|
|
208
|
+
trace?: never;
|
|
209
|
+
};
|
|
210
|
+
"/account/v1/top-ups": {
|
|
211
|
+
parameters: {
|
|
212
|
+
query?: never;
|
|
213
|
+
header?: never;
|
|
214
|
+
path?: never;
|
|
215
|
+
cookie?: never;
|
|
216
|
+
};
|
|
217
|
+
/**
|
|
218
|
+
* List top ups
|
|
219
|
+
* @description Lists only the authenticated user's top-ups. Includes pending, failed and canceled attempts; no invoice is
|
|
220
|
+
* created for a top-up. Items carry no `action`; read a pending top-up with get-top-up to continue its payment.
|
|
221
|
+
*/
|
|
222
|
+
get: operations["list-top-ups"];
|
|
223
|
+
put?: never;
|
|
224
|
+
/**
|
|
225
|
+
* Create top up
|
|
226
|
+
* @description Creates a top-up for an account owned by the authenticated user and returns its payment information.
|
|
227
|
+
* The balance increases only after the payment gateway confirms receipt. A top-up has no invoice.
|
|
228
|
+
* Keep the supplied ID to query the original attempt after a lost response; duplicate creation conflicts.
|
|
229
|
+
*/
|
|
230
|
+
post: operations["create-top-up"];
|
|
231
|
+
delete?: never;
|
|
232
|
+
options?: never;
|
|
233
|
+
head?: never;
|
|
234
|
+
patch?: never;
|
|
235
|
+
trace?: never;
|
|
236
|
+
};
|
|
237
|
+
"/account/v1/top-ups/{topUpId}": {
|
|
238
|
+
parameters: {
|
|
239
|
+
query?: never;
|
|
240
|
+
header?: never;
|
|
241
|
+
path: {
|
|
242
|
+
topUpId: string;
|
|
243
|
+
};
|
|
244
|
+
cookie?: never;
|
|
245
|
+
};
|
|
246
|
+
/**
|
|
247
|
+
* Get top up
|
|
248
|
+
* @description Reads a top-up owned by the authenticated user, including its outcome and the part of it not yet spent.
|
|
249
|
+
* It is not an invoice.
|
|
250
|
+
*
|
|
251
|
+
* While the top-up is pending, the answer includes the customer's next step as the payment gateway
|
|
252
|
+
* currently reports it, so that a payment interrupted by a closed page can be continued. When the gateway
|
|
253
|
+
* cannot be reached, the top-up is returned without `action`; read it again later.
|
|
254
|
+
*/
|
|
255
|
+
get: operations["get-top-up"];
|
|
256
|
+
put?: never;
|
|
257
|
+
post?: never;
|
|
258
|
+
delete?: never;
|
|
259
|
+
options?: never;
|
|
260
|
+
head?: never;
|
|
261
|
+
patch?: never;
|
|
262
|
+
trace?: never;
|
|
263
|
+
};
|
|
264
|
+
"/account/v1/top-ups/{topUpId}/cancel": {
|
|
265
|
+
parameters: {
|
|
266
|
+
query?: never;
|
|
267
|
+
header?: never;
|
|
268
|
+
path: {
|
|
269
|
+
topUpId: string;
|
|
270
|
+
};
|
|
271
|
+
cookie?: never;
|
|
272
|
+
};
|
|
273
|
+
get?: never;
|
|
274
|
+
put?: never;
|
|
275
|
+
/**
|
|
276
|
+
* Cancel top up
|
|
277
|
+
* @description Withdraws a pending top-up owned by the authenticated user at the payment gateway. It becomes
|
|
278
|
+
* `canceled` with `cancellation_reason` `requested_by_customer`, and no money is collected for it. Canceling a
|
|
279
|
+
* top-up that is already canceled returns it unchanged.
|
|
280
|
+
*
|
|
281
|
+
* If the gateway has already collected the payment, nothing is withdrawn and the top-up is returned
|
|
282
|
+
* as `succeeded` with the balance increased. Check `status` in the answer rather than assuming the
|
|
283
|
+
* cancellation took effect.
|
|
284
|
+
*
|
|
285
|
+
* Fails with 409 and BILLING_TOPUP_NOT_CANCELABLE when the top-up has already succeeded or failed,
|
|
286
|
+
* with `status` naming that outcome, and while the gateway is processing the payment and can no
|
|
287
|
+
* longer withdraw it, with `status` set to `pending`; read the top-up again later in that case.
|
|
288
|
+
*/
|
|
289
|
+
post: operations["cancel-top-up"];
|
|
290
|
+
delete?: never;
|
|
291
|
+
options?: never;
|
|
292
|
+
head?: never;
|
|
293
|
+
patch?: never;
|
|
294
|
+
trace?: never;
|
|
295
|
+
};
|
|
296
|
+
"/account/v1/payment-methods": {
|
|
297
|
+
parameters: {
|
|
298
|
+
query?: never;
|
|
299
|
+
header?: never;
|
|
300
|
+
path?: never;
|
|
301
|
+
cookie?: never;
|
|
302
|
+
};
|
|
303
|
+
/** List payment methods */
|
|
304
|
+
get: operations["list-payment-methods"];
|
|
305
|
+
put?: never;
|
|
306
|
+
post?: never;
|
|
307
|
+
delete?: never;
|
|
308
|
+
options?: never;
|
|
309
|
+
head?: never;
|
|
310
|
+
patch?: never;
|
|
311
|
+
trace?: never;
|
|
312
|
+
};
|
|
313
|
+
"/account/v1/payment-methods/setup": {
|
|
314
|
+
parameters: {
|
|
315
|
+
query?: never;
|
|
316
|
+
header?: never;
|
|
317
|
+
path?: never;
|
|
318
|
+
cookie?: never;
|
|
319
|
+
};
|
|
320
|
+
get?: never;
|
|
321
|
+
put?: never;
|
|
322
|
+
/**
|
|
323
|
+
* Create payment method setup
|
|
324
|
+
* @description Returns what is needed to hand the browser over to the payment gateway's own card
|
|
325
|
+
* form. Nothing is charged, and the method appears in the list once the gateway
|
|
326
|
+
* confirms it.
|
|
327
|
+
*
|
|
328
|
+
* Card numbers are never sent to or stored by this service.
|
|
329
|
+
*/
|
|
330
|
+
post: operations["create-payment-method-setup"];
|
|
331
|
+
delete?: never;
|
|
332
|
+
options?: never;
|
|
333
|
+
head?: never;
|
|
334
|
+
patch?: never;
|
|
335
|
+
trace?: never;
|
|
336
|
+
};
|
|
337
|
+
"/account/v1/payment-methods/{paymentMethodId}/default": {
|
|
338
|
+
parameters: {
|
|
339
|
+
query?: never;
|
|
340
|
+
header?: never;
|
|
341
|
+
path: {
|
|
342
|
+
paymentMethodId: components["parameters"]["PaymentMethodId"];
|
|
343
|
+
};
|
|
344
|
+
cookie?: never;
|
|
345
|
+
};
|
|
346
|
+
get?: never;
|
|
347
|
+
/** Set default payment method */
|
|
348
|
+
put: operations["set-default-payment-method"];
|
|
349
|
+
post?: never;
|
|
350
|
+
delete?: never;
|
|
351
|
+
options?: never;
|
|
352
|
+
head?: never;
|
|
353
|
+
patch?: never;
|
|
354
|
+
trace?: never;
|
|
355
|
+
};
|
|
356
|
+
"/account/v1/payment-methods/{paymentMethodId}": {
|
|
357
|
+
parameters: {
|
|
358
|
+
query?: never;
|
|
359
|
+
header?: never;
|
|
360
|
+
path: {
|
|
361
|
+
paymentMethodId: components["parameters"]["PaymentMethodId"];
|
|
362
|
+
};
|
|
363
|
+
cookie?: never;
|
|
364
|
+
};
|
|
365
|
+
get?: never;
|
|
366
|
+
put?: never;
|
|
367
|
+
post?: never;
|
|
368
|
+
/**
|
|
369
|
+
* Delete payment method
|
|
370
|
+
* @description Refused when it is the only method on an account that has resources billed by the hour,
|
|
371
|
+
* as there would be nothing left to charge when the balance runs out.
|
|
372
|
+
*/
|
|
373
|
+
delete: operations["delete-payment-method"];
|
|
374
|
+
options?: never;
|
|
375
|
+
head?: never;
|
|
376
|
+
patch?: never;
|
|
377
|
+
trace?: never;
|
|
378
|
+
};
|
|
379
|
+
"/account/v1/invoices/{invoiceId}/pay": {
|
|
380
|
+
parameters: {
|
|
381
|
+
query?: never;
|
|
382
|
+
header?: never;
|
|
383
|
+
path: {
|
|
384
|
+
invoiceId: components["parameters"]["InvoiceId"];
|
|
385
|
+
};
|
|
386
|
+
cookie?: never;
|
|
387
|
+
};
|
|
388
|
+
get?: never;
|
|
389
|
+
put?: never;
|
|
390
|
+
/**
|
|
391
|
+
* Pay invoice
|
|
392
|
+
* @description Applies the account balance first, then charges the remainder to a payment method. Give
|
|
393
|
+
* `payment_method_id` to choose one, or omit it to use the default.
|
|
394
|
+
*
|
|
395
|
+
* Returns a checkout address when the gateway requires the cardholder to confirm the
|
|
396
|
+
* payment; the invoice is marked paid once the gateway confirms it.
|
|
397
|
+
*
|
|
398
|
+
* Calling this on an invoice that is already paid returns the invoice unchanged. A void invoice
|
|
399
|
+
* is refused with `BILLING_INVOICE_NOT_PAYABLE`; the invoice of an order that has failed or was
|
|
400
|
+
* canceled, with `BILLING_ORDER_FAILED` or `BILLING_ORDER_CANCELED`; and that of an order whose
|
|
401
|
+
* payment deadline has passed, with `BILLING_ORDER_EXPIRED`.
|
|
402
|
+
*/
|
|
403
|
+
post: operations["pay-invoice"];
|
|
404
|
+
delete?: never;
|
|
405
|
+
options?: never;
|
|
406
|
+
head?: never;
|
|
407
|
+
patch?: never;
|
|
408
|
+
trace?: never;
|
|
409
|
+
};
|
|
410
|
+
"/account/v1/invoices/{invoiceId}/payment-preview": {
|
|
411
|
+
parameters: {
|
|
412
|
+
query?: never;
|
|
413
|
+
header?: never;
|
|
414
|
+
path: {
|
|
415
|
+
invoiceId: components["parameters"]["InvoiceId"];
|
|
416
|
+
};
|
|
417
|
+
cookie?: never;
|
|
418
|
+
};
|
|
419
|
+
/**
|
|
420
|
+
* Preview invoice payment
|
|
421
|
+
* @description What paying this invoice now would take from credit grants, from the balance and, for the rest,
|
|
422
|
+
* from a payment gateway. It is computed as paying computes it, so paying with the same options
|
|
423
|
+
* straight afterwards takes exactly these amounts unless the account's funds change in between.
|
|
424
|
+
* Nothing is charged, reserved or created.
|
|
425
|
+
*
|
|
426
|
+
* Refused with the same errors as paying, except that insufficient funds are not an error here:
|
|
427
|
+
* they show as a `gateway_amount` above zero.
|
|
428
|
+
*/
|
|
429
|
+
get: operations["preview-invoice-payment"];
|
|
430
|
+
put?: never;
|
|
431
|
+
post?: never;
|
|
432
|
+
delete?: never;
|
|
433
|
+
options?: never;
|
|
434
|
+
head?: never;
|
|
435
|
+
patch?: never;
|
|
436
|
+
trace?: never;
|
|
437
|
+
};
|
|
438
|
+
"/account/v1/payments": {
|
|
439
|
+
parameters: {
|
|
440
|
+
query?: never;
|
|
441
|
+
header?: never;
|
|
442
|
+
path?: never;
|
|
443
|
+
cookie?: never;
|
|
444
|
+
};
|
|
445
|
+
get?: never;
|
|
446
|
+
put?: never;
|
|
447
|
+
/**
|
|
448
|
+
* Pay together
|
|
449
|
+
* @description Pays outstanding invoices, including the invoices of the listed orders, from the account's
|
|
450
|
+
* eligible credit grants and then its balance. No payment gateway is used; an invoice to be
|
|
451
|
+
* paid online is paid on its own.
|
|
452
|
+
*
|
|
453
|
+
* Either every invoice is paid or none is. When the credit grants and balance cannot cover
|
|
454
|
+
* them all, the request fails with `BILLING_INSUFFICIENT_FUNDS` and nothing is charged.
|
|
455
|
+
* Invoices that are already paid are not charged again. An invoice with an online payment
|
|
456
|
+
* still in progress is refused with `BILLING_PAYMENT_PENDING`, a void invoice with
|
|
457
|
+
* `BILLING_INVOICE_NOT_PAYABLE`, an order that has failed or was canceled with
|
|
458
|
+
* `BILLING_ORDER_FAILED` or `BILLING_ORDER_CANCELED`, and an order whose payment deadline has
|
|
459
|
+
* passed with `BILLING_ORDER_EXPIRED`.
|
|
460
|
+
*/
|
|
461
|
+
post: operations["pay-together"];
|
|
462
|
+
delete?: never;
|
|
463
|
+
options?: never;
|
|
464
|
+
head?: never;
|
|
465
|
+
patch?: never;
|
|
466
|
+
trace?: never;
|
|
467
|
+
};
|
|
468
|
+
"/account/v1/payments/preview": {
|
|
469
|
+
parameters: {
|
|
470
|
+
query?: never;
|
|
471
|
+
header?: never;
|
|
472
|
+
path?: never;
|
|
473
|
+
cookie?: never;
|
|
474
|
+
};
|
|
475
|
+
get?: never;
|
|
476
|
+
put?: never;
|
|
477
|
+
/**
|
|
478
|
+
* Preview paying together
|
|
479
|
+
* @description What paying these invoices together now would take from credit grants and from the balance,
|
|
480
|
+
* invoice by invoice in the order they would be paid. It is computed as paying together computes
|
|
481
|
+
* it. Nothing is charged, reserved or created.
|
|
482
|
+
*
|
|
483
|
+
* Refused with the same errors as paying together, except that insufficient funds are not an
|
|
484
|
+
* error here: they show as a `gateway_amount` above zero, and paying together would then be
|
|
485
|
+
* refused with `BILLING_INSUFFICIENT_FUNDS`.
|
|
486
|
+
*/
|
|
487
|
+
post: operations["preview-pay-together"];
|
|
488
|
+
delete?: never;
|
|
489
|
+
options?: never;
|
|
490
|
+
head?: never;
|
|
491
|
+
patch?: never;
|
|
492
|
+
trace?: never;
|
|
493
|
+
};
|
|
494
|
+
"/account/v1/invoices": {
|
|
495
|
+
parameters: {
|
|
496
|
+
query?: never;
|
|
497
|
+
header?: never;
|
|
498
|
+
path?: never;
|
|
499
|
+
cookie?: never;
|
|
500
|
+
};
|
|
501
|
+
/** List invoices */
|
|
502
|
+
get: operations["list-invoices"];
|
|
503
|
+
put?: never;
|
|
504
|
+
post?: never;
|
|
505
|
+
delete?: never;
|
|
506
|
+
options?: never;
|
|
507
|
+
head?: never;
|
|
508
|
+
patch?: never;
|
|
509
|
+
trace?: never;
|
|
510
|
+
};
|
|
511
|
+
"/account/v1/invoices/{invoiceId}": {
|
|
512
|
+
parameters: {
|
|
513
|
+
query?: never;
|
|
514
|
+
header?: never;
|
|
515
|
+
path: {
|
|
516
|
+
invoiceId: components["parameters"]["InvoiceId"];
|
|
517
|
+
};
|
|
518
|
+
cookie?: never;
|
|
519
|
+
};
|
|
520
|
+
/** Get invoice */
|
|
521
|
+
get: operations["get-invoice"];
|
|
522
|
+
put?: never;
|
|
523
|
+
post?: never;
|
|
524
|
+
delete?: never;
|
|
525
|
+
options?: never;
|
|
526
|
+
head?: never;
|
|
527
|
+
patch?: never;
|
|
528
|
+
trace?: never;
|
|
529
|
+
};
|
|
530
|
+
"/account/v1/invoices/{invoiceId}/items": {
|
|
531
|
+
parameters: {
|
|
532
|
+
query?: never;
|
|
533
|
+
header?: never;
|
|
534
|
+
path: {
|
|
535
|
+
invoiceId: components["parameters"]["InvoiceId"];
|
|
536
|
+
};
|
|
537
|
+
cookie?: never;
|
|
538
|
+
};
|
|
539
|
+
/** List invoice items */
|
|
540
|
+
get: operations["list-invoice-items"];
|
|
541
|
+
put?: never;
|
|
542
|
+
post?: never;
|
|
543
|
+
delete?: never;
|
|
544
|
+
options?: never;
|
|
545
|
+
head?: never;
|
|
546
|
+
patch?: never;
|
|
547
|
+
trace?: never;
|
|
548
|
+
};
|
|
549
|
+
"/account/v1/transactions": {
|
|
550
|
+
parameters: {
|
|
551
|
+
query?: never;
|
|
552
|
+
header?: never;
|
|
553
|
+
path?: never;
|
|
554
|
+
cookie?: never;
|
|
555
|
+
};
|
|
556
|
+
/** List transactions */
|
|
557
|
+
get: operations["list-transactions"];
|
|
558
|
+
put?: never;
|
|
559
|
+
post?: never;
|
|
560
|
+
delete?: never;
|
|
561
|
+
options?: never;
|
|
562
|
+
head?: never;
|
|
563
|
+
patch?: never;
|
|
564
|
+
trace?: never;
|
|
565
|
+
};
|
|
566
|
+
"/account/v1/discounts": {
|
|
567
|
+
parameters: {
|
|
568
|
+
query?: never;
|
|
569
|
+
header?: never;
|
|
570
|
+
path?: never;
|
|
571
|
+
cookie?: never;
|
|
572
|
+
};
|
|
573
|
+
/**
|
|
574
|
+
* List the coupons held on this account
|
|
575
|
+
* @description Coupons placed on the account directly, which apply at checkout without a code being
|
|
576
|
+
* entered. A coupon reached through a code is not listed here.
|
|
577
|
+
*/
|
|
578
|
+
get: operations["list-account-discounts"];
|
|
579
|
+
put?: never;
|
|
580
|
+
post?: never;
|
|
581
|
+
delete?: never;
|
|
582
|
+
options?: never;
|
|
583
|
+
head?: never;
|
|
584
|
+
patch?: never;
|
|
585
|
+
trace?: never;
|
|
586
|
+
};
|
|
587
|
+
"/account/v1/credit-grants": {
|
|
588
|
+
parameters: {
|
|
589
|
+
query?: never;
|
|
590
|
+
header?: never;
|
|
591
|
+
path?: never;
|
|
592
|
+
cookie?: never;
|
|
593
|
+
};
|
|
594
|
+
/**
|
|
595
|
+
* List credit grants
|
|
596
|
+
* @description Each grant shows what remains and what it may be used for. Credit is spent before the balance
|
|
597
|
+
* and cannot be withdrawn.
|
|
598
|
+
*/
|
|
599
|
+
get: operations["list-credit-grants"];
|
|
600
|
+
put?: never;
|
|
601
|
+
post?: never;
|
|
602
|
+
delete?: never;
|
|
603
|
+
options?: never;
|
|
604
|
+
head?: never;
|
|
605
|
+
patch?: never;
|
|
606
|
+
trace?: never;
|
|
607
|
+
};
|
|
608
|
+
"/account/v1/refunds": {
|
|
609
|
+
parameters: {
|
|
610
|
+
query?: never;
|
|
611
|
+
header?: never;
|
|
612
|
+
path?: never;
|
|
613
|
+
cookie?: never;
|
|
614
|
+
};
|
|
615
|
+
/**
|
|
616
|
+
* List refunds
|
|
617
|
+
* @description Newest first.
|
|
618
|
+
*/
|
|
619
|
+
get: operations["list-refunds"];
|
|
620
|
+
put?: never;
|
|
621
|
+
post?: never;
|
|
622
|
+
delete?: never;
|
|
623
|
+
options?: never;
|
|
624
|
+
head?: never;
|
|
625
|
+
patch?: never;
|
|
626
|
+
trace?: never;
|
|
627
|
+
};
|
|
628
|
+
"/account/v1/usage-charges": {
|
|
629
|
+
parameters: {
|
|
630
|
+
query?: never;
|
|
631
|
+
header?: never;
|
|
632
|
+
path?: never;
|
|
633
|
+
cookie?: never;
|
|
634
|
+
};
|
|
635
|
+
/**
|
|
636
|
+
* List usage charges
|
|
637
|
+
* @description Each charge is added to the month's usage invoice as it is priced, summed into one line per
|
|
638
|
+
* subscription, project, resource, meter and rate. Filter by `invoice_item_id` to see the
|
|
639
|
+
* charges behind a line. Charges still waiting to be priced are included too.
|
|
640
|
+
*/
|
|
641
|
+
get: operations["list-usage-charges"];
|
|
642
|
+
put?: never;
|
|
643
|
+
post?: never;
|
|
644
|
+
delete?: never;
|
|
645
|
+
options?: never;
|
|
646
|
+
head?: never;
|
|
647
|
+
patch?: never;
|
|
648
|
+
trace?: never;
|
|
649
|
+
};
|
|
650
|
+
"/account/v1/subscriptions": {
|
|
651
|
+
parameters: {
|
|
652
|
+
query?: never;
|
|
653
|
+
header?: never;
|
|
654
|
+
path?: never;
|
|
655
|
+
cookie?: never;
|
|
656
|
+
};
|
|
657
|
+
/** List subscriptions */
|
|
658
|
+
get: operations["list-subscriptions"];
|
|
659
|
+
put?: never;
|
|
660
|
+
post?: never;
|
|
661
|
+
delete?: never;
|
|
662
|
+
options?: never;
|
|
663
|
+
head?: never;
|
|
664
|
+
patch?: never;
|
|
665
|
+
trace?: never;
|
|
666
|
+
};
|
|
667
|
+
"/account/v1/subscriptions/{subscriptionId}": {
|
|
668
|
+
parameters: {
|
|
669
|
+
query?: never;
|
|
670
|
+
header?: never;
|
|
671
|
+
path: {
|
|
672
|
+
subscriptionId: components["parameters"]["SubscriptionId"];
|
|
673
|
+
};
|
|
674
|
+
cookie?: never;
|
|
675
|
+
};
|
|
676
|
+
/** Get subscription */
|
|
677
|
+
get: operations["get-subscription"];
|
|
678
|
+
put?: never;
|
|
679
|
+
post?: never;
|
|
680
|
+
delete?: never;
|
|
681
|
+
options?: never;
|
|
682
|
+
head?: never;
|
|
683
|
+
patch?: never;
|
|
684
|
+
trace?: never;
|
|
685
|
+
};
|
|
686
|
+
"/account/v1/quotes": {
|
|
687
|
+
parameters: {
|
|
688
|
+
query?: never;
|
|
689
|
+
header?: never;
|
|
690
|
+
path?: never;
|
|
691
|
+
cookie?: never;
|
|
692
|
+
};
|
|
693
|
+
get?: never;
|
|
694
|
+
put?: never;
|
|
695
|
+
/**
|
|
696
|
+
* Quote renewals or a cancellation
|
|
697
|
+
* @description Priced in the currency of the billing account that pays for the subscriptions, and at any rate
|
|
698
|
+
* negotiated for that account. Nothing is reserved and nothing is recorded, so this may be called
|
|
699
|
+
* as often as required. Prices may change between quoting and renewing, so a quote should be
|
|
700
|
+
* refreshed before a final confirmation is shown.
|
|
701
|
+
*
|
|
702
|
+
* A renewal is priced exactly as renewing would charge it: at the agreed amount or the price
|
|
703
|
+
* named, with the discounts the account holds, and with tax.
|
|
704
|
+
*
|
|
705
|
+
* A cancellation is quoted as creating it would compute the refund, as of now and under the refund
|
|
706
|
+
* terms agreed when each subscription was bought. It is quoted on its own: combined with renewals
|
|
707
|
+
* the request is refused with HTTP 400 `BILLING_PURCHASE_INVALID` and `meta.field`
|
|
708
|
+
* `cancellation`. It is refused with the same errors as creating the cancellation, except that the
|
|
709
|
+
* amount is not checked. Give the returned `cancellation.proration_date` and
|
|
710
|
+
* `cancellation.refundable_amount` when creating it.
|
|
711
|
+
*
|
|
712
|
+
* Every subscription must be paid for by the same one of your billing accounts; otherwise the
|
|
713
|
+
* request is refused with HTTP 400 `BILLING_PURCHASE_INVALID`. Returns 404 when a subscription does
|
|
714
|
+
* not exist, and 403 `BILLING_ACCOUNT_FORBIDDEN` when it is paid for by an account you do not own.
|
|
715
|
+
*/
|
|
716
|
+
post: operations["create-quote"];
|
|
717
|
+
delete?: never;
|
|
718
|
+
options?: never;
|
|
719
|
+
head?: never;
|
|
720
|
+
patch?: never;
|
|
721
|
+
trace?: never;
|
|
722
|
+
};
|
|
723
|
+
"/account/v1/cancellations": {
|
|
724
|
+
parameters: {
|
|
725
|
+
query?: never;
|
|
726
|
+
header?: never;
|
|
727
|
+
path?: never;
|
|
728
|
+
cookie?: never;
|
|
729
|
+
};
|
|
730
|
+
/**
|
|
731
|
+
* List cancellations
|
|
732
|
+
* @description Newest first. Filter by `subscription_id` and `status=open` to find the cancellation now under way for a subscription.
|
|
733
|
+
*/
|
|
734
|
+
get: operations["list-cancellations"];
|
|
735
|
+
put?: never;
|
|
736
|
+
/**
|
|
737
|
+
* Cancel subscriptions
|
|
738
|
+
* @description Ends a set of subscriptions of one service together, at one time. Deleting a resource that a
|
|
739
|
+
* subscription pays for is an `immediate` cancellation of every subscription released with it,
|
|
740
|
+
* such as a server with the disks deleted along with it, or an address with its bandwidth.
|
|
741
|
+
*
|
|
742
|
+
* The service that provides the resources releases them: at once for `immediate`, or at
|
|
743
|
+
* `scheduled_at`, the end of the paid term, for `period_end`. When release is confirmed, the
|
|
744
|
+
* unused value is returned the way it was paid, under the refund terms agreed when each
|
|
745
|
+
* subscription was bought. For `immediate` the refund is computed as of `proration_date`, so the
|
|
746
|
+
* amount confirmed here is the amount returned: prepaid service used while the resources are
|
|
747
|
+
* being released is not deducted from it. Usage of a postpaid subscription is charged until its
|
|
748
|
+
* resources are released, as usual.
|
|
749
|
+
*
|
|
750
|
+
* `mode` must be allowed for every subscription. Postpaid and one-time subscriptions end only
|
|
751
|
+
* `immediate`. A prepaid subscription ends `period_end` while its paid term lasts, and
|
|
752
|
+
* `immediate` unless its termination terms allow only the end of the paid term and that term has
|
|
753
|
+
* not ended yet. For `period_end` the paid terms of all the subscriptions must end at the same
|
|
754
|
+
* time.
|
|
755
|
+
*
|
|
756
|
+
* Refused with:
|
|
757
|
+
* - 400 `BILLING_CANCELLATION_INVALID` when `subscription_ids` or `proration_date` is not
|
|
758
|
+
* acceptable (`meta.field`), or the subscriptions do not all belong to one service, project,
|
|
759
|
+
* account and currency;
|
|
760
|
+
* - 409 `BILLING_CANCELLATION_CONFLICT` when a subscription has not started or has ended;
|
|
761
|
+
* - 422 `BILLING_CANCELLATION_MODE_FIXED` when `mode` is not allowed for a subscription, and
|
|
762
|
+
* `BILLING_CANCELLATION_TERMS_UNSET` when a prepaid subscription has no termination terms;
|
|
763
|
+
* both carry `meta.subscription_id`;
|
|
764
|
+
* - 409 `BILLING_CANCELLATION_SCHEDULES_DIFFER` when, for `period_end`, the paid terms end at
|
|
765
|
+
* different times;
|
|
766
|
+
* - 409 `BILLING_SUBSCRIPTION_OPERATION_PENDING` when a subscription is already being canceled
|
|
767
|
+
* (`meta.cancellation_id`) or reclaimed (`meta.job_id`);
|
|
768
|
+
* - 409 `BILLING_ORDER_PAYMENT_IN_FLIGHT` while an online payment for a renewal of one of them
|
|
769
|
+
* is in progress;
|
|
770
|
+
* - 409 `BILLING_CANCELLATION_REFUND_CHANGED` when the refund is no longer
|
|
771
|
+
* `expected_refundable_amount`; quote again.
|
|
772
|
+
*
|
|
773
|
+
* Sending the same request again, for the same subscriptions, mode and amount while that
|
|
774
|
+
* cancellation is still open, returns it with 200 rather than creating another. Renewal orders
|
|
775
|
+
* still waiting for payment are canceled along with it, and automatic renewal is turned off for
|
|
776
|
+
* every subscription in the set, for `period_end` as well as `immediate`.
|
|
777
|
+
*/
|
|
778
|
+
post: operations["create-cancellation"];
|
|
779
|
+
delete?: never;
|
|
780
|
+
options?: never;
|
|
781
|
+
head?: never;
|
|
782
|
+
patch?: never;
|
|
783
|
+
trace?: never;
|
|
784
|
+
};
|
|
785
|
+
"/account/v1/cancellations/{cancellationId}": {
|
|
786
|
+
parameters: {
|
|
787
|
+
query?: never;
|
|
788
|
+
header?: never;
|
|
789
|
+
path: {
|
|
790
|
+
cancellationId: components["parameters"]["CancellationId"];
|
|
791
|
+
};
|
|
792
|
+
cookie?: never;
|
|
793
|
+
};
|
|
794
|
+
/** Get a cancellation */
|
|
795
|
+
get: operations["get-cancellation"];
|
|
796
|
+
put?: never;
|
|
797
|
+
post?: never;
|
|
798
|
+
delete?: never;
|
|
799
|
+
options?: never;
|
|
800
|
+
head?: never;
|
|
801
|
+
patch?: never;
|
|
802
|
+
trace?: never;
|
|
803
|
+
};
|
|
804
|
+
"/account/v1/cancellations/{cancellationId}/withdraw": {
|
|
805
|
+
parameters: {
|
|
806
|
+
query?: never;
|
|
807
|
+
header?: never;
|
|
808
|
+
path: {
|
|
809
|
+
cancellationId: components["parameters"]["CancellationId"];
|
|
810
|
+
};
|
|
811
|
+
cookie?: never;
|
|
812
|
+
};
|
|
813
|
+
get?: never;
|
|
814
|
+
put?: never;
|
|
815
|
+
/**
|
|
816
|
+
* Withdraw a cancellation
|
|
817
|
+
* @description Withdraws the whole cancellation while none of its resources has begun to be released; the
|
|
818
|
+
* subscriptions continue as before, except that automatic renewal, turned off when the
|
|
819
|
+
* cancellation was created, stays off until it is turned on again. After that it is refused with
|
|
820
|
+
* 409 `BILLING_CANCELLATION_CONFLICT`. Withdrawing one that is already withdrawn returns it
|
|
821
|
+
* unchanged.
|
|
822
|
+
*/
|
|
823
|
+
post: operations["withdraw-cancellation"];
|
|
824
|
+
delete?: never;
|
|
825
|
+
options?: never;
|
|
826
|
+
head?: never;
|
|
827
|
+
patch?: never;
|
|
828
|
+
trace?: never;
|
|
829
|
+
};
|
|
830
|
+
"/account/v1/subscriptions/{subscriptionId}/renewal-prices": {
|
|
831
|
+
parameters: {
|
|
832
|
+
query?: never;
|
|
833
|
+
header?: never;
|
|
834
|
+
path: {
|
|
835
|
+
subscriptionId: string;
|
|
836
|
+
};
|
|
837
|
+
cookie?: never;
|
|
838
|
+
};
|
|
839
|
+
/**
|
|
840
|
+
* List the terms this item can be renewed for
|
|
841
|
+
* @description Lists the current renewal agreement and available intervals. The current option preserves recurring_amount; other options use current prices. Amounts cover the whole subscription quantity and exclude tax.
|
|
842
|
+
*/
|
|
843
|
+
get: operations["list-renewal-prices"];
|
|
844
|
+
put?: never;
|
|
845
|
+
post?: never;
|
|
846
|
+
delete?: never;
|
|
847
|
+
options?: never;
|
|
848
|
+
head?: never;
|
|
849
|
+
patch?: never;
|
|
850
|
+
trace?: never;
|
|
851
|
+
};
|
|
852
|
+
"/account/v1/subscriptions/{subscriptionId}/renew": {
|
|
853
|
+
parameters: {
|
|
854
|
+
query?: never;
|
|
855
|
+
header?: never;
|
|
856
|
+
path: {
|
|
857
|
+
subscriptionId: components["parameters"]["SubscriptionId"];
|
|
858
|
+
};
|
|
859
|
+
cookie?: never;
|
|
860
|
+
};
|
|
861
|
+
get?: never;
|
|
862
|
+
put?: never;
|
|
863
|
+
/**
|
|
864
|
+
* Renew subscription
|
|
865
|
+
* @description Purchases prepaid periods from paid_until using the agreed recurring amount, and pays for them at
|
|
866
|
+
* once. A changed interval selects a current price and freezes new terms on the order, applied
|
|
867
|
+
* only after fulfillment. Existing paid periods keep their value.
|
|
868
|
+
*
|
|
869
|
+
* Without `payment_method_id`, the renewal is paid from credit grants and the balance as
|
|
870
|
+
* `use_credits` and `use_balance` allow; when they cannot pay it all, the renewal is refused with
|
|
871
|
+
* `BILLING_INSUFFICIENT_FUNDS` and no order is left. To pay another way, create a renewal order
|
|
872
|
+
* and pay its invoice instead.
|
|
873
|
+
*
|
|
874
|
+
* Save order_id before submitting and query the order after an unknown outcome; duplicate
|
|
875
|
+
* creation conflicts.
|
|
876
|
+
*/
|
|
877
|
+
post: operations["renew-subscription"];
|
|
878
|
+
delete?: never;
|
|
879
|
+
options?: never;
|
|
880
|
+
head?: never;
|
|
881
|
+
patch?: never;
|
|
882
|
+
trace?: never;
|
|
883
|
+
};
|
|
884
|
+
"/account/v1/subscriptions/{subscriptionId}/renewal-orders": {
|
|
885
|
+
parameters: {
|
|
886
|
+
query?: never;
|
|
887
|
+
header?: never;
|
|
888
|
+
path: {
|
|
889
|
+
subscriptionId: components["parameters"]["SubscriptionId"];
|
|
890
|
+
};
|
|
891
|
+
cookie?: never;
|
|
892
|
+
};
|
|
893
|
+
get?: never;
|
|
894
|
+
put?: never;
|
|
895
|
+
/**
|
|
896
|
+
* Create renewal order
|
|
897
|
+
* @description Places a renewal order and issues its invoice without charging anything; pay the invoice to
|
|
898
|
+
* renew. The periods and price are chosen as for renewing. The order can be paid until the
|
|
899
|
+
* current paid period ends, and never after the end of the first period it renews; unpaid by
|
|
900
|
+
* then, it is canceled. While auto-renew is on, the renewal due at the end of the period pays
|
|
901
|
+
* this order instead of placing another.
|
|
902
|
+
*
|
|
903
|
+
* Save `order_id` before submitting and read the order after an unknown outcome; creating it a
|
|
904
|
+
* second time conflicts.
|
|
905
|
+
*/
|
|
906
|
+
post: operations["create-renewal-order"];
|
|
907
|
+
delete?: never;
|
|
908
|
+
options?: never;
|
|
909
|
+
head?: never;
|
|
910
|
+
patch?: never;
|
|
911
|
+
trace?: never;
|
|
912
|
+
};
|
|
913
|
+
"/account/v1/subscriptions/{subscriptionId}/auto-renew": {
|
|
914
|
+
parameters: {
|
|
915
|
+
query?: never;
|
|
916
|
+
header?: never;
|
|
917
|
+
path: {
|
|
918
|
+
subscriptionId: components["parameters"]["SubscriptionId"];
|
|
919
|
+
};
|
|
920
|
+
cookie?: never;
|
|
921
|
+
};
|
|
922
|
+
get?: never;
|
|
923
|
+
/**
|
|
924
|
+
* Set auto renew
|
|
925
|
+
* @description Controls automatic prepaid renewal. Disabling it does not shorten paid_until and still permits
|
|
926
|
+
* manual renewal. Postpaid subscriptions do not renew and keep this false.
|
|
927
|
+
*
|
|
928
|
+
* While the subscription has an open cancellation, turning it on or off is refused with 409
|
|
929
|
+
* `BILLING_SUBSCRIPTION_OPERATION_PENDING` and `meta.cancellation_id`: creating the cancellation
|
|
930
|
+
* turned it off, and withdrawing the cancellation does not turn it back on.
|
|
931
|
+
*/
|
|
932
|
+
put: operations["set-auto-renew"];
|
|
933
|
+
post?: never;
|
|
934
|
+
delete?: never;
|
|
935
|
+
options?: never;
|
|
936
|
+
head?: never;
|
|
937
|
+
patch?: never;
|
|
938
|
+
trace?: never;
|
|
939
|
+
};
|
|
940
|
+
"/account/v1/promotion-codes/preview": {
|
|
941
|
+
parameters: {
|
|
942
|
+
query?: never;
|
|
943
|
+
header?: never;
|
|
944
|
+
path?: never;
|
|
945
|
+
cookie?: never;
|
|
946
|
+
};
|
|
947
|
+
get?: never;
|
|
948
|
+
put?: never;
|
|
949
|
+
/**
|
|
950
|
+
* Preview promotion code
|
|
951
|
+
* @description Nothing is recorded and the code is not consumed. Use it to show the customer the effect
|
|
952
|
+
* before they commit.
|
|
953
|
+
*/
|
|
954
|
+
post: operations["preview-promotion-code"];
|
|
955
|
+
delete?: never;
|
|
956
|
+
options?: never;
|
|
957
|
+
head?: never;
|
|
958
|
+
patch?: never;
|
|
959
|
+
trace?: never;
|
|
960
|
+
};
|
|
961
|
+
"/account/v1/allowances": {
|
|
962
|
+
parameters: {
|
|
963
|
+
query?: never;
|
|
964
|
+
header?: never;
|
|
965
|
+
path?: never;
|
|
966
|
+
cookie?: never;
|
|
967
|
+
};
|
|
968
|
+
/**
|
|
969
|
+
* List allowances
|
|
970
|
+
* @description Lists remaining usage quantities, such as bytes, seconds or tokens. Applicable allowances are
|
|
971
|
+
* consumed before usage is charged. Lower priority values are consumed first, followed by earlier
|
|
972
|
+
* expiry and earlier issuance.
|
|
973
|
+
*
|
|
974
|
+
* Unused quantity expires without a refund or carry-over. Promotional allowances apply to usage paid
|
|
975
|
+
* by their holding account. Included allowances apply only to the associated subscription, including
|
|
976
|
+
* after its project moves to another billing account.
|
|
977
|
+
*/
|
|
978
|
+
get: operations["list-allowances"];
|
|
979
|
+
put?: never;
|
|
980
|
+
post?: never;
|
|
981
|
+
delete?: never;
|
|
982
|
+
options?: never;
|
|
983
|
+
head?: never;
|
|
984
|
+
patch?: never;
|
|
985
|
+
trace?: never;
|
|
986
|
+
};
|
|
987
|
+
"/account/v1/orders": {
|
|
988
|
+
parameters: {
|
|
989
|
+
query?: never;
|
|
990
|
+
header?: never;
|
|
991
|
+
path?: never;
|
|
992
|
+
cookie?: never;
|
|
993
|
+
};
|
|
994
|
+
/**
|
|
995
|
+
* List orders
|
|
996
|
+
* @description Lists acceptance status and associated invoice amounts. Pending may be unpaid or paid; active means accepted, not delivered. Only pending orders expire at expires_at.
|
|
997
|
+
*/
|
|
998
|
+
get: operations["list-orders"];
|
|
999
|
+
put?: never;
|
|
1000
|
+
post?: never;
|
|
1001
|
+
delete?: never;
|
|
1002
|
+
options?: never;
|
|
1003
|
+
head?: never;
|
|
1004
|
+
patch?: never;
|
|
1005
|
+
trace?: never;
|
|
1006
|
+
};
|
|
1007
|
+
"/account/v1/orders/{orderId}": {
|
|
1008
|
+
parameters: {
|
|
1009
|
+
query?: never;
|
|
1010
|
+
header?: never;
|
|
1011
|
+
path: {
|
|
1012
|
+
orderId: components["parameters"]["OrderId"];
|
|
1013
|
+
};
|
|
1014
|
+
cookie?: never;
|
|
1015
|
+
};
|
|
1016
|
+
/** Get order */
|
|
1017
|
+
get: operations["get-order"];
|
|
1018
|
+
put?: never;
|
|
1019
|
+
post?: never;
|
|
1020
|
+
delete?: never;
|
|
1021
|
+
options?: never;
|
|
1022
|
+
head?: never;
|
|
1023
|
+
patch?: never;
|
|
1024
|
+
trace?: never;
|
|
1025
|
+
};
|
|
1026
|
+
"/account/v1/orders/{orderId}/cancel": {
|
|
1027
|
+
parameters: {
|
|
1028
|
+
query?: never;
|
|
1029
|
+
header?: never;
|
|
1030
|
+
path: {
|
|
1031
|
+
orderId: components["parameters"]["OrderId"];
|
|
1032
|
+
};
|
|
1033
|
+
cookie?: never;
|
|
1034
|
+
};
|
|
1035
|
+
get?: never;
|
|
1036
|
+
put?: never;
|
|
1037
|
+
/**
|
|
1038
|
+
* Cancel order
|
|
1039
|
+
* @description Withdraws an order that is not paid in full, and tells the service that placed it, so that
|
|
1040
|
+
* nothing is delivered. An order with nothing paid becomes `canceled` and its invoice is voided.
|
|
1041
|
+
* What was already paid toward it, from credit grants or the balance, is returned the way it was
|
|
1042
|
+
* paid, and the order becomes `failed`; its invoice is voided once everything paid has been
|
|
1043
|
+
* returned. Either way `cancel_reason` is `requested_by_customer`.
|
|
1044
|
+
* Canceling an order that is already canceled or failed returns it unchanged.
|
|
1045
|
+
*
|
|
1046
|
+
* Refused with 409 and `BILLING_PAID_ORDER_NOT_CANCELABLE` once the invoice is paid in full,
|
|
1047
|
+
* `BILLING_ORDER_ALREADY_ACCEPTED` once the order has been accepted,
|
|
1048
|
+
* `BILLING_ORDER_PAYMENT_IN_FLIGHT` while an online payment for it is in progress, and
|
|
1049
|
+
* `BILLING_SCHEDULED_CHANGE_NOT_CANCELABLE` for a change that takes effect at the end of the
|
|
1050
|
+
* period, which only the service that placed it can call off.
|
|
1051
|
+
*/
|
|
1052
|
+
post: operations["cancel-order"];
|
|
1053
|
+
delete?: never;
|
|
1054
|
+
options?: never;
|
|
1055
|
+
head?: never;
|
|
1056
|
+
patch?: never;
|
|
1057
|
+
trace?: never;
|
|
1058
|
+
};
|
|
1059
|
+
"/account/v1/orders/{orderId}/items": {
|
|
1060
|
+
parameters: {
|
|
1061
|
+
query?: never;
|
|
1062
|
+
header?: never;
|
|
1063
|
+
path: {
|
|
1064
|
+
orderId: components["parameters"]["OrderId"];
|
|
1065
|
+
};
|
|
1066
|
+
cookie?: never;
|
|
1067
|
+
};
|
|
1068
|
+
/**
|
|
1069
|
+
* List order items
|
|
1070
|
+
* @description One entry per item bought, with the price charged and the period it covers.
|
|
1071
|
+
*/
|
|
1072
|
+
get: operations["list-order-items"];
|
|
1073
|
+
put?: never;
|
|
1074
|
+
post?: never;
|
|
1075
|
+
delete?: never;
|
|
1076
|
+
options?: never;
|
|
1077
|
+
head?: never;
|
|
1078
|
+
patch?: never;
|
|
1079
|
+
trace?: never;
|
|
1080
|
+
};
|
|
1081
|
+
"/account/v1/entitlements": {
|
|
1082
|
+
parameters: {
|
|
1083
|
+
query?: never;
|
|
1084
|
+
header?: never;
|
|
1085
|
+
path?: never;
|
|
1086
|
+
cookie?: never;
|
|
1087
|
+
};
|
|
1088
|
+
/**
|
|
1089
|
+
* List entitlements
|
|
1090
|
+
* @description Capabilities that come with what has been bought. A capability that is not held simply
|
|
1091
|
+
* does not appear, so that "this does not exist" and "this has not been bought" cannot be
|
|
1092
|
+
* confused.
|
|
1093
|
+
*
|
|
1094
|
+
* Derived from live subscriptions rather than stored, so this always agrees with what is
|
|
1095
|
+
* being paid for. It stops being listed as soon as the subscription providing it ends.
|
|
1096
|
+
*/
|
|
1097
|
+
get: operations["list-entitlements"];
|
|
1098
|
+
put?: never;
|
|
1099
|
+
post?: never;
|
|
1100
|
+
delete?: never;
|
|
1101
|
+
options?: never;
|
|
1102
|
+
head?: never;
|
|
1103
|
+
patch?: never;
|
|
1104
|
+
trace?: never;
|
|
1105
|
+
};
|
|
1106
|
+
}
|
|
1107
|
+
export type webhooks = Record<string, never>;
|
|
1108
|
+
export interface components {
|
|
1109
|
+
schemas: {
|
|
1110
|
+
/**
|
|
1111
|
+
* @description Whether a fulfilled purchase may end immediately or only after its paid term. Does not grant a refund. When absent, the terms are not configured and termination requires review.
|
|
1112
|
+
* @enum {string}
|
|
1113
|
+
*/
|
|
1114
|
+
TerminationPolicy: "immediate" | "period_end";
|
|
1115
|
+
/**
|
|
1116
|
+
* @description Prorated returns the unused value of paid service periods using integer-second duration ratios. Setup fees are excluded. Tax and funds follow the original invoice and payment sources.
|
|
1117
|
+
* @enum {string}
|
|
1118
|
+
*/
|
|
1119
|
+
RefundPolicy: "none" | "prorated";
|
|
1120
|
+
/** @description Specify renewals for existing subscriptions, or one cancellation on its own. */
|
|
1121
|
+
QuoteRequest: {
|
|
1122
|
+
renewals?: components["schemas"]["QuoteRenewal"][];
|
|
1123
|
+
cancellation?: components["schemas"]["QuoteCancellation"];
|
|
1124
|
+
};
|
|
1125
|
+
/**
|
|
1126
|
+
* @description Price renewing a prepaid subscription. Give `price_id`, or `interval` with
|
|
1127
|
+
* `interval_count`, to renew for another term at the price currently sold for it. Naming
|
|
1128
|
+
* the current term, or giving neither, renews at the agreed amount.
|
|
1129
|
+
*/
|
|
1130
|
+
QuoteRenewal: {
|
|
1131
|
+
/** Format: uuid */
|
|
1132
|
+
subscription_id: string;
|
|
1133
|
+
/** Format: uuid */
|
|
1134
|
+
price_id?: string;
|
|
1135
|
+
/** @enum {string} */
|
|
1136
|
+
interval?: "day" | "month" | "year";
|
|
1137
|
+
interval_count?: number;
|
|
1138
|
+
/**
|
|
1139
|
+
* @description How many consecutive periods to renew for.
|
|
1140
|
+
* @default 1
|
|
1141
|
+
*/
|
|
1142
|
+
periods?: number;
|
|
1143
|
+
};
|
|
1144
|
+
/**
|
|
1145
|
+
* @description What renewing would charge. Renewing the same subscription for the same term and number
|
|
1146
|
+
* of periods charges exactly `total`, unless prices or the discounts the account holds
|
|
1147
|
+
* change in between.
|
|
1148
|
+
*/
|
|
1149
|
+
QuoteRenewalResult: {
|
|
1150
|
+
/** @description Which renewal of the request this answers. */
|
|
1151
|
+
index: number;
|
|
1152
|
+
/** Format: uuid */
|
|
1153
|
+
subscription_id: string;
|
|
1154
|
+
/**
|
|
1155
|
+
* Format: uuid
|
|
1156
|
+
* @description The price the renewal is charged under.
|
|
1157
|
+
*/
|
|
1158
|
+
price_id: string;
|
|
1159
|
+
/** @enum {string} */
|
|
1160
|
+
interval: "day" | "month" | "year";
|
|
1161
|
+
interval_count: number;
|
|
1162
|
+
periods: number;
|
|
1163
|
+
/**
|
|
1164
|
+
* @description The price of the periods before the discounts the account holds. A discount the
|
|
1165
|
+
* subscription already carries is reflected here. Contains tax only where the price
|
|
1166
|
+
* itself includes it.
|
|
1167
|
+
*/
|
|
1168
|
+
amount: components["schemas"]["Money"];
|
|
1169
|
+
/** @description The reduction from a discount the account holds. */
|
|
1170
|
+
discount_amount: components["schemas"]["Money"];
|
|
1171
|
+
/** @description Tax on the discounted amount. */
|
|
1172
|
+
tax_amount: components["schemas"]["Money"];
|
|
1173
|
+
/** @description The part of `tax_amount` already contained in `amount`. */
|
|
1174
|
+
tax_included_amount: components["schemas"]["Money"];
|
|
1175
|
+
/**
|
|
1176
|
+
* @description What renewing would charge: `amount` less `discount_amount`, plus `tax_amount`, less
|
|
1177
|
+
* `tax_included_amount`.
|
|
1178
|
+
*/
|
|
1179
|
+
total: components["schemas"]["Money"];
|
|
1180
|
+
};
|
|
1181
|
+
Quote: {
|
|
1182
|
+
renewals?: components["schemas"]["QuoteRenewalResult"][];
|
|
1183
|
+
/** @description What the cancellation requested would return. Present only when one was requested. */
|
|
1184
|
+
cancellation?: components["schemas"]["CancellationRefundPreview"];
|
|
1185
|
+
/**
|
|
1186
|
+
* @description What the renewals would charge in total. Amounts to be returned are not netted off it: a
|
|
1187
|
+
* quote of a cancellation alone has a total of zero, and what it would return is in
|
|
1188
|
+
* `cancellation`.
|
|
1189
|
+
*/
|
|
1190
|
+
total: components["schemas"]["Money"];
|
|
1191
|
+
currency: string;
|
|
1192
|
+
};
|
|
1193
|
+
/**
|
|
1194
|
+
* @description A cancellation to quote: what ending these subscriptions together would return. One mode per
|
|
1195
|
+
* request; to compare, quote `immediate` and `period_end` separately.
|
|
1196
|
+
*/
|
|
1197
|
+
QuoteCancellation: {
|
|
1198
|
+
/** @description The subscriptions to end together, all of one service. Every subscription released with a resource must be included. */
|
|
1199
|
+
subscription_ids: string[];
|
|
1200
|
+
mode: components["schemas"]["TerminationPolicy"];
|
|
1201
|
+
};
|
|
1202
|
+
/**
|
|
1203
|
+
* @description What the cancellation would return, subscription by subscription and in total, as of now. Give
|
|
1204
|
+
* `proration_date` and `refundable_amount` when creating the cancellation.
|
|
1205
|
+
*
|
|
1206
|
+
* - `unused_amount`: before tax, the value of the paid service still unused, whatever the refund
|
|
1207
|
+
* terms say.
|
|
1208
|
+
* - `refundable_amount`: what is returned the way it was paid, including the tax paid on it;
|
|
1209
|
+
* `refund_amount` plus `credit_amount`.
|
|
1210
|
+
* - `refund_amount`: the part returned to the balance or to the payment method.
|
|
1211
|
+
* - `credit_amount`: the part restored to the credit grants that paid.
|
|
1212
|
+
* - `tax_amount`: the tax included in `refundable_amount`.
|
|
1213
|
+
* - `forfeited_amount`: before tax, the part of `unused_amount` the refund terms do not return.
|
|
1214
|
+
*
|
|
1215
|
+
* Postpaid and one-time subscriptions show zero; usage until release is charged as usual.
|
|
1216
|
+
*/
|
|
1217
|
+
CancellationRefundPreview: {
|
|
1218
|
+
mode: components["schemas"]["TerminationPolicy"];
|
|
1219
|
+
/**
|
|
1220
|
+
* Format: date-time
|
|
1221
|
+
* @description For `period_end`, when release begins, the end of the paid terms.
|
|
1222
|
+
*/
|
|
1223
|
+
scheduled_at?: string;
|
|
1224
|
+
/**
|
|
1225
|
+
* Format: date-time
|
|
1226
|
+
* @description For `immediate`, the second the refund is computed as of. Give it when creating the cancellation.
|
|
1227
|
+
*/
|
|
1228
|
+
proration_date?: string;
|
|
1229
|
+
currency: string;
|
|
1230
|
+
unused_amount: components["schemas"]["Money"];
|
|
1231
|
+
refundable_amount: components["schemas"]["Money"];
|
|
1232
|
+
refund_amount: components["schemas"]["Money"];
|
|
1233
|
+
credit_amount: components["schemas"]["Money"];
|
|
1234
|
+
tax_amount: components["schemas"]["Money"];
|
|
1235
|
+
forfeited_amount: components["schemas"]["Money"];
|
|
1236
|
+
items: components["schemas"]["CancellationRefundPreviewItem"][];
|
|
1237
|
+
};
|
|
1238
|
+
/** @description One subscription of the quoted cancellation. The amounts mean what they mean in the total. */
|
|
1239
|
+
CancellationRefundPreviewItem: {
|
|
1240
|
+
/** Format: uuid */
|
|
1241
|
+
subscription_id: string;
|
|
1242
|
+
/** Format: uuid */
|
|
1243
|
+
plan_id: string;
|
|
1244
|
+
plan_name: string;
|
|
1245
|
+
/** @description The project and its current name, for display. Absent for a purchase at account level, and when the project details cannot be read at the moment. */
|
|
1246
|
+
project?: components["schemas"]["NamedIdentity"] | null;
|
|
1247
|
+
/** @enum {string} */
|
|
1248
|
+
billing_type: "postpaid" | "prepaid" | "one_time";
|
|
1249
|
+
/**
|
|
1250
|
+
* @description Whether automatic renewal is on now. Creating the cancellation turns it off, and withdrawing
|
|
1251
|
+
* the cancellation does not turn it back on. Always false for a subscription that is not
|
|
1252
|
+
* `prepaid`.
|
|
1253
|
+
*/
|
|
1254
|
+
auto_renew: boolean;
|
|
1255
|
+
unused_amount: components["schemas"]["Money"];
|
|
1256
|
+
refundable_amount: components["schemas"]["Money"];
|
|
1257
|
+
refund_amount: components["schemas"]["Money"];
|
|
1258
|
+
credit_amount: components["schemas"]["Money"];
|
|
1259
|
+
tax_amount: components["schemas"]["Money"];
|
|
1260
|
+
forfeited_amount: components["schemas"]["Money"];
|
|
1261
|
+
};
|
|
1262
|
+
CancellationCreate: {
|
|
1263
|
+
/** @description As in the quote. */
|
|
1264
|
+
subscription_ids: string[];
|
|
1265
|
+
mode: components["schemas"]["TerminationPolicy"];
|
|
1266
|
+
/**
|
|
1267
|
+
* Format: date-time
|
|
1268
|
+
* @description For `immediate`, the `proration_date` of the quote: a whole second, not in the future and
|
|
1269
|
+
* at most ten minutes old. The refund is computed as of it. Now when omitted.
|
|
1270
|
+
*/
|
|
1271
|
+
proration_date?: string;
|
|
1272
|
+
/** @description The `refundable_amount` of the quote. The cancellation is refused when the refund differs. */
|
|
1273
|
+
expected_refundable_amount: string;
|
|
1274
|
+
/** @description A note from the account holder. It is kept with the cancellation and not shown elsewhere. */
|
|
1275
|
+
reason?: string;
|
|
1276
|
+
};
|
|
1277
|
+
/**
|
|
1278
|
+
* @description One cancellation of a set of subscriptions of one service, released together at one time.
|
|
1279
|
+
*
|
|
1280
|
+
* - `requested`: `immediate`, release has not begun.
|
|
1281
|
+
* - `scheduled`: `period_end`, waiting for `scheduled_at`.
|
|
1282
|
+
* - `releasing`: release has begun; it can no longer be withdrawn.
|
|
1283
|
+
* - `completed`: every subscription has ended and its refund has been made.
|
|
1284
|
+
* - `canceled`: withdrawn before release began; the subscriptions continue.
|
|
1285
|
+
* - `failed`: the service could not carry it out, for the reason in `failure_code`; the
|
|
1286
|
+
* subscriptions continue and can be canceled again.
|
|
1287
|
+
*/
|
|
1288
|
+
Cancellation: {
|
|
1289
|
+
/** Format: uuid */
|
|
1290
|
+
id: string;
|
|
1291
|
+
/** @enum {string} */
|
|
1292
|
+
status: "requested" | "scheduled" | "releasing" | "completed" | "canceled" | "failed";
|
|
1293
|
+
mode: components["schemas"]["TerminationPolicy"];
|
|
1294
|
+
/** Format: date-time */
|
|
1295
|
+
scheduled_at?: string;
|
|
1296
|
+
/**
|
|
1297
|
+
* Format: date-time
|
|
1298
|
+
* @description For `immediate`, the second the refund is computed as of.
|
|
1299
|
+
*/
|
|
1300
|
+
proration_date?: string;
|
|
1301
|
+
/**
|
|
1302
|
+
* @description Who asked for it. `project_deletion` means the project was deleted.
|
|
1303
|
+
* @enum {string}
|
|
1304
|
+
*/
|
|
1305
|
+
origin: "customer" | "operator" | "project_deletion";
|
|
1306
|
+
/**
|
|
1307
|
+
* Format: int64
|
|
1308
|
+
* @description The billing account that paid for these subscriptions when the cancellation was created: the
|
|
1309
|
+
* account of an account-level purchase, or the account the project was linked to.
|
|
1310
|
+
*/
|
|
1311
|
+
billing_account_id: number;
|
|
1312
|
+
currency: string;
|
|
1313
|
+
/** @description The refund confirmed when it was created. Absent when the platform created it. */
|
|
1314
|
+
expected_refundable_amount?: components["schemas"]["Money"];
|
|
1315
|
+
/**
|
|
1316
|
+
* @description Present with `failed`. A code of the service that provides the resources, such as a disk
|
|
1317
|
+
* that can only be released with its server. Clients map it to their own wording.
|
|
1318
|
+
*/
|
|
1319
|
+
failure_code?: string;
|
|
1320
|
+
/** Format: date-time */
|
|
1321
|
+
requested_at: string;
|
|
1322
|
+
/** Format: date-time */
|
|
1323
|
+
completed_at?: string;
|
|
1324
|
+
/** Format: date-time */
|
|
1325
|
+
canceled_at?: string;
|
|
1326
|
+
items: components["schemas"]["CancellationItem"][];
|
|
1327
|
+
};
|
|
1328
|
+
/** @description One subscription of the cancellation. */
|
|
1329
|
+
CancellationItem: {
|
|
1330
|
+
/**
|
|
1331
|
+
* Format: uuid
|
|
1332
|
+
* @description The cancellation request of this subscription, the same as `Subscription.cancellation_request.id`.
|
|
1333
|
+
*/
|
|
1334
|
+
id: string;
|
|
1335
|
+
/** Format: uuid */
|
|
1336
|
+
subscription_id: string;
|
|
1337
|
+
/** Format: uuid */
|
|
1338
|
+
plan_id: string;
|
|
1339
|
+
plan_name: string;
|
|
1340
|
+
/**
|
|
1341
|
+
* @description How the subscription is paid for. Only a `prepaid` subscription renews automatically; creating
|
|
1342
|
+
* the cancellation turned that off, and withdrawing the cancellation leaves it off.
|
|
1343
|
+
* @enum {string}
|
|
1344
|
+
*/
|
|
1345
|
+
billing_type: "postpaid" | "prepaid" | "one_time";
|
|
1346
|
+
/** @enum {string} */
|
|
1347
|
+
status: "requested" | "scheduled" | "releasing" | "completed" | "canceled" | "failed";
|
|
1348
|
+
/** Format: date-time */
|
|
1349
|
+
release_started_at?: string;
|
|
1350
|
+
/**
|
|
1351
|
+
* Format: date-time
|
|
1352
|
+
* @description When the service ended, as confirmed by the service that provides it.
|
|
1353
|
+
*/
|
|
1354
|
+
effective_at?: string;
|
|
1355
|
+
/** @description Present with `completed`. The part of the refund returned to the account balance. */
|
|
1356
|
+
balance_amount?: components["schemas"]["Money"];
|
|
1357
|
+
/** @description Present with `completed`. The part restored to the credit grants that paid. */
|
|
1358
|
+
credit_amount?: components["schemas"]["Money"];
|
|
1359
|
+
/** @description Present with `completed`. The part returned to the payment method it was paid with. */
|
|
1360
|
+
gateway_amount?: components["schemas"]["Money"];
|
|
1361
|
+
};
|
|
1362
|
+
CancellationList: {
|
|
1363
|
+
items: components["schemas"]["Cancellation"][];
|
|
1364
|
+
pagination: components["schemas"]["OffsetPagination"];
|
|
1365
|
+
};
|
|
1366
|
+
/** @description A cancellation request for the original purchase. scheduled_at is the intended time; effective_at is the confirmed end of service. The request alone does not stop metering or issue a refund. */
|
|
1367
|
+
CancellationRequest: {
|
|
1368
|
+
reason?: string;
|
|
1369
|
+
/**
|
|
1370
|
+
* Format: uuid
|
|
1371
|
+
* @description The cancellation this request belongs to, with the other subscriptions released together.
|
|
1372
|
+
*/
|
|
1373
|
+
cancellation_id?: string;
|
|
1374
|
+
/** Format: uuid */
|
|
1375
|
+
id: string;
|
|
1376
|
+
/** Format: uuid */
|
|
1377
|
+
subscription_id: string;
|
|
1378
|
+
/** @enum {string} */
|
|
1379
|
+
status: "requested" | "scheduled" | "releasing" | "failed" | "completed" | "canceled";
|
|
1380
|
+
/** @enum {string} */
|
|
1381
|
+
mode: "immediate" | "period_end";
|
|
1382
|
+
/** Format: date-time */
|
|
1383
|
+
requested_at: string;
|
|
1384
|
+
/** Format: date-time */
|
|
1385
|
+
scheduled_at?: string;
|
|
1386
|
+
/** Format: date-time */
|
|
1387
|
+
effective_at?: string;
|
|
1388
|
+
/** Format: date-time */
|
|
1389
|
+
completed_at?: string;
|
|
1390
|
+
/** Format: date-time */
|
|
1391
|
+
release_started_at?: string;
|
|
1392
|
+
/** Format: date-time */
|
|
1393
|
+
canceled_at?: string;
|
|
1394
|
+
forfeit_remaining_value: boolean;
|
|
1395
|
+
failure_code?: string;
|
|
1396
|
+
failure_reason?: string;
|
|
1397
|
+
};
|
|
1398
|
+
Error: {
|
|
1399
|
+
code?: string;
|
|
1400
|
+
message: string;
|
|
1401
|
+
/**
|
|
1402
|
+
* @description What a given `code` carries alongside the message. The keys depend on the code,
|
|
1403
|
+
* and a client that does not recognise one ignores it.
|
|
1404
|
+
*/
|
|
1405
|
+
meta?: {
|
|
1406
|
+
[key: string]: unknown;
|
|
1407
|
+
};
|
|
1408
|
+
/** Format: int64 */
|
|
1409
|
+
status: number;
|
|
1410
|
+
};
|
|
1411
|
+
Product: {
|
|
1412
|
+
id: components["schemas"]["ProductID"];
|
|
1413
|
+
name: string;
|
|
1414
|
+
description?: string;
|
|
1415
|
+
};
|
|
1416
|
+
/** @description Immutable platform service identifier, such as compute, canopy or assistant. */
|
|
1417
|
+
ProductID: string;
|
|
1418
|
+
/**
|
|
1419
|
+
* @description Identify a price directly, or select a price for a plan. For each resource give its ID or lookup key, never both. Lookup keys require product_id.
|
|
1420
|
+
*
|
|
1421
|
+
* A line that gives a meter, `dimensions` or `duration_seconds` estimates usage and is
|
|
1422
|
+
* priced only at a postpaid price. Such a line is refused with HTTP 400
|
|
1423
|
+
* `BILLING_PURCHASE_INVALID` when `price_type` is `prepaid` or `one_time`, or when the price
|
|
1424
|
+
* it names is not postpaid; `meta.field` is `price_type`, `price_id` or `price_lookup_key`
|
|
1425
|
+
* accordingly. When the plan has no postpaid price, the line is returned unpriced with
|
|
1426
|
+
* `no_price`.
|
|
1427
|
+
*/
|
|
1428
|
+
QuoteLine: {
|
|
1429
|
+
price_lookup_key?: string;
|
|
1430
|
+
plan_lookup_key?: string;
|
|
1431
|
+
meter_lookup_key?: string;
|
|
1432
|
+
/** Format: uuid */
|
|
1433
|
+
price_id?: string;
|
|
1434
|
+
product_id?: components["schemas"]["ProductID"];
|
|
1435
|
+
/** Format: uuid */
|
|
1436
|
+
plan_id?: string;
|
|
1437
|
+
/** Format: uuid */
|
|
1438
|
+
meter_id?: string;
|
|
1439
|
+
/**
|
|
1440
|
+
* @description The attributes the price depends on — region, instance type, token class.
|
|
1441
|
+
*
|
|
1442
|
+
* Required when the price draws its rates from a price list, which is how anything
|
|
1443
|
+
* sold by region or by machine type is priced. A price that carries a single unit
|
|
1444
|
+
* amount, or a ladder, has no attributes to give and takes none.
|
|
1445
|
+
*
|
|
1446
|
+
* Every attribute the meter declares must be present. A combination with no rate
|
|
1447
|
+
* covering it is refused rather than priced at zero.
|
|
1448
|
+
*/
|
|
1449
|
+
dimensions?: {
|
|
1450
|
+
[key: string]: string;
|
|
1451
|
+
};
|
|
1452
|
+
/**
|
|
1453
|
+
* @description Narrows the selection when a plan offers more than one billing type.
|
|
1454
|
+
* @enum {string}
|
|
1455
|
+
*/
|
|
1456
|
+
price_type?: "postpaid" | "prepaid" | "one_time";
|
|
1457
|
+
/** @enum {string} */
|
|
1458
|
+
interval?: "none" | "day" | "month" | "year";
|
|
1459
|
+
interval_count?: number;
|
|
1460
|
+
quantity: string;
|
|
1461
|
+
/**
|
|
1462
|
+
* Format: int64
|
|
1463
|
+
* @description For metered items, how long to price for. This allows an estimate such as "about
|
|
1464
|
+
* this much per month" to be shown before anything exists. The priced quantity is
|
|
1465
|
+
* `quantity` multiplied by this duration.
|
|
1466
|
+
*/
|
|
1467
|
+
duration_seconds?: number;
|
|
1468
|
+
};
|
|
1469
|
+
BillingAccount: {
|
|
1470
|
+
/** Format: int64 */
|
|
1471
|
+
id: number;
|
|
1472
|
+
/** @description What you call this account. */
|
|
1473
|
+
name?: string;
|
|
1474
|
+
/** @description The name invoices are made out to. Copied onto each invoice when it is issued. */
|
|
1475
|
+
legal_name?: string;
|
|
1476
|
+
/** @description Where invoices are sent. */
|
|
1477
|
+
email?: string;
|
|
1478
|
+
address_line1?: string;
|
|
1479
|
+
address_line2?: string;
|
|
1480
|
+
address_city?: string;
|
|
1481
|
+
address_state?: string;
|
|
1482
|
+
address_postal_code?: string;
|
|
1483
|
+
/** @description Two-letter code. */
|
|
1484
|
+
address_country?: string;
|
|
1485
|
+
tax_id?: string;
|
|
1486
|
+
/** @description Fixed when the account was opened. */
|
|
1487
|
+
currency: string;
|
|
1488
|
+
/** @enum {string} */
|
|
1489
|
+
status: "active" | "suspended" | "closed";
|
|
1490
|
+
/**
|
|
1491
|
+
* @description How far past the suspension threshold this account may go before its resources are
|
|
1492
|
+
* suspended. "0" means none: the account is suspended as soon as it crosses the threshold.
|
|
1493
|
+
*/
|
|
1494
|
+
grace_amount?: string;
|
|
1495
|
+
/**
|
|
1496
|
+
* Format: int64
|
|
1497
|
+
* @description How long this account has to top up after crossing the suspension threshold.
|
|
1498
|
+
* 0 means none. Whichever runs out first — this or grace_amount — ends the grace.
|
|
1499
|
+
*/
|
|
1500
|
+
grace_period_seconds?: number;
|
|
1501
|
+
/** Format: date-time */
|
|
1502
|
+
created_at: string;
|
|
1503
|
+
};
|
|
1504
|
+
/** @description A currency a billing account can be opened in. */
|
|
1505
|
+
Currency: {
|
|
1506
|
+
/** @description ISO 4217 alpha-3, uppercase. */
|
|
1507
|
+
code: string;
|
|
1508
|
+
/**
|
|
1509
|
+
* Format: int32
|
|
1510
|
+
* @description Decimal places of the currency, the ISO 4217 minor unit.
|
|
1511
|
+
*/
|
|
1512
|
+
exponent: number;
|
|
1513
|
+
name: string;
|
|
1514
|
+
/** @description The smallest top-up accepted. Zero means no lower bound. */
|
|
1515
|
+
minimum_top_up: components["schemas"]["Money"];
|
|
1516
|
+
};
|
|
1517
|
+
CurrencyList: {
|
|
1518
|
+
items: components["schemas"]["Currency"][];
|
|
1519
|
+
pagination: components["schemas"]["OffsetPagination"];
|
|
1520
|
+
};
|
|
1521
|
+
BillingAccountCreate: {
|
|
1522
|
+
currency: string;
|
|
1523
|
+
name?: string;
|
|
1524
|
+
legal_name?: string;
|
|
1525
|
+
email?: string;
|
|
1526
|
+
};
|
|
1527
|
+
BillingAccountUpdate: {
|
|
1528
|
+
name?: string;
|
|
1529
|
+
legal_name?: string;
|
|
1530
|
+
email?: string;
|
|
1531
|
+
address_line1?: string;
|
|
1532
|
+
address_line2?: string;
|
|
1533
|
+
address_city?: string;
|
|
1534
|
+
address_state?: string;
|
|
1535
|
+
address_postal_code?: string;
|
|
1536
|
+
address_country?: string;
|
|
1537
|
+
tax_id?: string;
|
|
1538
|
+
};
|
|
1539
|
+
BillingAccountList: {
|
|
1540
|
+
items: components["schemas"]["BillingAccount"][];
|
|
1541
|
+
pagination: components["schemas"]["OffsetPagination"];
|
|
1542
|
+
};
|
|
1543
|
+
/** @description Account balance, credits, and unpaid charges are reported separately. */
|
|
1544
|
+
AccountBalance: {
|
|
1545
|
+
/** Format: int64 */
|
|
1546
|
+
billing_account_id: number;
|
|
1547
|
+
currency: string;
|
|
1548
|
+
/**
|
|
1549
|
+
* @description Prepaid funds in the account currency, excluding credits. May be negative after a payment
|
|
1550
|
+
* dispute. Outstanding charges are reported separately in due; this value is not a withdrawal quote.
|
|
1551
|
+
*/
|
|
1552
|
+
balance: components["schemas"]["Money"];
|
|
1553
|
+
/**
|
|
1554
|
+
* @description The recorded remaining credit, including restricted grants. It is not withdrawable
|
|
1555
|
+
* and is not part of balance. credit_groups describes currently valid credit by permitted use; a positive
|
|
1556
|
+
* credits balance does not imply that due is zero.
|
|
1557
|
+
*/
|
|
1558
|
+
credits: components["schemas"]["Money"];
|
|
1559
|
+
/**
|
|
1560
|
+
* @description balance plus credits, the sum shown as the account's funds. Credits count at their recorded remaining
|
|
1561
|
+
* amount, including restricted grants that only pay for what they allow, so total is an upper bound of what
|
|
1562
|
+
* the account can pay with rather than a withdrawable amount. due is reported separately and is not subtracted.
|
|
1563
|
+
*/
|
|
1564
|
+
total: components["schemas"]["Money"];
|
|
1565
|
+
/**
|
|
1566
|
+
* @description The part of currently valid credit that only pays for what its restrictions allow, such as a single
|
|
1567
|
+
* service, a billing type or a first purchase. The rest of the valid credit pays for anything on the account.
|
|
1568
|
+
* Included in credits and therefore in total.
|
|
1569
|
+
*/
|
|
1570
|
+
restricted_credits: components["schemas"]["Money"];
|
|
1571
|
+
/**
|
|
1572
|
+
* @description Currently valid, unspent credit grouped by permitted use. Restrictions and
|
|
1573
|
+
* validity dates determine which charges a group can cover, so these groups are not a general
|
|
1574
|
+
* spendable balance and may differ from the recorded credits total.
|
|
1575
|
+
*/
|
|
1576
|
+
credit_groups: components["schemas"]["CreditGroup"][];
|
|
1577
|
+
/**
|
|
1578
|
+
* @description Owed and not yet paid: metered usage that balance and applicable credit could not cover as it was
|
|
1579
|
+
* charged, and issued usage invoices still unpaid. The account is in arrears while this
|
|
1580
|
+
* is above zero. Topping up pays it on the next collection.
|
|
1581
|
+
*/
|
|
1582
|
+
due: components["schemas"]["Money"];
|
|
1583
|
+
};
|
|
1584
|
+
MeteredUsage: {
|
|
1585
|
+
/** Format: int64 */
|
|
1586
|
+
billing_account_id: number;
|
|
1587
|
+
currency: string;
|
|
1588
|
+
/** @description Resources still metered in the projects the account currently pays for. */
|
|
1589
|
+
active_resource_count: number;
|
|
1590
|
+
/** @description Subscriptions billed by usage that the account currently pays for and that have not ended. */
|
|
1591
|
+
postpaid_subscription_count: number;
|
|
1592
|
+
/**
|
|
1593
|
+
* Format: date-time
|
|
1594
|
+
* @description The start of the seven days the amounts cover.
|
|
1595
|
+
*/
|
|
1596
|
+
window_start: string;
|
|
1597
|
+
/**
|
|
1598
|
+
* Format: date-time
|
|
1599
|
+
* @description The end of those seven days, the time usage was last priced.
|
|
1600
|
+
*/
|
|
1601
|
+
window_end: string;
|
|
1602
|
+
/** @description Usage priced in the window, before tax and before credit grants. Usage not yet priced is not included. */
|
|
1603
|
+
amount: components["schemas"]["Money"];
|
|
1604
|
+
/**
|
|
1605
|
+
* @description `amount` per day. Over the window, or over the part of it since the account's usage began
|
|
1606
|
+
* when that is shorter, counting at least one day.
|
|
1607
|
+
*/
|
|
1608
|
+
average_daily_amount: components["schemas"]["Money"];
|
|
1609
|
+
};
|
|
1610
|
+
CreditGroup: {
|
|
1611
|
+
/** @description What the credit in this group may pay for. No restrictions means anything on the account. */
|
|
1612
|
+
applies_to: components["schemas"]["Applicability"];
|
|
1613
|
+
amount: components["schemas"]["Money"];
|
|
1614
|
+
};
|
|
1615
|
+
ProjectBillingInfo: {
|
|
1616
|
+
/** Format: uuid */
|
|
1617
|
+
project_id: string;
|
|
1618
|
+
/**
|
|
1619
|
+
* @description The project and its current name, for display. Absent when the project no longer exists or its
|
|
1620
|
+
* details cannot be read at the moment; `project_id` still identifies it.
|
|
1621
|
+
*/
|
|
1622
|
+
project?: components["schemas"]["NamedIdentity"] | null;
|
|
1623
|
+
/** Format: int64 */
|
|
1624
|
+
billing_account_id: number;
|
|
1625
|
+
account_name?: string;
|
|
1626
|
+
currency: string;
|
|
1627
|
+
/** Format: date-time */
|
|
1628
|
+
effective_from: string;
|
|
1629
|
+
/** Format: date-time */
|
|
1630
|
+
effective_to?: string | null;
|
|
1631
|
+
};
|
|
1632
|
+
ProjectBillingInfoList: {
|
|
1633
|
+
items: components["schemas"]["ProjectBillingInfo"][];
|
|
1634
|
+
pagination: components["schemas"]["OffsetPagination"];
|
|
1635
|
+
};
|
|
1636
|
+
ProjectBillingInfoSet: {
|
|
1637
|
+
/** Format: int64 */
|
|
1638
|
+
billing_account_id: number;
|
|
1639
|
+
};
|
|
1640
|
+
/** @description A top-up attempt and its outcome. A successful top-up adds a traceable amount to the balance; it is not a credit grant and has no associated invoice. */
|
|
1641
|
+
TopUp: {
|
|
1642
|
+
/** Format: uuid */
|
|
1643
|
+
id: string;
|
|
1644
|
+
/** Format: int64 */
|
|
1645
|
+
billing_account_id: number;
|
|
1646
|
+
account: components["schemas"]["AccountIdentity"];
|
|
1647
|
+
/** @description What is credited to the account, in the account's own currency. */
|
|
1648
|
+
amount: components["schemas"]["Money"];
|
|
1649
|
+
currency: string;
|
|
1650
|
+
/**
|
|
1651
|
+
* @description The part of this top-up still held in the balance. Pending refunds and payouts can temporarily
|
|
1652
|
+
* reserve part of it; it is not a promise that the whole amount is immediately withdrawable.
|
|
1653
|
+
*/
|
|
1654
|
+
remaining_amount?: components["schemas"]["Money"];
|
|
1655
|
+
/**
|
|
1656
|
+
* @description `pending` until the payment gateway reaches a result. The balance increases on `succeeded`.
|
|
1657
|
+
*
|
|
1658
|
+
* `failed` means the gateway declined the payment. A declined attempt ends the top-up at once
|
|
1659
|
+
* and the payment is withdrawn at the gateway; to pay another way, create a new top-up.
|
|
1660
|
+
* `canceled` means the attempt was withdrawn without collecting money; `cancellation_reason`
|
|
1661
|
+
* says why. Unknown gateway outcomes remain `pending`, and a browser redirect is not proof of
|
|
1662
|
+
* payment.
|
|
1663
|
+
*
|
|
1664
|
+
* `failed` and `canceled` are final. If the gateway nevertheless collects payment for such an
|
|
1665
|
+
* attempt, the amount is credited as a separate `succeeded` top-up.
|
|
1666
|
+
* @enum {string}
|
|
1667
|
+
*/
|
|
1668
|
+
status: "pending" | "succeeded" | "failed" | "canceled";
|
|
1669
|
+
/** @description Why the top-up was withdrawn. Present with `canceled`. */
|
|
1670
|
+
cancellation_reason?: components["schemas"]["PaymentCancellationReason"];
|
|
1671
|
+
/** @description Which payment gateway collected it. */
|
|
1672
|
+
payment_gateway?: string;
|
|
1673
|
+
/** @description The selected payment method, such as card, wechat_pay or alipay. */
|
|
1674
|
+
method_type?: string;
|
|
1675
|
+
/**
|
|
1676
|
+
* @description The currency the customer was actually charged in, when the checkout page collected a
|
|
1677
|
+
* local one. Absent when it was the same as the account's.
|
|
1678
|
+
*/
|
|
1679
|
+
presentment_currency?: string;
|
|
1680
|
+
/**
|
|
1681
|
+
* @description What was charged, in `presentment_currency`. It will not equal `amount`, and it is
|
|
1682
|
+
* the figure that appears on the customer's card or wallet statement.
|
|
1683
|
+
*/
|
|
1684
|
+
presentment_amount?: components["schemas"]["Money"];
|
|
1685
|
+
/**
|
|
1686
|
+
* @description Why the gateway declined it. Present with `failed`. The value is the gateway's own code,
|
|
1687
|
+
* passed on unchanged: the card issuer's decline code when there is one (Stripe's decline_code,
|
|
1688
|
+
* such as insufficient_funds or lost_card), otherwise the gateway's error code (Stripe's code,
|
|
1689
|
+
* such as card_declined, expired_card or payment_intent_authentication_failure). Clients map it
|
|
1690
|
+
* to their own wording and treat an unknown value as a generic decline.
|
|
1691
|
+
*/
|
|
1692
|
+
failure_reason?: string;
|
|
1693
|
+
/**
|
|
1694
|
+
* @description The customer's next step while the top-up is `pending` and the gateway still awaits them. Returned
|
|
1695
|
+
* by create-top-up and get-top-up as the gateway currently reports it; absent from list-top-ups and
|
|
1696
|
+
* once the top-up has a result. Completing it does not replace confirmation of receipt.
|
|
1697
|
+
*/
|
|
1698
|
+
action?: components["schemas"]["PaymentAction"];
|
|
1699
|
+
/** Format: date-time */
|
|
1700
|
+
created_at: string;
|
|
1701
|
+
/**
|
|
1702
|
+
* Format: date-time
|
|
1703
|
+
* @description When the funds arrived. Later than `created_at` — by days for a bank transfer — so
|
|
1704
|
+
* reconciling against a statement uses this rather than the moment it was started.
|
|
1705
|
+
* Absent until the payment completes.
|
|
1706
|
+
*/
|
|
1707
|
+
settled_at?: string | null;
|
|
1708
|
+
};
|
|
1709
|
+
TopUpCreate: {
|
|
1710
|
+
/** @description The gateway explicitly selected from the available payment options. */
|
|
1711
|
+
payment_gateway: string;
|
|
1712
|
+
/** @description The selected method, such as card, wechat_pay or alipay. */
|
|
1713
|
+
method_type: string;
|
|
1714
|
+
/**
|
|
1715
|
+
* Format: uuid
|
|
1716
|
+
* @description The ID of this top-up attempt. Keep it before submitting and query it after an uncertain response.
|
|
1717
|
+
*/
|
|
1718
|
+
id: string;
|
|
1719
|
+
/** Format: int64 */
|
|
1720
|
+
billing_account_id: number;
|
|
1721
|
+
/**
|
|
1722
|
+
* @description In the account's currency, and no finer than that currency's smallest unit:
|
|
1723
|
+
* two decimals for most, none for the yen. A finer amount is refused here rather
|
|
1724
|
+
* than at the checkout page, where the customer would see the gateway's own wording
|
|
1725
|
+
* instead of an explanation.
|
|
1726
|
+
*
|
|
1727
|
+
* There is a minimum, which differs by currency. Below it the gateway's fee
|
|
1728
|
+
* exceeds the top-up itself, so such a payment costs more to accept than it brings.
|
|
1729
|
+
* The minimum in force is returned with the rejection.
|
|
1730
|
+
*/
|
|
1731
|
+
amount: components["schemas"]["Money"];
|
|
1732
|
+
/**
|
|
1733
|
+
* Format: uuid
|
|
1734
|
+
* @description Charge a saved method instead of opening a checkout page.
|
|
1735
|
+
*/
|
|
1736
|
+
payment_method_id?: string;
|
|
1737
|
+
/** @description Where to send the customer after checkout. */
|
|
1738
|
+
return_url?: string;
|
|
1739
|
+
};
|
|
1740
|
+
AccountIdentity: {
|
|
1741
|
+
/** Format: int64 */
|
|
1742
|
+
id: number;
|
|
1743
|
+
name: string;
|
|
1744
|
+
currency: string;
|
|
1745
|
+
};
|
|
1746
|
+
TopUpList: {
|
|
1747
|
+
items: components["schemas"]["TopUp"][];
|
|
1748
|
+
pagination: components["schemas"]["OffsetPagination"];
|
|
1749
|
+
};
|
|
1750
|
+
/**
|
|
1751
|
+
* @description Why a gateway payment was withdrawn. `abandoned` means the customer did not complete it within the time
|
|
1752
|
+
* allowed for payment. `requested_by_customer` means the customer canceled it.
|
|
1753
|
+
* @enum {string}
|
|
1754
|
+
*/
|
|
1755
|
+
PaymentCancellationReason: "abandoned" | "requested_by_customer";
|
|
1756
|
+
/** @description A payment gateway that accepts payment in the account's currency, with the methods it accepts. */
|
|
1757
|
+
PaymentOption: {
|
|
1758
|
+
/** @description The value to send as `payment_gateway`. */
|
|
1759
|
+
payment_gateway: string;
|
|
1760
|
+
methods: components["schemas"]["PaymentOptionMethod"][];
|
|
1761
|
+
};
|
|
1762
|
+
PaymentOptionMethod: {
|
|
1763
|
+
/** @description The value to send as `method_type`, such as card, wechat_pay or alipay. */
|
|
1764
|
+
method_type: string;
|
|
1765
|
+
/**
|
|
1766
|
+
* @description Whether a method of this type can be saved with create-payment-method-setup and charged later
|
|
1767
|
+
* without the customer present. Methods that are not reusable are paid anew each time.
|
|
1768
|
+
*/
|
|
1769
|
+
reusable: boolean;
|
|
1770
|
+
};
|
|
1771
|
+
PaymentOptionList: {
|
|
1772
|
+
items: components["schemas"]["PaymentOption"][];
|
|
1773
|
+
pagination: components["schemas"]["OffsetPagination"];
|
|
1774
|
+
};
|
|
1775
|
+
PaymentMethod: {
|
|
1776
|
+
/** Format: uuid */
|
|
1777
|
+
id: string;
|
|
1778
|
+
/** Format: int64 */
|
|
1779
|
+
billing_account_id: number;
|
|
1780
|
+
payment_gateway: string;
|
|
1781
|
+
brand?: string;
|
|
1782
|
+
last4?: string;
|
|
1783
|
+
exp_month?: number | null;
|
|
1784
|
+
exp_year?: number | null;
|
|
1785
|
+
is_default: boolean;
|
|
1786
|
+
/** @enum {string} */
|
|
1787
|
+
status: "active" | "expired" | "removed";
|
|
1788
|
+
};
|
|
1789
|
+
PaymentMethodList: {
|
|
1790
|
+
items: components["schemas"]["PaymentMethod"][];
|
|
1791
|
+
pagination: components["schemas"]["OffsetPagination"];
|
|
1792
|
+
};
|
|
1793
|
+
PaymentMethodSetup: {
|
|
1794
|
+
/** @description The selected gateway supporting saved payment methods. */
|
|
1795
|
+
payment_gateway: string;
|
|
1796
|
+
/** Format: int64 */
|
|
1797
|
+
billing_account_id: number;
|
|
1798
|
+
};
|
|
1799
|
+
/**
|
|
1800
|
+
* @description What the payment gateway's browser library needs in order to collect a card. There is
|
|
1801
|
+
* no address to redirect to: the form is rendered in the page, and the card goes straight
|
|
1802
|
+
* from the browser to the gateway.
|
|
1803
|
+
*/
|
|
1804
|
+
PaymentMethodSetupResult: {
|
|
1805
|
+
/**
|
|
1806
|
+
* @description The gateway's identifier for this attempt. Use it to tell a reloaded page apart
|
|
1807
|
+
* from a second attempt.
|
|
1808
|
+
*/
|
|
1809
|
+
setup_id: string;
|
|
1810
|
+
payment_gateway: string;
|
|
1811
|
+
/** @description Browser configuration and credentials for this card setup, including the provider's public key. No server secret is returned. */
|
|
1812
|
+
action: components["schemas"]["PaymentAction"];
|
|
1813
|
+
};
|
|
1814
|
+
/**
|
|
1815
|
+
* @description Applies eligible credit grants and the available balance as requested, then collects only the remainder
|
|
1816
|
+
* through the selected gateway. Grants restricted to other purchases are not counted as available funds.
|
|
1817
|
+
* An unresolved channel payment is reused; retries do not apply the grant or balance portions twice.
|
|
1818
|
+
* Without a gateway selection, insufficient account funds fail without starting an online payment.
|
|
1819
|
+
*/
|
|
1820
|
+
PayRequest: {
|
|
1821
|
+
/** @description Required to collect an online remainder. An existing attempt keeps its original gateway. */
|
|
1822
|
+
payment_gateway?: string;
|
|
1823
|
+
/** @description Required with payment_gateway; for example card, wechat_pay or alipay. */
|
|
1824
|
+
method_type?: string;
|
|
1825
|
+
/**
|
|
1826
|
+
* Format: uuid
|
|
1827
|
+
* @description Optional saved card owned by this billing account and belonging to the selected gateway. Omit to complete payment interactively.
|
|
1828
|
+
*/
|
|
1829
|
+
payment_method_id?: string;
|
|
1830
|
+
/**
|
|
1831
|
+
* @description Whether to apply the available balance. Credit grants are controlled separately by use_credits.
|
|
1832
|
+
* @default true
|
|
1833
|
+
*/
|
|
1834
|
+
use_balance?: boolean;
|
|
1835
|
+
/**
|
|
1836
|
+
* @description Apply eligible, unexpired credit grants before using the balance. This never withdraws grants or converts them into balance.
|
|
1837
|
+
* @default true
|
|
1838
|
+
*/
|
|
1839
|
+
use_credits?: boolean;
|
|
1840
|
+
return_url?: string;
|
|
1841
|
+
};
|
|
1842
|
+
/**
|
|
1843
|
+
* @description Name at least one invoice or order. They must all belong to the same account and share
|
|
1844
|
+
* its currency; anything else is refused rather than partly paid.
|
|
1845
|
+
*/
|
|
1846
|
+
PayTogetherRequest: {
|
|
1847
|
+
invoice_ids?: string[];
|
|
1848
|
+
order_ids?: string[];
|
|
1849
|
+
};
|
|
1850
|
+
/** @description The customer's next interaction. The gateway reports the actual payment outcome separately. */
|
|
1851
|
+
PaymentAction: {
|
|
1852
|
+
/** @enum {string} */
|
|
1853
|
+
type: "redirect" | "qr_code" | "sdk";
|
|
1854
|
+
/** @description Identifies the browser adapter for an SDK action, for example stripe. */
|
|
1855
|
+
provider?: string;
|
|
1856
|
+
/** Format: uri */
|
|
1857
|
+
url?: string;
|
|
1858
|
+
/** @description QR content to render and scan, not an image URL. */
|
|
1859
|
+
qr_code?: string;
|
|
1860
|
+
/** @description Short-lived client credential for this payment's browser confirmation. */
|
|
1861
|
+
client_secret?: string;
|
|
1862
|
+
public_key?: string;
|
|
1863
|
+
};
|
|
1864
|
+
/**
|
|
1865
|
+
* @description The current payment outcome.
|
|
1866
|
+
*
|
|
1867
|
+
* succeeded means payment is complete. processing means confirmation is pending; poll the invoice or
|
|
1868
|
+
* order rather than submitting another payment. requires_action means the customer must complete the
|
|
1869
|
+
* supplied action. failed means the attempt did not succeed and failure_reason explains the outcome; a
|
|
1870
|
+
* declined gateway payment is withdrawn at the gateway, and paying again starts a new payment with the
|
|
1871
|
+
* same or another method.
|
|
1872
|
+
* @enum {string}
|
|
1873
|
+
*/
|
|
1874
|
+
PaymentStatus: "succeeded" | "processing" | "requires_action" | "failed";
|
|
1875
|
+
/** @description A credit grant and what it would pay. */
|
|
1876
|
+
AppliedCredit: {
|
|
1877
|
+
/** Format: uuid */
|
|
1878
|
+
credit_grant_id: string;
|
|
1879
|
+
name: string;
|
|
1880
|
+
amount: components["schemas"]["Money"];
|
|
1881
|
+
};
|
|
1882
|
+
PaymentPreviewInvoice: {
|
|
1883
|
+
/** Format: uuid */
|
|
1884
|
+
invoice_id: string;
|
|
1885
|
+
/** Format: uuid */
|
|
1886
|
+
order_id?: string | null;
|
|
1887
|
+
amount_due: components["schemas"]["Money"];
|
|
1888
|
+
credit_applied: components["schemas"]["Money"];
|
|
1889
|
+
balance_applied: components["schemas"]["Money"];
|
|
1890
|
+
};
|
|
1891
|
+
/** @description What paying would take, computed as paying computes it. Nothing is charged or reserved. */
|
|
1892
|
+
PaymentPreview: {
|
|
1893
|
+
currency: string;
|
|
1894
|
+
/** @description What is outstanding before paying. */
|
|
1895
|
+
amount_due: components["schemas"]["Money"];
|
|
1896
|
+
/** @description What credit grants would pay. Grants restricted to other purchases pay nothing here. */
|
|
1897
|
+
credit_applied: components["schemas"]["Money"];
|
|
1898
|
+
/** @description The credit grants that would pay, in the order they would be used. */
|
|
1899
|
+
credit_grants: components["schemas"]["AppliedCredit"][];
|
|
1900
|
+
/** @description What the balance would pay. */
|
|
1901
|
+
balance_applied: components["schemas"]["Money"];
|
|
1902
|
+
/** @description What would remain to be paid online. Paying without a gateway is refused with `BILLING_INSUFFICIENT_FUNDS` while this is above zero. */
|
|
1903
|
+
gateway_amount: components["schemas"]["Money"];
|
|
1904
|
+
/** @description The available balance after paying. */
|
|
1905
|
+
balance_after: components["schemas"]["Money"];
|
|
1906
|
+
/** @description Paying together only. Each invoice, in the order it would be paid. */
|
|
1907
|
+
invoices?: components["schemas"]["PaymentPreviewInvoice"][];
|
|
1908
|
+
};
|
|
1909
|
+
PaymentResult: {
|
|
1910
|
+
transactions: components["schemas"]["Transaction"][];
|
|
1911
|
+
/**
|
|
1912
|
+
* Format: uuid
|
|
1913
|
+
* @description The gateway transaction, when one is involved. Balance and credit-grant payments are separate transactions.
|
|
1914
|
+
*/
|
|
1915
|
+
transaction_id?: string;
|
|
1916
|
+
status: components["schemas"]["PaymentStatus"];
|
|
1917
|
+
amount_paid: components["schemas"]["Money"];
|
|
1918
|
+
/**
|
|
1919
|
+
* @description What is still outstanding. Zero once the payment succeeds. Unchanged while
|
|
1920
|
+
* `processing`: nothing is collected until the gateway confirms it.
|
|
1921
|
+
*/
|
|
1922
|
+
amount_due: components["schemas"]["Money"];
|
|
1923
|
+
currency: string;
|
|
1924
|
+
/** @description Credit grants applied to this invoice. Not a payment from the balance and not withdrawable. */
|
|
1925
|
+
credit_applied?: components["schemas"]["Money"];
|
|
1926
|
+
/** @description The remaining amount submitted to the selected payment gateway. */
|
|
1927
|
+
gateway_amount?: components["schemas"]["Money"];
|
|
1928
|
+
payment_gateway?: string;
|
|
1929
|
+
method_type?: string;
|
|
1930
|
+
/**
|
|
1931
|
+
* @description The amount already paid from the account's balance toward this invoice. Retrying an online remainder
|
|
1932
|
+
* does not debit it again. A canceled purchase returns funds through its refund process.
|
|
1933
|
+
*/
|
|
1934
|
+
balance_applied?: components["schemas"]["Money"];
|
|
1935
|
+
action?: components["schemas"]["PaymentAction"];
|
|
1936
|
+
/**
|
|
1937
|
+
* @description Whether paying again is worth attempting. False for a refusal that will keep
|
|
1938
|
+
* happening — a closed account, an amount over a limit — so that a client does not
|
|
1939
|
+
* retry in a loop.
|
|
1940
|
+
*/
|
|
1941
|
+
retriable?: boolean;
|
|
1942
|
+
/** Format: uuid */
|
|
1943
|
+
invoice_id?: string | null;
|
|
1944
|
+
/** Format: uuid */
|
|
1945
|
+
order_id?: string | null;
|
|
1946
|
+
/**
|
|
1947
|
+
* @description Why the payment did not go through. Present with `failed`. For a declined gateway payment the
|
|
1948
|
+
* value is the gateway's own code, passed on unchanged: the card issuer's decline code when
|
|
1949
|
+
* there is one (Stripe's decline_code, such as insufficient_funds or lost_card), otherwise the
|
|
1950
|
+
* gateway's error code (Stripe's code, such as card_declined, expired_card or
|
|
1951
|
+
* payment_intent_authentication_failure). Clients map it to their own wording and treat an
|
|
1952
|
+
* unknown value as a generic decline.
|
|
1953
|
+
*/
|
|
1954
|
+
failure_reason?: string;
|
|
1955
|
+
};
|
|
1956
|
+
/**
|
|
1957
|
+
* @description A usage invoice stays `draft` through its month: each charge is added to it as it is priced
|
|
1958
|
+
* and paid from credits and balance as it goes. It is issued at the end of the month, becoming
|
|
1959
|
+
* `paid` when everything was covered and `open` when something is still owed.
|
|
1960
|
+
*
|
|
1961
|
+
* `refunded` means the invoice was paid and has since been refunded in full; a partial refund
|
|
1962
|
+
* leaves it `paid`, with the refunded part in `amount_refunded`.
|
|
1963
|
+
*
|
|
1964
|
+
* `void` means the invoice will not be paid and holds no money: nothing was paid, or its order
|
|
1965
|
+
* failed or was canceled and everything paid toward it has been returned, as `amount_paid` and
|
|
1966
|
+
* `amount_refunded` show.
|
|
1967
|
+
* @enum {string}
|
|
1968
|
+
*/
|
|
1969
|
+
InvoiceStatus: "draft" | "open" | "paid" | "refunded" | "void" | "uncollectible";
|
|
1970
|
+
Invoice: {
|
|
1971
|
+
/** Format: date-time */
|
|
1972
|
+
due_at?: string;
|
|
1973
|
+
amount_refunded?: string;
|
|
1974
|
+
tax_items: components["schemas"]["TaxItem"][];
|
|
1975
|
+
/**
|
|
1976
|
+
* Format: uuid
|
|
1977
|
+
* @description The purchase that produced this invoice. Absent on usage invoices.
|
|
1978
|
+
*/
|
|
1979
|
+
order_id?: string;
|
|
1980
|
+
/** Format: uuid */
|
|
1981
|
+
id: string;
|
|
1982
|
+
/** Format: int64 */
|
|
1983
|
+
billing_account_id: number;
|
|
1984
|
+
/** @description Numbered per account and per month. */
|
|
1985
|
+
number: string;
|
|
1986
|
+
/**
|
|
1987
|
+
* @description What produced it — metered usage for a period, a purchase, or a correction.
|
|
1988
|
+
* @enum {string}
|
|
1989
|
+
*/
|
|
1990
|
+
type?: "usage" | "order" | "adjustment";
|
|
1991
|
+
currency: string;
|
|
1992
|
+
status: components["schemas"]["InvoiceStatus"];
|
|
1993
|
+
/**
|
|
1994
|
+
* @description Sum of the line amounts before discounts. Where prices include tax, the tax contained in
|
|
1995
|
+
* each line's discounted amount is taken out here, so that total = subtotal -
|
|
1996
|
+
* discount_amount + tax_amount always holds.
|
|
1997
|
+
*/
|
|
1998
|
+
subtotal?: components["schemas"]["Money"];
|
|
1999
|
+
/** @description Sum of the line discounts, taken off before tax. */
|
|
2000
|
+
discount_amount?: components["schemas"]["Money"];
|
|
2001
|
+
tax_amount?: components["schemas"]["Money"];
|
|
2002
|
+
/** @description Successful credit-grant payments included in amount_paid. Does not reduce the receivable or tax base. */
|
|
2003
|
+
credit_applied?: components["schemas"]["Money"];
|
|
2004
|
+
/** @description Subtotal less discount plus tax. Balance and credit grants are payment sources, not reductions of the receivable. */
|
|
2005
|
+
total: components["schemas"]["Money"];
|
|
2006
|
+
amount_paid?: components["schemas"]["Money"];
|
|
2007
|
+
/** Format: date-time */
|
|
2008
|
+
period_start?: string | null;
|
|
2009
|
+
/**
|
|
2010
|
+
* Format: date-time
|
|
2011
|
+
* @description Exclusive.
|
|
2012
|
+
*/
|
|
2013
|
+
period_end?: string | null;
|
|
2014
|
+
/**
|
|
2015
|
+
* @description Who this was billed to, as recorded when the invoice was issued. Later changes to
|
|
2016
|
+
* the account do not alter it.
|
|
2017
|
+
*/
|
|
2018
|
+
customer_name?: string;
|
|
2019
|
+
customer_email?: string;
|
|
2020
|
+
customer_tax_id?: string;
|
|
2021
|
+
customer_address_line1?: string;
|
|
2022
|
+
customer_address_line2?: string;
|
|
2023
|
+
customer_address_city?: string;
|
|
2024
|
+
customer_address_state?: string;
|
|
2025
|
+
customer_address_postal_code?: string;
|
|
2026
|
+
customer_address_country?: string;
|
|
2027
|
+
/** Format: date-time */
|
|
2028
|
+
paid_at?: string | null;
|
|
2029
|
+
};
|
|
2030
|
+
InvoiceList: {
|
|
2031
|
+
items: components["schemas"]["Invoice"][];
|
|
2032
|
+
pagination: components["schemas"]["OffsetPagination"];
|
|
2033
|
+
};
|
|
2034
|
+
InvoiceItem: {
|
|
2035
|
+
recurring_amount?: string;
|
|
2036
|
+
taxable?: boolean;
|
|
2037
|
+
/** @description Discount applied to this line before tax. */
|
|
2038
|
+
discount_amount?: string;
|
|
2039
|
+
/** @description Tax on the discounted line, including tax already included in the price. */
|
|
2040
|
+
tax_amount?: string;
|
|
2041
|
+
/** @description The part of tax_amount already included in amount. */
|
|
2042
|
+
tax_included_amount?: string;
|
|
2043
|
+
/**
|
|
2044
|
+
* Format: uuid
|
|
2045
|
+
* @description The original order line. Refunds follow that line's original payment sources.
|
|
2046
|
+
*/
|
|
2047
|
+
order_item_id?: string;
|
|
2048
|
+
/** Format: uuid */
|
|
2049
|
+
id: string;
|
|
2050
|
+
/** @enum {string} */
|
|
2051
|
+
type?: "usage" | "subscription" | "one_time" | "setup" | "adjustment";
|
|
2052
|
+
/** Format: uuid */
|
|
2053
|
+
project_id?: string | null;
|
|
2054
|
+
/**
|
|
2055
|
+
* @description The project the charge was for and its current name, for display. Absent when the line is
|
|
2056
|
+
* not for a project, and when the project no longer exists or its details cannot be read at
|
|
2057
|
+
* the moment; `project_id` still identifies it then.
|
|
2058
|
+
*/
|
|
2059
|
+
project?: components["schemas"]["NamedIdentity"] | null;
|
|
2060
|
+
resource_id?: string;
|
|
2061
|
+
/**
|
|
2062
|
+
* @description The wording as recorded when the invoice was issued. It is not re-translated
|
|
2063
|
+
* afterwards, so that an invoice continues to read as it did when it was sent.
|
|
2064
|
+
*/
|
|
2065
|
+
description: string;
|
|
2066
|
+
unit?: string;
|
|
2067
|
+
quantity?: string;
|
|
2068
|
+
/** @description The part covered by an included allowance, and therefore not charged. */
|
|
2069
|
+
deducted_quantity?: string;
|
|
2070
|
+
unit_amount?: components["schemas"]["Money"];
|
|
2071
|
+
amount: components["schemas"]["Money"];
|
|
2072
|
+
currency: string;
|
|
2073
|
+
/** Format: date-time */
|
|
2074
|
+
period_start?: string | null;
|
|
2075
|
+
/** Format: date-time */
|
|
2076
|
+
period_end?: string | null;
|
|
2077
|
+
};
|
|
2078
|
+
InvoiceItemList: {
|
|
2079
|
+
items: components["schemas"]["InvoiceItem"][];
|
|
2080
|
+
pagination: components["schemas"]["OffsetPagination"];
|
|
2081
|
+
};
|
|
2082
|
+
/**
|
|
2083
|
+
* @description topup adds to the balance; payment settles an invoice; refund returns original funds; payout withdraws from the balance; adjustment changes the balance with an audit reason.
|
|
2084
|
+
* @enum {string}
|
|
2085
|
+
*/
|
|
2086
|
+
TransactionType: "topup" | "payment" | "refund" | "payout" | "adjustment";
|
|
2087
|
+
/** @description A funds operation. Each payment has one source; refunds identify the original successful transaction. Unknown gateway results remain pending. Payments from the balance or a gateway are distinct from credit-grant payments. */
|
|
2088
|
+
Transaction: {
|
|
2089
|
+
/** Format: uuid */
|
|
2090
|
+
invoice_id?: string;
|
|
2091
|
+
/** Format: uuid */
|
|
2092
|
+
transaction_id?: string;
|
|
2093
|
+
/**
|
|
2094
|
+
* Format: uuid
|
|
2095
|
+
* @description The credit grant that paid, or for a refund, the credit grant restored.
|
|
2096
|
+
*/
|
|
2097
|
+
credit_grant_id?: string;
|
|
2098
|
+
credit_grant?: components["schemas"]["ObjectIdentity"];
|
|
2099
|
+
/** Format: uuid */
|
|
2100
|
+
refund_id?: string;
|
|
2101
|
+
/**
|
|
2102
|
+
* @description Present on refunds. Where this part of the refund goes.
|
|
2103
|
+
*
|
|
2104
|
+
* - `balance`: back to the account balance.
|
|
2105
|
+
* - `credit`: back to the credit grant that paid, which keeps its original expiry.
|
|
2106
|
+
* - `gateway`: back to the payment method it was paid with.
|
|
2107
|
+
* @enum {string}
|
|
2108
|
+
*/
|
|
2109
|
+
refund_destination?: "balance" | "credit" | "gateway";
|
|
2110
|
+
/**
|
|
2111
|
+
* @description `failed` means the operation did not succeed; for a gateway payment, that the gateway declined
|
|
2112
|
+
* it. `canceled` means a gateway payment was withdrawn without collecting money. After either,
|
|
2113
|
+
* an invoice the payment was meant to pay remains open for another payment.
|
|
2114
|
+
* @enum {string}
|
|
2115
|
+
*/
|
|
2116
|
+
status?: "pending" | "succeeded" | "failed" | "canceled";
|
|
2117
|
+
/** @description Why the payment was withdrawn. Present with `canceled`. */
|
|
2118
|
+
cancellation_reason?: components["schemas"]["PaymentCancellationReason"];
|
|
2119
|
+
payment_gateway?: string;
|
|
2120
|
+
method_type?: string;
|
|
2121
|
+
/**
|
|
2122
|
+
* @description Why it failed. Present with `failed`. For a declined gateway payment the value is the
|
|
2123
|
+
* gateway's own code, passed on unchanged: the card issuer's decline code when there is one
|
|
2124
|
+
* (Stripe's decline_code, such as insufficient_funds or lost_card), otherwise the gateway's
|
|
2125
|
+
* error code (Stripe's code, such as card_declined, expired_card or
|
|
2126
|
+
* payment_intent_authentication_failure). Clients map it to their own wording and treat an
|
|
2127
|
+
* unknown value as a generic decline.
|
|
2128
|
+
*/
|
|
2129
|
+
failure_reason?: string;
|
|
2130
|
+
/** Format: date-time */
|
|
2131
|
+
settled_at?: string;
|
|
2132
|
+
/** Format: uuid */
|
|
2133
|
+
id: string;
|
|
2134
|
+
/** Format: int64 */
|
|
2135
|
+
billing_account_id?: number;
|
|
2136
|
+
type: components["schemas"]["TransactionType"];
|
|
2137
|
+
/**
|
|
2138
|
+
* @description Signed by type: positive for `topup` and `payment`, negative for `refund` and `payout`.
|
|
2139
|
+
* An `adjustment` is positive when it adds to the balance and negative when it takes from
|
|
2140
|
+
* it. For the other types the sign does not tell the effect on the balance: a payment from
|
|
2141
|
+
* the balance lowers it, while a payment by gateway or by credit leaves it unchanged.
|
|
2142
|
+
*/
|
|
2143
|
+
amount: components["schemas"]["Money"];
|
|
2144
|
+
/**
|
|
2145
|
+
* @description How much of this transaction is still available in the balance. Only top-ups, positive
|
|
2146
|
+
* adjustments and gateway payments later returned to the balance can be non-zero.
|
|
2147
|
+
*/
|
|
2148
|
+
remaining_amount: components["schemas"]["Money"];
|
|
2149
|
+
currency: string;
|
|
2150
|
+
reason?: string;
|
|
2151
|
+
/** Format: date-time */
|
|
2152
|
+
created_at: string;
|
|
2153
|
+
};
|
|
2154
|
+
TransactionList: {
|
|
2155
|
+
items: components["schemas"]["Transaction"][];
|
|
2156
|
+
pagination: components["schemas"]["OffsetPagination"];
|
|
2157
|
+
};
|
|
2158
|
+
CreditGrant: {
|
|
2159
|
+
min_amount?: string;
|
|
2160
|
+
/** Format: uuid */
|
|
2161
|
+
id: string;
|
|
2162
|
+
/** Format: int64 */
|
|
2163
|
+
billing_account_id?: number;
|
|
2164
|
+
name: string;
|
|
2165
|
+
amount: components["schemas"]["Money"];
|
|
2166
|
+
remaining_amount: components["schemas"]["Money"];
|
|
2167
|
+
currency: string;
|
|
2168
|
+
/** @description What this credit may pay for. No restrictions means anything on the account. */
|
|
2169
|
+
applies_to: components["schemas"]["Applicability"];
|
|
2170
|
+
/** @enum {string} */
|
|
2171
|
+
status: "active" | "depleted" | "expired" | "voided";
|
|
2172
|
+
/** Format: date-time */
|
|
2173
|
+
valid_from: string;
|
|
2174
|
+
/** Format: date-time */
|
|
2175
|
+
valid_until?: string | null;
|
|
2176
|
+
};
|
|
2177
|
+
CreditGrantList: {
|
|
2178
|
+
items: components["schemas"]["CreditGrant"][];
|
|
2179
|
+
pagination: components["schemas"]["OffsetPagination"];
|
|
2180
|
+
};
|
|
2181
|
+
Refund: {
|
|
2182
|
+
/** Format: uuid */
|
|
2183
|
+
transaction_id?: string;
|
|
2184
|
+
/** Format: uuid */
|
|
2185
|
+
cancellation_request_id?: string;
|
|
2186
|
+
/** @description Original funds-return split and each result. Unknown gateway results remain pending. */
|
|
2187
|
+
transactions: components["schemas"]["Transaction"][];
|
|
2188
|
+
/** Format: uuid */
|
|
2189
|
+
id: string;
|
|
2190
|
+
/** Format: int64 */
|
|
2191
|
+
billing_account_id?: number;
|
|
2192
|
+
/** Format: uuid */
|
|
2193
|
+
invoice_id?: string | null;
|
|
2194
|
+
/**
|
|
2195
|
+
* Format: uuid
|
|
2196
|
+
* @description The order the refund belongs to: the order that caused it, such as a downgrade, otherwise
|
|
2197
|
+
* the order of the refunded invoice. Null for refunds of top-ups and of usage invoices.
|
|
2198
|
+
*/
|
|
2199
|
+
order_id?: string | null;
|
|
2200
|
+
/** @description The whole refund. Equals balance_amount plus credit_amount plus gateway_amount. */
|
|
2201
|
+
amount: components["schemas"]["Money"];
|
|
2202
|
+
/** @description The part returned to the account balance. */
|
|
2203
|
+
balance_amount: components["schemas"]["Money"];
|
|
2204
|
+
/** @description The part restored to the credit grants that paid for it. */
|
|
2205
|
+
credit_amount: components["schemas"]["Money"];
|
|
2206
|
+
/** @description The part returned to the payment method it was paid with. */
|
|
2207
|
+
gateway_amount: components["schemas"]["Money"];
|
|
2208
|
+
/** @description What has actually been returned. */
|
|
2209
|
+
settled_amount?: components["schemas"]["Money"];
|
|
2210
|
+
currency: string;
|
|
2211
|
+
/**
|
|
2212
|
+
* @deprecated
|
|
2213
|
+
* @description Use balance_amount, credit_amount and gateway_amount, which also show a refund split between several destinations.
|
|
2214
|
+
* @enum {string}
|
|
2215
|
+
*/
|
|
2216
|
+
destination?: "balance" | "gateway";
|
|
2217
|
+
/**
|
|
2218
|
+
* @description Summary of the parts in `transactions`.
|
|
2219
|
+
*
|
|
2220
|
+
* - `pending`: nothing has been returned yet, and at least one part is in progress.
|
|
2221
|
+
* - `processing`: some parts have been returned, and at least one is still in progress.
|
|
2222
|
+
* - `succeeded`: every part has been returned.
|
|
2223
|
+
* - `failed`: no part is in progress and at least one has failed. What was returned is in
|
|
2224
|
+
* settled_amount.
|
|
2225
|
+
*
|
|
2226
|
+
* Returns to the balance and to credit grants complete shortly after the refund is made; a
|
|
2227
|
+
* return to a payment method completes when the gateway confirms it.
|
|
2228
|
+
* @enum {string}
|
|
2229
|
+
*/
|
|
2230
|
+
status: "pending" | "processing" | "succeeded" | "failed";
|
|
2231
|
+
/**
|
|
2232
|
+
* Format: date-time
|
|
2233
|
+
* @description When the last part was returned. Present with `succeeded`.
|
|
2234
|
+
*/
|
|
2235
|
+
settled_at?: string;
|
|
2236
|
+
reason: components["schemas"]["RefundReason"];
|
|
2237
|
+
/** Format: date-time */
|
|
2238
|
+
created_at: string;
|
|
2239
|
+
};
|
|
2240
|
+
/**
|
|
2241
|
+
* @description Why the refund was made. Clients map the code to their own wording. More codes may be added;
|
|
2242
|
+
* treat an unknown code as a refund without a stated reason.
|
|
2243
|
+
*
|
|
2244
|
+
* - `provisioning_failed`: the purchase could not be delivered.
|
|
2245
|
+
* - `order_expired`: the order expired after part of it had been paid.
|
|
2246
|
+
* - `order_canceled`: the account holder canceled the order after part of it had been paid.
|
|
2247
|
+
* - `change_canceled`: a scheduled change was withdrawn after part of it had been paid.
|
|
2248
|
+
* - `change_expired`: a scheduled change could not take effect before its time passed.
|
|
2249
|
+
* - `subscription_canceled`: the subscription was canceled and its unused value returned under
|
|
2250
|
+
* its refund terms.
|
|
2251
|
+
* - `future_period_canceled`: a renewal that had not started yet was withdrawn.
|
|
2252
|
+
* - `downgrade_difference`: the unused value above the new price after a downgrade.
|
|
2253
|
+
* - `usage_true_up`: usage priced again over the whole month cost less than was charged.
|
|
2254
|
+
* - `payment_not_applied`: a payment arrived after its invoice could no longer be paid.
|
|
2255
|
+
* - `operator`: made by the platform operator.
|
|
2256
|
+
* @enum {string}
|
|
2257
|
+
*/
|
|
2258
|
+
RefundReason: "provisioning_failed" | "order_expired" | "order_canceled" | "change_canceled" | "change_expired" | "subscription_canceled" | "future_period_canceled" | "downgrade_difference" | "usage_true_up" | "payment_not_applied" | "operator";
|
|
2259
|
+
RefundList: {
|
|
2260
|
+
items: components["schemas"]["Refund"][];
|
|
2261
|
+
pagination: components["schemas"]["OffsetPagination"];
|
|
2262
|
+
};
|
|
2263
|
+
UsageCharge: {
|
|
2264
|
+
/** Format: uuid */
|
|
2265
|
+
subscription_id?: string;
|
|
2266
|
+
/** Format: uuid */
|
|
2267
|
+
id: string;
|
|
2268
|
+
/** Format: uuid */
|
|
2269
|
+
project_id?: string;
|
|
2270
|
+
/**
|
|
2271
|
+
* @description The project and its current name, for display. Absent when the project no longer exists or its
|
|
2272
|
+
* details cannot be read at the moment; `project_id` still identifies it.
|
|
2273
|
+
*/
|
|
2274
|
+
project?: components["schemas"]["NamedIdentity"] | null;
|
|
2275
|
+
product: components["schemas"]["Product"];
|
|
2276
|
+
/** @description Which resource this was charged for. Empty for charges not tied to one. */
|
|
2277
|
+
resource_id?: string;
|
|
2278
|
+
meter: components["schemas"]["ObjectIdentity"];
|
|
2279
|
+
unit?: string;
|
|
2280
|
+
/** @description The attributes the rate was chosen by, such as region and machine type. */
|
|
2281
|
+
dimensions?: {
|
|
2282
|
+
[key: string]: string;
|
|
2283
|
+
};
|
|
2284
|
+
/** Format: date-time */
|
|
2285
|
+
window_start: string;
|
|
2286
|
+
/**
|
|
2287
|
+
* Format: date-time
|
|
2288
|
+
* @description Exclusive.
|
|
2289
|
+
*/
|
|
2290
|
+
window_end: string;
|
|
2291
|
+
/** @description How much was used, before any included allowance. */
|
|
2292
|
+
gross_quantity?: string;
|
|
2293
|
+
/** @description How much of that was covered by an allowance. */
|
|
2294
|
+
deducted_quantity?: string;
|
|
2295
|
+
/** @description What was charged for — the gross quantity less the part covered. */
|
|
2296
|
+
quantity: string;
|
|
2297
|
+
unit_amount?: components["schemas"]["Money"];
|
|
2298
|
+
amount?: components["schemas"]["Money"];
|
|
2299
|
+
currency: string;
|
|
2300
|
+
/**
|
|
2301
|
+
* Format: uuid
|
|
2302
|
+
* @description The usage invoice this charge was added to. Absent while it waits to be priced.
|
|
2303
|
+
*/
|
|
2304
|
+
invoice_id?: string | null;
|
|
2305
|
+
/**
|
|
2306
|
+
* Format: uuid
|
|
2307
|
+
* @description The usage invoice line this charge was summed into. Absent while it waits to be priced.
|
|
2308
|
+
*/
|
|
2309
|
+
invoice_item_id?: string | null;
|
|
2310
|
+
};
|
|
2311
|
+
UsageChargeList: {
|
|
2312
|
+
items: components["schemas"]["UsageCharge"][];
|
|
2313
|
+
pagination: components["schemas"]["OffsetPagination"];
|
|
2314
|
+
};
|
|
2315
|
+
SubscriptionList: {
|
|
2316
|
+
items: components["schemas"]["Subscription"][];
|
|
2317
|
+
pagination: components["schemas"]["OffsetPagination"];
|
|
2318
|
+
};
|
|
2319
|
+
/** @description An independently billed purchase. Fixed renewals use the agreed recurring_amount and interval; already paid periods retain their original value. Technical state belongs to the owning service. */
|
|
2320
|
+
Subscription: {
|
|
2321
|
+
currency: string;
|
|
2322
|
+
/** @enum {string} */
|
|
2323
|
+
billing_type: "postpaid" | "prepaid" | "one_time";
|
|
2324
|
+
/** @enum {string} */
|
|
2325
|
+
interval: "none" | "day" | "month" | "year";
|
|
2326
|
+
interval_count?: number;
|
|
2327
|
+
/** @description Whole-subscription prepaid renewal amount, after continuing discounts and before tax. Absent for other billing types. */
|
|
2328
|
+
recurring_amount?: string;
|
|
2329
|
+
termination_policy?: components["schemas"]["TerminationPolicy"];
|
|
2330
|
+
refund_policy?: components["schemas"]["RefundPolicy"];
|
|
2331
|
+
/** Format: uuid */
|
|
2332
|
+
order_item_id?: string;
|
|
2333
|
+
/** Format: uuid */
|
|
2334
|
+
replaces_subscription_id?: string;
|
|
2335
|
+
/** Format: uuid */
|
|
2336
|
+
coupon_id?: string;
|
|
2337
|
+
coupon?: components["schemas"]["ObjectIdentity"];
|
|
2338
|
+
discounted_renewals_remaining?: number;
|
|
2339
|
+
suspend_reason?: string;
|
|
2340
|
+
/** Format: date-time */
|
|
2341
|
+
billing_cycle_anchor?: string;
|
|
2342
|
+
cancellation_request?: components["schemas"]["CancellationRequest"];
|
|
2343
|
+
/**
|
|
2344
|
+
* @description How the purchase, or the latest renewal paid with a saved card, was paid. Automatic renewal
|
|
2345
|
+
* tries this card after the account's balance and credits, and the account's default card after
|
|
2346
|
+
* that.
|
|
2347
|
+
*/
|
|
2348
|
+
paid_with?: components["schemas"]["PaidWith"];
|
|
2349
|
+
/** Format: date-time */
|
|
2350
|
+
created_at?: string;
|
|
2351
|
+
/** Format: uuid */
|
|
2352
|
+
id: string;
|
|
2353
|
+
/**
|
|
2354
|
+
* Format: int64
|
|
2355
|
+
* @description The billing account that made the purchase. Renewals of a project subscription are charged to the project's current billing account.
|
|
2356
|
+
*/
|
|
2357
|
+
billing_account_id: number;
|
|
2358
|
+
account: components["schemas"]["AccountIdentity"];
|
|
2359
|
+
product_id: components["schemas"]["ProductID"];
|
|
2360
|
+
/**
|
|
2361
|
+
* Format: uuid
|
|
2362
|
+
* @description Which project this is for. Absent when it was bought at account level, such as a
|
|
2363
|
+
* membership, which belongs to no single project.
|
|
2364
|
+
*/
|
|
2365
|
+
project_id?: string | null;
|
|
2366
|
+
/**
|
|
2367
|
+
* @description The project and its current name, for display. Absent for a purchase at account level,
|
|
2368
|
+
* and when the project no longer exists or its details cannot be read at the moment;
|
|
2369
|
+
* `project_id` still identifies it then.
|
|
2370
|
+
*/
|
|
2371
|
+
project?: components["schemas"]["NamedIdentity"] | null;
|
|
2372
|
+
product: components["schemas"]["Product"];
|
|
2373
|
+
/** Format: uuid */
|
|
2374
|
+
plan_id: string;
|
|
2375
|
+
plan_name: string;
|
|
2376
|
+
/** Format: uuid */
|
|
2377
|
+
price_id: string;
|
|
2378
|
+
quantity: string;
|
|
2379
|
+
/**
|
|
2380
|
+
* Format: date-time
|
|
2381
|
+
* @description Present for prepaid items. Absent for metered ones, which have no end date.
|
|
2382
|
+
*/
|
|
2383
|
+
paid_until?: string | null;
|
|
2384
|
+
auto_renew: boolean;
|
|
2385
|
+
/** @enum {string} */
|
|
2386
|
+
status: "pending" | "active" | "suspended" | "canceled" | "terminated";
|
|
2387
|
+
/** Format: date-time */
|
|
2388
|
+
started_at?: string | null;
|
|
2389
|
+
/** Format: date-time */
|
|
2390
|
+
ended_at?: string | null;
|
|
2391
|
+
};
|
|
2392
|
+
RenewalPrice: {
|
|
2393
|
+
termination_policy?: components["schemas"]["TerminationPolicy"];
|
|
2394
|
+
refund_policy?: components["schemas"]["RefundPolicy"];
|
|
2395
|
+
/** Format: uuid */
|
|
2396
|
+
price_id: string;
|
|
2397
|
+
/** @description How many periods one renewal covers. */
|
|
2398
|
+
interval_count: number;
|
|
2399
|
+
/** @enum {string} */
|
|
2400
|
+
interval: "day" | "month" | "year";
|
|
2401
|
+
/** @description What renewing for this term costs, for the quantity held. */
|
|
2402
|
+
amount?: components["schemas"]["Money"];
|
|
2403
|
+
currency?: string;
|
|
2404
|
+
/**
|
|
2405
|
+
* @description The term this item already bills at. Renewing for it uses the price bought
|
|
2406
|
+
* originally, so a later price change does not affect it.
|
|
2407
|
+
*/
|
|
2408
|
+
current: boolean;
|
|
2409
|
+
};
|
|
2410
|
+
RenewalPriceList: {
|
|
2411
|
+
items: components["schemas"]["RenewalPrice"][];
|
|
2412
|
+
pagination: components["schemas"]["OffsetPagination"];
|
|
2413
|
+
};
|
|
2414
|
+
RenewRequest: {
|
|
2415
|
+
/**
|
|
2416
|
+
* Format: uuid
|
|
2417
|
+
* @description Purchase ID saved before submitting. Duplicate creation conflicts; query this order after an unknown result.
|
|
2418
|
+
*/
|
|
2419
|
+
order_id: string;
|
|
2420
|
+
/**
|
|
2421
|
+
* @description How many further periods to buy, each at the price this item already bills at.
|
|
2422
|
+
*
|
|
2423
|
+
* Buying twelve monthly periods is not the same as buying one yearly term: a longer
|
|
2424
|
+
* term is usually sold at a lower price, and that price is only reached by naming the
|
|
2425
|
+
* interval. Use `interval_count` and `interval` for that.
|
|
2426
|
+
* @default 1
|
|
2427
|
+
*/
|
|
2428
|
+
periods?: number;
|
|
2429
|
+
/**
|
|
2430
|
+
* @description Renew for a term of this length instead, at the price currently sold for it. Give
|
|
2431
|
+
* `interval` with it.
|
|
2432
|
+
*
|
|
2433
|
+
* Leaving both out renews at the price this item already bills at, which a later price
|
|
2434
|
+
* change does not affect. Naming a term that differs from the current one is a fresh
|
|
2435
|
+
* choice, so it is bought at today's price. Naming the current term changes nothing.
|
|
2436
|
+
*
|
|
2437
|
+
* List the terms on offer with the renewal prices operation.
|
|
2438
|
+
*/
|
|
2439
|
+
interval_count?: number;
|
|
2440
|
+
/**
|
|
2441
|
+
* @description The unit interval_count counts in.
|
|
2442
|
+
* @enum {string}
|
|
2443
|
+
*/
|
|
2444
|
+
interval?: "day" | "month" | "year";
|
|
2445
|
+
/** Format: uuid */
|
|
2446
|
+
payment_method_id?: string;
|
|
2447
|
+
/**
|
|
2448
|
+
* @description Whether to pay from the balance, with or without `payment_method_id`.
|
|
2449
|
+
* @default true
|
|
2450
|
+
*/
|
|
2451
|
+
use_balance?: boolean;
|
|
2452
|
+
/**
|
|
2453
|
+
* @description Whether to pay from eligible credit grants before the balance.
|
|
2454
|
+
* @default true
|
|
2455
|
+
*/
|
|
2456
|
+
use_credits?: boolean;
|
|
2457
|
+
return_url?: string;
|
|
2458
|
+
};
|
|
2459
|
+
/** @description The periods and price of the renewal, chosen as in renewing. */
|
|
2460
|
+
RenewalOrderRequest: {
|
|
2461
|
+
/**
|
|
2462
|
+
* Format: uuid
|
|
2463
|
+
* @description Purchase ID saved before submitting. Duplicate creation conflicts; query this order after an unknown result.
|
|
2464
|
+
*/
|
|
2465
|
+
order_id: string;
|
|
2466
|
+
/**
|
|
2467
|
+
* @description As in renewing.
|
|
2468
|
+
* @default 1
|
|
2469
|
+
*/
|
|
2470
|
+
periods?: number;
|
|
2471
|
+
/** @description As in renewing. */
|
|
2472
|
+
interval_count?: number;
|
|
2473
|
+
/**
|
|
2474
|
+
* @description As in renewing.
|
|
2475
|
+
* @enum {string}
|
|
2476
|
+
*/
|
|
2477
|
+
interval?: "day" | "month" | "year";
|
|
2478
|
+
};
|
|
2479
|
+
AutoRenewSet: {
|
|
2480
|
+
auto_renew: boolean;
|
|
2481
|
+
};
|
|
2482
|
+
/**
|
|
2483
|
+
* @description Follows the items. `pending` is not yet accepted and may be paid or unpaid. `active` is
|
|
2484
|
+
* accepted with items still being set up. `completed` means every item was set up.
|
|
2485
|
+
* `partially_completed` means some items were set up and the others failed and were
|
|
2486
|
+
* refunded to their original payment sources. `failed` means every item failed and the
|
|
2487
|
+
* whole order was refunded. `canceled` means the order was withdrawn before payment and
|
|
2488
|
+
* nothing was charged.
|
|
2489
|
+
* @enum {string}
|
|
2490
|
+
*/
|
|
2491
|
+
OrderStatus: "pending" | "active" | "completed" | "partially_completed" | "failed" | "canceled";
|
|
2492
|
+
/**
|
|
2493
|
+
* @description `pending` is waiting to be set up. `completed` was confirmed by the service.
|
|
2494
|
+
* `failed` was not set up and its amount was refunded to the original payment sources.
|
|
2495
|
+
* `canceled` was withdrawn with its unpaid order. A completed item is ended by canceling
|
|
2496
|
+
* its subscription.
|
|
2497
|
+
* @enum {string}
|
|
2498
|
+
*/
|
|
2499
|
+
OrderItemStatus: "pending" | "completed" | "failed" | "canceled";
|
|
2500
|
+
Order: {
|
|
2501
|
+
/** Format: uuid */
|
|
2502
|
+
coupon_id?: string;
|
|
2503
|
+
coupon?: components["schemas"]["ObjectIdentity"];
|
|
2504
|
+
/** Format: uuid */
|
|
2505
|
+
promotion_code_id?: string;
|
|
2506
|
+
/** @description Code text frozen when this order applied the coupon. */
|
|
2507
|
+
promotion_code?: string;
|
|
2508
|
+
invoice?: components["schemas"]["InvoiceSummary"];
|
|
2509
|
+
/** @description How the order was paid. Absent until it is paid. */
|
|
2510
|
+
paid_with?: components["schemas"]["PaidWith"];
|
|
2511
|
+
account?: components["schemas"]["AccountIdentity"];
|
|
2512
|
+
cancel_reason?: string;
|
|
2513
|
+
/** Format: date-time */
|
|
2514
|
+
change_effective_at?: string;
|
|
2515
|
+
/** Format: uuid */
|
|
2516
|
+
id: string;
|
|
2517
|
+
/**
|
|
2518
|
+
* Format: uuid
|
|
2519
|
+
* @description Which project it was bought for. Absent for a purchase made at account level, such
|
|
2520
|
+
* as a membership.
|
|
2521
|
+
*/
|
|
2522
|
+
project_id?: string | null;
|
|
2523
|
+
/**
|
|
2524
|
+
* @description The project and its current name, for display. Absent for a purchase at account level,
|
|
2525
|
+
* and when the project no longer exists or its details cannot be read at the moment;
|
|
2526
|
+
* `project_id` still identifies it then.
|
|
2527
|
+
*/
|
|
2528
|
+
project?: components["schemas"]["NamedIdentity"] | null;
|
|
2529
|
+
/**
|
|
2530
|
+
* Format: int64
|
|
2531
|
+
* @description The billing account the order was placed with. It does not change when the project is later
|
|
2532
|
+
* linked to another billing account. While this account is suspended or closed the order cannot
|
|
2533
|
+
* be accepted, and a change scheduled for the end of a period is not invoiced and is called off
|
|
2534
|
+
* when the current period ends; such requests fail with BILLING_ACCOUNT_UNAVAILABLE.
|
|
2535
|
+
*/
|
|
2536
|
+
billing_account_id?: number;
|
|
2537
|
+
currency: string;
|
|
2538
|
+
/**
|
|
2539
|
+
* @description `adopt` brings a resource that already existed under billing. It charges nothing at
|
|
2540
|
+
* the time and starts billing from the moment agreed.
|
|
2541
|
+
* @enum {string}
|
|
2542
|
+
*/
|
|
2543
|
+
type: "purchase" | "renew" | "change" | "adopt";
|
|
2544
|
+
status: components["schemas"]["OrderStatus"];
|
|
2545
|
+
/**
|
|
2546
|
+
* @description When a plan change takes effect. `none` on anything that is not a change.
|
|
2547
|
+
*
|
|
2548
|
+
* `period_end` orders stay pending until the first period at the new price is paid. That period
|
|
2549
|
+
* is invoiced shortly before the current paid period ends and starts when it ends; if the
|
|
2550
|
+
* invoice is still unpaid by then, the order is canceled and the subscription renews or ends as
|
|
2551
|
+
* usual. Renewing in the meantime moves all of this along with it.
|
|
2552
|
+
* @enum {string}
|
|
2553
|
+
*/
|
|
2554
|
+
change_effective?: "none" | "immediate" | "period_end";
|
|
2555
|
+
/**
|
|
2556
|
+
* Format: date-time
|
|
2557
|
+
* @description Acceptance deadline. Only pending orders expire automatically.
|
|
2558
|
+
*/
|
|
2559
|
+
expires_at?: string | null;
|
|
2560
|
+
/** Format: date-time */
|
|
2561
|
+
created_at: string;
|
|
2562
|
+
/**
|
|
2563
|
+
* @description What was bought. Present on a single order and on every order in a list, so a list
|
|
2564
|
+
* can be rendered without a further request per row.
|
|
2565
|
+
*/
|
|
2566
|
+
items: components["schemas"]["OrderItem"][];
|
|
2567
|
+
};
|
|
2568
|
+
OrderList: {
|
|
2569
|
+
items: components["schemas"]["Order"][];
|
|
2570
|
+
pagination: components["schemas"]["OffsetPagination"];
|
|
2571
|
+
};
|
|
2572
|
+
/**
|
|
2573
|
+
* @description How it was paid, as recorded at the time. It is kept as it was: removing the card afterwards
|
|
2574
|
+
* does not change it, and `payment_method_id` may then name a card that no longer exists.
|
|
2575
|
+
*/
|
|
2576
|
+
PaidWith: {
|
|
2577
|
+
/**
|
|
2578
|
+
* @description `balance` when the account's balance and credits covered it in full. Otherwise the method used
|
|
2579
|
+
* with the gateway, such as `card`.
|
|
2580
|
+
*/
|
|
2581
|
+
method_type: string;
|
|
2582
|
+
/** @description The gateway that collected it. Absent when `method_type` is `balance`. */
|
|
2583
|
+
payment_gateway?: string;
|
|
2584
|
+
/**
|
|
2585
|
+
* Format: uuid
|
|
2586
|
+
* @description The saved payment method that was charged, when one was.
|
|
2587
|
+
*/
|
|
2588
|
+
payment_method_id?: string;
|
|
2589
|
+
brand?: string;
|
|
2590
|
+
last4?: string;
|
|
2591
|
+
};
|
|
2592
|
+
/** @description Specify lines to check whether the promotion code applies to new purchases and to estimate its discount. Without lines, the response contains the code terms without a purchase-specific applicability decision. */
|
|
2593
|
+
PromotionCodePreviewRequest: {
|
|
2594
|
+
/** Format: int64 */
|
|
2595
|
+
billing_account_id: number;
|
|
2596
|
+
promotion_code: string;
|
|
2597
|
+
/** @description New purchases to test against, in the same shape as a quote. */
|
|
2598
|
+
lines?: components["schemas"]["QuoteLine"][];
|
|
2599
|
+
};
|
|
2600
|
+
/** @description Describes a usable promotion code and its applicability to the requested purchase. Invalid codes return an error response. */
|
|
2601
|
+
PromotionCodePreview: {
|
|
2602
|
+
min_amount?: string;
|
|
2603
|
+
/** @enum {string} */
|
|
2604
|
+
type?: "percentage" | "fixed_amount" | "price_override" | "free_setup";
|
|
2605
|
+
recurring?: boolean;
|
|
2606
|
+
recurring_cycles?: number;
|
|
2607
|
+
name?: string;
|
|
2608
|
+
/** @description For a fixed-amount discount. */
|
|
2609
|
+
amount?: components["schemas"]["Money"];
|
|
2610
|
+
/** @description For a percentage discount. */
|
|
2611
|
+
percent_off?: string;
|
|
2612
|
+
max_discount?: components["schemas"]["Money"];
|
|
2613
|
+
currency?: string;
|
|
2614
|
+
/**
|
|
2615
|
+
* @description What it may be used for. Present whether or not a purchase was given, so that the
|
|
2616
|
+
* terms can be shown before anything is chosen.
|
|
2617
|
+
*/
|
|
2618
|
+
applies_to?: components["schemas"]["Applicability"];
|
|
2619
|
+
/**
|
|
2620
|
+
* @description The terms in one sentence, ready to display — for example "Compute, new purchases
|
|
2621
|
+
* only, from 100.00" or "No restriction on product or purchase type".
|
|
2622
|
+
*/
|
|
2623
|
+
summary?: string;
|
|
2624
|
+
/** Format: date-time */
|
|
2625
|
+
valid_until?: string | null;
|
|
2626
|
+
/**
|
|
2627
|
+
* @description Whether it applies to the purchase given in `lines`. Absent when no purchase was
|
|
2628
|
+
* given.
|
|
2629
|
+
*/
|
|
2630
|
+
applicable?: boolean;
|
|
2631
|
+
applicable_reason?: components["schemas"]["PromotionCodeRejection"];
|
|
2632
|
+
/**
|
|
2633
|
+
* @description The total of the lines that match the restrictions. This is what the threshold is
|
|
2634
|
+
* measured against, not the order total.
|
|
2635
|
+
*/
|
|
2636
|
+
qualifying_amount?: components["schemas"]["Money"];
|
|
2637
|
+
/**
|
|
2638
|
+
* @description How much more of a qualifying purchase is needed to reach the threshold. `"0"` once
|
|
2639
|
+
* it is met.
|
|
2640
|
+
*/
|
|
2641
|
+
shortfall?: components["schemas"]["Money"];
|
|
2642
|
+
/**
|
|
2643
|
+
* @description What it would take off this purchase. An estimate: the amount is settled at the
|
|
2644
|
+
* moment the order is placed.
|
|
2645
|
+
*/
|
|
2646
|
+
estimated_discount?: components["schemas"]["Money"];
|
|
2647
|
+
};
|
|
2648
|
+
/**
|
|
2649
|
+
* @description Why a code cannot be used. `none` when it can.
|
|
2650
|
+
*
|
|
2651
|
+
* `operation_not_covered` means the code is limited to certain purchase actions — a
|
|
2652
|
+
* first-purchase code presented for a renewal, for example.
|
|
2653
|
+
*
|
|
2654
|
+
* `term_not_covered` means the code is limited to certain term lengths. A purchase with
|
|
2655
|
+
* no term, such as metered usage, is reported the same way.
|
|
2656
|
+
*
|
|
2657
|
+
* `below_minimum` is accompanied by `shortfall`.
|
|
2658
|
+
* @enum {string}
|
|
2659
|
+
*/
|
|
2660
|
+
PromotionCodeRejection: "none" | "not_found" | "expired" | "not_yet_valid" | "exhausted" | "already_redeemed" | "currency_mismatch" | "product_not_covered" | "plan_not_covered" | "price_not_covered" | "price_type_not_covered" | "operation_not_covered" | "term_not_covered" | "not_first_purchase" | "below_minimum";
|
|
2661
|
+
/**
|
|
2662
|
+
* @description Which purchase this applies to. `upgrade` and `downgrade` are told apart by money: a change
|
|
2663
|
+
* that costs more for the remainder of the period is an upgrade, one that returns money
|
|
2664
|
+
* is a downgrade. A change that costs neither more nor less is neither.
|
|
2665
|
+
*
|
|
2666
|
+
* `purchase` means a new purchase as opposed to a renewal or a change. It does not mean the
|
|
2667
|
+
* account's first purchase.
|
|
2668
|
+
* @enum {string}
|
|
2669
|
+
*/
|
|
2670
|
+
PurchaseOperation: "purchase" | "renew" | "upgrade" | "downgrade";
|
|
2671
|
+
/** @description A coupon held on this account. It applies at checkout without a code. */
|
|
2672
|
+
Discount: {
|
|
2673
|
+
min_amount?: string;
|
|
2674
|
+
/** Format: int64 */
|
|
2675
|
+
billing_account_id?: number;
|
|
2676
|
+
/** Format: uuid */
|
|
2677
|
+
coupon_id: string;
|
|
2678
|
+
/** Format: uuid */
|
|
2679
|
+
promotion_code_id?: string;
|
|
2680
|
+
/** @enum {string} */
|
|
2681
|
+
status: "active" | "revoked";
|
|
2682
|
+
/** Format: date-time */
|
|
2683
|
+
revoked_at?: string;
|
|
2684
|
+
/** @enum {string} */
|
|
2685
|
+
type: "percentage" | "fixed_amount" | "price_override" | "free_setup";
|
|
2686
|
+
recurring?: boolean;
|
|
2687
|
+
recurring_cycles?: number;
|
|
2688
|
+
/** Format: uuid */
|
|
2689
|
+
id: string;
|
|
2690
|
+
name?: string;
|
|
2691
|
+
/** @description For a percentage discount, out of one hundred. */
|
|
2692
|
+
percent_off?: string;
|
|
2693
|
+
/** @description Fixed discount or per-unit interval price override for this account currency. */
|
|
2694
|
+
amount?: components["schemas"]["Money"];
|
|
2695
|
+
/** @description Caps a percentage discount. */
|
|
2696
|
+
max_discount?: components["schemas"]["Money"];
|
|
2697
|
+
currency?: string;
|
|
2698
|
+
/**
|
|
2699
|
+
* @description What it may be used for. Absent means it applies to anything on the account,
|
|
2700
|
+
* including setup fees and traffic.
|
|
2701
|
+
*/
|
|
2702
|
+
applies_to: components["schemas"]["Applicability"];
|
|
2703
|
+
/** Format: date-time */
|
|
2704
|
+
started_at?: string;
|
|
2705
|
+
/** Format: date-time */
|
|
2706
|
+
ended_at?: string | null;
|
|
2707
|
+
};
|
|
2708
|
+
DiscountList: {
|
|
2709
|
+
items: components["schemas"]["Discount"][];
|
|
2710
|
+
pagination: components["schemas"]["OffsetPagination"];
|
|
2711
|
+
};
|
|
2712
|
+
/** @description A price's display terms, including retired prices referenced by an applicability list. */
|
|
2713
|
+
PriceOption: {
|
|
2714
|
+
product: components["schemas"]["Product"];
|
|
2715
|
+
plan: components["schemas"]["ObjectIdentity"];
|
|
2716
|
+
/** @enum {string} */
|
|
2717
|
+
billing_scheme: "per_unit" | "tiered" | "rated";
|
|
2718
|
+
unit_quantity: string;
|
|
2719
|
+
/** Format: uuid */
|
|
2720
|
+
id: string;
|
|
2721
|
+
currency: string;
|
|
2722
|
+
/** @enum {string} */
|
|
2723
|
+
type: "postpaid" | "prepaid" | "one_time";
|
|
2724
|
+
/** @enum {string} */
|
|
2725
|
+
interval: "none" | "day" | "month" | "year";
|
|
2726
|
+
/** @description How many periods one purchase covers. */
|
|
2727
|
+
interval_count?: number;
|
|
2728
|
+
unit_amount?: components["schemas"]["Money"];
|
|
2729
|
+
};
|
|
2730
|
+
/**
|
|
2731
|
+
* @description Product, plan and price lists form a union; three empty lists permit every item.
|
|
2732
|
+
* Other conditions apply together. Entries always include their display fields.
|
|
2733
|
+
*/
|
|
2734
|
+
Applicability: {
|
|
2735
|
+
products?: components["schemas"]["Product"][];
|
|
2736
|
+
plans?: components["schemas"]["ObjectIdentity"][];
|
|
2737
|
+
prices?: components["schemas"]["PriceOption"][];
|
|
2738
|
+
price_types?: string[];
|
|
2739
|
+
operations?: components["schemas"]["PurchaseOperation"][];
|
|
2740
|
+
/** @description Restricted to your first purchase of a covered product. */
|
|
2741
|
+
first_purchase_only?: boolean;
|
|
2742
|
+
/**
|
|
2743
|
+
* @description The shortest term a purchase may have, in months. A purchase with no term, such as
|
|
2744
|
+
* metered usage, never qualifies while this is set.
|
|
2745
|
+
*/
|
|
2746
|
+
min_term_months?: number;
|
|
2747
|
+
/** @description The longest term a purchase may have, in months. */
|
|
2748
|
+
max_term_months?: number;
|
|
2749
|
+
};
|
|
2750
|
+
/** @description Frozen purchase terms. Monetary fields come from related invoice-line snapshots and are absent when there is no immediate invoice. Later catalog changes do not reprice this line. */
|
|
2751
|
+
OrderItem: {
|
|
2752
|
+
position?: number;
|
|
2753
|
+
configuration?: {
|
|
2754
|
+
[key: string]: unknown;
|
|
2755
|
+
};
|
|
2756
|
+
/** Format: uuid */
|
|
2757
|
+
subscription_id?: string;
|
|
2758
|
+
/** @enum {string} */
|
|
2759
|
+
interval: "none" | "day" | "month" | "year";
|
|
2760
|
+
interval_count?: number;
|
|
2761
|
+
termination_policy?: components["schemas"]["TerminationPolicy"];
|
|
2762
|
+
refund_policy?: components["schemas"]["RefundPolicy"];
|
|
2763
|
+
completes_on_payment: boolean;
|
|
2764
|
+
recurring_amount?: string;
|
|
2765
|
+
setup_amount?: string;
|
|
2766
|
+
/**
|
|
2767
|
+
* @description The payment timing of the selected price.
|
|
2768
|
+
* @enum {string}
|
|
2769
|
+
*/
|
|
2770
|
+
billing_type: "postpaid" | "prepaid" | "one_time";
|
|
2771
|
+
/** @description Total tax after discounts, including any tax already included in the price. */
|
|
2772
|
+
tax_amount?: string;
|
|
2773
|
+
/** @description The part of tax_amount already included in gross_amount; it is not charged again. */
|
|
2774
|
+
tax_included_amount?: string;
|
|
2775
|
+
/** Format: uuid */
|
|
2776
|
+
id: string;
|
|
2777
|
+
/** Format: uuid */
|
|
2778
|
+
order_id?: string;
|
|
2779
|
+
/** Format: uuid */
|
|
2780
|
+
price_id: string;
|
|
2781
|
+
/** @description Which service this line belongs to. */
|
|
2782
|
+
product_id?: components["schemas"]["ProductID"];
|
|
2783
|
+
product?: components["schemas"]["Product"];
|
|
2784
|
+
/**
|
|
2785
|
+
* Format: uuid
|
|
2786
|
+
* @description Which plan was bought.
|
|
2787
|
+
*/
|
|
2788
|
+
plan_id: string;
|
|
2789
|
+
/**
|
|
2790
|
+
* @description What it was called when bought. It does not follow later catalogue renames and is
|
|
2791
|
+
* not translated.
|
|
2792
|
+
*/
|
|
2793
|
+
plan_name: string;
|
|
2794
|
+
quantity: string;
|
|
2795
|
+
/**
|
|
2796
|
+
* @description The unit amount of the price this line is charged under. Absent for a tiered price, which has no
|
|
2797
|
+
* single unit amount, and for a change that takes effect at once, which is charged the prorated
|
|
2798
|
+
* difference.
|
|
2799
|
+
*/
|
|
2800
|
+
unit_amount?: components["schemas"]["Money"];
|
|
2801
|
+
/**
|
|
2802
|
+
* @description Before discounts: the price applied to the quantity, which for a per-unit price is `unit_amount`
|
|
2803
|
+
* times `quantity`; a minimum charge can make it higher. For a change that takes effect at once it is
|
|
2804
|
+
* the prorated difference. The setup fee is not part of it; see `setup_amount`.
|
|
2805
|
+
*
|
|
2806
|
+
* Under an inclusive tax rate it includes tax, as the price does, and the included part is
|
|
2807
|
+
* `tax_included_amount`. A renewal at the agreed terms is the exception: the agreed amount excludes
|
|
2808
|
+
* tax, and tax is added to it.
|
|
2809
|
+
*/
|
|
2810
|
+
gross_amount?: components["schemas"]["Money"];
|
|
2811
|
+
/**
|
|
2812
|
+
* @description The reduction on this line: from the coupon the order uses and, for a renewal at the agreed terms,
|
|
2813
|
+
* from the discount the subscription carries.
|
|
2814
|
+
*
|
|
2815
|
+
* A carried discount is part of the agreed amount. It is listed here, and `gross_amount` is then
|
|
2816
|
+
* `unit_amount` times `quantity`, except in two cases where `gross_amount` is the agreed amount and
|
|
2817
|
+
* the carried discount is already reflected in it: the renewal order also uses a coupon the account
|
|
2818
|
+
* holds, or the account's tax rate is inclusive.
|
|
2819
|
+
*/
|
|
2820
|
+
discount_amount?: components["schemas"]["Money"];
|
|
2821
|
+
/** @description `gross_amount` less `discount_amount`. */
|
|
2822
|
+
amount?: components["schemas"]["Money"];
|
|
2823
|
+
currency: string;
|
|
2824
|
+
/** Format: date-time */
|
|
2825
|
+
period_start?: string | null;
|
|
2826
|
+
/** Format: date-time */
|
|
2827
|
+
period_end?: string | null;
|
|
2828
|
+
status: components["schemas"]["OrderItemStatus"];
|
|
2829
|
+
};
|
|
2830
|
+
OrderItemList: {
|
|
2831
|
+
items: components["schemas"]["OrderItem"][];
|
|
2832
|
+
pagination: components["schemas"]["OffsetPagination"];
|
|
2833
|
+
};
|
|
2834
|
+
Allowance: {
|
|
2835
|
+
/** @description Optional issuance key, unique within this billing account. */
|
|
2836
|
+
idempotency_key?: string;
|
|
2837
|
+
/** Format: uuid */
|
|
2838
|
+
subscription_id?: string;
|
|
2839
|
+
/** Format: uuid */
|
|
2840
|
+
id: string;
|
|
2841
|
+
/** Format: int64 */
|
|
2842
|
+
billing_account_id?: number;
|
|
2843
|
+
product: components["schemas"]["Product"];
|
|
2844
|
+
meter: components["schemas"]["ObjectIdentity"];
|
|
2845
|
+
/** @description The unit it is counted in, such as `MiB`. */
|
|
2846
|
+
unit?: string;
|
|
2847
|
+
/**
|
|
2848
|
+
* @description `included` came with a recurring purchase and ends with its subscription, `promotional` was
|
|
2849
|
+
* granted.
|
|
2850
|
+
* @enum {string}
|
|
2851
|
+
*/
|
|
2852
|
+
source_type: "included" | "promotional";
|
|
2853
|
+
name: string;
|
|
2854
|
+
/** @description How much was granted. */
|
|
2855
|
+
quantity: string;
|
|
2856
|
+
/** @description How much is left. */
|
|
2857
|
+
remaining_quantity: string;
|
|
2858
|
+
/**
|
|
2859
|
+
* @description Lower values are consumed first. At equal priority, earlier expiry and then earlier issuance take
|
|
2860
|
+
* precedence.
|
|
2861
|
+
*/
|
|
2862
|
+
priority?: number;
|
|
2863
|
+
/** @enum {string} */
|
|
2864
|
+
status: "active" | "depleted" | "expired" | "voided";
|
|
2865
|
+
/** Format: date-time */
|
|
2866
|
+
valid_from: string;
|
|
2867
|
+
/**
|
|
2868
|
+
* Format: date-time
|
|
2869
|
+
* @description When it lapses. Anything unused at that point is lost; it is not refunded and does
|
|
2870
|
+
* not carry over. Absent when it does not expire on its own.
|
|
2871
|
+
*/
|
|
2872
|
+
valid_until?: string | null;
|
|
2873
|
+
};
|
|
2874
|
+
AllowanceList: {
|
|
2875
|
+
items: components["schemas"]["Allowance"][];
|
|
2876
|
+
pagination: components["schemas"]["OffsetPagination"];
|
|
2877
|
+
};
|
|
2878
|
+
Entitlement: {
|
|
2879
|
+
product: components["schemas"]["Product"];
|
|
2880
|
+
feature: components["schemas"]["ObjectIdentity"];
|
|
2881
|
+
name?: string;
|
|
2882
|
+
enabled: boolean;
|
|
2883
|
+
/**
|
|
2884
|
+
* Format: date-time
|
|
2885
|
+
* @description When the subscription providing it ends. Absent for a metered subscription, which
|
|
2886
|
+
* has no end date.
|
|
2887
|
+
*/
|
|
2888
|
+
expires_at?: string | null;
|
|
2889
|
+
};
|
|
2890
|
+
EntitlementList: {
|
|
2891
|
+
items: components["schemas"]["Entitlement"][];
|
|
2892
|
+
pagination: components["schemas"]["OffsetPagination"];
|
|
2893
|
+
};
|
|
2894
|
+
/** @description Purchase-related invoice amounts, without account contact details or payment methods. Absent on an order with no immediate invoice. */
|
|
2895
|
+
InvoiceSummary: {
|
|
2896
|
+
/** Format: uuid */
|
|
2897
|
+
id: string;
|
|
2898
|
+
number?: string;
|
|
2899
|
+
currency: string;
|
|
2900
|
+
status: components["schemas"]["InvoiceStatus"];
|
|
2901
|
+
/**
|
|
2902
|
+
* @description Sum of the line amounts before discounts. Where prices include tax, the tax contained in
|
|
2903
|
+
* each line's discounted amount is taken out here, so that total = subtotal -
|
|
2904
|
+
* discount_amount + tax_amount always holds.
|
|
2905
|
+
*/
|
|
2906
|
+
subtotal: string;
|
|
2907
|
+
/** @description Sum of the line discounts, taken off before tax. */
|
|
2908
|
+
discount_amount: string;
|
|
2909
|
+
tax_amount: string;
|
|
2910
|
+
total: string;
|
|
2911
|
+
amount_paid: string;
|
|
2912
|
+
amount_refunded: string;
|
|
2913
|
+
/** Format: date-time */
|
|
2914
|
+
due_at?: string;
|
|
2915
|
+
};
|
|
2916
|
+
/** @description Tax name, rate and amounts frozen on the invoice. */
|
|
2917
|
+
TaxItem: {
|
|
2918
|
+
/** Format: uuid */
|
|
2919
|
+
id: string;
|
|
2920
|
+
/** Format: uuid */
|
|
2921
|
+
invoice_id: string;
|
|
2922
|
+
name: string;
|
|
2923
|
+
percentage: string;
|
|
2924
|
+
country: string;
|
|
2925
|
+
state?: string;
|
|
2926
|
+
taxable_amount: string;
|
|
2927
|
+
tax_amount: string;
|
|
2928
|
+
currency: string;
|
|
2929
|
+
};
|
|
2930
|
+
/** @description A catalog object inlined for display. */
|
|
2931
|
+
ObjectIdentity: {
|
|
2932
|
+
lookup_key?: string;
|
|
2933
|
+
/** Format: uuid */
|
|
2934
|
+
id: string;
|
|
2935
|
+
name: string;
|
|
2936
|
+
};
|
|
2937
|
+
/**
|
|
2938
|
+
* @description A decimal string, in the currency stated alongside it.
|
|
2939
|
+
*
|
|
2940
|
+
* **The currency is not part of this type.** It is carried by a `currency` field next to the
|
|
2941
|
+
* amount, or by the account the amount belongs to. Reading an amount without that field is
|
|
2942
|
+
* reading a number with no unit.
|
|
2943
|
+
*
|
|
2944
|
+
* It is a string rather than a JSON number because a JSON number is a float in most parsers,
|
|
2945
|
+
* and a float loses precision on the first arithmetic. Nothing on this platform puts an amount
|
|
2946
|
+
* through a float.
|
|
2947
|
+
* @example 10.2500000000
|
|
2948
|
+
*/
|
|
2949
|
+
Money: string;
|
|
2950
|
+
/** @description Pagination metadata for stable numbered pages. total_count is returned only when the operation can determine it without an unbounded scan. */
|
|
2951
|
+
OffsetPagination: {
|
|
2952
|
+
/** Format: int64 */
|
|
2953
|
+
page: number;
|
|
2954
|
+
/** Format: int64 */
|
|
2955
|
+
page_size: number;
|
|
2956
|
+
/** Format: int64 */
|
|
2957
|
+
total_count?: number;
|
|
2958
|
+
};
|
|
2959
|
+
/**
|
|
2960
|
+
* @description Which object this is, together with what a person currently calls it.
|
|
2961
|
+
*
|
|
2962
|
+
* The name is for display. It is chosen by whoever owns the object, it changes, it is not unique
|
|
2963
|
+
* between objects, and it may be empty when nobody has named it yet — so it must not be used to
|
|
2964
|
+
* address, match or deduplicate anything. Addressing is by id.
|
|
2965
|
+
*
|
|
2966
|
+
* This differs from an identity carrying a lookup key: a lookup key is written once by an operator,
|
|
2967
|
+
* is unique, and can be used to fetch the object. A name cannot.
|
|
2968
|
+
*/
|
|
2969
|
+
NamedIdentity: {
|
|
2970
|
+
/** Format: uuid */
|
|
2971
|
+
id: string;
|
|
2972
|
+
name: string;
|
|
2973
|
+
};
|
|
2974
|
+
};
|
|
2975
|
+
responses: {
|
|
2976
|
+
/** @description Error */
|
|
2977
|
+
Error: {
|
|
2978
|
+
headers: {
|
|
2979
|
+
[name: string]: unknown;
|
|
2980
|
+
};
|
|
2981
|
+
content: {
|
|
2982
|
+
"application/json": components["schemas"]["Error"];
|
|
2983
|
+
};
|
|
2984
|
+
};
|
|
2985
|
+
};
|
|
2986
|
+
parameters: {
|
|
2987
|
+
/** @description 1-based page number; the first page when omitted. */
|
|
2988
|
+
Page: number;
|
|
2989
|
+
/** @description How many per page, 100 at most. */
|
|
2990
|
+
PageSize: number;
|
|
2991
|
+
From: string;
|
|
2992
|
+
/** @description Exclusive. */
|
|
2993
|
+
To: string;
|
|
2994
|
+
/** @description Restrict to one of your accounts. All of them when omitted. */
|
|
2995
|
+
AccountIdQuery: number;
|
|
2996
|
+
AccountId: number;
|
|
2997
|
+
ProjectId: string;
|
|
2998
|
+
InvoiceId: string;
|
|
2999
|
+
OrderId: string;
|
|
3000
|
+
CancellationId: string;
|
|
3001
|
+
SubscriptionId: string;
|
|
3002
|
+
PaymentMethodId: string;
|
|
3003
|
+
};
|
|
3004
|
+
requestBodies: never;
|
|
3005
|
+
headers: never;
|
|
3006
|
+
pathItems: never;
|
|
3007
|
+
}
|
|
3008
|
+
export type $defs = Record<string, never>;
|
|
3009
|
+
export interface operations {
|
|
3010
|
+
"list-currencies": {
|
|
3011
|
+
parameters: {
|
|
3012
|
+
query?: {
|
|
3013
|
+
/** @description 1-based page number; the first page when omitted. */
|
|
3014
|
+
page?: components["parameters"]["Page"];
|
|
3015
|
+
/** @description How many per page, 100 at most. */
|
|
3016
|
+
page_size?: components["parameters"]["PageSize"];
|
|
3017
|
+
};
|
|
3018
|
+
header?: never;
|
|
3019
|
+
path?: never;
|
|
3020
|
+
cookie?: never;
|
|
3021
|
+
};
|
|
3022
|
+
requestBody?: never;
|
|
3023
|
+
responses: {
|
|
3024
|
+
/** @description OK */
|
|
3025
|
+
200: {
|
|
3026
|
+
headers: {
|
|
3027
|
+
[name: string]: unknown;
|
|
3028
|
+
};
|
|
3029
|
+
content: {
|
|
3030
|
+
"application/json": components["schemas"]["CurrencyList"];
|
|
3031
|
+
};
|
|
3032
|
+
};
|
|
3033
|
+
default: components["responses"]["Error"];
|
|
3034
|
+
};
|
|
3035
|
+
};
|
|
3036
|
+
"list-billing-accounts": {
|
|
3037
|
+
parameters: {
|
|
3038
|
+
query?: {
|
|
3039
|
+
/** @description 1-based page number; the first page when omitted. */
|
|
3040
|
+
page?: components["parameters"]["Page"];
|
|
3041
|
+
/** @description How many per page, 100 at most. */
|
|
3042
|
+
page_size?: components["parameters"]["PageSize"];
|
|
3043
|
+
};
|
|
3044
|
+
header?: never;
|
|
3045
|
+
path?: never;
|
|
3046
|
+
cookie?: never;
|
|
3047
|
+
};
|
|
3048
|
+
requestBody?: never;
|
|
3049
|
+
responses: {
|
|
3050
|
+
/** @description OK */
|
|
3051
|
+
200: {
|
|
3052
|
+
headers: {
|
|
3053
|
+
[name: string]: unknown;
|
|
3054
|
+
};
|
|
3055
|
+
content: {
|
|
3056
|
+
"application/json": components["schemas"]["BillingAccountList"];
|
|
3057
|
+
};
|
|
3058
|
+
};
|
|
3059
|
+
default: components["responses"]["Error"];
|
|
3060
|
+
};
|
|
3061
|
+
};
|
|
3062
|
+
"create-billing-account": {
|
|
3063
|
+
parameters: {
|
|
3064
|
+
query?: never;
|
|
3065
|
+
header?: never;
|
|
3066
|
+
path?: never;
|
|
3067
|
+
cookie?: never;
|
|
3068
|
+
};
|
|
3069
|
+
requestBody: {
|
|
3070
|
+
content: {
|
|
3071
|
+
"application/json": components["schemas"]["BillingAccountCreate"];
|
|
3072
|
+
};
|
|
3073
|
+
};
|
|
3074
|
+
responses: {
|
|
3075
|
+
/** @description Created */
|
|
3076
|
+
201: {
|
|
3077
|
+
headers: {
|
|
3078
|
+
[name: string]: unknown;
|
|
3079
|
+
};
|
|
3080
|
+
content: {
|
|
3081
|
+
"application/json": components["schemas"]["BillingAccount"];
|
|
3082
|
+
};
|
|
3083
|
+
};
|
|
3084
|
+
default: components["responses"]["Error"];
|
|
3085
|
+
};
|
|
3086
|
+
};
|
|
3087
|
+
"get-billing-account": {
|
|
3088
|
+
parameters: {
|
|
3089
|
+
query?: never;
|
|
3090
|
+
header?: never;
|
|
3091
|
+
path: {
|
|
3092
|
+
accountId: components["parameters"]["AccountId"];
|
|
3093
|
+
};
|
|
3094
|
+
cookie?: never;
|
|
3095
|
+
};
|
|
3096
|
+
requestBody?: never;
|
|
3097
|
+
responses: {
|
|
3098
|
+
/** @description OK */
|
|
3099
|
+
200: {
|
|
3100
|
+
headers: {
|
|
3101
|
+
[name: string]: unknown;
|
|
3102
|
+
};
|
|
3103
|
+
content: {
|
|
3104
|
+
"application/json": components["schemas"]["BillingAccount"];
|
|
3105
|
+
};
|
|
3106
|
+
};
|
|
3107
|
+
default: components["responses"]["Error"];
|
|
3108
|
+
};
|
|
3109
|
+
};
|
|
3110
|
+
"update-billing-account": {
|
|
3111
|
+
parameters: {
|
|
3112
|
+
query?: never;
|
|
3113
|
+
header?: never;
|
|
3114
|
+
path: {
|
|
3115
|
+
accountId: components["parameters"]["AccountId"];
|
|
3116
|
+
};
|
|
3117
|
+
cookie?: never;
|
|
3118
|
+
};
|
|
3119
|
+
requestBody: {
|
|
3120
|
+
content: {
|
|
3121
|
+
"application/json": components["schemas"]["BillingAccountUpdate"];
|
|
3122
|
+
};
|
|
3123
|
+
};
|
|
3124
|
+
responses: {
|
|
3125
|
+
/** @description OK */
|
|
3126
|
+
200: {
|
|
3127
|
+
headers: {
|
|
3128
|
+
[name: string]: unknown;
|
|
3129
|
+
};
|
|
3130
|
+
content: {
|
|
3131
|
+
"application/json": components["schemas"]["BillingAccount"];
|
|
3132
|
+
};
|
|
3133
|
+
};
|
|
3134
|
+
default: components["responses"]["Error"];
|
|
3135
|
+
};
|
|
3136
|
+
};
|
|
3137
|
+
"get-account-balance": {
|
|
3138
|
+
parameters: {
|
|
3139
|
+
query?: never;
|
|
3140
|
+
header?: never;
|
|
3141
|
+
path: {
|
|
3142
|
+
accountId: components["parameters"]["AccountId"];
|
|
3143
|
+
};
|
|
3144
|
+
cookie?: never;
|
|
3145
|
+
};
|
|
3146
|
+
requestBody?: never;
|
|
3147
|
+
responses: {
|
|
3148
|
+
/** @description OK */
|
|
3149
|
+
200: {
|
|
3150
|
+
headers: {
|
|
3151
|
+
[name: string]: unknown;
|
|
3152
|
+
};
|
|
3153
|
+
content: {
|
|
3154
|
+
"application/json": components["schemas"]["AccountBalance"];
|
|
3155
|
+
};
|
|
3156
|
+
};
|
|
3157
|
+
default: components["responses"]["Error"];
|
|
3158
|
+
};
|
|
3159
|
+
};
|
|
3160
|
+
"get-account-metered-usage": {
|
|
3161
|
+
parameters: {
|
|
3162
|
+
query?: never;
|
|
3163
|
+
header?: never;
|
|
3164
|
+
path: {
|
|
3165
|
+
accountId: components["parameters"]["AccountId"];
|
|
3166
|
+
};
|
|
3167
|
+
cookie?: never;
|
|
3168
|
+
};
|
|
3169
|
+
requestBody?: never;
|
|
3170
|
+
responses: {
|
|
3171
|
+
/** @description OK */
|
|
3172
|
+
200: {
|
|
3173
|
+
headers: {
|
|
3174
|
+
[name: string]: unknown;
|
|
3175
|
+
};
|
|
3176
|
+
content: {
|
|
3177
|
+
"application/json": components["schemas"]["MeteredUsage"];
|
|
3178
|
+
};
|
|
3179
|
+
};
|
|
3180
|
+
default: components["responses"]["Error"];
|
|
3181
|
+
};
|
|
3182
|
+
};
|
|
3183
|
+
"list-payment-options": {
|
|
3184
|
+
parameters: {
|
|
3185
|
+
query?: {
|
|
3186
|
+
/** @description 1-based page number; the first page when omitted. */
|
|
3187
|
+
page?: components["parameters"]["Page"];
|
|
3188
|
+
/** @description How many per page, 100 at most. */
|
|
3189
|
+
page_size?: components["parameters"]["PageSize"];
|
|
3190
|
+
};
|
|
3191
|
+
header?: never;
|
|
3192
|
+
path: {
|
|
3193
|
+
accountId: components["parameters"]["AccountId"];
|
|
3194
|
+
};
|
|
3195
|
+
cookie?: never;
|
|
3196
|
+
};
|
|
3197
|
+
requestBody?: never;
|
|
3198
|
+
responses: {
|
|
3199
|
+
/** @description OK */
|
|
3200
|
+
200: {
|
|
3201
|
+
headers: {
|
|
3202
|
+
[name: string]: unknown;
|
|
3203
|
+
};
|
|
3204
|
+
content: {
|
|
3205
|
+
"application/json": components["schemas"]["PaymentOptionList"];
|
|
3206
|
+
};
|
|
3207
|
+
};
|
|
3208
|
+
default: components["responses"]["Error"];
|
|
3209
|
+
};
|
|
3210
|
+
};
|
|
3211
|
+
"list-billing-account-projects": {
|
|
3212
|
+
parameters: {
|
|
3213
|
+
query?: {
|
|
3214
|
+
/** @description 1-based page number; the first page when omitted. */
|
|
3215
|
+
page?: components["parameters"]["Page"];
|
|
3216
|
+
/** @description How many per page, 100 at most. */
|
|
3217
|
+
page_size?: components["parameters"]["PageSize"];
|
|
3218
|
+
billing_account_id?: number;
|
|
3219
|
+
};
|
|
3220
|
+
header?: never;
|
|
3221
|
+
path?: never;
|
|
3222
|
+
cookie?: never;
|
|
3223
|
+
};
|
|
3224
|
+
requestBody?: never;
|
|
3225
|
+
responses: {
|
|
3226
|
+
/** @description OK */
|
|
3227
|
+
200: {
|
|
3228
|
+
headers: {
|
|
3229
|
+
[name: string]: unknown;
|
|
3230
|
+
};
|
|
3231
|
+
content: {
|
|
3232
|
+
"application/json": components["schemas"]["ProjectBillingInfoList"];
|
|
3233
|
+
};
|
|
3234
|
+
};
|
|
3235
|
+
default: components["responses"]["Error"];
|
|
3236
|
+
};
|
|
3237
|
+
};
|
|
3238
|
+
"get-project-billing-account": {
|
|
3239
|
+
parameters: {
|
|
3240
|
+
query?: never;
|
|
3241
|
+
header?: never;
|
|
3242
|
+
path: {
|
|
3243
|
+
projectId: components["parameters"]["ProjectId"];
|
|
3244
|
+
};
|
|
3245
|
+
cookie?: never;
|
|
3246
|
+
};
|
|
3247
|
+
requestBody?: never;
|
|
3248
|
+
responses: {
|
|
3249
|
+
/** @description OK */
|
|
3250
|
+
200: {
|
|
3251
|
+
headers: {
|
|
3252
|
+
[name: string]: unknown;
|
|
3253
|
+
};
|
|
3254
|
+
content: {
|
|
3255
|
+
"application/json": components["schemas"]["ProjectBillingInfo"];
|
|
3256
|
+
};
|
|
3257
|
+
};
|
|
3258
|
+
default: components["responses"]["Error"];
|
|
3259
|
+
};
|
|
3260
|
+
};
|
|
3261
|
+
"set-project-billing-account": {
|
|
3262
|
+
parameters: {
|
|
3263
|
+
query?: never;
|
|
3264
|
+
header?: never;
|
|
3265
|
+
path: {
|
|
3266
|
+
projectId: components["parameters"]["ProjectId"];
|
|
3267
|
+
};
|
|
3268
|
+
cookie?: never;
|
|
3269
|
+
};
|
|
3270
|
+
requestBody: {
|
|
3271
|
+
content: {
|
|
3272
|
+
"application/json": components["schemas"]["ProjectBillingInfoSet"];
|
|
3273
|
+
};
|
|
3274
|
+
};
|
|
3275
|
+
responses: {
|
|
3276
|
+
/** @description OK */
|
|
3277
|
+
200: {
|
|
3278
|
+
headers: {
|
|
3279
|
+
[name: string]: unknown;
|
|
3280
|
+
};
|
|
3281
|
+
content: {
|
|
3282
|
+
"application/json": components["schemas"]["ProjectBillingInfo"];
|
|
3283
|
+
};
|
|
3284
|
+
};
|
|
3285
|
+
default: components["responses"]["Error"];
|
|
3286
|
+
};
|
|
3287
|
+
};
|
|
3288
|
+
"unlink-project-billing-account": {
|
|
3289
|
+
parameters: {
|
|
3290
|
+
query?: never;
|
|
3291
|
+
header?: never;
|
|
3292
|
+
path: {
|
|
3293
|
+
projectId: components["parameters"]["ProjectId"];
|
|
3294
|
+
};
|
|
3295
|
+
cookie?: never;
|
|
3296
|
+
};
|
|
3297
|
+
requestBody?: never;
|
|
3298
|
+
responses: {
|
|
3299
|
+
/** @description Unlinked */
|
|
3300
|
+
204: {
|
|
3301
|
+
headers: {
|
|
3302
|
+
[name: string]: unknown;
|
|
3303
|
+
};
|
|
3304
|
+
content?: never;
|
|
3305
|
+
};
|
|
3306
|
+
default: components["responses"]["Error"];
|
|
3307
|
+
};
|
|
3308
|
+
};
|
|
3309
|
+
"list-top-ups": {
|
|
3310
|
+
parameters: {
|
|
3311
|
+
query?: {
|
|
3312
|
+
/** @description 1-based page number; the first page when omitted. */
|
|
3313
|
+
page?: components["parameters"]["Page"];
|
|
3314
|
+
/** @description How many per page, 100 at most. */
|
|
3315
|
+
page_size?: components["parameters"]["PageSize"];
|
|
3316
|
+
/** @description Restrict to one of your accounts. All of them when omitted. */
|
|
3317
|
+
billing_account_id?: components["parameters"]["AccountIdQuery"];
|
|
3318
|
+
};
|
|
3319
|
+
header?: never;
|
|
3320
|
+
path?: never;
|
|
3321
|
+
cookie?: never;
|
|
3322
|
+
};
|
|
3323
|
+
requestBody?: never;
|
|
3324
|
+
responses: {
|
|
3325
|
+
/** @description OK */
|
|
3326
|
+
200: {
|
|
3327
|
+
headers: {
|
|
3328
|
+
[name: string]: unknown;
|
|
3329
|
+
};
|
|
3330
|
+
content: {
|
|
3331
|
+
"application/json": components["schemas"]["TopUpList"];
|
|
3332
|
+
};
|
|
3333
|
+
};
|
|
3334
|
+
default: components["responses"]["Error"];
|
|
3335
|
+
};
|
|
3336
|
+
};
|
|
3337
|
+
"create-top-up": {
|
|
3338
|
+
parameters: {
|
|
3339
|
+
query?: never;
|
|
3340
|
+
header?: never;
|
|
3341
|
+
path?: never;
|
|
3342
|
+
cookie?: never;
|
|
3343
|
+
};
|
|
3344
|
+
requestBody: {
|
|
3345
|
+
content: {
|
|
3346
|
+
"application/json": components["schemas"]["TopUpCreate"];
|
|
3347
|
+
};
|
|
3348
|
+
};
|
|
3349
|
+
responses: {
|
|
3350
|
+
/** @description Created */
|
|
3351
|
+
201: {
|
|
3352
|
+
headers: {
|
|
3353
|
+
[name: string]: unknown;
|
|
3354
|
+
};
|
|
3355
|
+
content: {
|
|
3356
|
+
"application/json": components["schemas"]["TopUp"];
|
|
3357
|
+
};
|
|
3358
|
+
};
|
|
3359
|
+
default: components["responses"]["Error"];
|
|
3360
|
+
};
|
|
3361
|
+
};
|
|
3362
|
+
"get-top-up": {
|
|
3363
|
+
parameters: {
|
|
3364
|
+
query?: never;
|
|
3365
|
+
header?: never;
|
|
3366
|
+
path: {
|
|
3367
|
+
topUpId: string;
|
|
3368
|
+
};
|
|
3369
|
+
cookie?: never;
|
|
3370
|
+
};
|
|
3371
|
+
requestBody?: never;
|
|
3372
|
+
responses: {
|
|
3373
|
+
/** @description OK */
|
|
3374
|
+
200: {
|
|
3375
|
+
headers: {
|
|
3376
|
+
[name: string]: unknown;
|
|
3377
|
+
};
|
|
3378
|
+
content: {
|
|
3379
|
+
"application/json": components["schemas"]["TopUp"];
|
|
3380
|
+
};
|
|
3381
|
+
};
|
|
3382
|
+
default: components["responses"]["Error"];
|
|
3383
|
+
};
|
|
3384
|
+
};
|
|
3385
|
+
"cancel-top-up": {
|
|
3386
|
+
parameters: {
|
|
3387
|
+
query?: never;
|
|
3388
|
+
header?: never;
|
|
3389
|
+
path: {
|
|
3390
|
+
topUpId: string;
|
|
3391
|
+
};
|
|
3392
|
+
cookie?: never;
|
|
3393
|
+
};
|
|
3394
|
+
requestBody?: never;
|
|
3395
|
+
responses: {
|
|
3396
|
+
/** @description The top-up after the request, canceled or succeeded. */
|
|
3397
|
+
200: {
|
|
3398
|
+
headers: {
|
|
3399
|
+
[name: string]: unknown;
|
|
3400
|
+
};
|
|
3401
|
+
content: {
|
|
3402
|
+
"application/json": components["schemas"]["TopUp"];
|
|
3403
|
+
};
|
|
3404
|
+
};
|
|
3405
|
+
/** @description The top-up already has another outcome or can no longer be withdrawn. */
|
|
3406
|
+
409: {
|
|
3407
|
+
headers: {
|
|
3408
|
+
[name: string]: unknown;
|
|
3409
|
+
};
|
|
3410
|
+
content: {
|
|
3411
|
+
"application/json": components["schemas"]["Error"];
|
|
3412
|
+
};
|
|
3413
|
+
};
|
|
3414
|
+
default: components["responses"]["Error"];
|
|
3415
|
+
};
|
|
3416
|
+
};
|
|
3417
|
+
"list-payment-methods": {
|
|
3418
|
+
parameters: {
|
|
3419
|
+
query?: {
|
|
3420
|
+
/** @description 1-based page number; the first page when omitted. */
|
|
3421
|
+
page?: components["parameters"]["Page"];
|
|
3422
|
+
/** @description How many per page, 100 at most. */
|
|
3423
|
+
page_size?: components["parameters"]["PageSize"];
|
|
3424
|
+
/** @description Restrict to one of your accounts. All of them when omitted. */
|
|
3425
|
+
billing_account_id?: components["parameters"]["AccountIdQuery"];
|
|
3426
|
+
};
|
|
3427
|
+
header?: never;
|
|
3428
|
+
path?: never;
|
|
3429
|
+
cookie?: never;
|
|
3430
|
+
};
|
|
3431
|
+
requestBody?: never;
|
|
3432
|
+
responses: {
|
|
3433
|
+
/** @description OK */
|
|
3434
|
+
200: {
|
|
3435
|
+
headers: {
|
|
3436
|
+
[name: string]: unknown;
|
|
3437
|
+
};
|
|
3438
|
+
content: {
|
|
3439
|
+
"application/json": components["schemas"]["PaymentMethodList"];
|
|
3440
|
+
};
|
|
3441
|
+
};
|
|
3442
|
+
default: components["responses"]["Error"];
|
|
3443
|
+
};
|
|
3444
|
+
};
|
|
3445
|
+
"create-payment-method-setup": {
|
|
3446
|
+
parameters: {
|
|
3447
|
+
query?: never;
|
|
3448
|
+
header?: never;
|
|
3449
|
+
path?: never;
|
|
3450
|
+
cookie?: never;
|
|
3451
|
+
};
|
|
3452
|
+
requestBody: {
|
|
3453
|
+
content: {
|
|
3454
|
+
"application/json": components["schemas"]["PaymentMethodSetup"];
|
|
3455
|
+
};
|
|
3456
|
+
};
|
|
3457
|
+
responses: {
|
|
3458
|
+
/** @description Created */
|
|
3459
|
+
201: {
|
|
3460
|
+
headers: {
|
|
3461
|
+
[name: string]: unknown;
|
|
3462
|
+
};
|
|
3463
|
+
content: {
|
|
3464
|
+
"application/json": components["schemas"]["PaymentMethodSetupResult"];
|
|
3465
|
+
};
|
|
3466
|
+
};
|
|
3467
|
+
default: components["responses"]["Error"];
|
|
3468
|
+
};
|
|
3469
|
+
};
|
|
3470
|
+
"set-default-payment-method": {
|
|
3471
|
+
parameters: {
|
|
3472
|
+
query?: never;
|
|
3473
|
+
header?: never;
|
|
3474
|
+
path: {
|
|
3475
|
+
paymentMethodId: components["parameters"]["PaymentMethodId"];
|
|
3476
|
+
};
|
|
3477
|
+
cookie?: never;
|
|
3478
|
+
};
|
|
3479
|
+
requestBody?: never;
|
|
3480
|
+
responses: {
|
|
3481
|
+
/** @description OK */
|
|
3482
|
+
200: {
|
|
3483
|
+
headers: {
|
|
3484
|
+
[name: string]: unknown;
|
|
3485
|
+
};
|
|
3486
|
+
content: {
|
|
3487
|
+
"application/json": components["schemas"]["PaymentMethod"];
|
|
3488
|
+
};
|
|
3489
|
+
};
|
|
3490
|
+
default: components["responses"]["Error"];
|
|
3491
|
+
};
|
|
3492
|
+
};
|
|
3493
|
+
"delete-payment-method": {
|
|
3494
|
+
parameters: {
|
|
3495
|
+
query?: never;
|
|
3496
|
+
header?: never;
|
|
3497
|
+
path: {
|
|
3498
|
+
paymentMethodId: components["parameters"]["PaymentMethodId"];
|
|
3499
|
+
};
|
|
3500
|
+
cookie?: never;
|
|
3501
|
+
};
|
|
3502
|
+
requestBody?: never;
|
|
3503
|
+
responses: {
|
|
3504
|
+
/** @description Removed */
|
|
3505
|
+
204: {
|
|
3506
|
+
headers: {
|
|
3507
|
+
[name: string]: unknown;
|
|
3508
|
+
};
|
|
3509
|
+
content?: never;
|
|
3510
|
+
};
|
|
3511
|
+
default: components["responses"]["Error"];
|
|
3512
|
+
};
|
|
3513
|
+
};
|
|
3514
|
+
"pay-invoice": {
|
|
3515
|
+
parameters: {
|
|
3516
|
+
query?: never;
|
|
3517
|
+
header?: never;
|
|
3518
|
+
path: {
|
|
3519
|
+
invoiceId: components["parameters"]["InvoiceId"];
|
|
3520
|
+
};
|
|
3521
|
+
cookie?: never;
|
|
3522
|
+
};
|
|
3523
|
+
requestBody?: {
|
|
3524
|
+
content: {
|
|
3525
|
+
"application/json": components["schemas"]["PayRequest"];
|
|
3526
|
+
};
|
|
3527
|
+
};
|
|
3528
|
+
responses: {
|
|
3529
|
+
/** @description OK */
|
|
3530
|
+
200: {
|
|
3531
|
+
headers: {
|
|
3532
|
+
[name: string]: unknown;
|
|
3533
|
+
};
|
|
3534
|
+
content: {
|
|
3535
|
+
"application/json": components["schemas"]["PaymentResult"];
|
|
3536
|
+
};
|
|
3537
|
+
};
|
|
3538
|
+
default: components["responses"]["Error"];
|
|
3539
|
+
};
|
|
3540
|
+
};
|
|
3541
|
+
"preview-invoice-payment": {
|
|
3542
|
+
parameters: {
|
|
3543
|
+
query?: {
|
|
3544
|
+
/** @description As in paying. True when omitted. */
|
|
3545
|
+
use_balance?: boolean;
|
|
3546
|
+
/** @description As in paying. True when omitted. */
|
|
3547
|
+
use_credits?: boolean;
|
|
3548
|
+
};
|
|
3549
|
+
header?: never;
|
|
3550
|
+
path: {
|
|
3551
|
+
invoiceId: components["parameters"]["InvoiceId"];
|
|
3552
|
+
};
|
|
3553
|
+
cookie?: never;
|
|
3554
|
+
};
|
|
3555
|
+
requestBody?: never;
|
|
3556
|
+
responses: {
|
|
3557
|
+
/** @description OK */
|
|
3558
|
+
200: {
|
|
3559
|
+
headers: {
|
|
3560
|
+
[name: string]: unknown;
|
|
3561
|
+
};
|
|
3562
|
+
content: {
|
|
3563
|
+
"application/json": components["schemas"]["PaymentPreview"];
|
|
3564
|
+
};
|
|
3565
|
+
};
|
|
3566
|
+
default: components["responses"]["Error"];
|
|
3567
|
+
};
|
|
3568
|
+
};
|
|
3569
|
+
"pay-together": {
|
|
3570
|
+
parameters: {
|
|
3571
|
+
query?: never;
|
|
3572
|
+
header?: never;
|
|
3573
|
+
path?: never;
|
|
3574
|
+
cookie?: never;
|
|
3575
|
+
};
|
|
3576
|
+
requestBody: {
|
|
3577
|
+
content: {
|
|
3578
|
+
"application/json": components["schemas"]["PayTogetherRequest"];
|
|
3579
|
+
};
|
|
3580
|
+
};
|
|
3581
|
+
responses: {
|
|
3582
|
+
/** @description OK */
|
|
3583
|
+
200: {
|
|
3584
|
+
headers: {
|
|
3585
|
+
[name: string]: unknown;
|
|
3586
|
+
};
|
|
3587
|
+
content: {
|
|
3588
|
+
"application/json": components["schemas"]["PaymentResult"];
|
|
3589
|
+
};
|
|
3590
|
+
};
|
|
3591
|
+
default: components["responses"]["Error"];
|
|
3592
|
+
};
|
|
3593
|
+
};
|
|
3594
|
+
"preview-pay-together": {
|
|
3595
|
+
parameters: {
|
|
3596
|
+
query?: never;
|
|
3597
|
+
header?: never;
|
|
3598
|
+
path?: never;
|
|
3599
|
+
cookie?: never;
|
|
3600
|
+
};
|
|
3601
|
+
requestBody: {
|
|
3602
|
+
content: {
|
|
3603
|
+
"application/json": components["schemas"]["PayTogetherRequest"];
|
|
3604
|
+
};
|
|
3605
|
+
};
|
|
3606
|
+
responses: {
|
|
3607
|
+
/** @description OK */
|
|
3608
|
+
200: {
|
|
3609
|
+
headers: {
|
|
3610
|
+
[name: string]: unknown;
|
|
3611
|
+
};
|
|
3612
|
+
content: {
|
|
3613
|
+
"application/json": components["schemas"]["PaymentPreview"];
|
|
3614
|
+
};
|
|
3615
|
+
};
|
|
3616
|
+
default: components["responses"]["Error"];
|
|
3617
|
+
};
|
|
3618
|
+
};
|
|
3619
|
+
"list-invoices": {
|
|
3620
|
+
parameters: {
|
|
3621
|
+
query?: {
|
|
3622
|
+
/** @description 1-based page number; the first page when omitted. */
|
|
3623
|
+
page?: components["parameters"]["Page"];
|
|
3624
|
+
/** @description How many per page, 100 at most. */
|
|
3625
|
+
page_size?: components["parameters"]["PageSize"];
|
|
3626
|
+
/** @description Restrict to one of your accounts. All of them when omitted. */
|
|
3627
|
+
billing_account_id?: components["parameters"]["AccountIdQuery"];
|
|
3628
|
+
status?: components["schemas"]["InvoiceStatus"];
|
|
3629
|
+
from?: components["parameters"]["From"];
|
|
3630
|
+
/** @description Exclusive. */
|
|
3631
|
+
to?: components["parameters"]["To"];
|
|
3632
|
+
};
|
|
3633
|
+
header?: never;
|
|
3634
|
+
path?: never;
|
|
3635
|
+
cookie?: never;
|
|
3636
|
+
};
|
|
3637
|
+
requestBody?: never;
|
|
3638
|
+
responses: {
|
|
3639
|
+
/** @description OK */
|
|
3640
|
+
200: {
|
|
3641
|
+
headers: {
|
|
3642
|
+
[name: string]: unknown;
|
|
3643
|
+
};
|
|
3644
|
+
content: {
|
|
3645
|
+
"application/json": components["schemas"]["InvoiceList"];
|
|
3646
|
+
};
|
|
3647
|
+
};
|
|
3648
|
+
default: components["responses"]["Error"];
|
|
3649
|
+
};
|
|
3650
|
+
};
|
|
3651
|
+
"get-invoice": {
|
|
3652
|
+
parameters: {
|
|
3653
|
+
query?: never;
|
|
3654
|
+
header?: never;
|
|
3655
|
+
path: {
|
|
3656
|
+
invoiceId: components["parameters"]["InvoiceId"];
|
|
3657
|
+
};
|
|
3658
|
+
cookie?: never;
|
|
3659
|
+
};
|
|
3660
|
+
requestBody?: never;
|
|
3661
|
+
responses: {
|
|
3662
|
+
/** @description OK */
|
|
3663
|
+
200: {
|
|
3664
|
+
headers: {
|
|
3665
|
+
[name: string]: unknown;
|
|
3666
|
+
};
|
|
3667
|
+
content: {
|
|
3668
|
+
"application/json": components["schemas"]["Invoice"];
|
|
3669
|
+
};
|
|
3670
|
+
};
|
|
3671
|
+
default: components["responses"]["Error"];
|
|
3672
|
+
};
|
|
3673
|
+
};
|
|
3674
|
+
"list-invoice-items": {
|
|
3675
|
+
parameters: {
|
|
3676
|
+
query?: {
|
|
3677
|
+
/** @description 1-based page number; the first page when omitted. */
|
|
3678
|
+
page?: components["parameters"]["Page"];
|
|
3679
|
+
/** @description How many per page, 100 at most. */
|
|
3680
|
+
page_size?: components["parameters"]["PageSize"];
|
|
3681
|
+
};
|
|
3682
|
+
header?: never;
|
|
3683
|
+
path: {
|
|
3684
|
+
invoiceId: components["parameters"]["InvoiceId"];
|
|
3685
|
+
};
|
|
3686
|
+
cookie?: never;
|
|
3687
|
+
};
|
|
3688
|
+
requestBody?: never;
|
|
3689
|
+
responses: {
|
|
3690
|
+
/** @description OK */
|
|
3691
|
+
200: {
|
|
3692
|
+
headers: {
|
|
3693
|
+
[name: string]: unknown;
|
|
3694
|
+
};
|
|
3695
|
+
content: {
|
|
3696
|
+
"application/json": components["schemas"]["InvoiceItemList"];
|
|
3697
|
+
};
|
|
3698
|
+
};
|
|
3699
|
+
default: components["responses"]["Error"];
|
|
3700
|
+
};
|
|
3701
|
+
};
|
|
3702
|
+
"list-transactions": {
|
|
3703
|
+
parameters: {
|
|
3704
|
+
query?: {
|
|
3705
|
+
/** @description 1-based page number; the first page when omitted. */
|
|
3706
|
+
page?: components["parameters"]["Page"];
|
|
3707
|
+
/** @description How many per page, 100 at most. */
|
|
3708
|
+
page_size?: components["parameters"]["PageSize"];
|
|
3709
|
+
/** @description Restrict to one of your accounts. All of them when omitted. */
|
|
3710
|
+
billing_account_id?: components["parameters"]["AccountIdQuery"];
|
|
3711
|
+
from?: components["parameters"]["From"];
|
|
3712
|
+
/** @description Exclusive. */
|
|
3713
|
+
to?: components["parameters"]["To"];
|
|
3714
|
+
};
|
|
3715
|
+
header?: never;
|
|
3716
|
+
path?: never;
|
|
3717
|
+
cookie?: never;
|
|
3718
|
+
};
|
|
3719
|
+
requestBody?: never;
|
|
3720
|
+
responses: {
|
|
3721
|
+
/** @description OK */
|
|
3722
|
+
200: {
|
|
3723
|
+
headers: {
|
|
3724
|
+
[name: string]: unknown;
|
|
3725
|
+
};
|
|
3726
|
+
content: {
|
|
3727
|
+
"application/json": components["schemas"]["TransactionList"];
|
|
3728
|
+
};
|
|
3729
|
+
};
|
|
3730
|
+
default: components["responses"]["Error"];
|
|
3731
|
+
};
|
|
3732
|
+
};
|
|
3733
|
+
"list-account-discounts": {
|
|
3734
|
+
parameters: {
|
|
3735
|
+
query?: {
|
|
3736
|
+
/** @description 1-based page number; the first page when omitted. */
|
|
3737
|
+
page?: components["parameters"]["Page"];
|
|
3738
|
+
/** @description How many per page, 100 at most. */
|
|
3739
|
+
page_size?: components["parameters"]["PageSize"];
|
|
3740
|
+
/** @description Restrict to one of your accounts. All of them when omitted. */
|
|
3741
|
+
billing_account_id?: components["parameters"]["AccountIdQuery"];
|
|
3742
|
+
};
|
|
3743
|
+
header?: never;
|
|
3744
|
+
path?: never;
|
|
3745
|
+
cookie?: never;
|
|
3746
|
+
};
|
|
3747
|
+
requestBody?: never;
|
|
3748
|
+
responses: {
|
|
3749
|
+
/** @description OK */
|
|
3750
|
+
200: {
|
|
3751
|
+
headers: {
|
|
3752
|
+
[name: string]: unknown;
|
|
3753
|
+
};
|
|
3754
|
+
content: {
|
|
3755
|
+
"application/json": components["schemas"]["DiscountList"];
|
|
3756
|
+
};
|
|
3757
|
+
};
|
|
3758
|
+
default: components["responses"]["Error"];
|
|
3759
|
+
};
|
|
3760
|
+
};
|
|
3761
|
+
"list-credit-grants": {
|
|
3762
|
+
parameters: {
|
|
3763
|
+
query?: {
|
|
3764
|
+
/** @description 1-based page number; the first page when omitted. */
|
|
3765
|
+
page?: components["parameters"]["Page"];
|
|
3766
|
+
/** @description How many per page, 100 at most. */
|
|
3767
|
+
page_size?: components["parameters"]["PageSize"];
|
|
3768
|
+
/** @description Restrict to one of your accounts. All of them when omitted. */
|
|
3769
|
+
billing_account_id?: components["parameters"]["AccountIdQuery"];
|
|
3770
|
+
status?: "active" | "depleted" | "expired" | "voided";
|
|
3771
|
+
};
|
|
3772
|
+
header?: never;
|
|
3773
|
+
path?: never;
|
|
3774
|
+
cookie?: never;
|
|
3775
|
+
};
|
|
3776
|
+
requestBody?: never;
|
|
3777
|
+
responses: {
|
|
3778
|
+
/** @description OK */
|
|
3779
|
+
200: {
|
|
3780
|
+
headers: {
|
|
3781
|
+
[name: string]: unknown;
|
|
3782
|
+
};
|
|
3783
|
+
content: {
|
|
3784
|
+
"application/json": components["schemas"]["CreditGrantList"];
|
|
3785
|
+
};
|
|
3786
|
+
};
|
|
3787
|
+
default: components["responses"]["Error"];
|
|
3788
|
+
};
|
|
3789
|
+
};
|
|
3790
|
+
"list-refunds": {
|
|
3791
|
+
parameters: {
|
|
3792
|
+
query?: {
|
|
3793
|
+
/** @description 1-based page number; the first page when omitted. */
|
|
3794
|
+
page?: components["parameters"]["Page"];
|
|
3795
|
+
/** @description How many per page, 100 at most. */
|
|
3796
|
+
page_size?: components["parameters"]["PageSize"];
|
|
3797
|
+
/** @description Restrict to one of your accounts. All of them when omitted. */
|
|
3798
|
+
billing_account_id?: components["parameters"]["AccountIdQuery"];
|
|
3799
|
+
/** @description Only the refunds of this invoice. */
|
|
3800
|
+
invoice_id?: string;
|
|
3801
|
+
/**
|
|
3802
|
+
* @description Only the refunds that belong to this order: those of its invoice, such as the refund of a
|
|
3803
|
+
* purchase that could not be delivered, and those it caused on an earlier invoice, such as
|
|
3804
|
+
* the difference returned after a downgrade.
|
|
3805
|
+
*/
|
|
3806
|
+
order_id?: string;
|
|
3807
|
+
};
|
|
3808
|
+
header?: never;
|
|
3809
|
+
path?: never;
|
|
3810
|
+
cookie?: never;
|
|
3811
|
+
};
|
|
3812
|
+
requestBody?: never;
|
|
3813
|
+
responses: {
|
|
3814
|
+
/** @description OK */
|
|
3815
|
+
200: {
|
|
3816
|
+
headers: {
|
|
3817
|
+
[name: string]: unknown;
|
|
3818
|
+
};
|
|
3819
|
+
content: {
|
|
3820
|
+
"application/json": components["schemas"]["RefundList"];
|
|
3821
|
+
};
|
|
3822
|
+
};
|
|
3823
|
+
default: components["responses"]["Error"];
|
|
3824
|
+
};
|
|
3825
|
+
};
|
|
3826
|
+
"list-usage-charges": {
|
|
3827
|
+
parameters: {
|
|
3828
|
+
query?: {
|
|
3829
|
+
/** @description 1-based page number; the first page when omitted. */
|
|
3830
|
+
page?: components["parameters"]["Page"];
|
|
3831
|
+
/** @description How many per page, 100 at most. */
|
|
3832
|
+
page_size?: components["parameters"]["PageSize"];
|
|
3833
|
+
/** @description Restrict to one of your accounts. All of them when omitted. */
|
|
3834
|
+
billing_account_id?: components["parameters"]["AccountIdQuery"];
|
|
3835
|
+
project_id?: string;
|
|
3836
|
+
product_id?: components["schemas"]["ProductID"];
|
|
3837
|
+
resource_id?: string;
|
|
3838
|
+
/** @description Only the charges summed into this usage invoice line. */
|
|
3839
|
+
invoice_item_id?: string;
|
|
3840
|
+
from?: components["parameters"]["From"];
|
|
3841
|
+
/** @description Exclusive. */
|
|
3842
|
+
to?: components["parameters"]["To"];
|
|
3843
|
+
};
|
|
3844
|
+
header?: never;
|
|
3845
|
+
path?: never;
|
|
3846
|
+
cookie?: never;
|
|
3847
|
+
};
|
|
3848
|
+
requestBody?: never;
|
|
3849
|
+
responses: {
|
|
3850
|
+
/** @description OK */
|
|
3851
|
+
200: {
|
|
3852
|
+
headers: {
|
|
3853
|
+
[name: string]: unknown;
|
|
3854
|
+
};
|
|
3855
|
+
content: {
|
|
3856
|
+
"application/json": components["schemas"]["UsageChargeList"];
|
|
3857
|
+
};
|
|
3858
|
+
};
|
|
3859
|
+
default: components["responses"]["Error"];
|
|
3860
|
+
};
|
|
3861
|
+
};
|
|
3862
|
+
"list-subscriptions": {
|
|
3863
|
+
parameters: {
|
|
3864
|
+
query?: {
|
|
3865
|
+
expiring_before?: string;
|
|
3866
|
+
/** @description 1-based page number; the first page when omitted. */
|
|
3867
|
+
page?: components["parameters"]["Page"];
|
|
3868
|
+
/** @description How many per page, 100 at most. */
|
|
3869
|
+
page_size?: components["parameters"]["PageSize"];
|
|
3870
|
+
/** @description Restrict to one of your accounts. All of them when omitted. */
|
|
3871
|
+
billing_account_id?: components["parameters"]["AccountIdQuery"];
|
|
3872
|
+
project_id?: string;
|
|
3873
|
+
};
|
|
3874
|
+
header?: never;
|
|
3875
|
+
path?: never;
|
|
3876
|
+
cookie?: never;
|
|
3877
|
+
};
|
|
3878
|
+
requestBody?: never;
|
|
3879
|
+
responses: {
|
|
3880
|
+
/** @description OK */
|
|
3881
|
+
200: {
|
|
3882
|
+
headers: {
|
|
3883
|
+
[name: string]: unknown;
|
|
3884
|
+
};
|
|
3885
|
+
content: {
|
|
3886
|
+
"application/json": components["schemas"]["SubscriptionList"];
|
|
3887
|
+
};
|
|
3888
|
+
};
|
|
3889
|
+
default: components["responses"]["Error"];
|
|
3890
|
+
};
|
|
3891
|
+
};
|
|
3892
|
+
"get-subscription": {
|
|
3893
|
+
parameters: {
|
|
3894
|
+
query?: never;
|
|
3895
|
+
header?: never;
|
|
3896
|
+
path: {
|
|
3897
|
+
subscriptionId: components["parameters"]["SubscriptionId"];
|
|
3898
|
+
};
|
|
3899
|
+
cookie?: never;
|
|
3900
|
+
};
|
|
3901
|
+
requestBody?: never;
|
|
3902
|
+
responses: {
|
|
3903
|
+
/** @description Purchase and renewal agreement */
|
|
3904
|
+
200: {
|
|
3905
|
+
headers: {
|
|
3906
|
+
[name: string]: unknown;
|
|
3907
|
+
};
|
|
3908
|
+
content: {
|
|
3909
|
+
"application/json": components["schemas"]["Subscription"];
|
|
3910
|
+
};
|
|
3911
|
+
};
|
|
3912
|
+
default: components["responses"]["Error"];
|
|
3913
|
+
};
|
|
3914
|
+
};
|
|
3915
|
+
"create-quote": {
|
|
3916
|
+
parameters: {
|
|
3917
|
+
query?: never;
|
|
3918
|
+
header?: never;
|
|
3919
|
+
path?: never;
|
|
3920
|
+
cookie?: never;
|
|
3921
|
+
};
|
|
3922
|
+
requestBody: {
|
|
3923
|
+
content: {
|
|
3924
|
+
"application/json": components["schemas"]["QuoteRequest"];
|
|
3925
|
+
};
|
|
3926
|
+
};
|
|
3927
|
+
responses: {
|
|
3928
|
+
/** @description OK */
|
|
3929
|
+
200: {
|
|
3930
|
+
headers: {
|
|
3931
|
+
[name: string]: unknown;
|
|
3932
|
+
};
|
|
3933
|
+
content: {
|
|
3934
|
+
"application/json": components["schemas"]["Quote"];
|
|
3935
|
+
};
|
|
3936
|
+
};
|
|
3937
|
+
default: components["responses"]["Error"];
|
|
3938
|
+
};
|
|
3939
|
+
};
|
|
3940
|
+
"list-cancellations": {
|
|
3941
|
+
parameters: {
|
|
3942
|
+
query?: {
|
|
3943
|
+
/** @description 1-based page number; the first page when omitted. */
|
|
3944
|
+
page?: components["parameters"]["Page"];
|
|
3945
|
+
/** @description How many per page, 100 at most. */
|
|
3946
|
+
page_size?: components["parameters"]["PageSize"];
|
|
3947
|
+
/** @description Restrict to one of your accounts. All of them when omitted. */
|
|
3948
|
+
billing_account_id?: components["parameters"]["AccountIdQuery"];
|
|
3949
|
+
/** @description Only cancellations that include this subscription. */
|
|
3950
|
+
subscription_id?: string;
|
|
3951
|
+
/** @description Only cancellations in this status. `open` means requested, scheduled or releasing. */
|
|
3952
|
+
status?: "open" | "requested" | "scheduled" | "releasing" | "completed" | "canceled" | "failed";
|
|
3953
|
+
};
|
|
3954
|
+
header?: never;
|
|
3955
|
+
path?: never;
|
|
3956
|
+
cookie?: never;
|
|
3957
|
+
};
|
|
3958
|
+
requestBody?: never;
|
|
3959
|
+
responses: {
|
|
3960
|
+
/** @description OK */
|
|
3961
|
+
200: {
|
|
3962
|
+
headers: {
|
|
3963
|
+
[name: string]: unknown;
|
|
3964
|
+
};
|
|
3965
|
+
content: {
|
|
3966
|
+
"application/json": components["schemas"]["CancellationList"];
|
|
3967
|
+
};
|
|
3968
|
+
};
|
|
3969
|
+
default: components["responses"]["Error"];
|
|
3970
|
+
};
|
|
3971
|
+
};
|
|
3972
|
+
"create-cancellation": {
|
|
3973
|
+
parameters: {
|
|
3974
|
+
query?: never;
|
|
3975
|
+
header?: never;
|
|
3976
|
+
path?: never;
|
|
3977
|
+
cookie?: never;
|
|
3978
|
+
};
|
|
3979
|
+
requestBody: {
|
|
3980
|
+
content: {
|
|
3981
|
+
"application/json": components["schemas"]["CancellationCreate"];
|
|
3982
|
+
};
|
|
3983
|
+
};
|
|
3984
|
+
responses: {
|
|
3985
|
+
/** @description The same cancellation, already open */
|
|
3986
|
+
200: {
|
|
3987
|
+
headers: {
|
|
3988
|
+
[name: string]: unknown;
|
|
3989
|
+
};
|
|
3990
|
+
content: {
|
|
3991
|
+
"application/json": components["schemas"]["Cancellation"];
|
|
3992
|
+
};
|
|
3993
|
+
};
|
|
3994
|
+
/** @description Created */
|
|
3995
|
+
201: {
|
|
3996
|
+
headers: {
|
|
3997
|
+
[name: string]: unknown;
|
|
3998
|
+
};
|
|
3999
|
+
content: {
|
|
4000
|
+
"application/json": components["schemas"]["Cancellation"];
|
|
4001
|
+
};
|
|
4002
|
+
};
|
|
4003
|
+
default: components["responses"]["Error"];
|
|
4004
|
+
};
|
|
4005
|
+
};
|
|
4006
|
+
"get-cancellation": {
|
|
4007
|
+
parameters: {
|
|
4008
|
+
query?: never;
|
|
4009
|
+
header?: never;
|
|
4010
|
+
path: {
|
|
4011
|
+
cancellationId: components["parameters"]["CancellationId"];
|
|
4012
|
+
};
|
|
4013
|
+
cookie?: never;
|
|
4014
|
+
};
|
|
4015
|
+
requestBody?: never;
|
|
4016
|
+
responses: {
|
|
4017
|
+
/** @description OK */
|
|
4018
|
+
200: {
|
|
4019
|
+
headers: {
|
|
4020
|
+
[name: string]: unknown;
|
|
4021
|
+
};
|
|
4022
|
+
content: {
|
|
4023
|
+
"application/json": components["schemas"]["Cancellation"];
|
|
4024
|
+
};
|
|
4025
|
+
};
|
|
4026
|
+
default: components["responses"]["Error"];
|
|
4027
|
+
};
|
|
4028
|
+
};
|
|
4029
|
+
"withdraw-cancellation": {
|
|
4030
|
+
parameters: {
|
|
4031
|
+
query?: never;
|
|
4032
|
+
header?: never;
|
|
4033
|
+
path: {
|
|
4034
|
+
cancellationId: components["parameters"]["CancellationId"];
|
|
4035
|
+
};
|
|
4036
|
+
cookie?: never;
|
|
4037
|
+
};
|
|
4038
|
+
requestBody?: never;
|
|
4039
|
+
responses: {
|
|
4040
|
+
/** @description OK */
|
|
4041
|
+
200: {
|
|
4042
|
+
headers: {
|
|
4043
|
+
[name: string]: unknown;
|
|
4044
|
+
};
|
|
4045
|
+
content: {
|
|
4046
|
+
"application/json": components["schemas"]["Cancellation"];
|
|
4047
|
+
};
|
|
4048
|
+
};
|
|
4049
|
+
default: components["responses"]["Error"];
|
|
4050
|
+
};
|
|
4051
|
+
};
|
|
4052
|
+
"list-renewal-prices": {
|
|
4053
|
+
parameters: {
|
|
4054
|
+
query?: {
|
|
4055
|
+
/** @description 1-based page number; the first page when omitted. */
|
|
4056
|
+
page?: components["parameters"]["Page"];
|
|
4057
|
+
/** @description How many per page, 100 at most. */
|
|
4058
|
+
page_size?: components["parameters"]["PageSize"];
|
|
4059
|
+
};
|
|
4060
|
+
header?: never;
|
|
4061
|
+
path: {
|
|
4062
|
+
subscriptionId: string;
|
|
4063
|
+
};
|
|
4064
|
+
cookie?: never;
|
|
4065
|
+
};
|
|
4066
|
+
requestBody?: never;
|
|
4067
|
+
responses: {
|
|
4068
|
+
/** @description OK */
|
|
4069
|
+
200: {
|
|
4070
|
+
headers: {
|
|
4071
|
+
[name: string]: unknown;
|
|
4072
|
+
};
|
|
4073
|
+
content: {
|
|
4074
|
+
"application/json": components["schemas"]["RenewalPriceList"];
|
|
4075
|
+
};
|
|
4076
|
+
};
|
|
4077
|
+
default: components["responses"]["Error"];
|
|
4078
|
+
};
|
|
4079
|
+
};
|
|
4080
|
+
"renew-subscription": {
|
|
4081
|
+
parameters: {
|
|
4082
|
+
query?: never;
|
|
4083
|
+
header?: never;
|
|
4084
|
+
path: {
|
|
4085
|
+
subscriptionId: components["parameters"]["SubscriptionId"];
|
|
4086
|
+
};
|
|
4087
|
+
cookie?: never;
|
|
4088
|
+
};
|
|
4089
|
+
requestBody: {
|
|
4090
|
+
content: {
|
|
4091
|
+
"application/json": components["schemas"]["RenewRequest"];
|
|
4092
|
+
};
|
|
4093
|
+
};
|
|
4094
|
+
responses: {
|
|
4095
|
+
/** @description OK */
|
|
4096
|
+
200: {
|
|
4097
|
+
headers: {
|
|
4098
|
+
[name: string]: unknown;
|
|
4099
|
+
};
|
|
4100
|
+
content: {
|
|
4101
|
+
"application/json": components["schemas"]["PaymentResult"];
|
|
4102
|
+
};
|
|
4103
|
+
};
|
|
4104
|
+
/** @description The order already exists or the subscription has a conflicting renewal, change or cancellation. */
|
|
4105
|
+
409: {
|
|
4106
|
+
headers: {
|
|
4107
|
+
[name: string]: unknown;
|
|
4108
|
+
};
|
|
4109
|
+
content: {
|
|
4110
|
+
"application/json": components["schemas"]["Error"];
|
|
4111
|
+
};
|
|
4112
|
+
};
|
|
4113
|
+
default: components["responses"]["Error"];
|
|
4114
|
+
};
|
|
4115
|
+
};
|
|
4116
|
+
"create-renewal-order": {
|
|
4117
|
+
parameters: {
|
|
4118
|
+
query?: never;
|
|
4119
|
+
header?: never;
|
|
4120
|
+
path: {
|
|
4121
|
+
subscriptionId: components["parameters"]["SubscriptionId"];
|
|
4122
|
+
};
|
|
4123
|
+
cookie?: never;
|
|
4124
|
+
};
|
|
4125
|
+
requestBody: {
|
|
4126
|
+
content: {
|
|
4127
|
+
"application/json": components["schemas"]["RenewalOrderRequest"];
|
|
4128
|
+
};
|
|
4129
|
+
};
|
|
4130
|
+
responses: {
|
|
4131
|
+
/** @description OK */
|
|
4132
|
+
200: {
|
|
4133
|
+
headers: {
|
|
4134
|
+
[name: string]: unknown;
|
|
4135
|
+
};
|
|
4136
|
+
content: {
|
|
4137
|
+
"application/json": components["schemas"]["Order"];
|
|
4138
|
+
};
|
|
4139
|
+
};
|
|
4140
|
+
/** @description The order already exists or the subscription has a conflicting renewal, change or cancellation. */
|
|
4141
|
+
409: {
|
|
4142
|
+
headers: {
|
|
4143
|
+
[name: string]: unknown;
|
|
4144
|
+
};
|
|
4145
|
+
content: {
|
|
4146
|
+
"application/json": components["schemas"]["Error"];
|
|
4147
|
+
};
|
|
4148
|
+
};
|
|
4149
|
+
default: components["responses"]["Error"];
|
|
4150
|
+
};
|
|
4151
|
+
};
|
|
4152
|
+
"set-auto-renew": {
|
|
4153
|
+
parameters: {
|
|
4154
|
+
query?: never;
|
|
4155
|
+
header?: never;
|
|
4156
|
+
path: {
|
|
4157
|
+
subscriptionId: components["parameters"]["SubscriptionId"];
|
|
4158
|
+
};
|
|
4159
|
+
cookie?: never;
|
|
4160
|
+
};
|
|
4161
|
+
requestBody: {
|
|
4162
|
+
content: {
|
|
4163
|
+
"application/json": components["schemas"]["AutoRenewSet"];
|
|
4164
|
+
};
|
|
4165
|
+
};
|
|
4166
|
+
responses: {
|
|
4167
|
+
/** @description OK */
|
|
4168
|
+
200: {
|
|
4169
|
+
headers: {
|
|
4170
|
+
[name: string]: unknown;
|
|
4171
|
+
};
|
|
4172
|
+
content: {
|
|
4173
|
+
"application/json": components["schemas"]["Subscription"];
|
|
4174
|
+
};
|
|
4175
|
+
};
|
|
4176
|
+
default: components["responses"]["Error"];
|
|
4177
|
+
};
|
|
4178
|
+
};
|
|
4179
|
+
"preview-promotion-code": {
|
|
4180
|
+
parameters: {
|
|
4181
|
+
query?: never;
|
|
4182
|
+
header?: never;
|
|
4183
|
+
path?: never;
|
|
4184
|
+
cookie?: never;
|
|
4185
|
+
};
|
|
4186
|
+
requestBody: {
|
|
4187
|
+
content: {
|
|
4188
|
+
"application/json": components["schemas"]["PromotionCodePreviewRequest"];
|
|
4189
|
+
};
|
|
4190
|
+
};
|
|
4191
|
+
responses: {
|
|
4192
|
+
/** @description OK */
|
|
4193
|
+
200: {
|
|
4194
|
+
headers: {
|
|
4195
|
+
[name: string]: unknown;
|
|
4196
|
+
};
|
|
4197
|
+
content: {
|
|
4198
|
+
"application/json": components["schemas"]["PromotionCodePreview"];
|
|
4199
|
+
};
|
|
4200
|
+
};
|
|
4201
|
+
default: components["responses"]["Error"];
|
|
4202
|
+
};
|
|
4203
|
+
};
|
|
4204
|
+
"list-allowances": {
|
|
4205
|
+
parameters: {
|
|
4206
|
+
query?: {
|
|
4207
|
+
/** @description 1-based page number; the first page when omitted. */
|
|
4208
|
+
page?: components["parameters"]["Page"];
|
|
4209
|
+
/** @description How many per page, 100 at most. */
|
|
4210
|
+
page_size?: components["parameters"]["PageSize"];
|
|
4211
|
+
/** @description Restrict to one of your accounts. All of them when omitted. */
|
|
4212
|
+
billing_account_id?: components["parameters"]["AccountIdQuery"];
|
|
4213
|
+
/** @description Filter by the meter UUID. */
|
|
4214
|
+
meter_id?: string;
|
|
4215
|
+
status?: "active" | "depleted" | "expired" | "voided";
|
|
4216
|
+
product_id?: components["schemas"]["ProductID"];
|
|
4217
|
+
};
|
|
4218
|
+
header?: never;
|
|
4219
|
+
path?: never;
|
|
4220
|
+
cookie?: never;
|
|
4221
|
+
};
|
|
4222
|
+
requestBody?: never;
|
|
4223
|
+
responses: {
|
|
4224
|
+
/** @description OK */
|
|
4225
|
+
200: {
|
|
4226
|
+
headers: {
|
|
4227
|
+
[name: string]: unknown;
|
|
4228
|
+
};
|
|
4229
|
+
content: {
|
|
4230
|
+
"application/json": components["schemas"]["AllowanceList"];
|
|
4231
|
+
};
|
|
4232
|
+
};
|
|
4233
|
+
default: components["responses"]["Error"];
|
|
4234
|
+
};
|
|
4235
|
+
};
|
|
4236
|
+
"list-orders": {
|
|
4237
|
+
parameters: {
|
|
4238
|
+
query?: {
|
|
4239
|
+
/** @description 1-based page number; the first page when omitted. */
|
|
4240
|
+
page?: components["parameters"]["Page"];
|
|
4241
|
+
/** @description How many per page, 100 at most. */
|
|
4242
|
+
page_size?: components["parameters"]["PageSize"];
|
|
4243
|
+
/** @description Restrict to one of your accounts. All of them when omitted. */
|
|
4244
|
+
billing_account_id?: components["parameters"]["AccountIdQuery"];
|
|
4245
|
+
project_id?: string;
|
|
4246
|
+
status?: components["schemas"]["OrderStatus"];
|
|
4247
|
+
from?: components["parameters"]["From"];
|
|
4248
|
+
/** @description Exclusive. */
|
|
4249
|
+
to?: components["parameters"]["To"];
|
|
4250
|
+
};
|
|
4251
|
+
header?: never;
|
|
4252
|
+
path?: never;
|
|
4253
|
+
cookie?: never;
|
|
4254
|
+
};
|
|
4255
|
+
requestBody?: never;
|
|
4256
|
+
responses: {
|
|
4257
|
+
/** @description OK */
|
|
4258
|
+
200: {
|
|
4259
|
+
headers: {
|
|
4260
|
+
[name: string]: unknown;
|
|
4261
|
+
};
|
|
4262
|
+
content: {
|
|
4263
|
+
"application/json": components["schemas"]["OrderList"];
|
|
4264
|
+
};
|
|
4265
|
+
};
|
|
4266
|
+
default: components["responses"]["Error"];
|
|
4267
|
+
};
|
|
4268
|
+
};
|
|
4269
|
+
"get-order": {
|
|
4270
|
+
parameters: {
|
|
4271
|
+
query?: never;
|
|
4272
|
+
header?: never;
|
|
4273
|
+
path: {
|
|
4274
|
+
orderId: components["parameters"]["OrderId"];
|
|
4275
|
+
};
|
|
4276
|
+
cookie?: never;
|
|
4277
|
+
};
|
|
4278
|
+
requestBody?: never;
|
|
4279
|
+
responses: {
|
|
4280
|
+
/** @description OK */
|
|
4281
|
+
200: {
|
|
4282
|
+
headers: {
|
|
4283
|
+
[name: string]: unknown;
|
|
4284
|
+
};
|
|
4285
|
+
content: {
|
|
4286
|
+
"application/json": components["schemas"]["Order"];
|
|
4287
|
+
};
|
|
4288
|
+
};
|
|
4289
|
+
default: components["responses"]["Error"];
|
|
4290
|
+
};
|
|
4291
|
+
};
|
|
4292
|
+
"cancel-order": {
|
|
4293
|
+
parameters: {
|
|
4294
|
+
query?: never;
|
|
4295
|
+
header?: never;
|
|
4296
|
+
path: {
|
|
4297
|
+
orderId: components["parameters"]["OrderId"];
|
|
4298
|
+
};
|
|
4299
|
+
cookie?: never;
|
|
4300
|
+
};
|
|
4301
|
+
requestBody?: never;
|
|
4302
|
+
responses: {
|
|
4303
|
+
/** @description The order after the request. */
|
|
4304
|
+
200: {
|
|
4305
|
+
headers: {
|
|
4306
|
+
[name: string]: unknown;
|
|
4307
|
+
};
|
|
4308
|
+
content: {
|
|
4309
|
+
"application/json": components["schemas"]["Order"];
|
|
4310
|
+
};
|
|
4311
|
+
};
|
|
4312
|
+
/** @description The order is paid in full, accepted, being paid online, or a scheduled change. */
|
|
4313
|
+
409: {
|
|
4314
|
+
headers: {
|
|
4315
|
+
[name: string]: unknown;
|
|
4316
|
+
};
|
|
4317
|
+
content: {
|
|
4318
|
+
"application/json": components["schemas"]["Error"];
|
|
4319
|
+
};
|
|
4320
|
+
};
|
|
4321
|
+
default: components["responses"]["Error"];
|
|
4322
|
+
};
|
|
4323
|
+
};
|
|
4324
|
+
"list-order-items": {
|
|
4325
|
+
parameters: {
|
|
4326
|
+
query?: {
|
|
4327
|
+
/** @description 1-based page number; the first page when omitted. */
|
|
4328
|
+
page?: components["parameters"]["Page"];
|
|
4329
|
+
/** @description How many per page, 100 at most. */
|
|
4330
|
+
page_size?: components["parameters"]["PageSize"];
|
|
4331
|
+
};
|
|
4332
|
+
header?: never;
|
|
4333
|
+
path: {
|
|
4334
|
+
orderId: components["parameters"]["OrderId"];
|
|
4335
|
+
};
|
|
4336
|
+
cookie?: never;
|
|
4337
|
+
};
|
|
4338
|
+
requestBody?: never;
|
|
4339
|
+
responses: {
|
|
4340
|
+
/** @description OK */
|
|
4341
|
+
200: {
|
|
4342
|
+
headers: {
|
|
4343
|
+
[name: string]: unknown;
|
|
4344
|
+
};
|
|
4345
|
+
content: {
|
|
4346
|
+
"application/json": components["schemas"]["OrderItemList"];
|
|
4347
|
+
};
|
|
4348
|
+
};
|
|
4349
|
+
default: components["responses"]["Error"];
|
|
4350
|
+
};
|
|
4351
|
+
};
|
|
4352
|
+
"list-entitlements": {
|
|
4353
|
+
parameters: {
|
|
4354
|
+
query?: {
|
|
4355
|
+
/** @description 1-based page number; the first page when omitted. */
|
|
4356
|
+
page?: components["parameters"]["Page"];
|
|
4357
|
+
/** @description How many per page, 100 at most. */
|
|
4358
|
+
page_size?: components["parameters"]["PageSize"];
|
|
4359
|
+
/** @description Restrict to one of your accounts. All of them when omitted. */
|
|
4360
|
+
billing_account_id?: components["parameters"]["AccountIdQuery"];
|
|
4361
|
+
/**
|
|
4362
|
+
* @description Restrict to one project. Anything bought at account level, such as a membership,
|
|
4363
|
+
* appears regardless.
|
|
4364
|
+
*/
|
|
4365
|
+
project_id?: string;
|
|
4366
|
+
};
|
|
4367
|
+
header?: never;
|
|
4368
|
+
path?: never;
|
|
4369
|
+
cookie?: never;
|
|
4370
|
+
};
|
|
4371
|
+
requestBody?: never;
|
|
4372
|
+
responses: {
|
|
4373
|
+
/** @description OK */
|
|
4374
|
+
200: {
|
|
4375
|
+
headers: {
|
|
4376
|
+
[name: string]: unknown;
|
|
4377
|
+
};
|
|
4378
|
+
content: {
|
|
4379
|
+
"application/json": components["schemas"]["EntitlementList"];
|
|
4380
|
+
};
|
|
4381
|
+
};
|
|
4382
|
+
default: components["responses"]["Error"];
|
|
4383
|
+
};
|
|
4384
|
+
};
|
|
4385
|
+
}
|