1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-15 07:33:04 +01:00
invoiceninja/app/Models/Bank.php

58 lines
1.7 KiB
PHP
Raw Normal View History

<?php
2019-05-11 05:32:07 +02:00
/**
* Invoice Ninja (https://invoiceninja.com).
2019-05-11 05:32:07 +02:00
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
2023-01-28 23:21:40 +01:00
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
2019-05-11 05:32:07 +02:00
*
2021-06-16 08:58:16 +02:00
* @license https://www.elastic.co/licensing/elastic-license
2019-05-11 05:32:07 +02:00
*/
namespace App\Models;
/**
* Class Bank.
2023-03-08 08:33:42 +01:00
*
* @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;
}
}