mirror of
https://github.com/valitydev/fraudbusters-mg-connector.git
synced 2024-11-06 01:15:17 +00:00
[APM-7] New structure in DigitalWallet (#4)
1) fistful-proto migration from rbk.money to vality.dev 2) fistful-proto new DigitalWallet structure (APM-7) 3) added github/actions
This commit is contained in:
parent
bd6011c25a
commit
a52b6b132d
10
.github/workflows/build.yml
vendored
Normal file
10
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
name: Maven Build Artifact
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
uses: valitydev/base-workflow/.github/workflows/maven-service-build.yml@v1
|
18
.github/workflows/deploy.yml
vendored
Normal file
18
.github/workflows/deploy.yml
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
name: Maven Deploy Artifact
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
- 'main'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
uses: valitydev/base-workflow/.github/workflows/maven-service-deploy.yml@v1
|
||||
secrets:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
mm-webhook-url: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
|
4
pom.xml
4
pom.xml
@ -26,7 +26,7 @@
|
||||
|
||||
<machinegun-proto.version>1.18-d814d69</machinegun-proto.version>
|
||||
<fraudbusters-proto.version>1.99-2a8f6ca</fraudbusters-proto.version>
|
||||
<fistful-proto.version>1.128-d331fce</fistful-proto.version>
|
||||
<fistful-proto.version>1.133-c484877</fistful-proto.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@ -79,7 +79,7 @@
|
||||
<artifactId>filter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.rbkmoney</groupId>
|
||||
<groupId>dev.vality</groupId>
|
||||
<artifactId>fistful-proto</artifactId>
|
||||
<version>${fistful-proto.version}</version>
|
||||
</dependency>
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.rbkmoney.fraudbusters.mg.connector.config;
|
||||
|
||||
import com.rbkmoney.damsel.payment_processing.InvoicingSrv;
|
||||
import com.rbkmoney.fistful.withdrawal.ManagementSrv;
|
||||
import dev.vality.fistful.withdrawal.ManagementSrv;
|
||||
import com.rbkmoney.woody.thrift.impl.http.THSpawnClientBuilder;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
@ -33,21 +33,21 @@ public class HgConfig {
|
||||
}
|
||||
|
||||
@Bean
|
||||
public com.rbkmoney.fistful.destination.ManagementSrv.Iface destinationClient(
|
||||
public dev.vality.fistful.destination.ManagementSrv.Iface destinationClient(
|
||||
@Value("${service.destination.url}") Resource resource,
|
||||
@Value("${service.destination.networkTimeout}") int networkTimeout) throws IOException {
|
||||
return new THSpawnClientBuilder()
|
||||
.withNetworkTimeout(networkTimeout)
|
||||
.withAddress(resource.getURI()).build(com.rbkmoney.fistful.destination.ManagementSrv.Iface.class);
|
||||
.withAddress(resource.getURI()).build(dev.vality.fistful.destination.ManagementSrv.Iface.class);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public com.rbkmoney.fistful.wallet.ManagementSrv.Iface walletClient(
|
||||
public dev.vality.fistful.wallet.ManagementSrv.Iface walletClient(
|
||||
@Value("${service.wallet.url}") Resource resource,
|
||||
@Value("${service.wallet.networkTimeout}") int networkTimeout) throws IOException {
|
||||
return new THSpawnClientBuilder()
|
||||
.withNetworkTimeout(networkTimeout)
|
||||
.withAddress(resource.getURI()).build(com.rbkmoney.fistful.wallet.ManagementSrv.Iface.class);
|
||||
.withAddress(resource.getURI()).build(dev.vality.fistful.wallet.ManagementSrv.Iface.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -10,12 +10,12 @@ import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class FistfulAccountToDomainAccountConverter
|
||||
implements Converter<com.rbkmoney.fistful.account.Account, Account> {
|
||||
implements Converter<dev.vality.fistful.account.Account, Account> {
|
||||
|
||||
private final FistfulCurrencyToDomainCurrencyConverter convertCurrency;
|
||||
|
||||
@Override
|
||||
public Account convert(com.rbkmoney.fistful.account.Account fistfulAccount) {
|
||||
public Account convert(dev.vality.fistful.account.Account fistfulAccount) {
|
||||
log.debug("Start convert fistfulAccount : {}", fistfulAccount);
|
||||
final Account account = new Account();
|
||||
account.setCurrency(convertCurrency.convert(fistfulAccount.getCurrency()));
|
||||
|
@ -9,13 +9,13 @@ import org.springframework.stereotype.Component;
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class FistfulCashToDomainCashConverter implements Converter<com.rbkmoney.fistful.base.Cash, Cash> {
|
||||
public class FistfulCashToDomainCashConverter implements Converter<dev.vality.fistful.base.Cash, Cash> {
|
||||
|
||||
private final FistfulCurrencyToDomainCurrencyConverter convertCurrency;
|
||||
|
||||
@Override
|
||||
public Cash convert(com.rbkmoney.fistful.base.Cash cash) {
|
||||
final com.rbkmoney.fistful.base.CurrencyRef currency = cash.getCurrency();
|
||||
public Cash convert(dev.vality.fistful.base.Cash cash) {
|
||||
final dev.vality.fistful.base.CurrencyRef currency = cash.getCurrency();
|
||||
return new Cash()
|
||||
.setAmount(cash.getAmount())
|
||||
.setCurrency(convertCurrency.convert(currency));
|
||||
|
@ -8,10 +8,10 @@ import org.springframework.stereotype.Component;
|
||||
@Slf4j
|
||||
@Component
|
||||
public class FistfulCurrencyToDomainCurrencyConverter
|
||||
implements Converter<com.rbkmoney.fistful.base.CurrencyRef, CurrencyRef> {
|
||||
implements Converter<dev.vality.fistful.base.CurrencyRef, CurrencyRef> {
|
||||
|
||||
@Override
|
||||
public CurrencyRef convert(com.rbkmoney.fistful.base.CurrencyRef currency) {
|
||||
public CurrencyRef convert(dev.vality.fistful.base.CurrencyRef currency) {
|
||||
return new CurrencyRef()
|
||||
.setSymbolicCode(currency.getSymbolicCode());
|
||||
}
|
||||
|
@ -16,14 +16,14 @@ import org.springframework.stereotype.Component;
|
||||
@Slf4j
|
||||
@Component
|
||||
public class FistfulResourceToDomainResourceConverter
|
||||
implements Converter<com.rbkmoney.fistful.base.Resource, Resource> {
|
||||
implements Converter<dev.vality.fistful.base.Resource, Resource> {
|
||||
|
||||
public static final PaymentSystemRef DEFAULT_PAYMENT_SYSTEM =
|
||||
new PaymentSystemRef(LegacyBankCardPaymentSystem.visa.name());
|
||||
public static final String UNKNOWN = "UNKNOWN";
|
||||
|
||||
@Override
|
||||
public Resource convert(com.rbkmoney.fistful.base.Resource fistfulResource) {
|
||||
public Resource convert(dev.vality.fistful.base.Resource fistfulResource) {
|
||||
log.debug("Start convert fistfulResource : {}", fistfulResource);
|
||||
Resource resource = new Resource();
|
||||
if (fistfulResource.isSetBankCard()) {
|
||||
@ -37,9 +37,9 @@ public class FistfulResourceToDomainResourceConverter
|
||||
} else if (fistfulResource.isSetDigitalWallet()) {
|
||||
DigitalWallet digitalWallet = new DigitalWallet()
|
||||
.setId(fistfulResource.getDigitalWallet().getDigitalWallet().getId());
|
||||
if (fistfulResource.getDigitalWallet().getDigitalWallet().getData() != null) {
|
||||
if (fistfulResource.getDigitalWallet().getDigitalWallet().getPaymentService() != null) {
|
||||
digitalWallet.setDigitalDataProvider(fistfulResource.getDigitalWallet()
|
||||
.getDigitalWallet().getData().getSetField().getFieldName());
|
||||
.getDigitalWallet().getPaymentService().getId());
|
||||
}
|
||||
resource.setDigitalWallet(digitalWallet);
|
||||
} else {
|
||||
@ -50,14 +50,14 @@ public class FistfulResourceToDomainResourceConverter
|
||||
return resource;
|
||||
}
|
||||
|
||||
private BankCard convertBankCard(com.rbkmoney.fistful.base.BankCard bankCardFrom) {
|
||||
private BankCard convertBankCard(dev.vality.fistful.base.BankCard bankCardFrom) {
|
||||
BankCard bankCard = new BankCard();
|
||||
bankCard.setToken(bankCardFrom.getToken());
|
||||
bankCard.setIssuerCountry(bankCardFrom.isSetIssuerCountry()
|
||||
? CountryCode.valueOf(bankCardFrom.getIssuerCountry().name())
|
||||
: null);
|
||||
bankCard.setPaymentSystem(bankCardFrom.isSetPaymentSystem()
|
||||
? new PaymentSystemRef(PaymentSystemUtil.getFistfulPaymentSystemName(bankCardFrom))
|
||||
? new PaymentSystemRef(bankCardFrom.getPaymentSystem().getId())
|
||||
: DEFAULT_PAYMENT_SYSTEM);
|
||||
bankCard.setLastDigits(bankCardFrom.getMaskedPan() != null
|
||||
? bankCardFrom.getMaskedPan()
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.rbkmoney.fraudbusters.mg.connector.converter;
|
||||
|
||||
import com.rbkmoney.fistful.withdrawal.TimestampedChange;
|
||||
import dev.vality.fistful.withdrawal.TimestampedChange;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.thrift.TDeserializer;
|
||||
import org.apache.thrift.TException;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.rbkmoney.fraudbusters.mg.connector.factory;
|
||||
|
||||
|
||||
import com.rbkmoney.fistful.base.EventRange;
|
||||
import dev.vality.fistful.base.EventRange;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.rbkmoney.fraudbusters.mg.connector.factory;
|
||||
|
||||
import com.rbkmoney.damsel.fraudbusters.Withdrawal;
|
||||
import com.rbkmoney.fistful.withdrawal.TimestampedChange;
|
||||
import dev.vality.fistful.withdrawal.TimestampedChange;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.constant.StreamType;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.exception.StreamInitializationException;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.mapper.Mapper;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.rbkmoney.fraudbusters.mg.connector.mapper.impl;
|
||||
|
||||
import com.rbkmoney.damsel.fraudbusters.Withdrawal;
|
||||
import com.rbkmoney.fistful.withdrawal.TimestampedChange;
|
||||
import dev.vality.fistful.withdrawal.TimestampedChange;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.constant.WithdrawalEventType;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.mapper.Mapper;
|
||||
import com.rbkmoney.machinegun.eventsink.MachineEvent;
|
||||
|
@ -3,10 +3,10 @@ package com.rbkmoney.fraudbusters.mg.connector.mapper.impl;
|
||||
import com.rbkmoney.damsel.fraudbusters.Resource;
|
||||
import com.rbkmoney.damsel.fraudbusters.Withdrawal;
|
||||
import com.rbkmoney.damsel.fraudbusters.WithdrawalStatus;
|
||||
import com.rbkmoney.fistful.destination.DestinationState;
|
||||
import com.rbkmoney.fistful.wallet.WalletState;
|
||||
import com.rbkmoney.fistful.withdrawal.TimestampedChange;
|
||||
import com.rbkmoney.fistful.withdrawal.WithdrawalState;
|
||||
import dev.vality.fistful.destination.DestinationState;
|
||||
import dev.vality.fistful.wallet.WalletState;
|
||||
import dev.vality.fistful.withdrawal.TimestampedChange;
|
||||
import dev.vality.fistful.withdrawal.WithdrawalState;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.constant.WithdrawalEventType;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.converter.FistfulAccountToDomainAccountConverter;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.converter.FistfulCashToDomainCashConverter;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.rbkmoney.fraudbusters.mg.connector.parser;
|
||||
|
||||
import com.rbkmoney.fistful.withdrawal.TimestampedChange;
|
||||
import dev.vality.fistful.withdrawal.TimestampedChange;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.converter.BinaryConverter;
|
||||
import com.rbkmoney.machinegun.eventsink.MachineEvent;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
@ -1,9 +1,9 @@
|
||||
package com.rbkmoney.fraudbusters.mg.connector.service;
|
||||
|
||||
|
||||
import com.rbkmoney.fistful.base.EventRange;
|
||||
import com.rbkmoney.fistful.destination.DestinationState;
|
||||
import com.rbkmoney.fistful.destination.ManagementSrv;
|
||||
import dev.vality.fistful.base.EventRange;
|
||||
import dev.vality.fistful.destination.DestinationState;
|
||||
import dev.vality.fistful.destination.ManagementSrv;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.exception.PaymentInfoNotFoundException;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.exception.PaymentInfoRequestException;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
@ -1,9 +1,9 @@
|
||||
package com.rbkmoney.fraudbusters.mg.connector.service;
|
||||
|
||||
|
||||
import com.rbkmoney.fistful.base.EventRange;
|
||||
import com.rbkmoney.fistful.wallet.ManagementSrv;
|
||||
import com.rbkmoney.fistful.wallet.WalletState;
|
||||
import dev.vality.fistful.base.EventRange;
|
||||
import dev.vality.fistful.wallet.ManagementSrv;
|
||||
import dev.vality.fistful.wallet.WalletState;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.exception.PaymentInfoNotFoundException;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.exception.PaymentInfoRequestException;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
@ -1,8 +1,8 @@
|
||||
package com.rbkmoney.fraudbusters.mg.connector.service;
|
||||
|
||||
|
||||
import com.rbkmoney.fistful.withdrawal.ManagementSrv;
|
||||
import com.rbkmoney.fistful.withdrawal.WithdrawalState;
|
||||
import dev.vality.fistful.withdrawal.ManagementSrv;
|
||||
import dev.vality.fistful.withdrawal.WithdrawalState;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.exception.PaymentInfoNotFoundException;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.exception.PaymentInfoRequestException;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.factory.FistfulEventRangeFactory;
|
||||
|
@ -2,11 +2,11 @@ package com.rbkmoney.fraudbusters.mg.connector.utils;
|
||||
|
||||
import com.rbkmoney.damsel.fraudbusters.Error;
|
||||
import com.rbkmoney.damsel.fraudbusters.ProviderInfo;
|
||||
import com.rbkmoney.fistful.base.Failure;
|
||||
import com.rbkmoney.fistful.destination.DestinationState;
|
||||
import com.rbkmoney.fistful.withdrawal.StatusChange;
|
||||
import com.rbkmoney.fistful.withdrawal.WithdrawalState;
|
||||
import com.rbkmoney.fistful.withdrawal.status.Failed;
|
||||
import dev.vality.fistful.base.Failure;
|
||||
import dev.vality.fistful.destination.DestinationState;
|
||||
import dev.vality.fistful.withdrawal.StatusChange;
|
||||
import dev.vality.fistful.withdrawal.WithdrawalState;
|
||||
import dev.vality.fistful.withdrawal.status.Failed;
|
||||
import com.rbkmoney.geck.serializer.kit.tbase.TBaseProcessor;
|
||||
import com.rbkmoney.geck.serializer.kit.tbase.TDomainToStringErrorHandler;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -38,7 +38,7 @@ public class WithdrawalModelUtil {
|
||||
error = new Error();
|
||||
final Failed failed = statusChange.getStatus().getFailed();
|
||||
if (failed.isSetFailure()) {
|
||||
final com.rbkmoney.fistful.base.Failure failure = failed.getFailure();
|
||||
final dev.vality.fistful.base.Failure failure = failed.getFailure();
|
||||
error.setErrorCode(parseError(failure))
|
||||
.setErrorReason(failure.getReason());
|
||||
|
||||
|
@ -4,8 +4,8 @@ import com.rbkmoney.damsel.domain.*;
|
||||
import com.rbkmoney.damsel.fraudbusters.Payment;
|
||||
import com.rbkmoney.damsel.payment_processing.Invoice;
|
||||
import com.rbkmoney.damsel.payment_processing.InvoicingSrv;
|
||||
import com.rbkmoney.fistful.withdrawal.ManagementSrv;
|
||||
import com.rbkmoney.fistful.withdrawal.WithdrawalState;
|
||||
import dev.vality.fistful.withdrawal.ManagementSrv;
|
||||
import dev.vality.fistful.withdrawal.WithdrawalState;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.factory.EventRangeFactory;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.mapper.impl.WithdrawalBeanUtils;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.serde.deserializer.ChargebackDeserializer;
|
||||
@ -58,9 +58,9 @@ public class FraudbustersMgConnectorApplicationTest extends KafkaAbstractTest {
|
||||
@MockBean
|
||||
ManagementSrv.Iface fistfulClient;
|
||||
@MockBean
|
||||
com.rbkmoney.fistful.destination.ManagementSrv.Iface destinationClient;
|
||||
dev.vality.fistful.destination.ManagementSrv.Iface destinationClient;
|
||||
@MockBean
|
||||
com.rbkmoney.fistful.wallet.ManagementSrv.Iface walletClient;
|
||||
dev.vality.fistful.wallet.ManagementSrv.Iface walletClient;
|
||||
|
||||
@Autowired
|
||||
private EventRangeFactory eventRangeFactory;
|
||||
|
@ -1,9 +1,9 @@
|
||||
package com.rbkmoney.fraudbusters.mg.connector.converter;
|
||||
|
||||
import com.rbkmoney.damsel.fraudbusters.Resource;
|
||||
import com.rbkmoney.fistful.base.ResourceBankCard;
|
||||
import com.rbkmoney.fistful.base.ResourceCryptoWallet;
|
||||
import com.rbkmoney.fistful.base.ResourceDigitalWallet;
|
||||
import dev.vality.fistful.base.ResourceBankCard;
|
||||
import dev.vality.fistful.base.ResourceCryptoWallet;
|
||||
import dev.vality.fistful.base.ResourceDigitalWallet;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.exception.UnknownResourceException;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.utils.BuildUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -26,7 +26,7 @@ class FistfulResourceToDomainResourceConverterTest {
|
||||
void convertResourceBankCardTest() {
|
||||
ResourceBankCard resourceBankCard = new ResourceBankCard();
|
||||
resourceBankCard.setBankCard(BuildUtils.buildFistfulBankCard());
|
||||
com.rbkmoney.fistful.base.Resource baseResource = new com.rbkmoney.fistful.base.Resource();
|
||||
dev.vality.fistful.base.Resource baseResource = new dev.vality.fistful.base.Resource();
|
||||
baseResource.setBankCard(resourceBankCard);
|
||||
|
||||
Resource resource = converter.convert(baseResource);
|
||||
@ -38,7 +38,7 @@ class FistfulResourceToDomainResourceConverterTest {
|
||||
void convertResourceCryptoWalletTest() {
|
||||
ResourceCryptoWallet resourceCryptoWallet = new ResourceCryptoWallet();
|
||||
resourceCryptoWallet.setCryptoWallet(BuildUtils.buildFistfulCryptoWallet());
|
||||
com.rbkmoney.fistful.base.Resource baseResource = new com.rbkmoney.fistful.base.Resource();
|
||||
dev.vality.fistful.base.Resource baseResource = new dev.vality.fistful.base.Resource();
|
||||
baseResource.setCryptoWallet(resourceCryptoWallet);
|
||||
|
||||
Resource resource = converter.convert(baseResource);
|
||||
@ -50,7 +50,7 @@ class FistfulResourceToDomainResourceConverterTest {
|
||||
void convertResourceDigitalWalletTest() {
|
||||
ResourceDigitalWallet resourceDigitalWallet = new ResourceDigitalWallet();
|
||||
resourceDigitalWallet.setDigitalWallet(BuildUtils.buildFistfulDigitalWallet());
|
||||
com.rbkmoney.fistful.base.Resource baseResource = new com.rbkmoney.fistful.base.Resource();
|
||||
dev.vality.fistful.base.Resource baseResource = new dev.vality.fistful.base.Resource();
|
||||
baseResource.setDigitalWallet(resourceDigitalWallet);
|
||||
|
||||
Resource resource = converter.convert(baseResource);
|
||||
@ -61,7 +61,7 @@ class FistfulResourceToDomainResourceConverterTest {
|
||||
@Test
|
||||
void convertUnknownResourceExceptionTest() {
|
||||
assertThrows(UnknownResourceException.class, () -> {
|
||||
converter.convert(new com.rbkmoney.fistful.base.Resource());
|
||||
converter.convert(new dev.vality.fistful.base.Resource());
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.rbkmoney.fraudbusters.mg.connector.mapper.impl;
|
||||
|
||||
import com.rbkmoney.fistful.account.Account;
|
||||
import com.rbkmoney.fistful.base.*;
|
||||
import com.rbkmoney.fistful.destination.DestinationState;
|
||||
import com.rbkmoney.fistful.wallet.WalletState;
|
||||
import com.rbkmoney.fistful.withdrawal.Change;
|
||||
import com.rbkmoney.fistful.withdrawal.StatusChange;
|
||||
import com.rbkmoney.fistful.withdrawal.TimestampedChange;
|
||||
import com.rbkmoney.fistful.withdrawal.status.Status;
|
||||
import dev.vality.fistful.account.Account;
|
||||
import dev.vality.fistful.base.*;
|
||||
import dev.vality.fistful.destination.DestinationState;
|
||||
import dev.vality.fistful.wallet.WalletState;
|
||||
import dev.vality.fistful.withdrawal.Change;
|
||||
import dev.vality.fistful.withdrawal.StatusChange;
|
||||
import dev.vality.fistful.withdrawal.TimestampedChange;
|
||||
import dev.vality.fistful.withdrawal.status.Status;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.utils.InvoiceTestConstant;
|
||||
|
||||
public class WithdrawalBeanUtils {
|
||||
|
@ -2,11 +2,11 @@ package com.rbkmoney.fraudbusters.mg.connector.mapper.impl;
|
||||
|
||||
import com.rbkmoney.damsel.fraudbusters.Withdrawal;
|
||||
import com.rbkmoney.damsel.fraudbusters.WithdrawalStatus;
|
||||
import com.rbkmoney.fistful.withdrawal.TimestampedChange;
|
||||
import com.rbkmoney.fistful.withdrawal.WithdrawalState;
|
||||
import com.rbkmoney.fistful.withdrawal.status.Failed;
|
||||
import com.rbkmoney.fistful.withdrawal.status.Pending;
|
||||
import com.rbkmoney.fistful.withdrawal.status.Status;
|
||||
import dev.vality.fistful.withdrawal.TimestampedChange;
|
||||
import dev.vality.fistful.withdrawal.WithdrawalState;
|
||||
import dev.vality.fistful.withdrawal.status.Failed;
|
||||
import dev.vality.fistful.withdrawal.status.Pending;
|
||||
import dev.vality.fistful.withdrawal.status.Status;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.converter.FistfulAccountToDomainAccountConverter;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.converter.FistfulCashToDomainCashConverter;
|
||||
import com.rbkmoney.fraudbusters.mg.connector.converter.FistfulCurrencyToDomainCurrencyConverter;
|
||||
|
@ -5,10 +5,8 @@ import com.rbkmoney.damsel.domain.*;
|
||||
import com.rbkmoney.damsel.payment_processing.InvoicePayment;
|
||||
import com.rbkmoney.damsel.payment_processing.InvoicePaymentChargeback;
|
||||
import com.rbkmoney.damsel.payment_processing.InvoiceRefundSession;
|
||||
import com.rbkmoney.fistful.base.CardType;
|
||||
import com.rbkmoney.fistful.base.DigitalData;
|
||||
import com.rbkmoney.fistful.base.DigitalDataWebmoney;
|
||||
import com.rbkmoney.fistful.base.Residence;
|
||||
import dev.vality.fistful.base.CardType;
|
||||
import dev.vality.fistful.base.Residence;
|
||||
import com.rbkmoney.geck.common.util.TypeUtil;
|
||||
import com.rbkmoney.geck.serializer.kit.mock.MockMode;
|
||||
import com.rbkmoney.geck.serializer.kit.mock.MockTBaseProcessor;
|
||||
@ -26,31 +24,31 @@ import static com.rbkmoney.fraudbusters.mg.connector.utils.MgEventSinkFlowGenera
|
||||
|
||||
public class BuildUtils {
|
||||
|
||||
public static com.rbkmoney.fistful.base.BankCard buildFistfulBankCard() {
|
||||
return new com.rbkmoney.fistful.base.BankCard()
|
||||
public static dev.vality.fistful.base.BankCard buildFistfulBankCard() {
|
||||
return new dev.vality.fistful.base.BankCard()
|
||||
.setBankName(InvoiceTestConstant.BANK_NAME)
|
||||
.setBin(InvoiceTestConstant.CARD_BIN)
|
||||
.setCategory(InvoiceTestConstant.CARD_CATEGORY)
|
||||
.setIssuerCountry(Residence.PAN)
|
||||
.setPaymentSystem(new com.rbkmoney.fistful.base.PaymentSystemRef(
|
||||
com.rbkmoney.fistful.base.LegacyBankCardPaymentSystem.mastercard.name()))
|
||||
.setPaymentSystem(new dev.vality.fistful.base.PaymentSystemRef(
|
||||
dev.vality.fistful.base.LegacyBankCardPaymentSystem.mastercard.name()))
|
||||
.setToken(InvoiceTestConstant.CARD_TOKEN_PROVIDER)
|
||||
.setMaskedPan(InvoiceTestConstant.CARD_MASKED_PAN)
|
||||
.setCardType(CardType.debit)
|
||||
.setCardholderName(InvoiceTestConstant.CARDHOLDER_NAME);
|
||||
}
|
||||
|
||||
public static com.rbkmoney.fistful.base.CryptoWallet buildFistfulCryptoWallet() {
|
||||
com.rbkmoney.fistful.base.CryptoWallet cryptoWallet = new com.rbkmoney.fistful.base.CryptoWallet();
|
||||
public static dev.vality.fistful.base.CryptoWallet buildFistfulCryptoWallet() {
|
||||
dev.vality.fistful.base.CryptoWallet cryptoWallet = new dev.vality.fistful.base.CryptoWallet();
|
||||
cryptoWallet.setId("id");
|
||||
cryptoWallet.setCurrency(com.rbkmoney.fistful.base.CryptoCurrency.bitcoin);
|
||||
cryptoWallet.setCurrency(dev.vality.fistful.base.CryptoCurrency.bitcoin);
|
||||
return cryptoWallet;
|
||||
}
|
||||
|
||||
public static com.rbkmoney.fistful.base.DigitalWallet buildFistfulDigitalWallet() {
|
||||
com.rbkmoney.fistful.base.DigitalWallet digitalWallet = new com.rbkmoney.fistful.base.DigitalWallet();
|
||||
public static dev.vality.fistful.base.DigitalWallet buildFistfulDigitalWallet() {
|
||||
dev.vality.fistful.base.DigitalWallet digitalWallet = new dev.vality.fistful.base.DigitalWallet();
|
||||
digitalWallet.setId("id");
|
||||
digitalWallet.setData(DigitalData.webmoney(new DigitalDataWebmoney()));
|
||||
digitalWallet.setPaymentService(new dev.vality.fistful.base.PaymentServiceRef("webmoney"));
|
||||
return digitalWallet;
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
package com.rbkmoney.fraudbusters.mg.connector.utils;
|
||||
|
||||
import com.rbkmoney.fistful.base.CardType;
|
||||
import com.rbkmoney.fistful.base.LegacyBankCardPaymentSystem;
|
||||
import com.rbkmoney.fistful.base.Residence;
|
||||
import dev.vality.fistful.base.CardType;
|
||||
import dev.vality.fistful.base.LegacyBankCardPaymentSystem;
|
||||
import dev.vality.fistful.base.Residence;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.rbkmoney.fraudbusters.mg.connector.utils;
|
||||
|
||||
import com.rbkmoney.fistful.base.Failure;
|
||||
import com.rbkmoney.fistful.withdrawal.Change;
|
||||
import com.rbkmoney.fistful.withdrawal.StatusChange;
|
||||
import com.rbkmoney.fistful.withdrawal.TimestampedChange;
|
||||
import com.rbkmoney.fistful.withdrawal.status.Failed;
|
||||
import com.rbkmoney.fistful.withdrawal.status.Pending;
|
||||
import com.rbkmoney.fistful.withdrawal.status.Status;
|
||||
import com.rbkmoney.fistful.withdrawal.status.Succeeded;
|
||||
import dev.vality.fistful.base.Failure;
|
||||
import dev.vality.fistful.withdrawal.Change;
|
||||
import dev.vality.fistful.withdrawal.StatusChange;
|
||||
import dev.vality.fistful.withdrawal.TimestampedChange;
|
||||
import dev.vality.fistful.withdrawal.status.Failed;
|
||||
import dev.vality.fistful.withdrawal.status.Pending;
|
||||
import dev.vality.fistful.withdrawal.status.Status;
|
||||
import dev.vality.fistful.withdrawal.status.Succeeded;
|
||||
import com.rbkmoney.geck.common.util.TypeUtil;
|
||||
import com.rbkmoney.kafka.common.serialization.ThriftSerializer;
|
||||
import com.rbkmoney.machinegun.eventsink.MachineEvent;
|
||||
|
Loading…
Reference in New Issue
Block a user