diff --git a/src/AmoCRM/Filters/EventsFilter.php b/src/AmoCRM/Filters/EventsFilter.php index 7fb4c095..7d9ade83 100755 --- a/src/AmoCRM/Filters/EventsFilter.php +++ b/src/AmoCRM/Filters/EventsFilter.php @@ -162,12 +162,7 @@ public function getCreatedAt() */ public function setCreatedAt($createdAt) { - //todo support for range filter - if (!is_array($createdAt)) { - $createdAt = [$createdAt]; - } - - $this->createdAt = $createdAt; + $this->createdAt = $this->parseIntOrIntRangeFilter($createdAt); return $this; } @@ -242,7 +237,7 @@ public function buildFilter(): array } if (!is_null($this->getCreatedAt())) { - $filter['filter']['created_at'] = implode(',', $this->getCreatedAt()); + $filter['filter']['created_at'] = $this->getCreatedAt(); } if (!is_null($this->getEntityIds())) {