class RealPage::DocumentParser::FloorPlanObject

Parse the GetFloorPlanList response

Private Instance Methods

floor_plans(body) click to toggle source
# File lib/real_page/document_parser/floor_plan_object.rb, line 24
def floor_plans(body)
  response = body['getfloorplanlistResponse']
  response['getfloorplanlistResult']['GetFloorPlanList']
end
parse_body(body) click to toggle source

@param body [Hash<String, Object>] the body of the XML response parsed

into a Hash

@return [Array<RealPage::Model::FloorPlan>] the floor_plans contained

in the response

@raise [RealPage::Error::Base] if the response is invalid

# File lib/real_page/document_parser/floor_plan_object.rb, line 16
def parse_body(body)
  Utils::ArrayFetcher.new(
    hash: floor_plans(body),
    key: 'FloorPlanObject',
    model: Model::FloorPlan
  ).fetch
end