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
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
API_KEY_DB_KEY
public
mixed
API_KEY_DB_KEY
= "easybillToken"
API_KEY_JSON_KEY
public
mixed
API_KEY_JSON_KEY
= "api_key"
DEBUG_API_KEY
public
mixed
DEBUG_API_KEY
= "esb-dev-token"
REQUEST_TIMEOUT
public
mixed
REQUEST_TIMEOUT
= 8
RESULT_MESSAGE_ERROR
public
mixed
RESULT_MESSAGE_ERROR
= "server-error"
RESULT_MESSAGE_UNAUTHORIZED
public
mixed
RESULT_MESSAGE_UNAUTHORIZED
= "invalid-api-key"
RESULT_TITLE_DANGER
public
mixed
RESULT_TITLE_DANGER
= "failure"
RESULT_TITLE_SUCCESS
public
mixed
RESULT_TITLE_SUCCESS
= "success"
RESULT_TITLE_WARNING
public
mixed
RESULT_TITLE_WARNING
= "success"
TEST_URI
public
mixed
TEST_URI
= "documents"
Properties
$apiKey
private
string|null
$apiKey
$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> = []
checkUserModule()
public
static checkUserModule(UserModule $userModule) : mixed
Parameters
- $userModule : UserModule
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|nullgetOpt()
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|nullgetUser()
public
getUser() : User|null
Return values
User|nullgetUserModule()
public
getUserModule() : UserModule
Return values
UserModulehasOptKey()
public
hasOptKey(string $key) : mixed
Parameters
- $key : string
isFine()
public
isFine() : mixed
jsonSerialize()
public
jsonSerialize() : mixed
setApiKey()
Set the value of apiKey
public
setApiKey(string|null $apiKey) : self
Parameters
- $apiKey : string|null
Return values
selfsetOpt()
public
setOpt(array<string|int, mixed> $opt) : static
Parameters
- $opt : array<string|int, mixed>
Return values
staticsetUserModule()
public
setUserModule(UserModule $userModule) : self
Parameters
- $userModule : UserModule
Return values
selftoJson()
public
toJson() : mixed
toJsonAssoc()
public
toJsonAssoc() : mixed
validate()
public
validate() : CredentialResult
Return values
CredentialResultgetBaseUri()
private
getBaseUri() : string
Return values
stringgetClientOpt()
private
getClientOpt() : array<string|int, mixed>
Return values
array<string|int, mixed>getHttpClient()
private
getHttpClient() : Client
Return values
ClientisDebug()
private
isDebug() : mixed