Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions src/unity/paths/operator_accounts_accountId_entitlements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
get:
operationId: GetEntitlementsByAccount
tags:
- Accounts
- Entitlements
- Operators
summary: List all entitlements for an account
parameters:
- $ref: '../../common/parameters/TraceSpan.yml'
- in: path
name: accountId
schema:
type: string
required: true
description: The ID of the account to get entitlements for.
responses:
'200':
description: all entitlements
content:
application/json:
schema:
- $ref: '../schemas/Entitlements.yml'
'401':
description: Unauthorized
$ref: '../../common/responses/ServerError.yml'
'404':
description: Account not found
$ref: '../../common/responses/ServerError.yml'
default:
description: Unexpected error
$ref: '../../common/responses/ServerError.yml'
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
post:
operationId: OverrideEntitlementByAccount
tags:
- Accounts
- Entitlements
- Operators
summary: Creates or updates an entitlement override for an account
parameters:
- $ref: '../../common/parameters/TraceSpan.yml'
- in: path
name: accountId
schema:
type: string
required: true
description: The ID of the account to create the override for
- in: path
name: entitlementId
schema:
type: string
required: true
description: The ID of the entitlement definition to override
responses:
'200':
description: the updated entitlement
content:
application/json:
schema:
- $ref: '../schemas/Entitlement.yml'
'401':
description: Unauthorized
$ref: '../../common/responses/ServerError.yml'
'404':
description: Entitlement or Account not found
$ref: '../../common/responses/ServerError.yml'
'422':
description: Invalid override values
$ref: '../../common/responses/ServerError.yml'
default:
description: Unexpected error
$ref: '../../common/responses/ServerError.yml'
delete:
operationId: DeleteEntitlementOverrideByAccount
tags:
- Accounts
- Entitlements
- Operators
summary: Deletes an entitlement override for an account
parameters:
- $ref: '../../common/parameters/TraceSpan.yml'
- in: path
name: accountId
schema:
type: string
required: true
description: The ID of the account to delete the override for
- in: path
name: entitlementId
schema:
type: string
required: true
description: The ID of the entitlement definition to delete overrides for
responses:
'200':
description: the updated entitlement
content:
application/json:
schema:
- $ref: '../schemas/Entitlement.yml'
'401':
description: Unauthorized
$ref: '../../common/responses/ServerError.yml'
'404':
description: Entitlement or Account not found
$ref: '../../common/responses/ServerError.yml'
'422':
description: Delete failed
$ref: '../../common/responses/ServerError.yml'
default:
description: Unexpected error
$ref: '../../common/responses/ServerError.yml'
30 changes: 30 additions & 0 deletions src/unity/schemas/Entitlement.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
properties:
id:
type: number
description: the entitlement definition id
name:
type: string
description: the name of the entitlement
description:
type: string
description: the description of the entitlement
value:
type: number
description: the entitlement value for the account
isUnlimited:
type: boolean
description: flag whether the entitlement value is unlimited
defaultValue:
type: number
description: the entitlement default value for the account type
defaultIsUnlimited:
type: boolean
description: flag whether the entitlement default value is unlimited
required:
- id
- name
- description
- value
- isUnlimited
- defaultValue
- defaultIsUnlimited
3 changes: 3 additions & 0 deletions src/unity/schemas/Entitlements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type: array
items:
$ref: './Entitlement.yml'