You are here

public function RestClient::getApiVersion in Salesforce Suite 8.3

Wrapper for config rest_api_version.version.

Return value

string The SF API version.

Overrides RestClientInterface::getApiVersion

Deprecated

in 8.x-4.0, use \Drupal\salesforce\SalesforceAuthProviderInterface::getApiVersion instead.

1 call to RestClient::getApiVersion()
RestClient::getApiEndPoint in src/Rest/RestClient.php
Get the API end point for a given type of the API.

File

src/Rest/RestClient.php, line 361

Class

RestClient
Objects, properties, and methods to communicate with the Salesforce REST API.

Namespace

Drupal\salesforce\Rest

Code

public function getApiVersion() {
  if ($this->immutableConfig
    ->get('use_latest')) {
    $versions = $this
      ->getVersions();
    $version = end($versions);
    return $version['version'];
  }
  return $this->immutableConfig
    ->get('rest_api_version.version');
}