healyhatman/keypay-php

Package to access the KeyPay API

Fund package maintenance!
:vendor_name

v2.0.5 2024-02-22 13:18 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A client library for the KeyPay API, built from the provided OpenAPI v2 specification using the OpenAPI Generator

Requirements

  • PHP 7.4

Installation

You can install the package via composer:

composer require healyhatman/keypay-php

Usage

Before resource requests can be made, the application must be authorised. KeyPay supports other authorisation flows, but this package assumes you're using OAuth2

Authorisation Code Flow

See Healyhatman/oauth2-keypay for instructions on obtaining Oauth2 credentials

Interacting with the API

Once you have a valid access token, you can instantiate a KeypayPHP\Application, and use it to help build the appropriate API object and the desired methods.

Insantiate an Application

$application = new \KeypayPHP\Application($access_token);

Access a particular API Group

All of the API classes are available under OpenAPI\Client\Api. Using forApi() will allow you to access the API using your application object's transport

$employees = $application->forApi('\OpenAPI\Client\Api\EmployeeApi')->auEmployeeGetEmployees($business_id);

Testing

Not implemented yet, one day

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.