FINERACT-1724 fix eom tests
This commit is contained in:
committed by
Arnold Gálovics
parent
983f3d2da0
commit
8f3b114028
+13
-14
@@ -33,7 +33,6 @@ import io.restassured.http.ContentType;
|
|||||||
import io.restassured.specification.RequestSpecification;
|
import io.restassured.specification.RequestSpecification;
|
||||||
import io.restassured.specification.ResponseSpecification;
|
import io.restassured.specification.ResponseSpecification;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@@ -584,10 +583,10 @@ public class BatchApiTest {
|
|||||||
final BatchRequest applyLoanRequest = BatchHelper.applyLoanRequestWithClientId(applyLoanRequestId, clientId, productId);
|
final BatchRequest applyLoanRequest = BatchHelper.applyLoanRequestWithClientId(applyLoanRequestId, clientId, productId);
|
||||||
|
|
||||||
final BatchRequest approveLoanRequest = BatchHelper.transistionLoanStateByExternalId(approveLoanRequestId, applyLoanRequestId,
|
final BatchRequest approveLoanRequest = BatchHelper.transistionLoanStateByExternalId(approveLoanRequestId, applyLoanRequestId,
|
||||||
LocalDate.now(ZoneId.systemDefault()).minusDays(10), "approve");
|
LocalDate.now(Utils.getZoneIdOfTenant()).minusDays(10), "approve");
|
||||||
|
|
||||||
final BatchRequest disburseLoanRequest = BatchHelper.transistionLoanStateByExternalId(disburseLoanRequestId, approveLoanRequestId,
|
final BatchRequest disburseLoanRequest = BatchHelper.transistionLoanStateByExternalId(disburseLoanRequestId, approveLoanRequestId,
|
||||||
LocalDate.now(ZoneId.systemDefault()).minusDays(8), "disburse");
|
LocalDate.now(Utils.getZoneIdOfTenant()).minusDays(8), "disburse");
|
||||||
|
|
||||||
final BatchRequest getLoanRequest = BatchHelper.getLoanByExternalIdRequest(getLoanRequestId, approveLoanRequestId,
|
final BatchRequest getLoanRequest = BatchHelper.getLoanByExternalIdRequest(getLoanRequestId, approveLoanRequestId,
|
||||||
"associations=all");
|
"associations=all");
|
||||||
@@ -1172,7 +1171,7 @@ public class BatchApiTest {
|
|||||||
final BatchRequest approveLoanRequest = BatchHelper.approveLoanRequest(approveLoanRequestId, applyLoanRequestId);
|
final BatchRequest approveLoanRequest = BatchHelper.approveLoanRequest(approveLoanRequestId, applyLoanRequestId);
|
||||||
|
|
||||||
// Create a disbursement request
|
// Create a disbursement request
|
||||||
final LocalDate disburseLoanDate = LocalDate.now(ZoneId.systemDefault()).minusDays(1);
|
final LocalDate disburseLoanDate = LocalDate.now(Utils.getZoneIdOfTenant()).minusDays(1);
|
||||||
final BatchRequest disburseLoanRequest = BatchHelper.disburseLoanRequest(disburseLoanRequestId, approveLoanRequestId,
|
final BatchRequest disburseLoanRequest = BatchHelper.disburseLoanRequest(disburseLoanRequestId, approveLoanRequestId,
|
||||||
disburseLoanDate);
|
disburseLoanDate);
|
||||||
|
|
||||||
@@ -1565,7 +1564,7 @@ public class BatchApiTest {
|
|||||||
|
|
||||||
// Create a disbursement request
|
// Create a disbursement request
|
||||||
final BatchRequest disburseLoanRequest = BatchHelper.disburseLoanRequest(disburseLoanRequestId, approveLoanRequestId,
|
final BatchRequest disburseLoanRequest = BatchHelper.disburseLoanRequest(disburseLoanRequestId, approveLoanRequestId,
|
||||||
LocalDate.now(ZoneId.systemDefault()).minusDays(1));
|
LocalDate.now(Utils.getZoneIdOfTenant()).minusDays(1));
|
||||||
|
|
||||||
// Create a merchant issued refund request
|
// Create a merchant issued refund request
|
||||||
final BatchRequest merchantIssuedRefundRequest = BatchHelper.merchantIssuedRefundRequest(merchantIssuedRefundRequestId,
|
final BatchRequest merchantIssuedRefundRequest = BatchHelper.merchantIssuedRefundRequest(merchantIssuedRefundRequestId,
|
||||||
@@ -1712,7 +1711,7 @@ public class BatchApiTest {
|
|||||||
|
|
||||||
// Create a repayment request by external id
|
// Create a repayment request by external id
|
||||||
final BatchRequest repaymentRequest = BatchHelper.createTransactionRequestByLoanExternalId(repayLoanRequestId,
|
final BatchRequest repaymentRequest = BatchHelper.createTransactionRequestByLoanExternalId(repayLoanRequestId,
|
||||||
getLoanBeforeTxnRequestId, "repayment", "500", LocalDate.now(ZoneId.systemDefault()));
|
getLoanBeforeTxnRequestId, "repayment", "500", LocalDate.now(Utils.getZoneIdOfTenant()));
|
||||||
|
|
||||||
// Get loan transactions request
|
// Get loan transactions request
|
||||||
final BatchRequest getLoanTransactionsRequestAfterTxn = BatchHelper.getLoanByIdRequest(getLoanAfterTxnRequestId, repayLoanRequestId,
|
final BatchRequest getLoanTransactionsRequestAfterTxn = BatchHelper.getLoanByIdRequest(getLoanAfterTxnRequestId, repayLoanRequestId,
|
||||||
@@ -2364,10 +2363,10 @@ public class BatchApiTest {
|
|||||||
final BatchRequest applyLoanRequest = BatchHelper.applyLoanRequestWithClientId(applyLoanRequestId, clientId, productId);
|
final BatchRequest applyLoanRequest = BatchHelper.applyLoanRequestWithClientId(applyLoanRequestId, clientId, productId);
|
||||||
|
|
||||||
final BatchRequest approveLoanRequest = BatchHelper.transistionLoanStateByExternalId(approveLoanRequestId, applyLoanRequestId,
|
final BatchRequest approveLoanRequest = BatchHelper.transistionLoanStateByExternalId(approveLoanRequestId, applyLoanRequestId,
|
||||||
LocalDate.now(ZoneId.systemDefault()).minusDays(10), "approve");
|
LocalDate.now(Utils.getZoneIdOfTenant()).minusDays(10), "approve");
|
||||||
|
|
||||||
final BatchRequest disburseLoanRequest = BatchHelper.transistionLoanStateByExternalId(disburseLoanRequestId, approveLoanRequestId,
|
final BatchRequest disburseLoanRequest = BatchHelper.transistionLoanStateByExternalId(disburseLoanRequestId, approveLoanRequestId,
|
||||||
LocalDate.now(ZoneId.systemDefault()).minusDays(8), "disburse");
|
LocalDate.now(Utils.getZoneIdOfTenant()).minusDays(8), "disburse");
|
||||||
|
|
||||||
final BatchRequest updateLoanRequest = BatchHelper.modifyLoanByExternalIdRequest(updateLoanRequestId, approveLoanRequestId);
|
final BatchRequest updateLoanRequest = BatchHelper.modifyLoanByExternalIdRequest(updateLoanRequestId, approveLoanRequestId);
|
||||||
|
|
||||||
@@ -2430,10 +2429,10 @@ public class BatchApiTest {
|
|||||||
final BatchRequest applyLoanRequest = BatchHelper.applyLoanRequestWithClientId(applyLoanRequestId, clientId, productId);
|
final BatchRequest applyLoanRequest = BatchHelper.applyLoanRequestWithClientId(applyLoanRequestId, clientId, productId);
|
||||||
|
|
||||||
final BatchRequest approveLoanRequest = BatchHelper.transistionLoanStateByExternalId(approveLoanRequestId, applyLoanRequestId,
|
final BatchRequest approveLoanRequest = BatchHelper.transistionLoanStateByExternalId(approveLoanRequestId, applyLoanRequestId,
|
||||||
LocalDate.now(ZoneId.systemDefault()).minusDays(10), "approve");
|
LocalDate.now(Utils.getZoneIdOfTenant()).minusDays(10), "approve");
|
||||||
|
|
||||||
final BatchRequest disburseLoanRequest = BatchHelper.transistionLoanStateByExternalId(disburseLoanRequestId, approveLoanRequestId,
|
final BatchRequest disburseLoanRequest = BatchHelper.transistionLoanStateByExternalId(disburseLoanRequestId, approveLoanRequestId,
|
||||||
LocalDate.now(ZoneId.systemDefault()).minusDays(8), "disburse");
|
LocalDate.now(Utils.getZoneIdOfTenant()).minusDays(8), "disburse");
|
||||||
|
|
||||||
final BatchRequest getLoanRequest = BatchHelper.getLoanByExternalIdRequest(getLoanRequestId, approveLoanRequestId,
|
final BatchRequest getLoanRequest = BatchHelper.getLoanByExternalIdRequest(getLoanRequestId, approveLoanRequestId,
|
||||||
"associations=all");
|
"associations=all");
|
||||||
@@ -2463,7 +2462,7 @@ public class BatchApiTest {
|
|||||||
br.setRequestId(1L);
|
br.setRequestId(1L);
|
||||||
br.setRelativeUrl(String.format("loans/" + loanId + "/transactions?command=repayment"));
|
br.setRelativeUrl(String.format("loans/" + loanId + "/transactions?command=repayment"));
|
||||||
br.setMethod("POST");
|
br.setMethod("POST");
|
||||||
String dateString = LocalDate.now(ZoneId.systemDefault()).format(DateTimeFormatter.ofPattern("dd MMMM yyyy"));
|
String dateString = LocalDate.now(Utils.getZoneIdOfTenant()).format(DateTimeFormatter.ofPattern("dd MMMM yyyy"));
|
||||||
br.setBody(String.format(
|
br.setBody(String.format(
|
||||||
"{\"locale\": \"en\", \"dateFormat\": \"dd MMMM yyyy\", " + "\"transactionDate\": \"%s\", \"transactionAmount\": \"500\"}",
|
"{\"locale\": \"en\", \"dateFormat\": \"dd MMMM yyyy\", " + "\"transactionDate\": \"%s\", \"transactionAmount\": \"500\"}",
|
||||||
dateString));
|
dateString));
|
||||||
@@ -2511,10 +2510,10 @@ public class BatchApiTest {
|
|||||||
final BatchRequest applyLoanRequest = BatchHelper.applyLoanRequestWithClientId(applyLoanRequestId, clientId, productId);
|
final BatchRequest applyLoanRequest = BatchHelper.applyLoanRequestWithClientId(applyLoanRequestId, clientId, productId);
|
||||||
|
|
||||||
final BatchRequest approveLoanRequest = BatchHelper.transistionLoanStateByExternalId(approveLoanRequestId, applyLoanRequestId,
|
final BatchRequest approveLoanRequest = BatchHelper.transistionLoanStateByExternalId(approveLoanRequestId, applyLoanRequestId,
|
||||||
LocalDate.now(ZoneId.systemDefault()).minusDays(10), "approve");
|
LocalDate.now(Utils.getZoneIdOfTenant()).minusDays(10), "approve");
|
||||||
|
|
||||||
final BatchRequest disburseLoanRequest = BatchHelper.transistionLoanStateByExternalId(disburseLoanRequestId, approveLoanRequestId,
|
final BatchRequest disburseLoanRequest = BatchHelper.transistionLoanStateByExternalId(disburseLoanRequestId, approveLoanRequestId,
|
||||||
LocalDate.now(ZoneId.systemDefault()).minusDays(8), "disburse");
|
LocalDate.now(Utils.getZoneIdOfTenant()).minusDays(8), "disburse");
|
||||||
|
|
||||||
final BatchRequest getLoanRequest = BatchHelper.getLoanByExternalIdRequest(getLoanRequestId, approveLoanRequestId,
|
final BatchRequest getLoanRequest = BatchHelper.getLoanByExternalIdRequest(getLoanRequestId, approveLoanRequestId,
|
||||||
"associations=all");
|
"associations=all");
|
||||||
@@ -2544,7 +2543,7 @@ public class BatchApiTest {
|
|||||||
br.setRequestId(1L);
|
br.setRequestId(1L);
|
||||||
br.setRelativeUrl(String.format("v1/loans/" + loanId + "/transactions?command=repayment"));
|
br.setRelativeUrl(String.format("v1/loans/" + loanId + "/transactions?command=repayment"));
|
||||||
br.setMethod("POST");
|
br.setMethod("POST");
|
||||||
String dateString = LocalDate.now(ZoneId.systemDefault()).format(DateTimeFormatter.ofPattern("dd MMMM yyyy"));
|
String dateString = LocalDate.now(Utils.getZoneIdOfTenant()).format(DateTimeFormatter.ofPattern("dd MMMM yyyy"));
|
||||||
br.setBody(String.format(
|
br.setBody(String.format(
|
||||||
"{\"locale\": \"en\", \"dateFormat\": \"dd MMMM yyyy\", " + "\"transactionDate\": \"%s\", \"transactionAmount\": \"500\"}",
|
"{\"locale\": \"en\", \"dateFormat\": \"dd MMMM yyyy\", " + "\"transactionDate\": \"%s\", \"transactionAmount\": \"500\"}",
|
||||||
dateString));
|
dateString));
|
||||||
|
|||||||
+15
-16
@@ -25,7 +25,6 @@ import io.restassured.specification.ResponseSpecification;
|
|||||||
import jakarta.ws.rs.HttpMethod;
|
import jakarta.ws.rs.HttpMethod;
|
||||||
import java.security.SecureRandom;
|
import java.security.SecureRandom;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -244,7 +243,7 @@ public final class BatchHelper {
|
|||||||
*/
|
*/
|
||||||
public static BatchRequest applyLoanRequest(final Long requestId, final Long reference, final Integer productId,
|
public static BatchRequest applyLoanRequest(final Long requestId, final Long reference, final Integer productId,
|
||||||
final Integer clientCollateralId) {
|
final Integer clientCollateralId) {
|
||||||
return applyLoanRequest(requestId, reference, productId, clientCollateralId, LocalDate.now(ZoneId.systemDefault()).minusDays(10),
|
return applyLoanRequest(requestId, reference, productId, clientCollateralId, LocalDate.now(Utils.getZoneIdOfTenant()).minusDays(10),
|
||||||
"10,000.00");
|
"10,000.00");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -629,7 +628,7 @@ public final class BatchHelper {
|
|||||||
* @return BatchRequest the batch request
|
* @return BatchRequest the batch request
|
||||||
*/
|
*/
|
||||||
public static BatchRequest approveLoanRequest(final Long requestId, final Long reference) {
|
public static BatchRequest approveLoanRequest(final Long requestId, final Long reference) {
|
||||||
return approveLoanRequest(requestId, reference, LocalDate.now(ZoneId.systemDefault()).minusDays(10));
|
return approveLoanRequest(requestId, reference, LocalDate.now(Utils.getZoneIdOfTenant()).minusDays(10));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -644,7 +643,7 @@ public final class BatchHelper {
|
|||||||
* @return BatchRequest the batch request
|
* @return BatchRequest the batch request
|
||||||
*/
|
*/
|
||||||
public static BatchRequest approveLoanWrongRequest(final Long requestId, final Long reference) {
|
public static BatchRequest approveLoanWrongRequest(final Long requestId, final Long reference) {
|
||||||
return approveLoanWrongRequest(requestId, reference, LocalDate.now(ZoneId.systemDefault()).minusDays(10));
|
return approveLoanWrongRequest(requestId, reference, LocalDate.now(Utils.getZoneIdOfTenant()).minusDays(10));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -700,7 +699,7 @@ public final class BatchHelper {
|
|||||||
* @return BatchRequest the batch request
|
* @return BatchRequest the batch request
|
||||||
*/
|
*/
|
||||||
public static BatchRequest disburseLoanRequest(final Long requestId, final Long reference) {
|
public static BatchRequest disburseLoanRequest(final Long requestId, final Long reference) {
|
||||||
return disburseLoanRequest(requestId, reference, LocalDate.now(ZoneId.systemDefault()).minusDays(8));
|
return disburseLoanRequest(requestId, reference, LocalDate.now(Utils.getZoneIdOfTenant()).minusDays(8));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -776,7 +775,7 @@ public final class BatchHelper {
|
|||||||
* @return BatchRequest the batch request
|
* @return BatchRequest the batch request
|
||||||
*/
|
*/
|
||||||
public static BatchRequest repayLoanRequest(final Long requestId, final Long reference, final String amount) {
|
public static BatchRequest repayLoanRequest(final Long requestId, final Long reference, final String amount) {
|
||||||
return createTransactionRequest(requestId, reference, "repayment", amount, LocalDate.now(ZoneId.systemDefault()));
|
return createTransactionRequest(requestId, reference, "repayment", amount, LocalDate.now(Utils.getZoneIdOfTenant()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static BatchRequest repayLoanRequestWithGivenLoanId(final Long requestId, final Integer loanId, final String amount,
|
public static BatchRequest repayLoanRequestWithGivenLoanId(final Long requestId, final Integer loanId, final String amount,
|
||||||
@@ -886,7 +885,7 @@ public final class BatchHelper {
|
|||||||
* @return BatchRequest the created {@link BatchRequest}
|
* @return BatchRequest the created {@link BatchRequest}
|
||||||
*/
|
*/
|
||||||
public static BatchRequest creditBalanceRefundRequest(final Long requestId, final Long reference, final String amount) {
|
public static BatchRequest creditBalanceRefundRequest(final Long requestId, final Long reference, final String amount) {
|
||||||
return createTransactionRequest(requestId, reference, "creditBalanceRefund", amount, LocalDate.now(ZoneId.systemDefault()));
|
return createTransactionRequest(requestId, reference, "creditBalanceRefund", amount, LocalDate.now(Utils.getZoneIdOfTenant()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -903,7 +902,7 @@ public final class BatchHelper {
|
|||||||
* @return BatchRequest the created {@link BatchRequest}
|
* @return BatchRequest the created {@link BatchRequest}
|
||||||
*/
|
*/
|
||||||
public static BatchRequest goodwillCreditRequest(final Long requestId, final Long reference, final String amount) {
|
public static BatchRequest goodwillCreditRequest(final Long requestId, final Long reference, final String amount) {
|
||||||
return createTransactionRequest(requestId, reference, "goodwillCredit", amount, LocalDate.now(ZoneId.systemDefault()));
|
return createTransactionRequest(requestId, reference, "goodwillCredit", amount, LocalDate.now(Utils.getZoneIdOfTenant()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -920,7 +919,7 @@ public final class BatchHelper {
|
|||||||
* @return BatchRequest the created {@link BatchRequest}
|
* @return BatchRequest the created {@link BatchRequest}
|
||||||
*/
|
*/
|
||||||
public static BatchRequest merchantIssuedRefundRequest(final Long requestId, final Long reference, final String amount) {
|
public static BatchRequest merchantIssuedRefundRequest(final Long requestId, final Long reference, final String amount) {
|
||||||
return createTransactionRequest(requestId, reference, "merchantIssuedRefund", amount, LocalDate.now(ZoneId.systemDefault()));
|
return createTransactionRequest(requestId, reference, "merchantIssuedRefund", amount, LocalDate.now(Utils.getZoneIdOfTenant()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -937,7 +936,7 @@ public final class BatchHelper {
|
|||||||
* @return BatchRequest the created {@link BatchRequest}
|
* @return BatchRequest the created {@link BatchRequest}
|
||||||
*/
|
*/
|
||||||
public static BatchRequest payoutRefundRequest(final Long requestId, final Long reference, final String amount) {
|
public static BatchRequest payoutRefundRequest(final Long requestId, final Long reference, final String amount) {
|
||||||
return createTransactionRequest(requestId, reference, "payoutRefund", amount, LocalDate.now(ZoneId.systemDefault()));
|
return createTransactionRequest(requestId, reference, "payoutRefund", amount, LocalDate.now(Utils.getZoneIdOfTenant()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -965,8 +964,8 @@ public final class BatchHelper {
|
|||||||
br.setReference(reference);
|
br.setReference(reference);
|
||||||
br.setRelativeUrl("v1/rescheduleloans");
|
br.setRelativeUrl("v1/rescheduleloans");
|
||||||
br.setMethod("POST");
|
br.setMethod("POST");
|
||||||
final LocalDate today = LocalDate.now(ZoneId.systemDefault());
|
final LocalDate today = LocalDate.now(Utils.getZoneIdOfTenant());
|
||||||
final LocalDate adjustedDueDate = LocalDate.now(ZoneId.systemDefault()).plusDays(40);
|
final LocalDate adjustedDueDate = LocalDate.now(Utils.getZoneIdOfTenant()).plusDays(40);
|
||||||
final String submittedOnDate = today.format(DateTimeFormatter.ofPattern("dd MMMM yyyy"));
|
final String submittedOnDate = today.format(DateTimeFormatter.ofPattern("dd MMMM yyyy"));
|
||||||
final String rescheduleFromDateString = rescheduleFromDate.format(DateTimeFormatter.ofPattern("dd MMMM yyyy"));
|
final String rescheduleFromDateString = rescheduleFromDate.format(DateTimeFormatter.ofPattern("dd MMMM yyyy"));
|
||||||
final String adjustedDueDateString = adjustedDueDate.format(DateTimeFormatter.ofPattern("dd MMMM yyyy"));
|
final String adjustedDueDateString = adjustedDueDate.format(DateTimeFormatter.ofPattern("dd MMMM yyyy"));
|
||||||
@@ -995,7 +994,7 @@ public final class BatchHelper {
|
|||||||
br.setReference(reference);
|
br.setReference(reference);
|
||||||
br.setRelativeUrl("v1/rescheduleloans/$.resourceId?command=approve");
|
br.setRelativeUrl("v1/rescheduleloans/$.resourceId?command=approve");
|
||||||
br.setMethod("POST");
|
br.setMethod("POST");
|
||||||
final LocalDate approvedOnDate = LocalDate.now(ZoneId.systemDefault());
|
final LocalDate approvedOnDate = LocalDate.now(Utils.getZoneIdOfTenant());
|
||||||
final String approvedOnDateString = approvedOnDate.format(DateTimeFormatter.ofPattern("dd MMMM yyyy"));
|
final String approvedOnDateString = approvedOnDate.format(DateTimeFormatter.ofPattern("dd MMMM yyyy"));
|
||||||
br.setBody(String.format("{\"locale\": \"en\", \"dateFormat\": \"dd MMMM yyyy\", " + "\"approvedOnDate\": \"%s\"}",
|
br.setBody(String.format("{\"locale\": \"en\", \"dateFormat\": \"dd MMMM yyyy\", " + "\"approvedOnDate\": \"%s\"}",
|
||||||
approvedOnDateString));
|
approvedOnDateString));
|
||||||
@@ -1564,7 +1563,7 @@ public final class BatchHelper {
|
|||||||
* @return BatchRequest the created {@link BatchRequest}
|
* @return BatchRequest the created {@link BatchRequest}
|
||||||
*/
|
*/
|
||||||
public static BatchRequest depositSavingAccount(final Long requestId, final Long reference, final float amount) {
|
public static BatchRequest depositSavingAccount(final Long requestId, final Long reference, final float amount) {
|
||||||
final LocalDate transactionDate = LocalDate.now(ZoneId.systemDefault());
|
final LocalDate transactionDate = LocalDate.now(Utils.getZoneIdOfTenant());
|
||||||
final String transactionDateString = transactionDate.format(DateTimeFormatter.ofPattern("dd MMMM yyyy"));
|
final String transactionDateString = transactionDate.format(DateTimeFormatter.ofPattern("dd MMMM yyyy"));
|
||||||
String json = String.format(
|
String json = String.format(
|
||||||
"{\"locale\": \"en\", \"dateFormat\": \"dd MMMM yyyy\", "
|
"{\"locale\": \"en\", \"dateFormat\": \"dd MMMM yyyy\", "
|
||||||
@@ -1586,7 +1585,7 @@ public final class BatchHelper {
|
|||||||
* @return BatchRequest the created {@link BatchRequest}
|
* @return BatchRequest the created {@link BatchRequest}
|
||||||
*/
|
*/
|
||||||
public static BatchRequest withdrawSavingAccount(final Long requestId, final Long reference, final float amount) {
|
public static BatchRequest withdrawSavingAccount(final Long requestId, final Long reference, final float amount) {
|
||||||
final LocalDate transactionDate = LocalDate.now(ZoneId.systemDefault());
|
final LocalDate transactionDate = LocalDate.now(Utils.getZoneIdOfTenant());
|
||||||
final String transactionDateString = transactionDate.format(DateTimeFormatter.ofPattern("dd MMMM yyyy"));
|
final String transactionDateString = transactionDate.format(DateTimeFormatter.ofPattern("dd MMMM yyyy"));
|
||||||
String json = String.format(
|
String json = String.format(
|
||||||
"{\"locale\": \"en\", \"dateFormat\": \"dd MMMM yyyy\", "
|
"{\"locale\": \"en\", \"dateFormat\": \"dd MMMM yyyy\", "
|
||||||
@@ -1645,7 +1644,7 @@ public final class BatchHelper {
|
|||||||
br.setReference(reference);
|
br.setReference(reference);
|
||||||
br.setRelativeUrl("v1/savingsaccounts/$.id/transactions?command=holdAmount");
|
br.setRelativeUrl("v1/savingsaccounts/$.id/transactions?command=holdAmount");
|
||||||
br.setMethod(HttpMethod.POST);
|
br.setMethod(HttpMethod.POST);
|
||||||
final LocalDate transactionDate = LocalDate.now(ZoneId.systemDefault());
|
final LocalDate transactionDate = LocalDate.now(Utils.getZoneIdOfTenant());
|
||||||
final String transactionDateString = transactionDate.format(DateTimeFormatter.ofPattern("dd MMMM yyyy"));
|
final String transactionDateString = transactionDate.format(DateTimeFormatter.ofPattern("dd MMMM yyyy"));
|
||||||
br.setBody(String.format(
|
br.setBody(String.format(
|
||||||
"{\"locale\": \"en\", \"dateFormat\": \"dd MMMM yyyy\", "
|
"{\"locale\": \"en\", \"dateFormat\": \"dd MMMM yyyy\", "
|
||||||
|
|||||||
Reference in New Issue
Block a user