2017 © Pedro Peláez
 

library freeagent-php

A wrapper for the freeagent API

image

6by6/freeagent-php

A wrapper for the freeagent API

  • Monday, July 23, 2018
  • by daniel_ness
  • Repository
  • 4 Watchers
  • 4 Stars
  • 110 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 4 Versions
  • 2 % Grown

The README.md

freeagent-php

Build Status, (*1)

This is a PHP library that provides a comprehensive wrapper for the Freeagent v2 API., (*2)

Installation

You can install this library via Composer:, (*3)

composer require 6by6/freeagent-php, (*4)

Compatibility

We are currently testing against the following PHP versions: * '5.6' * '7.0' * hhvm * nightly, (*5)

Unit Tests

Phpunit tests are provided with the library, however, we would strongly recommend NOT executing these against your live account. The tests require a clean account and part of the process involves deleting any data before starting i.e. everything about your business., (*6)

The test suite will attempt to ensure you are not using a live account before executing tests, however, we will not be held responsible for any loss of data., (*7)

If you're just getting started we would recommend using a sandbox account (obtainable via the Freeagent API Quickstart Guide)., (*8)

Getting Started

Get a list of invoices

use SixBySix\Freeagent\OAuth\Api;
use SixBySix\Freeagent\Entity\EntityCollection;
use SixBySix\Freeagent\Entity\Invoice;

/** @var Api $api */
$api = new Api(
  $clientId = getenv('API_CLIENT_ID'),
  $clientSecret = getenv('API_CLIENT_SECRET'),
  $refreshToken = getenv('API_REFRESH_TOKEN'),
  $sandbox = true
);

/** @var EntityCollection $invoiceCollection */
$invoiceCollection = $api->invoice()->query([
  'view' => 'last_3_months',
]);

/** @var Invoice $invoice */
foreach ($invoiceCollection as $invoice) {
  echo "{$invoice->getReference()}\n";
}

Bug Reports

Please use the Github Issue Tracker for support., (*9)

The Versions

23/07 2018

dev-master

9999999-dev

A wrapper for the freeagent API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Daniel Ness

05/10 2017

v1.0.2

1.0.2.0

A wrapper for the freeagent API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Daniel Ness

26/09 2017

v1.0.1

1.0.1.0

A wrapper for the freeagent API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Daniel Ness

25/09 2017

v1.0.0

1.0.0.0

A wrapper for the freeagent API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Daniel Ness