Class: Dinie::WebhookEndpoint

Inherits:
Internal::Model show all
Defined in:
lib/dinie/generated/types/webhook_endpoint.rb

Direct Known Subclasses

WebhookEndpointWithSecret

Constant Summary

Constants inherited from Internal::Model

Internal::Model::REDACTED_ATTRIBUTES

Class Method Summary collapse

Methods inherited from Internal::Model

#==, attribute, attributes, #deconstruct_keys, #hash, inherited, #initialize, #inspect, #to_h

Constructor Details

This class inherits a constructor from Dinie::Internal::Model

Class Method Details

.deserialize(raw) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/dinie/generated/types/webhook_endpoint.rb', line 15

def self.deserialize(raw)
  new(
    created_at: raw[:created_at],
    description: raw[:description],
    events: raw[:events],
    id: raw[:id],
    status: raw[:status],
    updated_at: raw[:updated_at],
    url: raw[:url]
  )
end

.serialize_create(url:, description: Internal::OMIT, events: Internal::OMIT) ⇒ Object



27
28
29
# File 'lib/dinie/generated/types/webhook_endpoint.rb', line 27

def self.serialize_create(url:, description: Internal::OMIT, events: Internal::OMIT)
  { description:, events:, url: }.reject { |_key, value| Internal.omitted?(value) }
end

.serialize_update(description: Internal::OMIT, events: Internal::OMIT, status: Internal::OMIT, url: Internal::OMIT) ⇒ Object



31
32
33
# File 'lib/dinie/generated/types/webhook_endpoint.rb', line 31

def self.serialize_update(description: Internal::OMIT, events: Internal::OMIT, status: Internal::OMIT, url: Internal::OMIT)
  { description:, events:, status:, url: }.reject { |_key, value| Internal.omitted?(value) }
end