BankStatementParserOutput

createNewAccountStatement

Example
                      var accountStatement = context.output.createNewAccountStatement();
            accountStatement.accountMappingKey = defaultAccountMappingKey;
            log.debug({
               title: 'Adding a new account statement',
               details: accountStatement
            }); 

        

addAccountStatement

Example
                      var accountStatementId = context.output.addAccountStatement({"parsedAccountStatement":accountStatement});
            log.debug({
               title: 'New account statement ID',
               details: accountStatementId
            }); 

        

createNewTransaction

Example
                         var partsOfCSVLine = line.value.split(',');
               var transaction = context.output.createNewTransaction();
               transaction.accountStatementId = accountStatementId;
               var rawDate = partsOfCSVLine[0];
               transaction.date = rawDate.substring(6, 10) + '-' + rawDate.substring(0, 2) + '-' + rawDate.substring(3, 5);
               transaction.amount = partsOfCSVLine[4];
               transaction.transactionMappingKey = partsOfCSVLine[3];
               transaction.transactionNumber = partsOfCSVLine[2];
               transaction.payee = partsOfCSVLine[1];
               transaction.currency = "USD";
               transaction.memo = partsOfCSVLine[5];
               transaction.customerRawId = partsOfCSVLine[6];
               transaction.customerName = partsOfCSVLine[7];
               transaction.invoices = partsOfCSVLine[8].split(','); 

        

addTransaction

Example
                         context.output.addTransaction({"parsedTransaction":transaction});
               return true;
            }); 

        

ParsedAccountStatement

getAccountMappingKey

setAccountMappingKey

getStatementDate

setStatementDate

getOpeningBalance

setOpeningBalance

getClosingBalance

setClosingBalance

ParsedTransaction

getAccountStatementId

setAccountStatementId

getDate

setDate

getAmount

setAmount

getTransactionMappingKey

setTransactionMappingKey

getTransactionNumber

setTransactionNumber

getPayee

setPayee

getCurrency

setCurrency

getMemo

setMemo

getUniqueId

setUniqueId

getSourceId

setSourceId

getTransactionStatus

setTransactionStatus

getCustomerRawId

setCustomerRawId

getCustomerName

setCustomerName

getInvoices

setInvoices

Related Topics

parseBankStatement
BankStatementParserInput

General Notices