miisieq / infakt-client
InfaktClient is a PHP library for the third version of Infakt REST API that makes it easy to perform CRUD (create, read, update and delete) operations on invoices, clients and products.
v1.0.2
2022-04-23 12:20 UTC
Requires
- php: ^7.2 | ^8.0
- doctrine/inflector: ^1.3
- guzzlehttp/guzzle: ^6.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- php-coveralls/php-coveralls: ^2.2
- phpunit/phpunit: ^8.4
This package is auto-updated.
Last update: 2024-10-24 18:09:36 UTC
README
InfaktClient is a PHP library for the third version of Infakt REST API that makes it easy to perform CRUD (create, read, update and delete) operations on invoices, clients and products.
Quick start
Step 1: Install the package
Install Composer and run the following command to get the latest version:
composer require miisieq/infakt-client
Step 2: Create an instance of the client
$infakt = new \Infakt\Infakt( '7e2356a0a400d6ec3d2ced911991f3e8', new \GuzzleHttp\Client() );
Resources reference
Clients
Get all
$clients = $infakt->getRepository(\Infakt\Model\Client::class)->getAll();
Get by ID
$client = $infakt->getRepository(\Infakt\Model\Client::class)->get(2887744);
See more: Infakt API Documentation
Bank Accounts
Get all
$bankAccounts = $infakt->getRepository(\Infakt\Model\BankAccount::class)->getAll();
Get by ID
$bankAccount = $infakt->getRepository(\Infakt\Model\BankAccount::class)->get(4786512);
See more: Infakt API Documentation
VAT Rate
Get all
$infakt->getRepository(\Infakt\Model\VatRate::class)->getAll()
See more: Infakt API Documentation
Contributing
Running tests (phpunit/phpunit)
$ composer tests
Running code style fixer (friendsofphp/php-cs-fixer)
$ composer phpcs
License
This package is released under the MIT license. See the included LICENSE file for more information.