mirror of
https://github.com/valitydev/fraudbusters-mg-connector.git
synced 2024-11-06 01:15:17 +00:00
Fix proto (#11)
This commit is contained in:
parent
d6288f3d0d
commit
4a28a6483c
4
pom.xml
4
pom.xml
@ -25,8 +25,8 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
<machinegun-proto.version>1.21-e4784ab</machinegun-proto.version>
|
||||
<fraudbusters-proto.version>1.102-269908f</fraudbusters-proto.version>
|
||||
<fistful-proto.version>1.133-c484877</fistful-proto.version>
|
||||
<fraudbusters-proto.version>1.108-0800fde</fraudbusters-proto.version>
|
||||
<fistful-proto.version>1.143-711814e</fistful-proto.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -4,9 +4,7 @@ import dev.vality.damsel.domain.BankCard;
|
||||
import dev.vality.damsel.domain.CountryCode;
|
||||
import dev.vality.damsel.domain.LegacyBankCardPaymentSystem;
|
||||
import dev.vality.damsel.domain.PaymentSystemRef;
|
||||
import dev.vality.damsel.fraudbusters.CryptoWallet;
|
||||
import dev.vality.damsel.fraudbusters.DigitalWallet;
|
||||
import dev.vality.damsel.fraudbusters.Resource;
|
||||
import dev.vality.damsel.fraudbusters.*;
|
||||
import dev.vality.fraudbusters.mg.connector.exception.UnknownResourceException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
@ -41,6 +39,16 @@ public class FistfulResourceToDomainResourceConverter
|
||||
.getDigitalWallet().getPaymentService().getId());
|
||||
}
|
||||
resource.setDigitalWallet(digitalWallet);
|
||||
} else if (fistfulResource.isSetGeneric()) {
|
||||
GenericPaymentTool genericPaymentTool = new GenericPaymentTool();
|
||||
genericPaymentTool.setId(fistfulResource.getGeneric().getGeneric().getProvider().getId());
|
||||
if (fistfulResource.getGeneric().getGeneric().isSetData()) {
|
||||
genericPaymentTool.setContent(new Content()
|
||||
.setData(fistfulResource.getGeneric().getGeneric().getData().getData())
|
||||
.setType(fistfulResource.getGeneric().getGeneric().getData().getType())
|
||||
);
|
||||
}
|
||||
resource.setGeneric(genericPaymentTool);
|
||||
} else {
|
||||
log.error("Unknown resource type: {}", fistfulResource);
|
||||
throw new UnknownResourceException();
|
||||
|
Loading…
Reference in New Issue
Block a user