5454import org .apache .fineract .client .feign .FineractFeignClient ;
5555import org .apache .fineract .client .feign .services .ExternalAssetOwnerLoanProductAttributesApi ;
5656import org .apache .fineract .client .feign .services .ExternalAssetOwnersApi ;
57+ import org .apache .fineract .client .feign .services .ExternalAssetOwnersApiExtension ;
5758import org .apache .fineract .client .feign .services .LoanProductsApi ;
5859import org .apache .fineract .client .models .CommandProcessingResult ;
5960import org .apache .fineract .client .models .ExternalAssetOwnerRequest ;
@@ -106,6 +107,10 @@ private ExternalAssetOwnersApi externalAssetOwnersApi() {
106107 return fineractFeignClient .externalAssetOwners ();
107108 }
108109
110+ private ExternalAssetOwnersApiExtension externalAssetOwnersApiExtension () {
111+ return fineractFeignClient .externalAssetOwnersExtension ();
112+ }
113+
109114 private LoanProductsApi loanProductsApi () {
110115 return fineractFeignClient .loanProducts ();
111116 }
@@ -823,8 +828,10 @@ public void adminTransactionCommandTheWithType(String command, String type) thro
823828 String transferExternalId = testContext ()
824829 .get (TestContextKey .ASSET_EXTERNALIZATION_TRANSFER_EXTERNAL_ID_USER_GENERATED + "_" + type );
825830
826- PostInitiateTransferResponse response = externalAssetOwnersApi ().transferRequestWithId1 (transferExternalId ,
827- Map .of ("command" , command ));
831+ ExternalAssetOwnerRequest request = new ExternalAssetOwnerRequest ().dateFormat (DATE_FORMAT_ASSET_EXT ).locale (DEFAULT_LOCALE );
832+
833+ PostInitiateTransferResponse response = externalAssetOwnersApiExtension ().transferRequestWithId1WithBody (transferExternalId ,
834+ request , Map .of ("command" , command ));
828835 // ErrorHelper.checkSuccessfulApiCall(response);
829836 }
830837
@@ -833,8 +840,10 @@ public void adminTransactionCommandTheWithTypeThrowError(String command, String
833840 String transferExternalId = testContext ()
834841 .get (TestContextKey .ASSET_EXTERNALIZATION_TRANSFER_EXTERNAL_ID_USER_GENERATED + "_" + type );
835842
843+ ExternalAssetOwnerRequest request = new ExternalAssetOwnerRequest ().dateFormat (DATE_FORMAT_ASSET_EXT ).locale (DEFAULT_LOCALE );
844+
836845 try {
837- externalAssetOwnersApi ().transferRequestWithId1 (transferExternalId , Map .of ("command" , command ));
846+ externalAssetOwnersApiExtension ().transferRequestWithId1WithBody (transferExternalId , request , Map .of ("command" , command ));
838847 throw new AssertionError ("Expected FeignException but request succeeded" );
839848 } catch (FeignException e ) {
840849 ErrorResponse errorResponse = ErrorResponse .fromFeignException (e );
@@ -900,8 +909,10 @@ public void adminSendCommandAndItWillThrowError(String command, String transacti
900909 transferExternalId = testContext ().get (TestContextKey .ASSET_EXTERNALIZATION_SALES_TRANSFER_EXTERNAL_ID_FROM_RESPONSE );
901910 }
902911
912+ ExternalAssetOwnerRequest request = new ExternalAssetOwnerRequest ().dateFormat (DATE_FORMAT_ASSET_EXT ).locale (DEFAULT_LOCALE );
913+
903914 try {
904- externalAssetOwnersApi ().transferRequestWithId1 (transferExternalId , Map .of ("command" , command ));
915+ externalAssetOwnersApiExtension ().transferRequestWithId1WithBody (transferExternalId , request , Map .of ("command" , command ));
905916 throw new AssertionError ("Expected FeignException but request succeeded" );
906917 } catch (FeignException e ) {
907918 ErrorResponse errorResponse = ErrorResponse .fromFeignException (e );
@@ -918,8 +929,10 @@ public void adminSendCommand(String command, String transactionType) throws IOEx
918929 transferExternalId = testContext ().get (TestContextKey .ASSET_EXTERNALIZATION_SALES_TRANSFER_EXTERNAL_ID_FROM_RESPONSE );
919930 }
920931
921- PostInitiateTransferResponse response = externalAssetOwnersApi ().transferRequestWithId1 (transferExternalId ,
922- Map .of ("command" , command ));
932+ ExternalAssetOwnerRequest request = new ExternalAssetOwnerRequest ().dateFormat (DATE_FORMAT_ASSET_EXT ).locale (DEFAULT_LOCALE );
933+
934+ PostInitiateTransferResponse response = externalAssetOwnersApiExtension ().transferRequestWithId1WithBody (transferExternalId ,
935+ request , Map .of ("command" , command ));
923936 // ErrorHelper.checkSuccessfulApiCall(response);
924937 }
925938
0 commit comments