@leaflow/sdk 0.0.0-dev.191.g39f21ec → 0.0.0-dev.193.g3597f73

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