Feature: Webhooks (#489)

This commit is contained in:
Subin T P
2020-02-14 23:19:17 +05:30
committed by GitHub
parent 79a847aeab
commit 919261d843
29 changed files with 566 additions and 214 deletions

View File

@@ -0,0 +1,10 @@
json.array! @agents do |agent|
json.account_id agent.account_id
json.availability_status agent.availability_status
json.confirmed agent.confirmed?
json.email agent.email
json.id agent.id
json.name agent.name
json.role agent.role
json.thumbnail agent.avatar_url
end

View File

@@ -0,0 +1,7 @@
json.id webhook.id
json.urls webhook.urls
json.account_id webhook.account_id
json.inbox do
json.id webhook.inbox.id
json.name webhook.inbox.name
end

View File

@@ -0,0 +1,5 @@
json.payload do
json.webhook do
json.partial! 'webhook', webhook: @webhook
end
end

View File

@@ -0,0 +1,5 @@
json.payload do
json.webhooks do
json.array! @webhooks, partial: 'webhooks/webhook', as: :webhook
end
end

View File

@@ -0,0 +1,5 @@
json.payload do
json.webhook do
json.partial! 'webhook', webhook: @webhook
end
end