Class: Orb::Resources::Webhooks

Inherits:
Object
  • Object
show all
Defined in:
lib/orb/resources/webhooks.rb,
sig/orb/resources/webhooks.rbs

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:



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

def initialize(client:)
  @client = client
end

Instance Method Details

#unwrap(payload) ⇒ Orb::Models::BackfillReflectedWebhookEvent, ...

Parameters:

  • payload (String) —

    The raw webhook payload as a string

Returns:



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

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