Skip to content

Commit

Permalink
fix complete till
Browse files Browse the repository at this point in the history
  • Loading branch information
bessudnov committed Jul 13, 2020
1 parent 4e4c225 commit 5b24667
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/AmoCRM/Models/TaskModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,10 @@ public static function fromArray(array $task): self
$taskModel->setIsCompleted((int)$task['is_completed']);
}

if (array_key_exists('complete_till', $task) && !is_null($task['complete_till'])) {
$taskModel->setCompleteTill((int)$task['complete_till']);
}

if (!empty($task['task_type_id'])) {
$taskModel->setTaskTypeId($task['task_type_id']);
}
Expand Down Expand Up @@ -496,6 +500,7 @@ public function toArray(): array
'entity_type' => $this->getEntityType(),
'entity_id' => $this->getEntityId(),
'is_completed' => $this->getIsCompleted(),
'complete_till' => $this->getCompleteTill(),
'task_type_id' => $this->getTaskTypeId(),
'result' => $this->getResult(),
'account_id' => $this->getAccountId(),
Expand Down

0 comments on commit 5b24667

Please sign in to comment.