nxsys/library.clients-brex

2202.5.0-beta.1+b50 2023-03-30 07:54 UTC

This package is auto-updated.

Last update: 2024-03-30 00:38:03 UTC


README

MIT License | Packagist Version | GitHub issues | GitHub issues | AppVeyor branch | Sonar Quality Gate | Sonar Tech Debt

Brex SDK for PHP

CII Best Practices Summary

Report a Bug · Request a Feature · Ask a Question

This is an SDK to allow PHP applications to quickly use the Brex REST API to accomplish all common banking tasks available from the API. Through code generation we currently support full API coverage.

You will, of course, need to be a Brex client to get any use from this library.

CAUTION: This is financial software. The nature of the Brex API means that most usage will involve dealing with highly sensitive financial data and/or money transfers. You are entirely responsible for ensuring that proper security measures are implemented to protect your property (money and information). Please observe the LICENSE (and its disclaimer), and thoroughly understand SECURITY (and the limitations of this implementation).

Getting Started

Requirements

Installation

Install nxsys/library.client-brex with composer.

composer require nxsys/library.client-brex

This library allows you to keep the http client library you may already be using in your application. It does this through service discovery. If you are not using an PSR-7 aware HTTP client you will need to install one.

We have tested this against Symfony's HTTP Client. Install the package below.

composer require symfony/http-client

If this is confusing please read https://docs.php-http.org/en/latest/httplug/users.html and don't hesitate to chat with us!

Usage/Examples

<?php
#if using composer use the autoloader
require 'vendor\autoload.php';

use NxSys\Library\Clients\Brex as BrexSdk;

$oSDK=new BrexSdk\SDKHost;

//Let's get company details to start
$oTeamClient=$oSDK->setAuthKey('BREX TOKEN') #consider using a token vault
	->setupTeamClient();

/** @var BrexSdk\API\Team\Client */
$oTeamClient;

//... OR
//if you will be doing work across the API, use the follow convenience method
$oTeamClient=$oSDK->setupAllClients()->getTeamClient();
//etc...

/** @var BrexSdk\API\Team\Model\CompanyResponse */
$aCompanyDetails=$oTeamClient->getCompany();

$sCompanyName=$aCompanyDetails->getLegalName();
// ACME Corp, Inc.

Documentation

FAQ

FAQ

Can I use this securely?

READ SECURITY

How can I obtain a Brex token?

In your Brex dashboard. See https://developer.brex.com/docs/authentication/

Feedback

The following communication channels are open:

If you have any feedback, please reach out to us at onx@nxs.systems

Contributing

First off, thanks for taking the time to contribute! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are greatly appreciated.

Please read our contribution guidelines, and thank you for being involved!

Please adhere to this project's code of conduct.

Used By

This project is used by the following project:

Security

This library attempts to follow good practices of security, but 100% security cannot be assured. This library is provided "as is" and without any warranty. Use at your own risk.

For more information and to report security issues, please refer to our security documentation.

License (MIT)

Copyright (c) 2023 Nexus Systems, Inc. Any rights not expressly granted herein are reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

See LICENSE for more information and third party notices.

Authors

Acknowledgements