Class

RequestResource

RequestResource(client) → {RequestResource}

The RequestResource class provides methods to access the Request endpoint of the Cloud Blue Connect API.

Constructor

# new RequestResource(client) → {RequestResource}

Creates a new instance of the RequestResource class.

Parameters:
Name Type Description
client ConnectClient

An instance of the ConnectClient class.

An instance of the RequestResource class.

Extends

Members

string

# baseUri

Returns the base URI of the resource mapped by this class.

Overrides:

Methods

# async approve(id, request) → {object}

Change the status of a Request to approved. To change the status of the Request to approved you must provide either a template id or a template tile.

Parameters:
Name Type Description
id string

The unique identifier of the Request object.

request object

The request body.

The updated Request object.

object
Examples
// request body using a template id
{
  template_id: 'TL-827-840-476'
}
// request body using an activation tile
{
  activation_tile: '<rendered text>'
}

# async confirm(id) → {object}

Change the status of a Request to revoqued.

Parameters:
Name Type Description
id string

The unique identifier of the Request object.

The updated Request object.

object

# async create(obj) → {object}

Create a new resource.

Parameters:
Name Type Description
obj object

The resource to create.

Overrides:

The created resource.

object

# async delete(id)

Delete a resource.

Parameters:
Name Type Description
id string

The unique identifier of the resource to delete.

Overrides:

# async fail(id, reason) → {object}

Change the status of a Request to fail.

Parameters:
Name Type Description
id string

The unique identifier of the Request object.

reason string

The reason for which the Request has been failed.

The updated Request object.

object

# async fetch(url, options)

Fetch the URL and returns a response.

Parameters:
Name Type Description
url string

the URL to fetch.

options object

the request options.

Overrides:

# async get(id) → {object}

Retrieve a resource by its unique identifier.

Parameters:
Name Type Description
id string

The unique identifier of the resource to retrieve.

Overrides:

The resource.

object

# async inquire(id, request) → {object}

Change the status of a Request to inquire. To change the status of the Request to inquire you must provide either a template id or a template tile.

Parameters:
Name Type Description
id string

The unique identifier of the Request object.

request object

The request body.

The updated Request object.

object
Examples
// request body using a template id
{
  template_id: 'TL-827-840-476'
}
// request body using an activation tile
{
  activation_tile: '<rendered text>'
}

# async pending(id) → {object}

Change the status of a Request to pending.

Parameters:
Name Type Description
id string

The unique identifier of the Request object.

The updated Request object.

object

# async revoke(id) → {object}

Change the status of a Request to revoking.

Parameters:
Name Type Description
id string

The unique identifier of the Request object.

The updated Request object.

object

# async schedule(id) → {object}

Change the status of a Request to scheduled.

Parameters:
Name Type Description
id string

The unique identifier of the Request object.

The updated Request object.

object

Search for a resource.

Parameters:
Name Type Description
filters object

The query to send to the server as a RQL object.

Overrides:

An array of resources that match the provided filters.

Array

# async update(id, obj) → {object}

Update a resource.

Parameters:
Name Type Description
id string

The unique identifier of the resource to update.

obj object

The eventually partial resource to update.

Overrides:

The updated resource.

object