mirror of
https://github.com/valitydev/adapter-bank-payout-spring-boot-starter.git
synced 2024-11-06 00:45:21 +00:00
Merge pull request #10 from rbkmoney/ft/added_methods_intent_service
Bump error mapping
This commit is contained in:
commit
53b683b9f0
4
pom.xml
4
pom.xml
@ -5,7 +5,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.rbkmoney</groupId>
|
<groupId>com.rbkmoney</groupId>
|
||||||
<artifactId>adapter-bank-payout-spring-boot-starter</artifactId>
|
<artifactId>adapter-bank-payout-spring-boot-starter</artifactId>
|
||||||
<version>0.0.8-SNAPSHOT</version>
|
<version>0.0.9</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>Adapter-bank-payout-spring-boot-starter</name>
|
<name>Adapter-bank-payout-spring-boot-starter</name>
|
||||||
@ -18,7 +18,7 @@
|
|||||||
<damsel-utils.version>2.1.9</damsel-utils.version>
|
<damsel-utils.version>2.1.9</damsel-utils.version>
|
||||||
<damsel.version>1.303-d99319c</damsel.version>
|
<damsel.version>1.303-d99319c</damsel.version>
|
||||||
<serializer.version>0.6.7</serializer.version>
|
<serializer.version>0.6.7</serializer.version>
|
||||||
<error-mapping.version>1.0.2</error-mapping.version>
|
<error-mapping.version>1.0.4</error-mapping.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,8 @@ import com.rbkmoney.adapter.bank.payout.spring.boot.starter.model.ExitStateModel
|
|||||||
import com.rbkmoney.damsel.withdrawals.provider_adapter.Intent;
|
import com.rbkmoney.damsel.withdrawals.provider_adapter.Intent;
|
||||||
|
|
||||||
public interface IntentService {
|
public interface IntentService {
|
||||||
Intent getFailure(ExitStateModel exitStateModel);
|
Intent getFailureByCode(ExitStateModel exitStateModel);
|
||||||
|
Intent getFailureByCodeAndDesc(ExitStateModel exitStateModel);
|
||||||
Intent getSuccess(ExitStateModel exitStateModel);
|
Intent getSuccess(ExitStateModel exitStateModel);
|
||||||
Intent getSleep(ExitStateModel exitStateModel);
|
Intent getSleep(ExitStateModel exitStateModel);
|
||||||
Long getMaxDateTimeInstant(EntryStateModel entryStateModel);
|
Long getMaxDateTimeInstant(EntryStateModel entryStateModel);
|
||||||
|
@ -22,8 +22,12 @@ public class IntentServiceImpl implements IntentService {
|
|||||||
private final ErrorMapping errorMapping;
|
private final ErrorMapping errorMapping;
|
||||||
private final TimerProperties timerProperties;
|
private final TimerProperties timerProperties;
|
||||||
|
|
||||||
public Intent getFailure(ExitStateModel exitStateModel) {
|
public Intent getFailureByCode(ExitStateModel exitStateModel) {
|
||||||
return Intent.finish(new FinishIntent(FinishStatus.failure(errorMapping.getFailureByCodeAndDescription(exitStateModel.getErrorCode(), exitStateModel.getErrorMessage()))));
|
return Intent.finish(new FinishIntent(FinishStatus.failure(errorMapping.mapFailure(exitStateModel.getErrorCode()))));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Intent getFailureByCodeAndDesc(ExitStateModel exitStateModel) {
|
||||||
|
return Intent.finish(new FinishIntent(FinishStatus.failure(errorMapping.mapFailure(exitStateModel.getErrorCode(), exitStateModel.getErrorMessage()))));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Intent getSuccess(ExitStateModel exitStateModel) {
|
public Intent getSuccess(ExitStateModel exitStateModel) {
|
||||||
|
Loading…
Reference in New Issue
Block a user