This commit is contained in:
David Bomba 2022-08-05 12:58:45 +10:00
parent e41503a5f5
commit 8810596511
3 changed files with 106 additions and 2 deletions

View File

@ -81,8 +81,8 @@ class Yodlee
public function getTransactions($token) public function getTransactions($token)
{ {
// $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"); // $response = Http::withHeaders($this->getHeaders(["Authorization" => "Bearer {$token}"]))->get($this->api_endpoint. "/transactions");
if($response->successful()) if($response->successful())

View File

@ -0,0 +1,53 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('bank_integration', function (Blueprint $table) {
$table->id();
$table->unsignedInteger('account_id');
$table->unsignedInteger('company_id');
$table->unsignedInteger('user_id');
$table->string('account_type')->nullable();
// $table->bigInteger('bank_account_id'); //providerAccountId
// $table->bigInteger('bank_id'); //providerId
$table->text('bank_name'); //providerName
$table->text('account_name')->nullable(); //accountName
$table->text('account_number')->nullable(); //accountNumber
$table->text('account_status')->nullable(); //accountStatus
$table->text('account_type')->nullable(); //CONTAINER
$table->decimal('balance', 20, 6)->default(0); //currentBalance.amount
$table->text('currency')->nullable(); //currentBalance.currency
$table->
$table->timestamps(6);
$table->softDeletes('deleted_at', 6);
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade')->onUpdate('cascade');
$table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade')->onUpdate('cascade');
$table->foreign('company_id')->references('id')->on('companies')->onDelete('cascade')->onUpdate('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
};

View File

@ -277,6 +277,57 @@ class YodleeApiTest extends TestCase
) )
)
[1] => stdClass Object
(
[CONTAINER] => bank
[providerAccountId] => 11308693
[accountName] => Joint Savings - 7159
[accountStatus] => ACTIVE
[accountNumber] => xxxx7159
[aggregationSource] => USER
[isAsset] => 1
[balance] => stdClass Object
(
[currency] => USD
[amount] => 186277.45
)
[id] => 12331860
[includeInNetWorth] => 1
[providerId] => 18769
[providerName] => Dag Site Captcha
[isManual] =>
[availableBalance] => stdClass Object
(
[currency] => USD
[amount] => 186277.45
)
[currentBalance] => stdClass Object
(
[currency] => USD
[amount] => 186277.45
)
[accountType] => SAVINGS
[displayedName] => LYDIA
[createdDate] => 2022-07-28T06:55:33Z
[classification] => PERSONAL
[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()