added api docs
This commit is contained in:
35
interface/api/payment_methods/archive.yaml
Normal file
35
interface/api/payment_methods/archive.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
get:
|
||||
tags: [PaymentMethods]
|
||||
summary: Archive/unarchive payment method
|
||||
operationId: paymentMethodsArchive
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
|
||||
- $ref: ../parameters/payment_methods_ref.yaml#/components/parameters/PaymentMethodsRef
|
||||
- name: archived
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: boolean
|
||||
- $ref: ../parameters/cascade.yaml#/components/parameters/Cascade
|
||||
responses:
|
||||
'200':
|
||||
description: Archive state updated
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: ./response/payment_method.yaml#/components/schemas/PaymentMethodsAuthData
|
||||
'400':
|
||||
$ref: ../response/operation.yaml#/components/responses/BadRequest
|
||||
'401':
|
||||
$ref: ../response/operation.yaml#/components/responses/Unauthorized
|
||||
'403':
|
||||
$ref: ../response/operation.yaml#/components/responses/Forbidden
|
||||
'500':
|
||||
$ref: ../response/operation.yaml#/components/responses/InternalServerError
|
||||
8
interface/api/payment_methods/bodies/payment_method.yaml
Normal file
8
interface/api/payment_methods/bodies/payment_method.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
components:
|
||||
requestBodies:
|
||||
PaymentMethodBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../request/payment_method.yaml#/components/schemas/PaymentMethodRequest
|
||||
34
interface/api/payment_methods/create.yaml
Normal file
34
interface/api/payment_methods/create.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
post:
|
||||
tags: [PaymentMethods]
|
||||
summary: Create payment method
|
||||
operationId: paymentMethodsCreate
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
|
||||
requestBody:
|
||||
$ref: ./bodies/payment_method.yaml#/components/requestBodies/PaymentMethodBody
|
||||
responses:
|
||||
'201':
|
||||
description: Payment method created
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: ./response/payment_method.yaml#/components/schemas/PaymentMethodsAuthData
|
||||
'400':
|
||||
$ref: ../response/operation.yaml#/components/responses/BadRequest
|
||||
'401':
|
||||
$ref: ../response/operation.yaml#/components/responses/Unauthorized
|
||||
'403':
|
||||
$ref: ../response/operation.yaml#/components/responses/Forbidden
|
||||
'404':
|
||||
$ref: ../response/operation.yaml#/components/responses/NotFound
|
||||
'409':
|
||||
$ref: ../response/operation.yaml#/components/responses/Conflict
|
||||
'500':
|
||||
$ref: ../response/operation.yaml#/components/responses/InternalServerError
|
||||
34
interface/api/payment_methods/list.yaml
Normal file
34
interface/api/payment_methods/list.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
get:
|
||||
tags: [PaymentMethods]
|
||||
summary: List payment methods for recipient
|
||||
operationId: paymentMethodsList
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
|
||||
- $ref: ../parameters/recipients_ref.yaml#/components/parameters/RecipientsRef
|
||||
- $ref: ../parameters/limit.yaml#/components/parameters/Limit
|
||||
- $ref: ../parameters/offset.yaml#/components/parameters/Offset
|
||||
- $ref: ../parameters/archived.yaml#/components/parameters/Archived
|
||||
responses:
|
||||
'200':
|
||||
description: Payment methods list
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: ./response/payment_method.yaml#/components/schemas/PaymentMethodsAuthData
|
||||
'400':
|
||||
$ref: ../response/operation.yaml#/components/responses/BadRequest
|
||||
'401':
|
||||
$ref: ../response/operation.yaml#/components/responses/Unauthorized
|
||||
'403':
|
||||
$ref: ../response/operation.yaml#/components/responses/Forbidden
|
||||
'404':
|
||||
$ref: ../response/operation.yaml#/components/responses/NotFound
|
||||
'500':
|
||||
$ref: ../response/operation.yaml#/components/responses/InternalServerError
|
||||
62
interface/api/payment_methods/object.yaml
Normal file
62
interface/api/payment_methods/object.yaml
Normal file
@@ -0,0 +1,62 @@
|
||||
get:
|
||||
tags: [PaymentMethods]
|
||||
summary: Get payment method
|
||||
operationId: paymentMethodsGet
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/payment_methods_ref.yaml#/components/parameters/PaymentMethodsRef
|
||||
responses:
|
||||
'200':
|
||||
description: Payment method data
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: ./response/payment_method.yaml#/components/schemas/PaymentMethodsAuthData
|
||||
'400':
|
||||
$ref: ../response/operation.yaml#/components/responses/BadRequest
|
||||
'401':
|
||||
$ref: ../response/operation.yaml#/components/responses/Unauthorized
|
||||
'403':
|
||||
$ref: ../response/operation.yaml#/components/responses/Forbidden
|
||||
'404':
|
||||
$ref: ../response/operation.yaml#/components/responses/NotFound
|
||||
'500':
|
||||
$ref: ../response/operation.yaml#/components/responses/InternalServerError
|
||||
|
||||
delete:
|
||||
tags: [PaymentMethods]
|
||||
summary: Delete payment method
|
||||
operationId: paymentMethodsDelete
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/payment_methods_ref.yaml#/components/parameters/PaymentMethodsRef
|
||||
- $ref: ../parameters/cascade.yaml#/components/parameters/Cascade
|
||||
responses:
|
||||
'200':
|
||||
description: Payment method deleted
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: ./response/payment_method.yaml#/components/schemas/PaymentMethodsAuthData
|
||||
'400':
|
||||
$ref: ../response/operation.yaml#/components/responses/BadRequest
|
||||
'401':
|
||||
$ref: ../response/operation.yaml#/components/responses/Unauthorized
|
||||
'403':
|
||||
$ref: ../response/operation.yaml#/components/responses/Forbidden
|
||||
'404':
|
||||
$ref: ../response/operation.yaml#/components/responses/NotFound
|
||||
'500':
|
||||
$ref: ../response/operation.yaml#/components/responses/InternalServerError
|
||||
@@ -0,0 +1,4 @@
|
||||
components:
|
||||
schemas:
|
||||
PaymentMethodRequest:
|
||||
$ref: ../../../models/payment_method/payment_method.yaml#/components/schemas/PaymentMethod
|
||||
15
interface/api/payment_methods/response/payment_method.yaml
Normal file
15
interface/api/payment_methods/response/payment_method.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
components:
|
||||
schemas:
|
||||
PaymentMethodsAuthData:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required:
|
||||
- accessToken
|
||||
- payment_methods
|
||||
properties:
|
||||
accessToken:
|
||||
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
|
||||
payment_methods:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../../../models/payment_method/payment_method.yaml#/components/schemas/PaymentMethod
|
||||
32
interface/api/payment_methods/update.yaml
Normal file
32
interface/api/payment_methods/update.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
put:
|
||||
tags: [PaymentMethods]
|
||||
summary: Update payment method
|
||||
operationId: paymentMethodsUpdate
|
||||
security:
|
||||
- bearerAuth: []
|
||||
requestBody:
|
||||
$ref: ./bodies/payment_method.yaml#/components/requestBodies/PaymentMethodBody
|
||||
responses:
|
||||
'200':
|
||||
description: Payment method updated
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: ./response/payment_method.yaml#/components/schemas/PaymentMethodsAuthData
|
||||
'400':
|
||||
$ref: ../response/operation.yaml#/components/responses/BadRequest
|
||||
'401':
|
||||
$ref: ../response/operation.yaml#/components/responses/Unauthorized
|
||||
'403':
|
||||
$ref: ../response/operation.yaml#/components/responses/Forbidden
|
||||
'404':
|
||||
$ref: ../response/operation.yaml#/components/responses/NotFound
|
||||
'409':
|
||||
$ref: ../response/operation.yaml#/components/responses/Conflict
|
||||
'500':
|
||||
$ref: ../response/operation.yaml#/components/responses/InternalServerError
|
||||
Reference in New Issue
Block a user