Skip to content

@mbanq/core-sdk-js v0.50.0


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

Function: ScheduleAccountClosure()

ScheduleAccountClosure(accountId, data): Command<{ accountId: number; data: { closedOnDate?: string; closeReasonCodeId: number; dateFormat?: string; ignoreNegativeBalance?: boolean; locale?: string; paymentTypeId?: number; postInterestValidationOnClosure?: boolean; withdrawBalance?: boolean; }; }, { changes: { closedOnDate: string; closeReason: { codeName: string; id: number; name: string; }; dateFormat: string; locale: string; status: string; }; clientId: number; officeId: number; resourceId: number; savingsId: number; }>

Defined in: src/commands/rest/account.ts:326

Schedules the closure of a savings account.

Parameters

accountId

number

The ID of the savings account to schedule for closure

data

closedOnDate?

string = ...

closeReasonCodeId

number = ...

dateFormat?

string = ...

ignoreNegativeBalance?

boolean = ...

locale?

string = ...

paymentTypeId?

number = ...

postInterestValidationOnClosure?

boolean = ...

withdrawBalance?

boolean = ...

Returns

Command<{ accountId: number; data: { closedOnDate?: string; closeReasonCodeId: number; dateFormat?: string; ignoreNegativeBalance?: boolean; locale?: string; paymentTypeId?: number; postInterestValidationOnClosure?: boolean; withdrawBalance?: boolean; }; }, { changes: { closedOnDate: string; closeReason: { codeName: string; id: number; name: string; }; dateFormat: string; locale: string; status: string; }; clientId: number; officeId: number; resourceId: number; savingsId: number; }>

A Command that when executed returns the schedule closure confirmation

Example

typescript
const scheduleCloseCmd = ScheduleAccountClosure(
  5100,
  {
    closedOnDate: "01 April 2025",
    dateFormat: "dd MMMM yyyy",
    locale: "en",
    withdrawBalance: false,
    postInterestValidationOnClosure: true,
    ignoreNegativeBalance: false,
    closeReasonCodeId: 5100
  }
);
const result = await scheduleCloseCmd.execute(config);

Released under the MIT License.