public function FedExRequest::getVersion in Commerce FedEx 8
Return the current WSDL version of a service.
Parameters
string $service: The service.
Return value
mixed The current version.
Throws
\Exception
Overrides FedExRequestInterface::getVersion
File
- src/
FedExRequest.php, line 158
Class
- FedExRequest
- Manage FedEx API services.
Namespace
Drupal\commerce_fedexCode
public function getVersion($service) {
$class = '\\NicholasCreativeMedia\\FedExPHP\\Services\\' . $service;
if (!class_exists($class)) {
throw new \Exception("Service {$class} not found");
}
/** @var \NicholasCreativeMedia\FedExPHP\Services\FedExService $class */
return $class::version();
}