Files
sxchnge/backend/contracts/sendico/api/payment_methods/request/payment_method.yaml
T

43 lines
1.6 KiB
YAML

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'