dev-master
9999999-devThe official PHP client for the ZacTax API
MIT
The Requires
The Development Requires
by Chad Janicek
1.0
1.0.0.0The official PHP client for the ZacTax API
MIT
The Requires
The Development Requires
by Chad Janicek
Wallogit.com
2017 © Pedro Peláez
The official PHP client for the ZacTax API
This is the official PHP client for the ZacTax API. Although it's in 1.0 release, there are likely to be some major (possibly breaking) changes to the library. See the roadmap below for more information., (*1)
The recommended method is to install via Composer:, (*2)
composer require teamzac/zactax-php
The main entry point is the TeamZac\ZacTax\ZacTax object. The constructor accepts an array of options, some of which can be set fluently if you need to set them after instantiation:, (*3)
$zactax = new TeamZac\ZacTax\ZacTax([
'apiToken' => 'YOUR-API-TOKEN-HERE',
'jurisdictionId' => 'JURISDICTION-ID*',
'debug' => false, // set to true to debug HTTP calls
]);
Notes: * The Jurisdiction ID is recommended, but not strictly necessary when the API Token being used only has access to a single jurisdiction. Some users, however, will have access to multiple jurisdictions, in which case it is highly recommended that you set this option to ensure that you're receiving the correct data., (*4)
You can also fluently set some of the options if you need to do so after instantiation:, (*5)
$zactax->setApiToken('1234')
->setJurisdictionId('jurisdiction-id')
->debug();
You can as properties on the TeamZac\ZacTax\ZacTax instance:, (*6)
$zactax->industries; $zactax->jurisdictions; $zactax->regions; $zactax->taxpayers; $zactax->users;
These resources provide a similar interface, although not necessarily identical as they do not all have the same information or level of detail. Common endpoints to these resources are:, (*7)
$resource->all(); // fetch all records $resource->find($id); // fetch a specific record
What follows is a quick list of endpoints for each resource., (*8)
$zactax->industries->payments($industryId, $options); $zactax->industries->topTaxpayers($industryId);
$zactax->regions->payments($regionId, $options); $zactax->regions->outlets($regionId);
$zactax->taxpayers->payments($taxpayerId, $options); $zactax->taxpayers->search($query, $options);
$zactax->industries->me(); $zactax->industries->myJurisdictions();
We'll continue to flesh out the entire API over time, as this covers only a subset of the available data provided by ZacTax., (*9)
If you notice any issues or problems, please report them. For security problems, please email support[at]zactax.com., (*10)
The official PHP client for the ZacTax API
MIT
The official PHP client for the ZacTax API
MIT