Module: YieldStarClient::AmenityMethods
Instance Method Summary collapse
-
#get_floor_plan_amenities(external_property_id, floor_plan_name) ⇒ Array<YieldStarClient::Amenity>
Retrieves all of the amenities associated with a specific floor plan.
-
#get_unit_amenities(external_property_id, unit_name, building = nil) ⇒ Array<YieldStarClient::Amenity>
Retrieves all of the amenities associated with a specific unit.
Methods included from Validations
#validate_client_name!, #validate_external_property_id!
Instance Method Details
#get_floor_plan_amenities(external_property_id, floor_plan_name) ⇒ Array<YieldStarClient::Amenity>
Retrieves all of the amenities associated with a specific floor plan.
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/yield_star_client/amenity_methods.rb', line 33 def get_floor_plan_amenities(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_amenities, :external_property_id => external_property_id, :floor_plan_name => floor_plan_name) amenities = response.to_hash[:get_floor_plan_amenities_response][:return][:amenity] || [] [amenities].flatten.collect { |a| Amenity.new(a) } end |
#get_unit_amenities(external_property_id, unit_name, building = nil) ⇒ Array<YieldStarClient::Amenity>
Retrieves all of the amenities associated with a specific unit.
57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/yield_star_client/amenity_methods.rb', line 57 def get_unit_amenities(external_property_id, unit_name, building=nil) validate_external_property_id!(external_property_id) validate_required!(:unit_name => unit_name) body = {:external_property_id => external_property_id, :unit_name => unit_name} body[:building] = building if building response = send_soap_request(:get_unit_amenities, body) amenities = response.to_hash[:get_unit_amenities_response][:return][:amenity] || [] [amenities].flatten.collect { |a| Amenity.new(a) } end |