From bdc003c1e3e7491f525174ad8090fbf3b86b6bfb Mon Sep 17 00:00:00 2001 From: Kevin Thrailkill Date: Mon, 3 May 2021 15:24:53 -0700 Subject: [PATCH] Fixed missing import in salesforce rest client --- src/Rest/OAuthRestClient.php | 4 ++-- src/Rest/RestClientInterface.php | 2 +- src/Rest/SalesforceRestClient.php | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Rest/OAuthRestClient.php b/src/Rest/OAuthRestClient.php index 3b2a379..0186665 100644 --- a/src/Rest/OAuthRestClient.php +++ b/src/Rest/OAuthRestClient.php @@ -100,7 +100,7 @@ public function patchJson( ); } - public function refreshToken(): OAuthAccessToken + public function refreshToken(): ?OAuthAccessToken { $refreshToken = $this->oAuthAccessToken->getRefreshToken(); $refreshedToken = $this->getRefreshToken($refreshToken); @@ -108,7 +108,7 @@ public function refreshToken(): OAuthAccessToken return $refreshedToken; } - + private function setParamsFromAccessToken(): void { $this->apiRestClient->setBaseUriForRestClient($this->getOAuthAccessToken()->getInstanceUrl()); diff --git a/src/Rest/RestClientInterface.php b/src/Rest/RestClientInterface.php index 2cb9cc0..673b764 100644 --- a/src/Rest/RestClientInterface.php +++ b/src/Rest/RestClientInterface.php @@ -33,5 +33,5 @@ public function patchJson( ?float $timeoutSeconds = null ): ResponseInterface; - public function refreshToken(): OAuthAccessToken; + public function refreshToken(): ?OAuthAccessToken; } diff --git a/src/Rest/SalesforceRestClient.php b/src/Rest/SalesforceRestClient.php index 54ed336..0d60043 100644 --- a/src/Rest/SalesforceRestClient.php +++ b/src/Rest/SalesforceRestClient.php @@ -105,4 +105,9 @@ private function constructUrl(string $endpoint): string return '/services/data/' . $this->apiVersion . '/' . $endpoint; } + + public function refreshToken(): ?OAuthAccessToken + { + return null; + } }