diff --git a/src/CrowdinApiClient/Api/ProjectApi.php b/src/CrowdinApiClient/Api/ProjectApi.php
index 214e9c9f..b9ef7700 100644
--- a/src/CrowdinApiClient/Api/ProjectApi.php
+++ b/src/CrowdinApiClient/Api/ProjectApi.php
@@ -69,7 +69,9 @@ public function get(int $projectId): ?Project
* boolean $data[skipUntranslatedStrings]
* boolean $data[skipUntranslatedFiles]
* integer $data[exportWithMinApprovalsCount]
- * integer $data[exportApprovedOnly]
+ * integer $data[exportApprovedOnly]
+ * integer $data[defaultTmId]
+ * integer $data[defaultGlossaryId]
* @return Project|null
*/
public function create(array $data): ?Project
diff --git a/src/CrowdinApiClient/Model/Project.php b/src/CrowdinApiClient/Model/Project.php
index 2d582344..eed35ebf 100644
--- a/src/CrowdinApiClient/Model/Project.php
+++ b/src/CrowdinApiClient/Model/Project.php
@@ -242,6 +242,16 @@ class Project extends BaseModel
*/
protected $notificationSettings = [];
+ /**
+ * @var integer
+ */
+ protected $defaultTmId;
+
+ /**
+ * @var integer
+ */
+ protected $defaultGlossaryId;
+
public function __construct(array $data = [])
{
parent::__construct($data);
@@ -293,6 +303,8 @@ public function __construct(array $data = [])
$this->normalizePlaceholder = (bool)$this->getDataProperty('normalizePlaceholder');
$this->saveMetaInfoInSource = (bool)$this->getDataProperty('saveMetaInfoInSource');
$this->notificationSettings = (array)$this->getDataProperty('notificationSettings');
+ $this->defaultTmId = (integer)$this->getDataProperty('defaultTmId');
+ $this->defaultGlossaryId = (integer)$this->getDataProperty('defaultGlossaryId');
}
/**
@@ -1034,4 +1046,36 @@ public function setNotificationSettings(array $notificationSettings): void
{
$this->notificationSettings = $notificationSettings;
}
+
+ /**
+ * @return int|null
+ */
+ public function getDefaultTmId(): ?int
+ {
+ return $this->defaultTmId;
+ }
+
+ /**
+ * @param int|null $defaultTmId
+ */
+ public function setDefaultTmId(?int $defaultTmId): void
+ {
+ $this->defaultTmId = $defaultTmId;
+ }
+
+ /**
+ * @return int|null
+ */
+ public function getDefaultGlossaryId(): ?int
+ {
+ return $this->defaultGlossaryId;
+ }
+
+ /**
+ * @param int|null $defaultGlossaryId
+ */
+ public function setDefaultGlossaryId(?int $defaultGlossaryId): void
+ {
+ $this->defaultGlossaryId = $defaultGlossaryId;
+ }
}
diff --git a/tests/CrowdinApiClient/Model/ProjectTest.php b/tests/CrowdinApiClient/Model/ProjectTest.php
index d47b541d..c850e508 100644
--- a/tests/CrowdinApiClient/Model/ProjectTest.php
+++ b/tests/CrowdinApiClient/Model/ProjectTest.php
@@ -141,6 +141,8 @@ class ProjectTest extends TestCase
],
'joinPolicy' => null,
'visibility' => null,
+ 'defaultTmId' => 10,
+ 'defaultGlossaryId' => 20,
];
public function testLoadData()
@@ -157,12 +159,16 @@ public function testSetData()
$this->project->setTargetLanguageIds(['uk']);
$this->project->setLanguageAccessPolicy('moderate');
$this->project->setDescription($this->data['description']);
+ $this->project->setDefaultTmId($this->data['defaultTmId']);
+ $this->project->setDefaultGlossaryId($this->data['defaultGlossaryId']);
$this->assertEquals($this->data['name'], $this->project->getName());
$this->assertEquals($this->data['cname'], $this->project->getCname());
$this->assertEquals($this->data['description'], $this->project->getDescription());
$this->assertEquals(['uk'], $this->project->getTargetLanguageIds());
$this->assertEquals('moderate', $this->project->getLanguageAccessPolicy());
+ $this->assertEquals($this->data['defaultTmId'], $this->project->getDefaultTmId());
+ $this->assertEquals($this->data['defaultGlossaryId'], $this->project->getDefaultGlossaryId());
}
public function checkData()
@@ -214,5 +220,7 @@ public function checkData()
$this->assertEquals($this->data['normalizePlaceholder'], $this->project->isNormalizePlaceholder());
$this->assertEquals($this->data['saveMetaInfoInSource'], $this->project->isSaveMetaInfoInSource());
$this->assertEquals($this->data['notificationSettings'], $this->project->getNotificationSettings());
+ $this->assertEquals($this->data['defaultTmId'], $this->project->getDefaultTmId());
+ $this->assertEquals($this->data['defaultGlossaryId'], $this->project->getDefaultGlossaryId());
}
}