Base Provision

BaseProvision

BaseProvision Objects

class BaseProvision()

This is an abstract class, it must be extended to another class that defines the different actions of a specific provision. This class is responsible for managing the request to execute Norte OpenGate API

constructor
function constructor()

Constructor

Arguments:

  • ogapi InternalOpenGateAPI - this is ogapi instance
  • resource string - this is a base url resource
  • timeout number (optional) - timeout on request
  • requiredParameters array
  • serviceBaseURL string - base of the uri petition

create
function create() -> 'Promise'

This invoke a request to OpenGate North API and the callback is managed by promises This function create a entity of provision

Returns:

  • Promise

Example:

 ogapi.organizationsBuilder().create()

delete
function delete(body: *) -> 'Promise'

This invoke a request to OpenGate North API and the callback is managed by promises This function deletes a entity of provision

Arguments:

  • body *

Returns:

  • Promise

Example:

ogapi.organizationsBuilder().withName('delete_organization').delete();
ogapi.usersBuilder().withEmail('delete@user.com').delete();
ogapi.certificatesBuilder().withId('d3l3t3-c3rt1f1c4t3').delete();

update
function update() -> 'Promise'

This invoke a request to OpenGate North API and the callback is managed by promises This function updates a entity of provision

Returns:

  • Promise

Example:

 ogapi.organizationsBuilder().update()