Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

tuneuptechnology/tuneuptechnology-php

Repository files navigation

Tuneup Technology App PHP Client Library

The PHP client library for the Tuneup Technology App.

Build Status Coverage Status Packagist Licence

The PHP client library allows you to interact with the customers, tickets, inventory, and locations objects without needing to do the hard work of binding your calls and data to endpoints. Simply call an action such as Customer::create and pass some data and let the library do the rest.

Install

# Install the client library
composer require tuneuptechnology/tuneuptechnology-php

Example

require 'vendor/autoload.php';

$client = new TuneupTechnology\Client(getenv("API_EMAIL"), getenv("API_KEY"));

$customer = $client->customers->create(
    $data = [
        "firstname"     => "Jake",
        "lastname"      => "Peralta",
        "email"         => "[email protected]",
        "phone"         => "8015551234",
        "user_id"       => 1,
        "notes"         => "Believes he is a good detective.",
        "location_id"   => 2,
    ]
);

echo json_encode($customer);

Other examples can be found in the /examples directory. Alter according to your needs.

Usage

[email protected] API_KEY=123... php create-customer.php

Documentation

Up-to-date documentation can be found here.

Development

# Install locally
composer install

# Lint project
composer lint

# Run tests (must be run with PHP 7)
[email protected] API_KEY=123... composer test

Releasing

  1. Update the version variable in Client.php & composer.json
  2. Update CHANGELOG
  3. Create a GitHub tag with proper PHP version semantics (eg: v1.0.0)
  4. Packagist should automatically have the new version published once tagged in GitHub