You are here

public function JobsApi::cancelJobSync in TMGMT Translator Smartling 8.4

Same name and namespace in other branches
  1. 8.3 vendor/smartling/api-sdk-php/src/Jobs/JobsApi.php \Smartling\Jobs\JobsApi::cancelJobSync()

Cancels a job synchronously.

Parameters

string $jobId:

CancelJobParameters $parameters:

Throws

SmartlingApiException

File

vendor/smartling/api-sdk-php/src/Jobs/JobsApi.php, line 130

Class

JobsApi
Class JobsApi

Namespace

Smartling\Jobs

Code

public function cancelJobSync($jobId, CancelJobParameters $parameters) {
  $endpoint = vsprintf('jobs/%s/cancel', [
    $jobId,
  ]);
  $requestData = $this
    ->getDefaultRequestData('json', $parameters
    ->exportToArray());
  $this
    ->wait($this
    ->sendRequest($endpoint, $requestData, self::HTTP_METHOD_POST));
}