Module: PortfolioManager::REST::Connection

Includes:
Utils
Included in:
API
Defined in:
lib/portfolio_manager/rest/connection.rb

Overview

Connection services

Constant Summary collapse

REJECT_NOTE =
'Unfortunately we cannot provide services for you at this time.'
ACCEPT_NOTE =
'Your connection request has been verified and accepted.'

Instance Method Summary collapse

Instance Method Details

#connection_request(customer_id, accept = true) ⇒ Object

Accepts/rejects a pending connection request from a specific customer.



30
31
32
33
34
35
# File 'lib/portfolio_manager/rest/connection.rb', line 30

def connection_request(customer_id, accept = true)
  perform_post_request(
    "/connect/account/#{customer_id}",
    body: connection_response_body(accept)
  )
end

#pending_connections(link = nil) ⇒ Object

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.



21
22
23
24
# File 'lib/portfolio_manager/rest/connection.rb', line 21

def pending_connections(link = nil)
  link ||= '/connect/account/pending/list'
  perform_get_request(link)
end