IMP-278: Kills leftover payout definitions (#144)

* IMP-278: Kills leftover payout definitions

* Retires payouts for accounts

* Retires `MerchantStatistics.GetPayouts`

* Reverts payout objects removal

* Reverts removed and reserved fields as deprecated

* Sets required deprecated fields as optional
This commit is contained in:
Aleksey Kashapov 2024-08-28 15:05:38 +03:00 committed by GitHub
parent fe7b4b3606
commit 8e034bc74b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 40 additions and 62 deletions

View File

@ -10,11 +10,11 @@
Contract
/ \
Services Shops
/ | \
Payments Payouts ...
Service Service
| |
Terms Terms
/ \
Payments ...
Service
|
Terms
```
В системе, есть _участники_, с которыми у нас заключён оговор_ на предоставление этим участникам различных услуг. В договоре указаны _пакеты услуг_, которые предоставляет система, например:

View File

@ -843,8 +843,9 @@ struct ShopAccount {
1: required CurrencyRef currency
2: required AccountID settlement
3: required AccountID guarantee
/* Аккаунт на который выводятся деньги из системы */
4: required AccountID payout
// Deprecated
4: optional AccountID payout
}
struct ShopDetails {
@ -874,9 +875,8 @@ struct WalletAccount {
1: required CurrencyRef currency
2: required AccountID settlement
// TODO
// ?????
3: required AccountID payout
// Deprecated
3: optional AccountID payout
}
/* Инспекция платежа */
@ -1037,8 +1037,10 @@ struct RussianPrivateEntity {
4: required ContactInfo contact_info
}
// Deprecated
typedef base.ID PayoutToolID
// Deprecated
struct PayoutTool {
1: required PayoutToolID id
4: required base.Timestamp created_at
@ -1046,6 +1048,7 @@ struct PayoutTool {
3: required PayoutToolInfo payout_tool_info
}
// Deprecated
union PayoutToolInfo {
1: RussianBankAccount russian_bank_account
2: InternationalBankAccount international_bank_account
@ -1072,14 +1075,12 @@ struct Contract {
6: required ContractStatus status
7: required TermSetHierarchyRef terms
8: required list<ContractAdjustment> adjustments
// TODO think about it
// looks like payout tools are a bit off here,
// maybe they should be directly in party
9: required list<PayoutTool> payout_tools
10: optional LegalAgreement legal_agreement
13: optional ReportPreferences report_preferences
// deprecated
// Deprecated
3: optional Contractor contractor
9: optional list<PayoutTool> payout_tools
}
/** Юридическое соглашение */
@ -1310,7 +1311,12 @@ struct W2WServiceTerms {
5: optional FeeSelector fees
}
/* Payout methods */
/*
* Payout methods
*
* NOTE Deprecated. Payout objects and relevant refs and data structs
* are scheduled for removal in future versions of protocol.
*/
enum PayoutMethod {
russian_bank_account
@ -1319,6 +1325,7 @@ enum PayoutMethod {
payment_institution_account
}
// Deprecated
struct PayoutMethodRef { 1: required PayoutMethod id }
/** Способ вывода, категория средства вывода. */
@ -2114,20 +2121,16 @@ enum MerchantCashFlowAccount {
* - учёт прибыли по платежам в магазине;
* - учёт возмещённых вознаграждений.
*/
settlement
settlement = 0
/**
* Счёт гарантийного депозита:
* - учёт средств для погашения реализовавшихся рисков по мерчанту.
*/
guarantee
/**
* Счёт выплаченных средств:
* - учёт средств выплаченных мерчанту.
*/
payout
guarantee = 1
// Deprecated
payout = 2
}
enum ProviderCashFlowAccount {
@ -2626,12 +2629,14 @@ union Condition {
3: PaymentToolCondition payment_tool
5: ShopLocation shop_location_is
6: PartyCondition party
7: PayoutMethodRef payout_method_is
8: ContractorIdentificationLevel identification_level_is
10: BinDataCondition bin_data
// Legacy
9: P2PToolCondition p2p_tool
// Deprecated
7: PayoutMethodRef payout_method_is
}
struct BinDataCondition {
@ -2974,6 +2979,7 @@ struct PaymentMethodObject {
2: required PaymentMethodDefinition data
}
// Deprecated
struct PayoutMethodObject {
1: required PayoutMethodRef ref
2: required PayoutMethodDefinition data
@ -3123,7 +3129,6 @@ union Reference {
19 : BusinessScheduleRef business_schedule
20 : CalendarRef calendar
3 : PaymentMethodRef payment_method
21 : PayoutMethodRef payout_method
5 : BankRef bank
6 : ContractTemplateRef contract_template
17 : TermSetHierarchyRef term_set_hierarchy
@ -3154,6 +3159,9 @@ union Reference {
12 : DummyRef dummy
13 : DummyLinkRef dummy_link
// Deprecated
21 : PayoutMethodRef payout_method
// Reserved
// 10
// 22
@ -3175,7 +3183,6 @@ union DomainObject {
19 : BusinessScheduleObject business_schedule
20 : CalendarObject calendar
3 : PaymentMethodObject payment_method
21 : PayoutMethodObject payout_method
5 : BankObject bank
6 : ContractTemplateObject contract_template
17 : TermSetHierarchyObject term_set_hierarchy
@ -3208,6 +3215,9 @@ union DomainObject {
12 : DummyObject dummy
13 : DummyLinkObject dummy_link
// Deprecated
21 : PayoutMethodObject payout_method
// Reserved
// 10
// 22

View File

@ -215,35 +215,6 @@ struct StatCustomer {
2: required base.Timestamp created_at
}
typedef base.ID PayoutID
/**
* Информация о выплате
*/
struct StatPayout {
1 : required PayoutID id
2 : required domain.PartyID party_id
3 : required domain.ShopID shop_id
4 : required base.Timestamp created_at
5 : required PayoutStatus status
6 : required domain.Amount amount
7 : required domain.Amount fee
8 : required string currency_symbolic_code
9 : required domain.PayoutToolInfo payout_tool_info
}
union PayoutStatus {
1: PayoutUnpaid unpaid
2: PayoutPaid paid
3: PayoutCancelled cancelled
4: PayoutConfirmed confirmed
}
struct PayoutUnpaid {}
struct PayoutPaid {}
struct PayoutCancelled { 1: required string details }
struct PayoutConfirmed {}
/** Информация о рефанде **/
struct StatRefund {
1 : required domain.InvoicePaymentRefundID id
@ -334,10 +305,12 @@ union StatResponseData {
2: list<StatInvoice> invoices
3: list<StatCustomer> customers
4: list<StatInfo> records
5: list<StatPayout> payouts
6: list<StatRefund> refunds
7: list<EnrichedStatInvoice> enriched_invoices
8: list<StatChargeback> chargebacks
// Reserved
// 5
}
/**
@ -368,11 +341,6 @@ service MerchantStatistics {
*/
StatResponse GetCustomers(1: StatRequest req) throws (1: InvalidRequest ex1, 3: BadToken ex3)
/**
* Возвращает набор данных о выплатах
*/
StatResponse GetPayouts(1: StatRequest req) throws (1: InvalidRequest ex1, 3: BadToken ex3)
/**
* Возвращает набор данных о чарджбэках
*/