tuneuptechnology/tuneuptechnology-php

This package is abandoned and no longer maintained. No replacement package was suggested.

The PHP client library for the Tuneup Technology App.

2.0.0 2021-06-22 02:37 UTC

This package is auto-updated.

Last update: 2022-07-21 21:34:52 UTC


README

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"         => "jake@example.com",
        "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

API_EMAIL=email@example.com 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)
API_EMAIL=user@example.com 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