2018-10-16 13:42:43 +02:00
|
|
|
<?php
|
2019-05-11 05:32:07 +02:00
|
|
|
/**
|
|
|
|
* Invoice Ninja (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2019. Invoice Ninja LLC (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @license https://opensource.org/licenses/AAL
|
|
|
|
*/
|
2018-10-16 13:42:43 +02:00
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
2018-10-17 14:26:27 +02:00
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2018-10-16 13:42:43 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Class Bank.
|
|
|
|
*/
|
2019-05-01 05:33:04 +02:00
|
|
|
class Bank extends Model
|
2018-10-16 13:42:43 +02:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var bool
|
|
|
|
*/
|
|
|
|
public $timestamps = false;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param $finance
|
|
|
|
*
|
|
|
|
* @return \App\Libraries\Bank
|
|
|
|
*/
|
|
|
|
public function getOFXBank($finance)
|
|
|
|
{
|
|
|
|
$config = json_decode($this->config);
|
|
|
|
|
|
|
|
return new \App\Libraries\Bank($finance, $config->fid, $config->url, $config->org);
|
|
|
|
}
|
|
|
|
}
|