Skip to content

YahaayLabs/upbank-php-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UpBank PHP SDK (Unofficial)

UpBank unofficial PHP SDK for the UpBank API

Latest Version PHP Version tests Total Downloads

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.