mirror of
https://github.com/valitydev/swag-wallets.git
synced 2024-11-06 02:45:19 +00:00
APM-83: Get withdrawal methods (#11)
* added get methods method * fixed * fixed schema * renamed * renamed to withdrawal
This commit is contained in:
parent
932fa254a0
commit
ce0dd21356
16
README.md
16
README.md
@ -1 +1,17 @@
|
||||
# Wallet API Specification
|
||||
|
||||
## Points of extensions
|
||||
|
||||
### Generic destination resources
|
||||
|
||||
This allows adding new destination resources which should be handled by _wapi_ in a generic manner.
|
||||
|
||||
Provided through vendor extension `x-vality-genericMethod`, which should be a JSON object. You can set it on a model discriminated against `DestinationResource`. When it's set on an object its `type` value will be used to identify this resource's [payment service](https://github.com/valitydev/fistful-proto/blob/eeff5ba9/proto/base.thrift#L167).
|
||||
|
||||
At the moment this object may contain following properties:
|
||||
|
||||
1. `schema` object, which should be a valid JSON schema.
|
||||
|
||||
A `DestinationResource` object following this schema will be interpreted as _generic resource data_ and passed down as part of [`ResourceGeneric.generic.data`](https://github.com/valitydev/fistful-proto/blob/eeff5ba9/proto/base.thrift#L179) thrift model (which will eventually become [`GenericPaymentTool.data`](https://github.com/valitydev/damsel/blob/b25d3365/proto/domain.thrift#L1855)).
|
||||
|
||||
When `id` schema property is defined, its value will be used to annotate _generic resource data_ data, namely through [MIME type](https://github.com/valitydev/fistful-proto/blob/eeff5ba9/proto/base.thrift#L174).
|
@ -1,4 +1,7 @@
|
||||
description: Платежная система
|
||||
description: |
|
||||
Платежная система.
|
||||
|
||||
Набор систем, доступных для проведения выплат, можно узнать, вызвав соответствующую [операцию](#operation/getMethods).
|
||||
type: string
|
||||
# enum:
|
||||
# - visa
|
||||
|
@ -1,3 +1,7 @@
|
||||
description: Провайдер электронных денежных средств
|
||||
description: |
|
||||
Провайдер электронных денежных средств.
|
||||
|
||||
Набор провайдеров, доступных для проведения выплат, можно узнать, вызвав
|
||||
соответствующую [операцию](#operation/getMethods).
|
||||
type: string
|
||||
example: Paypal
|
||||
|
7
api/wallet/spec/definitions/GenericProvider.yaml
Normal file
7
api/wallet/spec/definitions/GenericProvider.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
description: |
|
||||
Провайдер сервисов выплат.
|
||||
|
||||
Набор провайдеров, доступных для проведения выплат, можно узнать, вызвав
|
||||
соответствующую [операцию](#operation/getMethods).
|
||||
type: string
|
||||
example: YourBankName
|
12
api/wallet/spec/definitions/WithdrawalMethod.yaml
Normal file
12
api/wallet/spec/definitions/WithdrawalMethod.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
type: object
|
||||
discriminator: method
|
||||
required:
|
||||
- method
|
||||
properties:
|
||||
method:
|
||||
description: Метод для проведения выплаты
|
||||
type: string
|
||||
enum:
|
||||
- WithdrawalMethodBankCard
|
||||
- WithdrawalMethodDigitalWallet
|
||||
- WithdrawalMethodGeneric
|
13
api/wallet/spec/definitions/WithdrawalMethodBankCard.yaml
Normal file
13
api/wallet/spec/definitions/WithdrawalMethodBankCard.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
type: object
|
||||
allOf:
|
||||
- $ref: '#/definitions/WithdrawalMethod'
|
||||
- type: object
|
||||
required:
|
||||
- paymentSystems
|
||||
properties:
|
||||
paymentSystems:
|
||||
description: Список платежных систем
|
||||
type: array
|
||||
items:
|
||||
x-rebillyMerge:
|
||||
- $ref: '#/definitions/BankCardPaymentSystem'
|
@ -0,0 +1,13 @@
|
||||
type: object
|
||||
allOf:
|
||||
- $ref: '#/definitions/WithdrawalMethod'
|
||||
- type: object
|
||||
required:
|
||||
- providers
|
||||
properties:
|
||||
providers:
|
||||
description: Список провайдеров электронных денежных средств
|
||||
type: array
|
||||
items:
|
||||
x-rebillyMerge:
|
||||
- $ref: '#/definitions/DigitalWalletProvider'
|
13
api/wallet/spec/definitions/WithdrawalMethodGeneric.yaml
Normal file
13
api/wallet/spec/definitions/WithdrawalMethodGeneric.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
type: object
|
||||
allOf:
|
||||
- $ref: '#/definitions/WithdrawalMethod'
|
||||
- type: object
|
||||
required:
|
||||
- providers
|
||||
properties:
|
||||
providers:
|
||||
description: Список провайдеров сервисов выплат
|
||||
type: array
|
||||
items:
|
||||
x-rebillyMerge:
|
||||
- $ref: '#/definitions/GenericProvider'
|
@ -0,0 +1,23 @@
|
||||
get:
|
||||
summary: Получить выплатные методы доступные по личности владельца
|
||||
tags:
|
||||
- Identities
|
||||
operationId: getWithdrawalMethods
|
||||
parameters:
|
||||
- $ref: '#/parameters/requestID'
|
||||
- $ref: '#/parameters/deadline'
|
||||
- $ref: '#/parameters/identityID'
|
||||
responses:
|
||||
'200':
|
||||
description: Найденные методы
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
methods:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/definitions/WithdrawalMethod'
|
||||
'400':
|
||||
$ref: '#/responses/BadRequest'
|
||||
'401':
|
||||
$ref: '#/responses/Unauthorized'
|
Loading…
Reference in New Issue
Block a user