Module: PortfolioManager::Services::Connection::SimulatingConnectionShareRequests::Test
- Included in:
- All::Test
- Defined in:
- lib/portfolio_manager/services/connection.rb
Overview
Test Environment
Instance Method Summary collapse
-
#send_connection_request_from_test_environment(dx_account_id) ⇒ PortfolioManager::Xml::ResponseType
Send Connection Request From Test Environment.
-
#send_meter_share_request_from_test_environment(dx_account_id, meter_id, access_level = "READ_WRITE") ⇒ PortfolioManager::Xml::ResponseType
Send Meter Share Request From Test Environment.
-
#send_property_share_request_from_test_environment(dx_account_id, property_id, access_level = "READ_WRITE") ⇒ PortfolioManager::Xml::ResponseType
Send Property Share Request From Test Environment.
-
#submit_customer_level_custom_field_values(dx_account_id, custom_field_list) ⇒ PortfolioManager::Xml::ResponseType
Submit Customer-Level Custom Field Value(s).
-
#submit_meter_level_custom_field_values(meter_id, dx_account_id, custom_field_list) ⇒ PortfolioManager::Xml::ResponseType
Submit Meter-Level Custom Field Value(s).
-
#submit_property_level_custom_field_values(property_id, dx_account_id, custom_field_list) ⇒ PortfolioManager::Xml::ResponseType
Submit Property-Level Custom Field Value(s).
Instance Method Details
#send_connection_request_from_test_environment(dx_account_id) ⇒ PortfolioManager::Xml::ResponseType
Send Connection Request From Test Environment
This web service sends a connection request from a customer to you. You must run this web service as the customer that you want the connection request to originate from and specify the account that receives the request. This simulates the customer sending a connection request to you. This web service is only available in the Test environment. After a connection request is sent, you can verify it by running the web service that returns a list of pending customer connections. A connection request cannot be sent if the two accounts are already connected.
247 248 249 |
# File 'lib/portfolio_manager/services/connection.rb', line 247 def send_connection_request_from_test_environment(dx_account_id) request(Net::HTTP::Post, path_for("invite", "account", dx_account_id), {}, {}, nil, nil, PortfolioManager::Xml::ResponseType, basic_auth: true) end |
#send_meter_share_request_from_test_environment(dx_account_id, meter_id, access_level = "READ_WRITE") ⇒ PortfolioManager::Xml::ResponseType
Send Meter Share Request From Test Environment
This web service sends a share request for a specific meter from a customer to you. You must run this web service as the customer that you want the meter share request to originate from and specify the account that receives the request. This simulates the customer sending a meter share request to you. Any existing share for this specific meter between you and this customer will be updated after submitting this service. If a meter share is pending acceptance/rejection, additional share requests cannot be sent. This web service is only available in the Test environment. After the meter share request is sent, you can verify it by running the web service that returns a list of pending meter share requests.
272 273 274 275 276 |
# File 'lib/portfolio_manager/services/connection.rb', line 272 def send_meter_share_request_from_test_environment(dx_account_id, meter_id, access_level = "READ_WRITE") request(Net::HTTP::Post, path_for("invite", "account", dx_account_id, "meter", meter_id), { "accessLevel" => access_level, }, {}, nil, nil, PortfolioManager::Xml::ResponseType, basic_auth: true) end |
#send_property_share_request_from_test_environment(dx_account_id, property_id, access_level = "READ_WRITE") ⇒ PortfolioManager::Xml::ResponseType
Send Property Share Request From Test Environment
This web service sends a share request for a specific property from a customer to you. You must run this web service as the customer that you want the property share request to originate from and specify the account that receives the request. This simulates the customer sending a property share request to you. Any existing share for this specific property between you and this customer will be updated after submitting this service. If a property share is pending acceptance/rejection, additional share requests cannot be sent. This web service is only available in the Test environment. After the property share request is sent, you can verify it by running the web service that returns a list of pending property share requests.
300 301 302 303 304 |
# File 'lib/portfolio_manager/services/connection.rb', line 300 def send_property_share_request_from_test_environment(dx_account_id, property_id, access_level = "READ_WRITE") request(Net::HTTP::Post, path_for("invite", "account", dx_account_id, "property", property_id), { "accessLevel" => access_level, }, {}, nil, nil, PortfolioManager::Xml::ResponseType, basic_auth: true) end |
#submit_customer_level_custom_field_values(dx_account_id, custom_field_list) ⇒ PortfolioManager::Xml::ResponseType
Submit Customer-Level Custom Field Value(s)
This web service submits data for a list of customer-level custom fields based on the data provided in the XML request from a specific Portfolio Manager customer to you. This web service is used within the Test environment to simulate a Portfolio Manager user providing data that is required by you during the connection process. You must run this web service as the customer that you the data to be provided from.
322 323 324 |
# File 'lib/portfolio_manager/services/connection.rb', line 322 def submit_customer_level_custom_field_values(dx_account_id, custom_field_list) request(Net::HTTP::Put, path_for("account", "customFieldList", "recipient", dx_account_id), {}, {}, custom_field_list, "customFieldList", PortfolioManager::Xml::ResponseType, basic_auth: true) end |
#submit_meter_level_custom_field_values(meter_id, dx_account_id, custom_field_list) ⇒ PortfolioManager::Xml::ResponseType
Submit Meter-Level Custom Field Value(s)
This web service submits data for a list of meter-level custom fields based on the data provided in the XML request from a specific Portfolio Manager customer to you. This web service is used within the Test environment to simulate a Portfolio Manager user providing data that is required by you during the share process. You must run this web service as the customer that you the data to be provided from.
343 344 345 |
# File 'lib/portfolio_manager/services/connection.rb', line 343 def submit_meter_level_custom_field_values(meter_id, dx_account_id, custom_field_list) request(Net::HTTP::Put, path_for("meter", meter_id, "customFieldList", "recipient", dx_account_id), {}, {}, custom_field_list, "customFieldList", PortfolioManager::Xml::ResponseType, basic_auth: true) end |
#submit_property_level_custom_field_values(property_id, dx_account_id, custom_field_list) ⇒ PortfolioManager::Xml::ResponseType
Submit Property-Level Custom Field Value(s)
This web service submits data for a list of property-level custom fields based on the data provided in the XML request from a specific Portfolio Manager customer to you. This web service is used within the Test environment to simulate a Portfolio Manager user providing data that is required by you during the share process. You must run this web service as the customer that you the data to be provided from.
364 365 366 |
# File 'lib/portfolio_manager/services/connection.rb', line 364 def submit_property_level_custom_field_values(property_id, dx_account_id, custom_field_list) request(Net::HTTP::Put, path_for("property", property_id, "customFieldList", "recipient", dx_account_id), {}, {}, custom_field_list, "customFieldList", PortfolioManager::Xml::ResponseType, basic_auth: true) end |