Module: YieldStarClient::FloorPlanMethods
Instance Method Summary collapse
-
#get_floor_plan(external_property_id, floor_plan_name) ⇒ YieldStarClient::FloorPlan
Retrieves a specific floor plan.
-
#get_floor_plans(external_property_id) ⇒ Array<YieldStarClient::FloorPlan>
Retrieves all floor plans for a particular property.
Methods included from Validations
#validate_client_name!, #validate_external_property_id!
Instance Method Details
#get_floor_plan(external_property_id, floor_plan_name) ⇒ YieldStarClient::FloorPlan
Retrieves a specific floor plan.
62 63 64 65 66 67 68 69 70 71 |
# File 'lib/yield_star_client/floor_plan_methods.rb', line 62 def get_floor_plan(external_property_id, floor_plan_name) validate_external_property_id!(external_property_id) validate_required!(:floor_plan_name => floor_plan_name) response = send_soap_request(:get_floor_plan, :external_property_id => external_property_id, :name => floor_plan_name) floor_plan = response.to_hash[:get_floor_plan_response][:return][:floor_plan] FloorPlan.new(floor_plan) end |
#get_floor_plans(external_property_id) ⇒ Array<YieldStarClient::FloorPlan>
Retrieves all floor plans for a particular property.
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/yield_star_client/floor_plan_methods.rb', line 40 def get_floor_plans(external_property_id) validate_external_property_id!(external_property_id) response = send_soap_request(:get_floor_plans, :external_property_id => external_property_id) floor_plans = response.to_hash[:get_floor_plans_response][:return][:floor_plan] || [] floor_plans = [floor_plans].flatten floor_plans.collect { |fp| FloorPlan.new(fp) } end |