Bootstrap copied BFF and local accounts with public Sendico contracts (#34)
This commit is contained in:
1 parent
67dc5b5b1e
commit
7062672a87
556 files changed
+42291
-777
No files matched your search
@@ -0,0 +1,74 @@
|
||||
get:
|
||||
tags: [Payment Methods]
|
||||
summary: List account-owned payment methods
|
||||
description: |
|
||||
Returns payment methods owned by `accounts_ref` within `organizations_ref`.
|
||||
Supports offset pagination and optional archive filtering.
|
||||
operationId: paymentMethodsListAccountOwned
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
|
||||
- $ref: ../parameters/accounts_ref.yaml#/components/parameters/AccountsRef
|
||||
- $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/Payment MethodsAuthData
|
||||
'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
|
||||
|
||||
post:
|
||||
tags: [Payment Methods]
|
||||
summary: Create account-owned payment method
|
||||
description: Creates a payment method owned by `accounts_ref` inside `organizations_ref`.
|
||||
operationId: paymentMethodsCreateAccountOwned
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
|
||||
- $ref: ../parameters/accounts_ref.yaml#/components/parameters/AccountsRef
|
||||
requestBody:
|
||||
$ref: ./bodies/payment_method.yaml#/components/requestBodies/PaymentMethodCreateBody
|
||||
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/Payment MethodsAuthData
|
||||
'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
|
||||
@@ -0,0 +1,36 @@
|
||||
post:
|
||||
tags: [Payment Methods]
|
||||
summary: Archive/unarchive payment method
|
||||
description: Sets payment method archive state by `payment_methods_ref` and required `archived` query parameter.
|
||||
operationId: paymentMethodsArchive
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
|
||||
- $ref: ../parameters/payment_methods_ref.yaml#/components/parameters/Payment MethodsRef
|
||||
- name: archived
|
||||
in: query
|
||||
required: true
|
||||
description: Target archive value to set on the payment method.
|
||||
schema:
|
||||
type: boolean
|
||||
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/Payment MethodsAuthData
|
||||
'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
|
||||
@@ -0,0 +1,17 @@
|
||||
components:
|
||||
requestBodies:
|
||||
PaymentMethodCreateBody:
|
||||
description: JSON body containing a payment method definition for create.
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../request/payment_method.yaml#/components/schemas/PaymentMethodCreateRequest
|
||||
|
||||
PaymentMethodUpdateBody:
|
||||
description: JSON body containing a payment method definition for update.
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../request/payment_method.yaml#/components/schemas/PaymentMethodUpdateRequest
|
||||
@@ -0,0 +1,102 @@
|
||||
get:
|
||||
tags: [Payment Methods]
|
||||
summary: Get payment method
|
||||
description: Returns payment method by `payment_methods_ref` inside `organizations_ref`.
|
||||
operationId: paymentMethodsGet
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
|
||||
- $ref: ../parameters/payment_methods_ref.yaml#/components/parameters/Payment MethodsRef
|
||||
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/Payment MethodsAuthData
|
||||
'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
|
||||
|
||||
patch:
|
||||
tags: [Payment Methods]
|
||||
summary: Update payment method
|
||||
description: Updates mutable payment method fields for the record identified by `payment_methods_ref` inside `organizations_ref`.
|
||||
operationId: paymentMethodsUpdate
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
|
||||
- $ref: ../parameters/payment_methods_ref.yaml#/components/parameters/Payment MethodsRef
|
||||
requestBody:
|
||||
$ref: ./bodies/payment_method.yaml#/components/requestBodies/PaymentMethodUpdateBody
|
||||
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/Payment MethodsAuthData
|
||||
'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
|
||||
|
||||
delete:
|
||||
tags: [Payment Methods]
|
||||
summary: Delete payment method
|
||||
description: Deletes payment method by reference.
|
||||
operationId: paymentMethodsDelete
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
|
||||
- $ref: ../parameters/payment_methods_ref.yaml#/components/parameters/Payment MethodsRef
|
||||
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/Payment MethodsAuthData
|
||||
'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,74 @@
|
||||
get:
|
||||
tags: [Payment Methods]
|
||||
summary: List recipient-owned payment methods
|
||||
description: |
|
||||
Returns payment methods owned by `recipients_ref` within `organizations_ref`.
|
||||
Supports offset pagination and optional archive filtering.
|
||||
operationId: paymentMethodsListRecipientOwned
|
||||
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/Payment MethodsAuthData
|
||||
'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
|
||||
|
||||
post:
|
||||
tags: [Payment Methods]
|
||||
summary: Create recipient-owned payment method
|
||||
description: Creates a payment method owned by `recipients_ref` inside `organizations_ref`.
|
||||
operationId: paymentMethodsCreateRecipientOwned
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
|
||||
- $ref: ../parameters/recipients_ref.yaml#/components/parameters/RecipientsRef
|
||||
requestBody:
|
||||
$ref: ./bodies/payment_method.yaml#/components/requestBodies/PaymentMethodCreateBody
|
||||
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/Payment MethodsAuthData
|
||||
'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
|
||||
@@ -0,0 +1,42 @@
|
||||
components:
|
||||
schemas:
|
||||
PaymentMethodBaseRequest:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
name:
|
||||
description: Optional human-readable payment method name.
|
||||
type: string
|
||||
description:
|
||||
description: Optional free-form payment method description.
|
||||
type: string
|
||||
nullable: true
|
||||
type:
|
||||
description: Payment method type discriminator.
|
||||
$ref: ../../../external/payment_method_type.yaml#/components/schemas/PaymentMethodType
|
||||
data:
|
||||
description: |
|
||||
Optional payment-method-type-specific payload.
|
||||
For `type: bankAccount`, this uses the Russian bank-account
|
||||
destination shape documented as `BankAccountEndpoint`.
|
||||
type: object
|
||||
additionalProperties: true
|
||||
isMain:
|
||||
description: Optional primary-method flag. When omitted, current handler behavior falls back to `false`.
|
||||
type: boolean
|
||||
|
||||
PaymentMethodCreateRequest:
|
||||
description: |
|
||||
Request payload used to create a payment method.
|
||||
Ownership comes from the route path. The body only carries mutable payment-method fields.
|
||||
required:
|
||||
- type
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/PaymentMethodBaseRequest'
|
||||
|
||||
PaymentMethodUpdateRequest:
|
||||
description: |
|
||||
Request payload used to update a payment method.
|
||||
This is a PATCH contract. Only `name`, `description`, `data`, and `isMain` are mutable.
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/PaymentMethodBaseRequest'
|
||||
@@ -0,0 +1,18 @@
|
||||
components:
|
||||
schemas:
|
||||
Payment MethodsAuthData:
|
||||
description: Authenticated response payload containing payment methods.
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required:
|
||||
- accessToken
|
||||
- payment_methods
|
||||
properties:
|
||||
accessToken:
|
||||
description: Refreshed access token to be used in subsequent API calls.
|
||||
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
|
||||
payment_methods:
|
||||
description: Collection of payment methods available to the authenticated account.
|
||||
type: array
|
||||
items:
|
||||
$ref: ../../../models/payment_method/payment_method.yaml#/components/schemas/PaymentMethod
|
||||
Reference in new issue
Block a user