diff --git a/doc/domain.md b/doc/domain.md index 215092e..80282c9 100644 --- a/doc/domain.md +++ b/doc/domain.md @@ -10,11 +10,11 @@ Contract / \ Services Shops - / | \ - Payments Payouts ... - Service Service - | | - Terms Terms + / \ + Payments ... + Service + | + Terms ``` В системе, есть _участники_, с которыми у нас заключён _договор_ на предоставление этим участникам различных услуг. В договоре указаны _пакеты услуг_, которые предоставляет система, например: diff --git a/proto/domain.thrift b/proto/domain.thrift index c5bc5a0..141690f 100644 --- a/proto/domain.thrift +++ b/proto/domain.thrift @@ -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 adjustments - // TODO think about it - // looks like payout tools are a bit off here, - // maybe they should be directly in party - 9: required list payout_tools 10: optional LegalAgreement legal_agreement 13: optional ReportPreferences report_preferences - // deprecated + + // Deprecated 3: optional Contractor contractor + 9: optional list 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 diff --git a/proto/merch_stat.thrift b/proto/merch_stat.thrift index c5c700c..2497272 100644 --- a/proto/merch_stat.thrift +++ b/proto/merch_stat.thrift @@ -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 invoices 3: list customers 4: list records - 5: list payouts 6: list refunds 7: list enriched_invoices 8: list 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) - /** * Возвращает набор данных о чарджбэках */