From 545e0fded780095bce7dce8345ea40f67f37edf7 Mon Sep 17 00:00:00 2001 From: Abdal Asif Date: Thu, 6 Aug 2026 00:44:15 +0500 Subject: [PATCH] Add processedAt query field in allowed key and its setter --- .../Orders/GetOrders/GetOrdersSearchQuery.php | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) 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); + } }