1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/app/Models/Bank.php
2023-03-08 18:33:42 +11:00

58 lines
1.7 KiB
PHP

<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Models;
/**
* Class Bank.
*
* @property int $id
* @property string|null $name
* @property string|null $remote_id
* @property int $bank_library_id
* @property string|null $config
* @method static \Illuminate\Database\Eloquent\Builder|StaticModel company()
* @method static \Illuminate\Database\Eloquent\Builder|StaticModel exclude($columns)
* @method static \Illuminate\Database\Eloquent\Builder|Bank newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Bank newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Bank query()
* @method static \Illuminate\Database\Eloquent\Builder|Bank whereBankLibraryId($value)
* @method static \Illuminate\Database\Eloquent\Builder|Bank whereConfig($value)
* @method static \Illuminate\Database\Eloquent\Builder|Bank whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|Bank whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|Bank whereRemoteId($value)
* @mixin \Eloquent
*/
class Bank extends StaticModel
{
/**
* @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);
}
public function getEntityType()
{
return self::class;
}
}