From 7da7e52dc6a80b33b26fbddd7b570536b41844a7 Mon Sep 17 00:00:00 2001 From: Julia Sheehan Date: Tue, 21 Jan 2025 12:22:41 +0000 Subject: [PATCH 1/3] seeing if small fix works --- src/v2/schemas/webhookEvents.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 9b01679c12a7a95b5b58213bf01490f04d294510 Mon Sep 17 00:00:00 2001 From: Julia Sheehan Date: Tue, 21 Jan 2025 12:44:29 +0000 Subject: [PATCH 2/3] webhook test --- src/webhooks/Webhooks.yaml | 1 + 1 file changed, 1 insertion(+) 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 From 3a22f2e6639931c7905837e09bb3706819e1694a Mon Sep 17 00:00:00 2001 From: Julia Sheehan Date: Tue, 21 Jan 2025 14:25:29 +0000 Subject: [PATCH 3/3] Change to list all webhooks --- src/fire-business-api-v1.yaml | 5 +++++ src/v2/paths/apps/webhook-events.yaml | 4 ++-- src/v2/schemas/events.yaml | 17 +++++++++++++++++ src/v2/schemas/listAllWebhooks.yaml | 5 +++++ src/v2/schemas/webhookEvent.yaml | 5 +---- 5 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 src/v2/schemas/events.yaml create mode 100644 src/v2/schemas/listAllWebhooks.yaml diff --git a/src/fire-business-api-v1.yaml b/src/fire-business-api-v1.yaml index baa24bb..98765cd 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