Skip to content

@mbanq/core-sdk-js v0.50.0


@mbanq/core-sdk-js / commands / GenerateAccountStatement

Function: GenerateAccountStatement()

GenerateAccountStatement(data): Command<{ data: { docType: string; params: { end_date: string; saving_no: string; start_date: string; }; parentEntityId: number; parentEntityType: string; reportName: string; reportType: "PDF" | "CSV" | "EXCELL" | "EXCELL 2007"; }; }, { jobId: number; status: string; }>

Defined in: src/commands/rest/accountStatement.ts:45

Generates an account statement.

Parameters

data

docType

string = ...

params

{ end_date: string; saving_no: string; start_date: string; } = ...

params.end_date

string = ...

params.saving_no

string = ...

params.start_date

string = ...

parentEntityId

number = ...

parentEntityType

string = ...

reportName

string = ...

reportType

"PDF" | "CSV" | "EXCELL" | "EXCELL 2007" = ...

Returns

Command<{ data: { docType: string; params: { end_date: string; saving_no: string; start_date: string; }; parentEntityId: number; parentEntityType: string; reportName: string; reportType: "PDF" | "CSV" | "EXCELL" | "EXCELL 2007"; }; }, { jobId: number; status: string; }>

A Command that when executed returns the statement generation job details

Example

typescript
const generateCmd = GenerateAccountStatement({
  reportName: "Report current and saving account(Pentaho)",
  parentEntityType: "savings",
  parentEntityId: 1,
  reportType: "PDF",
  docType: "statement",
  params: {
    start_date: "01 January 2023",
    end_date: "02 January 2023",
    saving_no: "1"
  }
});
const result = await generateCmd.execute(config);
console.log(result.jobId); // 315

Released under the MIT License.