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

FYLE-2hwr6bb #151

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
208 changes: 208 additions & 0 deletions reference/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6539,6 +6539,157 @@ components:
description: >
Determines whether this organization has been verified by a
verifier.
statements_in:
Copy link
Contributor Author

@Kulsekar4 Kulsekar4 May 25, 2022

Choose a reason for hiding this comment

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

Summary :
Have added not null constraint for -> also have added in doc and script @modernwarfareuplink sir
file_name
file_size
no_of_debit
no_of_credit
no_of_transactions

type: object
properties:
file_id:
allOf:
- $ref: '#/components/schemas/id_string'
example: fidftadfdsdf
required:
- file_id
statements_out:
type: object
additionalProperties: false
properties:
id:
allOf:
- $ref: '#/components/schemas/id_string'
example: stmtwownwrng
org_id:
$ref: '#/components/schemas/org_id'
user_id:
$ref: '#/components/schemas/user_id'
created_at:
$ref: '#/components/schemas/created_at'
updated_at:
$ref: '#/components/schemas/updated_at'
file_name:
type: string
description: |
Specifies the name of file uploaded by the user.
example: amex.csv
file_size:
type: number
description: >
Specifies the size of file uploaded by the user. (The size is
represented in bytes)
example: 21
no_of_debit:
type: integer
description: |
Number of debit transactions in the statement uploaded by the user.
example: 3
no_of_credit:
type: integer
description: |
Number of credit transactions in the statement uploaded by the user.
example: 3
no_of_transactions:
type: integer
description: |
Number of transactions in the statement uploaded by the user.
example: 6
statement_columns:
type: array
items:
type: string
description: |
This specifies headers of the statement uploaded by the user.
example:
- account_number
- amount
start_date:
$ref: '#/components/schemas/timestamptz_utc'
description: |
Start date of the statement period
nullable: true
end_date:
$ref: '#/components/schemas/timestamptz_utc'
description: |
End date of the statement period
nullable: true
has_statement_duplicate:
type: boolean
description: |
Indicates whether the statement is completely duplicate or not.
duplicate_statement_ids:
type: array
description: >-
Holds the list of statement_ids which are duplicate to the current
statement
items:
$ref: '#/components/schemas/id_string'
example:
- stmtge49ielgel
nullable: true
has_statement_line_items_duplicate:
type: boolean
description: >
Indicates whether there are any line items in this statement are
duplicates.
duplicate_statement_line_items:
type: array
items:
type: object
properties:
ids:
type: array
items:
$ref: '#/components/schemas/id_string'
example:
- stlige49ielgel
description: Ids of the current statement line items which are duplicates
nullable: true
duplicate_line_item_statement_id:
type: string
description: |
Id of the existing duplicate statement
example:
- stmpge49ielgel
nullable: true
unique_id:
type: string
description: |
Unique key that is used to identify the statement.
example: 74175aadf22675aa59df28b96d351cfb
file_id:
type: string
description: |
File id of the uploaded statement.
example: fiit3pX9gzzP
is_corporate_card_transactions_created:
type: boolean
description: >
Indicates whether the corporate card transactions are created out of
the statement.
statement_mappings_id:
type: string
example: stmpdfddfd
description: |
Id of the mapping used to extract transaction from the statement.
nullable: true
required:
- id
- org_id
- user_id
- created_at
- updated_at
- file_name
- file_size
- no_of_debit
- no_of_credit
- no_of_transactions
- statement_columns
- start_date
- end_date
- has_statement_duplicate
- has_statement_line_items_duplicate
- duplicate_statement_ids
- duplicate_statement_line_items
- unique_id
- file_id
- is_corporate_card_transactions_created
parameters:
created_at:
in: query
Expand Down Expand Up @@ -6614,6 +6765,10 @@ tags:
description: >
This API gives you access to manage your organisation's Corporate Card
Transaction data.
- name: Statements
description: >
These APIs gives you access to add / view a bank statement for
reconciliation.
- name: Cost Centers
description: >
These APIs gives you access to manage your organisation's Cost Centers
Expand Down Expand Up @@ -9883,3 +10038,56 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/401'
/admin/statements/upload:
post:
tags:
- Statements
summary: Upload a statement
description: |
Upload a statement to Fyle for reconciliation.
operationId: statements_post
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/statements_in'
required:
- data
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/statements_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'
5 changes: 5 additions & 0 deletions src/admin/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ tags:
- name: Corporate Card Transactions
description: |
This API gives you access to manage your organisation's Corporate Card Transaction data.
- name: Statements
description: >
These APIs gives you access to add / view a bank statement for reconciliation.
- name: Cost Centers
description: >
These APIs gives you access to manage your organisation's Cost Centers
Expand Down Expand Up @@ -236,3 +239,5 @@ paths:
$ref: paths/admin@budget_usages.yaml
/admin/orgs:
$ref: paths/admin@orgs.yaml
/admin/statements/upload:
$ref: paths/admin@statements@upload.yaml
52 changes: 52 additions & 0 deletions src/admin/paths/admin@statements@upload.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
post:
tags:
- Statements
summary: Upload a statement
description: |
Upload a statement to Fyle for reconciliation.

Choose a reason for hiding this comment

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

upload a corporate card statement(csv or excel)

operationId: statements_post
Copy link

Choose a reason for hiding this comment

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

try to understand what and where this is used

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it, this is a unique string used to identify an operation.
Addl info: Some code generators use this value to name the corresponding methods in code.

requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '../../components/schemas/statements.yaml#/statements_in'
required:
- data
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
data:
$ref: '../../components/schemas/statements.yaml#/statements_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'
Loading