From 3041db3ccaefdcf8f84ad0a6a977f9ffb4cbb6fa Mon Sep 17 00:00:00 2001 From: David Binaud Date: Wed, 30 Aug 2023 16:59:14 +0200 Subject: [PATCH] =?UTF-8?q?:sparkles:=20OptOut=20/=20Query=20par=20num?= =?UTF-8?q?=C3=A9ro=20de=20t=C3=A9l=C3=A9phone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Esendex/OptOutsService.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/Esendex/OptOutsService.php b/src/Esendex/OptOutsService.php index 8df773a..dd9829b 100644 --- a/src/Esendex/OptOutsService.php +++ b/src/Esendex/OptOutsService.php @@ -185,4 +185,24 @@ public function getMyAccountReference($pageNumber = null, $pageSize = null) return $this->parser->parseMultipleResult($xmlResult); } + public function getByFrom(string $from) + { + $uri = Http\UriBuilder::serviceUri( + self::SERVICE_VERSION, + self::SERVICE, + null, + $this->httpClient->isSecure() + ); + + $query = array(); + $query["from"] = $from; + $uri .= "?" . Http\UriBuilder::buildQuery($query); + + $xmlResult = $this->httpClient->get( + $uri, + $this->authentication + ); + return $this->parser->parseMultipleResult($xmlResult); + } + }