mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 15:13:29 +01:00
Static Analysis
This commit is contained in:
parent
34067e490f
commit
6447b887f0
@ -85,6 +85,7 @@ class Nordigen
|
|||||||
|
|
||||||
$it = new AccountTransformer();
|
$it = new AccountTransformer();
|
||||||
return $it->transform($out);
|
return $it->transform($out);
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
if (strpos($e->getMessage(), "Invalid Account ID") !== false)
|
if (strpos($e->getMessage(), "Invalid Account ID") !== false)
|
||||||
return false;
|
return false;
|
||||||
@ -93,7 +94,13 @@ class Nordigen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isAccountActive(string $account_id)
|
/**
|
||||||
|
* isAccountActive
|
||||||
|
*
|
||||||
|
* @param string $account_id
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function isAccountActive(string $account_id): bool
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$account = $this->client->account($account_id)->getAccountMetaData();
|
$account = $this->client->account($account_id)->getAccountMetaData();
|
||||||
@ -112,11 +119,15 @@ class Nordigen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* this method returns booked transactions from the bank_account, pending transactions are not part of the result
|
* getTransactions
|
||||||
* @todo @turbo124 should we include pending transactions within the integration-process and mark them with a specific category?!
|
*
|
||||||
|
* @param string $accountId
|
||||||
|
* @param string $dateFrom
|
||||||
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getTransactions(string $accountId, string $dateFrom = null)
|
public function getTransactions(string $accountId, string $dateFrom = null): array
|
||||||
{
|
{
|
||||||
$transactionResponse = $this->client->account($accountId)->getAccountTransactions($dateFrom);
|
$transactionResponse = $this->client->account($accountId)->getAccountTransactions($dateFrom);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user