freshbooks-php-sdk

AuthorizationToken implements DataModel

Authorization data including the OAuth bearer token, expiry, and refresh token.

Tags
link
https://www.freshbooks.com/api/authentication

Table of Contents

Interfaces

DataModel

Properties

$accessToken  : string|null
$createdAt  : DateTimeImmutable|null
$expiresIn  : int|null
$refreshToken  : string|null
$scopes  : string|null

Methods

__construct()  : mixed
getContent()  : array<string|int, mixed>
Get the data as an array to POST or PUT to FreshBooks, removing any read-only fields.
getExpiresAt()  : DateTimeImmutable

Properties

$accessToken

public string|null $accessToken

The authorized bearer token from the OAuth2 token response.

$createdAt

public DateTimeImmutable|null $createdAt

Time the bearer token was created.

$refreshToken

public string|null $refreshToken

The authorized refresh token from the OAuth2 token response.

Methods

__construct()

public __construct([array<string|int, mixed> $data = [] ]) : mixed
Parameters
$data : array<string|int, mixed> = []

getContent()

Get the data as an array to POST or PUT to FreshBooks, removing any read-only fields.

public getContent() : array<string|int, mixed>
Return values
array<string|int, mixed>

getExpiresAt()

public getExpiresAt() : DateTimeImmutable
Return values
DateTimeImmutable

Time the bearer token expires at.

On this page

Search results