FINERACT-1760: Client by External Id
This commit is contained in:
committed by
Arnold Gálovics
parent
cef826af8f
commit
833dddb551
+324
@@ -0,0 +1,324 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.apache.fineract.integrationtests;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
|
||||
import io.restassured.builder.RequestSpecBuilder;
|
||||
import io.restassured.builder.ResponseSpecBuilder;
|
||||
import io.restassured.http.ContentType;
|
||||
import io.restassured.specification.RequestSpecification;
|
||||
import io.restassured.specification.ResponseSpecification;
|
||||
import java.util.List;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.fineract.client.models.DeleteClientsClientIdResponse;
|
||||
import org.apache.fineract.client.models.GetClientTransferProposalDateResponse;
|
||||
import org.apache.fineract.client.models.GetClientsClientIdAccountsResponse;
|
||||
import org.apache.fineract.client.models.GetClientsClientIdResponse;
|
||||
import org.apache.fineract.client.models.GetObligeeData;
|
||||
import org.apache.fineract.client.models.PostClientsClientIdResponse;
|
||||
import org.apache.fineract.client.models.PostClientsResponse;
|
||||
import org.apache.fineract.client.models.PutClientsClientIdResponse;
|
||||
import org.apache.fineract.integrationtests.common.ClientHelper;
|
||||
import org.apache.fineract.integrationtests.common.GlobalConfigurationHelper;
|
||||
import org.apache.fineract.integrationtests.common.Utils;
|
||||
import org.apache.fineract.portfolio.client.domain.ClientStatus;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Slf4j
|
||||
public class ClientExternalIdTest {
|
||||
|
||||
private ResponseSpecification responseSpec;
|
||||
private RequestSpecification requestSpec;
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
Utils.initializeRESTAssured();
|
||||
requestSpec = new RequestSpecBuilder().setContentType(ContentType.JSON).build();
|
||||
requestSpec.header("Authorization", "Basic " + Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey());
|
||||
responseSpec = new ResponseSpecBuilder().expectStatusCode(200).build();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenAutoExternalIdConfigIsOffCreateClient() {
|
||||
// given
|
||||
GlobalConfigurationHelper.manageConfigurations(requestSpec, responseSpec,
|
||||
GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, false);
|
||||
final String jsonPayload = ClientHelper.getBasicClientAsJSON(ClientHelper.DEFAULT_OFFICE_ID, ClientHelper.LEGALFORM_ID_PERSON,
|
||||
null);
|
||||
// when
|
||||
final PostClientsResponse clientResponse = ClientHelper.addClientAsPerson(requestSpec, responseSpec, jsonPayload);
|
||||
// then
|
||||
assertNotNull(clientResponse);
|
||||
assertNull(clientResponse.getResourceExternalId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenAutoExternalIdConfigIsOffCreateClientWithValue() {
|
||||
// given
|
||||
final String externalId = Utils.randomStringGenerator("ID_", 7);
|
||||
final String jsonPayload = ClientHelper.getBasicClientAsJSON(ClientHelper.DEFAULT_OFFICE_ID, ClientHelper.LEGALFORM_ID_PERSON,
|
||||
externalId);
|
||||
// when
|
||||
final PostClientsResponse clientResponse = ClientHelper.addClientAsPerson(requestSpec, responseSpec, jsonPayload);
|
||||
// then
|
||||
assertNotNull(clientResponse);
|
||||
assertNotNull(clientResponse.getResourceExternalId());
|
||||
assertEquals(externalId, clientResponse.getResourceExternalId());
|
||||
|
||||
fetchClientByExternalId(clientResponse.getResourceExternalId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenAutoExternalIdConfigIsOnCreateClient() {
|
||||
// given
|
||||
GlobalConfigurationHelper.manageConfigurations(requestSpec, responseSpec,
|
||||
GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, true);
|
||||
final String jsonPayload = ClientHelper.getBasicClientAsJSON(ClientHelper.DEFAULT_OFFICE_ID, ClientHelper.LEGALFORM_ID_PERSON,
|
||||
null);
|
||||
// when
|
||||
final PostClientsResponse clientResponse = ClientHelper.addClientAsPerson(requestSpec, responseSpec, jsonPayload);
|
||||
// then
|
||||
assertNotNull(clientResponse);
|
||||
assertNotNull(clientResponse.getResourceExternalId());
|
||||
assertEquals(36, clientResponse.getResourceExternalId().length());
|
||||
|
||||
fetchClientByExternalId(clientResponse.getResourceExternalId());
|
||||
|
||||
GlobalConfigurationHelper.manageConfigurations(requestSpec, responseSpec,
|
||||
GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenAutoExternalIdConfigIsOnCreateClientWithValue() {
|
||||
// given
|
||||
GlobalConfigurationHelper.manageConfigurations(requestSpec, responseSpec,
|
||||
GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, true);
|
||||
final String externalId = Utils.randomStringGenerator("ID_", 7);
|
||||
final String jsonPayload = ClientHelper.getBasicClientAsJSON(ClientHelper.DEFAULT_OFFICE_ID, ClientHelper.LEGALFORM_ID_PERSON,
|
||||
externalId);
|
||||
// when
|
||||
final PostClientsResponse clientResponse = ClientHelper.addClientAsPerson(requestSpec, responseSpec, jsonPayload);
|
||||
// then
|
||||
assertNotNull(clientResponse);
|
||||
assertNotNull(clientResponse.getResourceExternalId());
|
||||
assertEquals(externalId, clientResponse.getResourceExternalId());
|
||||
|
||||
fetchClientByExternalId(clientResponse.getResourceExternalId());
|
||||
|
||||
GlobalConfigurationHelper.manageConfigurations(requestSpec, responseSpec,
|
||||
GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testClientStatusUsingExternalId() {
|
||||
ClientHelper clientHelper = new ClientHelper(requestSpec, responseSpec);
|
||||
GlobalConfigurationHelper.manageConfigurations(requestSpec, responseSpec,
|
||||
GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, true);
|
||||
String jsonPayload = ClientHelper.getBasicClientAsJSON(ClientHelper.DEFAULT_OFFICE_ID, ClientHelper.LEGALFORM_ID_PERSON, null);
|
||||
final PostClientsResponse addClientResponse = ClientHelper.addClientAsPerson(requestSpec, responseSpec, jsonPayload);
|
||||
final String clientExternalId = addClientResponse.getResourceExternalId();
|
||||
final Long clientId = addClientResponse.getClientId();
|
||||
assertNotNull(clientExternalId);
|
||||
log.info("Client data id {} and external Id {}", clientId, clientExternalId);
|
||||
|
||||
GetClientsClientIdResponse clientResponse = ClientHelper.getClientByExternalId(requestSpec, responseSpec, clientExternalId);
|
||||
ClientStatusChecker.verifyClientStatus(ClientStatus.ACTIVE, clientResponse);
|
||||
log.info("Client data id {} and status {}", clientExternalId, clientResponse.getStatus().getCode());
|
||||
|
||||
// Close Client action
|
||||
jsonPayload = clientHelper.getCloseClientAsJSON();
|
||||
PostClientsClientIdResponse commandResponse = ClientHelper.performClientActionUsingExternalId(requestSpec, responseSpec,
|
||||
clientExternalId, ClientHelper.CLOSE_CLIENT_COMMAND, jsonPayload);
|
||||
assertNotNull(commandResponse);
|
||||
assertNotNull(commandResponse.getResourceExternalId());
|
||||
assertEquals(clientExternalId, commandResponse.getResourceExternalId());
|
||||
log.info("Client data id {} and external Id {}", commandResponse.getResourceId(), clientExternalId);
|
||||
assertEquals(clientId.intValue(), commandResponse.getResourceId());
|
||||
|
||||
clientResponse = ClientHelper.getClientByExternalId(requestSpec, responseSpec, clientExternalId);
|
||||
ClientStatusChecker.verifyClientStatus(ClientStatus.CLOSED, clientResponse);
|
||||
log.info("Client data id {} and status {}", clientExternalId, clientResponse.getStatus().getCode());
|
||||
|
||||
// Reactivate Client action
|
||||
jsonPayload = clientHelper.getReactivateClientAsJSON();
|
||||
commandResponse = ClientHelper.performClientActionUsingExternalId(requestSpec, responseSpec, clientExternalId,
|
||||
ClientHelper.REACTIVATE_CLIENT_COMMAND, jsonPayload);
|
||||
assertNotNull(commandResponse);
|
||||
assertNotNull(commandResponse.getResourceExternalId());
|
||||
assertEquals(clientExternalId, commandResponse.getResourceExternalId());
|
||||
log.info("Client data id {} and external Id {}", commandResponse.getResourceId(), clientExternalId);
|
||||
assertEquals(clientId.intValue(), commandResponse.getResourceId());
|
||||
|
||||
clientResponse = ClientHelper.getClientByExternalId(requestSpec, responseSpec, clientExternalId);
|
||||
ClientStatusChecker.verifyClientStatus(ClientStatus.PENDING, clientResponse);
|
||||
log.info("Client data id {} and status {}", clientExternalId, clientResponse.getStatus().getCode());
|
||||
|
||||
// Reject Client action
|
||||
jsonPayload = clientHelper.getRejectClientAsJSON();
|
||||
commandResponse = ClientHelper.performClientActionUsingExternalId(requestSpec, responseSpec, clientExternalId,
|
||||
ClientHelper.REJECT_CLIENT_COMMAND, jsonPayload);
|
||||
assertNotNull(commandResponse);
|
||||
assertNotNull(commandResponse.getResourceExternalId());
|
||||
assertEquals(clientExternalId, commandResponse.getResourceExternalId());
|
||||
log.info("Client data id {} and external Id {}", commandResponse.getResourceId(), clientExternalId);
|
||||
assertEquals(clientId.intValue(), commandResponse.getResourceId());
|
||||
|
||||
clientResponse = ClientHelper.getClientByExternalId(requestSpec, responseSpec, clientExternalId);
|
||||
ClientStatusChecker.verifyClientStatus(ClientStatus.REJECTED, clientResponse);
|
||||
log.info("Client data id {} and status {}", clientExternalId, clientResponse.getStatus().getCode());
|
||||
|
||||
// Activate Client action
|
||||
jsonPayload = ClientHelper.getActivateClientAsJSON(ClientHelper.DEFAULT_DATE);
|
||||
commandResponse = ClientHelper.performClientActionUsingExternalId(requestSpec, responseSpec, clientExternalId,
|
||||
ClientHelper.ACTIVATE_CLIENT_COMMAND, jsonPayload);
|
||||
assertNotNull(commandResponse);
|
||||
assertNotNull(commandResponse.getResourceExternalId());
|
||||
assertEquals(clientExternalId, commandResponse.getResourceExternalId());
|
||||
log.info("Client data id {} and external Id {}", commandResponse.getResourceId(), clientExternalId);
|
||||
assertEquals(clientId.intValue(), commandResponse.getResourceId());
|
||||
|
||||
clientResponse = ClientHelper.getClientByExternalId(requestSpec, responseSpec, clientExternalId);
|
||||
ClientStatusChecker.verifyClientStatus(ClientStatus.ACTIVE, clientResponse);
|
||||
log.info("Client data id {} and status {}", clientExternalId, clientResponse.getStatus().getCode());
|
||||
|
||||
GlobalConfigurationHelper.manageConfigurations(requestSpec, responseSpec,
|
||||
GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdateClientUsingExternalId() {
|
||||
// given
|
||||
GlobalConfigurationHelper.manageConfigurations(requestSpec, responseSpec,
|
||||
GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, true);
|
||||
String jsonPayload = ClientHelper.getBasicClientAsJSON(ClientHelper.DEFAULT_OFFICE_ID, ClientHelper.LEGALFORM_ID_PERSON, null);
|
||||
// when
|
||||
final PostClientsResponse clientResponse = ClientHelper.addClientAsPerson(requestSpec, responseSpec, jsonPayload);
|
||||
final String clientExternalId = clientResponse.getResourceExternalId();
|
||||
jsonPayload = ClientHelper.getBasicClientAsJSON(null, ClientHelper.LEGALFORM_ID_PERSON, clientExternalId);
|
||||
final PutClientsClientIdResponse clientUpdateResponse = ClientHelper.updateClient(requestSpec, responseSpec, clientExternalId,
|
||||
jsonPayload);
|
||||
// then
|
||||
assertNotNull(clientUpdateResponse);
|
||||
assertNotNull(clientUpdateResponse.getResourceExternalId());
|
||||
assertEquals(clientExternalId, clientUpdateResponse.getResourceExternalId());
|
||||
|
||||
GlobalConfigurationHelper.manageConfigurations(requestSpec, responseSpec,
|
||||
GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDeleteClientUsingExternalId() {
|
||||
// given
|
||||
ClientHelper clientHelper = new ClientHelper(requestSpec, responseSpec);
|
||||
GlobalConfigurationHelper.manageConfigurations(requestSpec, responseSpec,
|
||||
GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, true);
|
||||
String jsonPayload = ClientHelper.getBasicClientAsJSON(ClientHelper.DEFAULT_OFFICE_ID, ClientHelper.LEGALFORM_ID_PERSON, null);
|
||||
// when
|
||||
final PostClientsResponse clientResponse = ClientHelper.addClientAsPerson(requestSpec, responseSpec, jsonPayload);
|
||||
final String clientExternalId = clientResponse.getResourceExternalId();
|
||||
jsonPayload = clientHelper.getCloseClientAsJSON();
|
||||
PostClientsClientIdResponse commandResponse = ClientHelper.performClientActionUsingExternalId(requestSpec, responseSpec,
|
||||
clientExternalId, ClientHelper.CLOSE_CLIENT_COMMAND, jsonPayload);
|
||||
jsonPayload = clientHelper.getReactivateClientAsJSON();
|
||||
commandResponse = ClientHelper.performClientActionUsingExternalId(requestSpec, responseSpec, clientExternalId,
|
||||
ClientHelper.REACTIVATE_CLIENT_COMMAND, jsonPayload);
|
||||
|
||||
// then
|
||||
final DeleteClientsClientIdResponse clientDeleteResponse = ClientHelper.deleteClient(requestSpec, responseSpec, clientExternalId);
|
||||
assertNotNull(clientDeleteResponse);
|
||||
assertNotNull(clientDeleteResponse.getResourceExternalId());
|
||||
assertEquals(clientExternalId, clientDeleteResponse.getResourceExternalId());
|
||||
|
||||
GlobalConfigurationHelper.manageConfigurations(requestSpec, responseSpec,
|
||||
GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetClientAccountsUsingExternalId() {
|
||||
// given
|
||||
GlobalConfigurationHelper.manageConfigurations(requestSpec, responseSpec,
|
||||
GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, true);
|
||||
final String jsonPayload = ClientHelper.getBasicClientAsJSON(ClientHelper.DEFAULT_OFFICE_ID, ClientHelper.LEGALFORM_ID_PERSON,
|
||||
null);
|
||||
// when
|
||||
final PostClientsResponse clientResponse = ClientHelper.addClientAsPerson(requestSpec, responseSpec, jsonPayload);
|
||||
final String clientExternalId = clientResponse.getResourceExternalId();
|
||||
|
||||
GetClientsClientIdAccountsResponse clientAccountsResponse = ClientHelper.getClientAccounts(requestSpec, responseSpec,
|
||||
clientExternalId);
|
||||
|
||||
// then
|
||||
assertNotNull(clientAccountsResponse);
|
||||
|
||||
GlobalConfigurationHelper.manageConfigurations(requestSpec, responseSpec,
|
||||
GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetClientTransferProposalDate() {
|
||||
// given
|
||||
GlobalConfigurationHelper.manageConfigurations(requestSpec, responseSpec,
|
||||
GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, true);
|
||||
final String jsonPayload = ClientHelper.getBasicClientAsJSON(ClientHelper.DEFAULT_OFFICE_ID, ClientHelper.LEGALFORM_ID_PERSON,
|
||||
null);
|
||||
final PostClientsResponse clientResponse = ClientHelper.addClientAsPerson(requestSpec, responseSpec, jsonPayload);
|
||||
ResponseSpecification response204Spec = new ResponseSpecBuilder().expectStatusCode(204).build();
|
||||
|
||||
// when
|
||||
final String clientExternalId = clientResponse.getResourceExternalId();
|
||||
final GetClientTransferProposalDateResponse transferProposalDateResponse = ClientHelper.getProposedTransferDate(requestSpec,
|
||||
response204Spec, clientExternalId);
|
||||
|
||||
fetchClientByExternalId(clientResponse.getResourceExternalId());
|
||||
|
||||
GlobalConfigurationHelper.manageConfigurations(requestSpec, responseSpec,
|
||||
GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetClientObligeeData() {
|
||||
// given
|
||||
GlobalConfigurationHelper.manageConfigurations(requestSpec, responseSpec,
|
||||
GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, true);
|
||||
final String jsonPayload = ClientHelper.getBasicClientAsJSON(ClientHelper.DEFAULT_OFFICE_ID, ClientHelper.LEGALFORM_ID_PERSON,
|
||||
null);
|
||||
// when
|
||||
final PostClientsResponse clientResponse = ClientHelper.addClientAsPerson(requestSpec, responseSpec, jsonPayload);
|
||||
final String clientExternalId = clientResponse.getResourceExternalId();
|
||||
final List<GetObligeeData> obligeeDataResponse = ClientHelper.getObligeeData(requestSpec, responseSpec, clientExternalId);
|
||||
|
||||
// then
|
||||
assertNotNull(obligeeDataResponse);
|
||||
|
||||
fetchClientByExternalId(clientResponse.getResourceExternalId());
|
||||
|
||||
GlobalConfigurationHelper.manageConfigurations(requestSpec, responseSpec,
|
||||
GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, false);
|
||||
}
|
||||
|
||||
private void fetchClientByExternalId(final String externalId) {
|
||||
GetClientsClientIdResponse clientResponse = ClientHelper.getClientByExternalId(requestSpec, responseSpec, externalId);
|
||||
assertNotNull(clientResponse);
|
||||
assertEquals(externalId, clientResponse.getExternalId());
|
||||
}
|
||||
}
|
||||
+6
@@ -21,6 +21,8 @@ package org.apache.fineract.integrationtests;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.util.HashMap;
|
||||
import org.apache.fineract.client.models.GetClientsClientIdResponse;
|
||||
import org.apache.fineract.portfolio.client.domain.ClientStatus;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -36,6 +38,10 @@ public final class ClientStatusChecker {
|
||||
assertEquals(300, (int) clientStatusHashMap.get("id"));
|
||||
}
|
||||
|
||||
public static void verifyClientStatus(final ClientStatus status, final GetClientsClientIdResponse clientResponse) {
|
||||
assertEquals(status.getValue(), clientResponse.getStatus().getId());
|
||||
}
|
||||
|
||||
public static void verifyClientClosed(final HashMap<String, Object> clientStatusHashMap) {
|
||||
LOG.info("\n-------------------------------------- VERIFYING CLIENT IS CLOSED ------------------------------------");
|
||||
assertEquals(600, (int) clientStatusHashMap.get("id"));
|
||||
|
||||
+135
-57
@@ -37,12 +37,18 @@ import javax.ws.rs.core.HttpHeaders;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.fineract.client.models.DeleteClientsClientIdResponse;
|
||||
import org.apache.fineract.client.models.GetClientClientIdAddressesResponse;
|
||||
import org.apache.fineract.client.models.GetClientTransferProposalDateResponse;
|
||||
import org.apache.fineract.client.models.GetClientsClientIdAccountsResponse;
|
||||
import org.apache.fineract.client.models.GetClientsClientIdResponse;
|
||||
import org.apache.fineract.client.models.GetObligeeData;
|
||||
import org.apache.fineract.client.models.PostClientClientIdAddressesRequest;
|
||||
import org.apache.fineract.client.models.PostClientClientIdAddressesResponse;
|
||||
import org.apache.fineract.client.models.PostClientsClientIdResponse;
|
||||
import org.apache.fineract.client.models.PostClientsRequest;
|
||||
import org.apache.fineract.client.models.PostClientsResponse;
|
||||
import org.apache.fineract.client.models.PutClientsClientIdResponse;
|
||||
import org.apache.fineract.client.util.JSON;
|
||||
import org.apache.fineract.infrastructure.bulkimport.data.GlobalEntityType;
|
||||
import org.apache.fineract.integrationtests.client.IntegrationTest;
|
||||
@@ -54,20 +60,26 @@ import org.apache.poi.ss.usermodel.Workbook;
|
||||
@RequiredArgsConstructor
|
||||
public class ClientHelper extends IntegrationTest {
|
||||
|
||||
private static final String CREATE_CLIENT_URL = "/fineract-provider/api/v1/clients?" + Utils.TENANT_IDENTIFIER;
|
||||
private static final String CLIENT_URL = "/fineract-provider/api/v1/clients";
|
||||
private static final String CLOSE_CLIENT_COMMAND = "close";
|
||||
private static final String REACTIVATE_CLIENT_COMMAND = "reactivate";
|
||||
private static final String REJECT_CLIENT_COMMAND = "reject";
|
||||
private static final String ACTIVATE_CLIENT_COMMAND = "activate";
|
||||
private static final String WITHDRAW_CLIENT_COMMAND = "withdraw";
|
||||
private static final String UNDOREJECT_CLIENT_COMMAND = "undoRejection";
|
||||
private static final String UNDOWITHDRAWN_CLIENT_COMMAND = "undoWithdrawal";
|
||||
private static final Integer LEGALFORM_ID_PERSON = 1;
|
||||
private static final String CREATE_CLIENT_URL = CLIENT_URL + "?" + Utils.TENANT_IDENTIFIER;
|
||||
private static final String CLIENT_EXTERNALID_URL = CLIENT_URL + "/external-id";
|
||||
|
||||
public static final String CLOSE_CLIENT_COMMAND = "close";
|
||||
public static final String REACTIVATE_CLIENT_COMMAND = "reactivate";
|
||||
public static final String REJECT_CLIENT_COMMAND = "reject";
|
||||
public static final String ACTIVATE_CLIENT_COMMAND = "activate";
|
||||
public static final String WITHDRAW_CLIENT_COMMAND = "withdraw";
|
||||
public static final String UNDOREJECT_CLIENT_COMMAND = "undoRejection";
|
||||
public static final String UNDOWITHDRAWN_CLIENT_COMMAND = "undoWithdrawal";
|
||||
public static final String DEFAULT_OFFICE_ID = "1";
|
||||
public static final Integer LEGALFORM_ID_PERSON = 1;
|
||||
public static final Integer LEGALFORM_ID_ENTITY = 2;
|
||||
public static final String CREATED_DATE = Utils.getLocalDateOfTenant().minusDays(5).format(Utils.dateFormatter);
|
||||
public static final String CREATED_DATE_PLUS_ONE = Utils.getLocalDateOfTenant().minusDays(4).format(Utils.dateFormatter);
|
||||
public static final String CREATED_DATE_PLUS_TWO = Utils.getLocalDateOfTenant().minusDays(3).format(Utils.dateFormatter);
|
||||
|
||||
public static final String DEFAULT_DATE = "04 March 2011";
|
||||
|
||||
private static final Gson GSON = new JSON().getGson();
|
||||
|
||||
private final RequestSpecification requestSpec;
|
||||
@@ -84,8 +96,55 @@ public class ClientHelper extends IntegrationTest {
|
||||
return ok(fineract().clients.create6(request));
|
||||
}
|
||||
|
||||
public static PostClientsResponse addClientAsPerson(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
|
||||
final String jsonPayload) {
|
||||
final String response = Utils.performServerPost(requestSpec, responseSpec, CREATE_CLIENT_URL, jsonPayload);
|
||||
log.info("{}", response);
|
||||
return GSON.fromJson(response, PostClientsResponse.class);
|
||||
}
|
||||
|
||||
public static PutClientsClientIdResponse updateClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
|
||||
final String externalId, final String jsonPayload) {
|
||||
final String url = CLIENT_EXTERNALID_URL + "/" + externalId + "?" + Utils.TENANT_IDENTIFIER;
|
||||
final String response = Utils.performServerPut(requestSpec, responseSpec, url, jsonPayload);
|
||||
log.info("{}", response);
|
||||
return GSON.fromJson(response, PutClientsClientIdResponse.class);
|
||||
}
|
||||
|
||||
public static DeleteClientsClientIdResponse deleteClient(final RequestSpecification requestSpec,
|
||||
final ResponseSpecification responseSpec, final String externalId) {
|
||||
final String url = CLIENT_EXTERNALID_URL + "/" + externalId + "?" + Utils.TENANT_IDENTIFIER;
|
||||
final String response = Utils.performServerDelete(requestSpec, responseSpec, url, Utils.emptyJson(), null);
|
||||
log.info("{}", response);
|
||||
return GSON.fromJson(response, DeleteClientsClientIdResponse.class);
|
||||
}
|
||||
|
||||
public static GetClientsClientIdAccountsResponse getClientAccounts(final RequestSpecification requestSpec,
|
||||
final ResponseSpecification responseSpec, final String externalId) {
|
||||
final String url = CLIENT_EXTERNALID_URL + "/" + externalId + "/accounts?" + Utils.TENANT_IDENTIFIER;
|
||||
final String response = Utils.performServerGet(requestSpec, responseSpec, url);
|
||||
log.info("{}", response);
|
||||
return GSON.fromJson(response, GetClientsClientIdAccountsResponse.class);
|
||||
}
|
||||
|
||||
public static GetClientTransferProposalDateResponse getProposedTransferDate(final RequestSpecification requestSpec,
|
||||
final ResponseSpecification responseSpec, final String externalId) {
|
||||
final String url = CLIENT_EXTERNALID_URL + "/" + externalId + "/transferproposaldate?" + Utils.TENANT_IDENTIFIER;
|
||||
final String response = Utils.performServerGet(requestSpec, responseSpec, url);
|
||||
log.info("{}", response);
|
||||
return GSON.fromJson(response, GetClientTransferProposalDateResponse.class);
|
||||
}
|
||||
|
||||
public static List<GetObligeeData> getObligeeData(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
|
||||
final String externalId) {
|
||||
final String url = CLIENT_EXTERNALID_URL + "/" + externalId + "/obligeedetails?" + Utils.TENANT_IDENTIFIER;
|
||||
final String response = Utils.performServerGet(requestSpec, responseSpec, url);
|
||||
log.info("{}", response);
|
||||
return GSON.fromJson(response, new TypeToken<List<GetObligeeData>>() {}.getType());
|
||||
}
|
||||
|
||||
public static Integer createClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) {
|
||||
return createClient(requestSpec, responseSpec, "04 March 2011");
|
||||
return createClient(requestSpec, responseSpec, DEFAULT_DATE);
|
||||
}
|
||||
|
||||
public static Integer createClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
|
||||
@@ -100,6 +159,14 @@ public class ClientHelper extends IntegrationTest {
|
||||
"clientId");
|
||||
}
|
||||
|
||||
public static PostClientsResponse createClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
|
||||
final String activationDate, final String officeId, final String externalId) {
|
||||
log.info("---------------------------------CREATING A CLIENT---------------------------------------------");
|
||||
final String response = Utils.performServerPost(requestSpec, responseSpec, CREATE_CLIENT_URL,
|
||||
getTestClientAsJSON(activationDate, officeId));
|
||||
return GSON.fromJson(response, PostClientsResponse.class);
|
||||
}
|
||||
|
||||
public static PostClientClientIdAddressesResponse createClientAddress(final RequestSpecification requestSpec,
|
||||
final ResponseSpecification responseSpec, long clientId, long addressTypeId, PostClientClientIdAddressesRequest request) {
|
||||
final String CREATE_CLIENT_ADDRESS_URL = "/fineract-provider/api/v1/client/" + clientId + "/addresses?type=" + addressTypeId + "&"
|
||||
@@ -140,7 +207,7 @@ public class ClientHelper extends IntegrationTest {
|
||||
}
|
||||
|
||||
public static Integer createClientAsPerson(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) {
|
||||
return createClientAsPerson(requestSpec, responseSpec, "04 March 2011");
|
||||
return createClientAsPerson(requestSpec, responseSpec, DEFAULT_DATE);
|
||||
}
|
||||
|
||||
public static Integer createClientAsPerson(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
|
||||
@@ -153,7 +220,7 @@ public class ClientHelper extends IntegrationTest {
|
||||
|
||||
log.info(
|
||||
"---------------------------------CREATING A CLIENT NON PERSON(ORGANISATION)---------------------------------------------");
|
||||
return Utils.performServerPost(requestSpec, responseSpec, CREATE_CLIENT_URL, getTestPersonClientAsJSON(activationDate, officeId),
|
||||
return Utils.performServerPost(requestSpec, responseSpec, CREATE_CLIENT_URL, getTestClientAsJSON(activationDate, officeId),
|
||||
"clientId");
|
||||
}
|
||||
|
||||
@@ -167,7 +234,7 @@ public class ClientHelper extends IntegrationTest {
|
||||
}
|
||||
|
||||
public static Integer createClientAsEntity(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) {
|
||||
return createClientAsEntity(requestSpec, responseSpec, "04 March 2011");
|
||||
return createClientAsEntity(requestSpec, responseSpec, DEFAULT_DATE);
|
||||
}
|
||||
|
||||
public static Integer createClientAsEntity(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
|
||||
@@ -190,7 +257,7 @@ public class ClientHelper extends IntegrationTest {
|
||||
|
||||
public static Integer createClientForAccountPreference(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
|
||||
final Integer clientType, String jsonAttributeToGetBack) {
|
||||
final String activationDate = "04 March 2011";
|
||||
final String activationDate = DEFAULT_DATE;
|
||||
final String officeId = "1";
|
||||
log.info(
|
||||
"---------------------------------CREATING A CLIENT BASED ON ACCOUNT PREFERENCE---------------------------------------------");
|
||||
@@ -212,15 +279,36 @@ public class ClientHelper extends IntegrationTest {
|
||||
return (Integer) getClient(requestSpec, responseSpec, clientId, "staffId");
|
||||
}
|
||||
|
||||
public static String getTestClientAsJSON(final String dateOfJoining, final String officeId) {
|
||||
final HashMap<String, Object> map = new HashMap<>();
|
||||
public static HashMap<String, Object> setInitialClientValues(final String officeId, final Integer legalFormId) {
|
||||
return setInitialClientValues(officeId, legalFormId, randomIDGenerator("ID_", 7));
|
||||
}
|
||||
|
||||
public static HashMap<String, Object> setInitialClientValues(final String officeId, final Integer legalFormId,
|
||||
final String externalId) {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("officeId", officeId);
|
||||
map.put("legalFormId", LEGALFORM_ID_PERSON);
|
||||
map.put("legalFormId", legalFormId);
|
||||
map.put("firstname", Utils.randomNameGenerator("Client_FirstName_", 5));
|
||||
map.put("lastname", Utils.randomNameGenerator("Client_LastName_", 4));
|
||||
map.put("externalId", randomIDGenerator("ID_", 7));
|
||||
if (externalId != null) {
|
||||
map.put("externalId", externalId);
|
||||
}
|
||||
map.put("dateFormat", Utils.DATE_FORMAT);
|
||||
map.put("locale", "en");
|
||||
return map;
|
||||
}
|
||||
|
||||
public static String getBasicClientAsJSON(final String officeId, final Integer legalFormId, final String externalId) {
|
||||
HashMap<String, Object> map = setInitialClientValues(officeId, legalFormId, externalId);
|
||||
map.put("active", "true");
|
||||
map.put("activationDate", DEFAULT_DATE);
|
||||
final String basicClientAsJson = GSON.toJson(map);
|
||||
log.info("Client JSON : {}", basicClientAsJson);
|
||||
return basicClientAsJson;
|
||||
}
|
||||
|
||||
public static String getTestClientAsJSON(final String dateOfJoining, final String officeId) {
|
||||
HashMap<String, Object> map = setInitialClientValues(officeId, LEGALFORM_ID_PERSON);
|
||||
map.put("active", "true");
|
||||
map.put("activationDate", dateOfJoining);
|
||||
final String testClientAsJson = GSON.toJson(map);
|
||||
@@ -229,14 +317,7 @@ public class ClientHelper extends IntegrationTest {
|
||||
}
|
||||
|
||||
public static String getTestClientAsJSONPending(final String submittedOnDate, final String officeId) {
|
||||
final HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("officeId", officeId);
|
||||
map.put("legalFormId", LEGALFORM_ID_PERSON);
|
||||
map.put("firstname", Utils.randomNameGenerator("Client_FirstName_", 5));
|
||||
map.put("lastname", Utils.randomNameGenerator("Client_LastName_", 4));
|
||||
map.put("externalId", randomIDGenerator("ID_", 7));
|
||||
map.put("dateFormat", Utils.DATE_FORMAT);
|
||||
map.put("locale", "en");
|
||||
HashMap<String, Object> map = setInitialClientValues(officeId, LEGALFORM_ID_PERSON);
|
||||
map.put("active", "false");
|
||||
map.put("submittedOnDate", submittedOnDate);
|
||||
log.info("map : {}", map);
|
||||
@@ -244,14 +325,7 @@ public class ClientHelper extends IntegrationTest {
|
||||
}
|
||||
|
||||
public static String getTestPendingClientWithDatatableAsJson(final String registeredTableName) {
|
||||
final HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("officeId", "1");
|
||||
map.put("legalFormId", LEGALFORM_ID_PERSON);
|
||||
map.put("firstname", Utils.randomNameGenerator("Client_FirstName_", 5));
|
||||
map.put("lastname", Utils.randomNameGenerator("Client_LastName_", 4));
|
||||
map.put("externalId", randomIDGenerator("ID_", 7));
|
||||
map.put("dateFormat", Utils.DATE_FORMAT);
|
||||
map.put("locale", "en");
|
||||
HashMap<String, Object> map = setInitialClientValues("1", LEGALFORM_ID_PERSON);
|
||||
map.put("active", "false");
|
||||
map.put("submittedOnDate", "04 March 2014");
|
||||
String requestJson = getTestDatatableAsJson(map, registeredTableName);
|
||||
@@ -320,7 +394,7 @@ public class ClientHelper extends IntegrationTest {
|
||||
map.put("locale", "en");
|
||||
map.put("active", "true");
|
||||
map.put("activationDate", dateOfJoining);
|
||||
map.put("legalFormId", 2);
|
||||
map.put("legalFormId", LEGALFORM_ID_ENTITY);
|
||||
|
||||
final HashMap<String, Object> clientNonPersonMap = new HashMap<>();
|
||||
clientNonPersonMap.put("constitutionId", soleProprietorCodeValueId);
|
||||
@@ -331,14 +405,7 @@ public class ClientHelper extends IntegrationTest {
|
||||
}
|
||||
|
||||
public static String getTestClientWithClientTypeAsJSON(final String dateOfJoining, final String officeId, final String clientType) {
|
||||
final HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("officeId", officeId);
|
||||
map.put("legalFormId", LEGALFORM_ID_PERSON);
|
||||
map.put("firstname", Utils.randomNameGenerator("Client_FirstName_", 5));
|
||||
map.put("lastname", Utils.randomNameGenerator("Client_LastName_", 4));
|
||||
map.put("externalId", randomIDGenerator("ID_", 7));
|
||||
map.put("dateFormat", Utils.DATE_FORMAT);
|
||||
map.put("locale", "en");
|
||||
HashMap<String, Object> map = setInitialClientValues("1", LEGALFORM_ID_PERSON);
|
||||
map.put("active", "true");
|
||||
map.put("activationDate", dateOfJoining);
|
||||
map.put("clientTypeId", clientType);
|
||||
@@ -367,6 +434,13 @@ public class ClientHelper extends IntegrationTest {
|
||||
return GSON.fromJson(clientResponseStr, GetClientsClientIdResponse.class);
|
||||
}
|
||||
|
||||
public static GetClientsClientIdResponse getClientByExternalId(final RequestSpecification requestSpec,
|
||||
final ResponseSpecification responseSpec, final String externalId) {
|
||||
final String url = CLIENT_EXTERNALID_URL + "/" + externalId + "?" + Utils.TENANT_IDENTIFIER;
|
||||
final String response = Utils.performServerGet(requestSpec, responseSpec, url);
|
||||
return GSON.fromJson(response, GetClientsClientIdResponse.class);
|
||||
}
|
||||
|
||||
public static List<GetClientClientIdAddressesResponse> getClientAddresses(final RequestSpecification requestSpec,
|
||||
final ResponseSpecification responseSpec, final int clientId) {
|
||||
final String GET_CLIENT_ADDRESSES_URL = "/fineract-provider/api/v1/client/" + clientId + "/addresses?" + Utils.TENANT_IDENTIFIER;
|
||||
@@ -400,7 +474,7 @@ public class ClientHelper extends IntegrationTest {
|
||||
return Utils.randomStringGenerator(prefix, lenOfRandomSuffix, "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
|
||||
}
|
||||
|
||||
private String getCloseClientAsJSON() {
|
||||
public String getCloseClientAsJSON() {
|
||||
final HashMap<String, String> map = new HashMap<>();
|
||||
|
||||
/* Retrieve Code id for the Code "ClientClosureReason" */
|
||||
@@ -418,20 +492,18 @@ public class ClientHelper extends IntegrationTest {
|
||||
map.put("closureDate", CREATED_DATE_PLUS_ONE);
|
||||
|
||||
String clientJson = GSON.toJson(map);
|
||||
log.info(clientJson);
|
||||
log.info("{}", clientJson);
|
||||
return clientJson;
|
||||
|
||||
}
|
||||
|
||||
private String getReactivateClientAsJSON() {
|
||||
public String getReactivateClientAsJSON() {
|
||||
final HashMap<String, String> map = new HashMap<>();
|
||||
map.put("locale", CommonConstants.LOCALE);
|
||||
map.put("dateFormat", CommonConstants.DATE_FORMAT);
|
||||
map.put("reactivationDate", CREATED_DATE_PLUS_ONE);
|
||||
String clientJson = GSON.toJson(map);
|
||||
log.info(clientJson);
|
||||
log.info("{}", clientJson);
|
||||
return clientJson;
|
||||
|
||||
}
|
||||
|
||||
private String getUndoRejectClientAsJSON(final String date) {
|
||||
@@ -440,7 +512,7 @@ public class ClientHelper extends IntegrationTest {
|
||||
map.put("dateFormat", CommonConstants.DATE_FORMAT);
|
||||
map.put("reopenedDate", date);
|
||||
String clientJson = GSON.toJson(map);
|
||||
log.info(clientJson);
|
||||
log.info("{}", clientJson);
|
||||
return clientJson;
|
||||
|
||||
}
|
||||
@@ -451,12 +523,12 @@ public class ClientHelper extends IntegrationTest {
|
||||
map.put("dateFormat", CommonConstants.DATE_FORMAT);
|
||||
map.put("reopenedDate", date);
|
||||
String clientJson = GSON.toJson(map);
|
||||
log.info(clientJson);
|
||||
log.info("{}", clientJson);
|
||||
return clientJson;
|
||||
|
||||
}
|
||||
|
||||
private String getRejectClientAsJSON() {
|
||||
public String getRejectClientAsJSON() {
|
||||
final HashMap<String, String> map = new HashMap<>();
|
||||
/* Retrieve Code id for the Code "ClientRejectReason" */
|
||||
String codeName = "ClientRejectReason";
|
||||
@@ -473,18 +545,18 @@ public class ClientHelper extends IntegrationTest {
|
||||
map.put("rejectionDate", CREATED_DATE_PLUS_ONE);
|
||||
map.put("rejectionReasonId", rejectionReasonId.toString());
|
||||
String clientJson = GSON.toJson(map);
|
||||
log.info(clientJson);
|
||||
log.info("{}", clientJson);
|
||||
return clientJson;
|
||||
|
||||
}
|
||||
|
||||
private static String getActivateClientAsJSON(String date) {
|
||||
public static String getActivateClientAsJSON(String date) {
|
||||
final HashMap<String, String> map = new HashMap<>();
|
||||
map.put("locale", CommonConstants.LOCALE);
|
||||
map.put("dateFormat", CommonConstants.DATE_FORMAT);
|
||||
map.put("activationDate", date);
|
||||
String clientJson = GSON.toJson(map);
|
||||
log.info(clientJson);
|
||||
log.info("{}", clientJson);
|
||||
return clientJson;
|
||||
}
|
||||
|
||||
@@ -507,7 +579,6 @@ public class ClientHelper extends IntegrationTest {
|
||||
String clientJson = GSON.toJson(map);
|
||||
log.info(clientJson);
|
||||
return clientJson;
|
||||
|
||||
}
|
||||
|
||||
public static String getSpecifiedDueDateChargesClientAsJSON(final String chargeId, final String dueDate) {
|
||||
@@ -622,6 +693,13 @@ public class ClientHelper extends IntegrationTest {
|
||||
return response;
|
||||
}
|
||||
|
||||
public static PostClientsClientIdResponse performClientActionUsingExternalId(final RequestSpecification requestSpec,
|
||||
final ResponseSpecification responseSpec, final String externalId, final String command, final String jsonPayload) {
|
||||
final String url = CLIENT_EXTERNALID_URL + "/" + externalId + "?" + Utils.TENANT_IDENTIFIER + "&command=" + command;
|
||||
final String response = Utils.performServerPost(requestSpec, responseSpec, url, jsonPayload);
|
||||
return GSON.fromJson(response, PostClientsClientIdResponse.class);
|
||||
}
|
||||
|
||||
public static Integer addChargesForClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
|
||||
final Integer clientId, final String request) {
|
||||
log.info("--------------------------------- ADD CHARGES FOR Client --------------------------------");
|
||||
@@ -711,6 +789,6 @@ public class ClientHelper extends IntegrationTest {
|
||||
return new PostClientsRequest().officeId(1).legalFormId(LEGALFORM_ID_PERSON)
|
||||
.firstname(Utils.randomNameGenerator("Client_FirstName_", 5)).lastname(Utils.randomNameGenerator("Client_LastName_", 5))
|
||||
.externalId(randomIDGenerator("ID_", 7)).dateFormat(Utils.DATE_FORMAT).locale("en").active(true)
|
||||
.activationDate("04 March 2011");
|
||||
.activationDate(DEFAULT_DATE);
|
||||
}
|
||||
}
|
||||
|
||||
+15
@@ -18,6 +18,9 @@
|
||||
*/
|
||||
package org.apache.fineract.integrationtests.common;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import io.restassured.specification.RequestSpecification;
|
||||
import io.restassured.specification.ResponseSpecification;
|
||||
@@ -38,6 +41,8 @@ public class GlobalConfigurationHelper {
|
||||
private final RequestSpecification requestSpec;
|
||||
private final ResponseSpecification responseSpec;
|
||||
|
||||
public static final String ENABLE_AUTOGENERATED_EXTERNAL_ID = "enable-auto-generated-external-id";
|
||||
|
||||
public static ArrayList<HashMap> getAllGlobalConfigurations(final RequestSpecification requestSpec,
|
||||
final ResponseSpecification responseSpec) {
|
||||
final String GET_ALL_GLOBAL_CONFIG_URL = "/fineract-provider/api/v1/configurations?" + Utils.TENANT_IDENTIFIER;
|
||||
@@ -614,4 +619,14 @@ public class GlobalConfigurationHelper {
|
||||
long configId = 44;
|
||||
return updateEnabledFlagForGlobalConfiguration(requestSpec, responseSpec, configId, enabled);
|
||||
}
|
||||
|
||||
public static void manageConfigurations(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
|
||||
final String configurationName, final boolean enabled) {
|
||||
GlobalConfigurationPropertyData configuration = getGlobalConfigurationByName(requestSpec, responseSpec, configurationName);
|
||||
assertNotNull(configuration);
|
||||
updateEnabledFlagForGlobalConfiguration(requestSpec, responseSpec, configuration.getId(), enabled);
|
||||
GlobalConfigurationPropertyData updatedConfiguration = getGlobalConfigurationByName(requestSpec, responseSpec, configurationName);
|
||||
assertEquals(updatedConfiguration.getEnabled(), enabled);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user