Class: Exa::Types::AnswerRequest

Inherits:
T::Struct
  • Object
show all
Includes:
StructWrapper
Defined in:
lib/exa/types/answer.rb

Instance Method Summary collapse

Methods included from StructWrapper

#__exa_attributes__

Instance Method Details

#to_payloadObject



22
23
24
25
26
27
28
# File 'lib/exa/types/answer.rb', line 22

def to_payload
  payload = Serializer.to_payload(self)
  if payload["searchOptions"].is_a?(Hash)
    payload["searchOptions"] = payload["searchOptions"].merge("query" => query)
  end
  payload
end