2017 © Pedro Peláez
 

library easybill

Laravel Package to use the easybill.de REST API

image

divdax/easybill

Laravel Package to use the easybill.de REST API

  • Sunday, July 29, 2018
  • by DivDax
  • Repository
  • 2 Watchers
  • 2 Stars
  • 70 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 775 % Grown

The README.md

easybill.de REST API v1

Latest Stable Version Total Downloads StyleCI License, (*1)

Unofficial Laravel Package to use the easybill.de REST API., (*2)

This Laravel Package is a very basic and untested version!, (*3)

Installation

composer require divdax/easybill

Laravel 5.5+

No need to register any providers / aliases. Thanks to Laravels Package Discovery., (*4)

Laravel 5.4

Add the ServiceProvider and Facade in config/app.php, (*5)

'providers' => [
    ...
    DivDax\Easybill\EasybillServiceProvider::class,
];

'aliases' => [
    ...
    'Easybill' => DivDax\Easybill\Facade\Easybill::class,
];

Configuration

Add your easybill.de api key to your .env, (*6)

EASYBILL_API_KEY=xxxxxx

Usage

I only implemented some basic api calls, (*7)

// Search Customer with exact match
Easybill::searchCustomer([
    'company_name' => 'Company Name'
]);

// Create Customer
$customer = Easybill::createCustomer([
    'company_name' => 'Musterfirma GmbH',
    'first_name' => 'Max',
    'last_name' => 'Muster',
    'street' => 'Musterstr. 123',
    'zipcode' => '12345',
    'city' => 'Musterstadt',
    'emails' => ['mail@example.com'],
]);

// Delete Customer
Easybill::deleteCustomer($customer->id);

// Create Document (Invoice)
$doc = Easybill::createDocument([
    'type' => 'INVOICE',
    'title' => 'Titel',
    //'customer_id' => 0,
    'text_prefix' => 'Hello',
    'text' => 'Bye',
    'items' => [
        [
            'type' => 'POSITION',
            'number' => '123', // article number
            'description' => 'Positionsbeschreibung 1',
            'quantity' => 1,
            'single_price_net' => 10 * 100, // cent
            'vat_percent' => 19
        ],
        [
            'type' => 'TEXT',
            'description' => 'Text only',
        ],
        [
            'type' => 'POSITION',
            'description' => 'Positionsbeschreibung 3',
            'quantity' => 1,
            'single_price_net' => 20 * 100,
            'vat_percent' => 19
        ],
    ],
]);

// Finish Document (set auto created document number)
$doc->done();

// Update Document
Easybill::updateDocument($id, ['status' => 'DONE']);

Contributing

If you find an issue, or have a better way to do something, feel free to open an issue or a pull request., (*8)

The Versions

29/07 2018

dev-master

9999999-dev

Laravel Package to use the easybill.de REST API

  Sources   Download

MIT

The Requires

 

laravel api rest package easybill

19/06 2018

1.0.3

1.0.3.0

Laravel Package to use the easybill.de REST API

  Sources   Download

MIT

The Requires

 

laravel api rest package easybill

18/06 2018

1.0.2

1.0.2.0

Laravel Package to use the easybill.de REST API

  Sources   Download

MIT

The Requires

 

laravel api rest package easybill

12/05 2017

1.0.1

1.0.1.0

Laravel Package to use the easybill.de REST API

  Sources   Download

MIT

The Requires

 

laravel api rest package easybill

11/05 2017

1.0.0

1.0.0.0

Laravel Package to use the easybill.de REST API

  Sources   Download

MIT

The Requires

 

laravel api rest package easybill