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_card_transactions/reassign/bulk #550

Merged
merged 3 commits into from
Oct 8, 2024
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
69 changes: 69 additions & 0 deletions reference/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8000,6 +8000,21 @@ components:
- matched_expenses
- last_user_matched_at
- metadata
corporate_card_transaction_reassign_in:
type: object
properties:
id:
allOf:
- $ref: '#/components/schemas/id_string'
example: btxnwownwrng
user_id:
type: string
description: |
The unique id of an user to whom the card transaction should be reassigned.
example: usge49ielgel
required:
- id
- user_id
corporate_card_transaction_id_in:
type: object
properties:
Expand Down Expand Up @@ -20253,6 +20268,60 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/403'
/admin/corporate_card_transactions/reassign/bulk:
post:
tags:
- Corporate Card Transactions
summary: Bulk reassign corporate card transactions
description: |
Reassign corporate card transactions to users in bulk.
operationId: corporate_card_transactions_reassign_bulk
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/corporate_card_transaction_reassign_in'
required:
- data
responses:
'200':
description: OK
'400':
description: Bad request
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/bulk_error'
- type: object
properties:
error:
type: string
nullable: true
message:
type: string
nullable: true
data:
type: object
nullable: true
'401':
description: Unauthorized request
content:
application/json:
schema:
$ref: '#/components/schemas/401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/403'
/admin/corporate_card_transactions/unassign:
post:
tags:
Expand Down
2 changes: 2 additions & 0 deletions src/admin/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ paths:
$ref: paths/admin@[email protected]
/admin/corporate_card_transactions/assign/bulk:
$ref: paths/admin@corporate_card_transactions@[email protected]
/admin/corporate_card_transactions/reassign/bulk:
$ref: paths/admin@corporate_card_transactions@[email protected]
/admin/corporate_card_transactions/unassign:
$ref: paths/admin@[email protected]
# /admin/corporate_card_transactions/unassign/bulk:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
post:
tags:
- Corporate Card Transactions
summary: Bulk reassign corporate card transactions
description: |
Reassign corporate card transactions to users in bulk.
operationId: corporate_card_transactions_reassign_bulk
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '../../components/schemas/corporate_card_transaction.yaml#/corporate_card_transaction_reassign_in'
required:
- data
responses:
'200':
description: OK
'400':
description: Bad request
content:
application/json:
schema:
oneOf:
- $ref: '../../components/schemas/bulk_error.yaml'
- type: object
properties:
error:
type: string
nullable: true
message:
type: string
nullable: true
data:
type: object
nullable: true
'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'
16 changes: 16 additions & 0 deletions src/components/schemas/corporate_card_transaction.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2411,3 +2411,19 @@ corporate_card_transactions_delete_in:
example: btxn123453
required:
- id

corporate_card_transaction_reassign_in:
type: object
properties:
id:
allOf:
- $ref: './fields.yaml#/id_string'
example: btxnwownwrng
user_id:
type: string
description: |
The unique id of an user to whom the card transaction should be reassigned.
example: usge49ielgel
required:
- id
- user_id
Loading