Class AbstractTax
Methods summary
public
boolean
|
#
validateTaxId( string $tax_id, array $client = null )
Verifies if a given tax ID is valid
Verifies if a given tax ID is valid
Parameters
- $tax_id
- The tax ID to verify
- $client
- An array containing the client data associated with the tax ID
Returns
boolean True if the given tax ID is valid, false otherwise
|
public
string
|
#
getTaxIdName( )
Fetches the name of the tax ID field
Fetches the name of the tax ID field
Returns
string The name of the tax ID field
|
abstract public
array
|
#
getTaxInformation( string $tax_id, array $client = null )
Gets the tax information of a given tax ID
Gets the tax information of a given tax ID
Parameters
- $tax_id
- The tax ID from which to obtain the information
- $client
- An array containing the client data associated with the tax ID
Returns
array An array containing the tax data
- name The name of the taxpayer
- address The address of the taxpayer
- country The country of the taxpayer
- state The state/province of the taxpayer
- type Whether the taxpayer is an individual or a business
- tax_id The formatted tax ID
- tax_exempt True if the taxpayer is exempt from taxes, false otherwise
- settings A list of additional parameters (optional)
|
public
array
|
#
getCountries( )
Gets a list of the countries where these tax requirements apply
Gets a list of the countries where these tax requirements apply
Returns
array A list containing the country codes in ISO 3166-1 alpha2
|
public
array
|
#
getRegions( )
Gets a list of the states/provinces where these tax requirements apply
Gets a list of the states/provinces where these tax requirements apply
Returns
array A list containing the state/province codes
|
public
array
|
#
errors( )
Retrieves any errors associated with the tax api
Retrieves any errors associated with the tax api
Returns
array An array of errors
|