Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public FinancialActivityAccountData retreive(@PathParam("mappingId") @Parameter(
@POST
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Create a new Financial Activity to Accounts Mapping", description = """
@Operation(summary = "Create a new Financial Activity to Accounts Mapping", operationId = "createGLAccountMappingFinancialActivityAccount", description = """
Mandatory Fields
financialActivityId, glAccountId""")
@RequestBody(content = @Content(schema = @Schema(implementation = FinancialActivityAccountsApiResourceSwagger.PostFinancialActivityAccountsRequest.class)))
Expand All @@ -135,7 +135,7 @@ public CommandProcessingResult createGLAccount(@Parameter(hidden = true) Financi
@Path("{mappingId}")
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Update a Financial Activity to Account Mapping", description = "the API updates the Ledger account linked to a Financial Activity")
@Operation(summary = "Update a Financial Activity to Account Mapping", operationId = "updateGLAccountMappingFinancialActivityAccount", description = "the API updates the Ledger account linked to a Financial Activity")
@RequestBody(content = @Content(schema = @Schema(implementation = FinancialActivityAccountsApiResourceSwagger.PostFinancialActivityAccountsRequest.class)))
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FinancialActivityAccountsApiResourceSwagger.PutFinancialActivityAccountsResponse.class)))
public CommandProcessingResult updateGLAccount(@PathParam("mappingId") @Parameter(description = "mappingId") final Long mappingId,
Expand All @@ -150,7 +150,7 @@ public CommandProcessingResult updateGLAccount(@PathParam("mappingId") @Paramete
@Path("{mappingId}")
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Delete a Financial Activity to Account Mapping")
@Operation(summary = "Delete a Financial Activity to Account Mapping", operationId = "deleteGLAccountMappingFinancialActivityAccount")
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FinancialActivityAccountsApiResourceSwagger.DeleteFinancialActivityAccountsResponse.class)))
public CommandProcessingResult deleteGLAccount(@PathParam("mappingId") @Parameter(description = "mappingId") final Long mappingId) {
final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteOfficeToGLAccountMapping(mappingId).build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,12 @@ public GLAccountData retreiveAccount(@PathParam("glAccountId") @Parameter(descri
@POST
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
@Operation(tags = { "General Ledger Account" }, summary = "Create a General Ledger Account", description = """
Note: You may optionally create Hierarchical Chart of Accounts by using the "parentId" property of an Account
Mandatory Fields:
name, glCode, type, usage and manualEntriesAllowed
""")
@Operation(tags = {
"General Ledger Account" }, summary = "Create a General Ledger Account", operationId = "createGLAccount", description = """
Note: You may optionally create Hierarchical Chart of Accounts by using the "parentId" property of an Account
Mandatory Fields:
name, glCode, type, usage and manualEntriesAllowed
""")
@RequestBody(content = @Content(schema = @Schema(implementation = GLAccountsApiResourceSwagger.PostGLAccountsRequest.class)))
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GLAccountsApiResourceSwagger.PostGLAccountsResponse.class)))
public CommandProcessingResult createGLAccount(@Parameter(hidden = true) GLAccountCommand glAccountCommand) {
Expand All @@ -198,7 +199,8 @@ public CommandProcessingResult createGLAccount(@Parameter(hidden = true) GLAccou
@Path("{glAccountId}")
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
@Operation(tags = { "General Ledger Account" }, summary = "Update a GL Account", description = "Updates a GL Account")
@Operation(tags = {
"General Ledger Account" }, summary = "Update a GL Account", operationId = "updateGLAccount", description = "Updates a GL Account")
@RequestBody(content = @Content(schema = @Schema(implementation = GLAccountsApiResourceSwagger.PutGLAccountsRequest.class)))
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GLAccountsApiResourceSwagger.PutGLAccountsResponse.class)))
public CommandProcessingResult updateGLAccount(@PathParam("glAccountId") @Parameter(description = "glAccountId") final Long glAccountId,
Expand All @@ -212,7 +214,8 @@ public CommandProcessingResult updateGLAccount(@PathParam("glAccountId") @Parame
@Path("{glAccountId}")
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
@Operation(tags = { "General Ledger Account" }, summary = "Delete a GL Account", description = "Deletes a GL Account")
@Operation(tags = {
"General Ledger Account" }, summary = "Delete a GL Account", operationId = "deleteGLAccount", description = "Deletes a GL Account")
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GLAccountsApiResourceSwagger.DeleteGLAccountsResponse.class)))
public CommandProcessingResult deleteGLAccount(
@PathParam("glAccountId") @Parameter(description = "glAccountId") final Long glAccountId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void demoClient() {
// tag::documentation[]
FineractClient fineract = FineractClient.builder().baseURL("https://demo.fineract.dev/fineract-provider/api/v1/").tenant("default")
.basicAuth("mifos", "password").build();
List<StaffData> staff = Calls.ok(fineract.staff.retrieveAll16(1L, true, false, "ACTIVE"));
List<StaffData> staff = Calls.ok(fineract.staff.retrieveAllStaff(1L, true, false, "ACTIVE"));
String name = staff.get(0).getDisplayName();
log.info("Display name: {}", name);
// end::documentation[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public PaymentTypeUpdateResponse updatePaymentType(@PathParam("paymentTypeId") f
@Path("{paymentTypeId}")
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Delete a Payment Type", description = "Deletes payment type")
@Operation(summary = "Delete a Payment Type", operationId = "deleteCodePaymentType", description = "Deletes payment type")
public PaymentTypeDeleteResponse deleteCode(@PathParam("paymentTypeId") final Long paymentTypeId) {

final var command = new PaymentTypeDeleteCommand();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public long resolve(Long codeId, CodeValue codeValue) {
public long resolve(String codeName, String codeValue) {
log.debug("Resolving code value by code id and name [{}]", codeValue);
List<GetCodeValuesDataResponse> codeValuesResponses = ok(
() -> fineractClient.codeValues().retrieveAllCodeValues1(codeName, Map.of()));
() -> fineractClient.codeValues().retrieveAllCodeValuesByCodeName(codeName, Map.of()));
GetCodeValuesDataResponse foundPtr = codeValuesResponses.stream().filter(ptr -> codeValue.equals(ptr.getName())).findAny()
.orElseThrow(() -> new IllegalArgumentException("Code Value [%s] not found for Code [%s]".formatted(codeValue, codeName)));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private void switchAndSetGlobalConfiguration(String configKey, boolean enabled,

PutGlobalConfigurationsRequest updateRequest = new PutGlobalConfigurationsRequest().enabled(enabled).value(value);

ok(() -> fineractClient.globalConfiguration().updateConfiguration1(configId, updateRequest, Map.of()));
ok(() -> fineractClient.globalConfiguration().updateGlobalConfiguration(configId, updateRequest, Map.of()));
GlobalConfigurationPropertyData updatedConfiguration = ok(
() -> fineractClient.globalConfiguration().retrieveOneByName(configKey, Map.of()));
boolean isEnabled = BooleanUtils.toBoolean(updatedConfiguration.getEnabled());
Expand All @@ -64,7 +64,7 @@ public void setGlobalConfigValueString(String configKey, String value) {

PutGlobalConfigurationsRequest updateRequest = new PutGlobalConfigurationsRequest().enabled(true).stringValue(value);

ok(() -> fineractClient.globalConfiguration().updateConfiguration1(configId, updateRequest, Map.of()));
ok(() -> fineractClient.globalConfiguration().updateGlobalConfiguration(configId, updateRequest, Map.of()));
GlobalConfigurationPropertyData updatedConfiguration = ok(
() -> fineractClient.globalConfiguration().retrieveOneByName(configKey, Map.of()));
boolean isEnabled = BooleanUtils.toBoolean(updatedConfiguration.getEnabled());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private void waitForTransactionCommit() {

public void clientEventCheck(PostClientsResponse clientCreationResponse) {
waitForTransactionCommit();
GetClientsClientIdResponse body = ok(() -> fineractClient.clients().retrieveOne11(clientCreationResponse.getClientId(),
GetClientsClientIdResponse body = ok(() -> fineractClient.clients().retrieveOneClient(clientCreationResponse.getClientId(),
Map.of("staffInSelectedOfficeOnly", false)));

Long clientId = Long.valueOf(body.getId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private void waitUntilJobIsFinished(Job job) {
.until(() -> {
log.debug("Waiting for job {} to finish", jobName);
Long jobId = jobResolver.resolve(job);
GetJobsResponse getJobsResponse = ok(() -> fineractClient.schedulerJob().retrieveOne5(jobId));
GetJobsResponse getJobsResponse = ok(() -> fineractClient.schedulerJob().retrieveOneSchedulerJob(jobId));
Boolean currentlyRunning = getJobsResponse.getCurrentlyRunning();
return BooleanUtils.isFalse(currentlyRunning);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ public void adminTransactionCommandTheWithType(String command, String type) thro
String transferExternalId = testContext()
.get(TestContextKey.ASSET_EXTERNALIZATION_TRANSFER_EXTERNAL_ID_USER_GENERATED + "_" + type);

externalAssetOwnersApi().transferRequestWithId1(transferExternalId, Map.of("command", command));
externalAssetOwnersApi().transferRequestWithIdByExternalId(transferExternalId, Map.of("command", command));
}

@When("Admin send {string} command to the transaction type {string} will throw error")
Expand All @@ -813,7 +813,7 @@ public void adminTransactionCommandTheWithTypeThrowError(String command, String
.get(TestContextKey.ASSET_EXTERNALIZATION_TRANSFER_EXTERNAL_ID_USER_GENERATED + "_" + type);

CallFailedRuntimeException exception = fail(
() -> externalAssetOwnersApi().transferRequestWithId1(transferExternalId, Map.of("command", command)));
() -> externalAssetOwnersApi().transferRequestWithIdByExternalId(transferExternalId, Map.of("command", command)));

assertThat(exception.getStatus()).as("Expected status code: 403").isEqualTo(403);
}
Expand Down Expand Up @@ -875,7 +875,7 @@ public void adminSendCommandAndItWillThrowError(String command, String transacti
}

CallFailedRuntimeException exception = fail(
() -> externalAssetOwnersApi().transferRequestWithId1(transferExternalId, Map.of("command", command)));
() -> externalAssetOwnersApi().transferRequestWithIdByExternalId(transferExternalId, Map.of("command", command)));

assertThat(exception.getStatus()).as("Expected status code: 403").isEqualTo(403);
}
Expand All @@ -889,7 +889,7 @@ public void adminSendCommand(String command, String transactionType) throws IOEx
transferExternalId = testContext().get(TestContextKey.ASSET_EXTERNALIZATION_SALES_TRANSFER_EXTERNAL_ID_FROM_RESPONSE);
}

externalAssetOwnersApi().transferRequestWithId1(transferExternalId, Map.of("command", command));
externalAssetOwnersApi().transferRequestWithIdByExternalId(transferExternalId, Map.of("command", command));
}

@When("Admin set external asset owner loan product attribute {string} value {string} for loan product {string}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ public void runBatchApiCreateAndApproveLoanRescheduleWithGivenUserLockedByCobErr
// Create new user which cannot bypass loan COB execution
PostUsersResponse createUserResponse = testContext().get(TestContextKey.CREATED_SIMPLE_USER_RESPONSE);
Long createdUserId = createUserResponse.getResourceId();
GetUsersUserIdResponse user = fineractFeignClient.users().retrieveOne30(createdUserId);
GetUsersUserIdResponse user = fineractFeignClient.users().retrieveOneUser(createdUserId);
String authorizationString = user.getUsername() + ":" + PWD_USER_WITH_ROLE;
Base64 base64 = new Base64();
headerMap.put("Authorization",
Expand Down Expand Up @@ -849,7 +849,7 @@ public void givenClientCreated(int nr) throws IOException {

Map<String, Object> clientQueryParams = new HashMap<>();
clientQueryParams.put("staffInSelectedOfficeOnly", false);
GetClientsClientIdResponse response = clientApi().retrieveOne12(clientExternalId, clientQueryParams);
GetClientsClientIdResponse response = clientApi().retrieveOneClientByExternalId(clientExternalId, clientQueryParams);
assertThat(response.getId()).as(ErrorMessageHelper.idNull()).isNotNull();
}

Expand All @@ -866,7 +866,7 @@ public void givenLoanCreated(int nr) throws IOException {

Map<String, Object> loanQueryParams = new HashMap<>();
loanQueryParams.put("staffInSelectedOfficeOnly", false);
GetLoansLoanIdResponse response = loansApi().retrieveLoan1(loanExternalId, loanQueryParams);
GetLoansLoanIdResponse response = loansApi().retrieveLoanByExternalId(loanExternalId, loanQueryParams);
assertThat(response.getId()).as(ErrorMessageHelper.idNull()).isNotNull();
}

Expand All @@ -883,7 +883,7 @@ public void givenLoanApproved(int nr) throws IOException {

Map<String, Object> loanQueryParams = new HashMap<>();
loanQueryParams.put("staffInSelectedOfficeOnly", false);
GetLoansLoanIdResponse response = loansApi().retrieveLoan1(loanExternalId, loanQueryParams);
GetLoansLoanIdResponse response = loansApi().retrieveLoanByExternalId(loanExternalId, loanQueryParams);
GetLoansLoanIdStatus status = response.getStatus();
Long statusIdActual = status.getId();
Long statusIdExpected = LoanStatus.APPROVED.value.longValue();
Expand All @@ -910,7 +910,7 @@ public void clientNotCreated(int nr) throws IOException {
try {
Map<String, Object> clientQueryParams = new HashMap<>();
clientQueryParams.put("staffInSelectedOfficeOnly", false);
clientApi().retrieveOne12(clientExternalId, clientQueryParams);
clientApi().retrieveOneClientByExternalId(clientExternalId, clientQueryParams);
throw new IllegalStateException("Expected Feign exception but call succeeded");
} catch (org.apache.fineract.client.feign.FeignException e) {
errorResponse = fromJson(e.responseBodyAsString(), ErrorResponse.class);
Expand Down Expand Up @@ -949,7 +949,7 @@ public void loanNotCreated(int nr) throws IOException {
// Feign throws exceptions on errors instead of returning error in response body
ErrorResponse errorResponse = null;
try {
loansApi().retrieveLoan1(loanExternalId, loanQueryParams);
loansApi().retrieveLoanByExternalId(loanExternalId, loanQueryParams);
throw new IllegalStateException("Expected Feign exception but call succeeded");
} catch (org.apache.fineract.client.feign.FeignException e) {
errorResponse = fromJson(e.responseBodyAsString(), ErrorResponse.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class ClientStepDef extends AbstractStepDef {
public void createClientRandomFirstNameLastName() {
PostClientsRequest clientsRequest = clientRequestFactory.defaultClientCreationRequest();

PostClientsResponse response = ok(() -> fineractClient.clients().create6(clientsRequest));
PostClientsResponse response = ok(() -> fineractClient.clients().createClient(clientsRequest));
testContext().set(TestContextKey.CLIENT_CREATE_RESPONSE, response);

eventCheckHelper.clientEventCheck(response);
Expand All @@ -59,7 +59,7 @@ public void createClientInLastCreatedOffice() {
final PostClientsRequest clientsRequest = clientRequestFactory.defaultClientCreationRequest()//
.officeId(officeResponse.getOfficeId());

final PostClientsResponse response = ok(() -> fineractClient.clients().create6(clientsRequest));
final PostClientsResponse response = ok(() -> fineractClient.clients().createClient(clientsRequest));
testContext().set(TestContextKey.CLIENT_CREATE_RESPONSE, response);

eventCheckHelper.clientEventCheck(response);
Expand All @@ -69,7 +69,7 @@ public void createClientInLastCreatedOffice() {
public void createSecondClientRandomFirstNameLastName() {
PostClientsRequest clientsRequest = clientRequestFactory.defaultClientCreationRequest();

PostClientsResponse response = ok(() -> fineractClient.clients().create6(clientsRequest));
PostClientsResponse response = ok(() -> fineractClient.clients().createClient(clientsRequest));
testContext().set(TestContextKey.CLIENT_CREATE_SECOND_CLIENT_RESPONSE, response);

eventCheckHelper.clientEventCheck(response);
Expand All @@ -79,7 +79,7 @@ public void createSecondClientRandomFirstNameLastName() {
public void createClient(String firstName, String lastName) {
PostClientsRequest clientsRequest = clientRequestFactory.defaultClientCreationRequest().firstname(firstName).lastname(lastName);

PostClientsResponse response = ok(() -> fineractClient.clients().create6(clientsRequest));
PostClientsResponse response = ok(() -> fineractClient.clients().createClient(clientsRequest));
testContext().set(TestContextKey.CLIENT_CREATE_RESPONSE, response);
}

Expand All @@ -98,7 +98,7 @@ public void createClientWithAddress(String firstName, String lastName) {
PostClientsRequest clientsRequest = clientRequestFactory.defaultClientCreationRequest().firstname(firstName).lastname(lastName)
.address(Collections.singletonList(addressRequest));

PostClientsResponse response = ok(() -> fineractClient.clients().create6(clientsRequest));
PostClientsResponse response = ok(() -> fineractClient.clients().createClient(clientsRequest));
testContext().set(TestContextKey.CLIENT_CREATE_RESPONSE, response);

}
Expand All @@ -109,7 +109,7 @@ public void createClientWithSpecifiedDates(String firstName, String lastName, St
PostClientsRequest clientsRequest = clientRequestFactory.defaultClientCreationRequest().firstname(firstName).lastname(lastName)
.activationDate(activationDate);

PostClientsResponse response = ok(() -> fineractClient.clients().create6(clientsRequest));
PostClientsResponse response = ok(() -> fineractClient.clients().createClient(clientsRequest));
testContext().set(TestContextKey.CLIENT_CREATE_RESPONSE, response);
}

Expand Down
Loading
Loading