Class: WorkOS::CreateWebhookEndpoint

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/workos/webhooks/create_webhook_endpoint.rb

Constant Summary collapse

HASH_ATTRS =
{
  endpoint_url: :endpoint_url,
  events: :events
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ CreateWebhookEndpoint

Returns a new instance of CreateWebhookEndpoint.



16
17
18
19
20
# File 'lib/workos/webhooks/create_webhook_endpoint.rb', line 16

def initialize(json)
  hash = self.class.normalize(json)
  @endpoint_url = hash[:endpoint_url]
  @events = hash[:events] || []
end

Instance Attribute Details

#endpoint_urlObject

Returns the value of attribute endpoint_url.



12
13
14
# File 'lib/workos/webhooks/create_webhook_endpoint.rb', line 12

def endpoint_url
  @endpoint_url
end

#eventsObject

Returns the value of attribute events.



12
13
14
# File 'lib/workos/webhooks/create_webhook_endpoint.rb', line 12

def events
  @events
end