Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions proto/accounter.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,18 @@ struct Account {
* amount - объем переводимых средств (не может быть отрицательным)
* currency_sym_code - код валюты, должен совпадать с кодами задействованных счетов
* description - описание проводки
* exchange_context - курс валюты, используемый для конвертации исходной суммы операции в валюту терминала
* Заполняется только если валюта терминала отличается от валюты операции (платежа) и проводки
* source_currency - валюта исходной операции (совпадает с валютой проводки)
* destination_currency - валюта терминала
*/
struct Posting {
1: required AccountID from_id
2: required AccountID to_id
3: required domain.Amount amount
4: required domain.CurrencySymbolicCode currency_sym_code
5: required string description
6: optional domain.ExchangeContext exchange_context
}

/**
Expand Down
8 changes: 8 additions & 0 deletions proto/domain.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -1891,6 +1891,12 @@ struct CashFlowPosting {
4: optional string details
}

struct ExchangeContext {
1: required CurrencySymbolicCode source_currency
2: required CurrencySymbolicCode destination_currency
3: required base.Rational exchange_rate
}

/** Полностью вычисленный граф финансовых потоков с проводками всех участников. */
typedef list<FinalCashFlowPosting> FinalCashFlow

Expand All @@ -1900,6 +1906,7 @@ struct FinalCashFlowPosting {
2: required FinalCashFlowAccount destination
3: required Cash volume
4: optional string details
5: optional ExchangeContext exchange_context
}

struct FinalCashFlowAccount {
Expand Down Expand Up @@ -2103,6 +2110,7 @@ struct PaymentsProvisionTerms {
10: optional PaymentChargebackProvisionTerms chargebacks
11: optional RiskScoreSelector risk_coverage
12: optional TurnoverLimitSelector turnover_limits
13: optional Predicate allow_exchange
}

union RiskScoreSelector {
Expand Down
11 changes: 11 additions & 0 deletions proto/payment_processing.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ union InvoicePaymentChangePayload {
17: InvoicePaymentShopLimitInitiated invoice_payment_shop_limit_initiated
18: InvoicePaymentShopLimitApplied invoice_payment_shop_limit_applied
19: InvoicePaymentCascadeTokensLoaded invoice_payment_cascade_tokens_loaded
20: InvoicePaymentExchangeContextChanged invoice_payment_exchange_context_changed
}

/**
Expand Down Expand Up @@ -204,6 +205,16 @@ struct InvoicePaymentRouteChanged {
5: optional RouteDecisionContext decision
}

/**
* Событие об изменении валютного контекста.
* Возникает, когда валюта терминала отличается от валюты магазина
* source_currency - валюта магазина
* destination_currency - валюта терминала
*/
struct InvoicePaymentExchangeContextChanged {
1: required domain.ExchangeContext exchange_context
}

/**
* Событие об изменении данных финансового взаимодействия.
*/
Expand Down
5 changes: 5 additions & 0 deletions proto/proxy_provider.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ struct InvoicePayment {
8: optional bool make_recurrent
12: optional bool skip_recurrent
9: optional base.Timestamp processing_deadline
/**
* Сумма платежа в исходной валюте
* для случаев, когда валюта терминала отличается от валюты магазина
*/
13: optional Cash original_cost
}

struct InvoicePaymentRefund {
Expand Down
Loading