imbue / wefact-api-php
WeFact API client library for PHP.
Installs: 1 791
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 2
Open Issues: 0
Requires
- php: ^7.2 || ^7.3 || ^8.0
- ext-json: *
- guzzlehttp/guzzle: ^6.3 || ^7.0
Requires (Dev)
- phpunit/phpunit: ^5.7 || ^6.5 || ^7.1 || ^9
This package is auto-updated.
Last update: 2024-10-29 01:07:06 UTC
README
PHP library for online invoicing software wefact.nl
Getting started
Initializing the WeFact client
$client = new WeFact(); $client->setApiToken($yourApiToken);
Retrieve multiple invoices
$invoices = $client->invoices->list();
Get a single invoice
$invoice = $client->invoices->show([ 'InvoiceCode' => 'F0001', ]);
Creating an invoice
$invoice = $client->invoices->create([ 'DebtorCode' => 'DB10000', 'InvoiceLines' => [ [ 'Number' => 2, 'ProductCode' => 'P0001' ], [ 'Description' => 'Reiskosten à € 0,19 per km', 'PriceExcl' => 0.19 ] ] ]);
Updating an invoice
$invoice = $client->invoices->edit([ 'Identifier' => 1, 'Discount' => 10, 'Term' => 30, ]);
Deleting an invoice
$invoice = $client->invoices->delete([ 'Identifier' => 1, ]);
Downloading an attachment
$invoices = $client->attachments->download([ 'ReferenceIdentifier' => '1', 'Type' => 'pricequote', 'Filename' => 'sample.pdf', ]);
Available controllers
- Attachment
- Credit invoice
- Credit invoice lines
- Debtor
- Group
- Invoice
- Invoice line
- Price quote
- Price quote line
- Product
- Settings
- Subscription