mirror of
https://github.com/valitydev/adapter-bank-payout-spring-boot-starter.git
synced 2024-11-06 00:45:21 +00:00
TD-45: to dev.vality (#2)
This commit is contained in:
parent
d719092a34
commit
71e7b45653
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-library-build.yml@v1
|
16
.github/workflows/deploy.yml
vendored
Normal file
16
.github/workflows/deploy.yml
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
name: Maven Deploy Artifact
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
- 'main'
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
uses: valitydev/base-workflow/.github/workflows/maven-library-deploy.yml@v1
|
||||
secrets:
|
||||
server-username: ${{ secrets.OSSRH_USERNAME }}
|
||||
server-password: ${{ secrets.OSSRH_TOKEN }}
|
||||
deploy-secret-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
|
||||
deploy-secret-key-password: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
|
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -1,4 +0,0 @@
|
||||
[submodule "build_utils"]
|
||||
path = build_utils
|
||||
url = git@github.com:rbkmoney/build_utils.git
|
||||
branch = master
|
15
Jenkinsfile
vendored
15
Jenkinsfile
vendored
@ -1,15 +0,0 @@
|
||||
#!groovy
|
||||
build('adapter-bank-payout-spring-boot-starter', 'docker-host') {
|
||||
|
||||
checkoutRepo()
|
||||
loadBuildUtils()
|
||||
|
||||
def javaLibPipeline
|
||||
runStage('load JavaLib pipeline') {
|
||||
javaLibPipeline = load("build_utils/jenkins_lib/pipeJavaLib.groovy")
|
||||
}
|
||||
|
||||
def buildImageTag = "fcf116dd775cc2e91bffb6a36835754e3f2d5321"
|
||||
javaLibPipeline(buildImageTag)
|
||||
|
||||
}
|
@ -1 +0,0 @@
|
||||
Subproject commit e89b885839df8013df804d48ff24dff10c9c451e
|
86
pom.xml
86
pom.xml
@ -4,19 +4,19 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.rbkmoney</groupId>
|
||||
<groupId>dev.vality</groupId>
|
||||
<artifactId>library-parent-pom</artifactId>
|
||||
<version>1.0.1</version>
|
||||
<version>1.0.2</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<artifactId>adapter-bank-payout-spring-boot-starter</artifactId>
|
||||
<version>1.0.12</version>
|
||||
<version>1.0.0</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Adapter-bank-payout-spring-boot-starter</name>
|
||||
<description>Spring boot starter for payout adapters</description>
|
||||
<url>https://github.com/rbkmoney/adapter-bank-payout-spring-boot-starter</url>
|
||||
<url>https://github.com/valitydev/adapter-bank-payout-spring-boot-starter</url>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
@ -27,36 +27,33 @@
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<organization>RBK.money</organization>
|
||||
<organizationUrl>https://rbk.money</organizationUrl>
|
||||
<organization>Vality</organization>
|
||||
<organizationUrl>https://vality.dev</organizationUrl>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:git://github.com/rbkmoney/adapter-bank-payout-spring-boot-starter.git</connection>
|
||||
<developerConnection>scm:git:ssh://github.com/rbkmoney/adapter-bank-payout-spring-boot-starter.git</developerConnection>
|
||||
<url>https://github.com/rbkmoney/adapter-bank-payout-spring-boot-starter/tree/master</url>
|
||||
<connection>scm:git:git://github.com/valitydev/adapter-bank-payout-spring-boot-starter.git</connection>
|
||||
<developerConnection>scm:git:ssh://github.com/valitydev/adapter-bank-payout-spring-boot-starter.git</developerConnection>
|
||||
<url>https://github.com/valitydev/adapter-bank-payout-spring-boot-starter/tree/master</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>8</java.version>
|
||||
<adapter-client-lib.version>1.0.1</adapter-client-lib.version>
|
||||
<adapter-thrift-lib.version>1.0.0</adapter-thrift-lib.version>
|
||||
<adapter-common-lib.version>1.0.0</adapter-common-lib.version>
|
||||
|
||||
<adapter-client-lib.version>2.1.27</adapter-client-lib.version>
|
||||
<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.474-c5b986f</damsel.version>
|
||||
<cds-proto.version>1.62-07f2b0f</cds-proto.version>
|
||||
<damsel.version>1.544-dcd92dd</damsel.version>
|
||||
<cds-proto.version>1.66-01353ce</cds-proto.version>
|
||||
|
||||
<spring-boot.version>2.3.8.RELEASE</spring-boot.version>
|
||||
<woody.version>[1.1.21,)</woody.version>
|
||||
<geck.version>[0.6.11,)</geck.version>
|
||||
<lombok.version>1.18.4</lombok.version>
|
||||
<woody.version>1.0.4</woody.version>
|
||||
<geck.version>0.0.1</geck.version>
|
||||
<lombok.version>1.18.22</lombok.version>
|
||||
<slf4j-api.version>1.7.30</slf4j-api.version>
|
||||
<javax.servlet-api.version>4.0.1</javax.servlet-api.version>
|
||||
<hibernate-validator.version>6.1.5.Final</hibernate-validator.version>
|
||||
<error-mapping-java.version>1.0.6</error-mapping-java.version>
|
||||
<error-mapping-java.version>1.0.0</error-mapping-java.version>
|
||||
<junit.version>4.12</junit.version>
|
||||
</properties>
|
||||
|
||||
@ -111,32 +108,32 @@
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!--rbk-->
|
||||
<!--vality-->
|
||||
<dependency>
|
||||
<groupId>com.rbkmoney.woody</groupId>
|
||||
<groupId>dev.vality.woody</groupId>
|
||||
<artifactId>woody-thrift</artifactId>
|
||||
<version>${woody.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.rbkmoney</groupId>
|
||||
<groupId>dev.vality</groupId>
|
||||
<artifactId>adapter-common-lib</artifactId>
|
||||
<version>${adapter-common-lib.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.rbkmoney</groupId>
|
||||
<groupId>dev.vality</groupId>
|
||||
<artifactId>error-mapping-java</artifactId>
|
||||
<version>${error-mapping-java.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.rbkmoney.geck</groupId>
|
||||
<groupId>dev.vality.geck</groupId>
|
||||
<artifactId>serializer</artifactId>
|
||||
<version>${geck.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.rbkmoney</groupId>
|
||||
<groupId>dev.vality</groupId>
|
||||
<artifactId>damsel</artifactId>
|
||||
<version>${damsel.version}</version>
|
||||
<scope>provided</scope>
|
||||
@ -150,40 +147,5 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<version>0.8.2</version>
|
||||
<configuration>
|
||||
<destFile>${sonar.jacoco.reportPath}</destFile>
|
||||
<append>true</append>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>agent</id>
|
||||
<goals>
|
||||
<goal>prepare-agent</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.0</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
|
18
renovate.json
Normal file
18
renovate.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"extends": [
|
||||
"config:base"
|
||||
],
|
||||
"packageRules": [
|
||||
{
|
||||
"matchPackagePatterns": [
|
||||
"*"
|
||||
],
|
||||
"matchUpdateTypes": [
|
||||
"minor",
|
||||
"patch"
|
||||
],
|
||||
"groupName": "all non-major dependencies",
|
||||
"groupSlug": "all-minor-patch"
|
||||
}
|
||||
]
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.converter;
|
||||
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.model.ExitStateModel;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.ProcessResult;
|
||||
|
||||
public interface ExitStateToProcessResultConverter<X extends ExitStateModel> {
|
||||
ProcessResult convert(X exitStateModel);
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
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> {
|
||||
|
||||
T convert(Withdrawal withdrawal, Value state, Map<String, String> options);
|
||||
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.flow;
|
||||
|
||||
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.model.Step;
|
||||
|
||||
public interface StepResolver<T extends EntryStateModel, X extends ExitStateModel> {
|
||||
Step resolveEntry(T entryStateModel);
|
||||
|
||||
Step resolveExit(X exitStateModel);
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
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;
|
||||
|
||||
public interface CommonHandler<T extends EntryStateModel, X extends ExitStateModel> {
|
||||
boolean isHandle(T entryStateModel);
|
||||
|
||||
X handle(T entryStateModel);
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
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 {
|
||||
Quote handle(GetQuoteParams getQuoteParams, Map<String, String> map);
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.handler;
|
||||
|
||||
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 {
|
||||
CallbackResult handleCallback(Callback callback, Withdrawal withdrawal, Value value, Map<String, String> map);
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.processor;
|
||||
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.model.EntryStateModel;
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.model.ExitStateModel;
|
||||
|
||||
public interface Processor<R, T extends EntryStateModel, X extends ExitStateModel> {
|
||||
X process(R response, T entryStateModel);
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.state.serializer;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.model.AdapterState;
|
||||
import com.rbkmoney.adapter.common.state.serializer.StateSerializer;
|
||||
|
||||
public class AdapterStateSerializer extends StateSerializer<AdapterState> {
|
||||
public AdapterStateSerializer(ObjectMapper mapper) {
|
||||
super(mapper);
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
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 {
|
||||
void validate(Withdrawal withdrawal, Value state, Map<String, String> options) throws ValidationException;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.config.properties;
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.config.properties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
@ -1,7 +1,7 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.config.properties;
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.config.properties;
|
||||
|
||||
import com.rbkmoney.adapter.common.mapper.SimpleErrorMapping;
|
||||
import com.rbkmoney.error.mapping.ErrorMapping;
|
||||
import dev.vality.adapter.common.mapper.SimpleErrorMapping;
|
||||
import dev.vality.error.mapping.ErrorMapping;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.config.properties;
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.config.properties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
@ -0,0 +1,8 @@
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.converter;
|
||||
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.model.ExitStateModel;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.ProcessResult;
|
||||
|
||||
public interface ExitStateToProcessResultConverter<X extends ExitStateModel> {
|
||||
ProcessResult convert(X exitStateModel);
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.converter;
|
||||
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.model.EntryStateModel;
|
||||
import dev.vality.damsel.msgpack.Value;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.Withdrawal;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface WithdrawalToEntryStateConverter<T extends EntryStateModel> {
|
||||
|
||||
T convert(Withdrawal withdrawal, Value state, Map<String, String> options);
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.exception;
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.exception;
|
||||
|
||||
public class ValidationException extends RuntimeException {
|
||||
public ValidationException() {
|
@ -0,0 +1,11 @@
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.flow;
|
||||
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.model.EntryStateModel;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.model.ExitStateModel;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.model.Step;
|
||||
|
||||
public interface StepResolver<T extends EntryStateModel, X extends ExitStateModel> {
|
||||
Step resolveEntry(T entryStateModel);
|
||||
|
||||
Step resolveExit(X exitStateModel);
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.handler;
|
||||
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.model.EntryStateModel;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.model.ExitStateModel;
|
||||
|
||||
public interface CommonHandler<T extends EntryStateModel, X extends ExitStateModel> {
|
||||
boolean isHandle(T entryStateModel);
|
||||
|
||||
X handle(T entryStateModel);
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.handler;
|
||||
package dev.vality.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 dev.vality.adapter.bank.payout.spring.boot.starter.model.EntryStateModel;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.model.ExitStateModel;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.processor.Processor;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
|
@ -0,0 +1,10 @@
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.handler;
|
||||
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.GetQuoteParams;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.Quote;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface GetQuoteHandler {
|
||||
Quote handle(GetQuoteParams getQuoteParams, Map<String, String> map);
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.handler;
|
||||
|
||||
import dev.vality.damsel.msgpack.Value;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.Callback;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.CallbackResult;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.Withdrawal;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface HandleCallbackHandler {
|
||||
CallbackResult handleCallback(Callback callback, Withdrawal withdrawal, Value value, Map<String, String> map);
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.model;
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonUnwrapped;
|
||||
import com.rbkmoney.adapter.common.model.PollingInfo;
|
||||
import dev.vality.adapter.common.model.PollingInfo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.model;
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.model;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.model;
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.model;
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.model;
|
||||
|
||||
public enum Step {
|
||||
CHECK_DUPLICATION,
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.model;
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.model;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
@ -0,0 +1,8 @@
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.processor;
|
||||
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.model.EntryStateModel;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.model.ExitStateModel;
|
||||
|
||||
public interface Processor<R, T extends EntryStateModel, X extends ExitStateModel> {
|
||||
X process(R response, T entryStateModel);
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.service;
|
||||
package dev.vality.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 dev.vality.adapter.bank.payout.spring.boot.starter.model.EntryStateModel;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.model.ExitStateModel;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.Intent;
|
||||
|
||||
import java.time.Instant;
|
||||
|
@ -1,23 +1,23 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.service;
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.service;
|
||||
|
||||
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;
|
||||
import com.rbkmoney.adapter.common.model.PollingInfo;
|
||||
import com.rbkmoney.adapter.common.utils.times.ExponentialBackOffPollingService;
|
||||
import com.rbkmoney.damsel.domain.TransactionInfo;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.FinishIntent;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.FinishStatus;
|
||||
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 dev.vality.adapter.bank.payout.spring.boot.starter.config.properties.TimerProperties;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.model.EntryStateModel;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.model.ExitStateModel;
|
||||
import dev.vality.adapter.common.model.PollingInfo;
|
||||
import dev.vality.adapter.common.utils.times.ExponentialBackOffPollingService;
|
||||
import dev.vality.damsel.domain.TransactionInfo;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.FinishIntent;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.FinishStatus;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.Intent;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.Success;
|
||||
import dev.vality.error.mapping.ErrorMapping;
|
||||
import dev.vality.java.damsel.utils.creators.WithdrawalsProviderAdapterPackageCreators;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
|
||||
import static com.rbkmoney.java.damsel.utils.extractors.OptionsExtractors.extractMaxTimePolling;
|
||||
import static dev.vality.java.damsel.utils.extractors.OptionsExtractors.extractMaxTimePolling;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public class IntentServiceImpl implements IntentService {
|
||||
@ -36,7 +36,7 @@ public class IntentServiceImpl implements IntentService {
|
||||
}
|
||||
|
||||
public Intent getSuccess(ExitStateModel exitStateModel) {
|
||||
com.rbkmoney.adapter.bank.payout.spring.boot.starter.model.TransactionInfo trxInfo =
|
||||
dev.vality.adapter.bank.payout.spring.boot.starter.model.TransactionInfo trxInfo =
|
||||
exitStateModel.getNextState().getTrxInfo();
|
||||
Success success = new Success();
|
||||
success.setTrxInfo(new TransactionInfo()
|
@ -1,24 +1,24 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.service;
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.service;
|
||||
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.converter.ExitStateToProcessResultConverter;
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.converter.WithdrawalToEntryStateConverter;
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.flow.StepResolver;
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.handler.CommonHandler;
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.handler.GetQuoteHandler;
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.handler.HandleCallbackHandler;
|
||||
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.validator.WithdrawalValidator;
|
||||
import com.rbkmoney.adapter.common.exception.UnsupportedMethodException;
|
||||
import com.rbkmoney.damsel.msgpack.Value;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.AdapterSrv;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.Callback;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.CallbackResult;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.GetQuoteFailure;
|
||||
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 dev.vality.adapter.bank.payout.spring.boot.starter.converter.ExitStateToProcessResultConverter;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.converter.WithdrawalToEntryStateConverter;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.flow.StepResolver;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.handler.CommonHandler;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.handler.GetQuoteHandler;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.handler.HandleCallbackHandler;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.model.EntryStateModel;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.model.ExitStateModel;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.validator.WithdrawalValidator;
|
||||
import dev.vality.adapter.common.exception.UnsupportedMethodException;
|
||||
import dev.vality.damsel.msgpack.Value;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.AdapterSrv;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.Callback;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.CallbackResult;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.GetQuoteFailure;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.GetQuoteParams;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.ProcessResult;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.Quote;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.Withdrawal;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.thrift.TException;
|
@ -1,21 +1,21 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.service;
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.service;
|
||||
|
||||
import com.rbkmoney.damsel.msgpack.Value;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.AdapterSrv;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.Callback;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.CallbackResult;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.GetQuoteFailure;
|
||||
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 dev.vality.damsel.msgpack.Value;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.AdapterSrv;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.Callback;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.CallbackResult;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.GetQuoteFailure;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.GetQuoteParams;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.ProcessResult;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.Quote;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.Withdrawal;
|
||||
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;
|
||||
import static dev.vality.java.damsel.utils.verification.ProxyProviderVerification.isUndefinedResultOrUnavailable;
|
||||
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
@ -1,9 +1,9 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.state.deserializer;
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.state.deserializer;
|
||||
|
||||
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 dev.vality.adapter.bank.payout.spring.boot.starter.model.AdapterState;
|
||||
import dev.vality.adapter.common.state.deserializer.DeserializationException;
|
||||
import dev.vality.adapter.common.state.deserializer.Deserializer;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
@ -0,0 +1,11 @@
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.state.serializer;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.model.AdapterState;
|
||||
import dev.vality.adapter.common.state.serializer.StateSerializer;
|
||||
|
||||
public class AdapterStateSerializer extends StateSerializer<AdapterState> {
|
||||
public AdapterStateSerializer(ObjectMapper mapper) {
|
||||
super(mapper);
|
||||
}
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.state.utils;
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.state.utils;
|
||||
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.model.AdapterState;
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.state.deserializer.AdapterStateDeserializer;
|
||||
import com.rbkmoney.damsel.proxy_provider.PaymentContext;
|
||||
import com.rbkmoney.damsel.proxy_provider.RecurrentTokenContext;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.model.AdapterState;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.state.deserializer.AdapterStateDeserializer;
|
||||
import dev.vality.damsel.proxy_provider.PaymentContext;
|
||||
import dev.vality.damsel.proxy_provider.RecurrentTokenContext;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
@ -0,0 +1,11 @@
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.validator;
|
||||
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.exception.ValidationException;
|
||||
import dev.vality.damsel.msgpack.Value;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.Withdrawal;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface WithdrawalValidator {
|
||||
void validate(Withdrawal withdrawal, Value state, Map<String, String> options) throws ValidationException;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
com.rbkmoney.adapter.bank.payout.spring.boot.starter.config.properties.ErrorMappingProperties,\
|
||||
com.rbkmoney.adapter.bank.payout.spring.boot.starter.config.properties.AdapterProperties,\
|
||||
com.rbkmoney.adapter.bank.payout.spring.boot.starter.config.properties.TimerProperties
|
||||
dev.vality.adapter.bank.payout.spring.boot.starter.config.properties.ErrorMappingProperties,\
|
||||
dev.vality.adapter.bank.payout.spring.boot.starter.config.properties.AdapterProperties,\
|
||||
dev.vality.adapter.bank.payout.spring.boot.starter.config.properties.TimerProperties
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.model;
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.model;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.rbkmoney.adapter.common.mapper.SimpleObjectMapper;
|
||||
import com.rbkmoney.adapter.common.model.PollingInfo;
|
||||
import dev.vality.adapter.common.mapper.SimpleObjectMapper;
|
||||
import dev.vality.adapter.common.model.PollingInfo;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
@ -1,14 +1,14 @@
|
||||
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.service;
|
||||
package dev.vality.adapter.bank.payout.spring.boot.starter.service;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.config.properties.TimerProperties;
|
||||
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.model.AdapterState;
|
||||
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.common.mapper.SimpleObjectMapper;
|
||||
import com.rbkmoney.adapter.common.model.PollingInfo;
|
||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.Intent;
|
||||
import com.rbkmoney.error.mapping.ErrorMapping;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.config.properties.TimerProperties;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.model.AdapterState;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.model.EntryStateModel;
|
||||
import dev.vality.adapter.bank.payout.spring.boot.starter.model.ExitStateModel;
|
||||
import dev.vality.adapter.common.mapper.SimpleObjectMapper;
|
||||
import dev.vality.adapter.common.model.PollingInfo;
|
||||
import dev.vality.damsel.withdrawals.provider_adapter.Intent;
|
||||
import dev.vality.error.mapping.ErrorMapping;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
@ -6,5 +6,5 @@
|
||||
<root level="warn">
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
</root>
|
||||
<logger name="com.rbkmoney.woody" level="ALL"/>
|
||||
<logger name="dev.vality.woody" level="ALL"/>
|
||||
</configuration>
|
||||
|
Loading…
Reference in New Issue
Block a user