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.'.freeze
ACCEPT_NOTE =
'Your connection request has been verified and accepted.'.freeze

Instance Method Summary collapse

Instance Method Details

#connection_request(customer_id, accept = true) ⇒ Object

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



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

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.



19
20
21
22
# File 'lib/portfolio_manager/rest/connection.rb', line 19

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