Skip to content

[FINERACT-1926] Loan account transfer POST API fixes#3201

Merged
adamsaghy merged 1 commit intoapache:developfrom
taskain7:asset-externalization-post-api
May 25, 2023
Merged

[FINERACT-1926] Loan account transfer POST API fixes#3201
adamsaghy merged 1 commit intoapache:developfrom
taskain7:asset-externalization-post-api

Conversation

@taskain7
Copy link
Copy Markdown
Contributor

@taskain7 taskain7 commented May 25, 2023

Description

Fix for initiating transfer on loan that is not in active status.
Additional validations.
Newly created owner id is saaved for transaction.

@taskain7 taskain7 force-pushed the asset-externalization-post-api branch from 7f8d249 to 208a66f Compare May 25, 2023 08:02
Copy link
Copy Markdown
Contributor

@adamsaghy adamsaghy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@taskain7 taskain7 force-pushed the asset-externalization-post-api branch 3 times, most recently from c32dbba to cdafb51 Compare May 25, 2023 09:57
@taskain7 taskain7 changed the title [FINERACT-1926] Initiate transfer on not active loan fix [FINERACT-1926] Loan account transfer POST API fixes May 25, 2023
@taskain7 taskain7 force-pushed the asset-externalization-post-api branch from cdafb51 to 77b0d17 Compare May 25, 2023 10:43
final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors).resource("loantransfer");
final JsonElement json = fromApiJsonHelper.parse(apiRequestBodyAsJson);

String ownerExternalId = fromApiJsonHelper.extractStringNamed(ExternalTransferRequestParameters.OWNER_EXTERNAL_ID, json);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required only for SALE.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based on the design doc, it's also in the request for buyback.

baseDataValidator.reset().parameter(ExternalTransferRequestParameters.TRANSFER_EXTERNAL_ID).value(transferExternalId).ignoreIfNull()
.notExceedingLengthOf(100);

String purchasePriceRatio = fromApiJsonHelper.extractStringNamed(ExternalTransferRequestParameters.PURCHASE_PRICE_RATIO, json);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required only for SALE.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based on the design doc, it's also in the request for buyback.

@adamsaghy adamsaghy merged commit 105b4ed into apache:develop May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants