Skip to content

Commit

Permalink
Client knows if it has been configured
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Lundbøl committed Feb 26, 2019
1 parent e38d7c3 commit 0929cd9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
use Napp\Salesforce\Exceptions\AuthenticationException;
use Napp\Salesforce\Exceptions\RequestException;

/**
* Class Client
* @package Napp\Salesforce
*/
class Client
{
/**
Expand Down Expand Up @@ -410,4 +414,12 @@ private function generateUrl(string $append): string
{
return $this->baseUrl . '/services/data/' . $this->clientConfig->getVersion() . '/' . $append;
}

/**
* @return bool
*/
public function isConfigured(): bool
{
return $this->clientConfig->isFullyConfigured();
}
}
9 changes: 9 additions & 0 deletions src/ClientConfigInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

namespace Napp\Salesforce;

/**
* Interface ClientConfigInterface
* @package Napp\Salesforce
*/
interface ClientConfigInterface
{
/**
Expand All @@ -24,4 +28,9 @@ public function getClientSecret(): string;
* @return string
*/
public function getVersion(): string;

/**
* @return bool
*/
public function isFullyConfigured(): bool;
}

0 comments on commit 0929cd9

Please sign in to comment.