mirror of
https://github.com/valitydev/swag-analytics.git
synced 2024-11-06 00:35:22 +00:00
MST-214: Add chargebacks search (#33)
This commit is contained in:
parent
d148d025c8
commit
b6ff333461
74
spec/definitions/Chargeback.yaml
Normal file
74
spec/definitions/Chargeback.yaml
Normal file
@ -0,0 +1,74 @@
|
||||
type: object
|
||||
required:
|
||||
- invoiceId
|
||||
- paymentId
|
||||
- chargebackId
|
||||
- shopID
|
||||
- createdAt
|
||||
- bodyAmount
|
||||
- bodyCurrency
|
||||
- levyAmount
|
||||
- levyCurrency
|
||||
properties:
|
||||
invoiceId:
|
||||
description: Идентификатор инвойса
|
||||
type: string
|
||||
paymentId:
|
||||
description: Идентификатор платежа
|
||||
type: string
|
||||
chargebackId:
|
||||
description: Идентификатор чарджбэка
|
||||
type: string
|
||||
externalId:
|
||||
description: Внешний идентификатор
|
||||
type: string
|
||||
shopID:
|
||||
description: Идентификатор магазина
|
||||
type: string
|
||||
createdAt:
|
||||
description: Дата и время создания
|
||||
type: string
|
||||
format: date-time
|
||||
levyAmount:
|
||||
description: Сумма списываемых средств у чарджбека
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 1
|
||||
levyCurrency:
|
||||
x-merge-obj:
|
||||
- $ref: '#/definitions/Currency'
|
||||
bodyAmount:
|
||||
description: Сумма чарджбэка
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 1
|
||||
bodyCurrency:
|
||||
x-merge-obj:
|
||||
- $ref: '#/definitions/Currency'
|
||||
fee:
|
||||
description: 'Комиссия системы, в минорных денежных единицах'
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 0
|
||||
providerFee:
|
||||
description: 'Комиссия провайдера, в минорных денежных единицах'
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 0
|
||||
externalFee:
|
||||
description: 'Комиссия внешней системы системы, в минорных денежных единицах'
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 0
|
||||
status:
|
||||
x-merge-obj:
|
||||
- $ref: '#/definitions/ChargebackStatus'
|
||||
stage:
|
||||
x-merge-obj:
|
||||
- $ref: '#/definitions/ChargebackStage'
|
||||
chargebackReason:
|
||||
$ref: '#/definitions/ChargebackReason'
|
||||
content:
|
||||
$ref: '#/definitions/Content'
|
||||
|
||||
|
7
spec/definitions/ChargebackCategory.yaml
Normal file
7
spec/definitions/ChargebackCategory.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
description: Категория чарджбэка
|
||||
type: string
|
||||
enum:
|
||||
- fraud
|
||||
- dispute
|
||||
- authorisation
|
||||
- processing_error
|
10
spec/definitions/ChargebackReason.yaml
Normal file
10
spec/definitions/ChargebackReason.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
description: Данные о причине чарджбэка
|
||||
type: object
|
||||
required:
|
||||
- category
|
||||
properties:
|
||||
code:
|
||||
description: Код категории
|
||||
type: string
|
||||
category:
|
||||
$ref: '#/definitions/ChargebackCategory'
|
6
spec/definitions/ChargebackStage.yaml
Normal file
6
spec/definitions/ChargebackStage.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
description: Этап прохождения чарджбэка
|
||||
type: string
|
||||
enum:
|
||||
- chargeback
|
||||
- pre_arbitration
|
||||
- arbitration
|
7
spec/definitions/ChargebackStatus.yaml
Normal file
7
spec/definitions/ChargebackStatus.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
description: Статус чарджбэка
|
||||
type: string
|
||||
enum:
|
||||
- pending
|
||||
- accepted
|
||||
- rejected
|
||||
- cancelled
|
9
spec/definitions/Content.yaml
Normal file
9
spec/definitions/Content.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
description: Тип данных
|
||||
type: string
|
||||
category:
|
||||
description: Данные
|
||||
type: string
|
||||
format: byte
|
96
spec/paths/chargebacks.yaml
Normal file
96
spec/paths/chargebacks.yaml
Normal file
@ -0,0 +1,96 @@
|
||||
get:
|
||||
description: Поиск чарджбэков
|
||||
tags:
|
||||
- Search
|
||||
operationId: searchChardgebacks
|
||||
parameters:
|
||||
- $ref: '#/parameters/requestID'
|
||||
- $ref: '#/parameters/deadline'
|
||||
- $ref: '#/parameters/shopIDQuery'
|
||||
- $ref: '#/parameters/shopIDs'
|
||||
- $ref: '#/parameters/fromTime'
|
||||
- $ref: '#/parameters/toTime'
|
||||
- $ref: '#/parameters/limit'
|
||||
- $ref: '#/parameters/offset'
|
||||
- name: invoiceID
|
||||
in: query
|
||||
description: Идентификатор инвойса
|
||||
required: false
|
||||
type: string
|
||||
maxLength: 40
|
||||
minLength: 1
|
||||
- name: paymentID
|
||||
in: query
|
||||
description: Идентификатор платежа
|
||||
required: false
|
||||
type: string
|
||||
maxLength: 40
|
||||
minLength: 1
|
||||
- name: chargebackID
|
||||
in: query
|
||||
description: Идентификатор чарджбэка
|
||||
required: false
|
||||
type: string
|
||||
maxLength: 40
|
||||
minLength: 1
|
||||
- name: chargebackStatuses
|
||||
in: query
|
||||
description: Статусы чарджбэков
|
||||
required: false
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
enum:
|
||||
- pending
|
||||
- accepted
|
||||
- rejected
|
||||
- cancelled
|
||||
- name: chargebackStages
|
||||
in: query
|
||||
description: Этапы чарджбэков
|
||||
required: false
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
enum:
|
||||
- chargeback
|
||||
- pre_arbitration
|
||||
- arbitration
|
||||
- name: chargebackCategories
|
||||
in: query
|
||||
description: Категории чарджбэков
|
||||
required: false
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
enum:
|
||||
- fraud
|
||||
- dispute
|
||||
- authorisation
|
||||
- processing_error
|
||||
- x-merge-obj:
|
||||
- name: continuationToken
|
||||
in: query
|
||||
required: false
|
||||
- $ref: '#/definitions/ContinuationToken'
|
||||
responses:
|
||||
'200':
|
||||
description: Найденные чарджбэки
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
totalCount:
|
||||
type: integer
|
||||
continuationToken:
|
||||
x-merge-obj:
|
||||
- $ref: '#/definitions/ContinuationToken'
|
||||
result:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/definitions/Chargeback'
|
||||
'404':
|
||||
$ref: '#/responses/NotFound'
|
||||
'401':
|
||||
$ref: '#/responses/Unauthorized'
|
||||
'400':
|
||||
$ref: '#/responses/DefaultLogicError'
|
Loading…
Reference in New Issue
Block a user