Skip to content

Healyhatman/keypay-php

Repository files navigation

KeyPay PHP

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.

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages