diff --git a/pom.xml b/pom.xml index 96e0c2e..7988c68 100644 --- a/pom.xml +++ b/pom.xml @@ -60,7 +60,7 @@ dev.vality damsel - 1.563-d384c12 + 1.593-698c7d2 provided diff --git a/proto/limiter.thrift b/proto/limiter.thrift index dd61280..5a0c500 100644 --- a/proto/limiter.thrift +++ b/proto/limiter.thrift @@ -1,5 +1,6 @@ include "proto/base.thrift" include "proto/domain.thrift" +include "proto/limiter_config.thrift" include "limiter_base.thrift" include "limiter_payproc_context.thrift" include "limiter_withdrawal_context.thrift" @@ -15,6 +16,7 @@ typedef base.ID WalletID typedef base.ID IdentityID typedef limiter_base.AmountRange AmountRange typedef domain.DataRevision Version +typedef limiter_config.LimitContextType LimitContextType struct LimitContext { 1: optional limiter_withdrawal_context.Context withdrawal_processing @@ -57,6 +59,16 @@ exception ForbiddenOperationAmount { 1: required domain.Amount amount 2: required AmountRange allowed_range } +exception InvalidOperationCurrency { + 1: required domain.CurrencySymbolicCode currency + 2: required domain.CurrencySymbolicCode expected_currency +} +exception OperationContextNotSupported { + 1: required LimitContextType context_type +} +exception PaymentToolNotSupported { + 1: required string payment_tool +} service Limiter { @@ -73,6 +85,9 @@ service Limiter { Clock Hold(1: LimitChange change, 2: Clock clock, 3: LimitContext context) throws ( 1: LimitNotFound e1, 3: base.InvalidRequest e2 + 4: InvalidOperationCurrency e3 + 5: OperationContextNotSupported e4 + 6: PaymentToolNotSupported e5 ) Clock Commit(1: LimitChange change, 2: Clock clock, 3: LimitContext context) throws ( diff --git a/rebar.lock b/rebar.lock index fc348e8..a0b1174 100644 --- a/rebar.lock +++ b/rebar.lock @@ -1,4 +1,4 @@ [{<<"damsel">>, {git,"https://github.com/valitydev/damsel.git", - {ref,"9859ca2843ad1617a0bf8549c125a7e94d1d54b7"}}, + {ref,"698c7d275fbe6a8f06f209638ede093f3134fc9b"}}, 0}].