mirror of
https://github.com/valitydev/swag-fraudbusters.git
synced 2024-11-06 01:55:16 +00:00
Merge pull request #6 from rbkmoney/ft/add-load-data-methods
Add new methods for load data
This commit is contained in:
commit
a0432bd094
6
openapi/components/requests/ChargebacksRequest.yaml
Normal file
6
openapi/components/requests/ChargebacksRequest.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
type: object
|
||||
properties:
|
||||
chargebacks:
|
||||
type: array
|
||||
items:
|
||||
$ref: '../schemas/Chargeback.yaml'
|
6
openapi/components/requests/FraudPaymentsRequest.yaml
Normal file
6
openapi/components/requests/FraudPaymentsRequest.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
type: object
|
||||
properties:
|
||||
fraudPayments:
|
||||
type: array
|
||||
items:
|
||||
$ref: '../schemas/FraudPayment.yaml'
|
@ -3,4 +3,4 @@ required:
|
||||
- context
|
||||
properties:
|
||||
context:
|
||||
$ref: './PaymentContext.yaml'
|
||||
$ref: '../schemas/PaymentContext.yaml'
|
6
openapi/components/requests/PaymentsChangesRequest.yaml
Normal file
6
openapi/components/requests/PaymentsChangesRequest.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
type: object
|
||||
properties:
|
||||
paymentsChanges:
|
||||
type: array
|
||||
items:
|
||||
$ref: '../schemas/PaymentChange.yaml'
|
6
openapi/components/requests/RefundsRequest.yaml
Normal file
6
openapi/components/requests/RefundsRequest.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
type: object
|
||||
properties:
|
||||
refunds:
|
||||
type: array
|
||||
items:
|
||||
$ref: '../schemas/Refund.yaml'
|
6
openapi/components/requests/WithdrawalsRequest.yaml
Normal file
6
openapi/components/requests/WithdrawalsRequest.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
type: object
|
||||
properties:
|
||||
withdrawals:
|
||||
type: array
|
||||
items:
|
||||
$ref: '../schemas/Withdrawal.yaml'
|
@ -29,3 +29,9 @@ properties:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 200
|
||||
cardType:
|
||||
description: Тип карты
|
||||
$ref: './CardType.yaml'
|
||||
paymentSystem:
|
||||
description: Платежная система
|
||||
type: string
|
||||
|
4
openapi/components/schemas/CardType.yaml
Normal file
4
openapi/components/schemas/CardType.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
type: string
|
||||
enum:
|
||||
- 'debit'
|
||||
- 'credit'
|
44
openapi/components/schemas/Chargeback.yaml
Normal file
44
openapi/components/schemas/Chargeback.yaml
Normal file
@ -0,0 +1,44 @@
|
||||
description: Информация по чарджбеку
|
||||
required:
|
||||
- cashInfo
|
||||
- bankCard
|
||||
- merchantInfo
|
||||
- id
|
||||
- paymentId
|
||||
- payerType
|
||||
- status
|
||||
- category
|
||||
- chargebackCode
|
||||
properties:
|
||||
id:
|
||||
description: Идентификатор чарджбека
|
||||
type: string
|
||||
paymentId:
|
||||
description: Идентификатор платежа
|
||||
type: string
|
||||
eventTime:
|
||||
description: Дата и время создания
|
||||
type: string
|
||||
format: date-time
|
||||
merchantInfo:
|
||||
$ref: './MerchantInfo.yaml'
|
||||
bankCard:
|
||||
$ref: './BankCard.yaml'
|
||||
cashInfo:
|
||||
$ref: './CashInfo.yaml'
|
||||
providerInfo:
|
||||
$ref: './ProviderInfo.yaml'
|
||||
payerInfo:
|
||||
$ref: './UserInfo.yaml'
|
||||
payerType:
|
||||
description: Тип плательщика
|
||||
$ref: './PayerType.yaml'
|
||||
status:
|
||||
description: Статус чарджа
|
||||
$ref: './ChargebackStatus.yaml'
|
||||
category:
|
||||
description: Категория
|
||||
$ref: './ChargebackCategory.yaml'
|
||||
chargebackCode:
|
||||
description: Тип плательщика
|
||||
type: string
|
6
openapi/components/schemas/ChargebackCategory.yaml
Normal file
6
openapi/components/schemas/ChargebackCategory.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
type: string
|
||||
enum:
|
||||
- 'fraud'
|
||||
- 'dispute'
|
||||
- 'authorization'
|
||||
- 'processing_error'
|
5
openapi/components/schemas/ChargebackStatus.yaml
Normal file
5
openapi/components/schemas/ChargebackStatus.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
type: string
|
||||
enum:
|
||||
- 'accepted'
|
||||
- 'rejected'
|
||||
- 'cancelled'
|
11
openapi/components/schemas/Error.yaml
Normal file
11
openapi/components/schemas/Error.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
description: Информация по ошибке
|
||||
required:
|
||||
- errorCode
|
||||
properties:
|
||||
errorCode:
|
||||
description: Код ошибки
|
||||
type: string
|
||||
errorMessage:
|
||||
description: Описание ошибки
|
||||
type: string
|
||||
|
19
openapi/components/schemas/FraudPayment.yaml
Normal file
19
openapi/components/schemas/FraudPayment.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
description: Информация по мошеннической операции
|
||||
required:
|
||||
- paymentContext
|
||||
- paymentStatus
|
||||
- eventTime
|
||||
properties:
|
||||
payemntId:
|
||||
description: Идентификатор платежа
|
||||
type: string
|
||||
eventTime:
|
||||
description: Дата и время создания
|
||||
type: string
|
||||
format: date-time
|
||||
type:
|
||||
description: Тип мошенничества
|
||||
type: string
|
||||
comment:
|
||||
description: Комментарий
|
||||
type: string
|
@ -1,25 +0,0 @@
|
||||
description: P2p контекст
|
||||
required:
|
||||
- cashInfo
|
||||
- bankCard
|
||||
- transferId
|
||||
- identityId
|
||||
properties:
|
||||
payerInfo:
|
||||
$ref: './UserInfo.yaml'
|
||||
cashInfo:
|
||||
$ref: './CashInfo.yaml'
|
||||
sender:
|
||||
$ref: './BankCard.yaml'
|
||||
receiver:
|
||||
$ref: './BankCard.yaml'
|
||||
transferId:
|
||||
description: Идентификатор перевода
|
||||
type: string
|
||||
identityId:
|
||||
description: Идентификатор мерчанта
|
||||
type: string
|
||||
createdAt:
|
||||
description: Дата и время создания
|
||||
type: string
|
||||
format: date-time
|
@ -1,6 +0,0 @@
|
||||
type: object
|
||||
required:
|
||||
- context
|
||||
properties:
|
||||
context:
|
||||
$ref: './P2pContext.yaml'
|
16
openapi/components/schemas/PaymentChange.yaml
Normal file
16
openapi/components/schemas/PaymentChange.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
description: Изменения по платежу
|
||||
required:
|
||||
- paymentContext
|
||||
- paymentStatus
|
||||
- eventTime
|
||||
properties:
|
||||
paymentContext:
|
||||
$ref: './PaymentContext.yaml'
|
||||
paymentStatus:
|
||||
$ref: './PaymentStatus.yaml'
|
||||
error:
|
||||
$ref: './Error.yaml'
|
||||
eventTime:
|
||||
description: Дата и время создания
|
||||
type: string
|
||||
format: date-time
|
@ -7,6 +7,9 @@ required:
|
||||
- paymentId
|
||||
- payerType
|
||||
properties:
|
||||
id:
|
||||
description: Идентификатор платежа
|
||||
type: string
|
||||
payerInfo:
|
||||
$ref: './UserInfo.yaml'
|
||||
cashInfo:
|
||||
@ -15,6 +18,8 @@ properties:
|
||||
$ref: './BankCard.yaml'
|
||||
merchantInfo:
|
||||
$ref: './MerchantInfo.yaml'
|
||||
providerInfo:
|
||||
$ref: './ProviderInfo.yaml'
|
||||
mobile:
|
||||
description: Признак мобильного платежа
|
||||
type: boolean
|
||||
@ -23,12 +28,6 @@ properties:
|
||||
description: Признак рекурентного платежа
|
||||
type: boolean
|
||||
default: false
|
||||
invoiceId:
|
||||
description: Идентификатор счета
|
||||
type: string
|
||||
paymentId:
|
||||
description: Идентификатор платежа
|
||||
type: string
|
||||
payerType:
|
||||
description: Тип плательщика
|
||||
$ref: './PayerType.yaml'
|
||||
|
8
openapi/components/schemas/PaymentStatus.yaml
Normal file
8
openapi/components/schemas/PaymentStatus.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
type: string
|
||||
enum:
|
||||
- 'pending'
|
||||
- 'processed'
|
||||
- 'captured'
|
||||
- 'cancelled'
|
||||
- 'failed'
|
||||
- 'unknown'
|
17
openapi/components/schemas/ProviderInfo.yaml
Normal file
17
openapi/components/schemas/ProviderInfo.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
description: Информация о мерчанте
|
||||
required:
|
||||
- providerId
|
||||
- terminalId
|
||||
properties:
|
||||
providerId:
|
||||
description: Идентификатор провайдера
|
||||
type: string
|
||||
terminalId:
|
||||
description: Идентификатор терминала
|
||||
type: string
|
||||
country:
|
||||
description: 'Страна провайдера, alpha-3 код по стандарту [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1)'
|
||||
type: string
|
||||
pattern: '^[A-Z]{3}$'
|
||||
example: "RUS"
|
||||
|
38
openapi/components/schemas/Refund.yaml
Normal file
38
openapi/components/schemas/Refund.yaml
Normal file
@ -0,0 +1,38 @@
|
||||
description: Информация по возврату
|
||||
required:
|
||||
- cashInfo
|
||||
- bankCard
|
||||
- merchantInfo
|
||||
- id
|
||||
- paymentId
|
||||
- payerType
|
||||
- status
|
||||
properties:
|
||||
id:
|
||||
description: Идентификатор возврата
|
||||
type: string
|
||||
paymentId:
|
||||
description: Идентификатор платежа
|
||||
type: string
|
||||
eventTime:
|
||||
description: Дата и время создания
|
||||
type: string
|
||||
format: date-time
|
||||
merchantInfo:
|
||||
$ref: './MerchantInfo.yaml'
|
||||
bankCard:
|
||||
$ref: './BankCard.yaml'
|
||||
cashInfo:
|
||||
$ref: './CashInfo.yaml'
|
||||
providerInfo:
|
||||
$ref: './ProviderInfo.yaml'
|
||||
payerInfo:
|
||||
$ref: './UserInfo.yaml'
|
||||
payerType:
|
||||
description: Тип плательщика
|
||||
$ref: './PayerType.yaml'
|
||||
status:
|
||||
description: Статус возврата
|
||||
$ref: './RefundStatus.yaml'
|
||||
error:
|
||||
$ref: './Error.yaml'
|
4
openapi/components/schemas/RefundStatus.yaml
Normal file
4
openapi/components/schemas/RefundStatus.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
type: string
|
||||
enum:
|
||||
- 'succeeded'
|
||||
- 'failed'
|
@ -6,3 +6,5 @@ properties:
|
||||
type: string
|
||||
fingerprint:
|
||||
type: string
|
||||
phone:
|
||||
type: string
|
||||
|
29
openapi/components/schemas/Withdrawal.yaml
Normal file
29
openapi/components/schemas/Withdrawal.yaml
Normal file
@ -0,0 +1,29 @@
|
||||
description: Информация по выплате
|
||||
required:
|
||||
- cashInfo
|
||||
- bankCard
|
||||
- id
|
||||
- accountId
|
||||
- status
|
||||
properties:
|
||||
id:
|
||||
description: Идентификатор выплаты
|
||||
type: string
|
||||
eventTime:
|
||||
description: Дата и время создания
|
||||
type: string
|
||||
format: date-time
|
||||
bankCard:
|
||||
$ref: './BankCard.yaml'
|
||||
cashInfo:
|
||||
$ref: './CashInfo.yaml'
|
||||
providerInfo:
|
||||
$ref: './ProviderInfo.yaml'
|
||||
accountId:
|
||||
description: Номер счета
|
||||
type: string
|
||||
status:
|
||||
description: Статус выплаты
|
||||
$ref: './WithdrawalStatus.yaml'
|
||||
error:
|
||||
$ref: './Error.yaml'
|
5
openapi/components/schemas/WithdrawalStatus.yaml
Normal file
5
openapi/components/schemas/WithdrawalStatus.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
type: string
|
||||
enum:
|
||||
- 'pending'
|
||||
- 'succeeded'
|
||||
- 'failed'
|
@ -13,18 +13,28 @@ info:
|
||||
name: Apache 2.0
|
||||
url: https://www.apache.org/licenses/LICENSE-2.0.html
|
||||
security:
|
||||
- bearer: []
|
||||
- bearer: [ ]
|
||||
tags:
|
||||
- name: inspector
|
||||
x-displayName: Инспектор
|
||||
- name: load-data
|
||||
x-displayName: Загрузка исторических данных
|
||||
- name: error-codes
|
||||
x-displayName: Коды ошибок
|
||||
description:
|
||||
$ref: './docs/error-codes.md'
|
||||
paths:
|
||||
/fraudbusters/inspectPayment:
|
||||
/fraudbusters/inspect-payment:
|
||||
$ref: ./paths/inspectPayment.yaml
|
||||
/fraudbusters/inspectP2p:
|
||||
$ref: ./paths/inspectP2p.yaml
|
||||
/fraudbusters/chargebacks:
|
||||
$ref: ./paths/chargebacks.yaml
|
||||
/fraudbusters/fraud-payments:
|
||||
$ref: ./paths/fraudPayments.yaml
|
||||
/fraudbusters/payments:
|
||||
$ref: ./paths/payments.yaml
|
||||
/fraudbusters/refunds:
|
||||
$ref: ./paths/refunds.yaml
|
||||
/fraudbusters/withdrawals:
|
||||
$ref: ./paths/withdrawals.yaml
|
||||
servers:
|
||||
- url: 'https://api.rbk.money/org/v1'
|
||||
|
16
openapi/paths/chargebacks.yaml
Normal file
16
openapi/paths/chargebacks.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
post:
|
||||
summary: Загрузка чарджбеков
|
||||
operationId: insertChargebacks
|
||||
tags:
|
||||
- load-data
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../components/requests/ChargebacksRequest.yaml'
|
||||
responses:
|
||||
'201':
|
||||
description: Чарджбеки успешно сохранены
|
||||
'400':
|
||||
$ref: '../components/responses/BadResponse.yaml'
|
||||
|
16
openapi/paths/fraudPayments.yaml
Normal file
16
openapi/paths/fraudPayments.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
post:
|
||||
summary: Загрузка списка мошеннических операций
|
||||
operationId: insertFraudPayments
|
||||
tags:
|
||||
- load-data
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../components/requests/FraudPaymentsRequest.yaml'
|
||||
responses:
|
||||
'201':
|
||||
description: Мошеннические операции успешно сохранены
|
||||
'400':
|
||||
$ref: '../components/responses/BadResponse.yaml'
|
||||
|
@ -1,19 +0,0 @@
|
||||
post:
|
||||
summary: Проверка п2п перевода
|
||||
operationId: inspectP2p
|
||||
tags:
|
||||
- inspector
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../components/schemas/P2pInspectRequest.yaml'
|
||||
responses:
|
||||
'201':
|
||||
description: Пользователь вступил в организацию
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../components/responses/RiskScoreListResult.yaml'
|
||||
'400':
|
||||
$ref: '../components/responses/BadRequest.yaml'
|
@ -7,14 +7,14 @@ post:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../components/schemas/PaymentInspectRequest.yaml'
|
||||
$ref: '../components/requests/PaymentInspectRequest.yaml'
|
||||
responses:
|
||||
'201':
|
||||
description: Пользователь вступил в организацию
|
||||
description: Результат проверки риска
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../components/responses/RiskScoreResult.yaml'
|
||||
'400':
|
||||
$ref: '../components/responses/BadRequest.yaml'
|
||||
$ref: '../components/responses/BadResponse.yaml'
|
||||
|
||||
|
15
openapi/paths/payments.yaml
Normal file
15
openapi/paths/payments.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
post:
|
||||
summary: Загрузка изменений по платежу
|
||||
operationId: insertPaymentsChanges
|
||||
tags:
|
||||
- load-data
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../components/requests/PaymentsChangesRequest.yaml'
|
||||
responses:
|
||||
'201':
|
||||
description: Изменения по платежу успешно сохранены
|
||||
'400':
|
||||
$ref: '../components/responses/BadResponse.yaml'
|
16
openapi/paths/refunds.yaml
Normal file
16
openapi/paths/refunds.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
post:
|
||||
summary: Загрузка результатов возвратов
|
||||
operationId: insertRefunds
|
||||
tags:
|
||||
- load-data
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../components/requests/RefundsRequest.yaml'
|
||||
responses:
|
||||
'201':
|
||||
description: Возвраты успешно загружены
|
||||
'400':
|
||||
$ref: '../components/responses/BadResponse.yaml'
|
||||
|
16
openapi/paths/withdrawals.yaml
Normal file
16
openapi/paths/withdrawals.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
post:
|
||||
summary: Загрузка результатов выплаты
|
||||
operationId: insertWithdrawals
|
||||
tags:
|
||||
- load-data
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../components/requests/WithdrawalsRequest.yaml'
|
||||
responses:
|
||||
'201':
|
||||
description: Выплаты успешно загружены
|
||||
'400':
|
||||
$ref: '../components/responses/BadResponse.yaml'
|
||||
|
Loading…
Reference in New Issue
Block a user