From 8b37fdbdca50db8e4245faa4b44ffe5ce571b4b9 Mon Sep 17 00:00:00 2001 From: Uryvskiy Dima Date: Fri, 2 Aug 2024 14:41:52 +0300 Subject: [PATCH] Add a method to create links between orders --- lib/RetailCrm/Methods/V5/Orders.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/RetailCrm/Methods/V5/Orders.php b/lib/RetailCrm/Methods/V5/Orders.php index c442cbd..d603904 100644 --- a/lib/RetailCrm/Methods/V5/Orders.php +++ b/lib/RetailCrm/Methods/V5/Orders.php @@ -197,4 +197,20 @@ trait Orders ) ); } + + public function ordersLinksCreate(array $links) + { + if (!count($links)) { + throw new \InvalidArgumentException( + 'Parameters `links` must contains a data' + ); + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + '/orders/links/create', + 'POST', + $links + ); + } }