Module: mHelpDesk/craeteCreateMovementRequest

Methods

(static) createCreateMovementRequestFunction(typeId) → {function}

Create a movement request handler function. This is used to generate the handlers for pickup and delivery requests, because they are so similar.
Parameters:
Name Type Description
typeId string The string of the job typeId to give mHelpDesk.
Source:
Returns:
A function to handle movement requests of the given type.
Type
function

(inner) makeAPIRequest(method, url, accessToken, data) → {object}

Make a request of the given form, using the given access token, to the mHelpDesk API. It throws a custom error message if the request fails, returns any data yeilded by the response.
Parameters:
Name Type Description
method string The http method to use.
url string The sub URL of the API to use.
accessToken string The acces token to authenticate with.
data string Any data to include.
Source:
Returns:
The data of the response.
Type
object