diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..4bc4548 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +wsdltophp.phar +vendor +composer.lock diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100755 index 0000000..d2faa21 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,4 @@ +# CHANGELOG + +## 0.0.1 +- Initial version diff --git a/LICENSE b/LICENSE new file mode 100755 index 0000000..b039f63 --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015 WsdlToPhp + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100755 index 0000000..1972583 --- /dev/null +++ b/README.md @@ -0,0 +1,58 @@ +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/WsdlToPhp/PackageColissimoPostage/badges/quality-score.png?b=develop)](https://scrutinizer-ci.com/g/WsdlToPhp/PackageColissimoPostage/?branch=develop) +[![Latest Stable Version](https://poser.pugx.org/wsdltophp/package-colissimo-postage/v/stable)](https://packagist.org/packages/wsdltophp/package-colissimo-postage) +[![Dependency Status](https://www.versioneye.com/user/projects/56e426e4df573d003a5f5e9f/badge.svg?style=flat)](https://www.versioneye.com/user/projects/56e426e4df573d003a5f5e9f) +[![StyleCI](https://styleci.io/repos/53735115/shield)](https://styleci.io/repos/53735115) +[![Total Downloads](https://poser.pugx.org/wsdltophp/package-colissimo-postage/downloads)](https://packagist.org/packages/wsdltophp/package-colissimo-postage) + +# PackageColissimoPostage +This package has been generated from the [Colissimo Postage Web Services](https://ws.colissimo.fr/sls-ws/SlsServiceWS?wsdl) WSDL using the [PackageGenerator](https://github.com/WsdlToPhp/PackageGenerator) project. + +# Summary +- [Generating again the package](#generating-again-the-package) +- [How to use the generated package?](#how-to-use-the-generated-package) + - [Install the project](#install-the-project) + - [Learn from the tutorial](#learn-from-the-tutorial) + - [Start from the samples](#start-from-the-samples) + - [GetServerTimeZones](samples/GetServerTimeZones.php) +- [Need support or having a question?](#need-support-or-having-a-question) + +# Generating again the package +You can generate again the package's sources using the [generate.sh](generate.sh) script: +```bash +$ git clone https://github.com/WsdlToPhp/PackageColissimoPostage.git package-colissimo-postage +$ cd package-colissimo-postage +$ ./generate.sh +``` +After generating the package, don't forget to edit the generated [composer.json](composer.json) file in order to update the psr-4 autoloading: +```json +"psr-4": { + "ColissimoPostage\\": "./src/", + "SoapClient\\": "./SoapClient/" +} +``` +Then run: +```bash +$ composer update +``` + To learn how to customize the generated package, please read the PackageGenerator's [README](https://github.com/WsdlToPhp/PackageGenerator/blob/master/README.md). + +# How to use the generated package? + +## Install the project +```bash +$ git clone https://github.com/WsdlToPhp/PackageColissimoPostage.git package-colissimo-postage +$ cd package-colissimo-postage +$ composer update +``` + +## Learn from the tutorial +Start looking into the auto-generated [tutorial.php](tutorial.php) file. This file contains the starting code to use this package. In addition it contains all the operations provided by the Exchange Web Services and the way to call them. + +## Start from the samples +Sample scripts are available under the [samples](samples) folder: + +- [GenerateLabel](samples/GenerateLabel.php) +- [GetProductInter](samples/GetProductInter.php) + +# Need support or having a question? +We can help you understand how to use it and how to customize it. Feel free to contact us at contact@wsdltophp.com. \ No newline at end of file diff --git a/SoapClient/SoapClient.php b/SoapClient/SoapClient.php new file mode 100755 index 0000000..68cc186 --- /dev/null +++ b/SoapClient/SoapClient.php @@ -0,0 +1,48 @@ +lastRequest = $request, $location, $action, $version, $oneWay); + /** + * So we only keep the XML envelope + */ + $response = substr($response, strpos($response, '') - strpos($response, '')); + return '' . trim($response); + } + /** + * Override it in order to return the final XML Request + * @see SoapClient::__getLastRequest() + * @return string + */ + public function __getLastRequest() + { + return $this->lastRequest; + } +} diff --git a/SoapClient/SoapClientBase.php b/SoapClient/SoapClientBase.php new file mode 100755 index 0000000..f4a1d2f --- /dev/null +++ b/SoapClient/SoapClientBase.php @@ -0,0 +1,29 @@ +=5.3.3", + "ext-soap": "*", + "wsdltophp/packagebase": "dev-master" + }, + "autoload": { + "psr-4": { + "ColissimoPostage\\": "./src/", + "SoapClient\\": "./SoapClient/" + } + } +} diff --git a/generate.sh b/generate.sh new file mode 100755 index 0000000..ee916aa --- /dev/null +++ b/generate.sh @@ -0,0 +1,33 @@ +# get the latest wsdltophp.phar +if [ ! -f wsdltophp.phar ]; then + echo "Download wsdltophp.phar once"; + wget https://phar.wsdltophp.com/wsdltophp.phar; +fi + +# get current folder +DEST=`pwd`; + +# clean current folder +rm -rf $DEST/src/ \ + $DEST/tutorial.php \ + $DEST/composer.json \ + $DEST/composer.lock; + +# package informations +php wsdltophp.phar generate:package \ + --urlorpath="https://ws.colissimo.fr/sls-ws/SlsServiceWS?wsdl" \ + --destination=$DEST \ + --composer-name="wsdltophp/package-colissimo-postage" \ + --addcomments="author:WsdlToPhp " \ + --soapclient="\SoapClient\SoapClientBase" \ + --namespace="ColissimoPostage"; + +# generate package +php wsdltophp.phar generate:package \ + --urlorpath="https://ws.colissimo.fr/sls-ws/SlsServiceWS?wsdl" \ + --destination=$DEST \ + --composer-name="wsdltophp/package-colissimo-postage" \ + --addcomments="author:WsdlToPhp " \ + --soapclient="\SoapClient\SoapClientBase" \ + --namespace="ColissimoPostage" \ + --force; \ No newline at end of file diff --git a/samples/GenerateLabel.php b/samples/GenerateLabel.php new file mode 100755 index 0000000..f5bbac9 --- /dev/null +++ b/samples/GenerateLabel.php @@ -0,0 +1,98 @@ + 'https://ws.colissimo.fr/sls-ws/SlsServiceWS?wsdl', + AbstractSoapClientBase::WSDL_CLASSMAP => ClassMap::get() +); +/** + * Samples for Generate ServiceType + */ +$generate = new Generate($options); +/** + * Send the request + */ +$result = $generate->generateLabel( + new GenerateLabel( + new GenerateLabelRequest( + COLISSIMO_WS_CONTRACT_NUMBER, + COLISSIMO_WS_PASSWORD, + new OutputFormat(0, 0, 'PDF_A4_300dpi', true, ''), + new Letter( + new Service('A2P', date('Y-m-d', strtotime('next monday')), false, null, null, null, null, 1040, 1222, '123465', 'MONSITE.COM', 2), + new Parcel(null, null, 15000, null, '1', false, null, null, null, 'Remettre au gardien', '005727', null), + new CustomsDeclarations( + 1, + new Contents(array( + new Article('Produit neuf', 1, 1, 1500, '0102', 'FR') + ), + new Category(2) + ) + ), + new Sender( + 'refsenderXXX', + new Address('sender company', 'Jean', 'Dupont', 'etag 00', 'entrée', 'ligne principale', 'lieu dit', 'FR', 'PARIS', '75001', '0102030405', '0708090102', '0054', '88FF', 'foo@bar.com', 'FFFF', 'FR') + ), + new Addressee( + '123456', + false, + 'service info', + null, + new Address('sender company', 'Jean', 'Dupont', 'etag 00', 'entrée', 'ligne principale', 'lieu dit', 'FR', 'PARIS', '75001', '0102030405', '0708090102', '0054', '88FF', 'foo@bar.com', 'FFFF', 'FR') + ) + ) + ) + ) +); +/** + * Debug informations provided by the utility methods + */ +if (true) { + echo 'XML Request: ' . $generate->getLastRequest() . "\r\n"; + echo 'Headers Request: ' . $generate->getLastRequestHeaders() . "\r\n"; + echo 'XML Response: ' . $generate->getLastResponse() . "\r\n"; + echo 'Headers Response: ' . $generate->getLastResponseHeaders() . "\r\n"; +} +/** + * Sample call for getProductInter operation/method + */ +if ($generate->getLastResponse(true) instanceof \DOMDocument) { + echo PHP_EOL . 'PDF url: ' . $generate->getLastResponse(true) + ->getElementsByTagName('pdfUrl') + ->item(0)->nodeValue . PHP_EOL; +} else { + echo PHP_EOL . 'An error occurred: ' . $generate->getLastErrorForMethod('ColissimoPostage\ServiceType\Generate::generateLabel')->getMessage() . PHP_EOL; +} diff --git a/samples/GetProductInter.php b/samples/GetProductInter.php new file mode 100755 index 0000000..7ff9e23 --- /dev/null +++ b/samples/GetProductInter.php @@ -0,0 +1,56 @@ + 'https://ws.colissimo.fr/sls-ws/SlsServiceWS?wsdl', + AbstractSoapClientBase::WSDL_CLASSMAP => ClassMap::get() +); +/** + * Samples for Get ServiceType + */ +$get = new Get($options); +/** + * Send the request + */ +$result = $get->getProductInter(new GetProductInter(new GetProductInterRequest(COLISSIMO_WS_CONTRACT_NUMBER, COLISSIMO_WS_PASSWORD, 'COLI', 0, 0, 1, 'DZ', '2000'))); +/** + * Debug informations provided by the utility methods + */ +if (false) { + echo 'XML Request: ' . $get->getLastRequest() . "\r\n"; + echo 'Headers Request: ' . $get->getLastRequestHeaders() . "\r\n"; + echo 'XML Response: ' . $get->getLastResponse() . "\r\n"; + echo 'Headers Response: ' . $get->getLastResponseHeaders() . "\r\n"; +} +/** + * Sample call for getProductInter operation/method + */ +if ($result !== false) { + echo sprintf('Product: %s', implode(',', $result->getReturn()->getProduct())) . PHP_EOL; + echo sprintf('PartnerType: %s', $result->getReturn()->getPartnerType()) . PHP_EOL; + echo sprintf('ReturnTypeChoice: %s', implode(', ', $result->getReturn()->getReturnTypeChoice())) . PHP_EOL; + echo sprintf('Message: %s', array_shift($result->getReturn()->getMessages())->getMessageContent()) . PHP_EOL; +} else { + print_r($get->getLastError()); +} diff --git a/src/ClassMap.php b/src/ClassMap.php new file mode 100644 index 0000000..1f705e6 --- /dev/null +++ b/src/ClassMap.php @@ -0,0 +1,69 @@ + 'ColissimoPostage\StructType\GenerateLabelRequestType', + 'outputFormat' => 'ColissimoPostage\StructType\OutputFormat', + 'letter' => 'ColissimoPostage\StructType\Letter', + 'service' => 'ColissimoPostage\StructType\Service', + 'parcel' => 'ColissimoPostage\StructType\Parcel', + 'customsDeclarations' => 'ColissimoPostage\StructType\CustomsDeclarations', + 'contents' => 'ColissimoPostage\StructType\Contents', + 'article' => 'ColissimoPostage\StructType\Article', + 'category' => 'ColissimoPostage\StructType\Category', + 'sender' => 'ColissimoPostage\StructType\Sender', + 'address' => 'ColissimoPostage\StructType\Address', + 'addressee' => 'ColissimoPostage\StructType\Addressee', + 'fields' => 'ColissimoPostage\StructType\Fields', + 'field' => 'ColissimoPostage\StructType\Field', + 'GetListMailBoxPickingDatesRetourRequestType' => 'ColissimoPostage\StructType\GetListMailBoxPickingDatesRetourRequestType', + 'GetProductInterRequestType' => 'ColissimoPostage\StructType\GetProductInterRequestType', + 'planPickupRequestType' => 'ColissimoPostage\StructType\PlanPickupRequestType', + 'generateLabel' => 'ColissimoPostage\StructType\GenerateLabel', + 'generateLabelRequest' => 'ColissimoPostage\StructType\GenerateLabelRequest', + 'generateLabelResponse' => 'ColissimoPostage\StructType\GenerateLabelResponse', + 'GenerateLabelResponseType' => 'ColissimoPostage\StructType\GenerateLabelResponseType', + 'baseResponse' => 'ColissimoPostage\StructType\BaseResponse', + 'xmlResponse' => 'ColissimoPostage\StructType\XmlResponse', + 'belgiumLabel' => 'ColissimoPostage\StructType\BelgiumLabel', + 'codeVAS' => 'ColissimoPostage\StructType\CodeVAS', + 'returnAddressBelgium' => 'ColissimoPostage\StructType\ReturnAddressBelgium', + 'pickupLocation' => 'ColissimoPostage\StructType\PickupLocation', + 'addressPickupLocation' => 'ColissimoPostage\StructType\AddressPickupLocation', + 'routing' => 'ColissimoPostage\StructType\Routing', + 'site' => 'ColissimoPostage\StructType\Site', + 'addressPCH' => 'ColissimoPostage\StructType\AddressPCH', + 'zoneRouting' => 'ColissimoPostage\StructType\ZoneRouting', + 'zoneCABRoutage' => 'ColissimoPostage\StructType\ZoneCABRoutage', + 'zoneInfosRoutage' => 'ColissimoPostage\StructType\ZoneInfosRoutage', + 'labelResponse' => 'ColissimoPostage\StructType\LabelResponse', + 'Message' => 'ColissimoPostage\StructType\Message', + 'planPickup' => 'ColissimoPostage\StructType\PlanPickup', + 'planPickupRequest' => 'ColissimoPostage\StructType\PlanPickupRequest', + 'planPickupResponse' => 'ColissimoPostage\StructType\PlanPickupResponse', + 'planPickupResponseType' => 'ColissimoPostage\StructType\PlanPickupResponseType', + 'getListMailBoxPickingDates' => 'ColissimoPostage\StructType\GetListMailBoxPickingDates', + 'getListMailBoxPickingDatesRetourRequest' => 'ColissimoPostage\StructType\GetListMailBoxPickingDatesRetourRequest', + 'getListMailBoxPickingDatesResponse' => 'ColissimoPostage\StructType\GetListMailBoxPickingDatesResponse', + 'GetListMailBoxPickingDatesResponseType' => 'ColissimoPostage\StructType\GetListMailBoxPickingDatesResponseType', + 'getProductInter' => 'ColissimoPostage\StructType\GetProductInter', + 'getProductInterRequest' => 'ColissimoPostage\StructType\GetProductInterRequest', + 'getProductInterResponse' => 'ColissimoPostage\StructType\GetProductInterResponse', + 'GetProductInterResponseType' => 'ColissimoPostage\StructType\GetProductInterResponseType', + ); + } +} diff --git a/src/ServiceType/Generate.php b/src/ServiceType/Generate.php new file mode 100644 index 0000000..ca51f4c --- /dev/null +++ b/src/ServiceType/Generate.php @@ -0,0 +1,50 @@ + + */ +class Generate extends SoapClientBase +{ + /** + * Method to call the operation originally named generateLabel + * @uses SoapClientBase::getSoapClient() + * @uses SoapClientBase::setResult() + * @uses SoapClientBase::getResult() + * @uses SoapClientBase::saveLastError() + * @param \ColissimoPostage\StructType\GenerateLabel $parameters + * @return \ColissimoPostage\StructType\GenerateLabelResponse|bool + */ + public function generateLabel(\ColissimoPostage\StructType\GenerateLabel $parameters) + { + try { + $this->setResult(self::getSoapClient()->generateLabel($parameters)); + return $this->getResult(); + } catch (\SoapFault $soapFault) { + $this->saveLastError(__METHOD__, $soapFault); + return false; + } + } + /** + * Returns the result + * @see SoapClientBase::getResult() + * @return \ColissimoPostage\StructType\GenerateLabelResponse + */ + public function getResult() + { + return parent::getResult(); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/ServiceType/Get.php b/src/ServiceType/Get.php new file mode 100644 index 0000000..04ab17d --- /dev/null +++ b/src/ServiceType/Get.php @@ -0,0 +1,69 @@ + + */ +class Get extends SoapClientBase +{ + /** + * Method to call the operation originally named getListMailBoxPickingDates + * @uses SoapClientBase::getSoapClient() + * @uses SoapClientBase::setResult() + * @uses SoapClientBase::getResult() + * @uses SoapClientBase::saveLastError() + * @param \ColissimoPostage\StructType\GetListMailBoxPickingDates $parameters + * @return \ColissimoPostage\StructType\GetListMailBoxPickingDatesResponse|bool + */ + public function getListMailBoxPickingDates(\ColissimoPostage\StructType\GetListMailBoxPickingDates $parameters) + { + try { + $this->setResult(self::getSoapClient()->getListMailBoxPickingDates($parameters)); + return $this->getResult(); + } catch (\SoapFault $soapFault) { + $this->saveLastError(__METHOD__, $soapFault); + return false; + } + } + /** + * Method to call the operation originally named getProductInter + * @uses SoapClientBase::getSoapClient() + * @uses SoapClientBase::setResult() + * @uses SoapClientBase::getResult() + * @uses SoapClientBase::saveLastError() + * @param \ColissimoPostage\StructType\GetProductInter $parameters + * @return \ColissimoPostage\StructType\GetProductInterResponse|bool + */ + public function getProductInter(\ColissimoPostage\StructType\GetProductInter $parameters) + { + try { + $this->setResult(self::getSoapClient()->getProductInter($parameters)); + return $this->getResult(); + } catch (\SoapFault $soapFault) { + $this->saveLastError(__METHOD__, $soapFault); + return false; + } + } + /** + * Returns the result + * @see SoapClientBase::getResult() + * @return \ColissimoPostage\StructType\GetListMailBoxPickingDatesResponse|\ColissimoPostage\StructType\GetProductInterResponse + */ + public function getResult() + { + return parent::getResult(); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/ServiceType/Plan.php b/src/ServiceType/Plan.php new file mode 100644 index 0000000..bb9199b --- /dev/null +++ b/src/ServiceType/Plan.php @@ -0,0 +1,50 @@ + + */ +class Plan extends SoapClientBase +{ + /** + * Method to call the operation originally named planPickup + * @uses SoapClientBase::getSoapClient() + * @uses SoapClientBase::setResult() + * @uses SoapClientBase::getResult() + * @uses SoapClientBase::saveLastError() + * @param \ColissimoPostage\StructType\PlanPickup $parameters + * @return \ColissimoPostage\StructType\PlanPickupResponse|bool + */ + public function planPickup(\ColissimoPostage\StructType\PlanPickup $parameters) + { + try { + $this->setResult(self::getSoapClient()->planPickup($parameters)); + return $this->getResult(); + } catch (\SoapFault $soapFault) { + $this->saveLastError(__METHOD__, $soapFault); + return false; + } + } + /** + * Returns the result + * @see SoapClientBase::getResult() + * @return \ColissimoPostage\StructType\PlanPickupResponse + */ + public function getResult() + { + return parent::getResult(); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/Address.php b/src/StructType/Address.php new file mode 100644 index 0000000..73c4c7a --- /dev/null +++ b/src/StructType/Address.php @@ -0,0 +1,585 @@ + + */ +class Address extends AbstractStructBase +{ + /** + * The companyName + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $companyName; + /** + * The lastName + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $lastName; + /** + * The firstName + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $firstName; + /** + * The line0 + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $line0; + /** + * The line1 + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $line1; + /** + * The line2 + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $line2; + /** + * The line3 + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $line3; + /** + * The countryCode + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $countryCode; + /** + * The city + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $city; + /** + * The zipCode + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $zipCode; + /** + * The phoneNumber + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $phoneNumber; + /** + * The mobileNumber + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $mobileNumber; + /** + * The doorCode1 + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $doorCode1; + /** + * The doorCode2 + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $doorCode2; + /** + * The email + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $email; + /** + * The intercom + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $intercom; + /** + * The language + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $language; + /** + * Constructor method for address + * @uses Address::setCompanyName() + * @uses Address::setLastName() + * @uses Address::setFirstName() + * @uses Address::setLine0() + * @uses Address::setLine1() + * @uses Address::setLine2() + * @uses Address::setLine3() + * @uses Address::setCountryCode() + * @uses Address::setCity() + * @uses Address::setZipCode() + * @uses Address::setPhoneNumber() + * @uses Address::setMobileNumber() + * @uses Address::setDoorCode1() + * @uses Address::setDoorCode2() + * @uses Address::setEmail() + * @uses Address::setIntercom() + * @uses Address::setLanguage() + * @param string $companyName + * @param string $lastName + * @param string $firstName + * @param string $line0 + * @param string $line1 + * @param string $line2 + * @param string $line3 + * @param string $countryCode + * @param string $city + * @param string $zipCode + * @param string $phoneNumber + * @param string $mobileNumber + * @param string $doorCode1 + * @param string $doorCode2 + * @param string $email + * @param string $intercom + * @param string $language + */ + public function __construct($companyName = null, $lastName = null, $firstName = null, $line0 = null, $line1 = null, $line2 = null, $line3 = null, $countryCode = null, $city = null, $zipCode = null, $phoneNumber = null, $mobileNumber = null, $doorCode1 = null, $doorCode2 = null, $email = null, $intercom = null, $language = null) + { + $this + ->setCompanyName($companyName) + ->setLastName($lastName) + ->setFirstName($firstName) + ->setLine0($line0) + ->setLine1($line1) + ->setLine2($line2) + ->setLine3($line3) + ->setCountryCode($countryCode) + ->setCity($city) + ->setZipCode($zipCode) + ->setPhoneNumber($phoneNumber) + ->setMobileNumber($mobileNumber) + ->setDoorCode1($doorCode1) + ->setDoorCode2($doorCode2) + ->setEmail($email) + ->setIntercom($intercom) + ->setLanguage($language); + } + /** + * Get companyName value + * @return string|null + */ + public function getCompanyName() + { + return $this->companyName; + } + /** + * Set companyName value + * @param string $companyName + * @return \ColissimoPostage\StructType\Address + */ + public function setCompanyName($companyName = null) + { + // validation for constraint: string + if (!is_null($companyName) && !is_string($companyName)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($companyName)), __LINE__); + } + $this->companyName = $companyName; + return $this; + } + /** + * Get lastName value + * @return string|null + */ + public function getLastName() + { + return $this->lastName; + } + /** + * Set lastName value + * @param string $lastName + * @return \ColissimoPostage\StructType\Address + */ + public function setLastName($lastName = null) + { + // validation for constraint: string + if (!is_null($lastName) && !is_string($lastName)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($lastName)), __LINE__); + } + $this->lastName = $lastName; + return $this; + } + /** + * Get firstName value + * @return string|null + */ + public function getFirstName() + { + return $this->firstName; + } + /** + * Set firstName value + * @param string $firstName + * @return \ColissimoPostage\StructType\Address + */ + public function setFirstName($firstName = null) + { + // validation for constraint: string + if (!is_null($firstName) && !is_string($firstName)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($firstName)), __LINE__); + } + $this->firstName = $firstName; + return $this; + } + /** + * Get line0 value + * @return string|null + */ + public function getLine0() + { + return $this->line0; + } + /** + * Set line0 value + * @param string $line0 + * @return \ColissimoPostage\StructType\Address + */ + public function setLine0($line0 = null) + { + // validation for constraint: string + if (!is_null($line0) && !is_string($line0)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($line0)), __LINE__); + } + $this->line0 = $line0; + return $this; + } + /** + * Get line1 value + * @return string|null + */ + public function getLine1() + { + return $this->line1; + } + /** + * Set line1 value + * @param string $line1 + * @return \ColissimoPostage\StructType\Address + */ + public function setLine1($line1 = null) + { + // validation for constraint: string + if (!is_null($line1) && !is_string($line1)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($line1)), __LINE__); + } + $this->line1 = $line1; + return $this; + } + /** + * Get line2 value + * @return string|null + */ + public function getLine2() + { + return $this->line2; + } + /** + * Set line2 value + * @param string $line2 + * @return \ColissimoPostage\StructType\Address + */ + public function setLine2($line2 = null) + { + // validation for constraint: string + if (!is_null($line2) && !is_string($line2)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($line2)), __LINE__); + } + $this->line2 = $line2; + return $this; + } + /** + * Get line3 value + * @return string|null + */ + public function getLine3() + { + return $this->line3; + } + /** + * Set line3 value + * @param string $line3 + * @return \ColissimoPostage\StructType\Address + */ + public function setLine3($line3 = null) + { + // validation for constraint: string + if (!is_null($line3) && !is_string($line3)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($line3)), __LINE__); + } + $this->line3 = $line3; + return $this; + } + /** + * Get countryCode value + * @return string|null + */ + public function getCountryCode() + { + return $this->countryCode; + } + /** + * Set countryCode value + * @param string $countryCode + * @return \ColissimoPostage\StructType\Address + */ + public function setCountryCode($countryCode = null) + { + // validation for constraint: string + if (!is_null($countryCode) && !is_string($countryCode)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($countryCode)), __LINE__); + } + $this->countryCode = $countryCode; + return $this; + } + /** + * Get city value + * @return string|null + */ + public function getCity() + { + return $this->city; + } + /** + * Set city value + * @param string $city + * @return \ColissimoPostage\StructType\Address + */ + public function setCity($city = null) + { + // validation for constraint: string + if (!is_null($city) && !is_string($city)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($city)), __LINE__); + } + $this->city = $city; + return $this; + } + /** + * Get zipCode value + * @return string|null + */ + public function getZipCode() + { + return $this->zipCode; + } + /** + * Set zipCode value + * @param string $zipCode + * @return \ColissimoPostage\StructType\Address + */ + public function setZipCode($zipCode = null) + { + // validation for constraint: string + if (!is_null($zipCode) && !is_string($zipCode)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($zipCode)), __LINE__); + } + $this->zipCode = $zipCode; + return $this; + } + /** + * Get phoneNumber value + * @return string|null + */ + public function getPhoneNumber() + { + return $this->phoneNumber; + } + /** + * Set phoneNumber value + * @param string $phoneNumber + * @return \ColissimoPostage\StructType\Address + */ + public function setPhoneNumber($phoneNumber = null) + { + // validation for constraint: string + if (!is_null($phoneNumber) && !is_string($phoneNumber)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($phoneNumber)), __LINE__); + } + $this->phoneNumber = $phoneNumber; + return $this; + } + /** + * Get mobileNumber value + * @return string|null + */ + public function getMobileNumber() + { + return $this->mobileNumber; + } + /** + * Set mobileNumber value + * @param string $mobileNumber + * @return \ColissimoPostage\StructType\Address + */ + public function setMobileNumber($mobileNumber = null) + { + // validation for constraint: string + if (!is_null($mobileNumber) && !is_string($mobileNumber)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($mobileNumber)), __LINE__); + } + $this->mobileNumber = $mobileNumber; + return $this; + } + /** + * Get doorCode1 value + * @return string|null + */ + public function getDoorCode1() + { + return $this->doorCode1; + } + /** + * Set doorCode1 value + * @param string $doorCode1 + * @return \ColissimoPostage\StructType\Address + */ + public function setDoorCode1($doorCode1 = null) + { + // validation for constraint: string + if (!is_null($doorCode1) && !is_string($doorCode1)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($doorCode1)), __LINE__); + } + $this->doorCode1 = $doorCode1; + return $this; + } + /** + * Get doorCode2 value + * @return string|null + */ + public function getDoorCode2() + { + return $this->doorCode2; + } + /** + * Set doorCode2 value + * @param string $doorCode2 + * @return \ColissimoPostage\StructType\Address + */ + public function setDoorCode2($doorCode2 = null) + { + // validation for constraint: string + if (!is_null($doorCode2) && !is_string($doorCode2)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($doorCode2)), __LINE__); + } + $this->doorCode2 = $doorCode2; + return $this; + } + /** + * Get email value + * @return string|null + */ + public function getEmail() + { + return $this->email; + } + /** + * Set email value + * @param string $email + * @return \ColissimoPostage\StructType\Address + */ + public function setEmail($email = null) + { + // validation for constraint: string + if (!is_null($email) && !is_string($email)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($email)), __LINE__); + } + $this->email = $email; + return $this; + } + /** + * Get intercom value + * @return string|null + */ + public function getIntercom() + { + return $this->intercom; + } + /** + * Set intercom value + * @param string $intercom + * @return \ColissimoPostage\StructType\Address + */ + public function setIntercom($intercom = null) + { + // validation for constraint: string + if (!is_null($intercom) && !is_string($intercom)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($intercom)), __LINE__); + } + $this->intercom = $intercom; + return $this; + } + /** + * Get language value + * @return string|null + */ + public function getLanguage() + { + return $this->language; + } + /** + * Set language value + * @param string $language + * @return \ColissimoPostage\StructType\Address + */ + public function setLanguage($language = null) + { + // validation for constraint: string + if (!is_null($language) && !is_string($language)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($language)), __LINE__); + } + $this->language = $language; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\Address + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/AddressPCH.php b/src/StructType/AddressPCH.php new file mode 100644 index 0000000..e8dad05 --- /dev/null +++ b/src/StructType/AddressPCH.php @@ -0,0 +1,201 @@ + + */ +class AddressPCH extends AbstractStructBase +{ + /** + * The city + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $city; + /** + * The line0 + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $line0; + /** + * The line1 + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $line1; + /** + * The line2 + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $line2; + /** + * The zipCode + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $zipCode; + /** + * Constructor method for addressPCH + * @uses AddressPCH::setCity() + * @uses AddressPCH::setLine0() + * @uses AddressPCH::setLine1() + * @uses AddressPCH::setLine2() + * @uses AddressPCH::setZipCode() + * @param string $city + * @param string $line0 + * @param string $line1 + * @param string $line2 + * @param string $zipCode + */ + public function __construct($city = null, $line0 = null, $line1 = null, $line2 = null, $zipCode = null) + { + $this + ->setCity($city) + ->setLine0($line0) + ->setLine1($line1) + ->setLine2($line2) + ->setZipCode($zipCode); + } + /** + * Get city value + * @return string|null + */ + public function getCity() + { + return $this->city; + } + /** + * Set city value + * @param string $city + * @return \ColissimoPostage\StructType\AddressPCH + */ + public function setCity($city = null) + { + // validation for constraint: string + if (!is_null($city) && !is_string($city)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($city)), __LINE__); + } + $this->city = $city; + return $this; + } + /** + * Get line0 value + * @return string|null + */ + public function getLine0() + { + return $this->line0; + } + /** + * Set line0 value + * @param string $line0 + * @return \ColissimoPostage\StructType\AddressPCH + */ + public function setLine0($line0 = null) + { + // validation for constraint: string + if (!is_null($line0) && !is_string($line0)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($line0)), __LINE__); + } + $this->line0 = $line0; + return $this; + } + /** + * Get line1 value + * @return string|null + */ + public function getLine1() + { + return $this->line1; + } + /** + * Set line1 value + * @param string $line1 + * @return \ColissimoPostage\StructType\AddressPCH + */ + public function setLine1($line1 = null) + { + // validation for constraint: string + if (!is_null($line1) && !is_string($line1)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($line1)), __LINE__); + } + $this->line1 = $line1; + return $this; + } + /** + * Get line2 value + * @return string|null + */ + public function getLine2() + { + return $this->line2; + } + /** + * Set line2 value + * @param string $line2 + * @return \ColissimoPostage\StructType\AddressPCH + */ + public function setLine2($line2 = null) + { + // validation for constraint: string + if (!is_null($line2) && !is_string($line2)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($line2)), __LINE__); + } + $this->line2 = $line2; + return $this; + } + /** + * Get zipCode value + * @return string|null + */ + public function getZipCode() + { + return $this->zipCode; + } + /** + * Set zipCode value + * @param string $zipCode + * @return \ColissimoPostage\StructType\AddressPCH + */ + public function setZipCode($zipCode = null) + { + // validation for constraint: string + if (!is_null($zipCode) && !is_string($zipCode)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($zipCode)), __LINE__); + } + $this->zipCode = $zipCode; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\AddressPCH + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/AddressPickupLocation.php b/src/StructType/AddressPickupLocation.php new file mode 100644 index 0000000..61b087a --- /dev/null +++ b/src/StructType/AddressPickupLocation.php @@ -0,0 +1,297 @@ + + */ +class AddressPickupLocation extends AbstractStructBase +{ + /** + * The city + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $city; + /** + * The countryCode + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $countryCode; + /** + * The countryLabel + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $countryLabel; + /** + * The line1 + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $line1; + /** + * The line2 + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $line2; + /** + * The line3 + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $line3; + /** + * The line4 + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $line4; + /** + * The zipCode + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $zipCode; + /** + * Constructor method for addressPickupLocation + * @uses AddressPickupLocation::setCity() + * @uses AddressPickupLocation::setCountryCode() + * @uses AddressPickupLocation::setCountryLabel() + * @uses AddressPickupLocation::setLine1() + * @uses AddressPickupLocation::setLine2() + * @uses AddressPickupLocation::setLine3() + * @uses AddressPickupLocation::setLine4() + * @uses AddressPickupLocation::setZipCode() + * @param string $city + * @param string $countryCode + * @param string $countryLabel + * @param string $line1 + * @param string $line2 + * @param string $line3 + * @param string $line4 + * @param string $zipCode + */ + public function __construct($city = null, $countryCode = null, $countryLabel = null, $line1 = null, $line2 = null, $line3 = null, $line4 = null, $zipCode = null) + { + $this + ->setCity($city) + ->setCountryCode($countryCode) + ->setCountryLabel($countryLabel) + ->setLine1($line1) + ->setLine2($line2) + ->setLine3($line3) + ->setLine4($line4) + ->setZipCode($zipCode); + } + /** + * Get city value + * @return string|null + */ + public function getCity() + { + return $this->city; + } + /** + * Set city value + * @param string $city + * @return \ColissimoPostage\StructType\AddressPickupLocation + */ + public function setCity($city = null) + { + // validation for constraint: string + if (!is_null($city) && !is_string($city)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($city)), __LINE__); + } + $this->city = $city; + return $this; + } + /** + * Get countryCode value + * @return string|null + */ + public function getCountryCode() + { + return $this->countryCode; + } + /** + * Set countryCode value + * @param string $countryCode + * @return \ColissimoPostage\StructType\AddressPickupLocation + */ + public function setCountryCode($countryCode = null) + { + // validation for constraint: string + if (!is_null($countryCode) && !is_string($countryCode)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($countryCode)), __LINE__); + } + $this->countryCode = $countryCode; + return $this; + } + /** + * Get countryLabel value + * @return string|null + */ + public function getCountryLabel() + { + return $this->countryLabel; + } + /** + * Set countryLabel value + * @param string $countryLabel + * @return \ColissimoPostage\StructType\AddressPickupLocation + */ + public function setCountryLabel($countryLabel = null) + { + // validation for constraint: string + if (!is_null($countryLabel) && !is_string($countryLabel)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($countryLabel)), __LINE__); + } + $this->countryLabel = $countryLabel; + return $this; + } + /** + * Get line1 value + * @return string|null + */ + public function getLine1() + { + return $this->line1; + } + /** + * Set line1 value + * @param string $line1 + * @return \ColissimoPostage\StructType\AddressPickupLocation + */ + public function setLine1($line1 = null) + { + // validation for constraint: string + if (!is_null($line1) && !is_string($line1)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($line1)), __LINE__); + } + $this->line1 = $line1; + return $this; + } + /** + * Get line2 value + * @return string|null + */ + public function getLine2() + { + return $this->line2; + } + /** + * Set line2 value + * @param string $line2 + * @return \ColissimoPostage\StructType\AddressPickupLocation + */ + public function setLine2($line2 = null) + { + // validation for constraint: string + if (!is_null($line2) && !is_string($line2)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($line2)), __LINE__); + } + $this->line2 = $line2; + return $this; + } + /** + * Get line3 value + * @return string|null + */ + public function getLine3() + { + return $this->line3; + } + /** + * Set line3 value + * @param string $line3 + * @return \ColissimoPostage\StructType\AddressPickupLocation + */ + public function setLine3($line3 = null) + { + // validation for constraint: string + if (!is_null($line3) && !is_string($line3)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($line3)), __LINE__); + } + $this->line3 = $line3; + return $this; + } + /** + * Get line4 value + * @return string|null + */ + public function getLine4() + { + return $this->line4; + } + /** + * Set line4 value + * @param string $line4 + * @return \ColissimoPostage\StructType\AddressPickupLocation + */ + public function setLine4($line4 = null) + { + // validation for constraint: string + if (!is_null($line4) && !is_string($line4)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($line4)), __LINE__); + } + $this->line4 = $line4; + return $this; + } + /** + * Get zipCode value + * @return string|null + */ + public function getZipCode() + { + return $this->zipCode; + } + /** + * Set zipCode value + * @param string $zipCode + * @return \ColissimoPostage\StructType\AddressPickupLocation + */ + public function setZipCode($zipCode = null) + { + // validation for constraint: string + if (!is_null($zipCode) && !is_string($zipCode)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($zipCode)), __LINE__); + } + $this->zipCode = $zipCode; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\AddressPickupLocation + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/Addressee.php b/src/StructType/Addressee.php new file mode 100644 index 0000000..f62e58c --- /dev/null +++ b/src/StructType/Addressee.php @@ -0,0 +1,191 @@ + + */ +class Addressee extends AbstractStructBase +{ + /** + * The addresseeParcelRef + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $addresseeParcelRef; + /** + * The codeBarForReference + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var bool + */ + public $codeBarForReference; + /** + * The serviceInfo + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $serviceInfo; + /** + * The promotionCode + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $promotionCode; + /** + * The address + * @var \ColissimoPostage\StructType\Address + */ + public $address; + /** + * Constructor method for addressee + * @uses Addressee::setAddresseeParcelRef() + * @uses Addressee::setCodeBarForReference() + * @uses Addressee::setServiceInfo() + * @uses Addressee::setPromotionCode() + * @uses Addressee::setAddress() + * @param string $addresseeParcelRef + * @param bool $codeBarForReference + * @param string $serviceInfo + * @param string $promotionCode + * @param \ColissimoPostage\StructType\Address $address + */ + public function __construct($addresseeParcelRef = null, $codeBarForReference = null, $serviceInfo = null, $promotionCode = null, \ColissimoPostage\StructType\Address $address = null) + { + $this + ->setAddresseeParcelRef($addresseeParcelRef) + ->setCodeBarForReference($codeBarForReference) + ->setServiceInfo($serviceInfo) + ->setPromotionCode($promotionCode) + ->setAddress($address); + } + /** + * Get addresseeParcelRef value + * @return string|null + */ + public function getAddresseeParcelRef() + { + return $this->addresseeParcelRef; + } + /** + * Set addresseeParcelRef value + * @param string $addresseeParcelRef + * @return \ColissimoPostage\StructType\Addressee + */ + public function setAddresseeParcelRef($addresseeParcelRef = null) + { + // validation for constraint: string + if (!is_null($addresseeParcelRef) && !is_string($addresseeParcelRef)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($addresseeParcelRef)), __LINE__); + } + $this->addresseeParcelRef = $addresseeParcelRef; + return $this; + } + /** + * Get codeBarForReference value + * @return bool|null + */ + public function getCodeBarForReference() + { + return $this->codeBarForReference; + } + /** + * Set codeBarForReference value + * @param bool $codeBarForReference + * @return \ColissimoPostage\StructType\Addressee + */ + public function setCodeBarForReference($codeBarForReference = null) + { + $this->codeBarForReference = $codeBarForReference; + return $this; + } + /** + * Get serviceInfo value + * @return string|null + */ + public function getServiceInfo() + { + return $this->serviceInfo; + } + /** + * Set serviceInfo value + * @param string $serviceInfo + * @return \ColissimoPostage\StructType\Addressee + */ + public function setServiceInfo($serviceInfo = null) + { + // validation for constraint: string + if (!is_null($serviceInfo) && !is_string($serviceInfo)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($serviceInfo)), __LINE__); + } + $this->serviceInfo = $serviceInfo; + return $this; + } + /** + * Get promotionCode value + * @return string|null + */ + public function getPromotionCode() + { + return $this->promotionCode; + } + /** + * Set promotionCode value + * @param string $promotionCode + * @return \ColissimoPostage\StructType\Addressee + */ + public function setPromotionCode($promotionCode = null) + { + // validation for constraint: string + if (!is_null($promotionCode) && !is_string($promotionCode)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($promotionCode)), __LINE__); + } + $this->promotionCode = $promotionCode; + return $this; + } + /** + * Get address value + * @return \ColissimoPostage\StructType\Address|null + */ + public function getAddress() + { + return $this->address; + } + /** + * Set address value + * @param \ColissimoPostage\StructType\Address $address + * @return \ColissimoPostage\StructType\Addressee + */ + public function setAddress(\ColissimoPostage\StructType\Address $address = null) + { + $this->address = $address; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\Addressee + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/Article.php b/src/StructType/Article.php new file mode 100644 index 0000000..b68c26b --- /dev/null +++ b/src/StructType/Article.php @@ -0,0 +1,219 @@ + + */ +class Article extends AbstractStructBase +{ + /** + * The description + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $description; + /** + * The quantity + * @var int + */ + public $quantity; + /** + * The weight + * @var float + */ + public $weight; + /** + * The value + * @var float + */ + public $value; + /** + * The hsCode + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $hsCode; + /** + * The originCountry + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $originCountry; + /** + * Constructor method for article + * @uses Article::setDescription() + * @uses Article::setQuantity() + * @uses Article::setWeight() + * @uses Article::setValue() + * @uses Article::setHsCode() + * @uses Article::setOriginCountry() + * @param string $description + * @param int $quantity + * @param float $weight + * @param float $value + * @param string $hsCode + * @param string $originCountry + */ + public function __construct($description = null, $quantity = null, $weight = null, $value = null, $hsCode = null, $originCountry = null) + { + $this + ->setDescription($description) + ->setQuantity($quantity) + ->setWeight($weight) + ->setValue($value) + ->setHsCode($hsCode) + ->setOriginCountry($originCountry); + } + /** + * Get description value + * @return string|null + */ + public function getDescription() + { + return $this->description; + } + /** + * Set description value + * @param string $description + * @return \ColissimoPostage\StructType\Article + */ + public function setDescription($description = null) + { + // validation for constraint: string + if (!is_null($description) && !is_string($description)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($description)), __LINE__); + } + $this->description = $description; + return $this; + } + /** + * Get quantity value + * @return int|null + */ + public function getQuantity() + { + return $this->quantity; + } + /** + * Set quantity value + * @param int $quantity + * @return \ColissimoPostage\StructType\Article + */ + public function setQuantity($quantity = null) + { + // validation for constraint: int + if (!is_null($quantity) && !is_int($quantity)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide an int, "%s" given', gettype($quantity)), __LINE__); + } + $this->quantity = $quantity; + return $this; + } + /** + * Get weight value + * @return float|null + */ + public function getWeight() + { + return $this->weight; + } + /** + * Set weight value + * @param float $weight + * @return \ColissimoPostage\StructType\Article + */ + public function setWeight($weight = null) + { + $this->weight = $weight; + return $this; + } + /** + * Get value value + * @return float|null + */ + public function getValue() + { + return $this->value; + } + /** + * Set value value + * @param float $value + * @return \ColissimoPostage\StructType\Article + */ + public function setValue($value = null) + { + $this->value = $value; + return $this; + } + /** + * Get hsCode value + * @return string|null + */ + public function getHsCode() + { + return $this->hsCode; + } + /** + * Set hsCode value + * @param string $hsCode + * @return \ColissimoPostage\StructType\Article + */ + public function setHsCode($hsCode = null) + { + // validation for constraint: string + if (!is_null($hsCode) && !is_string($hsCode)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($hsCode)), __LINE__); + } + $this->hsCode = $hsCode; + return $this; + } + /** + * Get originCountry value + * @return string|null + */ + public function getOriginCountry() + { + return $this->originCountry; + } + /** + * Set originCountry value + * @param string $originCountry + * @return \ColissimoPostage\StructType\Article + */ + public function setOriginCountry($originCountry = null) + { + // validation for constraint: string + if (!is_null($originCountry) && !is_string($originCountry)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($originCountry)), __LINE__); + } + $this->originCountry = $originCountry; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\Article + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/BaseResponse.php b/src/StructType/BaseResponse.php new file mode 100644 index 0000000..2ae1c15 --- /dev/null +++ b/src/StructType/BaseResponse.php @@ -0,0 +1,102 @@ + + */ +abstract class BaseResponse extends AbstractStructBase +{ + /** + * The messages + * Meta informations extracted from the WSDL + * - maxOccurs: unbounded + * - minOccurs: 0 + * - nillable: true + * @var \ColissimoPostage\StructType\Message[] + */ + public $messages; + /** + * Constructor method for baseResponse + * @uses BaseResponse::setMessages() + * @param \ColissimoPostage\StructType\Message[] $messages + */ + public function __construct(array $messages = array()) + { + $this + ->setMessages($messages); + } + /** + * Get messages value + * An additional test has been added (isset) before returning the property value as + * this property may have been unset before, due to the fact that this property is + * removable from the request (nillable=true+minOccurs=0) + * @return \ColissimoPostage\StructType\Message[]|null + */ + public function getMessages() + { + return isset($this->messages) ? $this->messages : null; + } + /** + * Set messages value + * This property is removable from request (nillable=true+minOccurs=0), therefore + * if the value assigned to this property is null, it is removed from this object + * @throws \InvalidArgumentException + * @param \ColissimoPostage\StructType\Message[] $messages + * @return \ColissimoPostage\StructType\BaseResponse + */ + public function setMessages(array $messages = array()) + { + foreach ($messages as $baseResponseMessagesItem) { + // validation for constraint: itemType + if (!$baseResponseMessagesItem instanceof \ColissimoPostage\StructType\Message) { + throw new \InvalidArgumentException(sprintf('The messages property can only contain items of \ColissimoPostage\StructType\Message, "%s" given', is_object($baseResponseMessagesItem) ? get_class($baseResponseMessagesItem) : gettype($baseResponseMessagesItem)), __LINE__); + } + } + if (is_null($messages)) { + unset($this->messages); + } else { + $this->messages = $messages; + } + return $this; + } + /** + * Add item to messages value + * @throws \InvalidArgumentException + * @param \ColissimoPostage\StructType\Message $item + * @return \ColissimoPostage\StructType\BaseResponse + */ + public function addToMessages(\ColissimoPostage\StructType\Message $item) + { + // validation for constraint: itemType + if (!$item instanceof \ColissimoPostage\StructType\Message) { + throw new \InvalidArgumentException(sprintf('The messages property can only contain items of \ColissimoPostage\StructType\Message, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__); + } + $this->messages[] = $item; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\BaseResponse + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/BelgiumLabel.php b/src/StructType/BelgiumLabel.php new file mode 100644 index 0000000..41f855f --- /dev/null +++ b/src/StructType/BelgiumLabel.php @@ -0,0 +1,161 @@ + + */ +class BelgiumLabel extends AbstractStructBase +{ + /** + * The codeBarre + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $codeBarre; + /** + * The codeVAS + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\CodeVAS + */ + public $codeVAS; + /** + * The identification + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $identification; + /** + * The returnAddress + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\ReturnAddressBelgium + */ + public $returnAddress; + /** + * Constructor method for belgiumLabel + * @uses BelgiumLabel::setCodeBarre() + * @uses BelgiumLabel::setCodeVAS() + * @uses BelgiumLabel::setIdentification() + * @uses BelgiumLabel::setReturnAddress() + * @param string $codeBarre + * @param \ColissimoPostage\StructType\CodeVAS $codeVAS + * @param string $identification + * @param \ColissimoPostage\StructType\ReturnAddressBelgium $returnAddress + */ + public function __construct($codeBarre = null, \ColissimoPostage\StructType\CodeVAS $codeVAS = null, $identification = null, \ColissimoPostage\StructType\ReturnAddressBelgium $returnAddress = null) + { + $this + ->setCodeBarre($codeBarre) + ->setCodeVAS($codeVAS) + ->setIdentification($identification) + ->setReturnAddress($returnAddress); + } + /** + * Get codeBarre value + * @return string|null + */ + public function getCodeBarre() + { + return $this->codeBarre; + } + /** + * Set codeBarre value + * @param string $codeBarre + * @return \ColissimoPostage\StructType\BelgiumLabel + */ + public function setCodeBarre($codeBarre = null) + { + // validation for constraint: string + if (!is_null($codeBarre) && !is_string($codeBarre)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($codeBarre)), __LINE__); + } + $this->codeBarre = $codeBarre; + return $this; + } + /** + * Get codeVAS value + * @return \ColissimoPostage\StructType\CodeVAS|null + */ + public function getCodeVAS() + { + return $this->codeVAS; + } + /** + * Set codeVAS value + * @param \ColissimoPostage\StructType\CodeVAS $codeVAS + * @return \ColissimoPostage\StructType\BelgiumLabel + */ + public function setCodeVAS(\ColissimoPostage\StructType\CodeVAS $codeVAS = null) + { + $this->codeVAS = $codeVAS; + return $this; + } + /** + * Get identification value + * @return string|null + */ + public function getIdentification() + { + return $this->identification; + } + /** + * Set identification value + * @param string $identification + * @return \ColissimoPostage\StructType\BelgiumLabel + */ + public function setIdentification($identification = null) + { + // validation for constraint: string + if (!is_null($identification) && !is_string($identification)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($identification)), __LINE__); + } + $this->identification = $identification; + return $this; + } + /** + * Get returnAddress value + * @return \ColissimoPostage\StructType\ReturnAddressBelgium|null + */ + public function getReturnAddress() + { + return $this->returnAddress; + } + /** + * Set returnAddress value + * @param \ColissimoPostage\StructType\ReturnAddressBelgium $returnAddress + * @return \ColissimoPostage\StructType\BelgiumLabel + */ + public function setReturnAddress(\ColissimoPostage\StructType\ReturnAddressBelgium $returnAddress = null) + { + $this->returnAddress = $returnAddress; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\BelgiumLabel + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/Category.php b/src/StructType/Category.php new file mode 100644 index 0000000..f9be285 --- /dev/null +++ b/src/StructType/Category.php @@ -0,0 +1,71 @@ + + */ +class Category extends AbstractStructBase +{ + /** + * The value + * @var int + */ + public $value; + /** + * Constructor method for category + * @uses Category::setValue() + * @param int $value + */ + public function __construct($value = null) + { + $this + ->setValue($value); + } + /** + * Get value value + * @return int|null + */ + public function getValue() + { + return $this->value; + } + /** + * Set value value + * @param int $value + * @return \ColissimoPostage\StructType\Category + */ + public function setValue($value = null) + { + // validation for constraint: int + if (!is_null($value) && !is_int($value)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide an int, "%s" given', gettype($value)), __LINE__); + } + $this->value = $value; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\Category + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/CodeVAS.php b/src/StructType/CodeVAS.php new file mode 100644 index 0000000..773b234 --- /dev/null +++ b/src/StructType/CodeVAS.php @@ -0,0 +1,169 @@ + + */ +class CodeVAS extends AbstractStructBase +{ + /** + * The deliveryMode + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $deliveryMode; + /** + * The mention + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $mention; + /** + * The reserve + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $reserve; + /** + * The signature + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $signature; + /** + * Constructor method for codeVAS + * @uses CodeVAS::setDeliveryMode() + * @uses CodeVAS::setMention() + * @uses CodeVAS::setReserve() + * @uses CodeVAS::setSignature() + * @param string $deliveryMode + * @param string $mention + * @param string $reserve + * @param string $signature + */ + public function __construct($deliveryMode = null, $mention = null, $reserve = null, $signature = null) + { + $this + ->setDeliveryMode($deliveryMode) + ->setMention($mention) + ->setReserve($reserve) + ->setSignature($signature); + } + /** + * Get deliveryMode value + * @return string|null + */ + public function getDeliveryMode() + { + return $this->deliveryMode; + } + /** + * Set deliveryMode value + * @param string $deliveryMode + * @return \ColissimoPostage\StructType\CodeVAS + */ + public function setDeliveryMode($deliveryMode = null) + { + // validation for constraint: string + if (!is_null($deliveryMode) && !is_string($deliveryMode)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($deliveryMode)), __LINE__); + } + $this->deliveryMode = $deliveryMode; + return $this; + } + /** + * Get mention value + * @return string|null + */ + public function getMention() + { + return $this->mention; + } + /** + * Set mention value + * @param string $mention + * @return \ColissimoPostage\StructType\CodeVAS + */ + public function setMention($mention = null) + { + // validation for constraint: string + if (!is_null($mention) && !is_string($mention)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($mention)), __LINE__); + } + $this->mention = $mention; + return $this; + } + /** + * Get reserve value + * @return string|null + */ + public function getReserve() + { + return $this->reserve; + } + /** + * Set reserve value + * @param string $reserve + * @return \ColissimoPostage\StructType\CodeVAS + */ + public function setReserve($reserve = null) + { + // validation for constraint: string + if (!is_null($reserve) && !is_string($reserve)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($reserve)), __LINE__); + } + $this->reserve = $reserve; + return $this; + } + /** + * Get signature value + * @return string|null + */ + public function getSignature() + { + return $this->signature; + } + /** + * Set signature value + * @param string $signature + * @return \ColissimoPostage\StructType\CodeVAS + */ + public function setSignature($signature = null) + { + // validation for constraint: string + if (!is_null($signature) && !is_string($signature)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($signature)), __LINE__); + } + $this->signature = $signature; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\CodeVAS + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/Contents.php b/src/StructType/Contents.php new file mode 100644 index 0000000..e312261 --- /dev/null +++ b/src/StructType/Contents.php @@ -0,0 +1,130 @@ + + */ +class Contents extends AbstractStructBase +{ + /** + * The article + * Meta informations extracted from the WSDL + * - maxOccurs: unbounded + * - minOccurs: 0 + * - nillable: true + * @var \ColissimoPostage\StructType\Article[] + */ + public $article; + /** + * The category + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\Category + */ + public $category; + /** + * Constructor method for contents + * @uses Contents::setArticle() + * @uses Contents::setCategory() + * @param \ColissimoPostage\StructType\Article[] $article + * @param \ColissimoPostage\StructType\Category $category + */ + public function __construct(array $article = array(), \ColissimoPostage\StructType\Category $category = null) + { + $this + ->setArticle($article) + ->setCategory($category); + } + /** + * Get article value + * An additional test has been added (isset) before returning the property value as + * this property may have been unset before, due to the fact that this property is + * removable from the request (nillable=true+minOccurs=0) + * @return \ColissimoPostage\StructType\Article[]|null + */ + public function getArticle() + { + return isset($this->article) ? $this->article : null; + } + /** + * Set article value + * This property is removable from request (nillable=true+minOccurs=0), therefore + * if the value assigned to this property is null, it is removed from this object + * @throws \InvalidArgumentException + * @param \ColissimoPostage\StructType\Article[] $article + * @return \ColissimoPostage\StructType\Contents + */ + public function setArticle(array $article = array()) + { + foreach ($article as $contentsArticleItem) { + // validation for constraint: itemType + if (!$contentsArticleItem instanceof \ColissimoPostage\StructType\Article) { + throw new \InvalidArgumentException(sprintf('The article property can only contain items of \ColissimoPostage\StructType\Article, "%s" given', is_object($contentsArticleItem) ? get_class($contentsArticleItem) : gettype($contentsArticleItem)), __LINE__); + } + } + if (is_null($article)) { + unset($this->article); + } else { + $this->article = $article; + } + return $this; + } + /** + * Add item to article value + * @throws \InvalidArgumentException + * @param \ColissimoPostage\StructType\Article $item + * @return \ColissimoPostage\StructType\Contents + */ + public function addToArticle(\ColissimoPostage\StructType\Article $item) + { + // validation for constraint: itemType + if (!$item instanceof \ColissimoPostage\StructType\Article) { + throw new \InvalidArgumentException(sprintf('The article property can only contain items of \ColissimoPostage\StructType\Article, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__); + } + $this->article[] = $item; + return $this; + } + /** + * Get category value + * @return \ColissimoPostage\StructType\Category|null + */ + public function getCategory() + { + return $this->category; + } + /** + * Set category value + * @param \ColissimoPostage\StructType\Category $category + * @return \ColissimoPostage\StructType\Contents + */ + public function setCategory(\ColissimoPostage\StructType\Category $category = null) + { + $this->category = $category; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\Contents + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/CustomsDeclarations.php b/src/StructType/CustomsDeclarations.php new file mode 100644 index 0000000..479f88d --- /dev/null +++ b/src/StructType/CustomsDeclarations.php @@ -0,0 +1,193 @@ + + */ +class CustomsDeclarations extends AbstractStructBase +{ + /** + * The includeCustomsDeclarations + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var bool + */ + public $includeCustomsDeclarations; + /** + * The contents + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\Contents + */ + public $contents; + /** + * The importersReference + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $importersReference; + /** + * The importersContact + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $importersContact; + /** + * The officeOrigin + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $officeOrigin; + /** + * Constructor method for customsDeclarations + * @uses CustomsDeclarations::setIncludeCustomsDeclarations() + * @uses CustomsDeclarations::setContents() + * @uses CustomsDeclarations::setImportersReference() + * @uses CustomsDeclarations::setImportersContact() + * @uses CustomsDeclarations::setOfficeOrigin() + * @param bool $includeCustomsDeclarations + * @param \ColissimoPostage\StructType\Contents $contents + * @param string $importersReference + * @param string $importersContact + * @param string $officeOrigin + */ + public function __construct($includeCustomsDeclarations = null, \ColissimoPostage\StructType\Contents $contents = null, $importersReference = null, $importersContact = null, $officeOrigin = null) + { + $this + ->setIncludeCustomsDeclarations($includeCustomsDeclarations) + ->setContents($contents) + ->setImportersReference($importersReference) + ->setImportersContact($importersContact) + ->setOfficeOrigin($officeOrigin); + } + /** + * Get includeCustomsDeclarations value + * @return bool|null + */ + public function getIncludeCustomsDeclarations() + { + return $this->includeCustomsDeclarations; + } + /** + * Set includeCustomsDeclarations value + * @param bool $includeCustomsDeclarations + * @return \ColissimoPostage\StructType\CustomsDeclarations + */ + public function setIncludeCustomsDeclarations($includeCustomsDeclarations = null) + { + $this->includeCustomsDeclarations = $includeCustomsDeclarations; + return $this; + } + /** + * Get contents value + * @return \ColissimoPostage\StructType\Contents|null + */ + public function getContents() + { + return $this->contents; + } + /** + * Set contents value + * @param \ColissimoPostage\StructType\Contents $contents + * @return \ColissimoPostage\StructType\CustomsDeclarations + */ + public function setContents(\ColissimoPostage\StructType\Contents $contents = null) + { + $this->contents = $contents; + return $this; + } + /** + * Get importersReference value + * @return string|null + */ + public function getImportersReference() + { + return $this->importersReference; + } + /** + * Set importersReference value + * @param string $importersReference + * @return \ColissimoPostage\StructType\CustomsDeclarations + */ + public function setImportersReference($importersReference = null) + { + // validation for constraint: string + if (!is_null($importersReference) && !is_string($importersReference)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($importersReference)), __LINE__); + } + $this->importersReference = $importersReference; + return $this; + } + /** + * Get importersContact value + * @return string|null + */ + public function getImportersContact() + { + return $this->importersContact; + } + /** + * Set importersContact value + * @param string $importersContact + * @return \ColissimoPostage\StructType\CustomsDeclarations + */ + public function setImportersContact($importersContact = null) + { + // validation for constraint: string + if (!is_null($importersContact) && !is_string($importersContact)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($importersContact)), __LINE__); + } + $this->importersContact = $importersContact; + return $this; + } + /** + * Get officeOrigin value + * @return string|null + */ + public function getOfficeOrigin() + { + return $this->officeOrigin; + } + /** + * Set officeOrigin value + * @param string $officeOrigin + * @return \ColissimoPostage\StructType\CustomsDeclarations + */ + public function setOfficeOrigin($officeOrigin = null) + { + // validation for constraint: string + if (!is_null($officeOrigin) && !is_string($officeOrigin)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($officeOrigin)), __LINE__); + } + $this->officeOrigin = $officeOrigin; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\CustomsDeclarations + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/Field.php b/src/StructType/Field.php new file mode 100644 index 0000000..2cd3e46 --- /dev/null +++ b/src/StructType/Field.php @@ -0,0 +1,101 @@ + + */ +class Field extends AbstractStructBase +{ + /** + * The key + * @var string + */ + public $key; + /** + * The value + * @var string + */ + public $value; + /** + * Constructor method for field + * @uses Field::setKey() + * @uses Field::setValue() + * @param string $key + * @param string $value + */ + public function __construct($key = null, $value = null) + { + $this + ->setKey($key) + ->setValue($value); + } + /** + * Get key value + * @return string|null + */ + public function getKey() + { + return $this->key; + } + /** + * Set key value + * @param string $key + * @return \ColissimoPostage\StructType\Field + */ + public function setKey($key = null) + { + // validation for constraint: string + if (!is_null($key) && !is_string($key)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($key)), __LINE__); + } + $this->key = $key; + return $this; + } + /** + * Get value value + * @return string|null + */ + public function getValue() + { + return $this->value; + } + /** + * Set value value + * @param string $value + * @return \ColissimoPostage\StructType\Field + */ + public function setValue($value = null) + { + // validation for constraint: string + if (!is_null($value) && !is_string($value)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($value)), __LINE__); + } + $this->value = $value; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\Field + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/Fields.php b/src/StructType/Fields.php new file mode 100644 index 0000000..3815ab8 --- /dev/null +++ b/src/StructType/Fields.php @@ -0,0 +1,102 @@ + + */ +class Fields extends AbstractStructBase +{ + /** + * The field + * Meta informations extracted from the WSDL + * - maxOccurs: unbounded + * - minOccurs: 0 + * - nillable: true + * @var \ColissimoPostage\StructType\Field[] + */ + public $field; + /** + * Constructor method for fields + * @uses Fields::setField() + * @param \ColissimoPostage\StructType\Field[] $field + */ + public function __construct(array $field = array()) + { + $this + ->setField($field); + } + /** + * Get field value + * An additional test has been added (isset) before returning the property value as + * this property may have been unset before, due to the fact that this property is + * removable from the request (nillable=true+minOccurs=0) + * @return \ColissimoPostage\StructType\Field[]|null + */ + public function getField() + { + return isset($this->field) ? $this->field : null; + } + /** + * Set field value + * This property is removable from request (nillable=true+minOccurs=0), therefore + * if the value assigned to this property is null, it is removed from this object + * @throws \InvalidArgumentException + * @param \ColissimoPostage\StructType\Field[] $field + * @return \ColissimoPostage\StructType\Fields + */ + public function setField(array $field = array()) + { + foreach ($field as $fieldsFieldItem) { + // validation for constraint: itemType + if (!$fieldsFieldItem instanceof \ColissimoPostage\StructType\Field) { + throw new \InvalidArgumentException(sprintf('The field property can only contain items of \ColissimoPostage\StructType\Field, "%s" given', is_object($fieldsFieldItem) ? get_class($fieldsFieldItem) : gettype($fieldsFieldItem)), __LINE__); + } + } + if (is_null($field)) { + unset($this->field); + } else { + $this->field = $field; + } + return $this; + } + /** + * Add item to field value + * @throws \InvalidArgumentException + * @param \ColissimoPostage\StructType\Field $item + * @return \ColissimoPostage\StructType\Fields + */ + public function addToField(\ColissimoPostage\StructType\Field $item) + { + // validation for constraint: itemType + if (!$item instanceof \ColissimoPostage\StructType\Field) { + throw new \InvalidArgumentException(sprintf('The field property can only contain items of \ColissimoPostage\StructType\Field, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__); + } + $this->field[] = $item; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\Fields + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/GenerateLabel.php b/src/StructType/GenerateLabel.php new file mode 100644 index 0000000..f9297b6 --- /dev/null +++ b/src/StructType/GenerateLabel.php @@ -0,0 +1,71 @@ + + */ +class GenerateLabel extends AbstractStructBase +{ + /** + * The generateLabelRequest + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\GenerateLabelRequest + */ + public $generateLabelRequest; + /** + * Constructor method for generateLabel + * @uses GenerateLabel::setGenerateLabelRequest() + * @param \ColissimoPostage\StructType\GenerateLabelRequest $generateLabelRequest + */ + public function __construct(\ColissimoPostage\StructType\GenerateLabelRequest $generateLabelRequest = null) + { + $this + ->setGenerateLabelRequest($generateLabelRequest); + } + /** + * Get generateLabelRequest value + * @return \ColissimoPostage\StructType\GenerateLabelRequest|null + */ + public function getGenerateLabelRequest() + { + return $this->generateLabelRequest; + } + /** + * Set generateLabelRequest value + * @param \ColissimoPostage\StructType\GenerateLabelRequest $generateLabelRequest + * @return \ColissimoPostage\StructType\GenerateLabel + */ + public function setGenerateLabelRequest(\ColissimoPostage\StructType\GenerateLabelRequest $generateLabelRequest = null) + { + $this->generateLabelRequest = $generateLabelRequest; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\GenerateLabel + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/GenerateLabelRequest.php b/src/StructType/GenerateLabelRequest.php new file mode 100644 index 0000000..ea92aa5 --- /dev/null +++ b/src/StructType/GenerateLabelRequest.php @@ -0,0 +1,181 @@ + + */ +class GenerateLabelRequest extends AbstractStructBase +{ + /** + * The contractNumber + * @var string + */ + public $contractNumber; + /** + * The password + * @var string + */ + public $password; + /** + * The outputFormat + * @var \ColissimoPostage\StructType\OutputFormat + */ + public $outputFormat; + /** + * The letter + * @var \ColissimoPostage\StructType\Letter + */ + public $letter; + /** + * The fields + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\Fields + */ + public $fields; + /** + * Constructor method for generateLabelRequest + * @uses GenerateLabelRequest::setContractNumber() + * @uses GenerateLabelRequest::setPassword() + * @uses GenerateLabelRequest::setOutputFormat() + * @uses GenerateLabelRequest::setLetter() + * @uses GenerateLabelRequest::setFields() + * @param string $contractNumber + * @param string $password + * @param \ColissimoPostage\StructType\OutputFormat $outputFormat + * @param \ColissimoPostage\StructType\Letter $letter + * @param \ColissimoPostage\StructType\Fields $fields + */ + public function __construct($contractNumber = null, $password = null, \ColissimoPostage\StructType\OutputFormat $outputFormat = null, \ColissimoPostage\StructType\Letter $letter = null, \ColissimoPostage\StructType\Fields $fields = null) + { + $this + ->setContractNumber($contractNumber) + ->setPassword($password) + ->setOutputFormat($outputFormat) + ->setLetter($letter) + ->setFields($fields); + } + /** + * Get contractNumber value + * @return string|null + */ + public function getContractNumber() + { + return $this->contractNumber; + } + /** + * Set contractNumber value + * @param string $contractNumber + * @return \ColissimoPostage\StructType\GenerateLabelRequest + */ + public function setContractNumber($contractNumber = null) + { + // validation for constraint: string + if (!is_null($contractNumber) && !is_string($contractNumber)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($contractNumber)), __LINE__); + } + $this->contractNumber = $contractNumber; + return $this; + } + /** + * Get password value + * @return string|null + */ + public function getPassword() + { + return $this->password; + } + /** + * Set password value + * @param string $password + * @return \ColissimoPostage\StructType\GenerateLabelRequest + */ + public function setPassword($password = null) + { + // validation for constraint: string + if (!is_null($password) && !is_string($password)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($password)), __LINE__); + } + $this->password = $password; + return $this; + } + /** + * Get outputFormat value + * @return \ColissimoPostage\StructType\OutputFormat|null + */ + public function getOutputFormat() + { + return $this->outputFormat; + } + /** + * Set outputFormat value + * @param \ColissimoPostage\StructType\OutputFormat $outputFormat + * @return \ColissimoPostage\StructType\GenerateLabelRequest + */ + public function setOutputFormat(\ColissimoPostage\StructType\OutputFormat $outputFormat = null) + { + $this->outputFormat = $outputFormat; + return $this; + } + /** + * Get letter value + * @return \ColissimoPostage\StructType\Letter|null + */ + public function getLetter() + { + return $this->letter; + } + /** + * Set letter value + * @param \ColissimoPostage\StructType\Letter $letter + * @return \ColissimoPostage\StructType\GenerateLabelRequest + */ + public function setLetter(\ColissimoPostage\StructType\Letter $letter = null) + { + $this->letter = $letter; + return $this; + } + /** + * Get fields value + * @return \ColissimoPostage\StructType\Fields|null + */ + public function getFields() + { + return $this->fields; + } + /** + * Set fields value + * @param \ColissimoPostage\StructType\Fields $fields + * @return \ColissimoPostage\StructType\GenerateLabelRequest + */ + public function setFields(\ColissimoPostage\StructType\Fields $fields = null) + { + $this->fields = $fields; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\GenerateLabelRequest + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/GenerateLabelRequestType.php b/src/StructType/GenerateLabelRequestType.php new file mode 100644 index 0000000..9ccbbf7 --- /dev/null +++ b/src/StructType/GenerateLabelRequestType.php @@ -0,0 +1,181 @@ + + */ +class GenerateLabelRequestType extends AbstractStructBase +{ + /** + * The contractNumber + * @var string + */ + public $contractNumber; + /** + * The password + * @var string + */ + public $password; + /** + * The outputFormat + * @var \ColissimoPostage\StructType\OutputFormat + */ + public $outputFormat; + /** + * The letter + * @var \ColissimoPostage\StructType\Letter + */ + public $letter; + /** + * The fields + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\Fields + */ + public $fields; + /** + * Constructor method for GenerateLabelRequestType + * @uses GenerateLabelRequestType::setContractNumber() + * @uses GenerateLabelRequestType::setPassword() + * @uses GenerateLabelRequestType::setOutputFormat() + * @uses GenerateLabelRequestType::setLetter() + * @uses GenerateLabelRequestType::setFields() + * @param string $contractNumber + * @param string $password + * @param \ColissimoPostage\StructType\OutputFormat $outputFormat + * @param \ColissimoPostage\StructType\Letter $letter + * @param \ColissimoPostage\StructType\Fields $fields + */ + public function __construct($contractNumber = null, $password = null, \ColissimoPostage\StructType\OutputFormat $outputFormat = null, \ColissimoPostage\StructType\Letter $letter = null, \ColissimoPostage\StructType\Fields $fields = null) + { + $this + ->setContractNumber($contractNumber) + ->setPassword($password) + ->setOutputFormat($outputFormat) + ->setLetter($letter) + ->setFields($fields); + } + /** + * Get contractNumber value + * @return string|null + */ + public function getContractNumber() + { + return $this->contractNumber; + } + /** + * Set contractNumber value + * @param string $contractNumber + * @return \ColissimoPostage\StructType\GenerateLabelRequestType + */ + public function setContractNumber($contractNumber = null) + { + // validation for constraint: string + if (!is_null($contractNumber) && !is_string($contractNumber)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($contractNumber)), __LINE__); + } + $this->contractNumber = $contractNumber; + return $this; + } + /** + * Get password value + * @return string|null + */ + public function getPassword() + { + return $this->password; + } + /** + * Set password value + * @param string $password + * @return \ColissimoPostage\StructType\GenerateLabelRequestType + */ + public function setPassword($password = null) + { + // validation for constraint: string + if (!is_null($password) && !is_string($password)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($password)), __LINE__); + } + $this->password = $password; + return $this; + } + /** + * Get outputFormat value + * @return \ColissimoPostage\StructType\OutputFormat|null + */ + public function getOutputFormat() + { + return $this->outputFormat; + } + /** + * Set outputFormat value + * @param \ColissimoPostage\StructType\OutputFormat $outputFormat + * @return \ColissimoPostage\StructType\GenerateLabelRequestType + */ + public function setOutputFormat(\ColissimoPostage\StructType\OutputFormat $outputFormat = null) + { + $this->outputFormat = $outputFormat; + return $this; + } + /** + * Get letter value + * @return \ColissimoPostage\StructType\Letter|null + */ + public function getLetter() + { + return $this->letter; + } + /** + * Set letter value + * @param \ColissimoPostage\StructType\Letter $letter + * @return \ColissimoPostage\StructType\GenerateLabelRequestType + */ + public function setLetter(\ColissimoPostage\StructType\Letter $letter = null) + { + $this->letter = $letter; + return $this; + } + /** + * Get fields value + * @return \ColissimoPostage\StructType\Fields|null + */ + public function getFields() + { + return $this->fields; + } + /** + * Set fields value + * @param \ColissimoPostage\StructType\Fields $fields + * @return \ColissimoPostage\StructType\GenerateLabelRequestType + */ + public function setFields(\ColissimoPostage\StructType\Fields $fields = null) + { + $this->fields = $fields; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\GenerateLabelRequestType + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/GenerateLabelResponse.php b/src/StructType/GenerateLabelResponse.php new file mode 100644 index 0000000..80c2691 --- /dev/null +++ b/src/StructType/GenerateLabelResponse.php @@ -0,0 +1,71 @@ + + */ +class GenerateLabelResponse extends AbstractStructBase +{ + /** + * The return + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\GenerateLabelResponseType + */ + public $return; + /** + * Constructor method for generateLabelResponse + * @uses GenerateLabelResponse::setReturn() + * @param \ColissimoPostage\StructType\GenerateLabelResponseType $return + */ + public function __construct(\ColissimoPostage\StructType\GenerateLabelResponseType $return = null) + { + $this + ->setReturn($return); + } + /** + * Get return value + * @return \ColissimoPostage\StructType\GenerateLabelResponseType|null + */ + public function getReturn() + { + return $this->return; + } + /** + * Set return value + * @param \ColissimoPostage\StructType\GenerateLabelResponseType $return + * @return \ColissimoPostage\StructType\GenerateLabelResponse + */ + public function setReturn(\ColissimoPostage\StructType\GenerateLabelResponseType $return = null) + { + $this->return = $return; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\GenerateLabelResponse + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/GenerateLabelResponseType.php b/src/StructType/GenerateLabelResponseType.php new file mode 100644 index 0000000..8a936be --- /dev/null +++ b/src/StructType/GenerateLabelResponseType.php @@ -0,0 +1,97 @@ + + */ +class GenerateLabelResponseType extends BaseResponse +{ + /** + * The labelXmlReponse + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\XmlResponse + */ + public $labelXmlReponse; + /** + * The labelResponse + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\LabelResponse + */ + public $labelResponse; + /** + * Constructor method for GenerateLabelResponseType + * @uses GenerateLabelResponseType::setLabelXmlReponse() + * @uses GenerateLabelResponseType::setLabelResponse() + * @param \ColissimoPostage\StructType\XmlResponse $labelXmlReponse + * @param \ColissimoPostage\StructType\LabelResponse $labelResponse + */ + public function __construct(\ColissimoPostage\StructType\XmlResponse $labelXmlReponse = null, \ColissimoPostage\StructType\LabelResponse $labelResponse = null) + { + $this + ->setLabelXmlReponse($labelXmlReponse) + ->setLabelResponse($labelResponse); + } + /** + * Get labelXmlReponse value + * @return \ColissimoPostage\StructType\XmlResponse|null + */ + public function getLabelXmlReponse() + { + return $this->labelXmlReponse; + } + /** + * Set labelXmlReponse value + * @param \ColissimoPostage\StructType\XmlResponse $labelXmlReponse + * @return \ColissimoPostage\StructType\GenerateLabelResponseType + */ + public function setLabelXmlReponse(\ColissimoPostage\StructType\XmlResponse $labelXmlReponse = null) + { + $this->labelXmlReponse = $labelXmlReponse; + return $this; + } + /** + * Get labelResponse value + * @return \ColissimoPostage\StructType\LabelResponse|null + */ + public function getLabelResponse() + { + return $this->labelResponse; + } + /** + * Set labelResponse value + * @param \ColissimoPostage\StructType\LabelResponse $labelResponse + * @return \ColissimoPostage\StructType\GenerateLabelResponseType + */ + public function setLabelResponse(\ColissimoPostage\StructType\LabelResponse $labelResponse = null) + { + $this->labelResponse = $labelResponse; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\GenerateLabelResponseType + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/GetListMailBoxPickingDates.php b/src/StructType/GetListMailBoxPickingDates.php new file mode 100644 index 0000000..8913467 --- /dev/null +++ b/src/StructType/GetListMailBoxPickingDates.php @@ -0,0 +1,74 @@ + + */ +class GetListMailBoxPickingDates extends AbstractStructBase +{ + /** + * The getListMailBoxPickingDatesRetourRequest + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\GetListMailBoxPickingDatesRetourRequest + */ + public $getListMailBoxPickingDatesRetourRequest; + /** + * Constructor method for getListMailBoxPickingDates + * @uses GetListMailBoxPickingDates::setGetListMailBoxPickingDatesRetourRequest() + * @param \ColissimoPostage\StructType\GetListMailBoxPickingDatesRetourRequest + * $getListMailBoxPickingDatesRetourRequest + */ + public function __construct(\ColissimoPostage\StructType\GetListMailBoxPickingDatesRetourRequest $getListMailBoxPickingDatesRetourRequest = null) + { + $this + ->setGetListMailBoxPickingDatesRetourRequest($getListMailBoxPickingDatesRetourRequest); + } + /** + * Get getListMailBoxPickingDatesRetourRequest value + * @return + * \ColissimoPostage\StructType\GetListMailBoxPickingDatesRetourRequest|null + */ + public function getGetListMailBoxPickingDatesRetourRequest() + { + return $this->getListMailBoxPickingDatesRetourRequest; + } + /** + * Set getListMailBoxPickingDatesRetourRequest value + * @param \ColissimoPostage\StructType\GetListMailBoxPickingDatesRetourRequest + * $getListMailBoxPickingDatesRetourRequest + * @return \ColissimoPostage\StructType\GetListMailBoxPickingDates + */ + public function setGetListMailBoxPickingDatesRetourRequest(\ColissimoPostage\StructType\GetListMailBoxPickingDatesRetourRequest $getListMailBoxPickingDatesRetourRequest = null) + { + $this->getListMailBoxPickingDatesRetourRequest = $getListMailBoxPickingDatesRetourRequest; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\GetListMailBoxPickingDates + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/GetListMailBoxPickingDatesResponse.php b/src/StructType/GetListMailBoxPickingDatesResponse.php new file mode 100644 index 0000000..90f0292 --- /dev/null +++ b/src/StructType/GetListMailBoxPickingDatesResponse.php @@ -0,0 +1,73 @@ + + */ +class GetListMailBoxPickingDatesResponse extends AbstractStructBase +{ + /** + * The return + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\GetListMailBoxPickingDatesResponseType + */ + public $return; + /** + * Constructor method for getListMailBoxPickingDatesResponse + * @uses GetListMailBoxPickingDatesResponse::setReturn() + * @param \ColissimoPostage\StructType\GetListMailBoxPickingDatesResponseType + * $return + */ + public function __construct(\ColissimoPostage\StructType\GetListMailBoxPickingDatesResponseType $return = null) + { + $this + ->setReturn($return); + } + /** + * Get return value + * @return \ColissimoPostage\StructType\GetListMailBoxPickingDatesResponseType|null + */ + public function getReturn() + { + return $this->return; + } + /** + * Set return value + * @param \ColissimoPostage\StructType\GetListMailBoxPickingDatesResponseType + * $return + * @return \ColissimoPostage\StructType\GetListMailBoxPickingDatesResponse + */ + public function setReturn(\ColissimoPostage\StructType\GetListMailBoxPickingDatesResponseType $return = null) + { + $this->return = $return; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\GetListMailBoxPickingDatesResponse + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/GetListMailBoxPickingDatesResponseType.php b/src/StructType/GetListMailBoxPickingDatesResponseType.php new file mode 100644 index 0000000..aa828ef --- /dev/null +++ b/src/StructType/GetListMailBoxPickingDatesResponseType.php @@ -0,0 +1,166 @@ + + */ +class GetListMailBoxPickingDatesResponseType extends BaseResponse +{ + /** + * The mailBoxPickingDateMaxHour + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $mailBoxPickingDateMaxHour; + /** + * The mailBoxPickingDates + * Meta informations extracted from the WSDL + * - maxOccurs: unbounded + * - minOccurs: 0 + * - nillable: true + * @var string[] + */ + public $mailBoxPickingDates; + /** + * The validityTime + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $validityTime; + /** + * Constructor method for GetListMailBoxPickingDatesResponseType + * @uses GetListMailBoxPickingDatesResponseType::setMailBoxPickingDateMaxHour() + * @uses GetListMailBoxPickingDatesResponseType::setMailBoxPickingDates() + * @uses GetListMailBoxPickingDatesResponseType::setValidityTime() + * @param string $mailBoxPickingDateMaxHour + * @param string[] $mailBoxPickingDates + * @param string $validityTime + */ + public function __construct($mailBoxPickingDateMaxHour = null, array $mailBoxPickingDates = array(), $validityTime = null) + { + $this + ->setMailBoxPickingDateMaxHour($mailBoxPickingDateMaxHour) + ->setMailBoxPickingDates($mailBoxPickingDates) + ->setValidityTime($validityTime); + } + /** + * Get mailBoxPickingDateMaxHour value + * @return string|null + */ + public function getMailBoxPickingDateMaxHour() + { + return $this->mailBoxPickingDateMaxHour; + } + /** + * Set mailBoxPickingDateMaxHour value + * @param string $mailBoxPickingDateMaxHour + * @return \ColissimoPostage\StructType\GetListMailBoxPickingDatesResponseType + */ + public function setMailBoxPickingDateMaxHour($mailBoxPickingDateMaxHour = null) + { + // validation for constraint: string + if (!is_null($mailBoxPickingDateMaxHour) && !is_string($mailBoxPickingDateMaxHour)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($mailBoxPickingDateMaxHour)), __LINE__); + } + $this->mailBoxPickingDateMaxHour = $mailBoxPickingDateMaxHour; + return $this; + } + /** + * Get mailBoxPickingDates value + * An additional test has been added (isset) before returning the property value as + * this property may have been unset before, due to the fact that this property is + * removable from the request (nillable=true+minOccurs=0) + * @return string[]|null + */ + public function getMailBoxPickingDates() + { + return isset($this->mailBoxPickingDates) ? $this->mailBoxPickingDates : null; + } + /** + * Set mailBoxPickingDates value + * This property is removable from request (nillable=true+minOccurs=0), therefore + * if the value assigned to this property is null, it is removed from this object + * @throws \InvalidArgumentException + * @param string[] $mailBoxPickingDates + * @return \ColissimoPostage\StructType\GetListMailBoxPickingDatesResponseType + */ + public function setMailBoxPickingDates(array $mailBoxPickingDates = array()) + { + foreach ($mailBoxPickingDates as $getListMailBoxPickingDatesResponseTypeMailBoxPickingDatesItem) { + // validation for constraint: itemType + if (!is_string($getListMailBoxPickingDatesResponseTypeMailBoxPickingDatesItem)) { + throw new \InvalidArgumentException(sprintf('The mailBoxPickingDates property can only contain items of dateTime, "%s" given', is_object($getListMailBoxPickingDatesResponseTypeMailBoxPickingDatesItem) ? get_class($getListMailBoxPickingDatesResponseTypeMailBoxPickingDatesItem) : gettype($getListMailBoxPickingDatesResponseTypeMailBoxPickingDatesItem)), __LINE__); + } + } + if (is_null($mailBoxPickingDates)) { + unset($this->mailBoxPickingDates); + } else { + $this->mailBoxPickingDates = $mailBoxPickingDates; + } + return $this; + } + /** + * Add item to mailBoxPickingDates value + * @throws \InvalidArgumentException + * @param string $item + * @return \ColissimoPostage\StructType\GetListMailBoxPickingDatesResponseType + */ + public function addToMailBoxPickingDates($item) + { + // validation for constraint: itemType + if (!is_string($item)) { + throw new \InvalidArgumentException(sprintf('The mailBoxPickingDates property can only contain items of dateTime, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__); + } + $this->mailBoxPickingDates[] = $item; + return $this; + } + /** + * Get validityTime value + * @return string|null + */ + public function getValidityTime() + { + return $this->validityTime; + } + /** + * Set validityTime value + * @param string $validityTime + * @return \ColissimoPostage\StructType\GetListMailBoxPickingDatesResponseType + */ + public function setValidityTime($validityTime = null) + { + // validation for constraint: string + if (!is_null($validityTime) && !is_string($validityTime)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($validityTime)), __LINE__); + } + $this->validityTime = $validityTime; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\GetListMailBoxPickingDatesResponseType + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/GetListMailBoxPickingDatesRetourRequest.php b/src/StructType/GetListMailBoxPickingDatesRetourRequest.php new file mode 100644 index 0000000..6416456 --- /dev/null +++ b/src/StructType/GetListMailBoxPickingDatesRetourRequest.php @@ -0,0 +1,127 @@ + + */ +class GetListMailBoxPickingDatesRetourRequest extends AbstractStructBase +{ + /** + * The contractNumber + * @var string + */ + public $contractNumber; + /** + * The password + * @var string + */ + public $password; + /** + * The sender + * @var \ColissimoPostage\StructType\Sender + */ + public $sender; + /** + * Constructor method for getListMailBoxPickingDatesRetourRequest + * @uses GetListMailBoxPickingDatesRetourRequest::setContractNumber() + * @uses GetListMailBoxPickingDatesRetourRequest::setPassword() + * @uses GetListMailBoxPickingDatesRetourRequest::setSender() + * @param string $contractNumber + * @param string $password + * @param \ColissimoPostage\StructType\Sender $sender + */ + public function __construct($contractNumber = null, $password = null, \ColissimoPostage\StructType\Sender $sender = null) + { + $this + ->setContractNumber($contractNumber) + ->setPassword($password) + ->setSender($sender); + } + /** + * Get contractNumber value + * @return string|null + */ + public function getContractNumber() + { + return $this->contractNumber; + } + /** + * Set contractNumber value + * @param string $contractNumber + * @return \ColissimoPostage\StructType\GetListMailBoxPickingDatesRetourRequest + */ + public function setContractNumber($contractNumber = null) + { + // validation for constraint: string + if (!is_null($contractNumber) && !is_string($contractNumber)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($contractNumber)), __LINE__); + } + $this->contractNumber = $contractNumber; + return $this; + } + /** + * Get password value + * @return string|null + */ + public function getPassword() + { + return $this->password; + } + /** + * Set password value + * @param string $password + * @return \ColissimoPostage\StructType\GetListMailBoxPickingDatesRetourRequest + */ + public function setPassword($password = null) + { + // validation for constraint: string + if (!is_null($password) && !is_string($password)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($password)), __LINE__); + } + $this->password = $password; + return $this; + } + /** + * Get sender value + * @return \ColissimoPostage\StructType\Sender|null + */ + public function getSender() + { + return $this->sender; + } + /** + * Set sender value + * @param \ColissimoPostage\StructType\Sender $sender + * @return \ColissimoPostage\StructType\GetListMailBoxPickingDatesRetourRequest + */ + public function setSender(\ColissimoPostage\StructType\Sender $sender = null) + { + $this->sender = $sender; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\GetListMailBoxPickingDatesRetourRequest + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/GetListMailBoxPickingDatesRetourRequestType.php b/src/StructType/GetListMailBoxPickingDatesRetourRequestType.php new file mode 100644 index 0000000..77d2222 --- /dev/null +++ b/src/StructType/GetListMailBoxPickingDatesRetourRequestType.php @@ -0,0 +1,127 @@ + + */ +class GetListMailBoxPickingDatesRetourRequestType extends AbstractStructBase +{ + /** + * The contractNumber + * @var string + */ + public $contractNumber; + /** + * The password + * @var string + */ + public $password; + /** + * The sender + * @var \ColissimoPostage\StructType\Sender + */ + public $sender; + /** + * Constructor method for GetListMailBoxPickingDatesRetourRequestType + * @uses GetListMailBoxPickingDatesRetourRequestType::setContractNumber() + * @uses GetListMailBoxPickingDatesRetourRequestType::setPassword() + * @uses GetListMailBoxPickingDatesRetourRequestType::setSender() + * @param string $contractNumber + * @param string $password + * @param \ColissimoPostage\StructType\Sender $sender + */ + public function __construct($contractNumber = null, $password = null, \ColissimoPostage\StructType\Sender $sender = null) + { + $this + ->setContractNumber($contractNumber) + ->setPassword($password) + ->setSender($sender); + } + /** + * Get contractNumber value + * @return string|null + */ + public function getContractNumber() + { + return $this->contractNumber; + } + /** + * Set contractNumber value + * @param string $contractNumber + * @return \ColissimoPostage\StructType\GetListMailBoxPickingDatesRetourRequestType + */ + public function setContractNumber($contractNumber = null) + { + // validation for constraint: string + if (!is_null($contractNumber) && !is_string($contractNumber)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($contractNumber)), __LINE__); + } + $this->contractNumber = $contractNumber; + return $this; + } + /** + * Get password value + * @return string|null + */ + public function getPassword() + { + return $this->password; + } + /** + * Set password value + * @param string $password + * @return \ColissimoPostage\StructType\GetListMailBoxPickingDatesRetourRequestType + */ + public function setPassword($password = null) + { + // validation for constraint: string + if (!is_null($password) && !is_string($password)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($password)), __LINE__); + } + $this->password = $password; + return $this; + } + /** + * Get sender value + * @return \ColissimoPostage\StructType\Sender|null + */ + public function getSender() + { + return $this->sender; + } + /** + * Set sender value + * @param \ColissimoPostage\StructType\Sender $sender + * @return \ColissimoPostage\StructType\GetListMailBoxPickingDatesRetourRequestType + */ + public function setSender(\ColissimoPostage\StructType\Sender $sender = null) + { + $this->sender = $sender; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\GetListMailBoxPickingDatesRetourRequestType + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/GetProductInter.php b/src/StructType/GetProductInter.php new file mode 100644 index 0000000..b68a9ad --- /dev/null +++ b/src/StructType/GetProductInter.php @@ -0,0 +1,73 @@ + + */ +class GetProductInter extends AbstractStructBase +{ + /** + * The getProductInterRequest + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\GetProductInterRequest + */ + public $getProductInterRequest; + /** + * Constructor method for getProductInter + * @uses GetProductInter::setGetProductInterRequest() + * @param \ColissimoPostage\StructType\GetProductInterRequest + * $getProductInterRequest + */ + public function __construct(\ColissimoPostage\StructType\GetProductInterRequest $getProductInterRequest = null) + { + $this + ->setGetProductInterRequest($getProductInterRequest); + } + /** + * Get getProductInterRequest value + * @return \ColissimoPostage\StructType\GetProductInterRequest|null + */ + public function getGetProductInterRequest() + { + return $this->getProductInterRequest; + } + /** + * Set getProductInterRequest value + * @param \ColissimoPostage\StructType\GetProductInterRequest + * $getProductInterRequest + * @return \ColissimoPostage\StructType\GetProductInter + */ + public function setGetProductInterRequest(\ColissimoPostage\StructType\GetProductInterRequest $getProductInterRequest = null) + { + $this->getProductInterRequest = $getProductInterRequest; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\GetProductInter + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/GetProductInterRequest.php b/src/StructType/GetProductInterRequest.php new file mode 100644 index 0000000..42a56bb --- /dev/null +++ b/src/StructType/GetProductInterRequest.php @@ -0,0 +1,311 @@ + + */ +class GetProductInterRequest extends AbstractStructBase +{ + /** + * The contractNumber + * @var string + */ + public $contractNumber; + /** + * The password + * @var string + */ + public $password; + /** + * The productCode + * @var string + */ + public $productCode; + /** + * The insurance + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var bool + */ + public $insurance; + /** + * The nonMachinable + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var bool + */ + public $nonMachinable; + /** + * The returnReceipt + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var bool + */ + public $returnReceipt; + /** + * The countryCode + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $countryCode; + /** + * The zipCode + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $zipCode; + /** + * The city + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $city; + /** + * Constructor method for getProductInterRequest + * @uses GetProductInterRequest::setContractNumber() + * @uses GetProductInterRequest::setPassword() + * @uses GetProductInterRequest::setProductCode() + * @uses GetProductInterRequest::setInsurance() + * @uses GetProductInterRequest::setNonMachinable() + * @uses GetProductInterRequest::setReturnReceipt() + * @uses GetProductInterRequest::setCountryCode() + * @uses GetProductInterRequest::setZipCode() + * @uses GetProductInterRequest::setCity() + * @param string $contractNumber + * @param string $password + * @param string $productCode + * @param bool $insurance + * @param bool $nonMachinable + * @param bool $returnReceipt + * @param string $countryCode + * @param string $zipCode + * @param string $city + */ + public function __construct($contractNumber = null, $password = null, $productCode = null, $insurance = null, $nonMachinable = null, $returnReceipt = null, $countryCode = null, $zipCode = null, $city = null) + { + $this + ->setContractNumber($contractNumber) + ->setPassword($password) + ->setProductCode($productCode) + ->setInsurance($insurance) + ->setNonMachinable($nonMachinable) + ->setReturnReceipt($returnReceipt) + ->setCountryCode($countryCode) + ->setZipCode($zipCode) + ->setCity($city); + } + /** + * Get contractNumber value + * @return string|null + */ + public function getContractNumber() + { + return $this->contractNumber; + } + /** + * Set contractNumber value + * @param string $contractNumber + * @return \ColissimoPostage\StructType\GetProductInterRequest + */ + public function setContractNumber($contractNumber = null) + { + // validation for constraint: string + if (!is_null($contractNumber) && !is_string($contractNumber)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($contractNumber)), __LINE__); + } + $this->contractNumber = $contractNumber; + return $this; + } + /** + * Get password value + * @return string|null + */ + public function getPassword() + { + return $this->password; + } + /** + * Set password value + * @param string $password + * @return \ColissimoPostage\StructType\GetProductInterRequest + */ + public function setPassword($password = null) + { + // validation for constraint: string + if (!is_null($password) && !is_string($password)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($password)), __LINE__); + } + $this->password = $password; + return $this; + } + /** + * Get productCode value + * @return string|null + */ + public function getProductCode() + { + return $this->productCode; + } + /** + * Set productCode value + * @param string $productCode + * @return \ColissimoPostage\StructType\GetProductInterRequest + */ + public function setProductCode($productCode = null) + { + // validation for constraint: string + if (!is_null($productCode) && !is_string($productCode)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($productCode)), __LINE__); + } + $this->productCode = $productCode; + return $this; + } + /** + * Get insurance value + * @return bool|null + */ + public function getInsurance() + { + return $this->insurance; + } + /** + * Set insurance value + * @param bool $insurance + * @return \ColissimoPostage\StructType\GetProductInterRequest + */ + public function setInsurance($insurance = null) + { + $this->insurance = $insurance; + return $this; + } + /** + * Get nonMachinable value + * @return bool|null + */ + public function getNonMachinable() + { + return $this->nonMachinable; + } + /** + * Set nonMachinable value + * @param bool $nonMachinable + * @return \ColissimoPostage\StructType\GetProductInterRequest + */ + public function setNonMachinable($nonMachinable = null) + { + $this->nonMachinable = $nonMachinable; + return $this; + } + /** + * Get returnReceipt value + * @return bool|null + */ + public function getReturnReceipt() + { + return $this->returnReceipt; + } + /** + * Set returnReceipt value + * @param bool $returnReceipt + * @return \ColissimoPostage\StructType\GetProductInterRequest + */ + public function setReturnReceipt($returnReceipt = null) + { + $this->returnReceipt = $returnReceipt; + return $this; + } + /** + * Get countryCode value + * @return string|null + */ + public function getCountryCode() + { + return $this->countryCode; + } + /** + * Set countryCode value + * @param string $countryCode + * @return \ColissimoPostage\StructType\GetProductInterRequest + */ + public function setCountryCode($countryCode = null) + { + // validation for constraint: string + if (!is_null($countryCode) && !is_string($countryCode)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($countryCode)), __LINE__); + } + $this->countryCode = $countryCode; + return $this; + } + /** + * Get zipCode value + * @return string|null + */ + public function getZipCode() + { + return $this->zipCode; + } + /** + * Set zipCode value + * @param string $zipCode + * @return \ColissimoPostage\StructType\GetProductInterRequest + */ + public function setZipCode($zipCode = null) + { + // validation for constraint: string + if (!is_null($zipCode) && !is_string($zipCode)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($zipCode)), __LINE__); + } + $this->zipCode = $zipCode; + return $this; + } + /** + * Get city value + * @return string|null + */ + public function getCity() + { + return $this->city; + } + /** + * Set city value + * @param string $city + * @return \ColissimoPostage\StructType\GetProductInterRequest + */ + public function setCity($city = null) + { + // validation for constraint: string + if (!is_null($city) && !is_string($city)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($city)), __LINE__); + } + $this->city = $city; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\GetProductInterRequest + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/GetProductInterRequestType.php b/src/StructType/GetProductInterRequestType.php new file mode 100644 index 0000000..5f8cac8 --- /dev/null +++ b/src/StructType/GetProductInterRequestType.php @@ -0,0 +1,311 @@ + + */ +class GetProductInterRequestType extends AbstractStructBase +{ + /** + * The contractNumber + * @var string + */ + public $contractNumber; + /** + * The password + * @var string + */ + public $password; + /** + * The productCode + * @var string + */ + public $productCode; + /** + * The insurance + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var bool + */ + public $insurance; + /** + * The nonMachinable + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var bool + */ + public $nonMachinable; + /** + * The returnReceipt + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var bool + */ + public $returnReceipt; + /** + * The countryCode + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $countryCode; + /** + * The zipCode + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $zipCode; + /** + * The city + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $city; + /** + * Constructor method for GetProductInterRequestType + * @uses GetProductInterRequestType::setContractNumber() + * @uses GetProductInterRequestType::setPassword() + * @uses GetProductInterRequestType::setProductCode() + * @uses GetProductInterRequestType::setInsurance() + * @uses GetProductInterRequestType::setNonMachinable() + * @uses GetProductInterRequestType::setReturnReceipt() + * @uses GetProductInterRequestType::setCountryCode() + * @uses GetProductInterRequestType::setZipCode() + * @uses GetProductInterRequestType::setCity() + * @param string $contractNumber + * @param string $password + * @param string $productCode + * @param bool $insurance + * @param bool $nonMachinable + * @param bool $returnReceipt + * @param string $countryCode + * @param string $zipCode + * @param string $city + */ + public function __construct($contractNumber = null, $password = null, $productCode = null, $insurance = null, $nonMachinable = null, $returnReceipt = null, $countryCode = null, $zipCode = null, $city = null) + { + $this + ->setContractNumber($contractNumber) + ->setPassword($password) + ->setProductCode($productCode) + ->setInsurance($insurance) + ->setNonMachinable($nonMachinable) + ->setReturnReceipt($returnReceipt) + ->setCountryCode($countryCode) + ->setZipCode($zipCode) + ->setCity($city); + } + /** + * Get contractNumber value + * @return string|null + */ + public function getContractNumber() + { + return $this->contractNumber; + } + /** + * Set contractNumber value + * @param string $contractNumber + * @return \ColissimoPostage\StructType\GetProductInterRequestType + */ + public function setContractNumber($contractNumber = null) + { + // validation for constraint: string + if (!is_null($contractNumber) && !is_string($contractNumber)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($contractNumber)), __LINE__); + } + $this->contractNumber = $contractNumber; + return $this; + } + /** + * Get password value + * @return string|null + */ + public function getPassword() + { + return $this->password; + } + /** + * Set password value + * @param string $password + * @return \ColissimoPostage\StructType\GetProductInterRequestType + */ + public function setPassword($password = null) + { + // validation for constraint: string + if (!is_null($password) && !is_string($password)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($password)), __LINE__); + } + $this->password = $password; + return $this; + } + /** + * Get productCode value + * @return string|null + */ + public function getProductCode() + { + return $this->productCode; + } + /** + * Set productCode value + * @param string $productCode + * @return \ColissimoPostage\StructType\GetProductInterRequestType + */ + public function setProductCode($productCode = null) + { + // validation for constraint: string + if (!is_null($productCode) && !is_string($productCode)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($productCode)), __LINE__); + } + $this->productCode = $productCode; + return $this; + } + /** + * Get insurance value + * @return bool|null + */ + public function getInsurance() + { + return $this->insurance; + } + /** + * Set insurance value + * @param bool $insurance + * @return \ColissimoPostage\StructType\GetProductInterRequestType + */ + public function setInsurance($insurance = null) + { + $this->insurance = $insurance; + return $this; + } + /** + * Get nonMachinable value + * @return bool|null + */ + public function getNonMachinable() + { + return $this->nonMachinable; + } + /** + * Set nonMachinable value + * @param bool $nonMachinable + * @return \ColissimoPostage\StructType\GetProductInterRequestType + */ + public function setNonMachinable($nonMachinable = null) + { + $this->nonMachinable = $nonMachinable; + return $this; + } + /** + * Get returnReceipt value + * @return bool|null + */ + public function getReturnReceipt() + { + return $this->returnReceipt; + } + /** + * Set returnReceipt value + * @param bool $returnReceipt + * @return \ColissimoPostage\StructType\GetProductInterRequestType + */ + public function setReturnReceipt($returnReceipt = null) + { + $this->returnReceipt = $returnReceipt; + return $this; + } + /** + * Get countryCode value + * @return string|null + */ + public function getCountryCode() + { + return $this->countryCode; + } + /** + * Set countryCode value + * @param string $countryCode + * @return \ColissimoPostage\StructType\GetProductInterRequestType + */ + public function setCountryCode($countryCode = null) + { + // validation for constraint: string + if (!is_null($countryCode) && !is_string($countryCode)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($countryCode)), __LINE__); + } + $this->countryCode = $countryCode; + return $this; + } + /** + * Get zipCode value + * @return string|null + */ + public function getZipCode() + { + return $this->zipCode; + } + /** + * Set zipCode value + * @param string $zipCode + * @return \ColissimoPostage\StructType\GetProductInterRequestType + */ + public function setZipCode($zipCode = null) + { + // validation for constraint: string + if (!is_null($zipCode) && !is_string($zipCode)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($zipCode)), __LINE__); + } + $this->zipCode = $zipCode; + return $this; + } + /** + * Get city value + * @return string|null + */ + public function getCity() + { + return $this->city; + } + /** + * Set city value + * @param string $city + * @return \ColissimoPostage\StructType\GetProductInterRequestType + */ + public function setCity($city = null) + { + // validation for constraint: string + if (!is_null($city) && !is_string($city)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($city)), __LINE__); + } + $this->city = $city; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\GetProductInterRequestType + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/GetProductInterResponse.php b/src/StructType/GetProductInterResponse.php new file mode 100644 index 0000000..141631b --- /dev/null +++ b/src/StructType/GetProductInterResponse.php @@ -0,0 +1,71 @@ + + */ +class GetProductInterResponse extends AbstractStructBase +{ + /** + * The return + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\GetProductInterResponseType + */ + public $return; + /** + * Constructor method for getProductInterResponse + * @uses GetProductInterResponse::setReturn() + * @param \ColissimoPostage\StructType\GetProductInterResponseType $return + */ + public function __construct(\ColissimoPostage\StructType\GetProductInterResponseType $return = null) + { + $this + ->setReturn($return); + } + /** + * Get return value + * @return \ColissimoPostage\StructType\GetProductInterResponseType|null + */ + public function getReturn() + { + return $this->return; + } + /** + * Set return value + * @param \ColissimoPostage\StructType\GetProductInterResponseType $return + * @return \ColissimoPostage\StructType\GetProductInterResponse + */ + public function setReturn(\ColissimoPostage\StructType\GetProductInterResponseType $return = null) + { + $this->return = $return; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\GetProductInterResponse + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/GetProductInterResponseType.php b/src/StructType/GetProductInterResponseType.php new file mode 100644 index 0000000..1f0ab71 --- /dev/null +++ b/src/StructType/GetProductInterResponseType.php @@ -0,0 +1,195 @@ + + */ +class GetProductInterResponseType extends BaseResponse +{ + /** + * The product + * Meta informations extracted from the WSDL + * - maxOccurs: unbounded + * - minOccurs: 0 + * - nillable: true + * @var string[] + */ + public $product; + /** + * The partnerType + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $partnerType; + /** + * The returnTypeChoice + * Meta informations extracted from the WSDL + * - maxOccurs: unbounded + * - minOccurs: 0 + * - nillable: true + * @var string[] + */ + public $returnTypeChoice; + /** + * Constructor method for GetProductInterResponseType + * @uses GetProductInterResponseType::setProduct() + * @uses GetProductInterResponseType::setPartnerType() + * @uses GetProductInterResponseType::setReturnTypeChoice() + * @param string[] $product + * @param string $partnerType + * @param string[] $returnTypeChoice + */ + public function __construct(array $product = array(), $partnerType = null, array $returnTypeChoice = array()) + { + $this + ->setProduct($product) + ->setPartnerType($partnerType) + ->setReturnTypeChoice($returnTypeChoice); + } + /** + * Get product value + * An additional test has been added (isset) before returning the property value as + * this property may have been unset before, due to the fact that this property is + * removable from the request (nillable=true+minOccurs=0) + * @return string[]|null + */ + public function getProduct() + { + return isset($this->product) ? $this->product : null; + } + /** + * Set product value + * This property is removable from request (nillable=true+minOccurs=0), therefore + * if the value assigned to this property is null, it is removed from this object + * @throws \InvalidArgumentException + * @param string[] $product + * @return \ColissimoPostage\StructType\GetProductInterResponseType + */ + public function setProduct(array $product = array()) + { + foreach ($product as $getProductInterResponseTypeProductItem) { + // validation for constraint: itemType + if (!is_string($getProductInterResponseTypeProductItem)) { + throw new \InvalidArgumentException(sprintf('The product property can only contain items of string, "%s" given', is_object($getProductInterResponseTypeProductItem) ? get_class($getProductInterResponseTypeProductItem) : gettype($getProductInterResponseTypeProductItem)), __LINE__); + } + } + if (is_null($product)) { + unset($this->product); + } else { + $this->product = $product; + } + return $this; + } + /** + * Add item to product value + * @throws \InvalidArgumentException + * @param string $item + * @return \ColissimoPostage\StructType\GetProductInterResponseType + */ + public function addToProduct($item) + { + // validation for constraint: itemType + if (!is_string($item)) { + throw new \InvalidArgumentException(sprintf('The product property can only contain items of string, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__); + } + $this->product[] = $item; + return $this; + } + /** + * Get partnerType value + * @return string|null + */ + public function getPartnerType() + { + return $this->partnerType; + } + /** + * Set partnerType value + * @param string $partnerType + * @return \ColissimoPostage\StructType\GetProductInterResponseType + */ + public function setPartnerType($partnerType = null) + { + // validation for constraint: string + if (!is_null($partnerType) && !is_string($partnerType)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($partnerType)), __LINE__); + } + $this->partnerType = $partnerType; + return $this; + } + /** + * Get returnTypeChoice value + * An additional test has been added (isset) before returning the property value as + * this property may have been unset before, due to the fact that this property is + * removable from the request (nillable=true+minOccurs=0) + * @return string[]|null + */ + public function getReturnTypeChoice() + { + return isset($this->returnTypeChoice) ? $this->returnTypeChoice : null; + } + /** + * Set returnTypeChoice value + * This property is removable from request (nillable=true+minOccurs=0), therefore + * if the value assigned to this property is null, it is removed from this object + * @throws \InvalidArgumentException + * @param string[] $returnTypeChoice + * @return \ColissimoPostage\StructType\GetProductInterResponseType + */ + public function setReturnTypeChoice(array $returnTypeChoice = array()) + { + foreach ($returnTypeChoice as $getProductInterResponseTypeReturnTypeChoiceItem) { + // validation for constraint: itemType + if (!is_string($getProductInterResponseTypeReturnTypeChoiceItem)) { + throw new \InvalidArgumentException(sprintf('The returnTypeChoice property can only contain items of string, "%s" given', is_object($getProductInterResponseTypeReturnTypeChoiceItem) ? get_class($getProductInterResponseTypeReturnTypeChoiceItem) : gettype($getProductInterResponseTypeReturnTypeChoiceItem)), __LINE__); + } + } + if (is_null($returnTypeChoice)) { + unset($this->returnTypeChoice); + } else { + $this->returnTypeChoice = $returnTypeChoice; + } + return $this; + } + /** + * Add item to returnTypeChoice value + * @throws \InvalidArgumentException + * @param string $item + * @return \ColissimoPostage\StructType\GetProductInterResponseType + */ + public function addToReturnTypeChoice($item) + { + // validation for constraint: itemType + if (!is_string($item)) { + throw new \InvalidArgumentException(sprintf('The returnTypeChoice property can only contain items of string, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__); + } + $this->returnTypeChoice[] = $item; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\GetProductInterResponseType + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/LabelResponse.php b/src/StructType/LabelResponse.php new file mode 100644 index 0000000..30ef78c --- /dev/null +++ b/src/StructType/LabelResponse.php @@ -0,0 +1,195 @@ + + */ +class LabelResponse extends AbstractStructBase +{ + /** + * The label + * Meta informations extracted from the WSDL + * - expectedContentTypes: application/octet-stream + * - minOccurs: 0 + * @var base64Binary + */ + public $label; + /** + * The cn23 + * Meta informations extracted from the WSDL + * - expectedContentTypes: application/octet-stream + * - minOccurs: 0 + * @var base64Binary + */ + public $cn23; + /** + * The parcelNumber + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $parcelNumber; + /** + * The parcelNumberPartner + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $parcelNumberPartner; + /** + * The pdfUrl + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $pdfUrl; + /** + * Constructor method for labelResponse + * @uses LabelResponse::setLabel() + * @uses LabelResponse::setCn23() + * @uses LabelResponse::setParcelNumber() + * @uses LabelResponse::setParcelNumberPartner() + * @uses LabelResponse::setPdfUrl() + * @param base64Binary $label + * @param base64Binary $cn23 + * @param string $parcelNumber + * @param string $parcelNumberPartner + * @param string $pdfUrl + */ + public function __construct(base64Binary $label = null, base64Binary $cn23 = null, $parcelNumber = null, $parcelNumberPartner = null, $pdfUrl = null) + { + $this + ->setLabel($label) + ->setCn23($cn23) + ->setParcelNumber($parcelNumber) + ->setParcelNumberPartner($parcelNumberPartner) + ->setPdfUrl($pdfUrl); + } + /** + * Get label value + * @return base64Binary|null + */ + public function getLabel() + { + return $this->label; + } + /** + * Set label value + * @param base64Binary $label + * @return \ColissimoPostage\StructType\LabelResponse + */ + public function setLabel(base64Binary $label = null) + { + $this->label = $label; + return $this; + } + /** + * Get cn23 value + * @return base64Binary|null + */ + public function getCn23() + { + return $this->cn23; + } + /** + * Set cn23 value + * @param base64Binary $cn23 + * @return \ColissimoPostage\StructType\LabelResponse + */ + public function setCn23(base64Binary $cn23 = null) + { + $this->cn23 = $cn23; + return $this; + } + /** + * Get parcelNumber value + * @return string|null + */ + public function getParcelNumber() + { + return $this->parcelNumber; + } + /** + * Set parcelNumber value + * @param string $parcelNumber + * @return \ColissimoPostage\StructType\LabelResponse + */ + public function setParcelNumber($parcelNumber = null) + { + // validation for constraint: string + if (!is_null($parcelNumber) && !is_string($parcelNumber)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($parcelNumber)), __LINE__); + } + $this->parcelNumber = $parcelNumber; + return $this; + } + /** + * Get parcelNumberPartner value + * @return string|null + */ + public function getParcelNumberPartner() + { + return $this->parcelNumberPartner; + } + /** + * Set parcelNumberPartner value + * @param string $parcelNumberPartner + * @return \ColissimoPostage\StructType\LabelResponse + */ + public function setParcelNumberPartner($parcelNumberPartner = null) + { + // validation for constraint: string + if (!is_null($parcelNumberPartner) && !is_string($parcelNumberPartner)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($parcelNumberPartner)), __LINE__); + } + $this->parcelNumberPartner = $parcelNumberPartner; + return $this; + } + /** + * Get pdfUrl value + * @return string|null + */ + public function getPdfUrl() + { + return $this->pdfUrl; + } + /** + * Set pdfUrl value + * @param string $pdfUrl + * @return \ColissimoPostage\StructType\LabelResponse + */ + public function setPdfUrl($pdfUrl = null) + { + // validation for constraint: string + if (!is_null($pdfUrl) && !is_string($pdfUrl)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($pdfUrl)), __LINE__); + } + $this->pdfUrl = $pdfUrl; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\LabelResponse + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/Letter.php b/src/StructType/Letter.php new file mode 100644 index 0000000..f632c54 --- /dev/null +++ b/src/StructType/Letter.php @@ -0,0 +1,173 @@ + + */ +class Letter extends AbstractStructBase +{ + /** + * The service + * @var \ColissimoPostage\StructType\Service + */ + public $service; + /** + * The parcel + * @var \ColissimoPostage\StructType\Parcel + */ + public $parcel; + /** + * The customsDeclarations + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\CustomsDeclarations + */ + public $customsDeclarations; + /** + * The sender + * @var \ColissimoPostage\StructType\Sender + */ + public $sender; + /** + * The addressee + * @var \ColissimoPostage\StructType\Addressee + */ + public $addressee; + /** + * Constructor method for letter + * @uses Letter::setService() + * @uses Letter::setParcel() + * @uses Letter::setCustomsDeclarations() + * @uses Letter::setSender() + * @uses Letter::setAddressee() + * @param \ColissimoPostage\StructType\Service $service + * @param \ColissimoPostage\StructType\Parcel $parcel + * @param \ColissimoPostage\StructType\CustomsDeclarations $customsDeclarations + * @param \ColissimoPostage\StructType\Sender $sender + * @param \ColissimoPostage\StructType\Addressee $addressee + */ + public function __construct(\ColissimoPostage\StructType\Service $service = null, \ColissimoPostage\StructType\Parcel $parcel = null, \ColissimoPostage\StructType\CustomsDeclarations $customsDeclarations = null, \ColissimoPostage\StructType\Sender $sender = null, \ColissimoPostage\StructType\Addressee $addressee = null) + { + $this + ->setService($service) + ->setParcel($parcel) + ->setCustomsDeclarations($customsDeclarations) + ->setSender($sender) + ->setAddressee($addressee); + } + /** + * Get service value + * @return \ColissimoPostage\StructType\Service|null + */ + public function getService() + { + return $this->service; + } + /** + * Set service value + * @param \ColissimoPostage\StructType\Service $service + * @return \ColissimoPostage\StructType\Letter + */ + public function setService(\ColissimoPostage\StructType\Service $service = null) + { + $this->service = $service; + return $this; + } + /** + * Get parcel value + * @return \ColissimoPostage\StructType\Parcel|null + */ + public function getParcel() + { + return $this->parcel; + } + /** + * Set parcel value + * @param \ColissimoPostage\StructType\Parcel $parcel + * @return \ColissimoPostage\StructType\Letter + */ + public function setParcel(\ColissimoPostage\StructType\Parcel $parcel = null) + { + $this->parcel = $parcel; + return $this; + } + /** + * Get customsDeclarations value + * @return \ColissimoPostage\StructType\CustomsDeclarations|null + */ + public function getCustomsDeclarations() + { + return $this->customsDeclarations; + } + /** + * Set customsDeclarations value + * @param \ColissimoPostage\StructType\CustomsDeclarations $customsDeclarations + * @return \ColissimoPostage\StructType\Letter + */ + public function setCustomsDeclarations(\ColissimoPostage\StructType\CustomsDeclarations $customsDeclarations = null) + { + $this->customsDeclarations = $customsDeclarations; + return $this; + } + /** + * Get sender value + * @return \ColissimoPostage\StructType\Sender|null + */ + public function getSender() + { + return $this->sender; + } + /** + * Set sender value + * @param \ColissimoPostage\StructType\Sender $sender + * @return \ColissimoPostage\StructType\Letter + */ + public function setSender(\ColissimoPostage\StructType\Sender $sender = null) + { + $this->sender = $sender; + return $this; + } + /** + * Get addressee value + * @return \ColissimoPostage\StructType\Addressee|null + */ + public function getAddressee() + { + return $this->addressee; + } + /** + * Set addressee value + * @param \ColissimoPostage\StructType\Addressee $addressee + * @return \ColissimoPostage\StructType\Letter + */ + public function setAddressee(\ColissimoPostage\StructType\Addressee $addressee = null) + { + $this->addressee = $addressee; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\Letter + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/Message.php b/src/StructType/Message.php new file mode 100644 index 0000000..9ca5164 --- /dev/null +++ b/src/StructType/Message.php @@ -0,0 +1,137 @@ + + */ +class Message extends AbstractStructBase +{ + /** + * The id + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $id; + /** + * The messageContent + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $messageContent; + /** + * The type + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $type; + /** + * Constructor method for Message + * @uses Message::setId() + * @uses Message::setMessageContent() + * @uses Message::setType() + * @param string $id + * @param string $messageContent + * @param string $type + */ + public function __construct($id = null, $messageContent = null, $type = null) + { + $this + ->setId($id) + ->setMessageContent($messageContent) + ->setType($type); + } + /** + * Get id value + * @return string|null + */ + public function getId() + { + return $this->id; + } + /** + * Set id value + * @param string $id + * @return \ColissimoPostage\StructType\Message + */ + public function setId($id = null) + { + // validation for constraint: string + if (!is_null($id) && !is_string($id)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($id)), __LINE__); + } + $this->id = $id; + return $this; + } + /** + * Get messageContent value + * @return string|null + */ + public function getMessageContent() + { + return $this->messageContent; + } + /** + * Set messageContent value + * @param string $messageContent + * @return \ColissimoPostage\StructType\Message + */ + public function setMessageContent($messageContent = null) + { + // validation for constraint: string + if (!is_null($messageContent) && !is_string($messageContent)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($messageContent)), __LINE__); + } + $this->messageContent = $messageContent; + return $this; + } + /** + * Get type value + * @return string|null + */ + public function getType() + { + return $this->type; + } + /** + * Set type value + * @param string $type + * @return \ColissimoPostage\StructType\Message + */ + public function setType($type = null) + { + // validation for constraint: string + if (!is_null($type) && !is_string($type)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($type)), __LINE__); + } + $this->type = $type; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\Message + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/OutputFormat.php b/src/StructType/OutputFormat.php new file mode 100644 index 0000000..912f95b --- /dev/null +++ b/src/StructType/OutputFormat.php @@ -0,0 +1,197 @@ + + */ +class OutputFormat extends AbstractStructBase +{ + /** + * The x + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var int + */ + public $x; + /** + * The y + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var int + */ + public $y; + /** + * The outputPrintingType + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $outputPrintingType; + /** + * The dematerialized + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var bool + */ + public $dematerialized; + /** + * The returnType + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $returnType; + /** + * Constructor method for outputFormat + * @uses OutputFormat::setX() + * @uses OutputFormat::setY() + * @uses OutputFormat::setOutputPrintingType() + * @uses OutputFormat::setDematerialized() + * @uses OutputFormat::setReturnType() + * @param int $x + * @param int $y + * @param string $outputPrintingType + * @param bool $dematerialized + * @param string $returnType + */ + public function __construct($x = null, $y = null, $outputPrintingType = null, $dematerialized = null, $returnType = null) + { + $this + ->setX($x) + ->setY($y) + ->setOutputPrintingType($outputPrintingType) + ->setDematerialized($dematerialized) + ->setReturnType($returnType); + } + /** + * Get x value + * @return int|null + */ + public function getX() + { + return $this->x; + } + /** + * Set x value + * @param int $x + * @return \ColissimoPostage\StructType\OutputFormat + */ + public function setX($x = null) + { + // validation for constraint: int + if (!is_null($x) && !is_int($x)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide an int, "%s" given', gettype($x)), __LINE__); + } + $this->x = $x; + return $this; + } + /** + * Get y value + * @return int|null + */ + public function getY() + { + return $this->y; + } + /** + * Set y value + * @param int $y + * @return \ColissimoPostage\StructType\OutputFormat + */ + public function setY($y = null) + { + // validation for constraint: int + if (!is_null($y) && !is_int($y)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide an int, "%s" given', gettype($y)), __LINE__); + } + $this->y = $y; + return $this; + } + /** + * Get outputPrintingType value + * @return string|null + */ + public function getOutputPrintingType() + { + return $this->outputPrintingType; + } + /** + * Set outputPrintingType value + * @param string $outputPrintingType + * @return \ColissimoPostage\StructType\OutputFormat + */ + public function setOutputPrintingType($outputPrintingType = null) + { + // validation for constraint: string + if (!is_null($outputPrintingType) && !is_string($outputPrintingType)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($outputPrintingType)), __LINE__); + } + $this->outputPrintingType = $outputPrintingType; + return $this; + } + /** + * Get dematerialized value + * @return bool|null + */ + public function getDematerialized() + { + return $this->dematerialized; + } + /** + * Set dematerialized value + * @param bool $dematerialized + * @return \ColissimoPostage\StructType\OutputFormat + */ + public function setDematerialized($dematerialized = null) + { + $this->dematerialized = $dematerialized; + return $this; + } + /** + * Get returnType value + * @return string|null + */ + public function getReturnType() + { + return $this->returnType; + } + /** + * Set returnType value + * @param string $returnType + * @return \ColissimoPostage\StructType\OutputFormat + */ + public function setReturnType($returnType = null) + { + // validation for constraint: string + if (!is_null($returnType) && !is_string($returnType)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($returnType)), __LINE__); + } + $this->returnType = $returnType; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\OutputFormat + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/Parcel.php b/src/StructType/Parcel.php new file mode 100644 index 0000000..768fed8 --- /dev/null +++ b/src/StructType/Parcel.php @@ -0,0 +1,405 @@ + + */ +class Parcel extends AbstractStructBase +{ + /** + * The parcelNumber + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $parcelNumber; + /** + * The insuranceAmount + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var int + */ + public $insuranceAmount; + /** + * The insuranceValue + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var int + */ + public $insuranceValue; + /** + * The recommendationLevel + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $recommendationLevel; + /** + * The weight + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var float + */ + public $weight; + /** + * The nonMachinable + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var bool + */ + public $nonMachinable; + /** + * The COD + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var bool + */ + public $COD; + /** + * The CODAmount + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var int + */ + public $CODAmount; + /** + * The returnReceipt + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var bool + */ + public $returnReceipt; + /** + * The instructions + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $instructions; + /** + * The pickupLocationId + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $pickupLocationId; + /** + * The ftd + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var bool + */ + public $ftd; + /** + * Constructor method for parcel + * @uses Parcel::setParcelNumber() + * @uses Parcel::setInsuranceAmount() + * @uses Parcel::setInsuranceValue() + * @uses Parcel::setRecommendationLevel() + * @uses Parcel::setWeight() + * @uses Parcel::setNonMachinable() + * @uses Parcel::setCOD() + * @uses Parcel::setCODAmount() + * @uses Parcel::setReturnReceipt() + * @uses Parcel::setInstructions() + * @uses Parcel::setPickupLocationId() + * @uses Parcel::setFtd() + * @param string $parcelNumber + * @param int $insuranceAmount + * @param int $insuranceValue + * @param string $recommendationLevel + * @param float $weight + * @param bool $nonMachinable + * @param bool $cOD + * @param int $cODAmount + * @param bool $returnReceipt + * @param string $instructions + * @param string $pickupLocationId + * @param bool $ftd + */ + public function __construct($parcelNumber = null, $insuranceAmount = null, $insuranceValue = null, $recommendationLevel = null, $weight = null, $nonMachinable = null, $cOD = null, $cODAmount = null, $returnReceipt = null, $instructions = null, $pickupLocationId = null, $ftd = null) + { + $this + ->setParcelNumber($parcelNumber) + ->setInsuranceAmount($insuranceAmount) + ->setInsuranceValue($insuranceValue) + ->setRecommendationLevel($recommendationLevel) + ->setWeight($weight) + ->setNonMachinable($nonMachinable) + ->setCOD($cOD) + ->setCODAmount($cODAmount) + ->setReturnReceipt($returnReceipt) + ->setInstructions($instructions) + ->setPickupLocationId($pickupLocationId) + ->setFtd($ftd); + } + /** + * Get parcelNumber value + * @return string|null + */ + public function getParcelNumber() + { + return $this->parcelNumber; + } + /** + * Set parcelNumber value + * @param string $parcelNumber + * @return \ColissimoPostage\StructType\Parcel + */ + public function setParcelNumber($parcelNumber = null) + { + // validation for constraint: string + if (!is_null($parcelNumber) && !is_string($parcelNumber)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($parcelNumber)), __LINE__); + } + $this->parcelNumber = $parcelNumber; + return $this; + } + /** + * Get insuranceAmount value + * @return int|null + */ + public function getInsuranceAmount() + { + return $this->insuranceAmount; + } + /** + * Set insuranceAmount value + * @param int $insuranceAmount + * @return \ColissimoPostage\StructType\Parcel + */ + public function setInsuranceAmount($insuranceAmount = null) + { + // validation for constraint: int + if (!is_null($insuranceAmount) && !is_int($insuranceAmount)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide an int, "%s" given', gettype($insuranceAmount)), __LINE__); + } + $this->insuranceAmount = $insuranceAmount; + return $this; + } + /** + * Get insuranceValue value + * @return int|null + */ + public function getInsuranceValue() + { + return $this->insuranceValue; + } + /** + * Set insuranceValue value + * @param int $insuranceValue + * @return \ColissimoPostage\StructType\Parcel + */ + public function setInsuranceValue($insuranceValue = null) + { + // validation for constraint: int + if (!is_null($insuranceValue) && !is_int($insuranceValue)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide an int, "%s" given', gettype($insuranceValue)), __LINE__); + } + $this->insuranceValue = $insuranceValue; + return $this; + } + /** + * Get recommendationLevel value + * @return string|null + */ + public function getRecommendationLevel() + { + return $this->recommendationLevel; + } + /** + * Set recommendationLevel value + * @param string $recommendationLevel + * @return \ColissimoPostage\StructType\Parcel + */ + public function setRecommendationLevel($recommendationLevel = null) + { + // validation for constraint: string + if (!is_null($recommendationLevel) && !is_string($recommendationLevel)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($recommendationLevel)), __LINE__); + } + $this->recommendationLevel = $recommendationLevel; + return $this; + } + /** + * Get weight value + * @return float|null + */ + public function getWeight() + { + return $this->weight; + } + /** + * Set weight value + * @param float $weight + * @return \ColissimoPostage\StructType\Parcel + */ + public function setWeight($weight = null) + { + $this->weight = $weight; + return $this; + } + /** + * Get nonMachinable value + * @return bool|null + */ + public function getNonMachinable() + { + return $this->nonMachinable; + } + /** + * Set nonMachinable value + * @param bool $nonMachinable + * @return \ColissimoPostage\StructType\Parcel + */ + public function setNonMachinable($nonMachinable = null) + { + $this->nonMachinable = $nonMachinable; + return $this; + } + /** + * Get COD value + * @return bool|null + */ + public function getCOD() + { + return $this->COD; + } + /** + * Set COD value + * @param bool $cOD + * @return \ColissimoPostage\StructType\Parcel + */ + public function setCOD($cOD = null) + { + $this->COD = $cOD; + return $this; + } + /** + * Get CODAmount value + * @return int|null + */ + public function getCODAmount() + { + return $this->CODAmount; + } + /** + * Set CODAmount value + * @param int $cODAmount + * @return \ColissimoPostage\StructType\Parcel + */ + public function setCODAmount($cODAmount = null) + { + // validation for constraint: int + if (!is_null($cODAmount) && !is_int($cODAmount)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide an int, "%s" given', gettype($cODAmount)), __LINE__); + } + $this->CODAmount = $cODAmount; + return $this; + } + /** + * Get returnReceipt value + * @return bool|null + */ + public function getReturnReceipt() + { + return $this->returnReceipt; + } + /** + * Set returnReceipt value + * @param bool $returnReceipt + * @return \ColissimoPostage\StructType\Parcel + */ + public function setReturnReceipt($returnReceipt = null) + { + $this->returnReceipt = $returnReceipt; + return $this; + } + /** + * Get instructions value + * @return string|null + */ + public function getInstructions() + { + return $this->instructions; + } + /** + * Set instructions value + * @param string $instructions + * @return \ColissimoPostage\StructType\Parcel + */ + public function setInstructions($instructions = null) + { + // validation for constraint: string + if (!is_null($instructions) && !is_string($instructions)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($instructions)), __LINE__); + } + $this->instructions = $instructions; + return $this; + } + /** + * Get pickupLocationId value + * @return string|null + */ + public function getPickupLocationId() + { + return $this->pickupLocationId; + } + /** + * Set pickupLocationId value + * @param string $pickupLocationId + * @return \ColissimoPostage\StructType\Parcel + */ + public function setPickupLocationId($pickupLocationId = null) + { + // validation for constraint: string + if (!is_null($pickupLocationId) && !is_string($pickupLocationId)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($pickupLocationId)), __LINE__); + } + $this->pickupLocationId = $pickupLocationId; + return $this; + } + /** + * Get ftd value + * @return bool|null + */ + public function getFtd() + { + return $this->ftd; + } + /** + * Set ftd value + * @param bool $ftd + * @return \ColissimoPostage\StructType\Parcel + */ + public function setFtd($ftd = null) + { + $this->ftd = $ftd; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\Parcel + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/PickupLocation.php b/src/StructType/PickupLocation.php new file mode 100644 index 0000000..3ec2c37 --- /dev/null +++ b/src/StructType/PickupLocation.php @@ -0,0 +1,325 @@ + + */ +class PickupLocation extends AbstractStructBase +{ + /** + * The address + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\AddressPickupLocation + */ + public $address; + /** + * The groupRouting + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $groupRouting; + /** + * The name + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $name; + /** + * The netWork + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $netWork; + /** + * The pointId + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $pointId; + /** + * The routingFileVersion + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $routingFileVersion; + /** + * The routingZipCode + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $routingZipCode; + /** + * The serviceLabel + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $serviceLabel; + /** + * The sortDistribution + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $sortDistribution; + /** + * Constructor method for pickupLocation + * @uses PickupLocation::setAddress() + * @uses PickupLocation::setGroupRouting() + * @uses PickupLocation::setName() + * @uses PickupLocation::setNetWork() + * @uses PickupLocation::setPointId() + * @uses PickupLocation::setRoutingFileVersion() + * @uses PickupLocation::setRoutingZipCode() + * @uses PickupLocation::setServiceLabel() + * @uses PickupLocation::setSortDistribution() + * @param \ColissimoPostage\StructType\AddressPickupLocation $address + * @param string $groupRouting + * @param string $name + * @param string $netWork + * @param string $pointId + * @param string $routingFileVersion + * @param string $routingZipCode + * @param string $serviceLabel + * @param string $sortDistribution + */ + public function __construct(\ColissimoPostage\StructType\AddressPickupLocation $address = null, $groupRouting = null, $name = null, $netWork = null, $pointId = null, $routingFileVersion = null, $routingZipCode = null, $serviceLabel = null, $sortDistribution = null) + { + $this + ->setAddress($address) + ->setGroupRouting($groupRouting) + ->setName($name) + ->setNetWork($netWork) + ->setPointId($pointId) + ->setRoutingFileVersion($routingFileVersion) + ->setRoutingZipCode($routingZipCode) + ->setServiceLabel($serviceLabel) + ->setSortDistribution($sortDistribution); + } + /** + * Get address value + * @return \ColissimoPostage\StructType\AddressPickupLocation|null + */ + public function getAddress() + { + return $this->address; + } + /** + * Set address value + * @param \ColissimoPostage\StructType\AddressPickupLocation $address + * @return \ColissimoPostage\StructType\PickupLocation + */ + public function setAddress(\ColissimoPostage\StructType\AddressPickupLocation $address = null) + { + $this->address = $address; + return $this; + } + /** + * Get groupRouting value + * @return string|null + */ + public function getGroupRouting() + { + return $this->groupRouting; + } + /** + * Set groupRouting value + * @param string $groupRouting + * @return \ColissimoPostage\StructType\PickupLocation + */ + public function setGroupRouting($groupRouting = null) + { + // validation for constraint: string + if (!is_null($groupRouting) && !is_string($groupRouting)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($groupRouting)), __LINE__); + } + $this->groupRouting = $groupRouting; + return $this; + } + /** + * Get name value + * @return string|null + */ + public function getName() + { + return $this->name; + } + /** + * Set name value + * @param string $name + * @return \ColissimoPostage\StructType\PickupLocation + */ + public function setName($name = null) + { + // validation for constraint: string + if (!is_null($name) && !is_string($name)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($name)), __LINE__); + } + $this->name = $name; + return $this; + } + /** + * Get netWork value + * @return string|null + */ + public function getNetWork() + { + return $this->netWork; + } + /** + * Set netWork value + * @param string $netWork + * @return \ColissimoPostage\StructType\PickupLocation + */ + public function setNetWork($netWork = null) + { + // validation for constraint: string + if (!is_null($netWork) && !is_string($netWork)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($netWork)), __LINE__); + } + $this->netWork = $netWork; + return $this; + } + /** + * Get pointId value + * @return string|null + */ + public function getPointId() + { + return $this->pointId; + } + /** + * Set pointId value + * @param string $pointId + * @return \ColissimoPostage\StructType\PickupLocation + */ + public function setPointId($pointId = null) + { + // validation for constraint: string + if (!is_null($pointId) && !is_string($pointId)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($pointId)), __LINE__); + } + $this->pointId = $pointId; + return $this; + } + /** + * Get routingFileVersion value + * @return string|null + */ + public function getRoutingFileVersion() + { + return $this->routingFileVersion; + } + /** + * Set routingFileVersion value + * @param string $routingFileVersion + * @return \ColissimoPostage\StructType\PickupLocation + */ + public function setRoutingFileVersion($routingFileVersion = null) + { + // validation for constraint: string + if (!is_null($routingFileVersion) && !is_string($routingFileVersion)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($routingFileVersion)), __LINE__); + } + $this->routingFileVersion = $routingFileVersion; + return $this; + } + /** + * Get routingZipCode value + * @return string|null + */ + public function getRoutingZipCode() + { + return $this->routingZipCode; + } + /** + * Set routingZipCode value + * @param string $routingZipCode + * @return \ColissimoPostage\StructType\PickupLocation + */ + public function setRoutingZipCode($routingZipCode = null) + { + // validation for constraint: string + if (!is_null($routingZipCode) && !is_string($routingZipCode)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($routingZipCode)), __LINE__); + } + $this->routingZipCode = $routingZipCode; + return $this; + } + /** + * Get serviceLabel value + * @return string|null + */ + public function getServiceLabel() + { + return $this->serviceLabel; + } + /** + * Set serviceLabel value + * @param string $serviceLabel + * @return \ColissimoPostage\StructType\PickupLocation + */ + public function setServiceLabel($serviceLabel = null) + { + // validation for constraint: string + if (!is_null($serviceLabel) && !is_string($serviceLabel)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($serviceLabel)), __LINE__); + } + $this->serviceLabel = $serviceLabel; + return $this; + } + /** + * Get sortDistribution value + * @return string|null + */ + public function getSortDistribution() + { + return $this->sortDistribution; + } + /** + * Set sortDistribution value + * @param string $sortDistribution + * @return \ColissimoPostage\StructType\PickupLocation + */ + public function setSortDistribution($sortDistribution = null) + { + // validation for constraint: string + if (!is_null($sortDistribution) && !is_string($sortDistribution)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($sortDistribution)), __LINE__); + } + $this->sortDistribution = $sortDistribution; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\PickupLocation + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/PlanPickup.php b/src/StructType/PlanPickup.php new file mode 100644 index 0000000..d55fc7e --- /dev/null +++ b/src/StructType/PlanPickup.php @@ -0,0 +1,71 @@ + + */ +class PlanPickup extends AbstractStructBase +{ + /** + * The planPickupRequest + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\PlanPickupRequest + */ + public $planPickupRequest; + /** + * Constructor method for planPickup + * @uses PlanPickup::setPlanPickupRequest() + * @param \ColissimoPostage\StructType\PlanPickupRequest $planPickupRequest + */ + public function __construct(\ColissimoPostage\StructType\PlanPickupRequest $planPickupRequest = null) + { + $this + ->setPlanPickupRequest($planPickupRequest); + } + /** + * Get planPickupRequest value + * @return \ColissimoPostage\StructType\PlanPickupRequest|null + */ + public function getPlanPickupRequest() + { + return $this->planPickupRequest; + } + /** + * Set planPickupRequest value + * @param \ColissimoPostage\StructType\PlanPickupRequest $planPickupRequest + * @return \ColissimoPostage\StructType\PlanPickup + */ + public function setPlanPickupRequest(\ColissimoPostage\StructType\PlanPickupRequest $planPickupRequest = null) + { + $this->planPickupRequest = $planPickupRequest; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\PlanPickup + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/PlanPickupRequest.php b/src/StructType/PlanPickupRequest.php new file mode 100644 index 0000000..e2ed197 --- /dev/null +++ b/src/StructType/PlanPickupRequest.php @@ -0,0 +1,189 @@ + + */ +class PlanPickupRequest extends AbstractStructBase +{ + /** + * The contractNumber + * @var string + */ + public $contractNumber; + /** + * The password + * @var string + */ + public $password; + /** + * The parcelNumber + * @var string + */ + public $parcelNumber; + /** + * The mailBoxPickingDate + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $mailBoxPickingDate; + /** + * The sender + * @var \ColissimoPostage\StructType\Sender + */ + public $sender; + /** + * Constructor method for planPickupRequest + * @uses PlanPickupRequest::setContractNumber() + * @uses PlanPickupRequest::setPassword() + * @uses PlanPickupRequest::setParcelNumber() + * @uses PlanPickupRequest::setMailBoxPickingDate() + * @uses PlanPickupRequest::setSender() + * @param string $contractNumber + * @param string $password + * @param string $parcelNumber + * @param string $mailBoxPickingDate + * @param \ColissimoPostage\StructType\Sender $sender + */ + public function __construct($contractNumber = null, $password = null, $parcelNumber = null, $mailBoxPickingDate = null, \ColissimoPostage\StructType\Sender $sender = null) + { + $this + ->setContractNumber($contractNumber) + ->setPassword($password) + ->setParcelNumber($parcelNumber) + ->setMailBoxPickingDate($mailBoxPickingDate) + ->setSender($sender); + } + /** + * Get contractNumber value + * @return string|null + */ + public function getContractNumber() + { + return $this->contractNumber; + } + /** + * Set contractNumber value + * @param string $contractNumber + * @return \ColissimoPostage\StructType\PlanPickupRequest + */ + public function setContractNumber($contractNumber = null) + { + // validation for constraint: string + if (!is_null($contractNumber) && !is_string($contractNumber)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($contractNumber)), __LINE__); + } + $this->contractNumber = $contractNumber; + return $this; + } + /** + * Get password value + * @return string|null + */ + public function getPassword() + { + return $this->password; + } + /** + * Set password value + * @param string $password + * @return \ColissimoPostage\StructType\PlanPickupRequest + */ + public function setPassword($password = null) + { + // validation for constraint: string + if (!is_null($password) && !is_string($password)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($password)), __LINE__); + } + $this->password = $password; + return $this; + } + /** + * Get parcelNumber value + * @return string|null + */ + public function getParcelNumber() + { + return $this->parcelNumber; + } + /** + * Set parcelNumber value + * @param string $parcelNumber + * @return \ColissimoPostage\StructType\PlanPickupRequest + */ + public function setParcelNumber($parcelNumber = null) + { + // validation for constraint: string + if (!is_null($parcelNumber) && !is_string($parcelNumber)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($parcelNumber)), __LINE__); + } + $this->parcelNumber = $parcelNumber; + return $this; + } + /** + * Get mailBoxPickingDate value + * @return string|null + */ + public function getMailBoxPickingDate() + { + return $this->mailBoxPickingDate; + } + /** + * Set mailBoxPickingDate value + * @param string $mailBoxPickingDate + * @return \ColissimoPostage\StructType\PlanPickupRequest + */ + public function setMailBoxPickingDate($mailBoxPickingDate = null) + { + // validation for constraint: string + if (!is_null($mailBoxPickingDate) && !is_string($mailBoxPickingDate)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($mailBoxPickingDate)), __LINE__); + } + $this->mailBoxPickingDate = $mailBoxPickingDate; + return $this; + } + /** + * Get sender value + * @return \ColissimoPostage\StructType\Sender|null + */ + public function getSender() + { + return $this->sender; + } + /** + * Set sender value + * @param \ColissimoPostage\StructType\Sender $sender + * @return \ColissimoPostage\StructType\PlanPickupRequest + */ + public function setSender(\ColissimoPostage\StructType\Sender $sender = null) + { + $this->sender = $sender; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\PlanPickupRequest + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/PlanPickupRequestType.php b/src/StructType/PlanPickupRequestType.php new file mode 100644 index 0000000..7d7f5cb --- /dev/null +++ b/src/StructType/PlanPickupRequestType.php @@ -0,0 +1,189 @@ + + */ +class PlanPickupRequestType extends AbstractStructBase +{ + /** + * The contractNumber + * @var string + */ + public $contractNumber; + /** + * The password + * @var string + */ + public $password; + /** + * The parcelNumber + * @var string + */ + public $parcelNumber; + /** + * The mailBoxPickingDate + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $mailBoxPickingDate; + /** + * The sender + * @var \ColissimoPostage\StructType\Sender + */ + public $sender; + /** + * Constructor method for planPickupRequestType + * @uses PlanPickupRequestType::setContractNumber() + * @uses PlanPickupRequestType::setPassword() + * @uses PlanPickupRequestType::setParcelNumber() + * @uses PlanPickupRequestType::setMailBoxPickingDate() + * @uses PlanPickupRequestType::setSender() + * @param string $contractNumber + * @param string $password + * @param string $parcelNumber + * @param string $mailBoxPickingDate + * @param \ColissimoPostage\StructType\Sender $sender + */ + public function __construct($contractNumber = null, $password = null, $parcelNumber = null, $mailBoxPickingDate = null, \ColissimoPostage\StructType\Sender $sender = null) + { + $this + ->setContractNumber($contractNumber) + ->setPassword($password) + ->setParcelNumber($parcelNumber) + ->setMailBoxPickingDate($mailBoxPickingDate) + ->setSender($sender); + } + /** + * Get contractNumber value + * @return string|null + */ + public function getContractNumber() + { + return $this->contractNumber; + } + /** + * Set contractNumber value + * @param string $contractNumber + * @return \ColissimoPostage\StructType\PlanPickupRequestType + */ + public function setContractNumber($contractNumber = null) + { + // validation for constraint: string + if (!is_null($contractNumber) && !is_string($contractNumber)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($contractNumber)), __LINE__); + } + $this->contractNumber = $contractNumber; + return $this; + } + /** + * Get password value + * @return string|null + */ + public function getPassword() + { + return $this->password; + } + /** + * Set password value + * @param string $password + * @return \ColissimoPostage\StructType\PlanPickupRequestType + */ + public function setPassword($password = null) + { + // validation for constraint: string + if (!is_null($password) && !is_string($password)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($password)), __LINE__); + } + $this->password = $password; + return $this; + } + /** + * Get parcelNumber value + * @return string|null + */ + public function getParcelNumber() + { + return $this->parcelNumber; + } + /** + * Set parcelNumber value + * @param string $parcelNumber + * @return \ColissimoPostage\StructType\PlanPickupRequestType + */ + public function setParcelNumber($parcelNumber = null) + { + // validation for constraint: string + if (!is_null($parcelNumber) && !is_string($parcelNumber)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($parcelNumber)), __LINE__); + } + $this->parcelNumber = $parcelNumber; + return $this; + } + /** + * Get mailBoxPickingDate value + * @return string|null + */ + public function getMailBoxPickingDate() + { + return $this->mailBoxPickingDate; + } + /** + * Set mailBoxPickingDate value + * @param string $mailBoxPickingDate + * @return \ColissimoPostage\StructType\PlanPickupRequestType + */ + public function setMailBoxPickingDate($mailBoxPickingDate = null) + { + // validation for constraint: string + if (!is_null($mailBoxPickingDate) && !is_string($mailBoxPickingDate)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($mailBoxPickingDate)), __LINE__); + } + $this->mailBoxPickingDate = $mailBoxPickingDate; + return $this; + } + /** + * Get sender value + * @return \ColissimoPostage\StructType\Sender|null + */ + public function getSender() + { + return $this->sender; + } + /** + * Set sender value + * @param \ColissimoPostage\StructType\Sender $sender + * @return \ColissimoPostage\StructType\PlanPickupRequestType + */ + public function setSender(\ColissimoPostage\StructType\Sender $sender = null) + { + $this->sender = $sender; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\PlanPickupRequestType + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/PlanPickupResponse.php b/src/StructType/PlanPickupResponse.php new file mode 100644 index 0000000..1495fe6 --- /dev/null +++ b/src/StructType/PlanPickupResponse.php @@ -0,0 +1,71 @@ + + */ +class PlanPickupResponse extends AbstractStructBase +{ + /** + * The return + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\PlanPickupResponseType + */ + public $return; + /** + * Constructor method for planPickupResponse + * @uses PlanPickupResponse::setReturn() + * @param \ColissimoPostage\StructType\PlanPickupResponseType $return + */ + public function __construct(\ColissimoPostage\StructType\PlanPickupResponseType $return = null) + { + $this + ->setReturn($return); + } + /** + * Get return value + * @return \ColissimoPostage\StructType\PlanPickupResponseType|null + */ + public function getReturn() + { + return $this->return; + } + /** + * Set return value + * @param \ColissimoPostage\StructType\PlanPickupResponseType $return + * @return \ColissimoPostage\StructType\PlanPickupResponse + */ + public function setReturn(\ColissimoPostage\StructType\PlanPickupResponseType $return = null) + { + $this->return = $return; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\PlanPickupResponse + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/PlanPickupResponseType.php b/src/StructType/PlanPickupResponseType.php new file mode 100644 index 0000000..6a57c24 --- /dev/null +++ b/src/StructType/PlanPickupResponseType.php @@ -0,0 +1,40 @@ + + */ +class PlanPickupResponseType extends BaseResponse +{ + /** + * Constructor method for planPickupResponseType + */ + public function __construct() + { + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\PlanPickupResponseType + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/ReturnAddressBelgium.php b/src/StructType/ReturnAddressBelgium.php new file mode 100644 index 0000000..25a34c7 --- /dev/null +++ b/src/StructType/ReturnAddressBelgium.php @@ -0,0 +1,137 @@ + + */ +class ReturnAddressBelgium extends AbstractStructBase +{ + /** + * The line1 + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $line1; + /** + * The line2 + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $line2; + /** + * The mention + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $mention; + /** + * Constructor method for returnAddressBelgium + * @uses ReturnAddressBelgium::setLine1() + * @uses ReturnAddressBelgium::setLine2() + * @uses ReturnAddressBelgium::setMention() + * @param string $line1 + * @param string $line2 + * @param string $mention + */ + public function __construct($line1 = null, $line2 = null, $mention = null) + { + $this + ->setLine1($line1) + ->setLine2($line2) + ->setMention($mention); + } + /** + * Get line1 value + * @return string|null + */ + public function getLine1() + { + return $this->line1; + } + /** + * Set line1 value + * @param string $line1 + * @return \ColissimoPostage\StructType\ReturnAddressBelgium + */ + public function setLine1($line1 = null) + { + // validation for constraint: string + if (!is_null($line1) && !is_string($line1)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($line1)), __LINE__); + } + $this->line1 = $line1; + return $this; + } + /** + * Get line2 value + * @return string|null + */ + public function getLine2() + { + return $this->line2; + } + /** + * Set line2 value + * @param string $line2 + * @return \ColissimoPostage\StructType\ReturnAddressBelgium + */ + public function setLine2($line2 = null) + { + // validation for constraint: string + if (!is_null($line2) && !is_string($line2)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($line2)), __LINE__); + } + $this->line2 = $line2; + return $this; + } + /** + * Get mention value + * @return string|null + */ + public function getMention() + { + return $this->mention; + } + /** + * Set mention value + * @param string $mention + * @return \ColissimoPostage\StructType\ReturnAddressBelgium + */ + public function setMention($mention = null) + { + // validation for constraint: string + if (!is_null($mention) && !is_string($mention)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($mention)), __LINE__); + } + $this->mention = $mention; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\ReturnAddressBelgium + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/Routing.php b/src/StructType/Routing.php new file mode 100644 index 0000000..95dbc79 --- /dev/null +++ b/src/StructType/Routing.php @@ -0,0 +1,393 @@ + + */ +class Routing extends AbstractStructBase +{ + /** + * The barcodeId + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $barcodeId; + /** + * The depotDest + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $depotDest; + /** + * The destinationCountry + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $destinationCountry; + /** + * The destinationCountryText + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $destinationCountryText; + /** + * The groupingPriorityLabel + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $groupingPriorityLabel; + /** + * The partnerType + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $partnerType; + /** + * The routingVersion + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $routingVersion; + /** + * The serviceMark + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $serviceMark; + /** + * The serviceName + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $serviceName; + /** + * The sortDest + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $sortDest; + /** + * The sortOrigin + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $sortOrigin; + /** + * Constructor method for routing + * @uses Routing::setBarcodeId() + * @uses Routing::setDepotDest() + * @uses Routing::setDestinationCountry() + * @uses Routing::setDestinationCountryText() + * @uses Routing::setGroupingPriorityLabel() + * @uses Routing::setPartnerType() + * @uses Routing::setRoutingVersion() + * @uses Routing::setServiceMark() + * @uses Routing::setServiceName() + * @uses Routing::setSortDest() + * @uses Routing::setSortOrigin() + * @param string $barcodeId + * @param string $depotDest + * @param string $destinationCountry + * @param string $destinationCountryText + * @param string $groupingPriorityLabel + * @param string $partnerType + * @param string $routingVersion + * @param string $serviceMark + * @param string $serviceName + * @param string $sortDest + * @param string $sortOrigin + */ + public function __construct($barcodeId = null, $depotDest = null, $destinationCountry = null, $destinationCountryText = null, $groupingPriorityLabel = null, $partnerType = null, $routingVersion = null, $serviceMark = null, $serviceName = null, $sortDest = null, $sortOrigin = null) + { + $this + ->setBarcodeId($barcodeId) + ->setDepotDest($depotDest) + ->setDestinationCountry($destinationCountry) + ->setDestinationCountryText($destinationCountryText) + ->setGroupingPriorityLabel($groupingPriorityLabel) + ->setPartnerType($partnerType) + ->setRoutingVersion($routingVersion) + ->setServiceMark($serviceMark) + ->setServiceName($serviceName) + ->setSortDest($sortDest) + ->setSortOrigin($sortOrigin); + } + /** + * Get barcodeId value + * @return string|null + */ + public function getBarcodeId() + { + return $this->barcodeId; + } + /** + * Set barcodeId value + * @param string $barcodeId + * @return \ColissimoPostage\StructType\Routing + */ + public function setBarcodeId($barcodeId = null) + { + // validation for constraint: string + if (!is_null($barcodeId) && !is_string($barcodeId)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($barcodeId)), __LINE__); + } + $this->barcodeId = $barcodeId; + return $this; + } + /** + * Get depotDest value + * @return string|null + */ + public function getDepotDest() + { + return $this->depotDest; + } + /** + * Set depotDest value + * @param string $depotDest + * @return \ColissimoPostage\StructType\Routing + */ + public function setDepotDest($depotDest = null) + { + // validation for constraint: string + if (!is_null($depotDest) && !is_string($depotDest)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($depotDest)), __LINE__); + } + $this->depotDest = $depotDest; + return $this; + } + /** + * Get destinationCountry value + * @return string|null + */ + public function getDestinationCountry() + { + return $this->destinationCountry; + } + /** + * Set destinationCountry value + * @param string $destinationCountry + * @return \ColissimoPostage\StructType\Routing + */ + public function setDestinationCountry($destinationCountry = null) + { + // validation for constraint: string + if (!is_null($destinationCountry) && !is_string($destinationCountry)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($destinationCountry)), __LINE__); + } + $this->destinationCountry = $destinationCountry; + return $this; + } + /** + * Get destinationCountryText value + * @return string|null + */ + public function getDestinationCountryText() + { + return $this->destinationCountryText; + } + /** + * Set destinationCountryText value + * @param string $destinationCountryText + * @return \ColissimoPostage\StructType\Routing + */ + public function setDestinationCountryText($destinationCountryText = null) + { + // validation for constraint: string + if (!is_null($destinationCountryText) && !is_string($destinationCountryText)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($destinationCountryText)), __LINE__); + } + $this->destinationCountryText = $destinationCountryText; + return $this; + } + /** + * Get groupingPriorityLabel value + * @return string|null + */ + public function getGroupingPriorityLabel() + { + return $this->groupingPriorityLabel; + } + /** + * Set groupingPriorityLabel value + * @param string $groupingPriorityLabel + * @return \ColissimoPostage\StructType\Routing + */ + public function setGroupingPriorityLabel($groupingPriorityLabel = null) + { + // validation for constraint: string + if (!is_null($groupingPriorityLabel) && !is_string($groupingPriorityLabel)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($groupingPriorityLabel)), __LINE__); + } + $this->groupingPriorityLabel = $groupingPriorityLabel; + return $this; + } + /** + * Get partnerType value + * @return string|null + */ + public function getPartnerType() + { + return $this->partnerType; + } + /** + * Set partnerType value + * @param string $partnerType + * @return \ColissimoPostage\StructType\Routing + */ + public function setPartnerType($partnerType = null) + { + // validation for constraint: string + if (!is_null($partnerType) && !is_string($partnerType)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($partnerType)), __LINE__); + } + $this->partnerType = $partnerType; + return $this; + } + /** + * Get routingVersion value + * @return string|null + */ + public function getRoutingVersion() + { + return $this->routingVersion; + } + /** + * Set routingVersion value + * @param string $routingVersion + * @return \ColissimoPostage\StructType\Routing + */ + public function setRoutingVersion($routingVersion = null) + { + // validation for constraint: string + if (!is_null($routingVersion) && !is_string($routingVersion)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($routingVersion)), __LINE__); + } + $this->routingVersion = $routingVersion; + return $this; + } + /** + * Get serviceMark value + * @return string|null + */ + public function getServiceMark() + { + return $this->serviceMark; + } + /** + * Set serviceMark value + * @param string $serviceMark + * @return \ColissimoPostage\StructType\Routing + */ + public function setServiceMark($serviceMark = null) + { + // validation for constraint: string + if (!is_null($serviceMark) && !is_string($serviceMark)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($serviceMark)), __LINE__); + } + $this->serviceMark = $serviceMark; + return $this; + } + /** + * Get serviceName value + * @return string|null + */ + public function getServiceName() + { + return $this->serviceName; + } + /** + * Set serviceName value + * @param string $serviceName + * @return \ColissimoPostage\StructType\Routing + */ + public function setServiceName($serviceName = null) + { + // validation for constraint: string + if (!is_null($serviceName) && !is_string($serviceName)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($serviceName)), __LINE__); + } + $this->serviceName = $serviceName; + return $this; + } + /** + * Get sortDest value + * @return string|null + */ + public function getSortDest() + { + return $this->sortDest; + } + /** + * Set sortDest value + * @param string $sortDest + * @return \ColissimoPostage\StructType\Routing + */ + public function setSortDest($sortDest = null) + { + // validation for constraint: string + if (!is_null($sortDest) && !is_string($sortDest)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($sortDest)), __LINE__); + } + $this->sortDest = $sortDest; + return $this; + } + /** + * Get sortOrigin value + * @return string|null + */ + public function getSortOrigin() + { + return $this->sortOrigin; + } + /** + * Set sortOrigin value + * @param string $sortOrigin + * @return \ColissimoPostage\StructType\Routing + */ + public function setSortOrigin($sortOrigin = null) + { + // validation for constraint: string + if (!is_null($sortOrigin) && !is_string($sortOrigin)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($sortOrigin)), __LINE__); + } + $this->sortOrigin = $sortOrigin; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\Routing + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/Sender.php b/src/StructType/Sender.php new file mode 100644 index 0000000..39df1a2 --- /dev/null +++ b/src/StructType/Sender.php @@ -0,0 +1,481 @@ + + */ +class Sender extends AbstractStructBase +{ + /** + * The senderParcelRef + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $senderParcelRef; + /** + * The address + * @var \ColissimoPostage\StructType\Address + */ + public $address; + /** + * The line0 + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $line0; + /** + * The line1 + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $line1; + /** + * The line2 + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $line2; + /** + * The line3 + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $line3; + /** + * The countryCode + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $countryCode; + /** + * The zipCode + * @var string + */ + public $zipCode; + /** + * The city + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $city; + /** + * The companyName + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $companyName; + /** + * The lastName + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $lastName; + /** + * The firstName + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $firstName; + /** + * The email + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $email; + /** + * The phoneNumber + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $phoneNumber; + /** + * Constructor method for sender + * @uses Sender::setSenderParcelRef() + * @uses Sender::setAddress() + * @uses Sender::setLine0() + * @uses Sender::setLine1() + * @uses Sender::setLine2() + * @uses Sender::setLine3() + * @uses Sender::setCountryCode() + * @uses Sender::setZipCode() + * @uses Sender::setCity() + * @uses Sender::setCompanyName() + * @uses Sender::setLastName() + * @uses Sender::setFirstName() + * @uses Sender::setEmail() + * @uses Sender::setPhoneNumber() + * @param string $senderParcelRef + * @param \ColissimoPostage\StructType\Address $address + * @param string $line0 + * @param string $line1 + * @param string $line2 + * @param string $line3 + * @param string $countryCode + * @param string $zipCode + * @param string $city + * @param string $companyName + * @param string $lastName + * @param string $firstName + * @param string $email + * @param string $phoneNumber + */ + public function __construct($senderParcelRef = null, \ColissimoPostage\StructType\Address $address = null, $line0 = null, $line1 = null, $line2 = null, $line3 = null, $countryCode = null, $zipCode = null, $city = null, $companyName = null, $lastName = null, $firstName = null, $email = null, $phoneNumber = null) + { + $this + ->setSenderParcelRef($senderParcelRef) + ->setAddress($address) + ->setLine0($line0) + ->setLine1($line1) + ->setLine2($line2) + ->setLine3($line3) + ->setCountryCode($countryCode) + ->setZipCode($zipCode) + ->setCity($city) + ->setCompanyName($companyName) + ->setLastName($lastName) + ->setFirstName($firstName) + ->setEmail($email) + ->setPhoneNumber($phoneNumber); + } + /** + * Get senderParcelRef value + * @return string|null + */ + public function getSenderParcelRef() + { + return $this->senderParcelRef; + } + /** + * Set senderParcelRef value + * @param string $senderParcelRef + * @return \ColissimoPostage\StructType\Sender + */ + public function setSenderParcelRef($senderParcelRef = null) + { + // validation for constraint: string + if (!is_null($senderParcelRef) && !is_string($senderParcelRef)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($senderParcelRef)), __LINE__); + } + $this->senderParcelRef = $senderParcelRef; + return $this; + } + /** + * Get address value + * @return \ColissimoPostage\StructType\Address|null + */ + public function getAddress() + { + return $this->address; + } + /** + * Set address value + * @param \ColissimoPostage\StructType\Address $address + * @return \ColissimoPostage\StructType\Sender + */ + public function setAddress(\ColissimoPostage\StructType\Address $address = null) + { + $this->address = $address; + return $this; + } + /** + * Get line0 value + * @return string|null + */ + public function getLine0() + { + return $this->line0; + } + /** + * Set line0 value + * @param string $line0 + * @return \ColissimoPostage\StructType\Sender + */ + public function setLine0($line0 = null) + { + // validation for constraint: string + if (!is_null($line0) && !is_string($line0)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($line0)), __LINE__); + } + $this->line0 = $line0; + return $this; + } + /** + * Get line1 value + * @return string|null + */ + public function getLine1() + { + return $this->line1; + } + /** + * Set line1 value + * @param string $line1 + * @return \ColissimoPostage\StructType\Sender + */ + public function setLine1($line1 = null) + { + // validation for constraint: string + if (!is_null($line1) && !is_string($line1)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($line1)), __LINE__); + } + $this->line1 = $line1; + return $this; + } + /** + * Get line2 value + * @return string|null + */ + public function getLine2() + { + return $this->line2; + } + /** + * Set line2 value + * @param string $line2 + * @return \ColissimoPostage\StructType\Sender + */ + public function setLine2($line2 = null) + { + // validation for constraint: string + if (!is_null($line2) && !is_string($line2)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($line2)), __LINE__); + } + $this->line2 = $line2; + return $this; + } + /** + * Get line3 value + * @return string|null + */ + public function getLine3() + { + return $this->line3; + } + /** + * Set line3 value + * @param string $line3 + * @return \ColissimoPostage\StructType\Sender + */ + public function setLine3($line3 = null) + { + // validation for constraint: string + if (!is_null($line3) && !is_string($line3)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($line3)), __LINE__); + } + $this->line3 = $line3; + return $this; + } + /** + * Get countryCode value + * @return string|null + */ + public function getCountryCode() + { + return $this->countryCode; + } + /** + * Set countryCode value + * @param string $countryCode + * @return \ColissimoPostage\StructType\Sender + */ + public function setCountryCode($countryCode = null) + { + // validation for constraint: string + if (!is_null($countryCode) && !is_string($countryCode)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($countryCode)), __LINE__); + } + $this->countryCode = $countryCode; + return $this; + } + /** + * Get zipCode value + * @return string|null + */ + public function getZipCode() + { + return $this->zipCode; + } + /** + * Set zipCode value + * @param string $zipCode + * @return \ColissimoPostage\StructType\Sender + */ + public function setZipCode($zipCode = null) + { + // validation for constraint: string + if (!is_null($zipCode) && !is_string($zipCode)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($zipCode)), __LINE__); + } + $this->zipCode = $zipCode; + return $this; + } + /** + * Get city value + * @return string|null + */ + public function getCity() + { + return $this->city; + } + /** + * Set city value + * @param string $city + * @return \ColissimoPostage\StructType\Sender + */ + public function setCity($city = null) + { + // validation for constraint: string + if (!is_null($city) && !is_string($city)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($city)), __LINE__); + } + $this->city = $city; + return $this; + } + /** + * Get companyName value + * @return string|null + */ + public function getCompanyName() + { + return $this->companyName; + } + /** + * Set companyName value + * @param string $companyName + * @return \ColissimoPostage\StructType\Sender + */ + public function setCompanyName($companyName = null) + { + // validation for constraint: string + if (!is_null($companyName) && !is_string($companyName)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($companyName)), __LINE__); + } + $this->companyName = $companyName; + return $this; + } + /** + * Get lastName value + * @return string|null + */ + public function getLastName() + { + return $this->lastName; + } + /** + * Set lastName value + * @param string $lastName + * @return \ColissimoPostage\StructType\Sender + */ + public function setLastName($lastName = null) + { + // validation for constraint: string + if (!is_null($lastName) && !is_string($lastName)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($lastName)), __LINE__); + } + $this->lastName = $lastName; + return $this; + } + /** + * Get firstName value + * @return string|null + */ + public function getFirstName() + { + return $this->firstName; + } + /** + * Set firstName value + * @param string $firstName + * @return \ColissimoPostage\StructType\Sender + */ + public function setFirstName($firstName = null) + { + // validation for constraint: string + if (!is_null($firstName) && !is_string($firstName)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($firstName)), __LINE__); + } + $this->firstName = $firstName; + return $this; + } + /** + * Get email value + * @return string|null + */ + public function getEmail() + { + return $this->email; + } + /** + * Set email value + * @param string $email + * @return \ColissimoPostage\StructType\Sender + */ + public function setEmail($email = null) + { + // validation for constraint: string + if (!is_null($email) && !is_string($email)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($email)), __LINE__); + } + $this->email = $email; + return $this; + } + /** + * Get phoneNumber value + * @return string|null + */ + public function getPhoneNumber() + { + return $this->phoneNumber; + } + /** + * Set phoneNumber value + * @param string $phoneNumber + * @return \ColissimoPostage\StructType\Sender + */ + public function setPhoneNumber($phoneNumber = null) + { + // validation for constraint: string + if (!is_null($phoneNumber) && !is_string($phoneNumber)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($phoneNumber)), __LINE__); + } + $this->phoneNumber = $phoneNumber; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\Sender + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/Service.php b/src/StructType/Service.php new file mode 100644 index 0000000..90e5b12 --- /dev/null +++ b/src/StructType/Service.php @@ -0,0 +1,417 @@ + + */ +class Service extends AbstractStructBase +{ + /** + * The productCode + * @var string + */ + public $productCode; + /** + * The depositDate + * @var string + */ + public $depositDate; + /** + * The mailBoxPicking + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var bool + */ + public $mailBoxPicking; + /** + * The mailBoxPickingDate + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $mailBoxPickingDate; + /** + * The vatCode + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var int + */ + public $vatCode; + /** + * The vatPercentage + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var int + */ + public $vatPercentage; + /** + * The vatAmount + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var int + */ + public $vatAmount; + /** + * The transportationAmount + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var int + */ + public $transportationAmount; + /** + * The totalAmount + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var int + */ + public $totalAmount; + /** + * The orderNumber + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $orderNumber; + /** + * The commercialName + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $commercialName; + /** + * The returnTypeChoice + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var int + */ + public $returnTypeChoice; + /** + * Constructor method for service + * @uses Service::setProductCode() + * @uses Service::setDepositDate() + * @uses Service::setMailBoxPicking() + * @uses Service::setMailBoxPickingDate() + * @uses Service::setVatCode() + * @uses Service::setVatPercentage() + * @uses Service::setVatAmount() + * @uses Service::setTransportationAmount() + * @uses Service::setTotalAmount() + * @uses Service::setOrderNumber() + * @uses Service::setCommercialName() + * @uses Service::setReturnTypeChoice() + * @param string $productCode + * @param string $depositDate + * @param bool $mailBoxPicking + * @param string $mailBoxPickingDate + * @param int $vatCode + * @param int $vatPercentage + * @param int $vatAmount + * @param int $transportationAmount + * @param int $totalAmount + * @param string $orderNumber + * @param string $commercialName + * @param int $returnTypeChoice + */ + public function __construct($productCode = null, $depositDate = null, $mailBoxPicking = null, $mailBoxPickingDate = null, $vatCode = null, $vatPercentage = null, $vatAmount = null, $transportationAmount = null, $totalAmount = null, $orderNumber = null, $commercialName = null, $returnTypeChoice = null) + { + $this + ->setProductCode($productCode) + ->setDepositDate($depositDate) + ->setMailBoxPicking($mailBoxPicking) + ->setMailBoxPickingDate($mailBoxPickingDate) + ->setVatCode($vatCode) + ->setVatPercentage($vatPercentage) + ->setVatAmount($vatAmount) + ->setTransportationAmount($transportationAmount) + ->setTotalAmount($totalAmount) + ->setOrderNumber($orderNumber) + ->setCommercialName($commercialName) + ->setReturnTypeChoice($returnTypeChoice); + } + /** + * Get productCode value + * @return string|null + */ + public function getProductCode() + { + return $this->productCode; + } + /** + * Set productCode value + * @param string $productCode + * @return \ColissimoPostage\StructType\Service + */ + public function setProductCode($productCode = null) + { + // validation for constraint: string + if (!is_null($productCode) && !is_string($productCode)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($productCode)), __LINE__); + } + $this->productCode = $productCode; + return $this; + } + /** + * Get depositDate value + * @return string|null + */ + public function getDepositDate() + { + return $this->depositDate; + } + /** + * Set depositDate value + * @param string $depositDate + * @return \ColissimoPostage\StructType\Service + */ + public function setDepositDate($depositDate = null) + { + // validation for constraint: string + if (!is_null($depositDate) && !is_string($depositDate)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($depositDate)), __LINE__); + } + $this->depositDate = $depositDate; + return $this; + } + /** + * Get mailBoxPicking value + * @return bool|null + */ + public function getMailBoxPicking() + { + return $this->mailBoxPicking; + } + /** + * Set mailBoxPicking value + * @param bool $mailBoxPicking + * @return \ColissimoPostage\StructType\Service + */ + public function setMailBoxPicking($mailBoxPicking = null) + { + $this->mailBoxPicking = $mailBoxPicking; + return $this; + } + /** + * Get mailBoxPickingDate value + * @return string|null + */ + public function getMailBoxPickingDate() + { + return $this->mailBoxPickingDate; + } + /** + * Set mailBoxPickingDate value + * @param string $mailBoxPickingDate + * @return \ColissimoPostage\StructType\Service + */ + public function setMailBoxPickingDate($mailBoxPickingDate = null) + { + // validation for constraint: string + if (!is_null($mailBoxPickingDate) && !is_string($mailBoxPickingDate)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($mailBoxPickingDate)), __LINE__); + } + $this->mailBoxPickingDate = $mailBoxPickingDate; + return $this; + } + /** + * Get vatCode value + * @return int|null + */ + public function getVatCode() + { + return $this->vatCode; + } + /** + * Set vatCode value + * @param int $vatCode + * @return \ColissimoPostage\StructType\Service + */ + public function setVatCode($vatCode = null) + { + // validation for constraint: int + if (!is_null($vatCode) && !is_int($vatCode)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide an int, "%s" given', gettype($vatCode)), __LINE__); + } + $this->vatCode = $vatCode; + return $this; + } + /** + * Get vatPercentage value + * @return int|null + */ + public function getVatPercentage() + { + return $this->vatPercentage; + } + /** + * Set vatPercentage value + * @param int $vatPercentage + * @return \ColissimoPostage\StructType\Service + */ + public function setVatPercentage($vatPercentage = null) + { + // validation for constraint: int + if (!is_null($vatPercentage) && !is_int($vatPercentage)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide an int, "%s" given', gettype($vatPercentage)), __LINE__); + } + $this->vatPercentage = $vatPercentage; + return $this; + } + /** + * Get vatAmount value + * @return int|null + */ + public function getVatAmount() + { + return $this->vatAmount; + } + /** + * Set vatAmount value + * @param int $vatAmount + * @return \ColissimoPostage\StructType\Service + */ + public function setVatAmount($vatAmount = null) + { + // validation for constraint: int + if (!is_null($vatAmount) && !is_int($vatAmount)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide an int, "%s" given', gettype($vatAmount)), __LINE__); + } + $this->vatAmount = $vatAmount; + return $this; + } + /** + * Get transportationAmount value + * @return int|null + */ + public function getTransportationAmount() + { + return $this->transportationAmount; + } + /** + * Set transportationAmount value + * @param int $transportationAmount + * @return \ColissimoPostage\StructType\Service + */ + public function setTransportationAmount($transportationAmount = null) + { + // validation for constraint: int + if (!is_null($transportationAmount) && !is_int($transportationAmount)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide an int, "%s" given', gettype($transportationAmount)), __LINE__); + } + $this->transportationAmount = $transportationAmount; + return $this; + } + /** + * Get totalAmount value + * @return int|null + */ + public function getTotalAmount() + { + return $this->totalAmount; + } + /** + * Set totalAmount value + * @param int $totalAmount + * @return \ColissimoPostage\StructType\Service + */ + public function setTotalAmount($totalAmount = null) + { + // validation for constraint: int + if (!is_null($totalAmount) && !is_int($totalAmount)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide an int, "%s" given', gettype($totalAmount)), __LINE__); + } + $this->totalAmount = $totalAmount; + return $this; + } + /** + * Get orderNumber value + * @return string|null + */ + public function getOrderNumber() + { + return $this->orderNumber; + } + /** + * Set orderNumber value + * @param string $orderNumber + * @return \ColissimoPostage\StructType\Service + */ + public function setOrderNumber($orderNumber = null) + { + // validation for constraint: string + if (!is_null($orderNumber) && !is_string($orderNumber)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($orderNumber)), __LINE__); + } + $this->orderNumber = $orderNumber; + return $this; + } + /** + * Get commercialName value + * @return string|null + */ + public function getCommercialName() + { + return $this->commercialName; + } + /** + * Set commercialName value + * @param string $commercialName + * @return \ColissimoPostage\StructType\Service + */ + public function setCommercialName($commercialName = null) + { + // validation for constraint: string + if (!is_null($commercialName) && !is_string($commercialName)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($commercialName)), __LINE__); + } + $this->commercialName = $commercialName; + return $this; + } + /** + * Get returnTypeChoice value + * @return int|null + */ + public function getReturnTypeChoice() + { + return $this->returnTypeChoice; + } + /** + * Set returnTypeChoice value + * @param int $returnTypeChoice + * @return \ColissimoPostage\StructType\Service + */ + public function setReturnTypeChoice($returnTypeChoice = null) + { + // validation for constraint: int + if (!is_null($returnTypeChoice) && !is_int($returnTypeChoice)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide an int, "%s" given', gettype($returnTypeChoice)), __LINE__); + } + $this->returnTypeChoice = $returnTypeChoice; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\Service + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/Site.php b/src/StructType/Site.php new file mode 100644 index 0000000..90fb4e9 --- /dev/null +++ b/src/StructType/Site.php @@ -0,0 +1,133 @@ + + */ +class Site extends AbstractStructBase +{ + /** + * The address + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\AddressPCH + */ + public $address; + /** + * The code + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $code; + /** + * The name + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $name; + /** + * Constructor method for site + * @uses Site::setAddress() + * @uses Site::setCode() + * @uses Site::setName() + * @param \ColissimoPostage\StructType\AddressPCH $address + * @param string $code + * @param string $name + */ + public function __construct(\ColissimoPostage\StructType\AddressPCH $address = null, $code = null, $name = null) + { + $this + ->setAddress($address) + ->setCode($code) + ->setName($name); + } + /** + * Get address value + * @return \ColissimoPostage\StructType\AddressPCH|null + */ + public function getAddress() + { + return $this->address; + } + /** + * Set address value + * @param \ColissimoPostage\StructType\AddressPCH $address + * @return \ColissimoPostage\StructType\Site + */ + public function setAddress(\ColissimoPostage\StructType\AddressPCH $address = null) + { + $this->address = $address; + return $this; + } + /** + * Get code value + * @return string|null + */ + public function getCode() + { + return $this->code; + } + /** + * Set code value + * @param string $code + * @return \ColissimoPostage\StructType\Site + */ + public function setCode($code = null) + { + // validation for constraint: string + if (!is_null($code) && !is_string($code)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($code)), __LINE__); + } + $this->code = $code; + return $this; + } + /** + * Get name value + * @return string|null + */ + public function getName() + { + return $this->name; + } + /** + * Set name value + * @param string $name + * @return \ColissimoPostage\StructType\Site + */ + public function setName($name = null) + { + // validation for constraint: string + if (!is_null($name) && !is_string($name)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($name)), __LINE__); + } + $this->name = $name; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\Site + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/XmlResponse.php b/src/StructType/XmlResponse.php new file mode 100644 index 0000000..438a0a3 --- /dev/null +++ b/src/StructType/XmlResponse.php @@ -0,0 +1,522 @@ + + */ +class XmlResponse extends AbstractStructBase +{ + /** + * The cn23 + * Meta informations extracted from the WSDL + * - expectedContentTypes: application/octet-stream + * - minOccurs: 0 + * @var base64Binary + */ + public $cn23; + /** + * The addressee + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\Addressee + */ + public $addressee; + /** + * The barCodeCityssimo + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $barCodeCityssimo; + /** + * The barCodePCH + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $barCodePCH; + /** + * The barCodeRouting + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $barCodeRouting; + /** + * The belgiumLabel + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\BelgiumLabel + */ + public $belgiumLabel; + /** + * The contractNumber + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $contractNumber; + /** + * The numberPCH + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $numberPCH; + /** + * The numberRouting + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $numberRouting; + /** + * The parcelNumber + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $parcelNumber; + /** + * The parcelNumberPartner + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $parcelNumberPartner; + /** + * The pickupLocation + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\PickupLocation + */ + public $pickupLocation; + /** + * The routing + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\Routing + */ + public $routing; + /** + * The sender + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\Sender + */ + public $sender; + /** + * The sitePCH + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\Site + */ + public $sitePCH; + /** + * The zoneRouting + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\ZoneRouting + */ + public $zoneRouting; + /** + * Constructor method for xmlResponse + * @uses XmlResponse::setCn23() + * @uses XmlResponse::setAddressee() + * @uses XmlResponse::setBarCodeCityssimo() + * @uses XmlResponse::setBarCodePCH() + * @uses XmlResponse::setBarCodeRouting() + * @uses XmlResponse::setBelgiumLabel() + * @uses XmlResponse::setContractNumber() + * @uses XmlResponse::setNumberPCH() + * @uses XmlResponse::setNumberRouting() + * @uses XmlResponse::setParcelNumber() + * @uses XmlResponse::setParcelNumberPartner() + * @uses XmlResponse::setPickupLocation() + * @uses XmlResponse::setRouting() + * @uses XmlResponse::setSender() + * @uses XmlResponse::setSitePCH() + * @uses XmlResponse::setZoneRouting() + * @param base64Binary $cn23 + * @param \ColissimoPostage\StructType\Addressee $addressee + * @param string $barCodeCityssimo + * @param string $barCodePCH + * @param string $barCodeRouting + * @param \ColissimoPostage\StructType\BelgiumLabel $belgiumLabel + * @param string $contractNumber + * @param string $numberPCH + * @param string $numberRouting + * @param string $parcelNumber + * @param string $parcelNumberPartner + * @param \ColissimoPostage\StructType\PickupLocation $pickupLocation + * @param \ColissimoPostage\StructType\Routing $routing + * @param \ColissimoPostage\StructType\Sender $sender + * @param \ColissimoPostage\StructType\Site $sitePCH + * @param \ColissimoPostage\StructType\ZoneRouting $zoneRouting + */ + public function __construct(base64Binary $cn23 = null, \ColissimoPostage\StructType\Addressee $addressee = null, $barCodeCityssimo = null, $barCodePCH = null, $barCodeRouting = null, \ColissimoPostage\StructType\BelgiumLabel $belgiumLabel = null, $contractNumber = null, $numberPCH = null, $numberRouting = null, $parcelNumber = null, $parcelNumberPartner = null, \ColissimoPostage\StructType\PickupLocation $pickupLocation = null, \ColissimoPostage\StructType\Routing $routing = null, \ColissimoPostage\StructType\Sender $sender = null, \ColissimoPostage\StructType\Site $sitePCH = null, \ColissimoPostage\StructType\ZoneRouting $zoneRouting = null) + { + $this + ->setCn23($cn23) + ->setAddressee($addressee) + ->setBarCodeCityssimo($barCodeCityssimo) + ->setBarCodePCH($barCodePCH) + ->setBarCodeRouting($barCodeRouting) + ->setBelgiumLabel($belgiumLabel) + ->setContractNumber($contractNumber) + ->setNumberPCH($numberPCH) + ->setNumberRouting($numberRouting) + ->setParcelNumber($parcelNumber) + ->setParcelNumberPartner($parcelNumberPartner) + ->setPickupLocation($pickupLocation) + ->setRouting($routing) + ->setSender($sender) + ->setSitePCH($sitePCH) + ->setZoneRouting($zoneRouting); + } + /** + * Get cn23 value + * @return base64Binary|null + */ + public function getCn23() + { + return $this->cn23; + } + /** + * Set cn23 value + * @param base64Binary $cn23 + * @return \ColissimoPostage\StructType\XmlResponse + */ + public function setCn23(base64Binary $cn23 = null) + { + $this->cn23 = $cn23; + return $this; + } + /** + * Get addressee value + * @return \ColissimoPostage\StructType\Addressee|null + */ + public function getAddressee() + { + return $this->addressee; + } + /** + * Set addressee value + * @param \ColissimoPostage\StructType\Addressee $addressee + * @return \ColissimoPostage\StructType\XmlResponse + */ + public function setAddressee(\ColissimoPostage\StructType\Addressee $addressee = null) + { + $this->addressee = $addressee; + return $this; + } + /** + * Get barCodeCityssimo value + * @return string|null + */ + public function getBarCodeCityssimo() + { + return $this->barCodeCityssimo; + } + /** + * Set barCodeCityssimo value + * @param string $barCodeCityssimo + * @return \ColissimoPostage\StructType\XmlResponse + */ + public function setBarCodeCityssimo($barCodeCityssimo = null) + { + // validation for constraint: string + if (!is_null($barCodeCityssimo) && !is_string($barCodeCityssimo)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($barCodeCityssimo)), __LINE__); + } + $this->barCodeCityssimo = $barCodeCityssimo; + return $this; + } + /** + * Get barCodePCH value + * @return string|null + */ + public function getBarCodePCH() + { + return $this->barCodePCH; + } + /** + * Set barCodePCH value + * @param string $barCodePCH + * @return \ColissimoPostage\StructType\XmlResponse + */ + public function setBarCodePCH($barCodePCH = null) + { + // validation for constraint: string + if (!is_null($barCodePCH) && !is_string($barCodePCH)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($barCodePCH)), __LINE__); + } + $this->barCodePCH = $barCodePCH; + return $this; + } + /** + * Get barCodeRouting value + * @return string|null + */ + public function getBarCodeRouting() + { + return $this->barCodeRouting; + } + /** + * Set barCodeRouting value + * @param string $barCodeRouting + * @return \ColissimoPostage\StructType\XmlResponse + */ + public function setBarCodeRouting($barCodeRouting = null) + { + // validation for constraint: string + if (!is_null($barCodeRouting) && !is_string($barCodeRouting)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($barCodeRouting)), __LINE__); + } + $this->barCodeRouting = $barCodeRouting; + return $this; + } + /** + * Get belgiumLabel value + * @return \ColissimoPostage\StructType\BelgiumLabel|null + */ + public function getBelgiumLabel() + { + return $this->belgiumLabel; + } + /** + * Set belgiumLabel value + * @param \ColissimoPostage\StructType\BelgiumLabel $belgiumLabel + * @return \ColissimoPostage\StructType\XmlResponse + */ + public function setBelgiumLabel(\ColissimoPostage\StructType\BelgiumLabel $belgiumLabel = null) + { + $this->belgiumLabel = $belgiumLabel; + return $this; + } + /** + * Get contractNumber value + * @return string|null + */ + public function getContractNumber() + { + return $this->contractNumber; + } + /** + * Set contractNumber value + * @param string $contractNumber + * @return \ColissimoPostage\StructType\XmlResponse + */ + public function setContractNumber($contractNumber = null) + { + // validation for constraint: string + if (!is_null($contractNumber) && !is_string($contractNumber)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($contractNumber)), __LINE__); + } + $this->contractNumber = $contractNumber; + return $this; + } + /** + * Get numberPCH value + * @return string|null + */ + public function getNumberPCH() + { + return $this->numberPCH; + } + /** + * Set numberPCH value + * @param string $numberPCH + * @return \ColissimoPostage\StructType\XmlResponse + */ + public function setNumberPCH($numberPCH = null) + { + // validation for constraint: string + if (!is_null($numberPCH) && !is_string($numberPCH)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($numberPCH)), __LINE__); + } + $this->numberPCH = $numberPCH; + return $this; + } + /** + * Get numberRouting value + * @return string|null + */ + public function getNumberRouting() + { + return $this->numberRouting; + } + /** + * Set numberRouting value + * @param string $numberRouting + * @return \ColissimoPostage\StructType\XmlResponse + */ + public function setNumberRouting($numberRouting = null) + { + // validation for constraint: string + if (!is_null($numberRouting) && !is_string($numberRouting)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($numberRouting)), __LINE__); + } + $this->numberRouting = $numberRouting; + return $this; + } + /** + * Get parcelNumber value + * @return string|null + */ + public function getParcelNumber() + { + return $this->parcelNumber; + } + /** + * Set parcelNumber value + * @param string $parcelNumber + * @return \ColissimoPostage\StructType\XmlResponse + */ + public function setParcelNumber($parcelNumber = null) + { + // validation for constraint: string + if (!is_null($parcelNumber) && !is_string($parcelNumber)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($parcelNumber)), __LINE__); + } + $this->parcelNumber = $parcelNumber; + return $this; + } + /** + * Get parcelNumberPartner value + * @return string|null + */ + public function getParcelNumberPartner() + { + return $this->parcelNumberPartner; + } + /** + * Set parcelNumberPartner value + * @param string $parcelNumberPartner + * @return \ColissimoPostage\StructType\XmlResponse + */ + public function setParcelNumberPartner($parcelNumberPartner = null) + { + // validation for constraint: string + if (!is_null($parcelNumberPartner) && !is_string($parcelNumberPartner)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($parcelNumberPartner)), __LINE__); + } + $this->parcelNumberPartner = $parcelNumberPartner; + return $this; + } + /** + * Get pickupLocation value + * @return \ColissimoPostage\StructType\PickupLocation|null + */ + public function getPickupLocation() + { + return $this->pickupLocation; + } + /** + * Set pickupLocation value + * @param \ColissimoPostage\StructType\PickupLocation $pickupLocation + * @return \ColissimoPostage\StructType\XmlResponse + */ + public function setPickupLocation(\ColissimoPostage\StructType\PickupLocation $pickupLocation = null) + { + $this->pickupLocation = $pickupLocation; + return $this; + } + /** + * Get routing value + * @return \ColissimoPostage\StructType\Routing|null + */ + public function getRouting() + { + return $this->routing; + } + /** + * Set routing value + * @param \ColissimoPostage\StructType\Routing $routing + * @return \ColissimoPostage\StructType\XmlResponse + */ + public function setRouting(\ColissimoPostage\StructType\Routing $routing = null) + { + $this->routing = $routing; + return $this; + } + /** + * Get sender value + * @return \ColissimoPostage\StructType\Sender|null + */ + public function getSender() + { + return $this->sender; + } + /** + * Set sender value + * @param \ColissimoPostage\StructType\Sender $sender + * @return \ColissimoPostage\StructType\XmlResponse + */ + public function setSender(\ColissimoPostage\StructType\Sender $sender = null) + { + $this->sender = $sender; + return $this; + } + /** + * Get sitePCH value + * @return \ColissimoPostage\StructType\Site|null + */ + public function getSitePCH() + { + return $this->sitePCH; + } + /** + * Set sitePCH value + * @param \ColissimoPostage\StructType\Site $sitePCH + * @return \ColissimoPostage\StructType\XmlResponse + */ + public function setSitePCH(\ColissimoPostage\StructType\Site $sitePCH = null) + { + $this->sitePCH = $sitePCH; + return $this; + } + /** + * Get zoneRouting value + * @return \ColissimoPostage\StructType\ZoneRouting|null + */ + public function getZoneRouting() + { + return $this->zoneRouting; + } + /** + * Set zoneRouting value + * @param \ColissimoPostage\StructType\ZoneRouting $zoneRouting + * @return \ColissimoPostage\StructType\XmlResponse + */ + public function setZoneRouting(\ColissimoPostage\StructType\ZoneRouting $zoneRouting = null) + { + $this->zoneRouting = $zoneRouting; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\XmlResponse + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/ZoneCABRoutage.php b/src/StructType/ZoneCABRoutage.php new file mode 100644 index 0000000..f338e9e --- /dev/null +++ b/src/StructType/ZoneCABRoutage.php @@ -0,0 +1,105 @@ + + */ +class ZoneCABRoutage extends AbstractStructBase +{ + /** + * The barCodeRouting + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $barCodeRouting; + /** + * The parcelNumberRouting + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $parcelNumberRouting; + /** + * Constructor method for zoneCABRoutage + * @uses ZoneCABRoutage::setBarCodeRouting() + * @uses ZoneCABRoutage::setParcelNumberRouting() + * @param string $barCodeRouting + * @param string $parcelNumberRouting + */ + public function __construct($barCodeRouting = null, $parcelNumberRouting = null) + { + $this + ->setBarCodeRouting($barCodeRouting) + ->setParcelNumberRouting($parcelNumberRouting); + } + /** + * Get barCodeRouting value + * @return string|null + */ + public function getBarCodeRouting() + { + return $this->barCodeRouting; + } + /** + * Set barCodeRouting value + * @param string $barCodeRouting + * @return \ColissimoPostage\StructType\ZoneCABRoutage + */ + public function setBarCodeRouting($barCodeRouting = null) + { + // validation for constraint: string + if (!is_null($barCodeRouting) && !is_string($barCodeRouting)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($barCodeRouting)), __LINE__); + } + $this->barCodeRouting = $barCodeRouting; + return $this; + } + /** + * Get parcelNumberRouting value + * @return string|null + */ + public function getParcelNumberRouting() + { + return $this->parcelNumberRouting; + } + /** + * Set parcelNumberRouting value + * @param string $parcelNumberRouting + * @return \ColissimoPostage\StructType\ZoneCABRoutage + */ + public function setParcelNumberRouting($parcelNumberRouting = null) + { + // validation for constraint: string + if (!is_null($parcelNumberRouting) && !is_string($parcelNumberRouting)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($parcelNumberRouting)), __LINE__); + } + $this->parcelNumberRouting = $parcelNumberRouting; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\ZoneCABRoutage + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/ZoneInfosRoutage.php b/src/StructType/ZoneInfosRoutage.php new file mode 100644 index 0000000..7080662 --- /dev/null +++ b/src/StructType/ZoneInfosRoutage.php @@ -0,0 +1,457 @@ + + */ +class ZoneInfosRoutage extends AbstractStructBase +{ + /** + * The controlKeyTrackingNumber + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $controlKeyTrackingNumber; + /** + * The datePrinting + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $datePrinting; + /** + * The hourPrinting + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $hourPrinting; + /** + * The identificationDestination1 + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $identificationDestination1; + /** + * The identificationDestination2 + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $identificationDestination2; + /** + * The numberVersionWS + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $numberVersionWS; + /** + * The routingVersion + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $routingVersion; + /** + * The serviceMark + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $serviceMark; + /** + * The sortDest + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $sortDest; + /** + * The sortOrigin + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $sortOrigin; + /** + * The trackingNumberRouting + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $trackingNumberRouting; + /** + * The typeServiceLivraison + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $typeServiceLivraison; + /** + * The rDepot + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var string + */ + public $rDepot; + /** + * Constructor method for zoneInfosRoutage + * @uses ZoneInfosRoutage::setControlKeyTrackingNumber() + * @uses ZoneInfosRoutage::setDatePrinting() + * @uses ZoneInfosRoutage::setHourPrinting() + * @uses ZoneInfosRoutage::setIdentificationDestination1() + * @uses ZoneInfosRoutage::setIdentificationDestination2() + * @uses ZoneInfosRoutage::setNumberVersionWS() + * @uses ZoneInfosRoutage::setRoutingVersion() + * @uses ZoneInfosRoutage::setServiceMark() + * @uses ZoneInfosRoutage::setSortDest() + * @uses ZoneInfosRoutage::setSortOrigin() + * @uses ZoneInfosRoutage::setTrackingNumberRouting() + * @uses ZoneInfosRoutage::setTypeServiceLivraison() + * @uses ZoneInfosRoutage::setRDepot() + * @param string $controlKeyTrackingNumber + * @param string $datePrinting + * @param string $hourPrinting + * @param string $identificationDestination1 + * @param string $identificationDestination2 + * @param string $numberVersionWS + * @param string $routingVersion + * @param string $serviceMark + * @param string $sortDest + * @param string $sortOrigin + * @param string $trackingNumberRouting + * @param string $typeServiceLivraison + * @param string $rDepot + */ + public function __construct($controlKeyTrackingNumber = null, $datePrinting = null, $hourPrinting = null, $identificationDestination1 = null, $identificationDestination2 = null, $numberVersionWS = null, $routingVersion = null, $serviceMark = null, $sortDest = null, $sortOrigin = null, $trackingNumberRouting = null, $typeServiceLivraison = null, $rDepot = null) + { + $this + ->setControlKeyTrackingNumber($controlKeyTrackingNumber) + ->setDatePrinting($datePrinting) + ->setHourPrinting($hourPrinting) + ->setIdentificationDestination1($identificationDestination1) + ->setIdentificationDestination2($identificationDestination2) + ->setNumberVersionWS($numberVersionWS) + ->setRoutingVersion($routingVersion) + ->setServiceMark($serviceMark) + ->setSortDest($sortDest) + ->setSortOrigin($sortOrigin) + ->setTrackingNumberRouting($trackingNumberRouting) + ->setTypeServiceLivraison($typeServiceLivraison) + ->setRDepot($rDepot); + } + /** + * Get controlKeyTrackingNumber value + * @return string|null + */ + public function getControlKeyTrackingNumber() + { + return $this->controlKeyTrackingNumber; + } + /** + * Set controlKeyTrackingNumber value + * @param string $controlKeyTrackingNumber + * @return \ColissimoPostage\StructType\ZoneInfosRoutage + */ + public function setControlKeyTrackingNumber($controlKeyTrackingNumber = null) + { + // validation for constraint: string + if (!is_null($controlKeyTrackingNumber) && !is_string($controlKeyTrackingNumber)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($controlKeyTrackingNumber)), __LINE__); + } + $this->controlKeyTrackingNumber = $controlKeyTrackingNumber; + return $this; + } + /** + * Get datePrinting value + * @return string|null + */ + public function getDatePrinting() + { + return $this->datePrinting; + } + /** + * Set datePrinting value + * @param string $datePrinting + * @return \ColissimoPostage\StructType\ZoneInfosRoutage + */ + public function setDatePrinting($datePrinting = null) + { + // validation for constraint: string + if (!is_null($datePrinting) && !is_string($datePrinting)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($datePrinting)), __LINE__); + } + $this->datePrinting = $datePrinting; + return $this; + } + /** + * Get hourPrinting value + * @return string|null + */ + public function getHourPrinting() + { + return $this->hourPrinting; + } + /** + * Set hourPrinting value + * @param string $hourPrinting + * @return \ColissimoPostage\StructType\ZoneInfosRoutage + */ + public function setHourPrinting($hourPrinting = null) + { + // validation for constraint: string + if (!is_null($hourPrinting) && !is_string($hourPrinting)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($hourPrinting)), __LINE__); + } + $this->hourPrinting = $hourPrinting; + return $this; + } + /** + * Get identificationDestination1 value + * @return string|null + */ + public function getIdentificationDestination1() + { + return $this->identificationDestination1; + } + /** + * Set identificationDestination1 value + * @param string $identificationDestination1 + * @return \ColissimoPostage\StructType\ZoneInfosRoutage + */ + public function setIdentificationDestination1($identificationDestination1 = null) + { + // validation for constraint: string + if (!is_null($identificationDestination1) && !is_string($identificationDestination1)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($identificationDestination1)), __LINE__); + } + $this->identificationDestination1 = $identificationDestination1; + return $this; + } + /** + * Get identificationDestination2 value + * @return string|null + */ + public function getIdentificationDestination2() + { + return $this->identificationDestination2; + } + /** + * Set identificationDestination2 value + * @param string $identificationDestination2 + * @return \ColissimoPostage\StructType\ZoneInfosRoutage + */ + public function setIdentificationDestination2($identificationDestination2 = null) + { + // validation for constraint: string + if (!is_null($identificationDestination2) && !is_string($identificationDestination2)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($identificationDestination2)), __LINE__); + } + $this->identificationDestination2 = $identificationDestination2; + return $this; + } + /** + * Get numberVersionWS value + * @return string|null + */ + public function getNumberVersionWS() + { + return $this->numberVersionWS; + } + /** + * Set numberVersionWS value + * @param string $numberVersionWS + * @return \ColissimoPostage\StructType\ZoneInfosRoutage + */ + public function setNumberVersionWS($numberVersionWS = null) + { + // validation for constraint: string + if (!is_null($numberVersionWS) && !is_string($numberVersionWS)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($numberVersionWS)), __LINE__); + } + $this->numberVersionWS = $numberVersionWS; + return $this; + } + /** + * Get routingVersion value + * @return string|null + */ + public function getRoutingVersion() + { + return $this->routingVersion; + } + /** + * Set routingVersion value + * @param string $routingVersion + * @return \ColissimoPostage\StructType\ZoneInfosRoutage + */ + public function setRoutingVersion($routingVersion = null) + { + // validation for constraint: string + if (!is_null($routingVersion) && !is_string($routingVersion)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($routingVersion)), __LINE__); + } + $this->routingVersion = $routingVersion; + return $this; + } + /** + * Get serviceMark value + * @return string|null + */ + public function getServiceMark() + { + return $this->serviceMark; + } + /** + * Set serviceMark value + * @param string $serviceMark + * @return \ColissimoPostage\StructType\ZoneInfosRoutage + */ + public function setServiceMark($serviceMark = null) + { + // validation for constraint: string + if (!is_null($serviceMark) && !is_string($serviceMark)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($serviceMark)), __LINE__); + } + $this->serviceMark = $serviceMark; + return $this; + } + /** + * Get sortDest value + * @return string|null + */ + public function getSortDest() + { + return $this->sortDest; + } + /** + * Set sortDest value + * @param string $sortDest + * @return \ColissimoPostage\StructType\ZoneInfosRoutage + */ + public function setSortDest($sortDest = null) + { + // validation for constraint: string + if (!is_null($sortDest) && !is_string($sortDest)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($sortDest)), __LINE__); + } + $this->sortDest = $sortDest; + return $this; + } + /** + * Get sortOrigin value + * @return string|null + */ + public function getSortOrigin() + { + return $this->sortOrigin; + } + /** + * Set sortOrigin value + * @param string $sortOrigin + * @return \ColissimoPostage\StructType\ZoneInfosRoutage + */ + public function setSortOrigin($sortOrigin = null) + { + // validation for constraint: string + if (!is_null($sortOrigin) && !is_string($sortOrigin)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($sortOrigin)), __LINE__); + } + $this->sortOrigin = $sortOrigin; + return $this; + } + /** + * Get trackingNumberRouting value + * @return string|null + */ + public function getTrackingNumberRouting() + { + return $this->trackingNumberRouting; + } + /** + * Set trackingNumberRouting value + * @param string $trackingNumberRouting + * @return \ColissimoPostage\StructType\ZoneInfosRoutage + */ + public function setTrackingNumberRouting($trackingNumberRouting = null) + { + // validation for constraint: string + if (!is_null($trackingNumberRouting) && !is_string($trackingNumberRouting)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($trackingNumberRouting)), __LINE__); + } + $this->trackingNumberRouting = $trackingNumberRouting; + return $this; + } + /** + * Get typeServiceLivraison value + * @return string|null + */ + public function getTypeServiceLivraison() + { + return $this->typeServiceLivraison; + } + /** + * Set typeServiceLivraison value + * @param string $typeServiceLivraison + * @return \ColissimoPostage\StructType\ZoneInfosRoutage + */ + public function setTypeServiceLivraison($typeServiceLivraison = null) + { + // validation for constraint: string + if (!is_null($typeServiceLivraison) && !is_string($typeServiceLivraison)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($typeServiceLivraison)), __LINE__); + } + $this->typeServiceLivraison = $typeServiceLivraison; + return $this; + } + /** + * Get rDepot value + * @return string|null + */ + public function getRDepot() + { + return $this->rDepot; + } + /** + * Set rDepot value + * @param string $rDepot + * @return \ColissimoPostage\StructType\ZoneInfosRoutage + */ + public function setRDepot($rDepot = null) + { + // validation for constraint: string + if (!is_null($rDepot) && !is_string($rDepot)) { + throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($rDepot)), __LINE__); + } + $this->rDepot = $rDepot; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\ZoneInfosRoutage + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/src/StructType/ZoneRouting.php b/src/StructType/ZoneRouting.php new file mode 100644 index 0000000..391ad66 --- /dev/null +++ b/src/StructType/ZoneRouting.php @@ -0,0 +1,97 @@ + + */ +class ZoneRouting extends AbstractStructBase +{ + /** + * The zoneCABRoutage + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\ZoneCABRoutage + */ + public $zoneCABRoutage; + /** + * The zoneInfosRoutage + * Meta informations extracted from the WSDL + * - minOccurs: 0 + * @var \ColissimoPostage\StructType\ZoneInfosRoutage + */ + public $zoneInfosRoutage; + /** + * Constructor method for zoneRouting + * @uses ZoneRouting::setZoneCABRoutage() + * @uses ZoneRouting::setZoneInfosRoutage() + * @param \ColissimoPostage\StructType\ZoneCABRoutage $zoneCABRoutage + * @param \ColissimoPostage\StructType\ZoneInfosRoutage $zoneInfosRoutage + */ + public function __construct(\ColissimoPostage\StructType\ZoneCABRoutage $zoneCABRoutage = null, \ColissimoPostage\StructType\ZoneInfosRoutage $zoneInfosRoutage = null) + { + $this + ->setZoneCABRoutage($zoneCABRoutage) + ->setZoneInfosRoutage($zoneInfosRoutage); + } + /** + * Get zoneCABRoutage value + * @return \ColissimoPostage\StructType\ZoneCABRoutage|null + */ + public function getZoneCABRoutage() + { + return $this->zoneCABRoutage; + } + /** + * Set zoneCABRoutage value + * @param \ColissimoPostage\StructType\ZoneCABRoutage $zoneCABRoutage + * @return \ColissimoPostage\StructType\ZoneRouting + */ + public function setZoneCABRoutage(\ColissimoPostage\StructType\ZoneCABRoutage $zoneCABRoutage = null) + { + $this->zoneCABRoutage = $zoneCABRoutage; + return $this; + } + /** + * Get zoneInfosRoutage value + * @return \ColissimoPostage\StructType\ZoneInfosRoutage|null + */ + public function getZoneInfosRoutage() + { + return $this->zoneInfosRoutage; + } + /** + * Set zoneInfosRoutage value + * @param \ColissimoPostage\StructType\ZoneInfosRoutage $zoneInfosRoutage + * @return \ColissimoPostage\StructType\ZoneRouting + */ + public function setZoneInfosRoutage(\ColissimoPostage\StructType\ZoneInfosRoutage $zoneInfosRoutage = null) + { + $this->zoneInfosRoutage = $zoneInfosRoutage; + return $this; + } + /** + * Method called when an object has been exported with var_export() functions + * It allows to return an object instantiated with the values + * @see AbstractStructBase::__set_state() + * @uses AbstractStructBase::__set_state() + * @param array $array the exported values + * @return \ColissimoPostage\StructType\ZoneRouting + */ + public static function __set_state(array $array) + { + return parent::__set_state($array); + } + /** + * Method returning the class name + * @return string __CLASS__ + */ + public function __toString() + { + return __CLASS__; + } +} diff --git a/tutorial.php b/tutorial.php new file mode 100644 index 0000000..3657df6 --- /dev/null +++ b/tutorial.php @@ -0,0 +1,67 @@ + 'https://ws.colissimo.fr/sls-ws/SlsServiceWS?wsdl', + * \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_TRACE => true, + * \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_LOGIN => 'you_secret_login', + * \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_PASSWORD => 'you_secret_password', + * ); + * etc.... + */ +require_once __DIR__ . '/vendor/autoload.php'; +/** + * Minimal options + */ +$options = array( + \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_URL => 'https://ws.colissimo.fr/sls-ws/SlsServiceWS?wsdl', + \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_CLASSMAP => \ColissimoPostage\ClassMap::get(), +); +/** + * Samples for Generate ServiceType + */ +$generate = new \ColissimoPostage\ServiceType\Generate($options); +/** + * Sample call for generateLabel operation/method + */ +if ($generate->generateLabel(new \ColissimoPostage\StructType\GenerateLabel()) !== false) { + print_r($generate->getResult()); +} else { + print_r($generate->getLastError()); +} +/** + * Samples for Plan ServiceType + */ +$plan = new \ColissimoPostage\ServiceType\Plan($options); +/** + * Sample call for planPickup operation/method + */ +if ($plan->planPickup(new \ColissimoPostage\StructType\PlanPickup()) !== false) { + print_r($plan->getResult()); +} else { + print_r($plan->getLastError()); +} +/** + * Samples for Get ServiceType + */ +$get = new \ColissimoPostage\ServiceType\Get($options); +/** + * Sample call for getListMailBoxPickingDates operation/method + */ +if ($get->getListMailBoxPickingDates(new \ColissimoPostage\StructType\GetListMailBoxPickingDates()) !== false) { + print_r($get->getResult()); +} else { + print_r($get->getLastError()); +} +/** + * Sample call for getProductInter operation/method + */ +if ($get->getProductInter(new \ColissimoPostage\StructType\GetProductInter()) !== false) { + print_r($get->getResult()); +} else { + print_r($get->getLastError()); +}