Module: PortfolioManager::Services::Connection::ConnectionShare::Live
- Included in:
- All::Live
- Defined in:
- lib/portfolio_manager/services/connection.rb
Overview
Live Environment
Instance Method Summary collapse
-
#accept_reject_pending_connection_requests(account_id, sharing_response) ⇒ PortfolioManager::Xml::ResponseType
Accept/Reject Pending Connection Requests.
-
#accept_reject_pending_meter_share_requests(meter_id, sharing_response) ⇒ PortfolioManager::Xml::ResponseType
Accept/Reject Pending Meter Share Requests.
-
#accept_reject_pending_property_share_requests(property_id, sharing_response) ⇒ PortfolioManager::Xml::ResponseType
Accept/Reject Pending Property Share Requests.
-
#disconnect_from_customer(account_id, terminate_sharing_response, keep_shares = false) ⇒ PortfolioManager::Xml::ResponseType
Disconnect From Customer.
-
#get_notifications(clear = true) ⇒ PortfolioManager::Xml::NotificationListType, PortfolioManager::Xml::ResponseType
Get Notifications.
-
#get_pending_connection_requests(page = 1) ⇒ PortfolioManager::Xml::PendingListType, PortfolioManager::Xml::ResponseType
Get Pending Connection Requests.
-
#get_pending_meter_share_requests(page = 1) ⇒ PortfolioManager::Xml::PendingListType, PortfolioManager::Xml::ResponseType
Get Pending Meter Share Requests.
-
#get_pending_property_share_requests(page = 1) ⇒ PortfolioManager::Xml::PendingListType, PortfolioManager::Xml::ResponseType
Get Pending Property Share Requests.
-
#unshare_meter(meter_id, terminate_sharing_response) ⇒ PortfolioManager::Xml::ResponseType
Unshare Meter.
-
#unshare_property(property_id, terminate_sharing_response) ⇒ PortfolioManager::Xml::ResponseType
Unshare Property.
Instance Method Details
#accept_reject_pending_connection_requests(account_id, sharing_response) ⇒ PortfolioManager::Xml::ResponseType
Accept/Reject Pending Connection Requests
This web service sends an accept or reject reply to a pending connection request along with an optional note based on the information provided in the XML request.
40 41 42 |
# File 'lib/portfolio_manager/services/connection.rb', line 40 def accept_reject_pending_connection_requests(account_id, sharing_response) request(Net::HTTP::Post, path_for("connect", "account", account_id), {}, {}, sharing_response, "sharingResponse", PortfolioManager::Xml::ResponseType, basic_auth: true) end |
#accept_reject_pending_meter_share_requests(meter_id, sharing_response) ⇒ PortfolioManager::Xml::ResponseType
Accept/Reject Pending Meter Share Requests
This web service sends an accept or reject reply to a pending meter share request along with an optional note based on the information provided in the XML request.
56 57 58 |
# File 'lib/portfolio_manager/services/connection.rb', line 56 def accept_reject_pending_meter_share_requests(meter_id, sharing_response) request(Net::HTTP::Post, path_for("share", "meter", meter_id), {}, {}, sharing_response, "sharingResponse", PortfolioManager::Xml::ResponseType, basic_auth: true) end |
#accept_reject_pending_property_share_requests(property_id, sharing_response) ⇒ PortfolioManager::Xml::ResponseType
Accept/Reject Pending Property Share Requests
This web service sends an accept or reject reply to a pending property share request along with an optional note based on the information provided in the XML request.
72 73 74 |
# File 'lib/portfolio_manager/services/connection.rb', line 72 def accept_reject_pending_property_share_requests(property_id, sharing_response) request(Net::HTTP::Post, path_for("share", "property", property_id), {}, {}, sharing_response, "sharingResponse", PortfolioManager::Xml::ResponseType, basic_auth: true) end |
#disconnect_from_customer(account_id, terminate_sharing_response, keep_shares = false) ⇒ PortfolioManager::Xml::ResponseType
Disconnect From Customer
This web service removes the existing connection between you and a specific customer. Any existing property and meter shares between you and the specific customer are also automatically removed by default or can be kept in place. An optional note indicating the reason can be included too. This optional note is provided in the XML request.
92 93 94 95 96 |
# File 'lib/portfolio_manager/services/connection.rb', line 92 def disconnect_from_customer(account_id, terminate_sharing_response, keep_shares = false) request(Net::HTTP::Post, path_for("disconnect", "account", account_id), { "keepShares" => keep_shares, }, {}, terminate_sharing_response, "terminateSharingResponse", PortfolioManager::Xml::ResponseType, basic_auth: true) end |
#get_notifications(clear = true) ⇒ PortfolioManager::Xml::NotificationListType, PortfolioManager::Xml::ResponseType
Get Notifications
This web service returns a list of notifications that are generated when another user deletes or unshares a property or meter that you have access to. The purpose of these notifications is to help you stay in synch with your customer’s data. Once a notification is read, it is marked as read (by default) and will not be available in subsequent calls. An option is available to mark those notifications as unread.
The possible notification types are:
-
UNSHARE - Indicates that your access to a property or meter has been removed.
-
SHAREUPDATE - Indicates that your access level to a property or meter has changed.
The DISCONNECT and TRANSFERPROPERTY notification types are not supported in the Test environment.
Please see this FAQ page for more information.
123 124 125 126 127 |
# File 'lib/portfolio_manager/services/connection.rb', line 123 def get_notifications(clear = true) request(Net::HTTP::Get, path_for("notification", "list"), { "clear" => clear, }, {}, nil, nil, PortfolioManager::Xml::NotificationListType, basic_auth: true) end |
#get_pending_connection_requests(page = 1) ⇒ PortfolioManager::Xml::PendingListType, PortfolioManager::Xml::ResponseType
Get Pending Connection Requests
This web service returns a list of pending customer connection requests. A connection to the customer must be established first before any properties and meters can be shared with you. The list of pending customer connection requests is returned in sets of 20.
141 142 143 144 145 |
# File 'lib/portfolio_manager/services/connection.rb', line 141 def get_pending_connection_requests(page = 1) request(Net::HTTP::Get, path_for("connect", "account", "pending", "list"), { "page" => page, }, {}, nil, nil, PortfolioManager::Xml::PendingListType, basic_auth: true) end |
#get_pending_meter_share_requests(page = 1) ⇒ PortfolioManager::Xml::PendingListType, PortfolioManager::Xml::ResponseType
Get Pending Meter Share Requests
This web service returns a list of pending property meter requests. These meter share requests belong to customers that you are already connected to. The corresponding properties do not have to be already shared with you. The list of pending meter share requests is returned in sets of 20.
160 161 162 163 164 |
# File 'lib/portfolio_manager/services/connection.rb', line 160 def get_pending_meter_share_requests(page = 1) request(Net::HTTP::Get, path_for("share", "meter", "pending", "list"), { "page" => page, }, {}, nil, nil, PortfolioManager::Xml::PendingListType, basic_auth: true) end |
#get_pending_property_share_requests(page = 1) ⇒ PortfolioManager::Xml::PendingListType, PortfolioManager::Xml::ResponseType
Get Pending Property Share Requests
This web service returns a list of pending property share requests. These property share requests belong to customers that you are already connected to. The list of pending property share requests is returned in sets of 20.
178 179 180 181 182 |
# File 'lib/portfolio_manager/services/connection.rb', line 178 def get_pending_property_share_requests(page = 1) request(Net::HTTP::Get, path_for("share", "property", "pending", "list"), { "page" => page, }, {}, nil, nil, PortfolioManager::Xml::PendingListType, basic_auth: true) end |
#unshare_meter(meter_id, terminate_sharing_response) ⇒ PortfolioManager::Xml::ResponseType
Unshare Meter
This web service removes an existing share between you and a specific meter. An optional note indicating the reason can be included too. This optional note is provided in the XML request.
196 197 198 |
# File 'lib/portfolio_manager/services/connection.rb', line 196 def unshare_meter(meter_id, terminate_sharing_response) request(Net::HTTP::Post, path_for("unshare", "meter", meter_id), {}, {}, terminate_sharing_response, "terminateSharingResponse", PortfolioManager::Xml::ResponseType, basic_auth: true) end |
#unshare_property(property_id, terminate_sharing_response) ⇒ PortfolioManager::Xml::ResponseType
Unshare Property
This web service removes an existing share between you and a specific property. An optional note indicating the reason can be included too. This optional note is provided in the XML request.
212 213 214 |
# File 'lib/portfolio_manager/services/connection.rb', line 212 def unshare_property(property_id, terminate_sharing_response) request(Net::HTTP::Post, path_for("unshare", "property", property_id), {}, {}, terminate_sharing_response, "terminateSharingResponse", PortfolioManager::Xml::ResponseType, basic_auth: true) end |