Documents
extends BaseResource
in package
Class Documents
Tags
Table of Contents
Properties
- $autentiqueUrl : string
- Autentique API URL
- $api : Api
- Autentique API
- $resourcesEnum : ResourcesEnum
- Autentique Resources Enum
- $sandbox : string
- Autentique Sandbox Mode
- $token : string
- Autentique API Token
- $query : Query
- GraphQL Query
Methods
- __construct() : mixed
- Documents constructor.
- create() : array<string|int, mixed>
- Create Document
- createSigner() : array<string|int, mixed>
- Create signer to document
- deleteById() : array<string|int, mixed>
- Delete document by id
- deleteSigner() : array<string|int, mixed>
- Delete signer from document
- getApi() : Api
- Get Autentique API
- getSandbox() : string
- Get Autentique Sandbox Mode
- getToken() : string
- Get Autentique API Token
- listAll() : array<string|int, mixed>
- List all documents
- listById() : array<string|int, mixed>
- List document by id
- moveToFolder() : array<string|int, mixed>
- Move document to folder
- moveToFolderByFolder() : array<string|int, mixed>
- Move document from folder to folder
- setApi() : $this
- Set Api instance customizing the Autentique API URL and Request Timeout
- setSandbox() : $this
- Set Autentique Sandbox Mode but by default it will get from $_ENV["AUTENTIQUE_SANDBOX"]
- setToken() : $this
- Set Autentique API Token but by default it will get from $_ENV["AUTENTIQUE_TOKEN"]
- signById() : array<string|int, mixed>
- Sign document by id
- update() : array<string|int, mixed>
- Update Document
Properties
$autentiqueUrl
Autentique API URL
public
string
$autentiqueUrl
= "https://api.autentique.com.br/v2/graphql"
$api
Autentique API
protected
Api
$api
$resourcesEnum
Autentique Resources Enum
protected
ResourcesEnum
$resourcesEnum
$sandbox
Autentique Sandbox Mode
protected
string
$sandbox
"true"|"false"
$token
Autentique API Token
protected
string
$token
$query
GraphQL Query
private
Query
$query
Methods
__construct()
Documents constructor.
public
__construct([string|null $token = null ][, int $timeout = 60 ]) : mixed
Parameters
- $token : string|null = null
-
Autentique API Token
- $timeout : int = 60
-
Request Timeout in seconds
create()
Create Document
public
create(array<string|int, mixed> $attributes) : array<string|int, mixed>
Parameters
- $attributes : array<string|int, mixed>
-
["document", "signers", "file", "organization_id"]
Tags
Return values
array<string|int, mixed>createSigner()
Create signer to document
public
createSigner(string $documentId, array<string|int, mixed> $attributes) : array<string|int, mixed>
Parameters
- $documentId : string
-
Document UUID
- $attributes : array<string|int, mixed>
Return values
array<string|int, mixed>deleteById()
Delete document by id
public
deleteById(string $documentId) : array<string|int, mixed>
Parameters
- $documentId : string
-
Document UUID
Return values
array<string|int, mixed>deleteSigner()
Delete signer from document
public
deleteSigner(string $documentId, string $signerPublicId) : array<string|int, mixed>
Parameters
- $documentId : string
-
Document UUID
- $signerPublicId : string
-
Signer Public UUID
Return values
array<string|int, mixed>getApi()
Get Autentique API
public
getApi() : Api
Tags
Return values
ApigetSandbox()
Get Autentique Sandbox Mode
public
getSandbox() : string
Tags
Return values
stringgetToken()
Get Autentique API Token
public
getToken() : string
Tags
Return values
stringlistAll()
List all documents
public
listAll([int $page = 1 ]) : array<string|int, mixed>
Parameters
- $page : int = 1
-
Page number (starts at 1)
Return values
array<string|int, mixed>listById()
List document by id
public
listById(string $documentId) : array<string|int, mixed>
Parameters
- $documentId : string
-
Document UUID
Tags
Return values
array<string|int, mixed>moveToFolder()
Move document to folder
public
moveToFolder(string $documentId, string $folderId) : array<string|int, mixed>
Parameters
- $documentId : string
-
Document UUID
- $folderId : string
-
Folder UUID
Tags
Return values
array<string|int, mixed>moveToFolderByFolder()
Move document from folder to folder
public
moveToFolderByFolder(string $documentId, string $folderId, string $currentFolderId) : array<string|int, mixed>
Parameters
- $documentId : string
-
Document UUID
- $folderId : string
-
Folder UUID
- $currentFolderId : string
-
Current Folder UUID
Tags
Return values
array<string|int, mixed>setApi()
Set Api instance customizing the Autentique API URL and Request Timeout
public
setApi(Api $api) : $this
Parameters
- $api : Api
Return values
$thissetSandbox()
Set Autentique Sandbox Mode but by default it will get from $_ENV["AUTENTIQUE_SANDBOX"]
public
setSandbox([string $sandbox = null ]) : $this
Parameters
- $sandbox : string = null
-
"true"|"false"
Return values
$thissetToken()
Set Autentique API Token but by default it will get from $_ENV["AUTENTIQUE_TOKEN"]
public
setToken(string $token) : $this
Parameters
- $token : string
-
Autentique API Token
Return values
$thissignById()
Sign document by id
public
signById(string $documentId) : array<string|int, mixed>
Parameters
- $documentId : string
-
Document UUID
Tags
Return values
array<string|int, mixed>update()
Update Document
public
update(string $id, array<string|int, mixed> $attributes) : array<string|int, mixed>
Parameters
- $id : string
-
Document UUID
- $attributes : array<string|int, mixed>
-
["document"]