Documentation

EasybillCredential extends Credential
in package
implements ValidatableCredential, JsonSerializable

Table of Contents

Interfaces

ValidatableCredential
JsonSerializable

Constants

API_KEY_DB_KEY  = "easybillToken"
API_KEY_JSON_KEY  = "api_key"
DEBUG_API_KEY  = "esb-dev-token"
REQUEST_TIMEOUT  = 8
RESULT_MESSAGE_ERROR  = "server-error"
RESULT_MESSAGE_UNAUTHORIZED  = "invalid-api-key"
RESULT_TITLE_DANGER  = "failure"
RESULT_TITLE_SUCCESS  = "success"
RESULT_TITLE_WARNING  = "success"
TEST_URI  = "documents"

Properties

$apiKey  : string|null
$opt  : array<string|int, mixed>

Methods

__construct()  : mixed
checkUserModule()  : mixed
createFor()  : mixed
getApiKey()  : string|null
Get the value of apiKey
getOpt()  : array<string|int, mixed>
getOptUser()  : mixed
getOptUserId()  : mixed
getOptVal()  : mixed
getOptValOr()  : mixed
getRawCredential()  : User|null
getUser()  : User|null
getUserModule()  : UserModule
hasOptKey()  : mixed
isFine()  : mixed
jsonSerialize()  : mixed
setApiKey()  : self
Set the value of apiKey
setOpt()  : static
setUserModule()  : self
toJson()  : mixed
toJsonAssoc()  : mixed
validate()  : CredentialResult
getBaseUri()  : string
getClientOpt()  : array<string|int, mixed>
getHttpClient()  : Client
isDebug()  : mixed

Constants

RESULT_MESSAGE_UNAUTHORIZED

public mixed RESULT_MESSAGE_UNAUTHORIZED = "invalid-api-key"

Properties

$opt

private array<string|int, mixed> $opt

Methods

__construct()

public __construct([UserModule|null $userModule = null ][, array<string|int, mixed> $opt = [] ]) : mixed
Parameters
$userModule : UserModule|null = null
$opt : array<string|int, mixed> = []

createFor()

public static createFor(UserModule $userModule[, array<string|int, mixed> $opt = [] ]) : mixed
Parameters
$userModule : UserModule
$opt : array<string|int, mixed> = []

getApiKey()

Get the value of apiKey

public getApiKey() : string|null
Return values
string|null

getOpt()

public getOpt([array<string|int, mixed> $opt = null ]) : array<string|int, mixed>
Parameters
$opt : array<string|int, mixed> = null
Return values
array<string|int, mixed>

getOptUser()

public getOptUser() : mixed

getOptUserId()

public getOptUserId() : mixed

getOptVal()

public getOptVal(string $key) : mixed
Parameters
$key : string

getOptValOr()

public getOptValOr(string $key[, mixed $or = null ]) : mixed
Parameters
$key : string
$or : mixed = null

getRawCredential()

public getRawCredential() : User|null
Return values
User|null

getUser()

public getUser() : User|null
Return values
User|null

hasOptKey()

public hasOptKey(string $key) : mixed
Parameters
$key : string

setApiKey()

Set the value of apiKey

public setApiKey(string|null $apiKey) : self
Parameters
$apiKey : string|null
Return values
self

setOpt()

public setOpt(array<string|int, mixed> $opt) : static
Parameters
$opt : array<string|int, mixed>
Return values
static

getClientOpt()

private getClientOpt() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results