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