@mbanq/core-sdk-js / commands / UpdateFixedDepositAccount
Function: UpdateFixedDepositAccount()
UpdateFixedDepositAccount(
accountId,params):Command<{accountId:number;params: {charges?:object[];charts?:object[];clientId:number;dateFormat:string;depositAmount?:string|number;depositPeriod:number;depositPeriodFrequencyId:number;interestCalculationDaysInYearType?:number;interestCalculationType?:number;interestCompoundingPeriodType?:number;interestPostingPeriodType?:number;locale:string;minDepositTerm?:number;minDepositTermTypeId?:number;monthDayFormat?:string;nominalAnnualInterestRate?:number;preClosurePenalApplicable?:boolean;productId:number;submittedOnDate:string;transferInterestToSavings?:string|boolean;withHoldTax?:boolean; }; }, {changes?: {charges?:object[];charts?:object[];dateFormat?:string;depositAmount?:string|number;depositPeriod?:number;depositPeriodFrequencyId?:number;interestCalculationDaysInYearType?:number;interestCalculationType?:number;interestCompoundingPeriodType?:number;interestPostingPeriodType?:number;locale?:string;minDepositTerm?:number;minDepositTermTypeId?:number;monthDayFormat?:string;nominalAnnualInterestRate?:number;preClosurePenalApplicable?:boolean;submittedOnDate?:string;transferInterestToSavings?:string|boolean;withHoldTax?:boolean; };clientId:number;id:string;officeId:number;resourceId:string;savingsId:string; }>
Defined in: src/commands/rest/fixedDepositAccount.ts:173
Updates an existing Fixed Deposit Account.
This API allows you to modify the details and deposit parameters of an existing Fixed Deposit Account. You can update interest rates, deposit amounts, charges, and other account settings.
Parameters
accountId
number
The ID of the fixed deposit account to update
params
The update parameters
charges?
object[] = ...
Optional list of charges associated with the account
charts?
object[] = ...
Optional list of interest rate charts
clientId
number = ...
The unique identifier of the client
dateFormat
string = ...
The date format used in the request
depositAmount?
string | number = ...
The amount to be deposited
depositPeriod
number = ...
The duration of the deposit period
depositPeriodFrequencyId
number = ...
The frequency identifier for the deposit period
interestCalculationDaysInYearType?
number = ...
Optional number of days in year for interest calculation
interestCalculationType?
number = ...
Optional type of interest calculation method
interestCompoundingPeriodType?
number = ...
Optional type of interest compounding period
interestPostingPeriodType?
number = ...
Optional type of interest posting period
locale
string = ...
The locale setting for formatting dates and numbers
minDepositTerm?
number = ...
Optional minimum deposit term
minDepositTermTypeId?
number = ...
Optional identifier for minimum deposit term type
monthDayFormat?
string = ...
Optional format for month and day
nominalAnnualInterestRate?
number = ...
Optional annual nominal interest rate
preClosurePenalApplicable?
boolean = ...
Optional flag for pre-closure penalty
productId
number = ...
The ID of the product associated with the account
submittedOnDate
string = ...
The date the update request was submitted
transferInterestToSavings?
string | boolean = ...
Optional flag to transfer interest to savings
withHoldTax?
boolean = ...
Optional flag indicating whether to withhold tax
Returns
Command<{ accountId: number; params: { charges?: object[]; charts?: object[]; clientId: number; dateFormat: string; depositAmount?: string | number; depositPeriod: number; depositPeriodFrequencyId: number; interestCalculationDaysInYearType?: number; interestCalculationType?: number; interestCompoundingPeriodType?: number; interestPostingPeriodType?: number; locale: string; minDepositTerm?: number; minDepositTermTypeId?: number; monthDayFormat?: string; nominalAnnualInterestRate?: number; preClosurePenalApplicable?: boolean; productId: number; submittedOnDate: string; transferInterestToSavings?: string | boolean; withHoldTax?: boolean; }; }, { changes?: { charges?: object[]; charts?: object[]; dateFormat?: string; depositAmount?: string | number; depositPeriod?: number; depositPeriodFrequencyId?: number; interestCalculationDaysInYearType?: number; interestCalculationType?: number; interestCompoundingPeriodType?: number; interestPostingPeriodType?: number; locale?: string; minDepositTerm?: number; minDepositTermTypeId?: number; monthDayFormat?: string; nominalAnnualInterestRate?: number; preClosurePenalApplicable?: boolean; submittedOnDate?: string; transferInterestToSavings?: string | boolean; withHoldTax?: boolean; }; clientId: number; id: string; officeId: number; resourceId: string; savingsId: string; }>
A Command that when executed returns the update response with changes
Example
const updateFDCmd = UpdateFixedDepositAccount(13400, {
clientId: 5162,
productId: 609,
submittedOnDate: "22 October 2024",
nominalAnnualInterestRate: 2,
depositAmount: "10001",
depositPeriod: 1,
withHoldTax: false,
interestCompoundingPeriodType: 4,
interestPostingPeriodType: 7,
interestCalculationType: 2,
depositPeriodFrequencyId: 3,
locale: "en",
dateFormat: "dd MMMM yyyy"
});
const result = await updateFDCmd.execute(config);
console.log('Updated account:', result.savingsId);