mirror of
https://github.com/valitydev/damsel.git
synced 2024-11-06 09:45:21 +00:00
FF-93: Hold/capture withdrawal (#449)
* added hold/capture withdrawal * fixed * added 2 vars - simple and table * fixed * fixed * minor * fixed * minor
This commit is contained in:
parent
2f1a27c60e
commit
1a88905f44
@ -19,6 +19,12 @@ typedef domain.ProxyOptions Options
|
||||
*/
|
||||
typedef msgpack.Value InternalState
|
||||
|
||||
/**
|
||||
* Непрозрачные для процессинга данные конвертации валют, связанные с особенностями взаимодействия с
|
||||
* третьей стороной.
|
||||
*/
|
||||
typedef msgpack.Value RateData
|
||||
|
||||
/**
|
||||
* Требование адаптера к процессингу, отражающее дальнейший прогресс сессии взаимодействия с третьей
|
||||
* стороной.
|
||||
@ -68,6 +74,7 @@ struct Withdrawal {
|
||||
3: required Destination destination
|
||||
4: optional Identity sender
|
||||
5: optional Identity receiver
|
||||
6: optional ExchangeAgree exchange_agree
|
||||
}
|
||||
|
||||
typedef withdrawals_domain.Destination Destination
|
||||
@ -78,6 +85,21 @@ struct Cash {
|
||||
2: required domain.Currency currency
|
||||
}
|
||||
|
||||
/**
|
||||
* Данные для получения курсов конвертации по выбранным валютам.
|
||||
*/
|
||||
struct GetExchangeRatesParams {
|
||||
1: optional base.ID idempotency_id
|
||||
2: required domain.Currency currency_from
|
||||
3: required domain.Currency currency_to
|
||||
4: required ExchangeCash exchange_cash
|
||||
}
|
||||
|
||||
union ExchangeCash {
|
||||
1: Cash cash_from
|
||||
2: Cash cash_to
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
/**
|
||||
@ -93,6 +115,22 @@ struct ProcessResult {
|
||||
2: optional InternalState next_state
|
||||
}
|
||||
|
||||
struct ExchangeAgree {
|
||||
1: required base.ID idempotency_id
|
||||
2: required list<ExchangeRate> rates
|
||||
3: required base.Timestamp created_at
|
||||
4: required base.Timestamp expires_on
|
||||
5: optional RateData rate_data
|
||||
}
|
||||
|
||||
struct ExchangeRate {
|
||||
1: required domain.Currency currency_from
|
||||
2: required domain.Currency currency_to
|
||||
3: required base.Rational rate
|
||||
4: required domain.CashRange cash_range
|
||||
5: required domain.RoundingMethod rounding_method
|
||||
}
|
||||
|
||||
service Adapter {
|
||||
|
||||
/**
|
||||
@ -106,4 +144,13 @@ service Adapter {
|
||||
throws (
|
||||
)
|
||||
|
||||
/**
|
||||
* Запрос к адаптеру на получение курсов конвертации.
|
||||
*/
|
||||
ExchangeAgree GetExchangeRates (
|
||||
1: GetExchangeRatesParams params
|
||||
2: Options opts
|
||||
)
|
||||
throws (
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user