From ca649f749a63fe7174210e181dab32fc5cd0a45a Mon Sep 17 00:00:00 2001 From: Kulasekar Date: Tue, 24 May 2022 08:34:52 +0530 Subject: [PATCH 1/6] added the file --- reference/admin.yaml | 200 ++++++++++++++++++ src/admin/openapi.yaml | 5 + src/admin/paths/admin@statements@preview.yaml | 52 +++++ src/components/schemas/statements.yaml | 137 ++++++++++++ 4 files changed, 394 insertions(+) create mode 100644 src/admin/paths/admin@statements@preview.yaml create mode 100644 src/components/schemas/statements.yaml diff --git a/reference/admin.yaml b/reference/admin.yaml index 253bb2067..36939d8b8 100644 --- a/reference/admin.yaml +++ b/reference/admin.yaml @@ -6578,6 +6578,149 @@ components: description: > Determines whether this organization has been verified by a verifier. + preview_in: + type: object + properties: + id: + allOf: + - $ref: '#/components/schemas/id_string' + example: stmtadfdsdf + statement_mapping: + type: object + properties: + transaction_date: + type: string + description: | + Specifies the mapping of transaction date on the statement. + example: txn date + transaction_id: + type: string + description: > + Specifies the mapping of transaction id / unique id on the + statement. + example: reference number + nullable: true + amount: + type: string + description: | + Specifies the mapping of amount on the statement. + example: amount + card_number: + type: string + description: | + Specifies the mapping of card number on the statement. + example: account number + foreign_amount: + type: string + description: | + Specifies the mapping of foreign amount on the statement. + example: foreign amount + nullable: true + foreign_currency: + type: string + description: | + Specifies the mapping of foreign currency on the statement. + example: foreign currency + nullable: true + statement_bank_name: + type: string + description: | + Specifies the bank name of the statement + example: American Express + statement_is_debit_positive: + type: boolean + description: > + Specifies the representation of the the amount in the statement, + if true then the amount represented by | + + negative sign are credits, and if false then the amount + represented by negative sign are debits. + example: true + currency: + type: string + description: | + Specifies the currency used in the statement. + example: USD + name: + type: string + description: | + Specifies the mapping name. + example: USD + ignored_line_items: + type: array + items: + type: string + description: | + This specifies list of line items to be ignored in the statement. + example: + - stlisfdfadssd + required: + - id + - statement_mapping + - ignored_line_items + preview_out: + type: array + items: + type: object + properties: + statement_bank_name: + type: string + description: | + Specifies the bank name of the statement + example: American Express + vendor: + type: string + description: | + Specifies the vendor of the statement + example: Amazon + transaction_date: + $ref: '#/components/schemas/timestamptz_utc' + description: | + Specifies the transaction date on the statement. + statement_is_debit_positive: + type: boolean + description: > + Specifies the representation of the the amount in the statement, + if true then the amount represented by | + + negative sign are credits, and if false then the amount + represented by negative sign are debits. + example: true + amount: + type: integer + description: | + Specifies the amount on the statement. + example: 30 + card_number: + type: string + description: | + Specifies the card number on the statement. + example: xxxx-3343 + unique_key: + type: string + description: | + Specifies the unique code / transaction id on the statement. + example: ed0b2aa913c54b3f903a5030208e1872 + foreign_amount: + type: integer + description: | + Specifies the foreign amount on the statement. + example: 48 + foreign_currency: + type: string + description: | + Specifies the foreign currency on the statement. + example: USD + required: + - statement_bank_name + - vendor + - transaction_dt + - statement_is_debit_positive + - amount + - card_number + - code + - foreign_amount + - foreign_currency parameters: created_at: in: query @@ -6703,6 +6846,9 @@ tags: - name: Organisations description: | These APIs gives you access to manage organisations. + - name: Statements + description: | + These APIs gives you access to add a bank statement for reconciliation. paths: /admin/projects: get: @@ -9928,3 +10074,57 @@ paths: application/json: schema: $ref: '#/components/schemas/401' + /admin/statements/preview: + post: + tags: + - Statements + summary: Preview of the uploaded statement + description: > + This API helps in converting the statement with the mapping chosed and + helps the user to preview it, this doesn't save the statement + operationId: statements_prevew + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/preview_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/preview_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' diff --git a/src/admin/openapi.yaml b/src/admin/openapi.yaml index 5b19cea88..aa7224f20 100644 --- a/src/admin/openapi.yaml +++ b/src/admin/openapi.yaml @@ -98,6 +98,9 @@ tags: - name: Organisations description: > These APIs gives you access to manage organisations. + - name: Statements + description: > + These APIs gives you access to add a bank statement for reconciliation. # - name: Suggestions # description: | # This API gives you access to Expense/Card Transactions Suggestions. @@ -236,3 +239,5 @@ paths: $ref: paths/admin@budget_usages.yaml /admin/orgs: $ref: paths/admin@orgs.yaml + /admin/statements/preview: + $ref: paths/admin@statements@preview.yaml \ No newline at end of file diff --git a/src/admin/paths/admin@statements@preview.yaml b/src/admin/paths/admin@statements@preview.yaml new file mode 100644 index 000000000..34a467a4b --- /dev/null +++ b/src/admin/paths/admin@statements@preview.yaml @@ -0,0 +1,52 @@ +post: + tags: + - Statements + summary: Preview of the uploaded statement + description: | + This API helps in converting the statement with the mapping chosed and helps the user to preview it, this doesn't save the statement + operationId: statements_prevew + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + $ref: '../../components/schemas/statements.yaml#/preview_in' + required: + - data + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '../../components/schemas/statements.yaml#/preview_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' \ No newline at end of file diff --git a/src/components/schemas/statements.yaml b/src/components/schemas/statements.yaml new file mode 100644 index 000000000..0df29bc27 --- /dev/null +++ b/src/components/schemas/statements.yaml @@ -0,0 +1,137 @@ +preview_in: + type: object + properties: + id: + allOf: + - $ref: './fields.yaml#/id_string' + example: stmtadfdsdf + statement_mapping: + type: object + properties: + transaction_date: + type: string + description: | + Specifies the mapping of transaction date on the statement. + example: txn date + transaction_id: + type: string + description: | + Specifies the mapping of transaction id / unique id on the statement. + example: reference number + nullable: true + amount: + type: string + description: | + Specifies the mapping of amount on the statement. + example: amount + card_number: + type: string + description: | + Specifies the mapping of card number on the statement. + example: account number + foreign_amount: + type: string + description: | + Specifies the mapping of foreign amount on the statement. + example: foreign amount + nullable: true + foreign_currency: + type: string + description: | + Specifies the mapping of foreign currency on the statement. + example: foreign currency + nullable: true + statement_bank_name: + type: string + description: | + Specifies the bank name of the statement + example: American Express + statement_is_debit_positive: + type: boolean + description: | + Specifies the representation of the the amount in the statement, if true then the amount represented by | + negative sign are credits, and if false then the amount represented by negative sign are debits. + example: true + currency: + type: string + description: | + Specifies the currency used in the statement. + example: USD + name: + type: string + description: | + Specifies the mapping name. + example: USD + ignored_line_items: + type: array + items: + type: string + description: > + This specifies list of line items to be ignored in the statement. + example: + - stlisfdfadssd + required: + - id + - statement_mapping + - ignored_line_items + +preview_out: + type: array + items: + type: object + properties: + statement_bank_name: + type: string + description: | + Specifies the bank name of the statement + example: American Express + vendor: + type: string + description: | + Specifies the vendor of the statement + example: Amazon + transaction_date: + $ref: './fields.yaml#/timestamptz_utc' + description: | + Specifies the transaction date on the statement. + statement_is_debit_positive: + type: boolean + description: | + Specifies the representation of the the amount in the statement, if true then the amount represented by | + negative sign are credits, and if false then the amount represented by negative sign are debits. + example: true + amount: + type: integer + description: | + Specifies the amount on the statement. + example: 30 + card_number: + type: string + description: | + Specifies the card number on the statement. + example: xxxx-3343 + unique_key: + type: string + description: | + Specifies the unique code / transaction id on the statement. + example: ed0b2aa913c54b3f903a5030208e1872 + foreign_amount: + type: integer + description: | + Specifies the foreign amount on the statement. + example: 48 + foreign_currency: + type: string + description: | + Specifies the foreign currency on the statement. + example: USD + required: + - statement_bank_name + - vendor + - transaction_dt + - statement_is_debit_positive + - amount + - card_number + - code + - foreign_amount + - foreign_currency \ No newline at end of file From 3f6379cb9f0e21b1e12333a16e5823192af9eace Mon Sep 17 00:00:00 2001 From: Kulasekar Date: Wed, 25 May 2022 10:38:34 +0530 Subject: [PATCH 2/6] resolved comment --- reference/admin.yaml | 72 ++++++++++++++++---------- src/components/schemas/statements.yaml | 70 +++++++++++++++---------- 2 files changed, 90 insertions(+), 52 deletions(-) diff --git a/reference/admin.yaml b/reference/admin.yaml index 36939d8b8..e8b8c57bf 100644 --- a/reference/admin.yaml +++ b/reference/admin.yaml @@ -6588,46 +6588,58 @@ components: statement_mapping: type: object properties: - transaction_date: + description_column: + type: string + description: > + Specifies the header name of the description column in 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: + transaction_id_column: type: string description: > Specifies the mapping of transaction id / unique id on the statement. example: reference number nullable: true - amount: + amount_column: type: string description: | Specifies the mapping of amount on the statement. example: amount - card_number: + card_number_column: type: string description: | Specifies the mapping of card number on the statement. example: account number - foreign_amount: + vendor_column: + type: string + description: | + Specifies the vendor of 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: + foreign_currency_column: type: string description: | Specifies the mapping of foreign currency on the statement. example: foreign currency nullable: true - statement_bank_name: + bank_name: type: string description: | Specifies the bank name of the statement example: American Express - statement_is_debit_positive: + is_debit_positive: type: boolean description: > Specifies the representation of the the amount in the statement, @@ -6663,21 +6675,28 @@ components: items: type: object properties: - statement_bank_name: + description_column: + type: string + description: > + Specifies the header name of the description column in the + statement. + nullable: true + example: description + bank_name: type: string description: | Specifies the bank name of the statement example: American Express - vendor: + vendor_column: type: string description: | Specifies the vendor of the statement example: Amazon - transaction_date: + transaction_date_column: $ref: '#/components/schemas/timestamptz_utc' description: | Specifies the transaction date on the statement. - statement_is_debit_positive: + is_debit_positive: type: boolean description: > Specifies the representation of the the amount in the statement, @@ -6686,41 +6705,42 @@ components: negative sign are credits, and if false then the amount represented by negative sign are debits. example: true - amount: + amount_column: type: integer description: | Specifies the amount on the statement. example: 30 - card_number: + card_number_column: type: string description: | Specifies the card number on the statement. example: xxxx-3343 - unique_key: + unique_id: type: string description: | Specifies the unique code / transaction id on the statement. example: ed0b2aa913c54b3f903a5030208e1872 - foreign_amount: + foreign_amount_column: type: integer description: | Specifies the foreign amount on the statement. example: 48 - foreign_currency: + foreign_currency_column: type: string description: | Specifies the foreign currency on the statement. example: USD required: - - statement_bank_name - - vendor - - transaction_dt - - statement_is_debit_positive - - amount - - card_number - - code - - foreign_amount - - foreign_currency + - bank_name + - vendor_column + - transaction_date_column + - description_column + - is_debit_positive + - amount_column + - card_number_column + - unique_id + - foreign_amount_column + - foreign_currency_column parameters: created_at: in: query diff --git a/src/components/schemas/statements.yaml b/src/components/schemas/statements.yaml index 0df29bc27..81d799cb8 100644 --- a/src/components/schemas/statements.yaml +++ b/src/components/schemas/statements.yaml @@ -8,45 +8,56 @@ preview_in: statement_mapping: type: object properties: - transaction_date: + description_column: + type: string + description: | + Specifies the header name of the description column in 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: + transaction_id_column: type: string description: | Specifies the mapping of transaction id / unique id on the statement. example: reference number nullable: true - amount: + amount_column: type: string description: | Specifies the mapping of amount on the statement. example: amount - card_number: + card_number_column: type: string description: | Specifies the mapping of card number on the statement. example: account number - foreign_amount: + vendor_column: + type: string + description: | + Specifies the vendor of 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: + foreign_currency_column: type: string description: | Specifies the mapping of foreign currency on the statement. example: foreign currency nullable: true - statement_bank_name: + bank_name: type: string description: | Specifies the bank name of the statement example: American Express - statement_is_debit_positive: + is_debit_positive: type: boolean description: | Specifies the representation of the the amount in the statement, if true then the amount represented by | @@ -80,58 +91,65 @@ preview_out: items: type: object properties: - statement_bank_name: + description_column: + type: string + description: | + Specifies the header name of the description column in the statement. + nullable: true + example: description + bank_name: type: string description: | Specifies the bank name of the statement example: American Express - vendor: + vendor_column: type: string description: | Specifies the vendor of the statement example: Amazon - transaction_date: + transaction_date_column: $ref: './fields.yaml#/timestamptz_utc' description: | Specifies the transaction date on the statement. - statement_is_debit_positive: + is_debit_positive: type: boolean description: | Specifies the representation of the the amount in the statement, if true then the amount represented by | negative sign are credits, and if false then the amount represented by negative sign are debits. example: true - amount: + amount_column: type: integer description: | Specifies the amount on the statement. example: 30 - card_number: + card_number_column: type: string description: | Specifies the card number on the statement. example: xxxx-3343 - unique_key: + unique_id: type: string description: | Specifies the unique code / transaction id on the statement. example: ed0b2aa913c54b3f903a5030208e1872 - foreign_amount: + foreign_amount_column: type: integer description: | Specifies the foreign amount on the statement. example: 48 - foreign_currency: + foreign_currency_column: type: string description: | Specifies the foreign currency on the statement. example: USD required: - - statement_bank_name - - vendor - - transaction_dt - - statement_is_debit_positive - - amount - - card_number - - code - - foreign_amount - - foreign_currency \ No newline at end of file + - bank_name + - vendor_column + - transaction_date_column + - description_column + - is_debit_positive + - amount_column + - card_number_column + - unique_id + - foreign_amount_column + - foreign_currency_column \ No newline at end of file From c8f11397523bbe4fffabc09315725e2c3d827ae3 Mon Sep 17 00:00:00 2001 From: Kulasekar Date: Mon, 30 May 2022 15:59:06 +0530 Subject: [PATCH 3/6] resolved minor comment --- reference/admin.yaml | 131 ++++++++++++------------- src/components/schemas/statements.yaml | 126 ++++++++++++------------ 2 files changed, 123 insertions(+), 134 deletions(-) diff --git a/reference/admin.yaml b/reference/admin.yaml index e8b8c57bf..21d1b259c 100644 --- a/reference/admin.yaml +++ b/reference/admin.yaml @@ -6658,6 +6658,7 @@ components: description: | Specifies the mapping name. example: USD + nullable: true ignored_line_items: type: array items: @@ -6671,76 +6672,68 @@ components: - statement_mapping - ignored_line_items preview_out: - type: array - items: - type: object - properties: - description_column: - type: string - description: > - Specifies the header name of the description column in the - statement. - nullable: true - example: description - bank_name: - type: string - description: | - Specifies the bank name of the statement - example: American Express - vendor_column: - type: string - description: | - Specifies the vendor of the statement - example: Amazon - transaction_date_column: - $ref: '#/components/schemas/timestamptz_utc' - description: | - Specifies the transaction date on the statement. - is_debit_positive: - type: boolean - description: > - Specifies the representation of the the amount in the statement, - if true then the amount represented by | - - negative sign are credits, and if false then the amount - represented by negative sign are debits. - example: true - amount_column: - type: integer - description: | - Specifies the amount on the statement. - example: 30 - card_number_column: - type: string - description: | - Specifies the card number on the statement. - example: xxxx-3343 - unique_id: - type: string - description: | - Specifies the unique code / transaction id on the statement. - example: ed0b2aa913c54b3f903a5030208e1872 - foreign_amount_column: - type: integer - description: | - Specifies the foreign amount on the statement. - example: 48 - foreign_currency_column: - type: string - description: | - Specifies the foreign currency on the statement. - example: USD + properties: + transactions: + type: array + items: + type: object + properties: + description: + type: string + description: > + Specifies the header name of the description column in the + statement. + nullable: true + example: description + bank_name: + type: string + description: | + Specifies the bank name of the statement + example: American Express + vendor: + type: string + description: | + Specifies the vendor of the statement + example: Amazon + transaction_date: + $ref: '#/components/schemas/timestamptz_utc' + description: | + Specifies the transaction date on the statement. + amount: + type: string + description: | + Specifies the amount on the statement. + example: 30 + card_number: + type: string + description: | + Specifies the card number on the statement. + example: xxxx-3343 + unique_id: + type: string + description: | + Specifies the unique code / transaction id on the statement. + example: ed0b2aa913c54b3f903a5030208e1872 + foreign_amount: + type: string + description: | + Specifies the foreign amount on the statement. + nullable: true + example: 48 + foreign_currency: + type: string + description: | + Specifies the foreign currency on the statement. + nullable: true + example: USD + transaction_id: + type: string + description: | + Specifies the transaction id / unique id on the statement. + nullable: true + example: USD required: - - bank_name - - vendor_column - - transaction_date_column - - description_column - - is_debit_positive - - amount_column - - card_number_column - - unique_id - - foreign_amount_column - - foreign_currency_column + - transactions parameters: created_at: in: query diff --git a/src/components/schemas/statements.yaml b/src/components/schemas/statements.yaml index 81d799cb8..c8d381d78 100644 --- a/src/components/schemas/statements.yaml +++ b/src/components/schemas/statements.yaml @@ -73,6 +73,7 @@ preview_in: description: | Specifies the mapping name. example: USD + nullable: true ignored_line_items: type: array items: @@ -87,69 +88,64 @@ preview_in: - ignored_line_items preview_out: - type: array - items: - type: object - properties: - description_column: - type: string - description: | - Specifies the header name of the description column in the statement. - nullable: true - example: description - bank_name: - type: string - description: | - Specifies the bank name of the statement - example: American Express - vendor_column: - type: string - description: | - Specifies the vendor of the statement - example: Amazon - transaction_date_column: - $ref: './fields.yaml#/timestamptz_utc' - description: | - Specifies the transaction date on the statement. - is_debit_positive: - type: boolean - description: | - Specifies the representation of the the amount in the statement, if true then the amount represented by | - negative sign are credits, and if false then the amount represented by negative sign are debits. - example: true - amount_column: - type: integer - description: | - Specifies the amount on the statement. - example: 30 - card_number_column: - type: string - description: | - Specifies the card number on the statement. - example: xxxx-3343 - unique_id: - type: string - description: | - Specifies the unique code / transaction id on the statement. - example: ed0b2aa913c54b3f903a5030208e1872 - foreign_amount_column: - type: integer - description: | - Specifies the foreign amount on the statement. - example: 48 - foreign_currency_column: - type: string - description: | - Specifies the foreign currency on the statement. - example: USD + properties: + transactions: + type: array + items: + type: object + properties: + description: + type: string + description: | + Specifies the header name of the description column in the statement. + nullable: true + example: description + bank_name: + type: string + description: | + Specifies the bank name of the statement + example: American Express + vendor: + type: string + description: | + Specifies the vendor of the statement + example: Amazon + transaction_date: + $ref: './fields.yaml#/timestamptz_utc' + description: | + Specifies the transaction date on the statement. + amount: + type: string + description: | + Specifies the amount on the statement. + example: 30 + card_number: + type: string + description: | + Specifies the card number on the statement. + example: xxxx-3343 + unique_id: + type: string + description: | + Specifies the unique code / transaction id on the statement. + example: ed0b2aa913c54b3f903a5030208e1872 + foreign_amount: + type: string + description: | + Specifies the foreign amount on the statement. + nullable: true + example: 48 + foreign_currency: + type: string + description: | + Specifies the foreign currency on the statement. + nullable: true + example: USD + transaction_id: + type: string + description: | + Specifies the transaction id / unique id on the statement. + nullable: true + example: USD required: - - bank_name - - vendor_column - - transaction_date_column - - description_column - - is_debit_positive - - amount_column - - card_number_column - - unique_id - - foreign_amount_column - - foreign_currency_column \ No newline at end of file + - transactions \ No newline at end of file From 73932d61ae7b733846f6532dfd074dd7c7f87da9 Mon Sep 17 00:00:00 2001 From: Kulasekar Date: Tue, 14 Jun 2022 14:49:55 +0530 Subject: [PATCH 4/6] resolved comemnt --- reference/admin.yaml | 45 ++++++++++++++----- src/admin/paths/admin@statements@preview.yaml | 2 +- src/components/schemas/statements.yaml | 39 ++++++++++++---- 3 files changed, 67 insertions(+), 19 deletions(-) diff --git a/reference/admin.yaml b/reference/admin.yaml index 21d1b259c..bc845204e 100644 --- a/reference/admin.yaml +++ b/reference/admin.yaml @@ -6620,7 +6620,7 @@ components: vendor_column: type: string description: | - Specifies the vendor of the statement + Specifies the mapping of vendor on the statement. example: Amazon foreign_amount_column: type: string @@ -6645,26 +6645,34 @@ components: Specifies the representation of the the amount in the statement, if true then the amount represented by | - negative sign are credits, and if false then the amount + positive sign are debits, and if false then the amount represented by negative sign are debits. example: true - currency: - type: string - description: | - Specifies the currency used in the statement. - example: USD name: type: string description: | Specifies the mapping name. example: USD nullable: true + required: + - description_column + - transaction_date_column + - transaction_id_column + - amount_column + - card_number_column + - vendor_column + - foreign_amount_column + - foreign_currency_column + - bank_name + - is_debit_positive + - name ignored_line_items: type: array items: type: string - description: | - This specifies list of line items to be ignored in the statement. + description: > + This specifies list of statement line items to be ignored in the + statement. example: - stlisfdfadssd required: @@ -6732,6 +6740,23 @@ components: Specifies the transaction id / unique id on the statement. nullable: true example: USD + transaction_type: + type: string + description: > + Specifies the transaction type of the transactions on the + statement (credit / debit). + example: debit + required: + - description + - bank_name + - vendor + - transaction_date + - amount + - card_number + - unique_id + - foreign_amount + - foreign_currency + - transaction_id required: - transactions parameters: @@ -10095,7 +10120,7 @@ paths: description: > This API helps in converting the statement with the mapping chosed and helps the user to preview it, this doesn't save the statement - operationId: statements_prevew + operationId: statements_preview requestBody: required: true content: diff --git a/src/admin/paths/admin@statements@preview.yaml b/src/admin/paths/admin@statements@preview.yaml index 34a467a4b..54aeb6398 100644 --- a/src/admin/paths/admin@statements@preview.yaml +++ b/src/admin/paths/admin@statements@preview.yaml @@ -4,7 +4,7 @@ post: summary: Preview of the uploaded statement description: | This API helps in converting the statement with the mapping chosed and helps the user to preview it, this doesn't save the statement - operationId: statements_prevew + operationId: statements_preview requestBody: required: true content: diff --git a/src/components/schemas/statements.yaml b/src/components/schemas/statements.yaml index c8d381d78..160fd99d2 100644 --- a/src/components/schemas/statements.yaml +++ b/src/components/schemas/statements.yaml @@ -38,7 +38,7 @@ preview_in: vendor_column: type: string description: | - Specifies the vendor of the statement + Specifies the mapping of vendor on the statement. example: Amazon foreign_amount_column: type: string @@ -61,25 +61,32 @@ preview_in: type: boolean description: | Specifies the representation of the the amount in the statement, if true then the amount represented by | - negative sign are credits, and if false then the amount represented by negative sign are debits. + positive sign are debits, and if false then the amount represented by negative sign are debits. example: true - currency: - type: string - description: | - Specifies the currency used in the statement. - example: USD name: type: string description: | Specifies the mapping name. example: USD nullable: true + required: + - description_column + - transaction_date_column + - transaction_id_column + - amount_column + - card_number_column + - vendor_column + - foreign_amount_column + - foreign_currency_column + - bank_name + - is_debit_positive + - name ignored_line_items: type: array items: type: string description: > - This specifies list of line items to be ignored in the statement. + This specifies list of statement line items to be ignored in the statement. example: - stlisfdfadssd required: @@ -147,5 +154,21 @@ preview_out: Specifies the transaction id / unique id on the statement. nullable: true example: USD + transaction_type: + type: string + description: | + Specifies the transaction type of the transactions on the statement (credit / debit). + example: debit + required: + - description + - bank_name + - vendor + - transaction_date + - amount + - card_number + - unique_id + - foreign_amount + - foreign_currency + - transaction_id required: - transactions \ No newline at end of file From fca1ba24c36158baf10a8e288391d6589e111557 Mon Sep 17 00:00:00 2001 From: Kulasekar Date: Thu, 16 Jun 2022 10:43:18 +0530 Subject: [PATCH 5/6] minor --- src/components/schemas/statements.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/schemas/statements.yaml b/src/components/schemas/statements.yaml index 160fd99d2..aa90099ef 100644 --- a/src/components/schemas/statements.yaml +++ b/src/components/schemas/statements.yaml @@ -104,7 +104,7 @@ preview_out: description: type: string description: | - Specifies the header name of the description column in the statement. + Specifies the description of the transaction on the statement. nullable: true example: description bank_name: From 119158ef9c80ff82633119c328b39933bef1decb Mon Sep 17 00:00:00 2001 From: Kulasekar Date: Thu, 16 Jun 2022 10:50:00 +0530 Subject: [PATCH 6/6] minor --- reference/admin.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/reference/admin.yaml b/reference/admin.yaml index 51d24a2c1..dc58dd70b 100644 --- a/reference/admin.yaml +++ b/reference/admin.yaml @@ -6975,9 +6975,8 @@ components: properties: description: type: string - description: > - Specifies the header name of the description column in the - statement. + description: | + Specifies the description of the transaction on the statement. nullable: true example: description bank_name: