Download the PHP package siegerhansma/acumulus-php without Composer

On this page you can find all versions of the php package siegerhansma/acumulus-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package acumulus-php

Unofficial Acumulus PHP SDK

Official Acumulus documentation: https://apidoc.sielsystems.nl/

This package uses Guzzle to make the cUrl requests to Acumulus. Because of its dependency to Guzzle, this package requires PHP >= 5.4 to function.

Installation

Via composer

Add the package to your composer.json file

Configuration

All of the provider classes take a config array as parameter.

You could put these variables in a specific config file.

Usage

Every class and function is fully documented in the online documentation.

Request

The calls in the API can be called via specific classes corresponding to the categories on the official API docs. To start, create a new instance of the provider class you need.

After that, all the calls in that class will be available via the $client variable.

When the method is called, you can chain the sendRequest method to that. This method actually sends the request to the Acumulus API. The same principle stands for the other provider classes.

Response

The sendRequest method returns the response given by Acumulus. The response is being cast to an array for multiple records or an instance of the model for a single record.

In the example below is the response of the getAvailableContacts method on the ContactsProvider.

Example response

Models

For the responses you get from Acumulus, there are several models being used. There models are integral copies of the responses and have their own getters and setters. For a list of all the models and the methods that you can use on them, check out the API documentation here

Adding an invoice

By far the most difficult task this package does is adding an invoice to Acumulus. I've tried to create this as easy as possible, but the call being made is pretty complex. One thing to note is that Acumulus looks at the customer emailadress as being the unique identifier of a customer. So if a customer doesn't have an email yet, this package will automatically create a unique emailaddress for that customer to prevent creating multiple customers. However, before you make this call it's recommended that you make sure that the customer has an email. To (hopefully) make this a little bit easier for you, I made an InvoiceBuilder class. Here's an example of how to use this.

In the response from Acumulus you will get an array with the following fields:

LICENSE

The MIT License (MIT)

Copyright (c) 2014 Sieger Hansma

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

TODO

A lot still to do, here's what:

If you have any questions, feedback or if you encounter a bug, please leave an issue or a pull request.


All versions of acumulus-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
guzzlehttp/guzzle Version 4.1.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package siegerhansma/acumulus-php contains the following files

Loading the files please wait ....