EasyPost
in package
Table of Contents
- VERSION = '5.7.0'
- The version of this PHP client library.
- $apiBase : string
- The base url to use for all requests.
- $apiKey : string
- The API key of the authenticated user.
- $apiVersion : string
- The API version used in requests.
- $betaApiBase : string
- The base beta url to use for all requests.
- $connectTimeout : int|null
- Time in milliseconds to wait for a connection.
- $responseTimeout : int|null
- Time in milliseconds to wait for a response.
- getApiBase() : string
- Get the API base URL.
- getApiKey() : string
- Get the API key.
- getApiVersion() : string
- Get the API version.
- getConnectTimeout() : int|null
- Get time in milliseconds to wait for a connection.
- getResponseTimeout() : int|null
- Get time in milliseconds to wait for a response.
- setApiBase() : mixed
- Set the API base URL.
- setApiKey() : mixed
- Set the API key.
- setApiVersion() : mixed
- Set the API version.
- setConnectTimeout() : mixed
- Set time in milliseconds to wait for a connection.
- setResponseTimeout() : mixed
- Set time in milliseconds to wait for a response.
Constants
VERSION
The version of this PHP client library.
public
string
VERSION
= '5.7.0'
Properties
$apiBase
The base url to use for all requests.
public
static string
$apiBase
= 'https://api.easypost.com/v2'
$apiKey
The API key of the authenticated user.
public
static string
$apiKey
$apiVersion
The API version used in requests.
public
static string
$apiVersion
= '2'
$betaApiBase
The base beta url to use for all requests.
public
static string
$betaApiBase
= 'https://api.easypost.com/beta'
$connectTimeout
Time in milliseconds to wait for a connection.
public
static int|null
$connectTimeout
= 30000
Zero or null means no timeout.
$responseTimeout
Time in milliseconds to wait for a response.
public
static int|null
$responseTimeout
= 60000
Zero or null means no timeout.
Methods
getApiBase()
Get the API base URL.
public
static getApiBase() : string
Return values
string —getApiKey()
Get the API key.
public
static getApiKey() : string
Return values
string —getApiVersion()
Get the API version.
public
static getApiVersion() : string
Return values
string —getConnectTimeout()
Get time in milliseconds to wait for a connection.
public
static getConnectTimeout() : int|null
Zero or null means no timeout.
Return values
int|null —getResponseTimeout()
Get time in milliseconds to wait for a response.
public
static getResponseTimeout() : int|null
Zero or null means no timeout.
Return values
int|null —setApiBase()
Set the API base URL.
public
static setApiBase(string $apiBase) : mixed
Parameters
- $apiBase : string
Return values
mixed —setApiKey()
Set the API key.
public
static setApiKey(string $apiKey) : mixed
Parameters
- $apiKey : string
Return values
mixed —setApiVersion()
Set the API version.
public
static setApiVersion( $apiVersion) : mixed
Parameters
Return values
mixed —setConnectTimeout()
Set time in milliseconds to wait for a connection.
public
static setConnectTimeout(int|null $connectTimeout) : mixed
Zero or null means no timeout.
Parameters
- $connectTimeout : int|null
Return values
mixed —setResponseTimeout()
Set time in milliseconds to wait for a response.
public
static setResponseTimeout(int|null $responseTimeout) : mixed
Zero or null means no timeout.
Parameters
- $responseTimeout : int|null