Module: PortfolioManager::Services::Meter::PropertyMeterAssociation::Live
- Included in:
- All::Live
- Defined in:
- lib/portfolio_manager/services/meter.rb
Overview
Live Environment
Instance Method Summary collapse
-
#associate_meter_to_a_property(property_id, meter_id) ⇒ PortfolioManager::Xml::ResponseType
Associate Meter to a Property.
-
#associate_meters_to_a_property(property_id, meter_property_association_list) ⇒ PortfolioManager::Xml::ResponseType
Associate Meters to a Property.
-
#disassociate_meter_from_a_property(property_id, meter_id) ⇒ PortfolioManager::Xml::ResponseType
Disassociate Meter from a Property.
-
#get_associated_property_meters(property_id) ⇒ PortfolioManager::Xml::MeterPropertyAssociationListType, PortfolioManager::Xml::ResponseType
Get Associated Property Meters.
Instance Method Details
#associate_meter_to_a_property(property_id, meter_id) ⇒ PortfolioManager::Xml::ResponseType
Associate Meter to a Property
This web service associates a single meter to a property. You must have any of the following sharing permissions:
-
full access on the property and read only access on the meter
-
read only access on the property and full access on the meter
-
full access for both the property and meter
Any other meters currently associated to the property are unaffected. Any property representation currently assigned to the property (if any) is unaffected.
221 222 223 |
# File 'lib/portfolio_manager/services/meter.rb', line 221 def associate_meter_to_a_property(property_id, meter_id) request(Net::HTTP::Post, path_for("association", "property", property_id, "meter", meter_id), {}, {}, nil, nil, PortfolioManager::Xml::ResponseType, basic_auth: true) end |
#associate_meters_to_a_property(property_id, meter_property_association_list) ⇒ PortfolioManager::Xml::ResponseType
Associate Meters to a Property
This web service associates a set of meters to a property based on the set of meters provided in the XML request. If a set of energy meters is only provided then the association is only performed using that set of energy meters and any existing water meter associations are not affected. Similarly, if a set of water meters is only provided then the association is only performed using that set of water meters and any existing energy meter associations are not affected. All submissions overwrite/replace previous settings.
242 243 244 |
# File 'lib/portfolio_manager/services/meter.rb', line 242 def associate_meters_to_a_property(property_id, meter_property_association_list) request(Net::HTTP::Post, path_for("association", "property", property_id, "meter"), {}, {}, meter_property_association_list, "meterPropertyAssociationList", PortfolioManager::Xml::ResponseType, basic_auth: true) end |
#disassociate_meter_from_a_property(property_id, meter_id) ⇒ PortfolioManager::Xml::ResponseType
Disassociate Meter from a Property
This web service disassociates a specific meter from a given property.
257 258 259 |
# File 'lib/portfolio_manager/services/meter.rb', line 257 def disassociate_meter_from_a_property(property_id, meter_id) request(Net::HTTP::Delete, path_for("association", "property", property_id, "meter", meter_id), {}, {}, nil, nil, PortfolioManager::Xml::ResponseType, basic_auth: true) end |
#get_associated_property_meters(property_id) ⇒ PortfolioManager::Xml::MeterPropertyAssociationListType, PortfolioManager::Xml::ResponseType
Get Associated Property Meters
This web service returns a list of meters that are associated to a specific property.
199 200 201 |
# File 'lib/portfolio_manager/services/meter.rb', line 199 def get_associated_property_meters(property_id) request(Net::HTTP::Get, path_for("association", "property", property_id, "meter"), {}, {}, nil, nil, PortfolioManager::Xml::MeterPropertyAssociationListType, basic_auth: true) end |