TD-550: Defines InvalidOperationCurrency, OperationContextNotSupported and PaymentToolNotSupported (#31)

* Bumps damsel

---------

Co-authored-by: Egor Cherniak <cherniak3@yandex.ru>
This commit is contained in:
Aleksey Kashapov 2023-04-04 16:05:46 +03:00 committed by GitHub
parent 9b76200a95
commit e46f732ae3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 2 deletions

View File

@ -60,7 +60,7 @@
<dependency>
<groupId>dev.vality</groupId>
<artifactId>damsel</artifactId>
<version>1.563-d384c12</version>
<version>1.593-698c7d2</version>
<scope>provided</scope>
</dependency>
</dependencies>

View File

@ -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 (

View File

@ -1,4 +1,4 @@
[{<<"damsel">>,
{git,"https://github.com/valitydev/damsel.git",
{ref,"9859ca2843ad1617a0bf8549c125a7e94d1d54b7"}},
{ref,"698c7d275fbe6a8f06f209638ede093f3134fc9b"}},
0}].