2017 © Pedro Peláez
 

library php-dinero

Dinero REST wrapper for PHP

image

lasserafn/php-dinero

Dinero REST wrapper for PHP

  • Thursday, February 8, 2018
  • by lasserafn
  • Repository
  • 1 Watchers
  • 3 Stars
  • 47 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 13 Versions
  • 9 % Grown

The README.md

PHP Dinero REST wrapper

This is a PHP wrapper for Dinero. Forked from lasserafn/laravel-dinero., (*1)

Build Status Coverage StyleCI Status Total Downloads Latest Stable Version License , (*2)

Installation

  1. Require using composer
composer require lasserafn/php-dinero

Requirements

  • PHP +5.6

Getting started

  1. Apply as a developer at Dinero, (*3)

  2. Get your client id and secret, (*4)

  3. Find the organisation id when logged into Dinero (bottom left), (*5)

, (*6)

  1. Create an API key inside Dinero, (*7)

  2. Utilize the wrapper as below, (*8)

``` php $dinero = new \LasseRafn\Dinero\Dinero( $clientId, $clientSecret ); $dinero->auth( $apiKey, $orgId ); // this WILL send a request to the auth API., (*9)

$contacts = $dinero->contacts()->perPage(10)->page(2)->get();, (*10)

// Do something with the contacts., (*11)


``` php $invoices = $dinero->invoices()->all();

``` php $products = $dinero->products()->deletedOnly()->all();, (*12)


You can also use an old auth token, if you dont want to auth everytime you setup a new instance of Dinero. ``` php $dinero = new \LasseRafn\Dinero\Dinero( $clientId, $clientSecret ); $dinero->setAuth($token, $orgId); // this will NOT send a request to the auth API. $products = $dinero->products()->deletedOnly()->all();

Usage

Creating Contacts

``` php // Create Instance $dinero = new \LasseRafn\Dinero\Dinero( $clientId, $clientSecret );, (*13)

// Auth to a Dinero account $dinero->auth( $apiKey, $orgId );, (*14)

// Create the contact $contact = $dinero->contacts()->create([ 'IsPerson' => true, 'Name' => 'Test', 'CountryKey' => 'DK' ]);, (*15)

// if the request succeeded, $contact will be a \LasseRafn\Dinero\Models\Contact object. ```, (*16)

The Versions

08/02 2018

dev-master

9999999-dev

Dinero REST wrapper for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api wrapper integration dinero

08/02 2018

0.7.8

0.7.8.0

Dinero REST wrapper for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api wrapper integration dinero

29/01 2018

0.7.7

0.7.7.0

Dinero REST wrapper for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api wrapper integration dinero

21/12 2017

0.7.6

0.7.6.0

Dinero REST wrapper for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api wrapper integration dinero

11/12 2017

0.7.5

0.7.5.0

Dinero REST wrapper for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api wrapper integration dinero

11/12 2017

0.7.4

0.7.4.0

Dinero REST wrapper for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api wrapper integration dinero

04/12 2017

0.7.3

0.7.3.0

Dinero REST wrapper for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api wrapper integration dinero

23/11 2017

0.7.2

0.7.2.0

Dinero REST wrapper for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api wrapper integration dinero

23/11 2017

0.7.1

0.7.1.0

Dinero REST wrapper for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api wrapper integration dinero

23/11 2017

v0.7

0.7.0.0

Dinero REST wrapper for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api wrapper integration dinero

23/11 2017

v0.65

0.65.0.0

Dinero REST wrapper for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api wrapper integration dinero

22/11 2017

0.6

0.6.0.0

Dinero REST wrapper for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api wrapper integration dinero

12/09 2017

v0.5

0.5.0.0

Dinero REST wrapper for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api wrapper integration dinero