Skip to content

@mbanq/core-sdk-js v0.50.0


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

Function: CreateFixedDepositAccount()

CreateFixedDepositAccount(params): Command<{ params: { charges?: object[]; charts?: object[]; clientId: number; dateFormat: string; depositAmount: string; depositPeriod: string; depositPeriodFrequencyId: number; interestCalculationDaysInYearType?: number; interestCalculationType?: number; interestCompoundingPeriodType?: number; interestPostingPeriodType?: number; isConsent: boolean; locale: string; minDepositTerm?: number; minDepositTermTypeId?: number; minRequiredOpeningBalance?: number; monthDayFormat?: string; nominalAnnualInterestRate?: number; preClosurePenalApplicable?: boolean; productId: number; submittedOnDate: string; transferInterestToSavings?: string | boolean; }; }, { clientId: number; id?: number; officeId: number; resourceId: number; savingsId: number; }>

Defined in: src/commands/rest/fixedDepositAccount.ts:51

Creates a new Fixed Deposit Account for a customer and immediately activates it. This combines the submit, approve, and activate commands in a single operation.

Parameters

params

The fixed deposit account creation parameters (see CreateFixedDepositAccountRequest)

charges?

object[] = ...

Optional list of charges to be applied to the fixed deposit account

charts?

object[] = ...

Optional list of interest rate charts applicable to the fixed deposit

clientId

number = ...

The unique identifier of the client opening the fixed deposit account

dateFormat

string = ...

The date format used in the request

depositAmount

string = ...

The amount to be deposited in the fixed deposit account

depositPeriod

string = ...

The period for the deposit in terms of the frequency type

depositPeriodFrequencyId

number = ...

The frequency type for the deposit period (e.g., Months, Years)

interestCalculationDaysInYearType?

number = ...

Optional number of days considered in a year for interest calculation

interestCalculationType?

number = ...

Optional calculation method for the interest

interestCompoundingPeriodType?

number = ...

Optional compounding period type for interest calculation

interestPostingPeriodType?

number = ...

Optional period type for posting interest to the account

isConsent

boolean = ...

Indicates whether the client has given consent for the fixed deposit

locale

string = ...

The locale used for date and number formatting

minDepositTerm?

number = ...

Optional minimum term for the deposit

minDepositTermTypeId?

number = ...

Optional type of period for the minimum deposit term

minRequiredOpeningBalance?

number = ...

monthDayFormat?

string = ...

Optional format for displaying month and day

nominalAnnualInterestRate?

number = ...

Optional annual nominal interest rate for the fixed deposit account

preClosurePenalApplicable?

boolean = ...

Optional flag indicating if penalty is applicable for pre-closure

productId

number = ...

The ID of the fixed deposit product to use for the account

submittedOnDate

string = ...

The date when the fixed deposit application is submitted

transferInterestToSavings?

string | boolean = ...

Optional flag to transfer interest to a savings account

Returns

Command<{ params: { charges?: object[]; charts?: object[]; clientId: number; dateFormat: string; depositAmount: string; depositPeriod: string; depositPeriodFrequencyId: number; interestCalculationDaysInYearType?: number; interestCalculationType?: number; interestCompoundingPeriodType?: number; interestPostingPeriodType?: number; isConsent: boolean; locale: string; minDepositTerm?: number; minDepositTermTypeId?: number; minRequiredOpeningBalance?: number; monthDayFormat?: string; nominalAnnualInterestRate?: number; preClosurePenalApplicable?: boolean; productId: number; submittedOnDate: string; transferInterestToSavings?: string | boolean; }; }, { clientId: number; id?: number; officeId: number; resourceId: number; savingsId: number; }>

A Command that when executed returns the created fixed deposit account details

Example

typescript
const createFDCmd = CreateFixedDepositAccount({
  productId: 609,
  depositAmount: "1000",
  depositPeriod: "1",
  depositPeriodFrequencyId: 3,
  isConsent: true,
  submittedOnDate: "22 October 2024",
  locale: "en",
  dateFormat: "dd MMMM yyyy",
  clientId: 5162
});
const result = await createFDCmd.execute(config);
console.log(result.savingsId); // The ID of the created fixed deposit account

Released under the MIT License.