Module: PortfolioManager::Services::Meter::PropertyUseMeterAssociation::Live

Included in:
All::Live
Defined in:
lib/portfolio_manager/services/meter.rb

Overview

Live Environment

Instance Method Summary collapse

Instance Method Details

#associate_meter_to_a_property_use(property_use_id, meter_id) ⇒ PortfolioManager::Xml::ResponseType

Associate Meter to a Property Use

This web service associates a single meter to a property use. 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 use are unaffected.



302
303
304
# File 'lib/portfolio_manager/services/meter.rb', line 302

def associate_meter_to_a_property_use(property_use_id, meter_id)
  request(Net::HTTP::Post, path_for("association", "propertyUse", property_use_id, "meter", meter_id), {}, {}, nil, nil, PortfolioManager::Xml::ResponseType, basic_auth: true)
end

#associate_meters_to_a_property_use(property_use_id, meter_property_use_association_list) ⇒ PortfolioManager::Xml::ResponseType

Associate Meters to a Property Use

This web service associates a set of meters to a property use based on the set of meters provided in the XML request. All submissions overwrite/replace previous settings.



318
319
320
# File 'lib/portfolio_manager/services/meter.rb', line 318

def associate_meters_to_a_property_use(property_use_id, meter_property_use_association_list)
  request(Net::HTTP::Post, path_for("association", "propertyUse", property_use_id, "meter"), {}, {}, meter_property_use_association_list, "meterPropertyUseAssociationList", PortfolioManager::Xml::ResponseType, basic_auth: true)
end

#disassociate_meter_from_a_property_use(property_use_id, meter_id) ⇒ PortfolioManager::Xml::ResponseType

Disassociate Meter from a Property Use

This web service disassociates a specific meter from a given property use.



333
334
335
# File 'lib/portfolio_manager/services/meter.rb', line 333

def disassociate_meter_from_a_property_use(property_use_id, meter_id)
  request(Net::HTTP::Delete, path_for("association", "propertyUse", property_use_id, "meter", meter_id), {}, {}, nil, nil, PortfolioManager::Xml::ResponseType, basic_auth: true)
end

#get_associated_property_use_meters(property_use_id) ⇒ PortfolioManager::Xml::MeterListType, PortfolioManager::Xml::ResponseType

Get Associated Property Use Meters

This web service returns a list of meters that are associated to a specific property use.



281
282
283
# File 'lib/portfolio_manager/services/meter.rb', line 281

def get_associated_property_use_meters(property_use_id)
  request(Net::HTTP::Get, path_for("association", "propertyUse", property_use_id, "meter"), {}, {}, nil, nil, PortfolioManager::Xml::MeterListType, basic_auth: true)
end