Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
danfekete Merge pull request #4 from KristofMorva/master
Supporting 5.5 and Package Discovery
Latest commit cd2b218 Aug 23, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config config publish Feb 23, 2016
src Fix config path Oct 24, 2016
.gitignore init Feb 23, 2016
README.md README init Feb 23, 2016
composer.json Supporting 5.5 and Package Discovery Aug 23, 2017
composer.lock init Feb 23, 2016

README.md

Billingo API Provider for Laravel

This package is a Billingo API service provider and facade for Laravel 5.1+.

Installing

You have to use Composer to install the library

composer require voov/billingo-api-laravel

Find the providers array in the config/app.php file and add the Billingo Service Provider:

'providers' => [
  // ...
  Billingo\API\Laravel\BillingoServiceProvider::class
];

Now find the aliases array in the same config file and add the Billingo Facade class:

'aliases' => [
  // ...
  'Billingo' => Billingo\API\Laravel\BillingoFacade::class
];

Config

Before you can use the Billingo service provider you have configure it with your API keys. You can access your API keys here: https://www.billingo.hu/api

In the command line type the following:

php artisan vendor:publish

This command will generate a billingo.php file inside your config directory (usually config/). Enter your API creditentials here.

Usage

Get resource

// Return the list of clients
$clients = Billingo::get('clients');

// Return one client
$client = Billingo::get('clients/123456789');

Save resource

// save a new client
$clientData = [
  "name" => "Gigazoom LLC.",
  "email" => "rbrooks5@amazon.com",
  "billing_address" => [
      "street_name" => "Moulton",
      "street_type" => "Terrace",
      "house_nr" => "2797",
      "city" => "Preston",
      "postcode" => "PR1",
      "country" => "United Kingdom"
  ]
]
Billingo::post('clients', $clientData);

Update resource

// save client
Billingo::put('clients/123456789', $newData);

Delete resource

// delete client
Billingo::delete('clients/123456789');
You can’t perform that action at this time.