-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4ce8515
commit 873d5fa
Showing
4 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name: usageLimitId | ||
in: path | ||
required: true | ||
description: The id of the usage limit | ||
schema: | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
delete: | ||
summary: Delete Usage Limit | ||
description: Delete Usage Limit for the custoemr | ||
tags: | ||
- Customers | ||
- Usage | ||
parameters: | ||
- $ref: "../../parameters/path/customerId.yaml" | ||
- $ref: "../../parameters/path/usageLimitId.yaml" | ||
responses: | ||
'200': | ||
description: "Deleted Limit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
get: | ||
summary: Fetch Customer Usage Limits | ||
operationId: getCustomerUsageLimitsById | ||
description: Usage Limits for a specific customer | ||
tags: | ||
- Customers | ||
- Usage | ||
parameters: | ||
- $ref: "../../parameters/path/customerId.yaml" | ||
responses: | ||
'200': | ||
description: Expected response to a valid request | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
data: | ||
type: array | ||
items: | ||
$ref: "../../schemas/UsageLimit.yaml" | ||
has_more: | ||
type: boolean | ||
last_key: | ||
type: string | ||
format: uuid | ||
'404': | ||
$ref: "../../responses/NullResponse.yaml" | ||
default: | ||
$ref: "../../responses/UnexpectedError.yaml" | ||
post: | ||
summary: Create Usage Limit | ||
description: Create Usage Limit for the custoemr | ||
tags: | ||
- Customers | ||
- Usage | ||
parameters: | ||
- $ref: "../../parameters/path/customerId.yaml" | ||
requestBody: | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
required: | ||
- amount | ||
- action | ||
properties: | ||
amount: | ||
type: integer | ||
example: 2000 | ||
action: | ||
type: string | ||
enum: ['WARNING', 'DISABLE'] | ||
example: 'WARNING' | ||
responses: | ||
'201': | ||
description: "Usage Limit" | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../schemas/UsageLimit.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
type: object | ||
required: | ||
- name | ||
properties: | ||
id: | ||
type: string | ||
format: uuid | ||
amount: | ||
type: integer | ||
example: "SaaS" | ||
action: | ||
type: string | ||
enum: ['WARNING', 'DISABLE'] |