From 7d2ee25ffe7a024b69ba291f7be6304ef00e90cd Mon Sep 17 00:00:00 2001 From: Uryvskiy Dima Date: Fri, 2 Aug 2024 15:14:59 +0300 Subject: [PATCH] Add site --- lib/RetailCrm/Methods/V5/Orders.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/RetailCrm/Methods/V5/Orders.php b/lib/RetailCrm/Methods/V5/Orders.php index 8ec1b92..7ca9af7 100644 --- a/lib/RetailCrm/Methods/V5/Orders.php +++ b/lib/RetailCrm/Methods/V5/Orders.php @@ -203,10 +203,11 @@ trait Orders * Create links between orders * * @param array $links links data + * @param null $site site code * * @return ApiResponse */ - public function ordersLinksCreate(array $links) + public function ordersLinksCreate(array $links, $site = null) { if (!count($links)) { throw new \InvalidArgumentException( @@ -218,7 +219,10 @@ trait Orders return $this->client->makeRequest( '/orders/links/create', 'POST', - $links + $this->fillSite( + $site, + ['links' => json_encode($links)] + ) ); } }