RICADO Gen 4 API JS Client

RICADO Gen 4 API JS Client

Class

AccountPolicyController

Controller Class for Account Policies

Constructor

new AccountPolicyController()

Source

Methods

static

create(createData) → {Promise.<AccountPolicyModel>}

Create a Account Policy [POST /account-policies]

Parameters

  • createData AccountPolicyController.CreateData

    The Account Policy Create Data

Returns

  • Promise.<AccountPolicyModel>

Source

static

getAll(queryParametersopt) → {Promise.<Array.<AccountPolicyModel>>}

List all Account Policies [GET /account-policies]

Parameters

  • queryParameters AccountPolicyController.GetAllQueryParameters <optional>

    The Optional Query Parameters

Returns

  • Promise.<Array.<AccountPolicyModel>>

Source

static

getOne(id) → {Promise.<AccountPolicyModel>}

Retrieve a Account Policy [GET /account-policies/{id}]

Parameters

  • id string

    The Account Policy ID

Returns

  • Promise.<AccountPolicyModel>

Source

static

update(id, updateData) → {Promise.<AccountPolicyModel>}

Update a Account Policy [PATCH /account-policies/{id}]

Parameters

  • id string

    The Account Policy ID

  • updateData AccountPolicyController.UpdateData

    The Account Policy Update Data

Returns

  • Promise.<AccountPolicyModel>

Source

Type Definitions

CreateData

The Create Data for a Account Policy

Type

  • Object

Properties

  • name string

    The Policy Name

  • companyId string

    The Company this Policy belongs to

  • resources Array.<AccountPolicyController.Resource> <optional>

    The Resources this Policy provides

  • rules Array.<Object> <optional>

    The Rules this Policy provides

Source

GetAllQueryParameters

The Optional Query Parameters for the getAll Function

Type

  • Object

Properties

  • name string <optional>

    The Policy Name

  • companyId string <optional>

    The Company this Policy belongs to

Source

Resource

A Resource Type

Type

  • Object

Properties

  • id any

    The Resource ID. Supports * as a Wildcard

  • type string

    The Resource Type

  • actions Array.<string>

    An Array of Actions that can be performed on the Resource

  • permission string

    Whether the Actions should be Allowed or Denied for the Resource

Source

UpdateData

The Update Data for a Account Policy

Type

  • Object

Properties

  • name string <optional>

    The Policy Name

  • companyId string <optional>

    The Company this Policy belongs to

  • resources Array.<AccountPolicyController.Resource> <optional>

    The Resources this Policy provides

  • rules Array.<Object> <optional>

    The Rules this Policy provides

Source