Download the PHP package voov/billingo-api-datamapper without Composer
On this page you can find all versions of the php package voov/billingo-api-datamapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package billingo-api-datamapper
Billingo API Data Mapper
WARNING: The functions of this package are highly experimental, and not yet recommended for production use!
This library provides CRUD access for Billingo API with data mapped models created for every API endpoint:
- Invoices (
Billingo\API\DataMapper\Models\Invoices
) - Invoice blocks (
Billingo\API\DataMapper\Models\InvoiceBlocks
) - Bank accounts (
Billingo\API\DataMapper\Models\BankAccounts
) - Expenses (
Billingo\API\DataMapper\Models\Expenses
) - Clients (
Billingo\API\DataMapper\Models\Clients
) - Payment methods (
Billingo\API\DataMapper\Models\PaymentMethods
) - Vat (
Billingo\API\DataMapper\Models\Vat
)
Factory
While you can use the included models without using the Billingo Factory it is not recommended.
Usage
Loading using the class constant
When using PHP 5.6+, you can use the ::class
constant when specifying the model to make
Loading using name
Load class using the name of the class.
Loading given ID
Instead of loading every model using loadAll
you can use the load
function to load a single resource.
Creating a new resource
To create a new resource, you use the same factory method.
Update a resource
You can easily update an already saved resource by first loading it then modifying the neccessary fields and calling the save
method. The underlying library knows that it needs to update the resource instead of creating a new.
Delete a resource
To delete a resource first simple load the resource and then call the delete
function.
Special invoice functions
There are a couple of auxilary functions in the Invoice model that can make the usage even easier.
Pay
Set invoice paid, or partially paid
Cancel
Cancel the invoice. The function returns the new cancel invoice.
Send
Send the invoice to the client