From c01291b5bc628195dd2b4ce0c73574b9104c2bb8 Mon Sep 17 00:00:00 2001 From: Timo Janssrn Date: Mon, 7 May 2018 15:18:41 +0200 Subject: [PATCH] Removed limit as required field --- src/Wuunder/Api/Config/ParcelshopsConfig.php | 6 ++---- src/Wuunder/Model/Model.php | 1 + tests/test.php | 5 ++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Wuunder/Api/Config/ParcelshopsConfig.php b/src/Wuunder/Api/Config/ParcelshopsConfig.php index 2b012f2..2803b26 100644 --- a/src/Wuunder/Api/Config/ParcelshopsConfig.php +++ b/src/Wuunder/Api/Config/ParcelshopsConfig.php @@ -11,13 +11,11 @@ public function __construct() parent::__construct(); $this->requiredFields = array( "providers", - "address", - "limit", + "address" ); $this->fieldTypes = array( "providers" => "list", - "address" => "string", - "limit" => "integer" + "address" => "string" ); } diff --git a/src/Wuunder/Model/Model.php b/src/Wuunder/Model/Model.php index fbe882f..06e84d7 100644 --- a/src/Wuunder/Model/Model.php +++ b/src/Wuunder/Model/Model.php @@ -8,6 +8,7 @@ class Model implements \JsonSerializable { private $keys; protected $data; + protected $helper; protected static $_underscoreCache = []; public function __construct() diff --git a/tests/test.php b/tests/test.php index 52910d5..e2212f2 100644 --- a/tests/test.php +++ b/tests/test.php @@ -17,7 +17,6 @@ $connector = new Wuunder\Connector("YVc7rKdM6e6Q_HQK81NCt7SM0LT0TtQB"); - $parcelshopRequest = $connector->getParcelshopById(); $parcelshopConfig = new \Wuunder\Api\Config\ParcelshopConfig(); @@ -27,7 +26,7 @@ $parcelshopRequest->setConfig($parcelshopConfig); if ($parcelshopRequest->fire()) { - var_dump($parcelshopRequest->getParcelshopResponse()->getParcelshopData()); + var_dump(json_encode($parcelshopRequest->getParcelshopResponse()->getParcelshopData())); } else { var_dump($parcelshopRequest->getParcelshopResponse()->getError()); } @@ -48,7 +47,7 @@ $parcelshopsRequest->setConfig($parcelshopsConfig); if ($parcelshopsRequest->fire()) { - var_dump($parcelshopsRequest->getParcelshopsResponse()->getParcelshopsData()); + var_dump(json_encode($parcelshopsRequest->getParcelshopsResponse()->getParcelshopsData())); } else { var_dump($parcelshopsRequest->getParcelshopsResponse()->getError()); }