Manual Reference Source Test
import CallbackService from 'clinical6/src/services/CallbackService.js'
public class | source

CallbackService

Service handling Callback calls with specific endpoints.

Method Summary

Public Methods
public

execute(id: *): Promise

Validates the conditions and executes a single callback.

public

Returns the information associated with a callback or all callbacks if no id present.

public

Returns the information associated with a callback.

public

Returns all the callbacks.

Public Methods

public execute(id: *): Promise source

Validates the conditions and executes a single callback.

Params:

NameTypeAttributeDescription
id *

{Number} The ID value of the callback.

Return:

Promise

Promise object that returns success or failure

Test:

public get(id: Number): Promise source

Returns the information associated with a callback or all callbacks if no id present.

Params:

NameTypeAttributeDescription
id Number
  • optional

The ID value of the callback.

Return:

Promise

callback or list of callbacks

Throw:

Clinical6Error

If missing token or missing required parameters

public getCallback(id: *): Promise source

Returns the information associated with a callback.

Params:

NameTypeAttributeDescription
id *

{Number} The ID value of the callback.

Return:

Promise

Promise object that returns success or failure

Test: