Webhook Subscription Object.
Visit official API Doc
Create a Webhook Subscription for an Organization or User.
Visit official API Doc
client.webhooks.create(url: 'https://example.com/webhook', events: ['invitee.created'], organization: organization_uri, scope: 'organization')
#=> #<Calendlyr::Webhooks::Subscription>
client.webhooks.create(url: 'https://example.com/webhook', events: ['invitee.created'], organization: organization_uri, user: user_uri, scope: 'user')
#=> #<Calendlyr::Webhooks::Subscription>
client.webhooks.create(url: 'https://example.com/webhook', events: ['invitee.created'], organization: organization_uri, group: group_uri, scope: 'group')
#=> #<Calendlyr::Webhooks::Subscription>
Get a specified Webhook Subscription.
Visit official API Doc
client.webhooks.retrieve(webhook_uuid: webhook_uuid)
#=> #<Calendlyr::Webhooks::Subscription>
Get a list of Webhook Subscriptions for a specified Organization or User.
Visit official API Doc
For the example bellow we will use only required parameters, but you can use any other parameter as well.
client.webhooks.list(organization: organization_uri, scope: 'organization')
#=> #<Calendlyr::Collection @data=[#<Calendlyr::Webhooks::Subscription>, ...], @count=nil, @next_page=nil, @next_page_token=nil, @client=#<Calendlyr::Client>>
Delete a Webhook Subscription.
Visit official API Doc
client.webhooks.delete(webhook_uuid: webhook_uuid)
#=>
webhook_subscription.associated_organization
#=> #<Calendlyr::Organization>
webhook_subscription.associated_user
#=> #<Calendlyr::User>
webhook_subscription.associated_creator
#=> #<Calendlyr::User>
webhook_subscription.active?
#=> true
webhook_subscription.disabled?
#=> false