TaxDetail extends RecurlyResource
Table of Contents
- $array_hints : mixed
- $_billable : mixed
- $_level : mixed
- $_name : mixed
- $_rate : mixed
- $_region : mixed
- $_response : mixed
- $_tax : mixed
- $_type : mixed
- __construct() : mixed
- Constructor
- __debugInfo() : array<string|int, mixed>
- Override of the magic method __debugInfo that will only return the relevant attributes of the \Recurly\RecurlyResource
- __set() : void
- Guard against setting invalid properties
- cast() : RecurlyResource
- Recursively converts a response object into a \Recurly\RecurlyResource.
- fromBinary() : BinaryFile
- Converts a binary response into a Recurly BinaryFile
- fromEmpty() : EmptyResource
- Returns a \Recurly\EmptyResource for API requests that do not have a response body.
- fromResponse() : RecurlyResource
- Converts a Recurly response object into a \Recurly\RecurlyResource.
- getBillable() : bool|null
- Getter method for the billable attribute.
- getLevel() : string|null
- Getter method for the level attribute.
- getName() : string|null
- Getter method for the name attribute.
- getRate() : float|null
- Getter method for the rate attribute.
- getRegion() : string|null
- Getter method for the region attribute.
- getResponse() : Response
- Getter for the Recurly HTTP Response
- getTax() : float|null
- Getter method for the tax attribute.
- getType() : string|null
- Getter method for the type attribute.
- setBillable() : void
- Setter method for the billable attribute.
- setLevel() : void
- Setter method for the level attribute.
- setName() : void
- Setter method for the name attribute.
- setRate() : void
- Setter method for the rate attribute.
- setRegion() : void
- Setter method for the region attribute.
- setTax() : void
- Setter method for the tax attribute.
- setType() : void
- Setter method for the type attribute.
- encodeApiKey() : string
- Base64 encodes the API key
- getUserAgent() : string
- Generates User-Agent for API requests
- hintArrayType() : string
- The hintArrayType method will provide type hinting for setter methods that have array parameters.
- resourceClass() : string
- Converts a string into a representation of a Recurly Resource
- setResponse() : void
- Setter for the Recurly HTTP Response
- setterParamClass() : string
- Uses the Reflection API to determine what \Recurly\RecurlyResource is the expected parameter for the given method.
- titleize() : string
- Capitalizes all the words in the $input.
Properties
$array_hints
protected
static mixed
$array_hints
= []
$_billable
private
mixed
$_billable
$_level
private
mixed
$_level
$_name
private
mixed
$_name
$_rate
private
mixed
$_rate
$_region
private
mixed
$_region
$_response
private
mixed
$_response
$_tax
private
mixed
$_tax
$_type
private
mixed
$_type
Methods
__construct()
Constructor
public
final __construct() : mixed
Return values
mixed —__debugInfo()
Override of the magic method __debugInfo that will only return the relevant attributes of the \Recurly\RecurlyResource
public
__debugInfo() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —__set()
Guard against setting invalid properties
public
__set(string $key, mixed $value) : void
Parameters
- $key : string
-
The parameter name that is being set
- $value : mixed
-
The parameter value that is being set
Tags
Return values
void —cast()
Recursively converts a response object into a \Recurly\RecurlyResource.
public
static cast(object $data) : RecurlyResource
Parameters
- $data : object
-
PHP Object containing the decoded JSON
Return values
RecurlyResource —An instance of a Recurly Resource
fromBinary()
Converts a binary response into a Recurly BinaryFile
public
static fromBinary(string $data, Response $response) : BinaryFile
Parameters
- $data : string
-
The binary file data
- $response : Response
-
(optional) The Recurly HTTP Response
Return values
BinaryFile —An instance of a Recurly BinaryFile
fromEmpty()
Returns a \Recurly\EmptyResource for API requests that do not have a response body.
public
static fromEmpty(Response $response) : EmptyResource
Parameters
- $response : Response
-
(optional) The Recurly HTTP Response
Return values
EmptyResource —fromResponse()
Converts a Recurly response object into a \Recurly\RecurlyResource.
public
static fromResponse(Response $response[, object $json = null ]) : RecurlyResource
Parameters
- $response : Response
-
The Recurly HTTP Response
- $json : object = null
-
(optional) JSON payload to use instead of the $response's. Primarily used for errors
Return values
RecurlyResource —An instance of a Recurly Resource
getBillable()
Getter method for the billable attribute.
public
getBillable() : bool|null
Whether or not the line item is taxable. Only populated for a single LineItem fetch when Avalara for Communications is enabled.
Return values
bool|null —getLevel()
Getter method for the level attribute.
public
getLevel() : string|null
Provides the jurisdiction level for the Communications tax applied. Example values include city, state and federal. Present only when Avalara for Communications is enabled.
Return values
string|null —getName()
Getter method for the name attribute.
public
getName() : string|null
Provides the name of the Communications tax applied. Present only when Avalara for Communications is enabled.
Return values
string|null —getRate()
Getter method for the rate attribute.
public
getRate() : float|null
Provides the tax rate for the region.
Return values
float|null —getRegion()
Getter method for the region attribute.
public
getRegion() : string|null
Provides the tax region applied on an invoice. For Canadian Sales Tax, this will be either the 2 letter province code or country code. Not present when Avalara for Communications is enabled.
Return values
string|null —getResponse()
Getter for the Recurly HTTP Response
public
getResponse() : Response
Return values
Response —The Recurly HTTP Response
getTax()
Getter method for the tax attribute.
public
getTax() : float|null
The total tax applied for this tax type.
Return values
float|null —getType()
Getter method for the type attribute.
public
getType() : string|null
Provides the tax type for the region or type of Comminications tax when Avalara for Communications is enabled. For Canadian Sales Tax, this will be GST, HST, QST or PST.
Return values
string|null —setBillable()
Setter method for the billable attribute.
public
setBillable(bool $billable) : void
Parameters
- $billable : bool
Return values
void —setLevel()
Setter method for the level attribute.
public
setLevel(string $level) : void
Parameters
- $level : string
Return values
void —setName()
Setter method for the name attribute.
public
setName(string $name) : void
Parameters
- $name : string
Return values
void —setRate()
Setter method for the rate attribute.
public
setRate(float $rate) : void
Parameters
- $rate : float
Return values
void —setRegion()
Setter method for the region attribute.
public
setRegion(string $region) : void
Parameters
- $region : string
Return values
void —setTax()
Setter method for the tax attribute.
public
setTax(float $tax) : void
Parameters
- $tax : float
Return values
void —setType()
Setter method for the type attribute.
public
setType(string $type) : void
Parameters
- $type : string
Return values
void —encodeApiKey()
Base64 encodes the API key
protected
static encodeApiKey(string $key) : string
Parameters
- $key : string
-
The API key to encode
Return values
string —base64 encoded API key
getUserAgent()
Generates User-Agent for API requests
protected
static getUserAgent() : string
Return values
string —Recurly client User-Agent string
hintArrayType()
The hintArrayType method will provide type hinting for setter methods that have array parameters.
protected
static hintArrayType(string $key) : string
Parameters
- $key : string
-
The property to get teh type hint for.
Return values
string —The class name of the expected array type.
resourceClass()
Converts a string into a representation of a Recurly Resource
protected
static resourceClass(string $type) : string
Parameters
- $type : string
-
A string to convert to a Recurly Resource
Return values
string —The string representation of a Recurly Resource
setResponse()
Setter for the Recurly HTTP Response
protected
setResponse(Response $response) : void
Parameters
- $response : Response
-
The Recurly HTTP Response
Return values
void —setterParamClass()
Uses the Reflection API to determine what \Recurly\RecurlyResource is the expected parameter for the given method.
protected
static setterParamClass(string $method) : string
Parameters
- $method : string
-
The name of the setter method to find the type hint for
Return values
string —The \Recurly\RecurlyResource that the setter method expects
titleize()
Capitalizes all the words in the $input.
protected
static titleize(string $input[, string $prefix = '' ]) : string
Parameters
- $input : string
-
The string to titleize
- $prefix : string = ''
-
(optional) Prefix to add to the beginning of the titleized string. The prefix will not be titleized.
Return values
string —The titleized $input wtih the prepended $prefix