backend-api BankAccountNewAction убрал проверку на RUB

This commit is contained in:
AKurakin 2023-05-27 17:49:14 +03:00
parent 5e11208758
commit 8e3b49220a

View file

@ -48,24 +48,6 @@ public class BankAccountNewAction implements IAction<BankAccountNewRequest> {
@JsonProperty
private Long companyId;
@Override
public Collection<EnumMessage> validate() {
List<EnumMessage> errors = new ArrayList<>();
if ("RUB".equalsIgnoreCase(this.currency) && !StringUtils.hasLength(correspondentAccount)) {
errors.add(new EnumMessage(BackEndError.ValidationError, "correspondentAccount"));
}
if ("RUB".equalsIgnoreCase(this.currency) && !StringUtils.hasLength(correspondentAccountName)) {
errors.add(new EnumMessage(BackEndError.ValidationError, "correspondentAccountName"));
}
if ("RUB".equalsIgnoreCase(this.currency) && !StringUtils.hasLength(taxpayerIdentificationNumber)) {
errors.add(new EnumMessage(BackEndError.ValidationError, "taxpayerIdentificationNumber"));
}
if ("RUB".equalsIgnoreCase(this.currency) && !StringUtils.hasLength(taxRegistrationReasonCode)) {
errors.add(new EnumMessage(BackEndError.ValidationError, "taxRegistrationReasonCode"));
}
return errors.isEmpty() ? Collections.emptyList() : errors;
}
@Override
public BankAccountNewRequest toRequest() {
var req = new BankAccountNewRequest();