swag-payments/spec/definitions/CardData.yaml
Andrew Mayorov 19713fc464 CAPI-125: Impose reasonable limits and enforce specs on model props (#62)
* CAPI-125: Impose reasonable limits and enforce specs on model props

* CAPI-125: Accomodate for ipv6-mapped ipv4 addresses

* CAPI-125: Fix standard id

* CAPI-125: Refine phone number format
2017-05-12 17:23:24 +03:00

27 lines
724 B
YAML

type: object
allOf:
- $ref: '#/definitions/PaymentTool'
- type: object
description: Банковская карта
required:
- cardNumber
- expDate
- cvv
properties:
cardNumber:
description: Номер банковской карты
type: string
pattern: '^\d{12,19}$'
expDate:
description: Срок действия банковской карты
type: string
pattern: '^\d{2}\/(\d{2}|\d{4})$'
cvv:
description: Код верификации
type: string
pattern: '^\d{3,4}$'
cardHolder:
description: Имя держателя карты
type: string
maxLength: 100