Class: Exa::Responses::WebhookAttemptListResponse

Inherits:
T::Struct
  • Object
show all
Defined in:
lib/exa/responses/webhook_response.rb

Class Method Summary collapse

Class Method Details

.from_hash(hash) ⇒ Object



85
86
87
88
89
90
91
92
# File 'lib/exa/responses/webhook_response.rb', line 85

def self.from_hash(hash)
  sym = Helpers.symbolize_keys(hash)
  new(
    data: Array(sym[:data]).map { WebhookAttempt.from_hash(_1) },
    has_more: sym[:hasMore],
    next_cursor: sym[:nextCursor]
  )
end