added api docs
This commit is contained in:
104
interface/api/payments/request/payment.yaml
Normal file
104
interface/api/payments/request/payment.yaml
Normal file
@@ -0,0 +1,104 @@
|
||||
components:
|
||||
schemas:
|
||||
PaymentBase:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required:
|
||||
- idempotencyKey
|
||||
properties:
|
||||
idempotencyKey:
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
|
||||
QuotePaymentRequest:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required:
|
||||
- intent
|
||||
properties:
|
||||
idempotencyKey:
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
intent:
|
||||
$ref: ../../../models/payment/payment.yaml#/components/schemas/PaymentIntent
|
||||
previewOnly:
|
||||
type: boolean
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
previewOnly:
|
||||
const: true
|
||||
required:
|
||||
- previewOnly
|
||||
then:
|
||||
not:
|
||||
required:
|
||||
- idempotencyKey
|
||||
else:
|
||||
required:
|
||||
- idempotencyKey
|
||||
|
||||
QuotePaymentsRequest:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required:
|
||||
- intents
|
||||
properties:
|
||||
idempotencyKey:
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
intents:
|
||||
type: array
|
||||
minItems: 1
|
||||
items:
|
||||
$ref: ../../../models/payment/payment.yaml#/components/schemas/PaymentIntent
|
||||
previewOnly:
|
||||
type: boolean
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
previewOnly:
|
||||
const: true
|
||||
required:
|
||||
- previewOnly
|
||||
then:
|
||||
not:
|
||||
required:
|
||||
- idempotencyKey
|
||||
else:
|
||||
required:
|
||||
- idempotencyKey
|
||||
|
||||
InitiatePaymentRequest:
|
||||
allOf:
|
||||
- $ref: ./payment.yaml#/components/schemas/PaymentBase
|
||||
- type: object
|
||||
additionalProperties: false
|
||||
oneOf:
|
||||
- required: [intent]
|
||||
- required: [quoteRef]
|
||||
properties:
|
||||
intent:
|
||||
$ref: ../../../models/payment/payment.yaml#/components/schemas/PaymentIntent
|
||||
quoteRef:
|
||||
type: string
|
||||
|
||||
InitiatePaymentsRequest:
|
||||
allOf:
|
||||
- $ref: ./payment.yaml#/components/schemas/PaymentBase
|
||||
- type: object
|
||||
additionalProperties: false
|
||||
required:
|
||||
- quoteRef
|
||||
properties:
|
||||
quoteRef:
|
||||
type: string
|
||||
Reference in New Issue
Block a user