diff --git a/src/Operation/Shops/Orders/GetOrders/GetOrdersSearchQuery.php b/src/Operation/Shops/Orders/GetOrders/GetOrdersSearchQuery.php index 635efe1..590b516 100644 --- a/src/Operation/Shops/Orders/GetOrders/GetOrdersSearchQuery.php +++ b/src/Operation/Shops/Orders/GetOrders/GetOrdersSearchQuery.php @@ -14,6 +14,7 @@ public function getAllowedKeys() 'description', 'status', 'externalId', + 'processedAt' ]; } @@ -49,4 +50,25 @@ public function whereExternalId($externalId) { return $this->set('externalId', $externalId); } + + /** + * @param string|null $from + * @param string|null $to + * @return $this + * @throws \InvalidArgumentException + */ + public function whereProcessedAt(string|null $from = null, string|null $to = null) + { + $processedAt = []; + + if ($from !== null) { + $processedAt['from'] = $from; + } + + if ($to !== null) { + $processedAt['to'] = $to; + } + + return $this->set('processedAt', $processedAt); + } }