You are here

public function ProgressTrackerApi::createRecord in TMGMT Translator Smartling 8.4

Same name and namespace in other branches
  1. 8.3 vendor/smartling/api-sdk-php/src/ProgressTracker/ProgressTrackerApi.php \Smartling\ProgressTracker\ProgressTrackerApi::createRecord()

Creates a new record.

Parameters

$spaceId:

$objectId:

RecordParameters $parameters:

Return value

array

Throws

\Smartling\Exceptions\SmartlingApiException

File

vendor/smartling/api-sdk-php/src/ProgressTracker/ProgressTrackerApi.php, line 74

Class

ProgressTrackerApi
Class ProgressTrackerApi

Namespace

Smartling\ProgressTracker

Code

public function createRecord($spaceId, $objectId, RecordParameters $parameters) {
  $requestData = $this
    ->getDefaultRequestData('json', $parameters
    ->exportToArray());
  $endpoint = vsprintf('projects/%s/spaces/%s/objects/%s/records', [
    $this
      ->getProjectId(),
    $spaceId,
    $objectId,
  ]);
  return $this
    ->sendRequest($endpoint, $requestData, static::HTTP_METHOD_POST);
}