Skip to content

@mbanq/core-sdk-js v0.50.0


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

Function: CreateSecuredCreditAccount()

CreateSecuredCreditAccount(clientId, data): Command<{ clientId: number; data: { cashLimit: number; creditLimit: number; creditProductId: number; currentAccountId: number; dateFormat: string; locale: string; submittedOnDate: string; }; }, { clientId: number; id: number; officeId: number; productId: number; resourceId: number; }>

Defined in: src/commands/rest/creditAccount.ts:610

Creates a new secured credit account for a client with specified credit product, limits, collateral account, and submission details. A secured credit account requires a collateral account (current account) to secure the credit line.

Parameters

clientId

number

The ID of the client who will own the credit account

data

cashLimit

number = ...

creditLimit

number = ...

creditProductId

number = ...

currentAccountId

number = ...

dateFormat

string = ...

locale

string = ...

submittedOnDate

string = ...

Returns

Command<{ clientId: number; data: { cashLimit: number; creditLimit: number; creditProductId: number; currentAccountId: number; dateFormat: string; locale: string; submittedOnDate: string; }; }, { clientId: number; id: number; officeId: number; productId: number; resourceId: number; }>

Command object that executes the API request and returns the created credit account ID

Example

typescript
const command = CreateSecuredCreditAccount(12, {
  creditProductId: 1,
  creditLimit: 50000,
  cashLimit: 10000,
  currentAccountId: 456,
  submittedOnDate: '01 January 2024',
  locale: 'en',
  dateFormat: 'dd MMMM yyyy'
});
const result = await client.request(command);

Released under the MIT License.