From 9c7473f9740faaab868d25d1765fd8434d80c318 Mon Sep 17 00:00:00 2001 From: phamels Date: Wed, 28 Nov 2018 10:16:39 +0100 Subject: [PATCH 1/2] Deliverydate updated to version 2.2 --- src/ComplexTypes/CutOffTime.php | 26 +++++++++++++++++++++++++- src/ComplexTypes/GetDeliveryDate.php | 28 +++++++++++++++++++++++++++- src/DeliveryDateClient.php | 4 ++-- 3 files changed, 54 insertions(+), 4 deletions(-) diff --git a/src/ComplexTypes/CutOffTime.php b/src/ComplexTypes/CutOffTime.php index 945d56b..d89b8a1 100644 --- a/src/ComplexTypes/CutOffTime.php +++ b/src/ComplexTypes/CutOffTime.php @@ -13,14 +13,20 @@ class CutOffTime extends BaseType */ protected $Time = null; + /** + * @var boolean + */ + protected $Available = false; + /** * @param string $Day * @param string $Time */ - public function __construct($Day, $Time) + public function __construct($Day, $Time, $Available) { $this->setDay($Day); $this->setTime($Time); + $this->setAvailable($Available) } /** @@ -58,4 +64,22 @@ public function setTime($Time) $this->Time = $Time; return $this; } + + /** + * @return boolean + */ + public function getAvailable() + { + return $this->Available; + } + + /** + * @param boolean $Available + * @return CutOffTime + */ + public function setAvailable($Available) + { + $this->Available = $Available; + return $this; + } } diff --git a/src/ComplexTypes/GetDeliveryDate.php b/src/ComplexTypes/GetDeliveryDate.php index 7ac4dca..8a1ed1f 100644 --- a/src/ComplexTypes/GetDeliveryDate.php +++ b/src/ComplexTypes/GetDeliveryDate.php @@ -58,6 +58,11 @@ class GetDeliveryDate extends BaseType */ protected $Street = null; + /** + * @var string + */ + protected $OriginCountryCode = null; + /** * @param string $AllowSundaySorting * @param string $City @@ -70,6 +75,7 @@ class GetDeliveryDate extends BaseType * @param string $ShippingDate * @param string $ShippingDuration * @param string $Street + * @param string $OriginCountryCode */ public function __construct( $AllowSundaySorting, @@ -82,7 +88,8 @@ public function __construct( $PostalCode, $ShippingDate, $ShippingDuration, - $Street + $Street, + $OriginCountryCode ) { $this->setAllowSundaySorting($AllowSundaySorting); $this->setCity($City); @@ -95,6 +102,7 @@ public function __construct( $this->setShippingDate($ShippingDate); $this->setShippingDuration($ShippingDuration); $this->setStreet($Street); + $this->setOriginCountryCode($OriginCountryCode); } /** @@ -294,4 +302,22 @@ public function setStreet($Street) $this->Street = $Street; return $this; } + + /** + * @return string + */ + public function getOriginCountryCode() + { + return $this->OriginCountryCode; + } + + /** + * @param string $OriginCountryCode + * @return GetDeliveryDate + */ + public function setOriginCountryCode($OriginCountryCode) + { + $this->OriginCountryCode = $OriginCountryCode; + return $this; + } } diff --git a/src/DeliveryDateClient.php b/src/DeliveryDateClient.php index f5601c1..b24604a 100644 --- a/src/DeliveryDateClient.php +++ b/src/DeliveryDateClient.php @@ -9,12 +9,12 @@ class DeliveryDateClient extends BaseClient /** * @var string The URL of the production WSDL. */ - const PRODUCTION_WSDL = 'https://api.postnl.nl/shipment/v2_1/calculate/date/soap.wsdl'; + const PRODUCTION_WSDL = 'https://api.postnl.nl/shipment/v2_2/calculate/date/soap.wsdl'; /** * @var string The URL of the sandbox WSDL. */ - const SANDBOX_WSDL = 'https://api-sandbox.postnl.nl/shipment/v2_1/calculate/date/soap.wsdl'; + const SANDBOX_WSDL = 'https://api-sandbox.postnl.nl/shipment/v2_2/calculate/date/soap.wsdl'; /** * @var array The complex types used by this client. From f357eddcd234a5da59ac8b21bcf53655a03da518 Mon Sep 17 00:00:00 2001 From: phamels Date: Wed, 28 Nov 2018 10:21:36 +0100 Subject: [PATCH 2/2] Typo --- src/ComplexTypes/CutOffTime.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ComplexTypes/CutOffTime.php b/src/ComplexTypes/CutOffTime.php index d89b8a1..8a6bc7b 100644 --- a/src/ComplexTypes/CutOffTime.php +++ b/src/ComplexTypes/CutOffTime.php @@ -26,7 +26,7 @@ public function __construct($Day, $Time, $Available) { $this->setDay($Day); $this->setTime($Time); - $this->setAvailable($Available) + $this->setAvailable($Available); } /**