PHP Sigfox Client

Token extends Model

Contains the token information of the device

Table of Contents

STATE_INVALID_TOKEN  = 3
INVALID_TOKEN
STATE_NA_FOR_API  = 2
NA_FOR_API
STATE_OFF_CONTRACT  = 1
OFF_CONTRACT
STATE_OK  = 0
OK
$detailMessage  : string|null
Token state description - Valid - Off Contract - Not applicable for API - Invalid
$end  : int|null
The device's communication end time (in milliseconds since the Unix Epoch)
$freeMessages  : int|null
The number of free messages left for this token
$freeMessagesSent  : int|null
The number of free messages already sent for this token
$state  : int|null
- {@see Token::STATE_OK} - {@see Token::STATE_OFF_CONTRACT} - {@see Token::STATE_NA_FOR_API} - {@see Token::STATE_INVALID_TOKEN}
from()  : static
Initializing a model from an array
getDetailMessage()  : string
Getter for detailMessage
getEnd()  : int
Getter for end
getFreeMessages()  : int
Getter for freeMessages
getFreeMessagesSent()  : int
Getter for freeMessagesSent
getState()  : int
Getter for state
jsonSerialize()  : array<string|int, mixed>
setDetailMessage()  : static
Setter for detailMessage
setEnd()  : static
Setter for end
setFreeMessages()  : static
Setter for freeMessages
setFreeMessagesSent()  : static
Setter for freeMessagesSent
setState()  : static
Setter for state

Constants

STATE_INVALID_TOKEN

INVALID_TOKEN

public mixed STATE_INVALID_TOKEN = 3

STATE_NA_FOR_API

NA_FOR_API

public mixed STATE_NA_FOR_API = 2

STATE_OFF_CONTRACT

OFF_CONTRACT

public mixed STATE_OFF_CONTRACT = 1

STATE_OK

OK

public mixed STATE_OK = 0

Properties

$detailMessage

Token state description - Valid - Off Contract - Not applicable for API - Invalid

protected string|null $detailMessage = null

$end

The device's communication end time (in milliseconds since the Unix Epoch)

protected int|null $end = null

$freeMessages

The number of free messages left for this token

protected int|null $freeMessages = null

$freeMessagesSent

The number of free messages already sent for this token

protected int|null $freeMessagesSent = null

$state

- {@see Token::STATE_OK} - {@see Token::STATE_OFF_CONTRACT} - {@see Token::STATE_NA_FOR_API} - {@see Token::STATE_INVALID_TOKEN}

protected int|null $state = null

Methods

from()

Initializing a model from an array

public static from(array<string|int, mixed> $params) : static
Parameters
$params : array<string|int, mixed>

Pass this parameter if you want to initial property value from an array. See API reference for all property names and types

Tags
throws
DeserializeException

If provided an invalid type to a property

Return values
static

getDetailMessage()

Getter for detailMessage

public getDetailMessage() : string
Return values
string

Token state description

  • Valid
  • Off Contract
  • Not applicable for API
  • Invalid

getEnd()

Getter for end

public getEnd() : int
Return values
int

The device's communication end time (in milliseconds since the Unix Epoch)

getFreeMessages()

Getter for freeMessages

public getFreeMessages() : int
Return values
int

The number of free messages left for this token

getFreeMessagesSent()

Getter for freeMessagesSent

public getFreeMessagesSent() : int
Return values
int

The number of free messages already sent for this token

jsonSerialize()

public jsonSerialize() : array<string|int, mixed>
Tags
inheritdoc
Return values
array<string|int, mixed>

setDetailMessage()

Setter for detailMessage

public setDetailMessage(string $detailMessage) : static
Parameters
$detailMessage : string

Token state description

  • Valid
  • Off Contract
  • Not applicable for API
  • Invalid
Return values
static

To use in method chains

setEnd()

Setter for end

public setEnd(int $end) : static
Parameters
$end : int

The device's communication end time (in milliseconds since the Unix Epoch)

Return values
static

To use in method chains

setFreeMessages()

Setter for freeMessages

public setFreeMessages(int $freeMessages) : static
Parameters
$freeMessages : int

The number of free messages left for this token

Return values
static

To use in method chains

setFreeMessagesSent()

Setter for freeMessagesSent

public setFreeMessagesSent(int $freeMessagesSent) : static
Parameters
$freeMessagesSent : int

The number of free messages already sent for this token

Return values
static

To use in method chains

Search results