Skip to content

Acrosure Client

Jetrin Chokchai edited this page Oct 17, 2018 · 4 revisions

Class: AcrosureClient(token)

Represents an Acrosure API client.


Constructor

AcrosureClient(token)

Create an AcrosureClient.

Parameters:

Name Type Description
token string An access token.
api_url string, optional An api endpoint (default is https://api.acrosure.com)

Members

application :ApplicationManager

ApplicationManager (You should be using this instead of trying to access ApplicationManager directly)

Type

  • ApplicationManager

data :DataManager

DataManager (You should be using this instead of trying to access DataManager directly)

Type:

  • DataManager

policy :PolicyManager

PolicyManager (You should be using this instead of trying to access PolicyManager directly)

Type:

  • PolicyManager

product :ProductManager

ProductManager (You should be using this instead of trying to access ProductManager directly)

Type:

  • ProductManager

team :TeamManager

TeamManager (You should be using this instead of trying to access TeamManager directly)

Type:

  • TeamManager

token :string

Access token (or API Key)

Type:

  • string

Methods

call_api(path, data)

Call Acrosure API with corresponding url & current API key.

Parameters:

Name Type Description
path string An API path.
data dict A data object which is specified by Acrosure.

verify_signature(signature, data) → {boolean}

Verify signature in webhook event.

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

  • boolean

Clone this wiki locally