Skip to content

@mbanq/core-sdk-js v0.50.0


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

Function: AddChargeToAccount()

AddChargeToAccount(accountId, data): Command<{ accountId: number; data: { amount: number; chargeId: number; dateFormat?: string; dueDate?: string; feeInterval?: number; feeOnMonthDay?: string; locale: string; maxCap?: number; minCap?: number; monthDayFormat?: string; }; }, { clientId: number; id: number; officeId: number; resourceId: number; savingsId: number; }>

Defined in: src/commands/rest/charge.ts:34

Add a charge to a savings account

This endpoint allows adding an existing charge to a specified savings account. It is typically used to apply fees, penalties, or other charges to an account.

Parameters

accountId

number

The ID of the savings account

data

The charge parameters

amount

number = ...

chargeId

number = ...

dateFormat?

string = ...

dueDate?

string = ...

feeInterval?

number = ...

feeOnMonthDay?

string = ...

locale

string = ...

maxCap?

number = ...

minCap?

number = ...

monthDayFormat?

string = ...

Returns

Command<{ accountId: number; data: { amount: number; chargeId: number; dateFormat?: string; dueDate?: string; feeInterval?: number; feeOnMonthDay?: string; locale: string; maxCap?: number; minCap?: number; monthDayFormat?: string; }; }, { clientId: number; id: number; officeId: number; resourceId: number; savingsId: number; }>

Command object for adding a charge to an account

Example

typescript
import { AddChargeToAccount } from '@mbanq/core-sdk';

const command = AddChargeToAccount(10422, {
  chargeId: 104,
  amount: 20,
  dueDate: '01 January 2024',
  dateFormat: 'dd MMMM yyyy',
  locale: 'en'
});

const result = await client.request(command);
console.log(result.resourceId); // 0
console.log(result.savingsId); // 0

Released under the MIT License.