adamsaghy commented on code in PR #3973: URL: https://github.com/apache/fineract/pull/3973#discussion_r1679190370
########## integration-tests/src/test/java/org/apache/fineract/integrationtests/common/savings/SavingsAccountHelper.java: ########## @@ -989,4 +996,37 @@ public HashMap getTransactionDetails(Integer savingsId, Integer transactionId) { return Utils.performServerGet(requestSpec, responseSpec, url, ""); } + public PostSavingsAccountsResponse createSavingsAccount(PostSavingsAccountsRequest request) { + return ok(fineract().savingsAccounts.submitApplication2(request)); + } + + public PostSavingsAccountsAccountIdResponse approveSavingsAccount(Long savingsAccountId, String approvedOnDate) { + PostSavingsAccountsAccountIdRequest request = new PostSavingsAccountsAccountIdRequest().approvedOnDate(approvedOnDate) + .dateFormat(DATETIME_PATTERN).locale(LOCALE); + return ok(fineract().savingsAccounts.handleCommands6(savingsAccountId, request, "approve")); + } + + public PostSavingsAccountsAccountIdResponse activateSavingsAccount(Long savingsAccountId, String activatedOnDate) { + PostSavingsAccountsAccountIdRequest request = new PostSavingsAccountsAccountIdRequest().activatedOnDate(activatedOnDate) + .dateFormat(DATETIME_PATTERN).locale(LOCALE); + return ok(fineract().savingsAccounts.handleCommands6(savingsAccountId, request, "activate")); + } + + public GetSavingsAccountsAccountIdResponse getSavingsAccount(Long savingsAccountId) { + return ok(fineract().savingsAccounts.retrieveOne25(savingsAccountId, null, null)); + } + + public PostSavingsAccountTransactionsResponse applySavingsAccountTransaction(Long savingsAccountId, + PostSavingsAccountTransactionsRequest request, String command) { + return ok(fineract().savingsTransactions.transaction2(savingsAccountId, request, command)); + } + + public GetSavingsAccountsAccountIdResponse getSavingsAccount(Long savingsAccountId, Map<String, Object> queryParams) { + final String url = SAVINGS_ACCOUNT_URL + "/" + savingsAccountId; + queryParams.put(TENANT_PARAM_NAME, DEFAULT_TENANT); + requestSpec.queryParams(queryParams); + String response = Utils.performServerGet(this.requestSpec, this.responseSpec, url); Review Comment: It would be better to use the fineract-client to retrieve the savings account details -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org