Skip to content

@mbanq/core-sdk-js v0.50.0


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

Function: UpdateAccount()

UpdateAccount(accountId, data): Command<{ accountId: number; data: { allowOverdraft: boolean; charges: any[]; clientId: number; dateFormat: string; enforceMinRequiredBalance: boolean; fieldOfficerId: number; interestCalculationDaysInYearType: number; interestCalculationType: number; interestCompoundingPeriodType: number; interestPostingPeriodType: number; locale: string; lockinPeriodFrequency: string; lockinPeriodFrequencyType: number; minOverdraftForInterestCalculation: number; minRequiredBalance: number; minRequiredOpeningBalance: string; monthDayFormat: string; nominalAnnualInterestRate: string; overdraftLimit: number; productId: number; submittedOnDate: string; withdrawalFeeForTransfers: boolean; withHoldTax: boolean; }; }, any>

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

Updates an existing savings account with new details.

Parameters

accountId

number

The ID of the account to update

data

allowOverdraft

boolean = ...

charges

any[] = ...

clientId

number = ...

dateFormat

string = ...

enforceMinRequiredBalance

boolean = ...

fieldOfficerId

number = ...

interestCalculationDaysInYearType

number = ...

interestCalculationType

number = ...

interestCompoundingPeriodType

number = ...

interestPostingPeriodType

number = ...

locale

string = ...

lockinPeriodFrequency

string = ...

lockinPeriodFrequencyType

number = ...

minOverdraftForInterestCalculation

number = ...

minRequiredBalance

number = ...

minRequiredOpeningBalance

string = ...

monthDayFormat

string = ...

nominalAnnualInterestRate

string = ...

overdraftLimit

number = ...

productId

number = ...

submittedOnDate

string = ...

withdrawalFeeForTransfers

boolean = ...

withHoldTax

boolean = ...

Returns

Command<{ accountId: number; data: { allowOverdraft: boolean; charges: any[]; clientId: number; dateFormat: string; enforceMinRequiredBalance: boolean; fieldOfficerId: number; interestCalculationDaysInYearType: number; interestCalculationType: number; interestCompoundingPeriodType: number; interestPostingPeriodType: number; locale: string; lockinPeriodFrequency: string; lockinPeriodFrequencyType: number; minOverdraftForInterestCalculation: number; minRequiredBalance: number; minRequiredOpeningBalance: string; monthDayFormat: string; nominalAnnualInterestRate: string; overdraftLimit: number; productId: number; submittedOnDate: string; withdrawalFeeForTransfers: boolean; withHoldTax: boolean; }; }, any>

A Command that when executed returns the update response

Example

typescript
const updateCmd = UpdateAccount(
  123,
  {
    clientId: 1,
    productId: 2,
    submittedOnDate: "01 December 2025",
    nominalAnnualInterestRate: "5.5",
    locale: "en",
    dateFormat: "dd MMMM yyyy"
  }
);
const result = await updateCmd.execute(config);

Released under the MIT License.