@mbanq/core-sdk-js / commands / BlockAccount
Function: BlockAccount()
BlockAccount(
accountId,data):Command<{accountId:number;data: {blockReasonCodeId:number; }; }, {changes: {blockReason: {codeName:string;id:number;name:string; };subStatus: {block:boolean;blockCredit:boolean;blockDebit:boolean;code:string;dormant:boolean;escheat:boolean;id:number;inactive:boolean;none:boolean;value:string; }; };clientId:number;id:number;officeId:number;resourceId:number;savingsId:number; }>
Defined in: src/commands/rest/account.ts:371
Blocks a savings account.
Parameters
accountId
number
The ID of the savings account to block
data
blockReasonCodeId
number = ...
Returns
Command<{ accountId: number; data: { blockReasonCodeId: number; }; }, { changes: { blockReason: { codeName: string; id: number; name: string; }; subStatus: { block: boolean; blockCredit: boolean; blockDebit: boolean; code: string; dormant: boolean; escheat: boolean; id: number; inactive: boolean; none: boolean; value: string; }; }; clientId: number; id: number; officeId: number; resourceId: number; savingsId: number; }>
A Command that when executed returns the block confirmation
Example
const blockCmd = BlockAccount(
123,
{ blockReasonCodeId: 5100 }
);
const result = await blockCmd.execute(config);
console.log(result.changes.subStatus.value); // "Block"