Class: WorkOS::CreateWebhookEndpoint

Inherits:
Types::BaseModel 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

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

normalize

Methods included from HashProvider

#inspect, #to_h, #to_json

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