mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Test yodlee endpoints
This commit is contained in:
parent
1506323ff7
commit
e41503a5f5
@ -80,10 +80,9 @@ class Yodlee
|
|||||||
|
|
||||||
public function getTransactions($token)
|
public function getTransactions($token)
|
||||||
{
|
{
|
||||||
|
|
||||||
//$response = $this->bankRequest('/transactions', 'get', ['categoryId' => '2xx', 'fromDate' => '20xx22-07-29'], );
|
|
||||||
|
|
||||||
$response = Http::withHeaders($this->getHeaders(["Authorization" => "Bearer {$token}"]))->get($this->api_endpoint. "/transactions", ['categoryId' => '2']);
|
// $response = Http::withHeaders($this->getHeaders(["Authorization" => "Bearer {$token}"]))->get($this->api_endpoint. "/transactions", ['categoryId' => '2']);
|
||||||
|
$response = Http::withHeaders($this->getHeaders(["Authorization" => "Bearer {$token}"]))->get($this->api_endpoint. "/transactions");
|
||||||
|
|
||||||
|
|
||||||
if($response->successful())
|
if($response->successful())
|
||||||
|
@ -35,11 +35,186 @@ class YodleeApiTest extends TestCase
|
|||||||
|
|
||||||
$access_token = $yodlee->getAccessToken('sbMem62e1e69547bfb1');
|
$access_token = $yodlee->getAccessToken('sbMem62e1e69547bfb1');
|
||||||
|
|
||||||
nlog($access_token);
|
// nlog($access_token);
|
||||||
|
|
||||||
$this->assertNotNull($access_token);
|
$this->assertNotNull($access_token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
[transactionCategory] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1
|
||||||
|
[source] => SYSTEM
|
||||||
|
[classification] => PERSONAL
|
||||||
|
[category] => Uncategorized
|
||||||
|
[type] => UNCATEGORIZE
|
||||||
|
[highLevelCategoryId] => 10000017
|
||||||
|
[highLevelCategoryName] => Uncategorized
|
||||||
|
[defaultCategoryName] => Uncategorized
|
||||||
|
[defaultHighLevelCategoryName] => Uncategorized
|
||||||
|
)
|
||||||
|
|
||||||
|
[1] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 2
|
||||||
|
[source] => SYSTEM
|
||||||
|
[classification] => PERSONAL
|
||||||
|
[category] => Automotive/Fuel
|
||||||
|
[type] => EXPENSE
|
||||||
|
[detailCategory] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1041
|
||||||
|
[name] => Registration/Licensing
|
||||||
|
)
|
||||||
|
|
||||||
|
[1] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1145
|
||||||
|
[name] => Automotive
|
||||||
|
)
|
||||||
|
|
||||||
|
[2] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1218
|
||||||
|
[name] => Auto Fees/Penalties
|
||||||
|
)
|
||||||
|
|
||||||
|
[3] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1260
|
||||||
|
[name] => Car Appraisers
|
||||||
|
)
|
||||||
|
|
||||||
|
[4] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1261
|
||||||
|
[name] => Car Dealers
|
||||||
|
)
|
||||||
|
|
||||||
|
[5] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1262
|
||||||
|
[name] => Car Dealers and Leasing
|
||||||
|
)
|
||||||
|
|
||||||
|
[6] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1263
|
||||||
|
[name] => Car Parts and Accessories
|
||||||
|
)
|
||||||
|
|
||||||
|
[7] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1264
|
||||||
|
[name] => Car Wash and Detail
|
||||||
|
)
|
||||||
|
|
||||||
|
[8] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1265
|
||||||
|
[name] => Classic and Antique Car
|
||||||
|
)
|
||||||
|
|
||||||
|
[9] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1267
|
||||||
|
[name] => Maintenance and Repair
|
||||||
|
)
|
||||||
|
|
||||||
|
[10] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1268
|
||||||
|
[name] => Motorcycles/Mopeds/Scooters
|
||||||
|
)
|
||||||
|
|
||||||
|
[11] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1269
|
||||||
|
[name] => Oil and Lube
|
||||||
|
)
|
||||||
|
|
||||||
|
[12] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1270
|
||||||
|
[name] => Motorcycle Repair
|
||||||
|
)
|
||||||
|
|
||||||
|
[13] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1271
|
||||||
|
[name] => RVs and Motor Homes
|
||||||
|
)
|
||||||
|
|
||||||
|
[14] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1272
|
||||||
|
[name] => Motorcycle Sales
|
||||||
|
)
|
||||||
|
|
||||||
|
[15] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1273
|
||||||
|
[name] => Salvage Yards
|
||||||
|
)
|
||||||
|
|
||||||
|
[16] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1274
|
||||||
|
[name] => Smog Check
|
||||||
|
)
|
||||||
|
|
||||||
|
[17] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1275
|
||||||
|
[name] => Tires
|
||||||
|
)
|
||||||
|
|
||||||
|
[18] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1276
|
||||||
|
[name] => Towing
|
||||||
|
)
|
||||||
|
|
||||||
|
[19] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1277
|
||||||
|
[name] => Transmissions
|
||||||
|
)
|
||||||
|
|
||||||
|
[20] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1278
|
||||||
|
[name] => Used Cars
|
||||||
|
)
|
||||||
|
|
||||||
|
[21] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1240
|
||||||
|
[name] => e-Charging
|
||||||
|
)
|
||||||
|
|
||||||
|
[22] => stdClass Object
|
||||||
|
(
|
||||||
|
[id] => 1266
|
||||||
|
[name] => Gas Stations
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
[highLevelCategoryId] => 10000003
|
||||||
|
[highLevelCategoryName] => Automotive Expenses
|
||||||
|
[defaultCategoryName] => Automotive Expenses
|
||||||
|
[defaultHighLevelCategoryName] => Automotive Expenses
|
||||||
|
)
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
public function testGetCategories()
|
public function testGetCategories()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -50,10 +225,60 @@ class YodleeApiTest extends TestCase
|
|||||||
|
|
||||||
$transactions = $yodlee->getTransactionCategories($access_token);
|
$transactions = $yodlee->getTransactionCategories($access_token);
|
||||||
|
|
||||||
// nlog($transactions);
|
// nlog($transactions);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
[2022-08-05 01:29:45] local.INFO: stdClass Object
|
||||||
|
(
|
||||||
|
[account] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[CONTAINER] => bank
|
||||||
|
[providerAccountId] => 11308693
|
||||||
|
[accountName] => My CD - 8878
|
||||||
|
[accountStatus] => ACTIVE
|
||||||
|
[accountNumber] => xxxx8878
|
||||||
|
[aggregationSource] => USER
|
||||||
|
[isAsset] => 1
|
||||||
|
[balance] => stdClass Object
|
||||||
|
(
|
||||||
|
[currency] => USD
|
||||||
|
[amount] => 49778.07
|
||||||
|
)
|
||||||
|
|
||||||
|
[id] => 12331861
|
||||||
|
[includeInNetWorth] => 1
|
||||||
|
[providerId] => 18769
|
||||||
|
[providerName] => Dag Site Captcha
|
||||||
|
[isManual] =>
|
||||||
|
[currentBalance] => stdClass Object
|
||||||
|
(
|
||||||
|
[currency] => USD
|
||||||
|
[amount] => 49778.07
|
||||||
|
)
|
||||||
|
|
||||||
|
[accountType] => CD
|
||||||
|
[displayedName] => LORETTA
|
||||||
|
[createdDate] => 2022-07-28T06:55:33Z
|
||||||
|
[lastUpdated] => 2022-07-28T06:56:09Z
|
||||||
|
[dataset] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[name] => BASIC_AGG_DATA
|
||||||
|
[additionalStatus] => AVAILABLE_DATA_RETRIEVED
|
||||||
|
[updateEligibility] => ALLOW_UPDATE
|
||||||
|
[lastUpdated] => 2022-07-28T06:55:50Z
|
||||||
|
[lastUpdateAttempt] => 2022-07-28T06:55:50Z
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
*/
|
||||||
public function testGetAccounts()
|
public function testGetAccounts()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -66,6 +291,53 @@ class YodleeApiTest extends TestCase
|
|||||||
// nlog($accounts);
|
// nlog($accounts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
[2022-08-05 01:36:34] local.INFO: stdClass Object
|
||||||
|
(
|
||||||
|
[transaction] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[CONTAINER] => bank
|
||||||
|
[id] => 103953585
|
||||||
|
[amount] => stdClass Object
|
||||||
|
(
|
||||||
|
[amount] => 480.66
|
||||||
|
[currency] => USD
|
||||||
|
)
|
||||||
|
|
||||||
|
[categoryType] => UNCATEGORIZE
|
||||||
|
[categoryId] => 1
|
||||||
|
[category] => Uncategorized
|
||||||
|
[categorySource] => SYSTEM
|
||||||
|
[highLevelCategoryId] => 10000017
|
||||||
|
[createdDate] => 2022-08-04T21:50:17Z
|
||||||
|
[lastUpdated] => 2022-08-04T21:50:17Z
|
||||||
|
[description] => stdClass Object
|
||||||
|
(
|
||||||
|
[original] => CHEROKEE NATION TAX TA TAHLEQUAH OK
|
||||||
|
)
|
||||||
|
|
||||||
|
[isManual] =>
|
||||||
|
[sourceType] => AGGREGATED
|
||||||
|
[date] => 2022-08-03
|
||||||
|
[transactionDate] => 2022-08-03
|
||||||
|
[postDate] => 2022-08-03
|
||||||
|
[status] => POSTED
|
||||||
|
[accountId] => 12331794
|
||||||
|
[runningBalance] => stdClass Object
|
||||||
|
(
|
||||||
|
[amount] => 480.66
|
||||||
|
[currency] => USD
|
||||||
|
)
|
||||||
|
|
||||||
|
[checkNumber] => 998
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
public function testGetTransactions()
|
public function testGetTransactions()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user