Overview

Namespaces

  • Comprobo
    • Verify
      • Auth
      • Exceptions
      • HTTP

Classes

  • Api
  • Factory
  • State
  • User
  • Workflow
  • Overview
  • Namespace
  • Class

Class Api

Comprobo\Verify\Api is the public API for the Verify SDK. All public methods should be considered normal operation of the SDK.

It is possible to retrieve individual objects and make calls directly to different services although this should not be a requirement for normal usage.

USAGE:

$env = 'local' // 'staging' or 'production'

$verify = Comprobo\Verify\Api::create($env);

$verify->authenticate($key, $secret);

...

Namespace: Comprobo\Verify
Located at Api.php
Methods summary
public static Comprobo\Verify\Api
# create( string $env = 'local', array $config = [] )

Bootstrap the Verify API. Custom configuration options are currently not supported.

Bootstrap the Verify API. Custom configuration options are currently not supported.

Parameters

$env
'local', 'staging' or 'production'
$config
additional configuration options

Returns

Comprobo\Verify\Api
public
# __construct( Comprobo\Verify\Factory $factory )

Used by the factory itself. If you happen to need to instantiate the API this way then you can.

Used by the factory itself. If you happen to need to instantiate the API this way then you can.

Parameters

$factory
public string
# javascriptPath( )

Helper method to provide javascript asset location.

Helper method to provide javascript asset location.

Returns

string
path to JavaScript file for inclusion where Verify is to be used
public boolean
# authenticate( $key, $secret )

Use your application key and secret to set JWT token and organisation ID in the current API context

Use your application key and secret to set JWT token and organisation ID in the current API context

After this is called, you may continue to use the rest of the API methods provided here.

Parameters

$key
string
$secret
string

Returns

boolean
true
public string
# createUser( string $clientId, string $firstName, string $lastName, string $email )

Add a user to Comprobo. Pass in your own particulars to receive a valid uuid.

Add a user to Comprobo. Pass in your own particulars to receive a valid uuid.

Returns an existing user if one is found that matches the given details.

Parameters

$clientId
your local identifier for this user
$firstName
$lastName
$email

Returns

string
Comprobo user id (uuidv4)
public string
# setupTemplate( string $templateId, string $newWorkflowName, array $customFields = [] )

Clones the selected template to create an assignable Workflow instance. Any custom fields provided are persisted at this stage and may not be changed.

Clones the selected template to create an assignable Workflow instance. Any custom fields provided are persisted at this stage and may not be changed.

Parameters

$templateId
uuid4 template workflow ID.
$newWorkflowName
provide a name that will appear for this in the reporting tools
$customFields
any merge fields defined by the template will be accepted at clone time.

Returns

string
uuid4 the workflow ID
public array
# listCustomFields( $workflowId )

Returns any custom merge fields defined for the given workflow

Returns any custom merge fields defined for the given workflow

Parameters

$workflowId
active workflowId retrieved from setupTemplate

Returns

array
list of fieldnames required to update the merge fields
public array
# listTemplates( )

List the available templates for monitoring, used for configuration

List the available templates for monitoring, used for configuration

Returns

array
available templates to clone
public boolean
# assignWorkflow( string $comproboUserId, string $workflowId )

Parameters

$comproboUserId
[description]
$workflowId
[description]

Returns

boolean
true
public
# impersonate( $comproboUserId )
API documentation generated by ApiGen