@leaflow/sdk 0.0.0-dev.21.g192ee50 → 0.0.0-dev.210.g700abef

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