@leaflow/sdk 0.0.0-dev.191.g39f21ec → 0.0.0-dev.195.gffa7069

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