Skip to content

Latest commit

 

History

History
96 lines (63 loc) · 2.42 KB

subscription.md

File metadata and controls

96 lines (63 loc) · 2.42 KB

Webhook Subscription Calendlyr::Wehooks::Subscription

Webhook Subscription Object.

Visit official API Doc

Client requests

Create

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>

Retrieve

Get a specified Webhook Subscription.

Visit official API Doc

client.webhooks.retrieve(webhook_uuid: webhook_uuid)
#=> #<Calendlyr::Webhooks::Subscription>

List

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

Delete a Webhook Subscription.

Visit official API Doc

client.webhooks.delete(webhook_uuid: webhook_uuid)
#=>

Object methods

Associated Organization

webhook_subscription.associated_organization
#=> #<Calendlyr::Organization>

Associated User

webhook_subscription.associated_user
#=> #<Calendlyr::User>

Associated Creator

webhook_subscription.associated_creator
#=> #<Calendlyr::User>

active?

webhook_subscription.active?
#=> true

disabled?

webhook_subscription.disabled?
#=> false