Download the PHP package robinhq/api without Composer

On this page you can find all versions of the php package robinhq/api. 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 api

ROBIN API Wrapper

This library wraps the ROBIN Api behind a user friendly interface.

The basics

In essence, this library can send customers and orders from your e-commerse solution straight into ROBIN. The ROBIN API expects these customers and orders to be formatted in a specific way, this can also help you to transform your internal order and customer objects to the objects ROBIN understand.

Objects

The ROBIN API expects two different collections of objects, being customers and orders. Below I'll explain how to create both objects.

Customer

To make a ROBIN Customer object, all you need to do is the following:

To send a customer (or a collection of customers) you should always make a Customers collection:

Now, you can send the collection of customers to ROBIN with the following line of code:

So, to combine everything:

The Customers collection makes it really easy to send more customers to ROBIN. Just loop over your existing customers and keep pushing ROBIN Customers into the Customers collection, like so:

Orders

The order object for the ROBIN API is a bit harder to understand due to the way the API expects the data to be given. A order is made in the following way:

where $listView is an instance of the ListView class and $detailsView an instance of the DetailsView class. To read more about these two objects, please revert to the ROBIN API docs.

A ListView is the object that represents the data when the order is viewed inside a list. This object contains the order-number, -date and -status. Creating a ListView is done like this:

Thus far, it's not that hard. The harder part comes when we are going to add the details view to the robin order. Inside the details view, there can be any kind of object. This library comes with OrderDetails, Products, Invoices andShipment details.

To create these details, first we have to create the DetailsView collection that contains all of the details.

Next create the order details and add them to the DetailsView

This will add a DetailsViewItem with OrderDetails as it's data to the DetailsView. The DetailsViewItem will be displayed as details.

When you convert a detailViewItem to Json or an Array, they get formatted like this:

All public properties are converted to snake case, as this is what the ROBIN API expects.

To add product details, simply do the following:

This works the same for Invoices and Shipments details.

Creating your own details

The ROBIN API allows you to send your own data towards it. The code blow shows you how to do this.


All versions of api with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ~6.0
robinhq/support Version ~0.1.0
monolog/monolog Version ^1.14
nesbot/carbon Version ^1.21
illuminate/support Version ^5.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 robinhq/api contains the following files

Loading the files please wait ....