Skip to content

Commit d2a140e

Browse files
authored
Add billing status endpoint to platform API (#581)
1 parent 4614e69 commit d2a140e

File tree

2 files changed

+33
-4
lines changed

2 files changed

+33
-4
lines changed

platform/api.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,8 @@ paths:
306306
$ref: "./paths/announcements/announcements.yml"
307307

308308
# --Billing
309+
"/v1/billing/status":
310+
$ref: "./paths/billing/status.yml"
309311
## Credits
310312
"/v1/billing/credits":
311313
$ref: "./paths/billing/credits/credits.yml"
@@ -377,10 +379,10 @@ paths:
377379
$ref: "./paths/containers/instances/tasks.yml"
378380
"/v1/containers/{containerId}/instances/{instanceId}/volumes":
379381
$ref: "./paths/containers/instances/volumes.yml"
380-
"/v1/containers/{containerId}/instances/{instanceId}/telemetry/resources/report":
381-
$ref: paths/containers/instances/telemetry/report.yml
382-
"/v1/containers/{containerId}/instances/{instanceId}/telemetry/resources/stream":
383-
$ref: paths/containers/instances/telemetry/stream.yml
382+
? "/v1/containers/{containerId}/instances/{instanceId}/telemetry/resources/report"
383+
: $ref: paths/containers/instances/telemetry/report.yml
384+
? "/v1/containers/{containerId}/instances/{instanceId}/telemetry/resources/stream"
385+
: $ref: paths/containers/instances/telemetry/stream.yml
384386
"/v1/containers/{containerId}/instances/{instanceId}/console":
385387
$ref: "paths/containers/instances/console.yml"
386388
"/v1/containers/{containerId}/functions/tasks":

platform/paths/billing/status.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
get:
2+
operationId: "getBillingStatus"
3+
summary: Get Billing Status
4+
description: |
5+
Retrieve meta details about the billing status of this Cycle core. It is unlikely that someone would need this endpoint outside
6+
of Cycle's internal teams.
7+
tags:
8+
- Billing
9+
parameters: []
10+
responses:
11+
200:
12+
description: Returns details about the billing status of this Cycle core.
13+
content:
14+
application/json:
15+
schema:
16+
type: object
17+
required:
18+
- data
19+
properties:
20+
data:
21+
type: object
22+
properties:
23+
enabled:
24+
type: boolean
25+
description: Whether billing is enabled for this core. Generally, this will only be false for dedicated cores.
26+
default:
27+
$ref: ../../../components/responses/errors/DefaultError.yml

0 commit comments

Comments
 (0)