2022-01-20 08:01:00 +00:00
|
|
|
|
namespace java dev.vality.pstds.storage
|
2020-09-01 11:54:29 +00:00
|
|
|
|
namespace erlang pstds_storage
|
2020-08-21 14:28:02 +00:00
|
|
|
|
|
2020-08-27 11:04:25 +00:00
|
|
|
|
include "base.thrift"
|
|
|
|
|
|
2020-08-31 15:28:21 +00:00
|
|
|
|
struct PaymentSystemTokenResult {
|
2020-09-01 11:54:29 +00:00
|
|
|
|
1: required base.Token payment_system_token
|
2020-08-21 14:28:02 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
exception PaymentSystemTokenNotFound{}
|
|
|
|
|
|
2020-09-01 16:01:33 +00:00
|
|
|
|
exception InvalidTokenExpData {}
|
2020-08-21 14:28:02 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Интерфейс для приложений
|
|
|
|
|
*/
|
|
|
|
|
service Storage {
|
|
|
|
|
|
|
|
|
|
/** Получить данные платёжного токена */
|
2020-09-01 11:54:29 +00:00
|
|
|
|
base.PaymentSystemTokenData GetPaymentSystemTokenData(1: base.Token token, 2: base.TokenRevision revision)
|
2020-08-21 14:28:02 +00:00
|
|
|
|
throws (1: PaymentSystemTokenNotFound not_found)
|
|
|
|
|
|
|
|
|
|
/** Сохранить платёжный токен */
|
2020-09-01 11:54:29 +00:00
|
|
|
|
PaymentSystemTokenResult PutPaymentSystemToken(
|
|
|
|
|
1: base.PaymentSystemTokenData payment_system_token,
|
|
|
|
|
2: base.Token bank_card_token
|
|
|
|
|
)
|
2020-09-01 16:01:33 +00:00
|
|
|
|
throws (1: InvalidTokenExpData invalid_exp_data)
|
2020-08-21 14:28:02 +00:00
|
|
|
|
|
2020-08-25 12:32:56 +00:00
|
|
|
|
/** Обновить статус платёжного токена
|
|
|
|
|
* Параметры:
|
|
|
|
|
* - token - параметры токена, ревизия - latest
|
|
|
|
|
**/
|
|
|
|
|
void UpdatePaymentSystemTokenStatus(
|
2020-09-01 11:54:29 +00:00
|
|
|
|
1: base.Token token,
|
2020-09-01 16:01:33 +00:00
|
|
|
|
2: base.TokenStatus updated_status
|
2020-08-25 12:32:56 +00:00
|
|
|
|
)
|
2020-08-21 14:28:02 +00:00
|
|
|
|
throws (1: PaymentSystemTokenNotFound not_found)
|
2020-09-01 11:54:29 +00:00
|
|
|
|
|
|
|
|
|
base.TokenRevision GetTokenRevision(1: base.Token token)
|
|
|
|
|
throws (1: PaymentSystemTokenNotFound not_found)
|
|
|
|
|
|
2020-08-21 14:28:02 +00:00
|
|
|
|
}
|
2020-08-25 12:32:56 +00:00
|
|
|
|
|