61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/exa/responses/webhook_response.rb', line 61
def self.from_hash(hash)
sym = Helpers.symbolize_keys(hash)
new(
id: sym[:id],
object: sym[:object],
event_id: sym[:eventId],
event_type: sym[:eventType],
webhook_id: sym[:webhookId],
url: sym[:url],
successful: sym[:successful],
response_headers: Helpers.stringify_string_hash(sym[:responseHeaders]),
response_body: sym[:responseBody],
response_status_code: sym[:responseStatusCode]&.to_i,
attempt: sym[:attempt]&.to_i,
attempted_at: sym[:attemptedAt]
)
end
|