Download the PHP package sypher/keez without Composer
On this page you can find all versions of the php package sypher/keez. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package keez
Short Description A simple Keez.ro integration
License MIT
Homepage https://sypher.eu/
Informations about the package keez
A simple keez.ro library
The Keez PHP library provides convenient access to the Keez.ro API from applications written in the PHP language. It includes a pre-defined set of classes for API resources that initialize themselves dynamically from API responses which makes it compatible with a wide range of versions of the Keez API.
Requirements
PHP 7.3 and later.
Composer
You can install the bindings via Composer. Run the following command:
To use the bindings, use Composer's autoload:
Dependencies
The bindings require the following extensions in order to work properly:
If you use Composer, these dependencies should be handled automatically.
Getting Started
Simple usage looks like:
Use devmode true for staging environment and false for the production environment.
Several entities are used to work this Keez. These entities contain all properties included in the documentation.
To get the response in case of an error, use function getLastError. This returns a string with the response, which normally is a JSON.
Functions index
Articles
- createArticle($Article)
- getArticle($articleId)
- updateArticle($Article)
- getArticles($filter, $order, $count, $offset)
Invoices
- createInvoice($Invoice)
- updateInvoice($Invoice)
- getInvoice($invoiceId)
- getInvoices($filter, $order, $count, $offset)
- deleteInvoice($invoiceId)
- validateInvoice($invoiceId)
- eFacturaInvoice($invoiceId)
Functions
createArticle
- createArticle - Receives an entity of type
Article
as input and returns an entity of the same typeArticle
on success, or false on failure. The returned entity will contain all full properties of the object, including properties which were not set on the input article, plus theexternalId
.
getArticle
- getArticle - Receives the externalId of an
Article
and returns an entity of typeArticle
on success or false on failure.
updateArticle
- updateArticle - Receives as input an entity of type
Article
with full or partial properties and returns an entity of the typeArticle
on success, with all full properties of the object, or false on failure. If partial properties are sent, only those properties will be updated. In all cases, externalId must be included in the input object.
Partial update:
Full update:
getArticles
- getArticles(
$filter
,$order
,$count
,$offset
) - Performs a search for Articles with specific filters, in the givenorder
. Returns an array ofArticle
objects, orfalse
on failure. All parameters are optional. See Working with filters for an overview of how to pass filters.
createInvoice
- createInvoice - Receives an entity of type
Invoice
as input and returns an entity of the same typeInvoice
on success, or false on failure. The returned entity will contain all full properties of the object, including properties which were not set on the input article, plus theexternalId
.
updateInvoice
- updateInvoice(
$invoice
) - Receives an entity of typeInvoice
as input and returns an entity of the same typeInvoice
on success, or false on failure. The returned entity will contain all full properties of the object, including properties which were not set on the input article.
getInvoice
- getInvoice(
$invoiceId
) - Receives the externalId of anInvoice
and returns an entity of typeInvoice
, or false on failure.
getInvoices
- getInvoices(
$filter
,$order
,$count
,$offset
) - Performs a search for invoices with specific filters, in the given order. Returns an array ofInvoice
objects, or false on failure. All parameters are optional. See Working with filters for an overview of how to pass filters.
deleteInvoice
- deleteInvoice(
$invoiceId
) - Receives the externalId of anInvoice
and returns true on success or false on failure.
validateInvoice
- validateInvoice(
$invoiceId
) - Receives the externalId of anInvoice
and returns true on success or false on failure.
eFacturaInvoice
- eFacturaInvoice(
$invoiceId
) - Receives the externalId of anInvoice
and returns true on success or false on failure.
Working with filters
filter
can be either an array with the conditions or a string with the exact syntax supported by Keez API.
If sending the filter as an array, the array values can be arrays with two or three items. Two items assumes the operation is equal.
- ['searchForVariable', 'operation', 'searchForValue']
- ['searchForVariable', 'searchForValue']
Supported operations are all comparisons like =, !=, <=, >=, <, > and special operations like %% (equivalent of SQL LIKE) and % (string starts with).
Example:
License
The MIT License (MIT). Please see License File for more information.
All versions of keez with dependencies
ext-curl Version *
ext-json Version *
ext-mbstring Version *