Download the PHP package rokde/gsales-api-client without Composer

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

SOAP API Client for gSales

Latest Stable Version Latest Unstable Version License Total Downloads

A generic api client for the billing system gSales

We support API version 2.3 (published on 20th of August 2014).


API Documentation


Table of contents

  1. Installation
  2. Contexts
    1. Article
    2. Authentication
    3. Comment
    4. Configuration
    5. Contract
    6. Customer
    7. Document
    8. Invoice
    9. Mailspool
    10. Newsletter
    11. Offer
    12. Queue
    13. Refund
    14. User
  3. Using in Frameworks
    1. Using in Laravel 4
    2. Other Frameworks

Installation

Add to your composer.json following lines

"require": {
    "rokde/gsales-api-client": "~1.0"
}

Using in Vanilla PHP

$wsdl = 'http://URL-TO-YOUR/api/api.php?wsdl';
$apikey = 'YOUR-API-KEY-HERE';
$client = new \Rokde\Gsales\Api\Client($wsdl, $apikey);
echo $client->customer()->count(); // returns number of customers

That's it.

Contexts

You have a lot of contexts to group api commands together.

Article

All article related commands are grouped in the Article context.

$client->article()->...;

Following methods are available for the article context:

Create an article
$article = new \Rokde\Gsales\Api\Types\Article\Base();
$article->setTitle('Projectmanagement')
    ->setRetailPrice(120);
$apiClient->article()->create($article);

Authentication

All authentication related commands are grouped in the Authentication context.

$client->authentication()->...;

Following methods are available for the authentication context:

Comment

All comment related commands are grouped in the Comment context.

$client->comment()->...;

Following methods are available for the comment context:

Configuration

All configuration related commands are grouped in the Configuration context.

$client->configuration()->...;

Following methods are available for the configuration context:

Contract

All contract related commands are grouped in the Contract context.

$client->contract()->...;

Following methods are available for the contract context:

Customer

All customer related commands are grouped in the Customer context.

$client->customer()->...;

Following methods are available for the customer context:

Fetch the number of customers
$apiClient->customer()->count();
Fetch all customers
$apiClient->customer()->all()

Document

All document related commands are grouped in the Document context.

$client->document()->...;

Following methods are available for the document context:

Invoice

All invoice related commands are grouped in the Invoice context.

$client->invoice()->...;

Following methods are available for the invoice context:

Mailspool

All mailspool related commands are grouped in the Mailspool context.

$client->mailspool()->...;

Following methods are available for the mailspool context:

Newsletter

All newsletter related commands are grouped in the Newsletter context.

$client->newsletter()->...;

Following methods are available for the newsletter context:

Offer

All offer related commands are grouped in the Offer context.

$client->offer()->...;

Following methods are available for the offer context:

Queue

All queue related commands are grouped in the Queue context.

$client->queue()->...;

Following methods are available for the queue context:

Create a queue entry
$queueEntry = new \Rokde\Gsales\Api\Types\Queue\Base();
$queueEntry->setPositionText('Test')
    ->setCustomerId(37)
    ->setPrice(1.23)
    ->setQuantity(1)
    ->setApproval(0)
    ->setUnit('x')
    ->setDiscount(0)
    ->setTax(0.19);
$apiClient->queue()->create($queueEntry);

Refund

All refund related commands are grouped in the Refund context.

$client->refund()->...;

Following methods are available for the refund context:

User

All user related commands are grouped in the User context.

$client->user()->...;

Following methods are available for the user context:

Using in Frameworks

Using in Laravel 4

After installing the package you have to add the following line to your providers Array in your app.php:

'Rokde\Gsales\Api\Supports\Laravel\LaravelGsalesApiClientServiceProvider',

To get your GsalesApiClient configured publish it's configuration:

php artisan config:publish rokde/gsales-api-client

Then you can set your wsdl and apikey to the published configuration file.

The service provider for laravel automatically creates a facade GsalesApiClient for you. So you can use it from the beginning like so:

GsalesApiClient::queue()->all(); // get all queue entries

or without facade:

$apiClient = App::make('gsales-api-client');
$apiClient->queue()->all();

Other Frameworks

We do not use any other frameworks with this package yet. But please let us know when you need it elsewhere. Or fork it and develop your own. We appreciate pushing back your extension ;)


All versions of gsales-api-client with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
ext-soap Version *
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 rokde/gsales-api-client contains the following files

Loading the files please wait ....