yahaay-labs / upbank-php-sdk
Unofficial PHP SDK for UpBank API
1.0.31072022
2022-07-31 08:53 UTC
Requires
- php: >=7.4 <8.2
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.4
- nesbot/carbon: ^2.60
Requires (Dev)
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.5
- vlucas/phpdotenv: 5.4.x-dev
This package is auto-updated.
Last update: 2025-04-29 01:17:19 UTC
README
UpBank unofficial PHP SDK for the UpBank API
UpBank Developer Page
Visit https://developer.up.com.au/
Getting your UpBank Personal Access Token
Visit https://api.up.com.au/getting_started
Installation
composer require yahaay-labs/upbank-php-sdk
Usage
<?php require './vendor/autoload.php'; use YahaayLabs\UpBank\Client; $access_token = "[UPBANK ACCESS TOKEN]"; $client = new Client($access_token); //Get All Accounts in an array of objects $accounts = $client->accounts->all()->data(); array_walk( $accounts, function($account) { echo "{$account->id} => {$account->attributes->displayName} <br/>"; });
Getting Records
<?php //Get All Accounts $accounts = $client->accounts->all()->data(); //Get All Categories $accounts = $client->categories->all()->data(); //Get All Tags $accounts = $client->tags->all()->data(); //Get All Transactions $accounts = $client->transactions->all()->data(); //Getting specific record $transactionID = "[TRANSACTION ID]"; $transaction = $client->transactions->get($transactionID)->getRaw();
Testing
Adding using test is still in the works
To run the test:
composer run test
Credits
Contributing
Contributions are more than welcome! See CONTRIBUTING.md for more info.
LICENSE
MIT license. Please see LICENSE for more info.