Constructor
new AcrosureClient(args)
Create an AcrosureClient.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
args |
Object | An object consists of several properties.
Properties
|
Members
application :ApplicationManager
ApplicationManager (You should be using this instead of trying to access ApplicationManager directly)
Type:
data :DataManager
DataManager (You should be using this instead of trying to access DataManager directly)
Type:
policy :PolicyManager
PolicyManager (You should be using this instead of trying to access PolicyManager directly)
Type:
product :ProductManager
ProductManager (You should be using this instead of trying to access ProductManager directly)
Type:
team :TeamManager
TeamManager (You should be using this instead of trying to access TeamManager directly)
Type:
token :string
Access token (or API Key)
Type:
- string
Methods
callAPI(path, data)
Call Acrosure API with corresponding url & current API key.
Parameters:
Name | Type | Description |
---|---|---|
path |
string | An API path. |
data |
Object | A data object which is specified by Acrosure. |
verifySignature(signature, data) → {bool}
Verify signature in webhook event (Node.js only).
Parameters:
Name | Type | Description |
---|---|---|
signature |
string | A signature received from webhook. |
data |
string | A string of raw data. |
Returns:
Whether the signature is valid or not.
- Type
- bool