Skip to content

Commit

Permalink
feat: Docs for POST admin/corporate_card_transactions/reassign/bulk (
Browse files Browse the repository at this point in the history
…#550)

* feat: Add POST admin/corporate_card_transactions/reassign/bulk API Docs

* Auto generate API docs

---------

Co-authored-by: Siva <siva@fylehq.com>
  • Loading branch information
RoshanMhatre and snarayanank2 authored Oct 8, 2024
1 parent 8c242fb commit e7c6385
Show file tree
Hide file tree
Showing 4 changed files with 140 additions and 0 deletions.
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@corporate_card_transactions@assign.yaml
/admin/corporate_card_transactions/assign/bulk:
$ref: paths/admin@corporate_card_transactions@assign@bulk.yaml
/admin/corporate_card_transactions/reassign/bulk:
$ref: paths/admin@corporate_card_transactions@reassign@bulk.yaml
/admin/corporate_card_transactions/unassign:
$ref: paths/admin@corporate_card_transactions@unassign.yaml
# /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

0 comments on commit e7c6385

Please sign in to comment.