From 6bbf3e105b2d276ef1b9e61edf44636d7fba826a Mon Sep 17 00:00:00 2001 From: arnausaima <80773312+arnausaima@users.noreply.github.com> Date: Fri, 4 Jul 2025 09:40:13 +0000 Subject: [PATCH 1/2] API URL editable for constructor --- src/Picqer/Carriers/SendCloud/Connection.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Picqer/Carriers/SendCloud/Connection.php b/src/Picqer/Carriers/SendCloud/Connection.php index ca60fa4..3acdd61 100644 --- a/src/Picqer/Carriers/SendCloud/Connection.php +++ b/src/Picqer/Carriers/SendCloud/Connection.php @@ -9,7 +9,7 @@ class Connection { - private string $apiUrl = 'https://panel.sendcloud.sc/api/v2/'; + private string $apiUrl; private string $apiKey; private string $apiSecret; private ?string $partnerId = null; @@ -18,11 +18,12 @@ class Connection private ?Client $client = null; protected array $middleWares = []; - public function __construct(string $apiKey, string $apiSecret, ?string $partnerId = null) + public function __construct(string $apiKey, string $apiSecret, ?string $partnerId = null, $apiUrl = 'https://panel.sendcloud.sc/api/v2/') { $this->apiKey = $apiKey; $this->apiSecret = $apiSecret; $this->partnerId = $partnerId; + $this->apiUrl = $apiUrl; } public function client(): Client From 66dea66f161dba2226681ded8b29489db8adf429 Mon Sep 17 00:00:00 2001 From: arnausaima <80773312+arnausaima@users.noreply.github.com> Date: Fri, 4 Jul 2025 09:49:32 +0000 Subject: [PATCH 2/2] Param order --- src/Picqer/Carriers/SendCloud/Connection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Picqer/Carriers/SendCloud/Connection.php b/src/Picqer/Carriers/SendCloud/Connection.php index 3acdd61..904cf8b 100644 --- a/src/Picqer/Carriers/SendCloud/Connection.php +++ b/src/Picqer/Carriers/SendCloud/Connection.php @@ -20,10 +20,10 @@ class Connection public function __construct(string $apiKey, string $apiSecret, ?string $partnerId = null, $apiUrl = 'https://panel.sendcloud.sc/api/v2/') { + $this->apiUrl = $apiUrl; $this->apiKey = $apiKey; $this->apiSecret = $apiSecret; $this->partnerId = $partnerId; - $this->apiUrl = $apiUrl; } public function client(): Client