Skip to content

@mbanq/core-sdk-js v0.50.0


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

Function: GetAccount()

GetAccount(accountId): Command<{ accountId: number; }, { accountNo: string; allowOverdraft: boolean; allowPrepaidCard: boolean; bankDetails: { address: string; city: string; name: string; postcode: string; routingNumber: string; swiftCode: string; }; cardRestricted: boolean; clientId: number; clientName: string; currency: { code: string; currencyCodeInDigit?: number; decimalPlaces: number; displayLabel: string; displaySymbol: string; inMultiplesOf: number; isBaseCurrency?: boolean; name: string; nameCode: string; }; currentFloatingInterestPeriod?: { fromDate?: number[]; interestRate?: number; isDifferentialToBLR?: boolean; }; depositType: { code: string; id: number; value: string; }; enforceMinRequiredBalance: boolean; fieldOfficerId: number; floatingRateDifferential?: number; floatingRateId: number; floatingRateName?: string; id: number; interestCalculationDaysInYearType: { code: string; id: number; value: string; }; interestCalculationType: { code: string; id: number; value: string; }; interestCompoundingPeriodType: { code: string; id: number; value: string; }; interestPostingPeriodType: { code: string; id: number; value: string; }; interestRateDifferential: number; isBaseLendingRate: boolean; isDormancyTrackingActive: boolean; isFloatingInterestRateCalculationAllowed: boolean; isLinkedToFloatingInterestRates: boolean; lastActiveTransactionDate: number[]; lockinPeriodFrequency?: number; lockinPeriodFrequencyType?: { code: string; id: number; value: string; }; minBalanceForInterestCalculation: number; minOverdraftForInterestCalculation: number; minRequiredBalance: number; nominalAnnualInterestRate: number; onHoldFunds: number; overdraftInterestRateDifferential: number; overdraftLimit: number; overdraftMinimumDue: number; parentAccount: { allowOverdraft: boolean; allowPrepaidCard: boolean; cardRestricted: boolean; enforceMinRequiredBalance: boolean; isBaseLendingRate: boolean; isDormancyTrackingActive: boolean; isLinkedToFloatingInterestRates: boolean; prepaidAccount: boolean; skipCollectTransferCharge: boolean; withdrawalFeeForTransfers: boolean; withHoldTax: boolean; }; prepaidAccount: boolean; prepaidLimitAmount: number; savingsAmountOnHold: number; savingsProductId: number; savingsProductName: string; skipCollectTransferCharge: boolean; status: { active: boolean; approved: boolean; closed: boolean; code: string; id: number; matured: boolean; prematureClosed: boolean; rejected: boolean; submittedAndPendingApproval: boolean; transferInProgress: boolean; transferOnHold: boolean; value: string; withdrawnByApplicant: boolean; }; subStatus: { block: boolean; blockCredit: boolean; blockDebit: boolean; code: string; dormant: boolean; escheat: boolean; id: number; inactive: boolean; none: boolean; value: string; }; summary: { accountBalance: number; availableBalance: number; currency: { code: string; currencyCodeInDigit?: number; decimalPlaces: number; displayLabel: string; displaySymbol: string; inMultiplesOf: number; isBaseCurrency?: boolean; name: string; nameCode: string; }; interestNotPosted: number; lastInterestCalculationDate?: number[]; totalDeposits: number; totalInterestEarned: number; totalInterestPosted: number; totalOverdraftInterestDerived: number; }; timeline: { activatedByFirstname?: string; activatedByLastname?: string; activatedByUsername?: string; activatedOnDate?: number[]; approvedByFirstname?: string; approvedByLastname?: string; approvedByUsername?: string; approvedOnDate?: number[]; submittedByFirstname: string; submittedByLastname: string; submittedByUsername: string; submittedOnDate: number[]; }; withdrawalFeeForTransfers: boolean; withHoldTax: boolean; }>

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

Retrieves detailed information about a specific savings account.

Parameters

accountId

number

The ID of the savings account to retrieve

Returns

Command<{ accountId: number; }, { accountNo: string; allowOverdraft: boolean; allowPrepaidCard: boolean; bankDetails: { address: string; city: string; name: string; postcode: string; routingNumber: string; swiftCode: string; }; cardRestricted: boolean; clientId: number; clientName: string; currency: { code: string; currencyCodeInDigit?: number; decimalPlaces: number; displayLabel: string; displaySymbol: string; inMultiplesOf: number; isBaseCurrency?: boolean; name: string; nameCode: string; }; currentFloatingInterestPeriod?: { fromDate?: number[]; interestRate?: number; isDifferentialToBLR?: boolean; }; depositType: { code: string; id: number; value: string; }; enforceMinRequiredBalance: boolean; fieldOfficerId: number; floatingRateDifferential?: number; floatingRateId: number; floatingRateName?: string; id: number; interestCalculationDaysInYearType: { code: string; id: number; value: string; }; interestCalculationType: { code: string; id: number; value: string; }; interestCompoundingPeriodType: { code: string; id: number; value: string; }; interestPostingPeriodType: { code: string; id: number; value: string; }; interestRateDifferential: number; isBaseLendingRate: boolean; isDormancyTrackingActive: boolean; isFloatingInterestRateCalculationAllowed: boolean; isLinkedToFloatingInterestRates: boolean; lastActiveTransactionDate: number[]; lockinPeriodFrequency?: number; lockinPeriodFrequencyType?: { code: string; id: number; value: string; }; minBalanceForInterestCalculation: number; minOverdraftForInterestCalculation: number; minRequiredBalance: number; nominalAnnualInterestRate: number; onHoldFunds: number; overdraftInterestRateDifferential: number; overdraftLimit: number; overdraftMinimumDue: number; parentAccount: { allowOverdraft: boolean; allowPrepaidCard: boolean; cardRestricted: boolean; enforceMinRequiredBalance: boolean; isBaseLendingRate: boolean; isDormancyTrackingActive: boolean; isLinkedToFloatingInterestRates: boolean; prepaidAccount: boolean; skipCollectTransferCharge: boolean; withdrawalFeeForTransfers: boolean; withHoldTax: boolean; }; prepaidAccount: boolean; prepaidLimitAmount: number; savingsAmountOnHold: number; savingsProductId: number; savingsProductName: string; skipCollectTransferCharge: boolean; status: { active: boolean; approved: boolean; closed: boolean; code: string; id: number; matured: boolean; prematureClosed: boolean; rejected: boolean; submittedAndPendingApproval: boolean; transferInProgress: boolean; transferOnHold: boolean; value: string; withdrawnByApplicant: boolean; }; subStatus: { block: boolean; blockCredit: boolean; blockDebit: boolean; code: string; dormant: boolean; escheat: boolean; id: number; inactive: boolean; none: boolean; value: string; }; summary: { accountBalance: number; availableBalance: number; currency: { code: string; currencyCodeInDigit?: number; decimalPlaces: number; displayLabel: string; displaySymbol: string; inMultiplesOf: number; isBaseCurrency?: boolean; name: string; nameCode: string; }; interestNotPosted: number; lastInterestCalculationDate?: number[]; totalDeposits: number; totalInterestEarned: number; totalInterestPosted: number; totalOverdraftInterestDerived: number; }; timeline: { activatedByFirstname?: string; activatedByLastname?: string; activatedByUsername?: string; activatedOnDate?: number[]; approvedByFirstname?: string; approvedByLastname?: string; approvedByUsername?: string; approvedOnDate?: number[]; submittedByFirstname: string; submittedByLastname: string; submittedByUsername: string; submittedOnDate: number[]; }; withdrawalFeeForTransfers: boolean; withHoldTax: boolean; }>

A Command that when executed returns the full GetAccountResponse details

Example

typescript
const getAccountCmd = GetAccount(123);
const account = await getAccountCmd.execute(config);
console.log(account.accountNo, account.accountBalance);

Released under the MIT License.