damsel/proto/proxy_provider.thrift

127 lines
4.9 KiB
Thrift
Raw Normal View History

include "base.thrift"
include "proxy.thrift"
include "domain.thrift"
namespace java com.rbkmoney.damsel.proxy_provider
namespace erlang prxprv
/**
* Данные платежа, необходимые для обращения к провайдеру.
*/
struct PaymentInfo {
1: required Shop shop
2: required Invoice invoice
3: required InvoicePayment payment
}
struct Shop {
1: required domain.ShopID id
2: required domain.Category category
3: required domain.ShopDetails details
HG-192: Introduce multiclaims (#131) * DC-23: changed PartyManagement interface to claims (#122) * DC-23: changed PartyManagement interface to work with claims as primary editing method DC-25: changed PartyChangeset to match with new interface (DC-23) Moved ShopLocation to Shop level * added ContractExpiered status and creation timestamp * changed contracts & shops IDs types from Int to String * extracted ShopUpdate fields to ShopModification level * added InvalidChangeset exception * Claim effects added (v0.1) * Claim effects v1.0 * Claim effects v1.1 added created_at in all party objects * Added ShopProxyChanged effect produced by ProxyModification changeset * added ClaimUpdated event and ClaimRevision property * added revision check to AcceptClaim * added revision to deny/revoke methods for uniformity * added ShopContractChanged to make one-to-one relations beetween change & effect * Category is back to ShopParams as optional field * AcceptClaim can throw InvalidChangeset exception * Added AnonymousEntity to fulfill contract creation requirements * Renamed AninymousEntity to RegisteredUser * Added PayoutToolType to distinguish test and live payout tools * Removed payout tool type due to redundancy * Added PayoutToolPrototype to incapsulate test payout tool params * Walker2 API (#125) * Walker 2 api new Methods for CRUD operations fro Claims, Comments and history(Actions) WALK-20 * rename to wc_deploy * add deploy_epic_nexus to list * fix make cmd * fixed suspension naming * elastico interface get end search party methods Ft/walk 27/elastico (#133) * Syncronize walker and payment processing thrifts * WALK-27: Bump to rbkmoney/image-build@efd28e5 (#138) * DC-27: added timestamp and revision to claim related events * DC-27: added updated timestamp to claim Added timestamp to blocking/suspension statuses (party & shop) for same reason. * DC-27: removed unnecessary timestamp from accepted status (#143) * Added missed InvalidContractStatus exception (#144) * Removed timestamp from ContractTermination changeset rebased to newest master * jenkins pr crutch * update walker 2 interface * fix signature * replace strings * add update and create date * Event batching v0.1 (obvious one) (#160) * HG-227: Publish formerly internal events (#161) * HG-227: Streamline event payload definitions * HG-227: Publish formerly internal events * HG-227: Introduce session-level result * HG-227: Start classifying operation failures * HG-227: Differentiate between domain and payproc invoicing models * HG-227: Strip domain models further * HG-227: Make risk score, route and cash flow required * HG-227: Give shop location back to proxies (#164)
2017-07-17 10:21:41 +00:00
4: required domain.ShopLocation location
}
struct Invoice {
1: required domain.InvoiceID id
2: required base.Timestamp created_at
3: required base.Timestamp due
7: required domain.InvoiceDetails details
6: required Cash cost
}
struct InvoicePayment {
1: required domain.InvoicePaymentID id
2: required base.Timestamp created_at
3: optional domain.TransactionInfo trx
4: required domain.Payer payer
5: required Cash cost
}
struct Cash {
1: required domain.Amount amount
2: required domain.Currency currency
}
/**
* Данные сессии взаимодействия с провайдерским прокси.
*
* В момент, когда прокси успешно завершает сессию взаимодействия, процессинг считает,
* что поставленная цель достигнута, и платёж перешёл в соответствующий статус.
*/
HG-192: Introduce multiclaims (#131) * DC-23: changed PartyManagement interface to claims (#122) * DC-23: changed PartyManagement interface to work with claims as primary editing method DC-25: changed PartyChangeset to match with new interface (DC-23) Moved ShopLocation to Shop level * added ContractExpiered status and creation timestamp * changed contracts & shops IDs types from Int to String * extracted ShopUpdate fields to ShopModification level * added InvalidChangeset exception * Claim effects added (v0.1) * Claim effects v1.0 * Claim effects v1.1 added created_at in all party objects * Added ShopProxyChanged effect produced by ProxyModification changeset * added ClaimUpdated event and ClaimRevision property * added revision check to AcceptClaim * added revision to deny/revoke methods for uniformity * added ShopContractChanged to make one-to-one relations beetween change & effect * Category is back to ShopParams as optional field * AcceptClaim can throw InvalidChangeset exception * Added AnonymousEntity to fulfill contract creation requirements * Renamed AninymousEntity to RegisteredUser * Added PayoutToolType to distinguish test and live payout tools * Removed payout tool type due to redundancy * Added PayoutToolPrototype to incapsulate test payout tool params * Walker2 API (#125) * Walker 2 api new Methods for CRUD operations fro Claims, Comments and history(Actions) WALK-20 * rename to wc_deploy * add deploy_epic_nexus to list * fix make cmd * fixed suspension naming * elastico interface get end search party methods Ft/walk 27/elastico (#133) * Syncronize walker and payment processing thrifts * WALK-27: Bump to rbkmoney/image-build@efd28e5 (#138) * DC-27: added timestamp and revision to claim related events * DC-27: added updated timestamp to claim Added timestamp to blocking/suspension statuses (party & shop) for same reason. * DC-27: removed unnecessary timestamp from accepted status (#143) * Added missed InvalidContractStatus exception (#144) * Removed timestamp from ContractTermination changeset rebased to newest master * jenkins pr crutch * update walker 2 interface * fix signature * replace strings * add update and create date * Event batching v0.1 (obvious one) (#160) * HG-227: Publish formerly internal events (#161) * HG-227: Streamline event payload definitions * HG-227: Publish formerly internal events * HG-227: Introduce session-level result * HG-227: Start classifying operation failures * HG-227: Differentiate between domain and payproc invoicing models * HG-227: Strip domain models further * HG-227: Make risk score, route and cash flow required * HG-227: Give shop location back to proxies (#164)
2017-07-17 10:21:41 +00:00
struct Session {
1: required domain.TargetInvoicePaymentStatus target
2: optional proxy.ProxyState state
}
/**
* Набор данных для взаимодействия с провайдерским прокси.
*/
struct Context {
1: required Session session
2: required PaymentInfo payment_info
3: optional domain.ProxyOptions options = {}
}
/**
* Результат обращения к провайдерскому прокси в рамках сессии.
*
* В результате обращения прокси может решить, следует ли:
* - завершить сессию взаимодействия с провайдером (FinishIntent); или
* - просто приостановить на определённое время (SleepIntent), обновив своё состояние, которое
* вернётся к нему в последующем запросе; или
* - приостановить до получения обратного запроса (SuspendIntent), обновив своё состояние, которое
* вернётся к нему при получени означенного обратного запроса.
*
* Прокси может связать с текущим платежом данные транзакции у провайдера для учёта в нашей системе,
* причём на эти данные налагаются следующие требования:
* - данные должны быть связаны на момент завершения сессии взаимодействия с провайдером в рамках
* достижения цели по переводу платежа в статус `processed`;
* - идентификатор связанной транзакции е может измениться_ при последующих обращениях в прокси
* по текущему платежу.
*/
struct ProxyResult {
1: required proxy.Intent intent
2: optional proxy.ProxyState next_state
3: optional domain.TransactionInfo trx
}
/**
* Результат обработки провайдерским прокси обратного вызова в рамках сессии.
*/
struct CallbackResult {
1: required proxy.CallbackResponse response
2: required CallbackProxyResult result
}
struct CallbackProxyResult {
// TODO temporary crutch, remove it as soon as possible
// An `undefined` means that the suspend will be kept untouched
1: optional proxy.Intent intent
2: optional proxy.ProxyState next_state
3: optional domain.TransactionInfo trx
}
service ProviderProxy {
/**
* Запрос к прокси на проведение взаимодействия с провайдером в рамках сессии.
*/
ProxyResult ProcessPayment (1: Context context)
/**
* Запрос к прокси на обработку обратного вызова от провайдера в рамках сессии.
*/
CallbackResult HandlePaymentCallback (1: proxy.Callback callback, 2: Context context)
}
service ProviderProxyHost {
/**
* Запрос к процессингу на обработку обратного вызова от провайдера.
*/
proxy.CallbackResponse ProcessCallback (1: base.Tag tag, 2: proxy.Callback callback)
throws (1: base.InvalidRequest ex1)
}