Skip to content

Commit

Permalink
feat: POST statements/missing_transactions API docs (#359)
Browse files Browse the repository at this point in the history
* feat: POST statements/missing_transactions API docs

* feat: POST statements/missing_transactions API docs

* Auto generate API docs

---------

Co-authored-by: Siva <[email protected]>
  • Loading branch information
Gaurav Sharma and snarayanank2 authored Sep 26, 2023
1 parent 6a3f571 commit 1f6f48c
Show file tree
Hide file tree
Showing 4 changed files with 351 additions and 0 deletions.
174 changes: 174 additions & 0 deletions reference/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10791,6 +10791,134 @@ components:
required:
- missing_transactions_count
- is_rtf_statement
rtf_missing_transaction_from_statement_in:
type: object
properties:
id:
allOf:
- $ref: '#/components/schemas/id_string'
example: stmtadfdsdf
statement_mapping:
type: object
properties:
description_column:
type: string
description: |
Specifies the mapping of description column on the statement
nullable: true
example: description
transaction_date_column:
type: string
description: |
Specifies the mapping of transaction date on the statement.
example: txn date
transaction_id_column:
type: string
description: |
Specifies the mapping of transaction id / unique id on the statement.
example: reference number
nullable: true
amount_column:
type: string
description: |
Specifies the mapping of amount on the statement.
example: amount
card_number_column:
type: string
description: |
Specifies the mapping of card number on the statement.
example: account number
merchant_column:
type: string
description: |
Specifies the mapping of merchant on the statement.
example: Amazon
foreign_amount_column:
type: string
description: |
Specifies the mapping of foreign amount on the statement.
example: foreign amount
nullable: true
foreign_currency_column:
type: string
description: |
Specifies the mapping of foreign currency on the statement.
example: foreign currency
nullable: true
post_date_column:
type: string
description: |
Specifies the header name of the post date column in the statement.
example: post date
nullable: true
bank_name:
type: string
description: |
Specifies the bank name of the statement
example: American Express
is_debit_positive:
type: boolean
description: |
Specifies the representation of the the amount in the statement, if true then the amount represented by |
positive sign are debits, and if false then the amount represented by negative sign are debits.
example: true
name:
type: string
description: |
Specifies the mapping name.
example: USD
nullable: true
card_network:
type: string
description: |
Specifies the credit card network used by the card
example: VISA
nullable: true
required:
- description_column
- transaction_date_column
- transaction_id_column
- amount_column
- card_number_column
- merchant_column
- foreign_amount_column
- foreign_currency_column
- post_date_column
- bank_name
- is_debit_positive
- name
- card_network
ignored_line_item_ids:
type: array
items:
type: string
description: |
This specifies list of statement line items to be ignored in the statement.
example:
- stlisfdfadssd
reconciliation_method:
type: string
description: |
Specifies the reconciliation method to be used for the statement.
example: TRANSACTION
enum:
- POST
- TRANSACTION
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
required:
- id
- statement_mapping
- ignored_line_item_ids
- reconciliation_method
expense_rule_if_out:
type: object
additionalProperties: false
Expand Down Expand Up @@ -18230,6 +18358,52 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/404'
/admin/statements/missing_transactions:
post:
tags:
- Statements
summary: Process RTF Missing Transactions Reconciliation
description: |
This API is used to start processing RTF missing transactions reconciliation of a statement.
operationId: missing_transactions
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/rtf_missing_transaction_from_statement_in'
required:
- data
responses:
'200':
description: OK
'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/statements/create_card_transactions:
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 @@ -364,6 +364,8 @@ paths:
$ref: paths/admin@[email protected]
/admin/statements/card_stats:
$ref: paths/admin@statements@card_stats.yaml
/admin/statements/missing_transactions:
$ref: paths/admin@statements@post_missing_transactions.yaml
/admin/statements/create_card_transactions:
$ref: paths/admin@statements@create_card_transactions.yaml
/admin/expense_rules:
Expand Down
45 changes: 45 additions & 0 deletions src/admin/paths/admin@statements@post_missing_transactions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
post:
tags:
- Statements
summary: Process RTF Missing Transactions Reconciliation
description: |
This API is used to start processing RTF missing transactions reconciliation of a statement.
operationId: missing_transactions
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '../../components/schemas/statements.yaml#/rtf_missing_transaction_from_statement_in'
required:
- data
responses:
'200':
description: OK
'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'
130 changes: 130 additions & 0 deletions src/components/schemas/statements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,136 @@ card_transaction_from_statement_in:
- statement_mapping
- ignored_line_item_ids

rtf_missing_transaction_from_statement_in:
type: object
properties:
id:
allOf:
- $ref: './fields.yaml#/id_string'
example: stmtadfdsdf
statement_mapping:
type: object
properties:
description_column:
type: string
description: |
Specifies the mapping of description column on the statement
nullable: true
example: description
transaction_date_column:
type: string
description: |
Specifies the mapping of transaction date on the statement.
example: txn date
transaction_id_column:
type: string
description: |
Specifies the mapping of transaction id / unique id on the statement.
example: reference number
nullable: true
amount_column:
type: string
description: |
Specifies the mapping of amount on the statement.
example: amount
card_number_column:
type: string
description: |
Specifies the mapping of card number on the statement.
example: account number
merchant_column:
type: string
description: |
Specifies the mapping of merchant on the statement.
example: Amazon
foreign_amount_column:
type: string
description: |
Specifies the mapping of foreign amount on the statement.
example: foreign amount
nullable: true
foreign_currency_column:
type: string
description: |
Specifies the mapping of foreign currency on the statement.
example: foreign currency
nullable: true
post_date_column:
type: string
description: |
Specifies the header name of the post date column in the statement.
example: post date
nullable: true
bank_name:
type: string
description: |
Specifies the bank name of the statement
example: American Express
is_debit_positive:
type: boolean
description: |
Specifies the representation of the the amount in the statement, if true then the amount represented by |
positive sign are debits, and if false then the amount represented by negative sign are debits.
example: true
name:
type: string
description: |
Specifies the mapping name.
example: USD
nullable: true
card_network:
type: string
description: |
Specifies the credit card network used by the card
example: VISA
nullable: true
required:
- description_column
- transaction_date_column
- transaction_id_column
- amount_column
- card_number_column
- merchant_column
- foreign_amount_column
- foreign_currency_column
- post_date_column
- bank_name
- is_debit_positive
- name
- card_network
ignored_line_item_ids:
type: array
items:
type: string
description: >
This specifies list of statement line items to be ignored in the statement.
example:
- stlisfdfadssd
reconciliation_method:
type: string
description: |
Specifies the reconciliation method to be used for the statement.
example: TRANSACTION
enum:
- POST
- TRANSACTION
start_date:
$ref: './fields.yaml#/timestamptz_utc'
description: |
Start date of the statement period
nullable: true
end_date:
$ref: './fields.yaml#/timestamptz_utc'
description: |
End date of the statement period
nullable: true
required:
- id
- statement_mapping
- ignored_line_item_ids
- reconciliation_method


preview_out:
properties:
no_of_debit:
Expand Down

0 comments on commit 1f6f48c

Please sign in to comment.