Skip to content

@mbanq/core-sdk-js v0.50.0


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

Function: DownloadCreditAccountBilledStatement()

DownloadCreditAccountBilledStatement(creditAccountId, data): Command<{ creditAccountId: number; data: { statementId: string; }; }, string>

Defined in: src/commands/rest/creditAccount.ts:310

Download billed statement for a credit account

Downloads a specific billing statement generated for a credit account. The statement ID is a unique value assigned to each credit account statement. Returns a binary file as a blob with metadata.

Parameters

creditAccountId

number

The unique identifier of the credit account

data

statementId

string = ...

Returns

Command<{ creditAccountId: number; data: { statementId: string; }; }, string>

Command object that executes the API request and returns the statement file

Example

typescript
const command = DownloadCreditAccountBilledStatement(388, {statementId: '12345'});
const statement = await client.request(command);
// statement.data is a Blob containing the file
// statement.fileName contains the extracted filename (if available)
// statement.contentType contains the MIME type (if available)

Released under the MIT License.