class HomeAway::API::Response

A container around the response that the HomeAway API returns. This object extends Hashie::Mash and can be accessed in an identical method

Public Instance Methods

_metadata() click to toggle source

Returns information about the request that was just made. This includes things such as connection headers and status code @return [HomeAway::API::Response] information about the request that was made

# File lib/homeaway/api/response.rb, line 44
def _metadata
  @metadata ||= HomeAway::API::Response.new
end
has?(*attrs) click to toggle source

a helper method to determine if this response has any particular fields in its payload, potentially nested

@param attrs [Symbol] one or more symbols to search into this response with

# File lib/homeaway/api/response.rb, line 32
def has?(*attrs)
  entity = self
  attrs.each do |attr|
    return false unless entity.has_key?(attr.to_sym)
    entity = entity.send(attr.to_sym)
  end
  true
end