Skip to content

@mbanq/core-sdk-js v0.50.0


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

Function: UpdateLoanProduct()

UpdateLoanProduct(loanProductId, data): Command<{ data: objectOutputType; loanProductId: number; }, { id: number; resourceId: number; }>

Defined in: src/commands/rest/loanProduct.ts:76

Updates an existing loan product.

Parameters

loanProductId

number

The ID of the loan product to update.

data

objectOutputType

The loan product update parameters. All fields are optional.

Returns

Command<{ data: objectOutputType; loanProductId: number; }, { id: number; resourceId: number; }>

A Command that when executed returns the updated loan product's ID and resource ID.

Example

typescript
const updateCmd = UpdateLoanProduct(1, {
  name: "Updated Home Loan",
  description: "An updated home loan product."
});
const result = await updateCmd.execute(config);
console.log(result.resourceId);

Released under the MIT License.