Class: Exa::Responses::PerRequestPrices

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

Overview

Standard price per request for different search operations

Class Method Summary collapse

Class Method Details

.from_hash(hash) ⇒ Object



48
49
50
51
52
53
54
55
# File 'lib/exa/responses/cost.rb', line 48

def self.from_hash(hash)
  return nil unless hash
  sym = Helpers.symbolize_keys(hash)
  new(
    neural_search: sym[:neuralSearch]&.to_f,
    deep_search: sym[:deepSearch]&.to_f
  )
end