Class: Imagekitio::Resources::Webhooks

Inherits:
Object
  • Object
show all
Defined in:
lib/imagekitio/resources/webhooks.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Webhooks

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Webhooks.

Parameters:



25
26
27
# File 'lib/imagekitio/resources/webhooks.rb', line 25

def initialize(client:)
  @client = client
end

Instance Method Details

#unsafe_unwrap(payload) ⇒ Imagekitio::Models::VideoTransformationAcceptedEvent, ...



9
10
11
12
# File 'lib/imagekitio/resources/webhooks.rb', line 9

def unsafe_unwrap(payload)
  parsed = JSON.parse(payload, symbolize_names: true)
  Imagekitio::Internal::Type::Converter.coerce(Imagekitio::Models::UnsafeUnwrapWebhookEvent, parsed)
end

#unwrap(payload) ⇒ Imagekitio::Models::VideoTransformationAcceptedEvent, ...



17
18
19
20
# File 'lib/imagekitio/resources/webhooks.rb', line 17

def unwrap(payload)
  parsed = JSON.parse(payload, symbolize_names: true)
  Imagekitio::Internal::Type::Converter.coerce(Imagekitio::Models::UnwrapWebhookEvent, parsed)
end