class Calendly::WebhookSubscription

Calendly's webhook model.

Constants

ASSOCIATION
TIME_FIELDS
UUID_RE

Attributes

callback_url[RW]

@return [String] The callback URL to use when the event is triggered.

created_at[RW]

@return [Time] The moment when the webhook subscription was created.

creator[RW]

@return [Calendly::User] The user who created the webhook subscription.

events[RW]

@return [Array<String>] A list of events to which the webhook is subscribed.

organization[RW]

@return [Calendly::Organization] The organization that's associated with the webhook subscription.

retry_started_at[RW]

@return [Time] The date and time the webhook subscription is retried.

scope[RW]

@return [String] The scope of the webhook subscription.

state[RW]

@return [String] Indicates if the webhook subscription is “active” or “disabled”.

updated_at[RW]

@return [Time] The moment when the webhook subscription was last updated.

uri[RW]

@return [String] Canonical reference (unique identifier) for the webhook.

user[RW]

@return [Calendly::User] The user that's associated with the webhook subscription.

uuid[RW]

@return [String] unique id of the WebhookSubscription object.

Public Instance Methods

delete() click to toggle source

Delete a webhook subscription associated with self.

@return [true] @raise [Calendly::Error] if the uuid is empty. @raise [Calendly::ApiError] if the api returns error code. @since 0.1.0

# File lib/calendly/models/webhook_subscription.rb, line 82
def delete
  client.delete_webhook uuid
end
fetch() click to toggle source

Get a webhook subscription associated with self.

@return [Calendly::WebhookSubscription] @raise [Calendly::Error] if the uuid is empty. @raise [Calendly::ApiError] if the api returns error code. @since 0.1.3

# File lib/calendly/models/webhook_subscription.rb, line 71
def fetch
  client.webhook uuid
end

Private Instance Methods

inspect_attributes() click to toggle source
Calls superclass method Calendly::ModelUtils#inspect_attributes
# File lib/calendly/models/webhook_subscription.rb, line 88
def inspect_attributes
  super + %i[state scope events callback_url]
end