From 3f5f2d66cc5536dfbaa6b7e4ebcee1259d683c6d Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 22 Aug 2024 08:18:19 +1000 Subject: [PATCH] Minor fixes --- app/Services/Import/Quickbooks/Contracts/SdkInterface.php | 2 +- app/Services/Import/Quickbooks/SdkWrapper.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Services/Import/Quickbooks/Contracts/SdkInterface.php b/app/Services/Import/Quickbooks/Contracts/SdkInterface.php index 5153a8923e..79320e338d 100644 --- a/app/Services/Import/Quickbooks/Contracts/SdkInterface.php +++ b/app/Services/Import/Quickbooks/Contracts/SdkInterface.php @@ -7,7 +7,7 @@ interface SdkInterface function getAuthorizationUrl(): string; function accessToken(string $code, string $realm): array; function refreshToken(): array; - function getAccessToken(): array; + function getAccessToken(); function getRefreshToken(): array; function totalRecords(string $entity): int; function fetchRecords(string $entity, int $max): array; diff --git a/app/Services/Import/Quickbooks/SdkWrapper.php b/app/Services/Import/Quickbooks/SdkWrapper.php index 8c73e44a51..6da25e476b 100644 --- a/app/Services/Import/Quickbooks/SdkWrapper.php +++ b/app/Services/Import/Quickbooks/SdkWrapper.php @@ -49,7 +49,7 @@ final class SdkWrapper implements QuickbooksInterface $token =($this->sdk->getOAuth2LoginHelper())->getAccessToken(); return $token; - + // $access_token = $token->getAccessToken(); // $refresh_token = $token->getRefreshToken(); // $access_token_expires = $token->getAccessTokenExpiresAt(); @@ -99,7 +99,7 @@ final class SdkWrapper implements QuickbooksInterface $records = array_merge($records,$recordsChunk); $start += $limit; } while ($start < $total); - if(empty($records)) throw new \Exceptions("No records retrieved!"); + if(empty($records)) throw new \Exception("No records retrieved!"); } catch (\Throwable $th) { nlog("Fetch Quickbooks API Error: {$th->getMessage()}");