mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
revert yodlee props: https://github.com/invoiceninja/invoiceninja/pull/9004#discussion_r1435703438
This commit is contained in:
parent
0bb1a80e51
commit
6470f501af
@ -99,7 +99,7 @@ class YodleeController extends BaseController
|
||||
|
||||
|
||||
$company->account->bank_integrations->where("integration_type", BankIntegration::INTEGRATION_TYPE_YODLEE)->where('auto_sync', true)->each(function ($bank_integration) use ($company) { // TODO: filter to yodlee only
|
||||
ProcessBankTransactionsYodlee::dispatch($company->account, $bank_integration);
|
||||
ProcessBankTransactionsYodlee::dispatch($company->account->id, $bank_integration);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -209,7 +209,7 @@ class BankIntegrationController extends BaseController
|
||||
// Processing transactions for each bank account
|
||||
if (Ninja::isHosted() && $user->account->bank_integration_account_id)
|
||||
$user_account->bank_integrations->where("integration_type", BankIntegration::INTEGRATION_TYPE_YODLEE)->each(function ($bank_integration) use ($user_account) {
|
||||
ProcessBankTransactionsYodlee::dispatch($user_account, $bank_integration);
|
||||
ProcessBankTransactionsYodlee::dispatch($user_account->id, $bank_integration);
|
||||
});
|
||||
|
||||
if (config('ninja.nordigen.secret_id') && config('ninja.nordigen.secret_key') && (Ninja::isSelfHost() || (Ninja::isHosted() && $user_account->isPaid() && $user_account->plan == 'enterprise')))
|
||||
@ -333,7 +333,7 @@ class BankIntegrationController extends BaseController
|
||||
|
||||
if (Ninja::isHosted() && $account->isPaid() && $account->plan == 'enterprise') {
|
||||
$account->bank_integrations()->where('integration_type', BankIntegration::INTEGRATION_TYPE_YODLEE)->where('auto_sync', true)->cursor()->each(function ($bank_integration) use ($account) {
|
||||
(new ProcessBankTransactionsYodlee($account, $bank_integration))->handle();
|
||||
(new ProcessBankTransactionsYodlee($account->id, $bank_integration))->handle();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ class ProcessBankTransactionsYodlee implements ShouldQueue
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
private Account $account;
|
||||
private string $bank_integration_account_id;
|
||||
|
||||
private BankIntegration $bank_integration;
|
||||
|
||||
@ -46,9 +46,9 @@ class ProcessBankTransactionsYodlee implements ShouldQueue
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*/
|
||||
public function __construct(Account $account, BankIntegration $bank_integration)
|
||||
public function __construct(string $bank_integration_account_id, BankIntegration $bank_integration)
|
||||
{
|
||||
$this->account = $account;
|
||||
$this->bank_integration_account_id = $bank_integration_account_id;
|
||||
$this->bank_integration = $bank_integration;
|
||||
$this->from_date = $bank_integration->from_date;
|
||||
$this->company = $this->bank_integration->company;
|
||||
@ -95,7 +95,7 @@ class ProcessBankTransactionsYodlee implements ShouldQueue
|
||||
|
||||
private function processTransactions()
|
||||
{
|
||||
$yodlee = new Yodlee($this->account->bank_integration_account_id);
|
||||
$yodlee = new Yodlee($this->bank_integration_account_id);
|
||||
|
||||
if (!$yodlee->getAccount($this->bank_integration->bank_account_id)) {
|
||||
$this->bank_integration->disabled_upstream = true;
|
||||
@ -191,7 +191,7 @@ class ProcessBankTransactionsYodlee implements ShouldQueue
|
||||
|
||||
public function middleware()
|
||||
{
|
||||
return [new WithoutOverlapping($this->account->bank_integration_account_id)];
|
||||
return [new WithoutOverlapping($this->bank_integration_account_id)];
|
||||
}
|
||||
|
||||
public function backoff()
|
||||
|
@ -56,7 +56,7 @@ class BankTransactionSync implements ShouldQueue
|
||||
|
||||
if ($account->isPaid() && $account->plan == 'enterprise') {
|
||||
$account->bank_integrations()->where('integration_type', BankIntegration::INTEGRATION_TYPE_YODLEE)->where('auto_sync', true)->cursor()->each(function ($bank_integration) use ($account) {
|
||||
(new ProcessBankTransactionsYodlee($account, $bank_integration))->handle();
|
||||
(new ProcessBankTransactionsYodlee($account->id, $bank_integration))->handle();
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user