mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 06:14:31 -04:00
Minor fixes
This commit is contained in:
parent
6607b23046
commit
3f5f2d66cc
@ -7,7 +7,7 @@ interface SdkInterface
|
|||||||
function getAuthorizationUrl(): string;
|
function getAuthorizationUrl(): string;
|
||||||
function accessToken(string $code, string $realm): array;
|
function accessToken(string $code, string $realm): array;
|
||||||
function refreshToken(): array;
|
function refreshToken(): array;
|
||||||
function getAccessToken(): array;
|
function getAccessToken();
|
||||||
function getRefreshToken(): array;
|
function getRefreshToken(): array;
|
||||||
function totalRecords(string $entity): int;
|
function totalRecords(string $entity): int;
|
||||||
function fetchRecords(string $entity, int $max): array;
|
function fetchRecords(string $entity, int $max): array;
|
||||||
|
@ -49,7 +49,7 @@ final class SdkWrapper implements QuickbooksInterface
|
|||||||
|
|
||||||
$token =($this->sdk->getOAuth2LoginHelper())->getAccessToken();
|
$token =($this->sdk->getOAuth2LoginHelper())->getAccessToken();
|
||||||
return $token;
|
return $token;
|
||||||
|
|
||||||
// $access_token = $token->getAccessToken();
|
// $access_token = $token->getAccessToken();
|
||||||
// $refresh_token = $token->getRefreshToken();
|
// $refresh_token = $token->getRefreshToken();
|
||||||
// $access_token_expires = $token->getAccessTokenExpiresAt();
|
// $access_token_expires = $token->getAccessTokenExpiresAt();
|
||||||
@ -99,7 +99,7 @@ final class SdkWrapper implements QuickbooksInterface
|
|||||||
$records = array_merge($records,$recordsChunk);
|
$records = array_merge($records,$recordsChunk);
|
||||||
$start += $limit;
|
$start += $limit;
|
||||||
} while ($start < $total);
|
} while ($start < $total);
|
||||||
if(empty($records)) throw new \Exceptions("No records retrieved!");
|
if(empty($records)) throw new \Exception("No records retrieved!");
|
||||||
|
|
||||||
} catch (\Throwable $th) {
|
} catch (\Throwable $th) {
|
||||||
nlog("Fetch Quickbooks API Error: {$th->getMessage()}");
|
nlog("Fetch Quickbooks API Error: {$th->getMessage()}");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user