2017-01-30 20:40:43 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
2016-01-20 00:07:31 +01:00
|
|
|
|
|
|
|
use Eloquent;
|
|
|
|
|
2016-07-03 18:11:58 +02:00
|
|
|
/**
|
2017-01-30 20:40:43 +01:00
|
|
|
* Class Bank.
|
2016-07-03 18:11:58 +02:00
|
|
|
*/
|
2016-01-20 00:07:31 +01:00
|
|
|
class Bank extends Eloquent
|
|
|
|
{
|
2016-07-03 18:11:58 +02:00
|
|
|
/**
|
|
|
|
* @var bool
|
|
|
|
*/
|
2016-01-20 00:07:31 +01:00
|
|
|
public $timestamps = false;
|
|
|
|
|
2016-07-03 18:11:58 +02:00
|
|
|
/**
|
|
|
|
* @param $finance
|
2017-01-30 20:40:43 +01:00
|
|
|
*
|
2016-07-03 18:11:58 +02:00
|
|
|
* @return \App\Libraries\Bank
|
|
|
|
*/
|
2016-01-20 00:07:31 +01:00
|
|
|
public function getOFXBank($finance)
|
|
|
|
{
|
|
|
|
$config = json_decode($this->config);
|
|
|
|
|
|
|
|
return new \App\Libraries\Bank($finance, $config->fid, $config->url, $config->org);
|
|
|
|
}
|
|
|
|
}
|