Skip to content

Commit

Permalink
CP-12: Introduces limiter's currency conversion option (#44)
Browse files Browse the repository at this point in the history
* CP-12: Introduces limiter's currency conversion option

* Changes new option flag to struct

* Fixes typo

* Adds missing field to create params
  • Loading branch information
nanodirijabl authored May 28, 2024
1 parent e045813 commit 1432a98
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions proto/limiter_config.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ struct LimitConfigParams {
8: required LimitScope scope
9: optional string description
10: required OperationLimitBehaviour op_behaviour
11: optional CurrencyConversion currency_conversion
}

struct LimitConfig {
Expand All @@ -40,11 +41,22 @@ struct LimitConfig {
9: optional LimitScope scope
10: optional string description
12: optional OperationLimitBehaviour op_behaviour
/**
* Convert operation's amount if its context currency differs from
* limit-turnover metric (see `LimitTurnoverAmount`).
*
* If undefined and currency codes do not match, then limiter
* throws `InvalidOperationCurrency` exception (see
* limiter-proto).
*/
13: optional CurrencyConversion currency_conversion

// deprecated
4: optional LimitBodyType body_type_deprecated
}

struct CurrencyConversion {}

struct OperationLimitBehaviour {
1: optional OperationBehaviour invoice_payment_refund
}
Expand Down

0 comments on commit 1432a98

Please sign in to comment.