mirror of
https://github.com/valitydev/swag-payments.git
synced 2024-11-06 09:35:22 +00:00
Revert "Revert "ED-154/feat: Add countries and trade bloc endpoints""
This commit is contained in:
parent
4bb64196f8
commit
90beb3e1fc
17
spec/definitions/Country.yaml
Normal file
17
spec/definitions/Country.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
description: 'Страна'
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
properties:
|
||||
id:
|
||||
x-rebillyMerge:
|
||||
- $ref: '#/definitions/CountryCode'
|
||||
name:
|
||||
type: string
|
||||
maxLength: 200
|
||||
tradeBlocs:
|
||||
type: array
|
||||
items:
|
||||
description: Идентификаторы Торговых Блоков
|
||||
type: string
|
4
spec/definitions/CountryCode.yaml
Normal file
4
spec/definitions/CountryCode.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
description: 'Alpha-3 код страны по стандарту [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1)'
|
||||
type: string
|
||||
pattern: '^[A-Z]{3}$'
|
||||
example: "RUS"
|
@ -29,14 +29,10 @@ properties:
|
||||
RAIFFEISEN BANK INTERNATIONAL AG
|
||||
countryCode:
|
||||
x-rebillyMerge:
|
||||
- $ref: '#/definitions/Residence'
|
||||
- $ref: '#/definitions/CountryCode'
|
||||
- description: |
|
||||
Страна резиденции банковской организации,
|
||||
Код страны резиденции банковской организации, обозначается
|
||||
alpha-3 код по стандарту [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1)
|
||||
type: string
|
||||
# readOnly: true
|
||||
pattern: '^[A-Z]{2}$'
|
||||
example: "AT"
|
||||
address:
|
||||
description: Адрес юридического лица банковской организации
|
||||
type: string
|
||||
|
@ -23,3 +23,6 @@ allOf:
|
||||
description: Регистрационный номер
|
||||
type: string
|
||||
maxLength: 100
|
||||
country:
|
||||
x-rebillyMerge:
|
||||
- $ref: '#/definitions/CountryCode'
|
||||
|
@ -19,7 +19,7 @@ properties:
|
||||
type: array
|
||||
items:
|
||||
x-rebillyMerge:
|
||||
- $ref: '#/definitions/Residence'
|
||||
- $ref: '#/definitions/CountryCode'
|
||||
realm:
|
||||
x-rebillyMerge:
|
||||
- $ref: '#/definitions/RealmMode'
|
||||
|
@ -1,4 +0,0 @@
|
||||
description: 'Резиденция, alpha-3 код по стандарту [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1)'
|
||||
type: string
|
||||
pattern: '^[A-Z]{3}$'
|
||||
example: "RUS"
|
14
spec/definitions/TradeBloc.yaml
Normal file
14
spec/definitions/TradeBloc.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
description: Торговый Блок
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
maxLength: 200
|
||||
description:
|
||||
type: string
|
||||
maxLength: 1000
|
17
spec/paths/processing@countries.yaml
Normal file
17
spec/paths/processing@countries.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
get:
|
||||
description: Получить список стран
|
||||
tags:
|
||||
- Countries
|
||||
operationId: getCountries
|
||||
parameters:
|
||||
- $ref: '#/parameters/requestID'
|
||||
- $ref: '#/parameters/deadline'
|
||||
responses:
|
||||
'200':
|
||||
description: Список стран
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/definitions/Country'
|
||||
'400':
|
||||
$ref: '#/responses/DefaultLogicError'
|
18
spec/paths/processing@countries@{countryID}.yaml
Normal file
18
spec/paths/processing@countries@{countryID}.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
get:
|
||||
description: Получить данные страны по ее ID
|
||||
tags:
|
||||
- Countries
|
||||
operationId: getCountryByID
|
||||
parameters:
|
||||
- $ref: '#/parameters/requestID'
|
||||
- $ref: '#/parameters/deadline'
|
||||
- $ref: '#/parameters/countryID'
|
||||
responses:
|
||||
'200':
|
||||
description: Страна найдена
|
||||
schema:
|
||||
$ref: '#/definitions/Country'
|
||||
'404':
|
||||
$ref: '#/responses/NotFound'
|
||||
'400':
|
||||
$ref: '#/responses/DefaultLogicError'
|
17
spec/paths/processing@tradeblocs.yaml
Normal file
17
spec/paths/processing@tradeblocs.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
get:
|
||||
description: Получить список торговых блоков
|
||||
tags:
|
||||
- TradeBlocs
|
||||
operationId: getTradeBlocs
|
||||
parameters:
|
||||
- $ref: '#/parameters/requestID'
|
||||
- $ref: '#/parameters/deadline'
|
||||
responses:
|
||||
'200':
|
||||
description: Список Торговых Блоков
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/definitions/TradeBloc'
|
||||
'400':
|
||||
$ref: '#/responses/DefaultLogicError'
|
18
spec/paths/processing@tradeblocs@{tradeBlocID}.yaml
Normal file
18
spec/paths/processing@tradeblocs@{tradeBlocID}.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
get:
|
||||
description: Получить данные торгового блока по его ID
|
||||
tags:
|
||||
- PaymentInstitutions
|
||||
operationId: getTradeBlocByID
|
||||
parameters:
|
||||
- $ref: '#/parameters/requestID'
|
||||
- $ref: '#/parameters/deadline'
|
||||
- $ref: '#/parameters/tradeBlocID'
|
||||
responses:
|
||||
'200':
|
||||
description: Торговый Блок найден
|
||||
schema:
|
||||
$ref: '#/definitions/TradeBloc'
|
||||
'404':
|
||||
$ref: '#/responses/NotFound'
|
||||
'400':
|
||||
$ref: '#/responses/DefaultLogicError'
|
@ -355,6 +355,19 @@ parameters:
|
||||
description: Уникальный в рамках платформы идентификатор участника. # TODO: rephrase
|
||||
required: true
|
||||
type: string
|
||||
countryID:
|
||||
name: countryID
|
||||
in: path
|
||||
required: true
|
||||
description: 'Alpha-3 код страны по стандарту [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1)'
|
||||
type: string
|
||||
pattern: '^[A-Z]{3}$'
|
||||
tradeBlocID:
|
||||
name: tradeBlocID
|
||||
in: path
|
||||
description: Идентификатор торгового блока
|
||||
required: true
|
||||
type: string
|
||||
tags:
|
||||
- name: Parties
|
||||
x-displayName: Участники
|
||||
|
Loading…
Reference in New Issue
Block a user