mirror of
https://github.com/valitydev/adapter-bank-payout-spring-boot-starter.git
synced 2024-11-06 00:45:21 +00:00
Bump damsel lib (#26)
This commit is contained in:
parent
30a46aa1af
commit
d719092a34
6
pom.xml
6
pom.xml
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
</parent>
|
||||
|
||||
<artifactId>adapter-bank-payout-spring-boot-starter</artifactId>
|
||||
<version>1.0.11</version>
|
||||
<version>1.0.12</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Adapter-bank-payout-spring-boot-starter</name>
|
||||
@ -46,7 +46,7 @@
|
||||
<adapter-thrift-lib.version>1.0.5</adapter-thrift-lib.version>
|
||||
<adapter-common-lib.version>0.0.26</adapter-common-lib.version>
|
||||
|
||||
<damsel.version>1.439-b18f037</damsel.version>
|
||||
<damsel.version>1.474-c5b986f</damsel.version>
|
||||
<cds-proto.version>1.62-07f2b0f</cds-proto.version>
|
||||
|
||||
<spring-boot.version>2.3.8.RELEASE</spring-boot.version>
|
||||
|
@ -1,12 +1,13 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.config.properties;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Configuration
|
||||
|
@ -2,12 +2,13 @@ package com.rbkmoney.adapter.bank.payout.spring.boot.starter.config.properties;
|
||||
|
||||
import com.rbkmoney.adapter.common.mapper.SimpleErrorMapping;
|
||||
import com.rbkmoney.error.mapping.ErrorMapping;
|
||||
import java.io.IOException;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
||||
@Configuration
|
||||
public class ErrorMappingProperties {
|
||||
|
@ -1,12 +1,13 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.config.properties;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Configuration
|
||||
@ConfigurationProperties("time.config")
|
||||
@Validated
|
||||
|
@ -3,6 +3,7 @@ package com.rbkmoney.adapter.bank.payout.spring.boot.starter.converter;
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.model.EntryStateModel;
|
||||
import com.rbkmoney.damsel.msgpack.Value;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.Withdrawal;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface WithdrawalToEntryStateConverter<T extends EntryStateModel> {
|
||||
|
@ -3,10 +3,11 @@ package com.rbkmoney.adapter.bank.payout.spring.boot.starter.handler;
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.model.EntryStateModel;
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.model.ExitStateModel;
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.processor.Processor;
|
||||
import java.util.function.Function;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public abstract class CommonHandlerImpl<P, R, T extends EntryStateModel, X extends ExitStateModel>
|
||||
implements CommonHandler<T, X> {
|
||||
|
@ -2,6 +2,7 @@ package com.rbkmoney.adapter.bank.payout.spring.boot.starter.handler;
|
||||
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.GetQuoteParams;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.Quote;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface GetQuoteHandler {
|
||||
|
@ -4,6 +4,7 @@ import com.rbkmoney.damsel.msgpack.Value;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.Callback;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.CallbackResult;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.Withdrawal;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface HandleCallbackHandler {
|
||||
|
@ -1,9 +1,10 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.model;
|
||||
|
||||
import java.util.Map;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class EntryStateModel {
|
||||
private String withdrawalId;
|
||||
|
@ -1,11 +1,12 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.model;
|
||||
|
||||
import java.util.Map;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
|
@ -3,6 +3,7 @@ package com.rbkmoney.adapter.bank.payout.spring.boot.starter.service;
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.model.EntryStateModel;
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.model.ExitStateModel;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.Intent;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
public interface IntentService {
|
||||
|
@ -1,7 +1,5 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.service;
|
||||
|
||||
import static com.rbkmoney.java.damsel.utils.extractors.OptionsExtractors.extractMaxTimePolling;
|
||||
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.config.properties.TimerProperties;
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.model.EntryStateModel;
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.model.ExitStateModel;
|
||||
@ -14,9 +12,12 @@ import com.rbkmoney.damsel.withdrawals.provider_adapter.Intent;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.Success;
|
||||
import com.rbkmoney.error.mapping.ErrorMapping;
|
||||
import com.rbkmoney.java.damsel.utils.creators.WithdrawalsProviderAdapterPackageCreators;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import static com.rbkmoney.java.damsel.utils.extractors.OptionsExtractors.extractMaxTimePolling;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public class IntentServiceImpl implements IntentService {
|
||||
@ -37,9 +38,11 @@ public class IntentServiceImpl implements IntentService {
|
||||
public Intent getSuccess(ExitStateModel exitStateModel) {
|
||||
com.rbkmoney.adapter.bank.payout.spring.boot.starter.model.TransactionInfo trxInfo =
|
||||
exitStateModel.getNextState().getTrxInfo();
|
||||
return Intent.finish(new FinishIntent(FinishStatus.success(new Success(new TransactionInfo()
|
||||
Success success = new Success();
|
||||
success.setTrxInfo(new TransactionInfo()
|
||||
.setId(trxInfo.getTrxId())
|
||||
.setExtra(trxInfo.getTrxExtra())))));
|
||||
.setExtra(trxInfo.getTrxExtra()));
|
||||
return Intent.finish(new FinishIntent(FinishStatus.success(success)));
|
||||
}
|
||||
|
||||
public Intent getSleep(ExitStateModel exitStateModel) {
|
||||
|
@ -19,12 +19,13 @@ import com.rbkmoney.damsel.withdrawals.provider_adapter.GetQuoteParams;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.ProcessResult;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.Quote;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.Withdrawal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.thrift.TException;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class PayoutAdapterService<T extends EntryStateModel, X extends ExitStateModel> implements AdapterSrv.Iface {
|
||||
|
@ -1,7 +1,5 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.service;
|
||||
|
||||
import static com.rbkmoney.java.damsel.utils.verification.ProxyProviderVerification.isUndefinedResultOrUnavailable;
|
||||
|
||||
import com.rbkmoney.damsel.msgpack.Value;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.AdapterSrv;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.Callback;
|
||||
@ -11,11 +9,14 @@ import com.rbkmoney.damsel.withdrawals.provider_adapter.GetQuoteParams;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.ProcessResult;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.Quote;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.Withdrawal;
|
||||
import java.util.Map;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.thrift.TException;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import static com.rbkmoney.java.damsel.utils.verification.ProxyProviderVerification.isUndefinedResultOrUnavailable;
|
||||
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class PayoutAdapterServiceLogDecorator implements AdapterSrv.Iface {
|
||||
|
@ -4,11 +4,12 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.model.AdapterState;
|
||||
import com.rbkmoney.adapter.common.state.deserializer.DeserializationException;
|
||||
import com.rbkmoney.adapter.common.state.deserializer.Deserializer;
|
||||
import java.io.IOException;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
|
@ -3,6 +3,7 @@ package com.rbkmoney.adapter.bank.payout.spring.boot.starter.validator;
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.exception.ValidationException;
|
||||
import com.rbkmoney.damsel.msgpack.Value;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.Withdrawal;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface WithdrawalValidator {
|
||||
|
Loading…
Reference in New Issue
Block a user