@leaflow/sdk 0.0.0-dev.23.g7fcf334 → 0.0.0-dev.230.g6609f68

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