Class: Endpoints

Endpoints

new Endpoints(endPointConfig)

Utility to centralize endpoints.
Parameters:
Name Type Description
endPointConfig EndPointConfig used to obtain the access token and the domain for building the endpoints. If we change this to load endpoints, the access token will still be needed, and the initial endpoint will still need a domain/url to use as well.
Source:

Members

endPointConfig

The object that provides the access token and the configurtion with the domain.
Source:

Methods

getAlertDeviceEndpoint(merchantId) → {string}

Builds the endpoint to send the message to the server to let the device know we want to talk to it.
Parameters:
Name Type Description
merchantId string the id of the merchant to use when getting the device list.
Source:
Returns:
endpoint - the url to use alert a device that we want to communicate with it
Type
string

getDevicesEndpoint(merchantId) → {string}

The endpoint used to obtain a list of devices
Parameters:
Name Type Description
merchantId string the id of the merchant to use when getting the device list.
Source:
Returns:
endpoint - the url to use to retreive the devices
Type
string

getMerchantEndpoint(merchantId) → {string}

The endpoint used to obtain a merchant
Parameters:
Name Type Description
merchantId string the id of the merchant to use when getting the merchant.
Source:
Returns:
endpoint - the url to use to retrieve the merchant
Type
string