diff --git a/src/fire-business-api-v1.yaml b/src/fire-business-api-v1.yaml index 7f75973..9fe02dd 100644 --- a/src/fire-business-api-v1.yaml +++ b/src/fire-business-api-v1.yaml @@ -75,6 +75,7 @@ paths: /v2/webhooks: $ref: ./v2/paths/apps/webhook-events.yaml + /v2/batches/{batchUuid}/newpayees: $ref: ./v2/paths/batches/newpayees-batch.yaml @@ -372,6 +373,10 @@ components: $ref: 'v1/schemas/bank-pay-refund-request.yaml' BankPayRefundResponse: $ref: 'v1/schemas/bank-pay-refund-response.yaml' + Events: + $ref: 'v2/schemas/events.yaml' + WebhookEvents: + $ref: 'v2/schemas/webhookEvents.yaml' security: - bearerAuth: [] diff --git a/src/v2/paths/apps/webhook-events.yaml b/src/v2/paths/apps/webhook-events.yaml index 83c172a..741179d 100644 --- a/src/v2/paths/apps/webhook-events.yaml +++ b/src/v2/paths/apps/webhook-events.yaml @@ -6,10 +6,10 @@ get: operationId: getWebhookEvents responses: '200': - description: An array of webhook objects + description: An object of information about your webhooks content: application/json: schema: - $ref: '../../schemas/webhookEvents.yaml' + $ref: '../../schemas/listAllWebhooks.yaml' '401': $ref: '../../responses/unauthorised-error.yaml' diff --git a/src/v2/schemas/events.yaml b/src/v2/schemas/events.yaml new file mode 100644 index 0000000..26f8486 --- /dev/null +++ b/src/v2/schemas/events.yaml @@ -0,0 +1,17 @@ +title: events +type: array +items: + type: string + enum: + - LODGEMENT_RECEIVED + - PAYMENT_RECEIVED + - PAYMENT_REQUEST_PAYMENT_RECEIVED + - ACCOUNT_CREATED + - CARD_CREATED + - CARD_AUTHORISATION + - CARD_SETTLEMENT + - PAYMENT_REQUEST_PAYMENT_AUTHORISED + - PIS_LODGEMENT_RECEIVE + example: CARD_AUTHORISATION + + \ No newline at end of file diff --git a/src/v2/schemas/listAllWebhooks.yaml b/src/v2/schemas/listAllWebhooks.yaml new file mode 100644 index 0000000..5fa6310 --- /dev/null +++ b/src/v2/schemas/listAllWebhooks.yaml @@ -0,0 +1,5 @@ +title: listAllWebhooks +type: object +properties: + webhookEvents: + $ref: '#/components/schemas/WebhookEvents' diff --git a/src/v2/schemas/webhookEvent.yaml b/src/v2/schemas/webhookEvent.yaml index 6f72b0d..9a46f51 100644 --- a/src/v2/schemas/webhookEvent.yaml +++ b/src/v2/schemas/webhookEvent.yaml @@ -4,10 +4,7 @@ properties: webhook: $ref: '#/components/schemas/Webhook' events: - type: array - items: - type: string - example: "LODGEMENT_RECIEVED" + $ref: '#/components/schemas/Events' \ No newline at end of file diff --git a/src/v2/schemas/webhookEvents.yaml b/src/v2/schemas/webhookEvents.yaml index ed0eebd..37f3f8c 100644 --- a/src/v2/schemas/webhookEvents.yaml +++ b/src/v2/schemas/webhookEvents.yaml @@ -1,4 +1,4 @@ Title: webhookEvents Type: array items: - - $ref: '#/components/schemas/WebhookEvent' \ No newline at end of file + $ref: '#/components/schemas/WebhookEvent' \ No newline at end of file diff --git a/src/webhooks/Webhooks.yaml b/src/webhooks/Webhooks.yaml index 410b530..ae1c950 100644 --- a/src/webhooks/Webhooks.yaml +++ b/src/webhooks/Webhooks.yaml @@ -1,4 +1,5 @@ post: + title: Sample webhook response description: Webhooks allow you to be notified of events as they happen on your Fire accounts. The below sample response shows how a webhook from Fire will arrive at your server. See our 'API and webhooks' guide for more detailed information. requestBody: required: true