mirror of
https://github.com/valitydev/cashier.git
synced 2024-11-06 01:45:17 +00:00
BJ-956: Bump damsel
This commit is contained in:
parent
3532bfd940
commit
690d9cb463
2
pom.xml
2
pom.xml
@ -26,7 +26,7 @@
|
||||
<java.version>11</java.version>
|
||||
<exposed.ports>${server.port}</exposed.ports>
|
||||
<geck.version>0.6.4</geck.version>
|
||||
<damsel.version>1.420-7ef2435</damsel.version>
|
||||
<damsel.version>1.430-a1072d0</damsel.version>
|
||||
<fistful-proto.version>1.36-683822a</fistful-proto.version>
|
||||
<cashreg-proto.version>1.14-25a9f63</cashreg-proto.version>
|
||||
<spring.kafka.version>2.2.3.RELEASE</spring.kafka.version>
|
||||
|
@ -4,10 +4,7 @@ import com.rbkmoney.cashier.domain.CashRegister;
|
||||
import com.rbkmoney.cashier.util.JsonMapper;
|
||||
import com.rbkmoney.damsel.claim_management.InvalidChangeset;
|
||||
import com.rbkmoney.damsel.claim_management.Modification;
|
||||
import com.rbkmoney.damsel.domain.CashRegisterProvider;
|
||||
import com.rbkmoney.damsel.domain.CashRegisterProviderParameter;
|
||||
import com.rbkmoney.damsel.domain.CashRegisterProviderParameterType;
|
||||
import com.rbkmoney.damsel.domain.CashRegisterProviderRef;
|
||||
import com.rbkmoney.damsel.domain.*;
|
||||
import com.rbkmoney.damsel.domain_config.Head;
|
||||
import com.rbkmoney.damsel.domain_config.Reference;
|
||||
import com.rbkmoney.damsel.domain_config.RepositoryClientSrv;
|
||||
@ -63,10 +60,10 @@ public class CashRegisterValidator {
|
||||
cashRegisterProvider.getName());
|
||||
|
||||
Map<String, String> providerParams = JsonMapper.toMap(cashRegister.getProviderParams());
|
||||
List<CashRegisterProviderParameter> paramsSchema = cashRegisterProvider.getParamsSchema();
|
||||
List<ProviderParameter> paramsSchema = cashRegisterProvider.getParamsSchema();
|
||||
|
||||
Map<String, String> errors = new HashMap<>();
|
||||
for (CashRegisterProviderParameter providerParam : paramsSchema) {
|
||||
for (ProviderParameter providerParam : paramsSchema) {
|
||||
String cashRegisterParam = providerParams.get(providerParam.getId());
|
||||
|
||||
if (!providerParam.isIsRequired() && cashRegisterParam == null) {
|
||||
@ -78,7 +75,7 @@ public class CashRegisterValidator {
|
||||
continue;
|
||||
}
|
||||
|
||||
CashRegisterProviderParameterType providerParamType = providerParam.getType();
|
||||
ProviderParameterType providerParamType = providerParam.getType();
|
||||
|
||||
if (providerParamType.isSetIntegerType() && !cashRegisterParam.matches("\\d+")) {
|
||||
errors.put(providerParam.getId(), "Field must be an integer");
|
||||
|
@ -14,7 +14,7 @@ import org.junit.Test;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.rbkmoney.damsel.domain.CashRegisterProviderParameterType.*;
|
||||
import static com.rbkmoney.damsel.domain.ProviderParameterType.*;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
@ -71,23 +71,23 @@ public class CashRegisterValidatorTest {
|
||||
}
|
||||
|
||||
private VersionedObject versionedObject() {
|
||||
List<CashRegisterProviderParameter> paramsSchema = List.of(
|
||||
new CashRegisterProviderParameter()
|
||||
List<ProviderParameter> paramsSchema = List.of(
|
||||
new ProviderParameter()
|
||||
.setId("name")
|
||||
.setIsRequired(true)
|
||||
.setType(string_type(new CashRegisterProviderParameterString())),
|
||||
new CashRegisterProviderParameter()
|
||||
.setType(string_type(new ProviderParameterString())),
|
||||
new ProviderParameter()
|
||||
.setId("password")
|
||||
.setIsRequired(false)
|
||||
.setType(password_type(new CashRegisterProviderParameterPassword())),
|
||||
new CashRegisterProviderParameter()
|
||||
.setType(password_type(new ProviderParameterPassword())),
|
||||
new ProviderParameter()
|
||||
.setId("tel")
|
||||
.setIsRequired(true)
|
||||
.setType(integer_type(new CashRegisterProviderParameterInteger())),
|
||||
new CashRegisterProviderParameter()
|
||||
.setType(integer_type(new ProviderParameterInteger())),
|
||||
new ProviderParameter()
|
||||
.setId("url")
|
||||
.setIsRequired(true)
|
||||
.setType(url_type(new CashRegisterProviderParameterUrl())));
|
||||
.setType(url_type(new ProviderParameterUrl())));
|
||||
|
||||
return new VersionedObject()
|
||||
.setObject(DomainObject.cash_register_provider(new CashRegisterProviderObject()
|
||||
|
Loading…
Reference in New Issue
Block a user