Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Docs for POST admin/corporate_cards/delete #557

Merged
merged 3 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
56 changes: 55 additions & 1 deletion reference/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19694,6 +19694,60 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/404'
/admin/corporate_cards/delete:
post:
tags:
- Corporate Cards
summary: Delete corporate card
description: |
Delete a corporate card and all its associated transactions
operationId: corporate_cards_delete
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/corporate_card_id_in'
required:
- data
additionalProperties: false
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/corporate_card_out'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: Unauthorized request
content:
application/json:
schema:
$ref: '#/components/schemas/401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/403'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/404'
/admin/corporate_card_transactions:
get:
tags:
Expand Down Expand Up @@ -19739,7 +19793,7 @@ paths:
$ref: '#/components/schemas/401'
post:
tags:
- Corporate Cards
- Corporate Card Transactions
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • CCT API was showing up in Corporate cards section, fixed it

summary: Create or update corporate card transaction
description: |
Create or update an corporate card transactions.
Expand Down
2 changes: 2 additions & 0 deletions src/admin/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,8 @@ paths:
$ref: paths/admin@corporate_cards@unassign.yaml
/admin/corporate_cards/reassign:
$ref: paths/admin@corporate_cards@reassign.yaml
/admin/corporate_cards/delete:
$ref: paths/admin@corporate_cards@delete.yaml

/admin/corporate_card_transactions:
$ref: paths/admin@corporate_card_transactions.yaml
Expand Down
2 changes: 1 addition & 1 deletion src/admin/paths/admin@corporate_card_transactions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ get:
$ref: '../../components/schemas/401.yaml'
post:
tags:
- Corporate Cards
- Corporate Card Transactions
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • CCT API was showing up in Corporate cards section, fixed it

summary: Create or update corporate card transaction
description: |
Create or update an corporate card transactions.
Expand Down
53 changes: 53 additions & 0 deletions src/admin/paths/admin@corporate_cards@delete.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
post:
tags:
- Corporate Cards
summary: Delete corporate card
description: |
Delete a corporate card and all its associated transactions
operationId: corporate_cards_delete
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: ../../components/schemas/corporate_card.yaml#/corporate_card_id_in
required:
- data
additionalProperties: False
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
data:
$ref: '../../components/schemas/corporate_card.yaml#/corporate_card_out'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../components/schemas/400.yaml'
'401':
description: Unauthorized request
content:
application/json:
schema:
$ref: '../../components/schemas/401.yaml'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '../../components/schemas/403.yaml'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '../../components/schemas/404.yaml'
1 change: 0 additions & 1 deletion src/admin/paths/admin@corporate_cards@reassign.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ post:
required:
- data
additionalProperties: False

responses:
'200':
description: OK
Expand Down