Class: WorkOS::UpdateWebhookEndpoint

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/webhooks/update_webhook_endpoint.rb

Constant Summary collapse

HASH_ATTRS =
{
  endpoint_url: :endpoint_url,
  status: :status,
  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) ⇒ UpdateWebhookEndpoint

Returns a new instance of UpdateWebhookEndpoint.



18
19
20
21
22
23
# File 'lib/workos/webhooks/update_webhook_endpoint.rb', line 18

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

Instance Attribute Details

#endpoint_urlObject

Returns the value of attribute endpoint_url.



13
14
15
# File 'lib/workos/webhooks/update_webhook_endpoint.rb', line 13

def endpoint_url
  @endpoint_url
end

#eventsObject

Returns the value of attribute events.



13
14
15
# File 'lib/workos/webhooks/update_webhook_endpoint.rb', line 13

def events
  @events
end

#statusObject

Returns the value of attribute status.



13
14
15
# File 'lib/workos/webhooks/update_webhook_endpoint.rb', line 13

def status
  @status
end