diff --git a/composer.json b/composer.json index e58c6f4b..81c6f8fc 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ } }, "require": { - "php": ">=7.1", + "php": ">=7.4", "monolog/monolog": "^1.12", "guzzlehttp/guzzle": "^7.0", "ext-json": "*", diff --git a/src/modules/mo/mo_dhl/Adapter/DHLAdapter.php b/src/modules/mo/mo_dhl/Adapter/DHLAdapter.php index 551a1b06..9f812adb 100644 --- a/src/modules/mo/mo_dhl/Adapter/DHLAdapter.php +++ b/src/modules/mo/mo_dhl/Adapter/DHLAdapter.php @@ -8,7 +8,6 @@ * @copyright 2016 Mediaopt GmbH */ -use Mediaopt\DHL\Api\GKV; use Mediaopt\DHL\Api\Standortsuche; use Mediaopt\DHL\Api\Wunschpaket; use Mediaopt\DHL\Main; @@ -202,14 +201,6 @@ public function buildStandortsuche() return $this->getSdk()->buildStandortsuche(); } - /** - * @return GKV - */ - public function buildGKV() - { - return $this->getSdk()->buildGKV(); - } - /** * @return \Mediaopt\DHL\Api\ParcelShipping\Client */ diff --git a/src/modules/mo/mo_dhl/Adapter/GKVCreateShipmentOrderRequestBuilder.php b/src/modules/mo/mo_dhl/Adapter/GKVCreateShipmentOrderRequestBuilder.php deleted file mode 100644 index 2865c81f..00000000 --- a/src/modules/mo/mo_dhl/Adapter/GKVCreateShipmentOrderRequestBuilder.php +++ /dev/null @@ -1,52 +0,0 @@ -buildGKV(); - $request = new CreateShipmentOrderRequest($gkvClient->buildVersion(), $shipmentOrders); - return $request->setCombinedPrinting(0)->setGroupProfileName(self::STANDARD_GRUPPENPROFIL); - } - - /** - * @param string $orderId - * @return ShipmentOrderType - * @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException - * @throws \OxidEsales\Eshop\Core\Exception\SystemComponentException - */ - protected function buildShipmentOrder(string $orderId): ShipmentOrderType - { - $order = \oxNew(Order::class); - $order->load($orderId); - $shipmentOrder = new ShipmentOrderType($orderId, Registry::get(GKVShipmentBuilder::class)->build($order)); - $shipmentOrder->setPrintOnlyIfCodeable(new Serviceconfiguration((bool)Registry::getConfig()->getShopConfVar('mo_dhl__only_with_leitcode'))); - return $shipmentOrder; - } -} diff --git a/src/modules/mo/mo_dhl/Adapter/GKVCustomShipmentBuilder.php b/src/modules/mo/mo_dhl/Adapter/GKVCustomShipmentBuilder.php deleted file mode 100644 index 1d14c9d0..00000000 --- a/src/modules/mo/mo_dhl/Adapter/GKVCustomShipmentBuilder.php +++ /dev/null @@ -1,302 +0,0 @@ -getShipment()->getShipper(); - $receiver = $shipmentOrder->getShipment()->getReceiver(); - $returnReceiver = $shipmentOrder->getShipment()->getReturnReceiver(); - return [ - 'weight' => array_merge([ - 'total' => ['weight' => $shipmentOrder->getShipment()->getShipmentDetails()->getShipmentItem()->getWeightInKG(), 'title' => Registry::getLang()->translateString('GENERAL_ATALL')], - ], $this->getExportDocPositionWeights($shipmentOrder)), - 'shipper' => [ - 'name' => $shipper->getName(), - 'address' => $shipper->getAddress(), - ], - 'receiver' => [ - 'name' => $receiver->getName1(), - 'type' => $receiver->getAddress() !== null ? 'address' : ($receiver->getPackstation() !== null ? 'packstation' : 'poftfiliale'), - 'address' => $receiver->getAddress() ?: $receiver->getPackstation() ?: $receiver->getPostfiliale(), - 'communication' => $receiver->getCommunication(), - ], - 'returnReceiver' => [ - 'name' => $returnReceiver->getName(), - 'address' => $returnReceiver->getAddress(), - ], - 'services' => [ - 'parcelOutletRouting' => $shipmentOrder->getShipment()->getShipmentDetails()->getService()->getParcelOutletRouting(), - 'printOnlyIfCodeable' => $shipmentOrder->getPrintOnlyIfCodeable(), - 'beilegerretoure' => $shipmentOrder->getShipment()->getShipmentDetails()->getReturnShipmentAccountNumber(), - 'bulkyGoods' => $shipmentOrder->getShipment()->getShipmentDetails()->getService()->getBulkyGoods(), - 'additionalInsurance' => $shipmentOrder->getShipment()->getShipmentDetails()->getService()->getAdditionalInsurance(), - 'identCheck' => $shipmentOrder->getShipment()->getShipmentDetails()->getService()->getIdentCheck(), - 'cashOnDelivery' => $shipmentOrder->getShipment()->getShipmentDetails()->getService()->getCashOnDelivery(), - 'visualAgeCheck' => $shipmentOrder->getShipment()->getShipmentDetails()->getService()->getVisualCheckOfAge(), - 'pddp' => $shipmentOrder->getShipment()->getShipmentDetails()->getService()->getPDDP(), - 'cdp' => $shipmentOrder->getShipment()->getShipmentDetails()->getService()->getCDP(), - 'economy' => $shipmentOrder->getShipment()->getShipmentDetails()->getService()->getEconomy(), - 'premium' => $shipmentOrder->getShipment()->getShipmentDetails()->getService()->getPremium(), - 'endorsement' => $shipmentOrder->getShipment()->getShipmentDetails()->getService()->getEndorsement(), - 'noNeighbourDelivery' => $shipmentOrder->getShipment()->getShipmentDetails()->getService()->getNoNeighbourDelivery(), - 'namedPersonOnly' => $shipmentOrder->getShipment()->getShipmentDetails()->getService()->getNamedPersonOnly(), - 'signedForByRecipient'=> $shipmentOrder->getShipment()->getShipmentDetails()->getService()->getSignedForByRecipient(), - ], - ]; - } - - /** - * @param ShipmentOrderType $shipmentOrder - * @param array $data - * @param Order $order - */ - public function applyCustomDataToShipmentOrder(&$shipmentOrder, $data, Order $order) - { - $this->useCustomWeightData($shipmentOrder, $data['weight']); - $this->useCustomShipper($shipmentOrder, $data['shipper']); - $this->useCustomReturnReceiver($shipmentOrder, $data['returnReceiver']); - $this->useCustomReceiver($shipmentOrder, $data['receiver']); - $this->useCustomServices($shipmentOrder, $data['services'], $order); - } - - /** - * @param ShipmentOrderType $shipmentOrder - * @param array $weightData - */ - protected function useCustomWeightData(ShipmentOrderType $shipmentOrder, $weightData) - { - foreach ($weightData as $key => $value) { - if (strpos($value, ',') !== false) { - $value = \OxidEsales\EshopCommunity\Core\Registry::getUtils()->string2Float($value); - } - if ($key === 'total') { - $shipmentOrder->getShipment()->getShipmentDetails()->getShipmentItem()->setWeightInKG($value); - } else { - $shipmentOrder->getShipment()->getExportDocument()->getExportDocPosition()[$key]->setNetWeightInKG($value); - } - } - } - - - /** - * @param ShipmentOrderType $shipmentOrder - * @param array $shipperData - */ - protected function useCustomShipper(ShipmentOrderType $shipmentOrder, $shipperData) - { - $shipper = $shipmentOrder->getShipment()->getShipper(); - $shipper->getName()->setName1($shipperData['name1'])->setName2($shipperData['name2'])->setName3($shipperData['name3']); - $shipperData['Origin'] = new CountryType($shipperData['country']); - $shipper->getAddress()->assign($shipperData); - } - - /** - * @param ShipmentOrderType $shipmentOrder - * @param array $returnReceiverData - */ - protected function useCustomReturnReceiver(ShipmentOrderType $shipmentOrder, $returnReceiverData) - { - $returnReceiver = $shipmentOrder->getShipment()->getReturnReceiver(); - $returnReceiver->getName()->setName1($returnReceiverData['name1'])->setName2($returnReceiverData['name2'])->setName3($returnReceiverData['name3']); - $returnReceiverData['Origin'] = new CountryType($returnReceiverData['country']); - $returnReceiver->getAddress()->assign($returnReceiverData); - } - - /** - * @param ShipmentOrderType $shipmentOrder - * @param array $receiverData - */ - protected function useCustomReceiver(ShipmentOrderType $shipmentOrder, $receiverData) - { - $receiver = $shipmentOrder->getShipment()->getReceiver(); - $receiver->setName1($receiverData['name']); - if ($receiverData['country']) { - $receiverData['Origin'] = new CountryType($receiverData['country']); - } - if ($communication = $receiver->getCommunication()) { - $communication - ->setEmail($receiverData['email']) - ->setPhone($receiverData['phone']); - } - $receiverAddress = $receiver->getAddress() ?: $receiver->getPackstation() ?: $receiver->getPostfiliale(); - if ($receiverData['province']) { - $receiverAddress->setProvince($receiverData['province']); - } - $receiverAddress->assign($receiverData); - } - - /** - * @param ShipmentOrderType $shipmentOrder - * @param array $servicesData - * @param Order $order - */ - protected function useCustomServices(ShipmentOrderType $shipmentOrder, $servicesData, Order $order) - { - $process = $this->getProcess($order); - $services = $shipmentOrder->getShipment()->getShipmentDetails()->getService(); - if ($process->supportsParcelOutletRouting()) { - $isActive = filter_var($servicesData['parcelOutletRouting']['active'], FILTER_VALIDATE_BOOLEAN); - $details = $servicesData['parcelOutletRouting']['details'] ?? null; - $services->setParcelOutletRouting(new ServiceconfigurationDetailsOptional($isActive, $details)); - } - - if ($process->supportsDHLRetoure() && filter_var($servicesData['beilegerretoure']['active'], FILTER_VALIDATE_BOOLEAN)) { - $accountNumber = Registry::get(GKVShipmentBuilder::class)->buildReturnAccountNumber($order); - $shipmentOrder->getShipment()->getShipmentDetails()->setReturnShipmentAccountNumber($accountNumber); - } else { - $shipmentOrder->getShipment()->getShipmentDetails()->setReturnShipmentAccountNumber(null); - } - if ($process->supportsBulkyGood()) { - $isActive = filter_var($servicesData['bulkyGoods']['active'], FILTER_VALIDATE_BOOLEAN); - $services->setBulkyGoods(new Serviceconfiguration($isActive)); - } - if ($process->supportsAdditionalInsurance()) { - $isActive = filter_var($servicesData['additionalInsurance']['active'], FILTER_VALIDATE_BOOLEAN); - $details = $servicesData['additionalInsurance']['insuranceAmount'] ?? null; - $services->setAdditionalInsurance(new ServiceconfigurationAdditionalInsurance($isActive, $details)); - } - if ($process->supportsCashOnDelivery()) { - $isActive = filter_var($servicesData['cashOnDelivery']['active'], FILTER_VALIDATE_BOOLEAN); - $details = $servicesData['cashOnDelivery']['codAmount'] ?? null; - $services->setCashOnDelivery(new ServiceconfigurationCashOnDelivery($isActive, $details)); - } - if ($process->supportsIdentCheck()) { - $isActive = filter_var($servicesData['identCheck']['active'], FILTER_VALIDATE_BOOLEAN); - if ($isActive) { - $ident = $this->extractIdent($servicesData['identCheck']); - $services->setIdentCheck(new ServiceconfigurationIC($ident, true)); - } else { - $services->setIdentCheck(null); - } - } - if ($process->supportsVisualAgeCheck()) { - $identCheckUsed = $process->supportsIdentCheck() && filter_var($servicesData['identCheck']['active'], FILTER_VALIDATE_BOOLEAN); - if (!$identCheckUsed && $ageCheck = $servicesData['visualAgeCheck'] ?? null) { - $services->setVisualCheckOfAge(new ServiceconfigurationVisualAgeCheck(true, 'A' . $ageCheck)); - } else { - $services->setVisualCheckOfAge(null); - } - - } - if ($process->supportsPDDP()) { - $isActive = filter_var($servicesData['pddp']['active'], FILTER_VALIDATE_BOOLEAN); - $services->setPDDP(new PDDP($isActive)); - } - if ($process->supportsCDP()) { - $isActive = filter_var($servicesData['cdp']['active'], FILTER_VALIDATE_BOOLEAN); - $services->setCDP(new CDP($isActive)); - } - if ($process->supportsEconomy()) { - $isActive = filter_var($servicesData['economy']['active'], FILTER_VALIDATE_BOOLEAN); - $services->setEconomy(new Economy($isActive)); - } - if ($process->supportsPremium()) { - $isActive = filter_var($servicesData['premium']['active'], FILTER_VALIDATE_BOOLEAN); - $services->setPremium(new Serviceconfiguration($isActive)); - } - if ($process->supportsEndorsement()) { - $endorsement = $servicesData['endorsement'] ?? MoDHLService::MO_DHL__ENDORSEMENT_IMMEDIATE; - $services->setEndorsement(new ServiceconfigurationEndorsement(true, $endorsement)); - } - if ($process->supportsNoNeighbourDelivery()) { - $isActive = filter_var($servicesData['noNeighbourDelivery']['active'], FILTER_VALIDATE_BOOLEAN); - $services->setNoNeighbourDelivery(new Serviceconfiguration($isActive)); - } - if ($process->supportsNamedPersonOnly()) { - $isActive = filter_var($servicesData['namedPersonOnly']['active'], FILTER_VALIDATE_BOOLEAN); - $services->setNamedPersonOnly(new Serviceconfiguration($isActive)); - } - if ($process->supportsSignedForByRecipient()) { - $isActive = filter_var($servicesData['signedForByRecipient']['active'], FILTER_VALIDATE_BOOLEAN); - $services->setSignedForByRecipient(new Serviceconfiguration($isActive)); - } - - $isActive = filter_var($servicesData['printOnlyIfCodeable']['active'], FILTER_VALIDATE_BOOLEAN); - $shipmentOrder->setPrintOnlyIfCodeable(new Serviceconfiguration($isActive)); - } - - /** - * @param array $identCheck - * @return Ident - * @throws \Exception - */ - protected function extractIdent($identCheck) : Ident - { - return new Ident( - $identCheck['surname'], - $identCheck['givenName'], - $identCheck['dateOfBirth'] ? (new \DateTime($identCheck['dateOfBirth']))->format('Y-m-d') : null, - $identCheck['minimumAge'] ? 'A' . $identCheck['minimumAge'] : null - ); - } - - /** - * @param Order - * @return Process|null - */ - protected function getProcess(Order $order) - { - if ($processNr = $order->oxorder__mo_dhl_process->rawValue) { - return Process::build($processNr); - } - return null; - } - - /** - * @param ShipmentOrderType $shipmentOrder - * @return array[] - */ - protected function getExportDocPositionWeights(ShipmentOrderType $shipmentOrder): array - { - if (!$exportDocument = $shipmentOrder->getShipment()->getExportDocument()) - { - return []; - } - return array_map( - [$this, 'parseExportDocPostition'], - $exportDocument->getExportDocPosition() - ); - - } - - protected function parseExportDocPostition(ExportDocPosition $exportDocPosition): array - { - return ['weight' => $exportDocPosition->getNetWeightInKG(), 'title' => $exportDocPosition->getDescription()]; - } -} diff --git a/src/modules/mo/mo_dhl/Adapter/GKVShipmentBuilder.php b/src/modules/mo/mo_dhl/Adapter/GKVShipmentBuilder.php deleted file mode 100644 index 04b78a26..00000000 --- a/src/modules/mo/mo_dhl/Adapter/GKVShipmentBuilder.php +++ /dev/null @@ -1,532 +0,0 @@ -buildShipmentDetails($order), $this->buildShipper(), $this->buildReceiver($order)); - $shipment->setExportDocument($this->buildExportDocument($order)); - $shipment->setReturnReceiver($this->buildReturnReceiver()); - return $shipment; - } - - /** - * @param Order $order - * @return ShipmentDetailsTypeType - */ - protected function buildShipmentDetails(Order $order): ShipmentDetailsTypeType - { - $details = new ShipmentDetailsTypeType($this->getProcess($order)->getServiceIdentifier(), $this->buildAccountNumber($order), $this->buildShipmentDate(), $this->buildShipmentItem($order)); - if (Registry::getConfig()->getShopConfVar('mo_dhl__beilegerretoure_active') && $this->getProcess($order)->supportsDHLRetoure() && $returnBookingNumber = $this->buildReturnAccountNumber($order)) { - $details->setReturnShipmentAccountNumber($returnBookingNumber); - } - if ($this->sendNotificationAllowed($order)) { - $details->setNotification(new ShipmentNotificationType($order->getFieldData('oxbillemail'))); - } - $customerReference = Registry::getLang()->translateString('GENERAL_ORDERNUM') . ' ' . $order->getFieldData('oxordernr'); - if ($order->moDHLUsesService(MoDHLService::MO_DHL__CASH_ON_DELIVERY) && $this->getProcess($order)->supportsCashOnDelivery()) { - $accountOwner = Registry::getConfig()->getShopConfVar('mo_dhl__cod_accountOwner') ?: null; - $bankName = Registry::getConfig()->getShopConfVar('mo_dhl__cod_bankName') ?: null; - $iban = Registry::getConfig()->getShopConfVar('mo_dhl__cod_iban') ?: null; - $details->setBankData((new BankType($accountOwner, $bankName, $iban))->setNote1($customerReference)); - } - $details->setCustomerReference($customerReference); - $details->setService($this->buildService($order)); - return $details; - } - - /** - * @param Order $order - * @return ReceiverType - * @throws \OxidEsales\Eshop\Core\Exception\SystemComponentException - */ - protected function buildReceiver($order): ReceiverType - { - $receiver = new ReceiverType( - $this->convertSpecialChars($order->moDHLGetAddressData('fname')) - . ' ' . $this->convertSpecialChars($order->moDHLGetAddressData('lname')) - ); - if (Branch::isPackstation($order->moDHLGetAddressData('street'))) { - $receiver->setPackstation($this->buildPackstation($order)); - } else if (Branch::isFiliale($order->moDHLGetAddressData('street'))) { - $receiver->setPostfiliale($this->buildPostfiliale($order)); - } else { - $receiver->setAddress($this->buildAddress($order)); - $receiver->setCommunication($this->buildCommunication($order)); - } - return $receiver; - } - - /** - * @param Order $order - * @return CommunicationType - */ - protected function buildCommunication($order) - { - return (new CommunicationType()) - ->setContactPerson($order->moDHLGetAddressData('fname') . ' ' . $order->moDHLGetAddressData('lname')) - ->setEmail($this->sendNotificationAllowed($order) ? $order->getFieldData('oxbillemail') : null) - ->setPhone($order->moDHLGetAddressData('fon')); - } - - /** - * @param string|null $stateId - * @return string|null - */ - protected function getStateName(?string $stateId) - { - if (is_null($stateId)) { - return null; - } - - $state = \oxNew(State::class); - $state->load($stateId); - return $state->getFieldData('oxisoalpha2'); - } - - /** - * @param string $countryId - * @return CountryType - * @throws \OxidEsales\Eshop\Core\Exception\SystemComponentException - */ - protected function buildCountry($countryId) - { - $country = \oxNew(\OxidEsales\Eshop\Application\Model\Country::class); - $country->load($countryId); - return new CountryType($country->getFieldData('oxisoalpha2')); - } - - /** - * @param Order $order - * @return BillingNumber - */ - protected function buildAccountNumber(Order $order): BillingNumber - { - return new BillingNumber($this->getEkp($order), $this->getProcess($order), $this->getParticipation($order)); - } - - /** - * @param Order $order - * @return BillingNumber|null - */ - public function buildReturnAccountNumber(Order $order) - { - if (!$this->getReturnProcess($order)) { - return null; - } - return new BillingNumber($this->getEkp($order), $this->getReturnProcess($order), $this->getParticipation($order)); - } - - /** - * @return string - * @throws \Exception - */ - protected function buildShipmentDate(): string - { - $wunschpaket = Registry::get(\Mediaopt\DHL\Wunschpaket::class); - return $wunschpaket->getWunschpaket()->getTransferDay()->format('Y-m-d'); - } - - /** - * @param Order $order - * @return ShipmentItemType - */ - protected function buildShipmentItem(Order $order): ShipmentItemType - { - return new ShipmentItemType($this->calculateWeight($order)); - } - - /** - * @param Order $order - * @return ShipmentService - */ - private function buildService(Order $order): ShipmentService - { - $service = new ShipmentService(); - $process = $this->getProcess($order); - $remark = $order->oxorder__oxremark->value; - $wunschpaket = Registry::get(\Mediaopt\DHL\Wunschpaket::class); - if ($wunschpaket->hasWunschtag($remark) && $process->supportsPreferredDay()) { - $wunschtag = $wunschpaket->extractWunschtag($remark); - $wunschtag = date('Y-m-d', strtotime($wunschtag)); - $service->setPreferredDay(new ServiceconfigurationDetailsPreferredDay(1, $wunschtag)); - } - [$type, $locationPart1, $locationPart2] = $wunschpaket->extractLocation($remark); - if ($wunschpaket->hasWunschnachbar($remark) && $process->supportsPreferredNeighbour()) { - $service->setPreferredNeighbour(new ServiceconfigurationDetailsPreferredNeighbour(1, "$locationPart2, $locationPart1")); - } - if ($wunschpaket->hasWunschort($remark) && $process->supportsPreferredLocation()) { - $service->setPreferredLocation(new ServiceconfigurationDetailsPreferredLocation(1, $locationPart1)); - } - if ($process->supportsParcelOutletRouting()) { - $isActive = (int) Registry::getConfig()->getShopConfVar('mo_dhl__filialrouting_active'); - $altEmail = Registry::getConfig()->getShopConfVar('mo_dhl__filialrouting_alternative_email') ?: null; - $service->setParcelOutletRouting(new ServiceconfigurationDetailsOptional($isActive, $altEmail)); - } - if ($order->moDHLUsesService(MoDHLService::MO_DHL__IDENT_CHECK) && $process->supportsIdentCheck()) { - $service->setIdentCheck(new ServiceconfigurationIC($this->createIdent($order), true)); - } elseif ($order->moDHLUsesService(MoDHLService::MO_DHL__VISUAL_AGE_CHECK18) && $process->supportsVisualAgeCheck()) { - $service->setVisualCheckOfAge(new ServiceconfigurationVisualAgeCheck(true, 'A18')); - } elseif ($order->moDHLUsesService(MoDHLService::MO_DHL__VISUAL_AGE_CHECK16) && $process->supportsVisualAgeCheck()) { - $service->setVisualCheckOfAge(new ServiceconfigurationVisualAgeCheck(true, 'A16')); - } - if ($process->supportsBulkyGood()) { - $service->setBulkyGoods(new Serviceconfiguration((int) $order->moDHLUsesService(MoDHLService::MO_DHL__BULKY_GOOD))); - } - if ($process->supportsCashOnDelivery()) { - $active = (int) $order->moDHLUsesService(MoDHLService::MO_DHL__CASH_ON_DELIVERY); - $service->setCashOnDelivery(new ServiceconfigurationCashOnDelivery($active, $this->getEURPrice($order, $order->oxorder__oxtotalordersum->value))); - } - $orderBrutSum = $this->getEURPrice($order, $order->oxorder__oxtotalbrutsum->value); - if ($process->supportsAdditionalInsurance()) { - $active = (int) ($order->moDHLUsesService(MoDHLService::MO_DHL__ADDITIONAL_INSURANCE) && $orderBrutSum > 500); - $service->setAdditionalInsurance(new ServiceconfigurationAdditionalInsurance($active, $orderBrutSum)); - } - if ($process->supportsPremium()) { - $active = (bool) ($order->moDHLUsesService(MoDHLService::MO_DHL__PREMIUM)); - $service->setPremium(new Serviceconfiguration($active)); - } - if ($process->supportsCDP()) { - $active = (bool) ($order->moDHLUsesService(MoDHLService::MO_DHL__CDP)); - $service->setCDP(new CDP($active)); - } - if ($process->supportsEconomy()) { - $active = (bool) ($order->moDHLUsesService(MoDHLService::MO_DHL__ECONOMY)); - $service->setEconomy(new Economy($active)); - } - if ($process->supportsEndorsement()) { - $abandonment = (bool) ($order->moDHLUsesService(MoDHLService::MO_DHL__ENDORSEMENT)); - $service->setEndorsement(new ServiceconfigurationEndorsement(true, $abandonment ? MoDHLService::MO_DHL__ENDORSEMENT_ABANDONMENT : MoDHLService::MO_DHL__ENDORSEMENT_IMMEDIATE)); - } - if ($process->supportsPDDP()) { - $active = (bool) ($order->moDHLUsesService(MoDHLService::MO_DHL__PDDP)); - $service->setPDDP(new PDDP($active)); - } - if ($process->supportsNoNeighbourDelivery()) { - $isActive = (int) Registry::getConfig()->getShopConfVar('mo_dhl__no_neighbour_delivery_active'); - $service->setNoNeighbourDelivery(new Serviceconfiguration($isActive)); - } - if ($process->supportsNamedPersonOnly()) { - $isActive = $order->moDHLUsesService(MoDHLService::MO_DHL__NAMED_PERSON_ONLY); - $service->setNamedPersonOnly(new Serviceconfiguration($isActive)); - } - if ($process->supportsSignedForByRecipient()) { - $isActive = $order->moDHLUsesService(MoDHLService::MO_DHL__SIGNED_FOR_BY_RECIPIENT); - $service->setSignedForByRecipient(new Serviceconfiguration($isActive)); - } - return $service; - } - - /** - * @param Order $order - * @return Ident - */ - protected function createIdent(Order $order) : Ident - { - $ident = new Ident( - $order->moDHLGetAddressData('lname'), - $order->moDHLGetAddressData('fname'), - $order->getFieldData('mo_dhl_ident_check_birthday'), - Registry::getConfig()->getShopConfVar('mo_dhl__ident_check_min_age') - ? 'A' . Registry::getConfig()->getShopConfVar('mo_dhl__ident_check_min_age') - : null); - if ($order->moDHLUsesService(MoDHLService::MO_DHL__VISUAL_AGE_CHECK18)) { - $ident->setMinimumAge('A18'); - } elseif ($order->moDHLUsesService(MoDHLService::MO_DHL__VISUAL_AGE_CHECK16) && !$ident->getMinimumAge()) { - $ident->setMinimumAge('A16'); - } - return $ident; - } - - /** - * @return ShipperType - * @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException - */ - protected function buildReturnReceiver(): ShipperType - { - $config = Registry::getConfig(); - if ($config->getShopConfVar('mo_dhl__retoure_receiver_use_sender')) { - return $this->buildShipper(); - } - $name = new NameType($config->getShopConfVar('mo_dhl__retoure_receiver_line1'), $config->getShopConfVar('mo_dhl__retoure_receiver_line2'), $config->getShopConfVar('mo_dhl__retoure_receiver_line3')); - $iso2 = $this->getIsoalpha2FromIsoalpha3($config->getShopConfVar('mo_dhl__retoure_receiver_country')); - $country = new CountryType($iso2); - $address = new NativeAddressTypeNew($config->getShopConfVar('mo_dhl__retoure_receiver_street'), $config->getShopConfVar('mo_dhl__retoure_receiver_street_number'), $config->getShopConfVar('mo_dhl__retoure_receiver_zip'), $config->getShopConfVar('mo_dhl__retoure_receiver_city'), $country); - return new ShipperType($name, $address); - } - - /** - * @return ShipperType - * @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException - */ - protected function buildShipper(): ShipperType - { - $config = Registry::getConfig(); - - $name = new NameType( - $this->convertSpecialChars($config->getShopConfVar('mo_dhl__sender_line1')), - $this->convertSpecialChars($config->getShopConfVar('mo_dhl__sender_line2')), - $this->convertSpecialChars($config->getShopConfVar('mo_dhl__sender_line3')) - ); - $iso2 = $this->getIsoalpha2FromIsoalpha3($config->getShopConfVar('mo_dhl__sender_country')); - $country = new CountryType($iso2); - $address = new NativeAddressTypeNew( - $this->convertSpecialChars($config->getShopConfVar('mo_dhl__sender_street')), - $config->getShopConfVar('mo_dhl__sender_street_number'), - $config->getShopConfVar('mo_dhl__sender_zip'), - $this->convertSpecialChars($config->getShopConfVar('mo_dhl__sender_city')), - $country - ); - return new ShipperType($name, $address); - } - - /** - * @param Order $order - * @return PostfilialeTypeNoCountry - */ - private function buildPostfiliale(Order $order): PostfilialeTypeNoCountry - { - return new PostfilialeTypeNoCountry($order->moDHLGetAddressData('streetnr'), $order->moDHLGetAddressData('addinfo'), $order->moDHLGetAddressData('zip'), $order->moDHLGetAddressData('city')); - } - - /** - * @param Order $order - * @return PackStationType - * @throws \OxidEsales\Eshop\Core\Exception\SystemComponentException - */ - protected function buildPackstation(Order $order): PackStationType - { - return new PackStationType($order->moDHLGetAddressData('addinfo'), $order->moDHLGetAddressData('streetnr'), $order->moDHLGetAddressData('zip'), $order->moDHLGetAddressData('city'), null, $this->buildCountry($order->moDHLGetAddressData('countryid'))); - } - - /** - * @param Order $order - * @return ReceiverNativeAddressType - * @throws \OxidEsales\Eshop\Core\Exception\SystemComponentException - */ - protected function buildAddress(Order $order): ReceiverNativeAddressType - { - $address = new ReceiverNativeAddressType( - $order->moDHLGetAddressData('company') - ? $this->convertSpecialChars($order->moDHLGetAddressData('company')) - : null, - $order->moDHLGetAddressData('addinfo') - ? $this->convertSpecialChars($order->moDHLGetAddressData('addinfo')) - : null, - $this->convertSpecialChars($order->moDHLGetAddressData('street')), - $order->moDHLGetAddressData('streetnr'), - $order->moDHLGetAddressData('zip'), - $this->convertSpecialChars($order->moDHLGetAddressData('city')), - $this->getStateName($order->moDHLGetAddressData('stateid')) ?: null, - $this->buildCountry($order->moDHLGetAddressData('countryid')) - ); - return $address; - } - - /** - * @param Order $order - * @return bool - */ - protected function sendNotificationAllowed(Order $order): bool - { - if (!$this->getProcess($order)->supportsNotification()) { - return false; - } - switch (Registry::getConfig()->getShopConfVar('mo_dhl__notification_mode')) { - case MoDHLNotificationMode::NEVER: - return false; - case MoDHLNotificationMode::ALWAYS: - return true; - default: - return (bool)$order->getFieldData('MO_DHL_ALLOW_NOTIFICATION'); - } - } - - /** - * @param Order $order - */ - protected function buildExportDocument(Order $order) - { - if (!$this->isInternational($order)) { - return null; - } - $config = Registry::getConfig(); - $exportDocumentType = (new ExportDocumentType( - 'COMMERCIAL_GOODS', - $this->convertSpecialChars($config->getShopConfVar('mo_dhl__sender_city')) - ))->setAdditionalFee($this->getEURPrice($order, $order->oxorder__oxdelcost->value)); - - $iso2 = $this->getIsoalpha2FromIsoalpha3($config->getShopConfVar('mo_dhl__sender_country')); - - $receiverLanguages = $this->getReceiverLanguages($order); - - $exportDocuments = []; - - /** @var OrderArticle $orderArticle */ - foreach ($order->getOrderArticles() as $orderArticle) { - $count = $orderArticle->getFieldData('oxamount'); - $exportDocuments[] = new ExportDocPosition( - $this->getArticleTitle($orderArticle, $receiverLanguages), - $iso2, - $orderArticle->getArticle()->getFieldData(MoDHLService::MO_DHL__ZOLLTARIF), - $count, - $this->getArticleWeight($orderArticle, $config), - $this->getEURPrice($order, $orderArticle->getPrice()->getPrice()) - ); - } - - return $exportDocumentType->setExportDocPosition($exportDocuments); - } - - /** - * @param string $isoalpha3 - * @return false|string - * @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException - */ - protected function getIsoalpha2FromIsoalpha3($isoalpha3) { - return \OxidEsales\Eshop\Core\DatabaseProvider::getDb() - ->getOne('SELECT OXISOALPHA2 from oxcountry where OXISOALPHA3 = ? ', [$isoalpha3]); - } - - /** - * @param Order $order - * @param float $price - * @return float - */ - protected function getEURPrice(Order $order, float $price): float - { - if ($order->oxorder__oxcurrency->value === Currency::MO_DHL__EUR) { - return $price; - } - - return round($price / $order->oxorder__oxcurrate->value, 2); - } - - /** - * @param Order $order - * @return array - * @throws \OxidEsales\Eshop\Core\Exception\SystemComponentException - */ - protected function getReceiverLanguages(Order $order): array - { - $receiverCountryISO2 = strtolower( - $this->buildCountry($order->moDHLGetAddressData('countryid'))->getCountryISOCode() - ); - - $storeLanguages = []; - foreach (Registry::getLang()->getLanguageArray() as $language) { - $storeLanguages[$language->oxid] = $language->id; - } - - if (!array_key_exists($receiverCountryISO2, CountriesLanguages::$LIST)) { - // If we have no list of languages for receiver country we will use default language - return []; - } - - $receiverLanguages = []; - foreach (CountriesLanguages::$LIST[$receiverCountryISO2] as $language) { - if (array_key_exists($language, $storeLanguages)) { - $receiverLanguages[$language] = $storeLanguages[$language]; - } - } - - // If we have a list we will use receiver languages in order from CountriesLanguages - return $receiverLanguages; - } - - /** - * @param OrderArticle $orderArticle - * @param array $receiverLanguages - * @return false|string - */ - protected function getArticleTitle(OrderArticle $orderArticle, array $receiverLanguages) - { - $articleId = $orderArticle->getArticle()->getId(); - $articleModel = oxNew(\OxidEsales\EshopCommunity\Application\Model\Article::class); - - $title = ''; - foreach ($receiverLanguages as $languageId) { - $articleModel->loadInLang($languageId, $articleId); - $title = $articleModel->getFieldData('oxtitle'); - if (!empty($title)) { - break; - } - } - $title = $title - ?? $orderArticle->getArticle()->getFieldData('oxtitle') - ?? $orderArticle->getFieldData('oxtitle'); - - return mb_substr($this->convertSpecialChars($title), 0, 50); - } - - /** - * @param string $string - * @return string - */ - public static function convertSpecialChars($string = ''): string - { - return html_entity_decode($string); - } -} diff --git a/src/modules/mo/mo_dhl/Adapter/InternetmarkeShoppingCartPDFRequestBuilder.php b/src/modules/mo/mo_dhl/Adapter/InternetmarkeShoppingCartPDFRequestBuilder.php index ce260794..2c492fa5 100644 --- a/src/modules/mo/mo_dhl/Adapter/InternetmarkeShoppingCartPDFRequestBuilder.php +++ b/src/modules/mo/mo_dhl/Adapter/InternetmarkeShoppingCartPDFRequestBuilder.php @@ -2,7 +2,6 @@ namespace Mediaopt\DHL\Adapter; -use Mediaopt\DHL\Api\GKV\ShipmentOrderType; use Mediaopt\DHL\Api\Internetmarke\CreateShopOrderIdRequest; use Mediaopt\DHL\Api\Internetmarke\ShoppingCartPDFPosition; use Mediaopt\DHL\Api\Internetmarke\ShoppingCartPDFRequestType; @@ -42,7 +41,7 @@ public function build(array $orderIds): ShoppingCartPDFRequestType /** * @param string $orderId - * @return ShipmentOrderType + * @return ShoppingCartPDFPosition * @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException * @throws \OxidEsales\Eshop\Core\Exception\SystemComponentException */ diff --git a/src/modules/mo/mo_dhl/Adapter/ParcelShippingConverter.php b/src/modules/mo/mo_dhl/Adapter/ParcelShippingConverter.php deleted file mode 100644 index cf68ef18..00000000 --- a/src/modules/mo/mo_dhl/Adapter/ParcelShippingConverter.php +++ /dev/null @@ -1,719 +0,0 @@ - - */ - protected const ISO2_TO_ISO3_COUNTRY_CODES = [ - "BD" => "BGD", - "BE" => "BEL", - "BF" => "BFA", - "BG" => "BGR", - "BA" => "BIH", - "BB" => "BRB", - "WF" => "WLF", - "BL" => "BLM", - "BM" => "BMU", - "BN" => "BRN", - "BO" => "BOL", - "BH" => "BHR", - "BI" => "BDI", - "BJ" => "BEN", - "BT" => "BTN", - "JM" => "JAM", - "BV" => "BVT", - "BW" => "BWA", - "WS" => "WSM", - "BQ" => "BES", - "BR" => "BRA", - "BS" => "BHS", - "JE" => "JEY", - "BY" => "BLR", - "BZ" => "BLZ", - "RU" => "RUS", - "RW" => "RWA", - "RS" => "SRB", - "TL" => "TLS", - "RE" => "REU", - "TM" => "TKM", - "TJ" => "TJK", - "RO" => "ROU", - "TK" => "TKL", - "GW" => "GNB", - "GU" => "GUM", - "GT" => "GTM", - "GS" => "SGS", - "GR" => "GRC", - "GQ" => "GNQ", - "GP" => "GLP", - "JP" => "JPN", - "GY" => "GUY", - "GG" => "GGY", - "GF" => "GUF", - "GE" => "GEO", - "GD" => "GRD", - "GB" => "GBR", - "GA" => "GAB", - "SV" => "SLV", - "GN" => "GIN", - "GM" => "GMB", - "GL" => "GRL", - "GI" => "GIB", - "GH" => "GHA", - "OM" => "OMN", - "TN" => "TUN", - "JO" => "JOR", - "HR" => "HRV", - "HT" => "HTI", - "HU" => "HUN", - "HK" => "HKG", - "HN" => "HND", - "HM" => "HMD", - "VE" => "VEN", - "PR" => "PRI", - "PS" => "PSE", - "PW" => "PLW", - "PT" => "PRT", - "SJ" => "SJM", - "PY" => "PRY", - "IQ" => "IRQ", - "PA" => "PAN", - "PF" => "PYF", - "PG" => "PNG", - "PE" => "PER", - "PK" => "PAK", - "PH" => "PHL", - "PN" => "PCN", - "PL" => "POL", - "PM" => "SPM", - "ZM" => "ZMB", - "EH" => "ESH", - "EE" => "EST", - "EG" => "EGY", - "ZA" => "ZAF", - "EC" => "ECU", - "IT" => "ITA", - "VN" => "VNM", - "SB" => "SLB", - "ET" => "ETH", - "SO" => "SOM", - "ZW" => "ZWE", - "SA" => "SAU", - "ES" => "ESP", - "ER" => "ERI", - "ME" => "MNE", - "MD" => "MDA", - "MG" => "MDG", - "MF" => "MAF", - "MA" => "MAR", - "MC" => "MCO", - "UZ" => "UZB", - "MM" => "MMR", - "ML" => "MLI", - "MO" => "MAC", - "MN" => "MNG", - "MH" => "MHL", - "MK" => "MKD", - "MU" => "MUS", - "MT" => "MLT", - "MW" => "MWI", - "MV" => "MDV", - "MQ" => "MTQ", - "MP" => "MNP", - "MS" => "MSR", - "MR" => "MRT", - "IM" => "IMN", - "UG" => "UGA", - "TZ" => "TZA", - "MY" => "MYS", - "MX" => "MEX", - "IL" => "ISR", - "FR" => "FRA", - "IO" => "IOT", - "SH" => "SHN", - "FI" => "FIN", - "FJ" => "FJI", - "FK" => "FLK", - "FM" => "FSM", - "FO" => "FRO", - "NI" => "NIC", - "NL" => "NLD", - "NO" => "NOR", - "NA" => "NAM", - "VU" => "VUT", - "NC" => "NCL", - "NE" => "NER", - "NF" => "NFK", - "NG" => "NGA", - "NZ" => "NZL", - "NP" => "NPL", - "NR" => "NRU", - "NU" => "NIU", - "CK" => "COK", - "XK" => "XKX", - "CI" => "CIV", - "CH" => "CHE", - "CO" => "COL", - "CN" => "CHN", - "CM" => "CMR", - "CL" => "CHL", - "CC" => "CCK", - "CA" => "CAN", - "CG" => "COG", - "CF" => "CAF", - "CD" => "COD", - "CZ" => "CZE", - "CY" => "CYP", - "CX" => "CXR", - "CR" => "CRI", - "CW" => "CUW", - "CV" => "CPV", - "CU" => "CUB", - "SZ" => "SWZ", - "SY" => "SYR", - "SX" => "SXM", - "KG" => "KGZ", - "KE" => "KEN", - "SS" => "SSD", - "SR" => "SUR", - "KI" => "KIR", - "KH" => "KHM", - "KN" => "KNA", - "KM" => "COM", - "ST" => "STP", - "SK" => "SVK", - "KR" => "KOR", - "SI" => "SVN", - "KP" => "PRK", - "KW" => "KWT", - "SN" => "SEN", - "SM" => "SMR", - "SL" => "SLE", - "SC" => "SYC", - "KZ" => "KAZ", - "KY" => "CYM", - "SG" => "SGP", - "SE" => "SWE", - "SD" => "SDN", - "DO" => "DOM", - "DM" => "DMA", - "DJ" => "DJI", - "DK" => "DNK", - "VG" => "VGB", - "DE" => "DEU", - "YE" => "YEM", - "DZ" => "DZA", - "US" => "USA", - "UY" => "URY", - "YT" => "MYT", - "UM" => "UMI", - "LB" => "LBN", - "LC" => "LCA", - "LA" => "LAO", - "TV" => "TUV", - "TW" => "TWN", - "TT" => "TTO", - "TR" => "TUR", - "LK" => "LKA", - "LI" => "LIE", - "LV" => "LVA", - "TO" => "TON", - "LT" => "LTU", - "LU" => "LUX", - "LR" => "LBR", - "LS" => "LSO", - "TH" => "THA", - "TF" => "ATF", - "TG" => "TGO", - "TD" => "TCD", - "TC" => "TCA", - "LY" => "LBY", - "VA" => "VAT", - "VC" => "VCT", - "AE" => "ARE", - "AD" => "AND", - "AG" => "ATG", - "AF" => "AFG", - "AI" => "AIA", - "VI" => "VIR", - "IS" => "ISL", - "IR" => "IRN", - "AM" => "ARM", - "AL" => "ALB", - "AO" => "AGO", - "AQ" => "ATA", - "AS" => "ASM", - "AR" => "ARG", - "AU" => "AUS", - "AT" => "AUT", - "AW" => "ABW", - "IN" => "IND", - "AX" => "ALA", - "AZ" => "AZE", - "IE" => "IRL", - "ID" => "IDN", - "UA" => "UKR", - "QA" => "QAT", - "MZ" => "MOZ", - ]; - - /** - * @param CreateShipmentOrderRequest $legacyShipmentOrderRequest - * @return array{ 0: array, 1: ShipmentOrderRequest } - */ - public function convertCreateShipmentOrderRequest(CreateShipmentOrderRequest $legacyShipmentOrderRequest): array - { - $shipments = array_map([$this, 'convertShipmentOrder'], $legacyShipmentOrderRequest->getShipmentOrder()); - $shipmentOrderRequest = new ShipmentOrderRequest(); - $shipmentOrderRequest->setShipments($shipments); - $shipmentOrderRequest->setProfile($legacyShipmentOrderRequest->getGroupProfileName() ?: GKVCreateShipmentOrderRequestBuilder::STANDARD_GRUPPENPROFIL); - return [$this->extractQueryParameters($legacyShipmentOrderRequest), $shipmentOrderRequest]; - } - - /** - * @param ValidateShipmentOrderRequest $legacyShipmentOrderRequest - * @return array{ 0: array, 1: ShipmentOrderRequest } - * @throws Exception - */ - public function convertValidateShipmentOrderRequest(ValidateShipmentOrderRequest $legacyShipmentOrderRequest): array - { - $shipment = $this->convertShipmentOrder($legacyShipmentOrderRequest->getShipmentOrder()); - $shipmentOrderRequest = new ShipmentOrderRequest(); - $shipmentOrderRequest->setProfile(GKVCreateShipmentOrderRequestBuilder::STANDARD_GRUPPENPROFIL); - $shipmentOrderRequest->setShipments([$shipment]); - return [['validate' => true], $shipmentOrderRequest]; - } - - /** - * @param array $payload - * @return string[] - */ - public function extractErrorsFromResponsePayload(array $payload): array - { - $errors = []; - foreach ($payload['items'] ?? [] as $error) { - if (\array_key_exists('validationMessages', $error)) { - foreach ($error['validationMessages'] as $validationMessage) { - $errors[] = "{$validationMessage['validationMessage']} ({$validationMessage['property']})"; - } - continue; - } - if (\array_key_exists('message', $error)) { - $errors[] = "{$error['message']} ({$error['propertyPath']})"; - } - } - if ($errors !== []) { - return $errors; - } - return \array_key_exists('detail', $payload) ? [$payload['detail']] : []; - } - - /** - * @param ShipmentOrderType|ValidateShipmentOrderType $legacyShipmentOrder - * @return Shipment - * @throws Exception - */ - protected function convertShipmentOrder($legacyShipmentOrder): Shipment - { - $shipment = new Shipment(); - $shipment->setShipper($this->buildShipper($this->extractContactAddressFromShipperType($legacyShipmentOrder->getShipment()->getShipper()))); - $shipment->setConsignee($this->extractConsignee($legacyShipmentOrder)); - $shipment->setDetails($this->extractShipmentDetails($legacyShipmentOrder)); - $shipment->setCreationSoftware(CsvExporter::CREATOR_TAG); - if ($exportDocument = $legacyShipmentOrder->getShipment()->getExportDocument()) { - $shipment->setCustoms($this->extractCustoms($exportDocument)); - } - if ($accountNumber = $legacyShipmentOrder->getShipment()->getShipmentDetails()->getAccountNumber()) { - $shipment->setBillingNumber($accountNumber); - } - if ($costCenter = $legacyShipmentOrder->getShipment()->getShipmentDetails()->getCostCentre()) { - $shipment->setCostCenter($costCenter); - } - if ($product = $legacyShipmentOrder->getShipment()->getShipmentDetails()->getProduct()) { - $shipment->setProduct($product); - } - if ($refNo = $legacyShipmentOrder->getShipment()->getShipmentDetails()->getCustomerReference()) { - $shipment->setRefNo($refNo); - } - if ($services = $this->extractServices($legacyShipmentOrder)) { - $shipment->setServices($services); - } - if ($shipmentDate = $legacyShipmentOrder->getShipment()->getShipmentDetails()->getShipmentDate()) { - $shipment->setShipDate(new DateTime($shipmentDate)); - } - return $shipment; - } - - /** - * @param ShipmentOrderType|ValidateShipmentOrderType $legacyShipmentOrder - * @return array - */ - protected function extractConsignee($legacyShipmentOrder): array - { - $legacyReceiver = $legacyShipmentOrder->getShipment()->getReceiver(); - - if ($legacyReceiver->getPackstation() !== null) { - return array_filter([ - 'city' => $legacyReceiver->getPackstation()->getCity(), - 'lockerID' => $legacyReceiver->getPackstation()->getPackstationNumber(), - 'postalCode' => $legacyReceiver->getPackstation()->getZip(), - 'postNumber' => $legacyReceiver->getPackstation()->getPostNumber(), - 'name' => $legacyReceiver->getName1(), - 'country' => $this->mapISO2ToISO3($legacyReceiver->getPackstation()->getOrigin()->getCountryISOCode()), - ]); - } - if ($legacyReceiver->getPostfiliale() !== null) { - return array_filter([ - 'city' => $legacyReceiver->getPostfiliale()->getCity(), - 'name' => $legacyReceiver->getName1(), - 'postalCode' => $legacyReceiver->getPostfiliale()->getZip(), - 'retailID' => $legacyReceiver->getPostfiliale()->getPostfilialNumber(), - 'postNumber' => $legacyReceiver->getPostfiliale()->getPostNumber(), - 'country' => $this->mapISO2ToISO3($legacyReceiver->getPostfiliale()->getOrigin()->getCountryISOCode()), - ]); - } - return array_filter([ - 'name1' => $legacyReceiver->getName1(), - 'name2' => $legacyReceiver->getAddress()->getName2(), - 'name3' => $legacyReceiver->getAddress()->getName3(), - 'dispatchingInformation' => $legacyReceiver->getAddress()->getDispatchingInformation(), - 'additionalAddressInformation1' => $legacyReceiver->getAddress()->getAddressAddition()[0] ?? null, - 'additionalAddressInformation2' => $legacyReceiver->getAddress()->getAddressAddition()[1] ?? null, - 'state' => $legacyReceiver->getAddress()->getProvince(), - 'contactName' => $legacyReceiver->getCommunication()->getContactPerson(), - 'phone' => $legacyReceiver->getCommunication()->getPhone(), - 'email' => $legacyReceiver->getCommunication()->getEmail(), - 'city' => $legacyReceiver->getAddress()->getCity(), - 'postalCode' => $legacyReceiver->getAddress()->getZip(), - 'addressStreet' => $legacyReceiver->getAddress()->getStreetName(), - 'addressHouse' => $legacyReceiver->getAddress()->getStreetNumber(), - 'country' => $this->mapISO2ToISO3($legacyReceiver->getAddress()->getOrigin()->getCountryISOCode()), - ]); - } - - /** - * @param ExportDocumentType $legacyExportDocument - * @return CustomsDetails - */ - protected function extractCustoms(ExportDocumentType $legacyExportDocument): CustomsDetails - { - $customsDetails = new CustomsDetails(); - $customsDetails->setExportType($legacyExportDocument->getExportType()); - if ($description = $legacyExportDocument->getExportTypeDescription()) { - $customsDetails->setExportDescription($description); - } - $customsDetails->setPostalCharges($this->createValue($legacyExportDocument->getAdditionalFee(), $legacyExportDocument->getCustomsCurrency())); - $customsDetails->setItems(array_map([$this, 'convertToCommodity'], $legacyExportDocument->getExportDocPosition())); - if ($attestationNo = $legacyExportDocument->getAttestationNumber()) { - $customsDetails->setAttestationNo($attestationNo); - } - if ($legacyExportDocument->getWithElectronicExportNtfctn() !== null && $legacyExportDocument->getWithElectronicExportNtfctn()->getActive()) { - $customsDetails->setHasElectronicExportNotification(true); - } - if ($invoiceNo = $legacyExportDocument->getInvoiceNumber()) { - $customsDetails->setInvoiceNo($invoiceNo); - } - if ($origin = $legacyExportDocument->getPlaceOfCommital()) { - $customsDetails->setOfficeOfOrigin($origin); - } - if ($permitNo = $legacyExportDocument->getPermitNumber()) { - $customsDetails->setPermitNo($permitNo); - } - if ($shippingConditions = $legacyExportDocument->getTermsOfTrade()) { - $customsDetails->setShippingConditions($shippingConditions); - } - return $customsDetails; - } - - /** - * @param ExportDocPosition $item - * @return Commodity - */ - protected function convertToCommodity(ExportDocPosition $item): Commodity - { - $commodity = new Commodity(); - $commodity->setItemDescription($item->getDescription()); - $commodity->setPackagedQuantity($item->getAmount()); - $commodity->setItemValue($this->createValue($item->getCustomsValue())); - $weight = new Weight(); - $weight->setUom('kg'); - $weight->setValue($item->getNetWeightInKG()); - $commodity->setItemWeight($weight); - if ($hsCode = $item->getCustomsTariffNumber()) { - $commodity->setHsCode($hsCode); - } - if ($origin = $item->getCountryCodeOrigin()) { - $commodity->setCountryOfOrigin($this->mapISO2ToISO3($origin)); - } - return $commodity; - } - - /** - * @param ContactAddress $address - * @return Shipper - */ - protected function buildShipper(ContactAddress $address): Shipper - { - $shipper = new Shipper(); - $shipper->setName1($address->getName1()); - if ($address->isInitialized('name2')) { - $shipper->setName2($address->getName2()); - } - if ($address->isInitialized('name3')) { - $shipper->setName3($address->getName3()); - } - $shipper->setCity($address->getCity()); - $shipper->setPostalCode($address->getPostalCode()); - $shipper->setAddressStreet($address->getAddressStreet()); - $shipper->setAddressHouse($address->getAddressHouse()); - $shipper->setCountry($address->getCountry()); - return $shipper; - } - - /** - * @param ShipperType|null $legacyShipper - * @return ContactAddress - */ - protected function extractContactAddressFromShipperType(?ShipperType $legacyShipper): ContactAddress - { - $contactAddress = new ContactAddress(); - $contactAddress->setName1($legacyShipper->getName()->getName1()); - if ($legacyShipper->getName()->getName2()) { - $contactAddress->setName2($legacyShipper->getName()->getName2()); - } - if ($legacyShipper->getName()->getName3()) { - $contactAddress->setName3($legacyShipper->getName()->getName3()); - } - $contactAddress->setCity($legacyShipper->getAddress()->getCity()); - if ($legacyShipper->getAddress()->getZip()) { - $contactAddress->setPostalCode($legacyShipper->getAddress()->getZip()); - } - $contactAddress->setAddressStreet($legacyShipper->getAddress()->getStreetName()); - if ($legacyShipper->getAddress()->getStreetNumber()) { - $contactAddress->setAddressHouse($legacyShipper->getAddress()->getStreetNumber()); - } - $contactAddress->setCountry($this->mapISO2ToISO3($legacyShipper->getAddress()->getOrigin()->getCountryISOCode())); - return $contactAddress; - } - - /** - * @param ShipmentOrderType|ValidateShipmentOrderType $legacyShipmentOrder - * @return ShipmentDetails - */ - protected function extractShipmentDetails($legacyShipmentOrder): ShipmentDetails - { - $shipmentDetails = new ShipmentDetails(); - $shipmentItem = $legacyShipmentOrder->getShipment()->getShipmentDetails()->getShipmentItem(); - - $dimensions = new Dimensions(); - if ($shipmentItem->getLengthInCM()) { - $dimensions->setLength($shipmentItem->getLengthInCM()); - $dimensions->setUom('cm'); - $shipmentDetails->setDim($dimensions); - } - if ($shipmentItem->getWidthInCM()) { - $dimensions->setWidth($shipmentItem->getWidthInCM()); - $dimensions->setUom('cm'); - $shipmentDetails->setDim($dimensions); - } - if ($shipmentItem->getHeightInCM()) { - $dimensions->setHeight($shipmentItem->getHeightInCM()); - $dimensions->setUom('cm'); - $shipmentDetails->setDim($dimensions); - } - - $weight = new Weight(); - if ($shipmentItem->getWeightInKG()) { - $weight->setUom('kg'); - $weight->setValue($shipmentItem->getWeightInKG()); - $shipmentDetails->setWeight($weight); - } - - return $shipmentDetails; - } - - /** - * @param ShipmentOrderType|ValidateShipmentOrderType $legacyShipmentOrder - * @return VAS|null - * @throws Exception - */ - protected function extractServices($legacyShipmentOrder): ?VAS - { - $legacyServices = $legacyShipmentOrder->getShipment()->getShipmentDetails()->getService(); - if ($legacyServices === null) { - return null; - } - - $services = new VAS(); - $initialized = false; - if ($legacyServices->getBulkyGoods() !== null && $legacyServices->getBulkyGoods()->getActive()) { - $services->setBulkyGoods(true); - $initialized = true; - } - if ($legacyServices->getEndorsement() !== null && $legacyServices->getEndorsement()->getActive()) { - $endorsement = $legacyServices->getEndorsement()->getType() === MoDHLService::MO_DHL__ENDORSEMENT_ABANDONMENT - ? 'ABANDON' - : 'RETURN'; - $services->setEndorsement($endorsement); - $initialized = true; - } - if ($legacyServices->getPreferredDay() !== null && $legacyServices->getPreferredDay()->getActive()) { - $services->setPreferredDay(new DateTime($legacyServices->getPreferredDay()->getDetails())); - $initialized = true; - } - if ($legacyServices->getPreferredLocation() !== null && $legacyServices->getPreferredLocation()->getActive()) { - $services->setPreferredLocation($legacyServices->getPreferredLocation()->getDetails()); - $initialized = true; - } - if ($legacyServices->getPreferredNeighbour() !== null && $legacyServices->getPreferredNeighbour()->getActive()) { - $services->setPreferredNeighbour($legacyServices->getPreferredNeighbour()->getDetails()); - $initialized = true; - } - if ($legacyServices->getVisualCheckOfAge() !== null && $legacyServices->getVisualCheckOfAge()->getActive()) { - $services->setVisualCheckOfAge($legacyServices->getVisualCheckOfAge()->getType()); - $initialized = true; - } - if ($returnAccountNumber = $legacyShipmentOrder->getShipment()->getShipmentDetails()->getReturnShipmentAccountNumber()) { - $dhlRetoure = new VASDhlRetoure(); - $dhlRetoure->setBillingNumber($returnAccountNumber); - $dhlRetoure->setReturnAddress($this->extractContactAddressFromShipperType($legacyShipmentOrder->getShipment()->getShipper())); - if ($refNo = $legacyShipmentOrder->getShipment()->getShipmentDetails()->getReturnShipmentReference()) { - $dhlRetoure->setRefNo($refNo); - } - - $services->setDhlRetoure($dhlRetoure); - $initialized = true; - } - if ($legacyServices->getAdditionalInsurance() !== null && $legacyServices->getAdditionalInsurance()->getActive()) { - $services->setAdditionalInsurance($this->createValue($legacyServices->getAdditionalInsurance()->getInsuranceAmount())); - $initialized = true; - } - if ($legacyServices->getCashOnDelivery() !== null && $legacyServices->getCashOnDelivery()->getActive()) { - $cashOnDelivery = new VASCashOnDelivery(); - $cashOnDelivery->setAmount($this->createValue($legacyServices->getCashOnDelivery()->getCodAmount())); - $services->setCashOnDelivery($cashOnDelivery); - $initialized = true; - } - if ($legacyServices->getIdentCheck() !== null && $legacyServices->getIdentCheck()->getActive()) { - $legacyIdent = $legacyServices->getIdentCheck()->getIdent(); - $identCheck = new VASIdentCheck(); - $identCheck->setDateOfBirth(new DateTime($legacyIdent->getDateOfBirth())); - $identCheck->setFirstName($legacyIdent->getGivenName()); - $identCheck->setLastName($legacyIdent->getSurname()); - $identCheck->setMinimumAge($legacyIdent->getMinimumAge()); - $services->setIdentCheck($identCheck); - $initialized = true; - } - if ($legacyServices->getIndividualSenderRequirement() && $legacyServices->getIndividualSenderRequirement()->getActive()) { - $services->setIndividualSenderRequirement($legacyServices->getIndividualSenderRequirement()->getDetails()); - $initialized = true; - } - if ($legacyServices->getNamedPersonOnly() !== null && $legacyServices->getNamedPersonOnly()->getActive()) { - $services->setNamedPersonOnly(true); - $initialized = true; - } - if ($legacyServices->getNoNeighbourDelivery() !== null && $legacyServices->getNoNeighbourDelivery()->getActive()) { - $services->setNoNeighbourDelivery(true); - $initialized = true; - } - if ($legacyServices->getSignedForByRecipient() !== null && $legacyServices->getSignedForByRecipient()->getActive()) { - $services->setSignedForByRecipient(true); - $initialized = true; - } - if ($legacyServices->getParcelOutletRouting() !== null && $legacyServices->getParcelOutletRouting()->getActive()) { - $services->setParcelOutletRouting($legacyServices->getParcelOutletRouting()->getDetails() ?: ''); - $initialized = true; - } - if ($legacyServices->getPDDP() !== null && $legacyServices->getPDDP()->getActive()) { - $services->setPostalDeliveryDutyPaid(true); - $initialized = true; - } - if ($legacyServices->getCDP() !== null && $legacyServices->getCDP()->getActive()) { - $services->setClosestDropPoint(true); - $initialized = true; - } - if ($legacyServices->getPremium() !== null && $legacyServices->getPremium()->getActive()) { - $services->setPremium(true); - $initialized = true; - } - - return $initialized ? $services : null; - } - - /** - * @param CreateShipmentOrderRequest $legacyShipmentOrderRequest - * @return array - */ - protected function extractQueryParameters(CreateShipmentOrderRequest $legacyShipmentOrderRequest): array - { - return [ - 'includeDocs' => 'URL', - 'combine' => (bool)$legacyShipmentOrderRequest->getCombinedPrinting(), - 'mustEncode' => \in_array(true, array_map(function ($shipment) use ($legacyShipmentOrderRequest) { - return $shipment->getPrintOnlyIfCodeable() !== null && $shipment->getPrintOnlyIfCodeable()->getActive(); - }, $legacyShipmentOrderRequest->getShipmentOrder()), true), - ]; - } - - /** - * @param string $iso2 - * @return string - */ - protected function mapISO2ToISO3(string $iso2): string - { - if (!\array_key_exists(\strtoupper($iso2), self::ISO2_TO_ISO3_COUNTRY_CODES)) { - throw new \InvalidArgumentException(\sprintf('Could not map ISO2 "%s" to ISO3', $iso2)); - } - return self::ISO2_TO_ISO3_COUNTRY_CODES[\strtoupper($iso2)]; - } - - /** - * This method will return a value with EUR as currency since the currency this class receives is EUR at the moment. - * - * @param float $amount - * @param string|null $currency - * @return Value - */ - protected function createValue(float $amount, ?string $currency = null): Value - { - $value = new Value(); - $value->setValue($amount); - $value->setCurrency($currency ?: 'EUR'); - return $value; - } -} diff --git a/src/modules/mo/mo_dhl/Adapter/ParcelShippingCustomRequestBuilder.php b/src/modules/mo/mo_dhl/Adapter/ParcelShippingCustomRequestBuilder.php new file mode 100644 index 00000000..3feea231 --- /dev/null +++ b/src/modules/mo/mo_dhl/Adapter/ParcelShippingCustomRequestBuilder.php @@ -0,0 +1,290 @@ +getShipper(); + $services = $shipment->getServices(); + $returnReceiver = $services->isInitialized('dhlRetoure') ? $services->getDhlRetoure()->getReturnAddress() : oxNew(ParcelShippingRequestBuilder::class)->buildReturnReceiver(); + $codAmount = $services->isInitialized('cashOnDelivery') ? $services->getCashOnDelivery()->getAmount() : oxNew(ParcelShippingRequestBuilder::class)->createCashOnDelivery($order)->getAmount(); + return [ + 'weight' => array_merge([ + 'total' => ['weight' => $shipment->getDetails()->getWeight()->getValue(), 'title' => Registry::getLang()->translateString('GENERAL_ATALL')], + ], $this->getExportItemWeights($shipment)), + 'shipper' => [ + 'name1' => $shipper->getName1(), + 'name2' => $shipper->isInitialized('name2') ? $shipper->getName2() : '', + 'name3' => $shipper->isInitialized('name3') ? $shipper->getName3() : '', + 'addressStreet' => $shipper->getAddressStreet(), + 'addressHouse' => $shipper->getAddressHouse(), + 'postalCode' => $shipper->getPostalCode(), + 'city' => $shipper->getCity(), + 'country' => $shipper->getCountry(), + ], + 'receiver' => $shipment->getConsignee(), + 'services' => [ + 'parcelOutletRouting' => $services->isInitialized('parcelOutletRouting') ? $services->getParcelOutletRouting() : null, + 'printOnlyIfCodeable' => $query['mustEncode'], + 'dhlRetoure' => [ + 'active' => $services->isInitialized('dhlRetoure') && $services->getDhlRetoure()->getBillingNumber(), + 'address' => [ + 'name1' => $returnReceiver->getName1(), + 'name2' => $returnReceiver->isInitialized('name2') ? $returnReceiver->getName2() : '', + 'name3' => $returnReceiver->isInitialized('name3') ? $returnReceiver->getName3() : '', + 'addressStreet' => $returnReceiver->getAddressStreet(), + 'addressHouse' => $returnReceiver->getAddressHouse(), + 'postalCode' => $returnReceiver->getPostalCode(), + 'city' => $returnReceiver->getCity(), + 'country' => $returnReceiver->getCountry(), + ] + ], + 'bulkyGoods' => $services->isInitialized('bulkyGoods') && $services->getBulkyGoods(), + 'additionalInsurance' => $services->isInitialized('additionalInsurance') ? $services->getAdditionalInsurance()->getValue() : null, + 'identCheck' => $services->isInitialized('identCheck') ? $services->getIdentCheck() : null, + 'cashOnDelivery' => [ + 'active' => $services->isInitialized('cashOnDelivery'), + 'codAmount' => $codAmount->getValue(), + ], + 'visualAgeCheck' => $services->isInitialized('visualCheckOfAge') ? $services->getVisualCheckOfAge() : null, + 'pddp' => $services->isInitialized('postalDeliveryDutyPaid') && $services->getPostalDeliveryDutyPaid(), + 'cdp' => $services->isInitialized('closestDropPoint') && $services->getClosestDropPoint(), + 'premium' => $services->isInitialized('premium') && $services->getPremium(), + 'endorsement' => $services->isInitialized('endorsement') ? $services->getEndorsement() : null, + 'noNeighbourDelivery' => $services->isInitialized('noNeighbourDelivery') && $services->getNoNeighbourDelivery(), + 'namedPersonOnly' => $services->isInitialized('namedPersonOnly') && $services->getNamedPersonOnly(), + 'signedForByRecipient' => $services->isInitialized('signedForByRecipient') && $services->getSignedForByRecipient(), + ], + ]; + } + + /** + * @param Shipment $shipmentOrder + * @param array $data + * @param Order $order + */ + public function applyCustomDataToShipmentOrder(&$shipment, $data, Order $order) + { + $this->useCustomWeightData($shipment, $data['weight']); + $this->useCustomShipper($shipment, $data['shipper']); + $this->useCustomReceiver($shipment, $data['receiver']); + $this->useCustomServices($shipment, $data['services'], $order); + } + + public function applyCustomDataToQuery(&$query, $data) + { + $query['mustEncode'] = filter_var($data['services']['printOnlyIfCodeable']['active'], FILTER_VALIDATE_BOOLEAN); + } + + /** + * @param Shipment $shipment + * @param array $weightData + */ + protected function useCustomWeightData(Shipment $shipment, $weightData) + { + foreach ($weightData as $key => $value) { + if (strpos($value, ',') !== false) { + $value = \OxidEsales\EshopCommunity\Core\Registry::getUtils()->string2Float($value); + } + if ($key === 'total') { + $shipment->getDetails()->getWeight()->setValue($value); + } else { + $shipment->getCustoms()->getItems()[$key]->getItemWeight()->setValue($value); + } + } + } + + + /** + * @param Shipment $shipment + * @param array $shipperData + */ + protected function useCustomShipper(Shipment $shipment, array $shipperData) + { + $shipper = new Shipper(); + foreach (array_filter($shipperData) as $key => $value) { + $shipper->{"set" . ucfirst($key)}($value); + } + $shipment->setShipper($shipper); + } + + + /** + * @param Shipment $shipment + * @param array $receiverData + */ + protected function useCustomReceiver(Shipment $shipment, $receiverData) + { + $shipment->setConsignee($receiverData); + } + + /** + * @param Shipment $shipment + * @param array $servicesData + * @param Order $order + */ + protected function useCustomServices(Shipment $shipment, $servicesData, Order $order) + { + $process = $this->getProcess($order); + $services = new VAS(); + if ($process->supportsParcelOutletRouting() && filter_var($servicesData['parcelOutletRouting']['active'], FILTER_VALIDATE_BOOLEAN)) { + $details = $servicesData['parcelOutletRouting']['details'] ?: ''; + $services->setParcelOutletRouting($details); + } + + if ($process->supportsDHLRetoure() && filter_var($servicesData['dhlRetoure']['active'], FILTER_VALIDATE_BOOLEAN)) { + $accountNumber = Registry::get(ParcelShippingRequestBuilder::class)->buildReturnAccountNumber($order); + $retoure = new VASDhlRetoure(); + $retoure->setBillingNumber($accountNumber); + $address = new ContactAddress(); + foreach (array_filter($servicesData['dhlRetoure']['address']) as $key => $value) { + $address->{"set" . ucfirst($key)}($value); + } + $retoure->setReturnAddress($address); + $services->setDhlRetoure($retoure); + } + if ($process->supportsBulkyGood() && filter_var($servicesData['bulkyGoods']['active'], FILTER_VALIDATE_BOOLEAN)) { + $services->setBulkyGoods(true); + } + if ($process->supportsAdditionalInsurance() && filter_var($servicesData['additionalInsurance']['active'], FILTER_VALIDATE_BOOLEAN)) { + $details = $servicesData['additionalInsurance']['insuranceAmount'] ?? null; + $services->setAdditionalInsurance($this->createValue($details)); + } + if ($process->supportsCashOnDelivery() && filter_var($servicesData['cashOnDelivery']['active'], FILTER_VALIDATE_BOOLEAN)) { + $cashOnDelivery = oxNew(ParcelShippingRequestBuilder::class)->createCashOnDelivery($order); + if ($details = $servicesData['cashOnDelivery']['codAmount'] ?? null) { + $cashOnDelivery->setAmount($this->createValue($details)); + } + $services->setCashOnDelivery($cashOnDelivery); + } + if ($process->supportsIdentCheck() && filter_var($servicesData['identCheck']['active'], FILTER_VALIDATE_BOOLEAN)) { + $services->setIdentCheck($this->extractIdent($servicesData['identCheck'])); + } + elseif ($process->supportsVisualAgeCheck() && $ageCheck = $servicesData['visualAgeCheck'] ?? null) { + $services->setVisualCheckOfAge('A' . $ageCheck); + } + if ($process->supportsPDDP() && filter_var($servicesData['pddp']['active'], FILTER_VALIDATE_BOOLEAN)) { + $services->setPostalDeliveryDutyPaid(true); + } + if ($process->supportsCDP() && filter_var($servicesData['cdp']['active'], FILTER_VALIDATE_BOOLEAN)) { + $services->setClosestDropPoint(true); + } + if ($process->supportsPremium() && filter_var($servicesData['premium']['active'], FILTER_VALIDATE_BOOLEAN)) { + $services->setPremium(true); + } + if ($process->supportsEndorsement()) { + $endorsement = $servicesData['endorsement'] ?? MoDHLService::MO_DHL__ENDORSEMENT_RETURN; + $services->setEndorsement($endorsement); + } + if ($process->supportsNoNeighbourDelivery() && filter_var($servicesData['noNeighbourDelivery']['active'], FILTER_VALIDATE_BOOLEAN)) { + $services->setNoNeighbourDelivery(true); + } + if ($process->supportsNamedPersonOnly() && filter_var($servicesData['namedPersonOnly']['active'], FILTER_VALIDATE_BOOLEAN)) { + $services->setNamedPersonOnly(true); + } + if ($process->supportsSignedForByRecipient() && filter_var($servicesData['signedForByRecipient']['active'], FILTER_VALIDATE_BOOLEAN)) { + $services->setSignedForByRecipient(true); + } + $shipment->setServices($services); + } + + /** + * @param array $identCheckData + * @return VASIdentCheck + * @throws \Exception + */ + protected function extractIdent($identCheckData): VASIdentCheck + { + $identCheck = (new VASIdentCheck()) + ->setFirstName($identCheckData['firstName']) + ->setLastName($identCheckData['lastName']); + if ($identCheckData['dateOfBirth']) { + $identCheck->setDateOfBirth((new \DateTime($identCheckData['dateOfBirth']))); + } + if ($identCheckData['minimumAge']) { + $identCheck->setMinimumAge('A' . $identCheckData['minimumAge']); + } + return $identCheck; + } + + /** + * @param Order + * @return Process|null + */ + protected function getProcess(Order $order) + { + if ($processNr = $order->oxorder__mo_dhl_process->rawValue) { + return Process::build($processNr); + } + return null; + } + + /** + * @param Shipment $shipment + * @return array[] + */ + protected function getExportItemWeights(Shipment $shipment): array + { + if (!$shipment->isInitialized('customs')) { + return []; + } + $exportDocument = $shipment->getCustoms(); + return array_map( + [$this, 'parseCommodity'], + $exportDocument->getItems() + ); + + } + + protected function parseCommodity(Commodity $commodity): array + { + return ['weight' => $commodity->getItemWeight()->getValue(), 'title' => $commodity->getItemDescription()]; + } + + /** + * This method will return a value with EUR as currency since the currency this class receives is EUR at the moment. + * + * @param float $amount + * @param string|null $currency + * @return Value + */ + protected function createValue(float $amount, ?string $currency = null): Value + { + $value = new Value(); + $value->setValue($amount); + $value->setCurrency($currency ?: 'EUR'); + return $value; + } +} diff --git a/src/modules/mo/mo_dhl/Adapter/ParcelShippingRequestBuilder.php b/src/modules/mo/mo_dhl/Adapter/ParcelShippingRequestBuilder.php new file mode 100644 index 00000000..1a476d13 --- /dev/null +++ b/src/modules/mo/mo_dhl/Adapter/ParcelShippingRequestBuilder.php @@ -0,0 +1,574 @@ +setShipments($shipments); + $shipmentOrderRequest->setProfile(self::STANDARD_GRUPPENPROFIL); + return [$this->buildQueryParameters(), $shipmentOrderRequest]; + } + + /** + * @param string $orderId + * @return Shipment + * @throws \OxidEsales\Eshop\Core\Exception\SystemComponentException + * @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException + */ + public function buildShipment(string $orderId) + { + $order = \oxNew(Order::class); + $order->load($orderId); + $shipment = new Shipment(); + $shipment->setShipper($this->buildShipper()); + $shipment->setConsignee($this->buildReceiver($order)); + $shipment->setDetails($this->buildShipmentDetails($order)); + $shipment->setCreationSoftware(CsvExporter::CREATOR_TAG); + if ($this->isInternational($order)) { + $shipment->setCustoms( $this->buildExportDocument($order)); + } + $shipment->setBillingNumber($this->buildAccountNumber($order)); + $shipment->setProduct($this->getProcess($order)->getServiceIdentifier()); + $customerReference = Registry::getLang()->translateString('GENERAL_ORDERNUM') . ' ' . $order->getFieldData('oxordernr'); + $shipment->setRefNo($customerReference); + $shipment->setServices($this->buildService($order)); + $shipment->setShipDate($this->buildShipmentDate()); + return $shipment; + } + + /** + * @param Order $order + * @return ShipmentDetails + */ + protected function buildShipmentDetails(Order $order): ShipmentDetails + { + $shipmentDetails = new ShipmentDetails(); + $weight = new Weight(); + $weight->setUom('kg'); + $weight->setValue($this->calculateWeight($order)); + $shipmentDetails->setWeight($weight); + return $shipmentDetails; + } + + /** + * @param Order $order + * @return array + * @throws \OxidEsales\Eshop\Core\Exception\SystemComponentException + */ + protected function buildReceiver($order): array + { + $name = $this->convertSpecialChars($order->moDHLGetAddressData('fname')) + . ' ' . $this->convertSpecialChars($order->moDHLGetAddressData('lname')); + if (Branch::isPackstation($order->moDHLGetAddressData('street'))) { + return array_filter([ + 'city' => $order->moDHLGetAddressData('city'), + 'lockerID' => $order->moDHLGetAddressData('streetnr'), + 'postalCode' => $order->moDHLGetAddressData('zip'), + 'postNumber' => $order->moDHLGetAddressData('addinfo'), + 'name' => $name, + 'country' => $this->buildCountry($order->moDHLGetAddressData('countryid')), + ]); + } else if (Branch::isFiliale($order->moDHLGetAddressData('street'))) { + return array_filter([ + 'city' => $order->moDHLGetAddressData('city'), + 'name' => $name, + 'postalCode' => $order->moDHLGetAddressData('zip'), + 'retailID' => $order->moDHLGetAddressData('streetnr'), + 'postNumber' => $order->moDHLGetAddressData('addinfo'), + 'country' => $this->buildCountry($order->moDHLGetAddressData('countryid')), + ]); + } else { + return array_filter([ + 'name1' => $name, + 'name2' => $order->moDHLGetAddressData('company') + ? $this->convertSpecialChars($order->moDHLGetAddressData('company')) + : null, + 'name3' => $order->moDHLGetAddressData('addinfo') + ? $this->convertSpecialChars($order->moDHLGetAddressData('addinfo')) + : null, + 'state' => $this->getStateName($order->moDHLGetAddressData('stateid')) ?: null, + 'contactName' => $name, + 'phone' => $order->moDHLGetAddressData('fon'), + 'email' => $this->sendNotificationAllowed($order) ? $order->getFieldData('oxbillemail') : null, + 'city' => $this->convertSpecialChars($order->moDHLGetAddressData('city')), + 'postalCode' => $order->moDHLGetAddressData('zip'), + 'addressStreet' => $this->convertSpecialChars($order->moDHLGetAddressData('street')), + 'addressHouse' => $order->moDHLGetAddressData('streetnr'), + 'country' => $this->buildCountry($order->moDHLGetAddressData('countryid')), + ]); + } + } + + /** + * @param string|null $stateId + * @return string|null + */ + protected function getStateName(?string $stateId) + { + if (is_null($stateId)) { + return null; + } + + $state = \oxNew(State::class); + $state->load($stateId); + return $state->getFieldData('oxisoalpha2'); + } + + /** + * @param string $countryId + * @throws \OxidEsales\Eshop\Core\Exception\SystemComponentException + */ + protected function buildCountry($countryId): string + { + $country = \oxNew(\OxidEsales\Eshop\Application\Model\Country::class); + $country->load($countryId); + return $country->getFieldData('oxisoalpha3'); + } + + /** + * @param Order $order + * @return BillingNumber + */ + protected function buildAccountNumber(Order $order): BillingNumber + { + return new BillingNumber($this->getEkp($order), $this->getProcess($order), $this->getParticipation($order)); + } + + /** + * @param Order $order + * @return BillingNumber|null + */ + public function buildReturnAccountNumber(Order $order) + { + if (!$this->getReturnProcess($order)) { + return null; + } + return new BillingNumber($this->getEkp($order), $this->getReturnProcess($order), $this->getParticipation($order)); + } + + /** + * @return \DateTime + * @throws \Exception + */ + protected function buildShipmentDate(): \DateTime + { + $wunschpaket = Registry::get(\Mediaopt\DHL\Wunschpaket::class); + return $wunschpaket->getWunschpaket()->getTransferDay(); + } + + private function buildService(Order $order): ?VAS + { + $services = new VAS(); + $initialized = false; + + $process = $this->getProcess($order); + $remark = $order->oxorder__oxremark->value; + $wunschpaket = Registry::get(\Mediaopt\DHL\Wunschpaket::class); + + if ($wunschpaket->hasWunschtag($remark) && $process->supportsPreferredDay()) { + $wunschtag = $wunschpaket->extractWunschtag($remark); + $wunschtag = date('Y-m-d', strtotime($wunschtag)); + $services->setPreferredDay(new \DateTime($wunschtag)); + $initialized = true; + } + [$type, $locationPart1, $locationPart2] = $wunschpaket->extractLocation($remark); + if ($wunschpaket->hasWunschnachbar($remark) && $process->supportsPreferredNeighbour()) { + $services->setPreferredNeighbour("$locationPart2, $locationPart1"); + $initialized = true; + } + if ($wunschpaket->hasWunschort($remark) && $process->supportsPreferredLocation()) { + $services->setPreferredLocation($locationPart1); + $initialized = true; + } + if ($process->supportsParcelOutletRouting() && (int)Registry::getConfig()->getShopConfVar('mo_dhl__filialrouting_active')) { + $altEmail = Registry::getConfig()->getShopConfVar('mo_dhl__filialrouting_alternative_email') ?: ''; + $services->setParcelOutletRouting($altEmail); + $initialized = true; + } + if ($order->moDHLUsesService(MoDHLService::MO_DHL__IDENT_CHECK) && $process->supportsIdentCheck()) { + $services->setIdentCheck($this->createIdent($order)); + $initialized = true; + } elseif ($order->moDHLUsesService(MoDHLService::MO_DHL__VISUAL_AGE_CHECK18) && $process->supportsVisualAgeCheck()) { + $services->setVisualCheckOfAge('A18'); + $initialized = true; + } elseif ($order->moDHLUsesService(MoDHLService::MO_DHL__VISUAL_AGE_CHECK16) && $process->supportsVisualAgeCheck()) { + $services->setVisualCheckOfAge('A16'); + $initialized = true; + } + if ($process->supportsBulkyGood() && $order->moDHLUsesService(MoDHLService::MO_DHL__BULKY_GOOD)) { + $services->setBulkyGoods(true); + $initialized = true; + } + if ($process->supportsCashOnDelivery() && $order->moDHLUsesService(MoDHLService::MO_DHL__CASH_ON_DELIVERY)) { + $cashOnDelivery = $this->createCashOnDelivery($order); + $services->setCashOnDelivery($cashOnDelivery); + $initialized = true; + } + $orderBrutSum = $this->getEURPrice($order, $order->oxorder__oxtotalbrutsum->value); + if ($process->supportsAdditionalInsurance() && ($order->moDHLUsesService(MoDHLService::MO_DHL__ADDITIONAL_INSURANCE) && $orderBrutSum > 500)) { + $services->setAdditionalInsurance($this->createValue($orderBrutSum)); + $initialized = true; + } + if ($process->supportsPremium() && $order->moDHLUsesService(MoDHLService::MO_DHL__PREMIUM)) { + $services->setPremium(true); + $initialized = true; + } + if ($process->supportsCDP() && $order->moDHLUsesService(MoDHLService::MO_DHL__CDP)) { + $services->setClosestDropPoint(true); + $initialized = true; + } + if ($process->supportsEndorsement()) { + $abandonment = (bool)($order->moDHLUsesService(MoDHLService::MO_DHL__ENDORSEMENT)); + $services->setEndorsement($abandonment ? MoDHLService::MO_DHL__ENDORSEMENT_ABANDONMENT : MoDHLService::MO_DHL__ENDORSEMENT_RETURN); + $initialized = true; + } + if ($process->supportsPDDP() && $order->moDHLUsesService(MoDHLService::MO_DHL__PDDP)) { + $services->setPostalDeliveryDutyPaid(true); + $initialized = true; + } + if ($process->supportsNoNeighbourDelivery() && Registry::getConfig()->getShopConfVar('mo_dhl__no_neighbour_delivery_active')) { + $services->setNoNeighbourDelivery(true); + $initialized = true; + } + if ($process->supportsNamedPersonOnly() && $order->moDHLUsesService(MoDHLService::MO_DHL__NAMED_PERSON_ONLY)) { + $services->setNamedPersonOnly(true); + $initialized = true; + } + if ($process->supportsSignedForByRecipient() && $order->moDHLUsesService(MoDHLService::MO_DHL__SIGNED_FOR_BY_RECIPIENT)) { + $services->setSignedForByRecipient(true); + $initialized = true; + } + if (Registry::getConfig()->getShopConfVar('mo_dhl__beilegerretoure_active') && $this->getProcess($order)->supportsDHLRetoure() && $returnAccountNumber = $this->buildReturnAccountNumber($order)) { + $dhlRetoure = new VASDhlRetoure(); + $dhlRetoure->setBillingNumber($returnAccountNumber); + $dhlRetoure->setReturnAddress($this->buildReturnReceiver()); + $services->setDhlRetoure($dhlRetoure); + $initialized = true; + } + + return $initialized ? $services : null; + } + + /** + * @param Order $order + * @return VASIdentCheck + */ + protected function createIdent(Order $order): VASIdentCheck + { + $identCheck = new VASIdentCheck(); + if ($birthday = $order->getFieldData('mo_dhl_ident_check_birthday')) { + $identCheck->setDateOfBirth(new \DateTime($birthday)); + } + $identCheck->setFirstName($order->moDHLGetAddressData('fname')); + $identCheck->setLastName($order->moDHLGetAddressData('lname')); + $identCheck->setMinimumAge( + Registry::getConfig()->getShopConfVar('mo_dhl__ident_check_min_age') + ? 'A' . Registry::getConfig()->getShopConfVar('mo_dhl__ident_check_min_age') + : null); + if ($order->moDHLUsesService(MoDHLService::MO_DHL__VISUAL_AGE_CHECK18)) { + $identCheck->setMinimumAge('A18'); + } elseif ($order->moDHLUsesService(MoDHLService::MO_DHL__VISUAL_AGE_CHECK16) && !$identCheck->getMinimumAge()) { + $identCheck->setMinimumAge('A16'); + } + return $identCheck; + } + + /** + * @return ContactAddress + */ + public function buildReturnReceiver(): ContactAddress + { + $config = Registry::getConfig(); + if ($config->getShopConfVar('mo_dhl__retoure_receiver_use_sender')) { + $returnReceiver = new ContactAddress(); + $returnReceiver->setName1($this->convertSpecialChars($config->getShopConfVar('mo_dhl__sender_line1'))); + if ($name2 = $this->convertSpecialChars($config->getShopConfVar('mo_dhl__sender_line2'))) { + $returnReceiver->setName2($name2); + } + if ($name3 = $this->convertSpecialChars($config->getShopConfVar('mo_dhl__sender_line3'))) { + $returnReceiver->setName3($name3); + } + $returnReceiver->setCity($this->convertSpecialChars($config->getShopConfVar('mo_dhl__sender_city'))); + $returnReceiver->setPostalCode($config->getShopConfVar('mo_dhl__sender_zip')); + $returnReceiver->setAddressStreet($this->convertSpecialChars($config->getShopConfVar('mo_dhl__sender_street'))); + $returnReceiver->setAddressHouse($config->getShopConfVar('mo_dhl__sender_street_number')); + $returnReceiver->setCountry($config->getShopConfVar('mo_dhl__sender_country')); + return $returnReceiver; + } + $returnReceiver = new ContactAddress(); + $returnReceiver->setName1($this->convertSpecialChars($config->getShopConfVar('mo_dhl__retoure_receiver_line1'))); + if ($name2 = $this->convertSpecialChars($config->getShopConfVar('mo_dhl__retoure_receiver_line2'))) { + $returnReceiver->setName2($name2); + } + if ($name3 = $this->convertSpecialChars($config->getShopConfVar('mo_dhl__retoure_receiver_line3'))) { + $returnReceiver->setName3($name3); + } + $returnReceiver->setCity($this->convertSpecialChars($config->getShopConfVar('mo_dhl__retoure_receiver_city'))); + $returnReceiver->setPostalCode($config->getShopConfVar('mo_dhl__retoure_receiver_zip')); + $returnReceiver->setAddressStreet($this->convertSpecialChars($config->getShopConfVar('mo_dhl__retoure_receiver_street'))); + $returnReceiver->setAddressHouse($config->getShopConfVar('mo_dhl__retoure_receiver_street_number')); + $returnReceiver->setCountry($config->getShopConfVar('mo_dhl__retoure_receiver_country')); + return $returnReceiver; + } + + protected function buildShipper(): Shipper + { + $config = Registry::getConfig(); + $shipper = new Shipper(); + $shipper->setName1($this->convertSpecialChars($config->getShopConfVar('mo_dhl__sender_line1'))); + if ($name2 = $this->convertSpecialChars($config->getShopConfVar('mo_dhl__sender_line2'))) { + $shipper->setName2($name2); + } + if ($name3 = $this->convertSpecialChars($config->getShopConfVar('mo_dhl__sender_line3'))) { + $shipper->setName3($name3); + } + $shipper->setCity($this->convertSpecialChars($config->getShopConfVar('mo_dhl__sender_city'))); + $shipper->setPostalCode($config->getShopConfVar('mo_dhl__sender_zip')); + $shipper->setAddressStreet($this->convertSpecialChars($config->getShopConfVar('mo_dhl__sender_street'))); + $shipper->setAddressHouse($config->getShopConfVar('mo_dhl__sender_street_number')); + $shipper->setCountry($config->getShopConfVar('mo_dhl__sender_country')); + return $shipper; + } + + /** + * @param Order $order + * @return bool + */ + protected function sendNotificationAllowed(Order $order): bool + { + if (!$this->getProcess($order)->supportsNotification()) { + return false; + } + switch (Registry::getConfig()->getShopConfVar('mo_dhl__notification_mode')) { + case MoDHLNotificationMode::NEVER: + return false; + case MoDHLNotificationMode::ALWAYS: + return true; + default: + return (bool)$order->getFieldData('MO_DHL_ALLOW_NOTIFICATION'); + } + } + + /** + * @param Order $order + */ + protected function buildExportDocument(Order $order): CustomsDetails + { + $config = Registry::getConfig(); + + $receiverLanguages = $this->getReceiverLanguages($order); + + $exportDocuments = []; + + /** @var OrderArticle $orderArticle */ + foreach ($order->getOrderArticles() as $orderArticle) { + $commodity = new Commodity(); + $commodity->setItemDescription($this->getArticleTitle($orderArticle, $receiverLanguages)); + $commodity->setPackagedQuantity($orderArticle->getFieldData('oxamount')); + $commodity->setItemValue($this->createValue($this->getEURPrice($order, $orderArticle->getPrice()->getPrice()))); + $weight = new Weight(); + $weight->setUom('kg'); + $weight->setValue($this->getArticleWeight($orderArticle, $config)); + $commodity->setItemWeight($weight); + if ($hsCode = $orderArticle->getArticle()->getFieldData(MoDHLService::MO_DHL__ZOLLTARIF)) { + $commodity->setHsCode($hsCode); + } + if ($origin = $config->getShopConfVar('mo_dhl__sender_country')) { + $commodity->setCountryOfOrigin($origin); + } + $exportDocuments[] = $commodity; + } + + $customsDetails = new CustomsDetails(); + $customsDetails->setExportType('COMMERCIAL_GOODS'); + $customsDetails->setPostalCharges($this->createValue($this->getEURPrice($order, $order->oxorder__oxdelcost->value))); + $customsDetails->setItems($exportDocuments); + $customsDetails->setOfficeOfOrigin($this->convertSpecialChars($config->getShopConfVar('mo_dhl__sender_city'))); + return $customsDetails; + + } + + /** + * @param string $isoalpha3 + * @return false|string + * @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException + */ + protected function getIsoalpha2FromIsoalpha3($isoalpha3) + { + return \OxidEsales\Eshop\Core\DatabaseProvider::getDb() + ->getOne('SELECT OXISOALPHA2 from oxcountry where OXISOALPHA3 = ? ', [$isoalpha3]); + } + + /** + * @param Order $order + * @param float $price + * @return float + */ + protected function getEURPrice(Order $order, float $price): float + { + if ($order->oxorder__oxcurrency->value === Currency::MO_DHL__EUR) { + return $price; + } + + return round($price / $order->oxorder__oxcurrate->value, 2); + } + + /** + * @param Order $order + * @return array + * @throws \OxidEsales\Eshop\Core\Exception\SystemComponentException + */ + protected function getReceiverLanguages(Order $order): array + { + $country = \oxNew(\OxidEsales\Eshop\Application\Model\Country::class); + $country->load($order->moDHLGetAddressData('countryid')); + $receiverCountryISO2 = $country->getFieldData('oxisoalpha2'); + + $storeLanguages = []; + foreach (Registry::getLang()->getLanguageArray() as $language) { + $storeLanguages[$language->oxid] = $language->id; + } + + if (!array_key_exists($receiverCountryISO2, CountriesLanguages::$LIST)) { + // If we have no list of languages for receiver country we will use default language + return []; + } + + $receiverLanguages = []; + foreach (CountriesLanguages::$LIST[$receiverCountryISO2] as $language) { + if (array_key_exists($language, $storeLanguages)) { + $receiverLanguages[$language] = $storeLanguages[$language]; + } + } + + // If we have a list we will use receiver languages in order from CountriesLanguages + return $receiverLanguages; + } + + /** + * @param OrderArticle $orderArticle + * @param array $receiverLanguages + * @return false|string + */ + protected function getArticleTitle(OrderArticle $orderArticle, array $receiverLanguages) + { + $articleId = $orderArticle->getArticle()->getId(); + $articleModel = oxNew(\OxidEsales\EshopCommunity\Application\Model\Article::class); + + $title = ''; + foreach ($receiverLanguages as $languageId) { + $articleModel->loadInLang($languageId, $articleId); + $title = $articleModel->getFieldData('oxtitle'); + if (!empty($title)) { + break; + } + } + $title = $title + ?? $orderArticle->getArticle()->getFieldData('oxtitle') + ?? $orderArticle->getFieldData('oxtitle'); + + return mb_substr($this->convertSpecialChars($title), 0, 50); + } + + /** + * @param string $string + * @return string + */ + public static function convertSpecialChars($string = ''): string + { + return html_entity_decode($string); + } + + + /** + * This method will return a value with EUR as currency since the currency this class receives is EUR at the moment. + * + * @param float $amount + * @param string|null $currency + * @return Value + */ + protected function createValue(float $amount, ?string $currency = null): Value + { + $value = new Value(); + $value->setValue($amount); + $value->setCurrency($currency ?: 'EUR'); + return $value; + } + + public function buildQueryParameters(): array + { + return [ + 'includeDocs' => 'URL', + 'combine' => false, + 'mustEncode' => (bool) Registry::getConfig()->getShopConfVar('mo_dhl__only_with_leitcode'), + ]; + } + + /** + * @param Order $order + * @return VASCashOnDelivery + */ + public function createCashOnDelivery(Order $order): VASCashOnDelivery + { + $customerReference = Registry::getLang()->translateString('GENERAL_ORDERNUM') . ' ' . $order->getFieldData('oxordernr'); + $bankAccount = new BankAccount(); + $bankAccount->setAccountHolder(Registry::getConfig()->getShopConfVar('mo_dhl__cod_accountOwner')); + $bankAccount->setBankName(Registry::getConfig()->getShopConfVar('mo_dhl__cod_bankName')); + $bankAccount->setIban(Registry::getConfig()->getShopConfVar('mo_dhl__cod_iban')); + $cashOnDelivery = new VASCashOnDelivery(); + $cashOnDelivery->setAmount($this->createValue($this->getEURPrice($order, $order->oxorder__oxtotalordersum->value))); + $cashOnDelivery->setBankAccount($bankAccount); + $cashOnDelivery->setTransferNote1($customerReference); + return $cashOnDelivery; + } +} diff --git a/src/modules/mo/mo_dhl/Api/GKV.php b/src/modules/mo/mo_dhl/Api/GKV.php deleted file mode 100644 index a70a58d5..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV.php +++ /dev/null @@ -1,349 +0,0 @@ - 'Mediaopt\\DHL\\Api\\GKV\\Version', - 'AuthentificationType' => 'Mediaopt\\DHL\\Api\\GKV\\AuthentificationType', - 'NativeAddressType' => 'Mediaopt\\DHL\\Api\\GKV\\NativeAddressType', - 'NativeAddressTypeNew' => 'Mediaopt\\DHL\\Api\\GKV\\NativeAddressTypeNew', - 'ReceiverNativeAddressType' => 'Mediaopt\\DHL\\Api\\GKV\\ReceiverNativeAddressType', - 'PickupAddressType' => 'Mediaopt\\DHL\\Api\\GKV\\PickupAddressType', - 'DeliveryAddressType' => 'Mediaopt\\DHL\\Api\\GKV\\DeliveryAddressType', - 'BankType' => 'Mediaopt\\DHL\\Api\\GKV\\BankType', - 'NameType' => 'Mediaopt\\DHL\\Api\\GKV\\NameType', - 'ReceiverNameType' => 'Mediaopt\\DHL\\Api\\GKV\\ReceiverNameType', - 'CommunicationType' => 'Mediaopt\\DHL\\Api\\GKV\\CommunicationType', - 'ContactType' => 'Mediaopt\\DHL\\Api\\GKV\\ContactType', - 'PackStationType' => 'Mediaopt\\DHL\\Api\\GKV\\PackStationType', - 'PostfilialeType' => 'Mediaopt\\DHL\\Api\\GKV\\PostfilialeType', - 'PostfilialeTypeNoCountry' => 'Mediaopt\\DHL\\Api\\GKV\\PostfilialeTypeNoCountry', - 'ParcelShopType' => 'Mediaopt\\DHL\\Api\\GKV\\ParcelShopType', - 'CustomerType' => 'Mediaopt\\DHL\\Api\\GKV\\CustomerType', - 'ErrorType' => 'Mediaopt\\DHL\\Api\\GKV\\ErrorType', - 'CountryType' => 'Mediaopt\\DHL\\Api\\GKV\\CountryType', - 'ShipmentNumberType' => 'Mediaopt\\DHL\\Api\\GKV\\ShipmentNumberType', - 'Status' => 'Mediaopt\\DHL\\Api\\GKV\\Status', - 'Dimension' => 'Mediaopt\\DHL\\Api\\GKV\\Dimension', - 'TimeFrame' => 'Mediaopt\\DHL\\Api\\GKV\\TimeFrame', - 'GetVersionResponse' => 'Mediaopt\\DHL\\Api\\GKV\\GetVersionResponse', - 'CreateShipmentOrderRequest' => 'Mediaopt\\DHL\\Api\\GKV\\CreateShipmentOrderRequest', - 'ValidateShipmentOrderRequest' => 'Mediaopt\\DHL\\Api\\GKV\\ValidateShipmentOrderRequest', - 'CreateShipmentOrderResponse' => 'Mediaopt\\DHL\\Api\\GKV\\CreateShipmentOrderResponse', - 'ValidateShipmentResponse' => 'Mediaopt\\DHL\\Api\\GKV\\ValidateShipmentResponse', - 'GetLabelRequest' => 'Mediaopt\\DHL\\Api\\GKV\\GetLabelRequest', - 'GetLabelResponse' => 'Mediaopt\\DHL\\Api\\GKV\\GetLabelResponse', - 'DoManifestRequest' => 'Mediaopt\\DHL\\Api\\GKV\\DoManifestRequest', - 'DoManifestResponse' => 'Mediaopt\\DHL\\Api\\GKV\\DoManifestResponse', - 'DeleteShipmentOrderRequest' => 'Mediaopt\\DHL\\Api\\GKV\\DeleteShipmentOrderRequest', - 'DeleteShipmentOrderResponse' => 'Mediaopt\\DHL\\Api\\GKV\\DeleteShipmentOrderResponse', - 'GetExportDocRequest' => 'Mediaopt\\DHL\\Api\\GKV\\GetExportDocRequest', - 'GetExportDocResponse' => 'Mediaopt\\DHL\\Api\\GKV\\GetExportDocResponse', - 'GetManifestRequest' => 'Mediaopt\\DHL\\Api\\GKV\\GetManifestRequest', - 'GetManifestResponse' => 'Mediaopt\\DHL\\Api\\GKV\\GetManifestResponse', - 'UpdateShipmentOrderRequest' => 'Mediaopt\\DHL\\Api\\GKV\\UpdateShipmentOrderRequest', - 'UpdateShipmentOrderResponse' => 'Mediaopt\\DHL\\Api\\GKV\\UpdateShipmentOrderResponse', - 'CreationState' => 'Mediaopt\\DHL\\Api\\GKV\\CreationState', - 'ValidationState' => 'Mediaopt\\DHL\\Api\\GKV\\ValidationState', - 'Statusinformation' => 'Mediaopt\\DHL\\Api\\GKV\\Statusinformation', - 'StatusElement' => 'Mediaopt\\DHL\\Api\\GKV\\StatusElement', - 'PieceInformation' => 'Mediaopt\\DHL\\Api\\GKV\\PieceInformation', - 'ShipmentOrderType' => 'Mediaopt\\DHL\\Api\\GKV\\ShipmentOrderType', - 'Shipment' => 'Mediaopt\\DHL\\Api\\GKV\\Shipment', - 'ValidateShipmentOrderType' => 'Mediaopt\\DHL\\Api\\GKV\\ValidateShipmentOrderType', - 'ShipperTypeType' => 'Mediaopt\\DHL\\Api\\GKV\\ShipperTypeType', - 'ShipperType' => 'Mediaopt\\DHL\\Api\\GKV\\ShipperType', - 'ReceiverTypeType' => 'Mediaopt\\DHL\\Api\\GKV\\ReceiverTypeType', - 'ReceiverType' => 'Mediaopt\\DHL\\Api\\GKV\\ReceiverType', - 'ShipmentDetailsType' => 'Mediaopt\\DHL\\Api\\GKV\\ShipmentDetailsType', - 'ShipmentDetailsTypeType' => 'Mediaopt\\DHL\\Api\\GKV\\ShipmentDetailsTypeType', - 'ShipmentItemType' => 'Mediaopt\\DHL\\Api\\GKV\\ShipmentItemType', - 'ShipmentItemTypeType' => 'Mediaopt\\DHL\\Api\\GKV\\ShipmentItemTypeType', - 'ShipmentService' => 'Mediaopt\\DHL\\Api\\GKV\\ShipmentService', - 'Serviceconfiguration' => 'Mediaopt\\DHL\\Api\\GKV\\Serviceconfiguration', - 'ServiceconfigurationDetails' => 'Mediaopt\\DHL\\Api\\GKV\\ServiceconfigurationDetails', - 'ServiceconfigurationDetailsPreferredDay' => 'Mediaopt\\DHL\\Api\\GKV\\ServiceconfigurationDetailsPreferredDay', - 'ServiceconfigurationDetailsPreferredLocation' => 'Mediaopt\\DHL\\Api\\GKV\\ServiceconfigurationDetailsPreferredLocation', - 'ServiceconfigurationDetailsPreferredNeighbour' => 'Mediaopt\\DHL\\Api\\GKV\\ServiceconfigurationDetailsPreferredNeighbour', - 'ServiceconfigurationDetailsOptional' => 'Mediaopt\\DHL\\Api\\GKV\\ServiceconfigurationDetailsOptional', - 'ServiceconfigurationDetailsResponse' => 'Mediaopt\\DHL\\Api\\GKV\\ServiceconfigurationDetailsResponse', - 'ServiceconfigurationType' => 'Mediaopt\\DHL\\Api\\GKV\\ServiceconfigurationType', - 'ServiceconfigurationEndorsement' => 'Mediaopt\\DHL\\Api\\GKV\\ServiceconfigurationEndorsement', - 'ServiceconfigurationISR' => 'Mediaopt\\DHL\\Api\\GKV\\ServiceconfigurationISR', - 'ServiceconfigurationDH' => 'Mediaopt\\DHL\\Api\\GKV\\ServiceconfigurationDH', - 'ServiceconfigurationVisualAgeCheck' => 'Mediaopt\\DHL\\Api\\GKV\\ServiceconfigurationVisualAgeCheck', - 'ServiceconfigurationDeliveryTimeframe' => 'Mediaopt\\DHL\\Api\\GKV\\ServiceconfigurationDeliveryTimeframe', - 'ServiceconfigurationDateOfDelivery' => 'Mediaopt\\DHL\\Api\\GKV\\ServiceconfigurationDateOfDelivery', - 'ServiceconfigurationAdditionalInsurance' => 'Mediaopt\\DHL\\Api\\GKV\\ServiceconfigurationAdditionalInsurance', - 'ServiceconfigurationCashOnDelivery' => 'Mediaopt\\DHL\\Api\\GKV\\ServiceconfigurationCashOnDelivery', - 'ServiceconfigurationUnfree' => 'Mediaopt\\DHL\\Api\\GKV\\ServiceconfigurationUnfree', - 'PDDP' => 'Mediaopt\\DHL\\Api\\GKV\\PDDP', - 'CDP' => 'Mediaopt\\DHL\\Api\\GKV\\CDP', - 'Economy' => 'Mediaopt\\DHL\\Api\\GKV\\Economy', - 'ServiceconfigurationIC' => 'Mediaopt\\DHL\\Api\\GKV\\ServiceconfigurationIC', - 'ShipmentNotificationType' => 'Mediaopt\\DHL\\Api\\GKV\\ShipmentNotificationType', - 'ExportDocumentType' => 'Mediaopt\\DHL\\Api\\GKV\\ExportDocumentType', - 'ExportDocPosition' => 'Mediaopt\\DHL\\Api\\GKV\\ExportDocPosition', - 'FurtherAddressesType' => 'Mediaopt\\DHL\\Api\\GKV\\FurtherAddressesType', - 'DeliveryAdress' => 'Mediaopt\\DHL\\Api\\GKV\\DeliveryAdress', - 'LabelData' => 'Mediaopt\\DHL\\Api\\GKV\\LabelData', - 'ExportDocData' => 'Mediaopt\\DHL\\Api\\GKV\\ExportDocData', - 'ManifestState' => 'Mediaopt\\DHL\\Api\\GKV\\ManifestState', - 'DeletionState' => 'Mediaopt\\DHL\\Api\\GKV\\DeletionState', - 'BookPickupRequest' => 'Mediaopt\\DHL\\Api\\GKV\\BookPickupRequest', - 'BookPickupResponse' => 'Mediaopt\\DHL\\Api\\GKV\\BookPickupResponse', - 'PickupDetailsType' => 'Mediaopt\\DHL\\Api\\GKV\\PickupDetailsType', - 'PickupOrdererType' => 'Mediaopt\\DHL\\Api\\GKV\\PickupOrdererType', - 'PickupBookingInformationType' => 'Mediaopt\\DHL\\Api\\GKV\\PickupBookingInformationType', - 'CancelPickupRequest' => 'Mediaopt\\DHL\\Api\\GKV\\CancelPickupRequest', - 'CancelPickupResponse' => 'Mediaopt\\DHL\\Api\\GKV\\CancelPickupResponse', - 'IdentityData' => 'Mediaopt\\DHL\\Api\\GKV\\IdentityData', - 'DrivingLicense' => 'Mediaopt\\DHL\\Api\\GKV\\DrivingLicense', - 'IdentityCard' => 'Mediaopt\\DHL\\Api\\GKV\\IdentityCard', - 'BankCard' => 'Mediaopt\\DHL\\Api\\GKV\\BankCard', - 'ReadShipmentOrderResponse' => 'Mediaopt\\DHL\\Api\\GKV\\ReadShipmentOrderResponse', - ]; - - /** - * @var Credentials - */ - protected $soapCredentials; - - /** - * @var Credentials - */ - protected $customerGKVCredentials; - - /** - * @var LoggerInterface - */ - protected $logger; - - /** - * @param Credentials $credentials - * @param Credentials $customerGKVCredentials - * @param LoggerInterface $logger - */ - public function __construct(Credentials $credentials, Credentials $customerGKVCredentials, LoggerInterface $logger) - { - $this->soapCredentials = $credentials; - $this->customerGKVCredentials = $customerGKVCredentials; - $this->logger = $logger; - $options = [ - 'features' => SOAP_SINGLE_ELEMENT_ARRAYS, - 'trace' => 1, - 'location' => $this->getSoapCredentials()->getEndpoint(), - 'login' => $this->getSoapCredentials()->getUsername(), - 'password' => $this->getSoapCredentials()->getPassword(), - 'authentication' => SOAP_AUTHENTICATION_BASIC, - 'classmap' => self::$classmap, - ]; - $wsdl = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'GKV' . DIRECTORY_SEPARATOR . 'geschaeftskundenversand-api-3.5.0.wsdl'; - parent::__construct($wsdl, $options); - } - - /** - * @return Credentials - */ - public function getSoapCredentials(): Credentials - { - return $this->soapCredentials; - } - - /** - * @return Credentials - */ - public function getCustomerGKVCredentials(): Credentials - { - return $this->customerGKVCredentials; - } - - /** - * @return LoggerInterface - */ - public function getLogger(): LoggerInterface - { - return $this->logger; - } - - /** - * @param string $functionName - * @param mixed $request - * @return mixed - */ - protected function callSoap($functionName, $request) - { - $this->getLogger()->debug(__METHOD__ . " - SOAP API call for function $functionName", ['options' => $request]); - try { - $auth = new AuthentificationType($this->getCustomerGKVCredentials()->getUsername(), $this->getCustomerGKVCredentials()->getPassword()); - $header = new \SoapHeader('http://dhl.de/webservice/cisbase', 'Authentification', $auth); - return $this->__soapCall($functionName, [$request], null, $header); - } catch (\SoapFault $exception) { - $message = __METHOD__ . " - The SOAP API call for function $functionName failed due to {$exception->getMessage()}"; - $message = $this->appendOrderNr($request, $message); - $this->getLogger()->error($message, ['exception' => $exception]); - throw new WebserviceException('Failed API call.', 0, $exception); - } - } - - /** - * Creates shipments. - * - * @param CreateShipmentOrderRequest $request - * @return CreateShipmentOrderResponse - */ - public function createShipmentOrder(CreateShipmentOrderRequest $request) - { - return $this->callSoap('createShipmentOrder', $request); - } - - /** - * Creates shipments. - * - * @param ValidateShipmentOrderRequest $request - * @return ValidateShipmentResponse - */ - public function validateShipment(ValidateShipmentOrderRequest $request) - { - return $this->callSoap('validateShipment', $request); - } - - /** - * Deletes the requested shipments. - * - * @param DeleteShipmentOrderRequest $request - * @return DeleteShipmentOrderResponse - */ - public function deleteShipmentOrder(DeleteShipmentOrderRequest $request) - { - return $this->callSoap('deleteShipmentOrder', $request); - } - - /** - * Manifest the requested DD shipments. - * - * @param DoManifestRequest $request - * @return DoManifestResponse - */ - public function doManifest(DoManifestRequest $request) - { - return $this->callSoap('doManifest', $request); - } - - /** - * Returns the request-url for getting a label. - * - * @param GetLabelRequest $request - * @return GetLabelResponse - */ - public function getLabel(GetLabelRequest $request) - { - return $this->callSoap('getLabel', $request); - } - - /** - * Returns the actual version of the implementation of the whole ISService - * webservice. - * - * @param Version $request - * @return GetVersionResponse - */ - public function getVersion(Version $request) - { - return $this->callSoap('getVersion', $request); - } - - /** - * Returns the request-url for getting a export - * document. - * - * @param GetExportDocRequest $request - * @return GetExportDocResponse - */ - public function getExportDoc(GetExportDocRequest $request) - { - return $this->callSoap('getExportDoc', $request); - } - - /** - * Request the manifest. - * - * @param GetManifestRequest $request - * @return GetManifestResponse - */ - public function getManifest(GetManifestRequest $request) - { - return $this->callSoap('getManifest', $request); - } - - /** - * Updates a shipment order. - * - * @param UpdateShipmentOrderRequest $request - * @return UpdateShipmentOrderResponse - */ - public function updateShipmentOrder(UpdateShipmentOrderRequest $request) - { - return $this->callSoap('updateShipmentOrder', $request); - } - - /** - * @return Version - */ - public function buildVersion(): Version - { - return new Version(3, 4, 0); - } - - /** - * @param $request - * @param $message - * @return mixed|string - */ - protected function appendOrderNr($request, $message) - { - if (!method_exists($request, 'getShipmentOrder')) { - return $message; - } - $shipmentOrders = $request->getShipmentOrder(); - $shipmentOrderNumbers = []; - foreach (is_array($shipmentOrders) ? $shipmentOrders : [$shipmentOrders] as $shipmentOrder) { - if (method_exists($shipmentOrder, 'getShipment') && $shipmentOrder->getShipment() instanceof Shipment) { - $shipmentOrderNumbers[] = $shipmentOrder->getShipment()->getShipmentDetails()->getCustomerReference(); - } - } - if ($shipmentOrderNumbers) { - $message .= ' for orderNumbers: ' . implode(', ', $shipmentOrderNumbers); - } - return $message; - } -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/AssignTrait.php b/src/modules/mo/mo_dhl/Api/GKV/AssignTrait.php deleted file mode 100644 index 795b0bec..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/AssignTrait.php +++ /dev/null @@ -1,27 +0,0 @@ - $value) { - if (property_exists($this, $key)) { - $this->$key = $value; - } - } - } -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/AuthentificationType.php b/src/modules/mo/mo_dhl/Api/GKV/AuthentificationType.php deleted file mode 100644 index 5fbdf845..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/AuthentificationType.php +++ /dev/null @@ -1,64 +0,0 @@ -user = $user; - $this->signature = $signature; - } - - /** - * @return string - */ - public function getUser() - { - return $this->user; - } - - /** - * @param string $user - * @return AuthentificationType - */ - public function setUser($user) - { - $this->user = $user; - return $this; - } - - /** - * @return string - */ - public function getSignature() - { - return $this->signature; - } - - /** - * @param string $signature - * @return AuthentificationType - */ - public function setSignature($signature) - { - $this->signature = $signature; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/BankType.php b/src/modules/mo/mo_dhl/Api/GKV/BankType.php deleted file mode 100644 index ec6d912d..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/BankType.php +++ /dev/null @@ -1,181 +0,0 @@ -accountOwner = $accountOwner; - $this->bankName = $bankName; - $this->iban = $iban; - } - - /** - * @return string - */ - public function getAccountOwner() - { - return $this->accountOwner; - } - - /** - * @param string $accountOwner - * @return BankType - */ - public function setAccountOwner($accountOwner) - { - $this->accountOwner = $accountOwner; - return $this; - } - - /** - * @return string - */ - public function getBankName() - { - return $this->bankName; - } - - /** - * @param string $bankName - * @return BankType - */ - public function setBankName($bankName) - { - $this->bankName = $bankName; - return $this; - } - - /** - * @return string - */ - public function getIban() - { - return $this->iban; - } - - /** - * @param string $iban - * @return BankType - */ - public function setIban($iban) - { - $this->iban = $iban; - return $this; - } - - /** - * @return string - */ - public function getNote1() - { - return $this->note1; - } - - /** - * @param string $note1 - * @return BankType - */ - public function setNote1($note1) - { - $this->note1 = $note1; - return $this; - } - - /** - * @return string - */ - public function getNote2() - { - return $this->note2; - } - - /** - * @param string $note2 - * @return BankType - */ - public function setNote2($note2) - { - $this->note2 = $note2; - return $this; - } - - /** - * @return string - */ - public function getBic() - { - return $this->bic; - } - - /** - * @param string $bic - * @return BankType - */ - public function setBic($bic) - { - $this->bic = $bic; - return $this; - } - - /** - * @return string - */ - public function getAccountreference() - { - return $this->accountreference; - } - - /** - * @param string $accountreference - * @return BankType - */ - public function setAccountreference($accountreference) - { - $this->accountreference = $accountreference; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/CDP.php b/src/modules/mo/mo_dhl/Api/GKV/CDP.php deleted file mode 100644 index 469300ee..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/CDP.php +++ /dev/null @@ -1,39 +0,0 @@ -active = $active; - } - - /** - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * @param bool $active - * @return CDP - */ - public function setActive($active) - { - $this->active = $active; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/CommunicationType.php b/src/modules/mo/mo_dhl/Api/GKV/CommunicationType.php deleted file mode 100644 index 5b57df1c..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/CommunicationType.php +++ /dev/null @@ -1,83 +0,0 @@ -phone; - } - - /** - * @param string $phone - * @return CommunicationType - */ - public function setPhone($phone) - { - $this->phone = $phone; - return $this; - } - - /** - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * @param string $email - * @return CommunicationType - */ - public function setEmail($email) - { - $this->email = $email; - return $this; - } - - /** - * @return string - */ - public function getContactPerson() - { - return $this->contactPerson; - } - - /** - * @param string $contactPerson - * @return CommunicationType - */ - public function setContactPerson($contactPerson) - { - $this->contactPerson = $contactPerson; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/CountryType.php b/src/modules/mo/mo_dhl/Api/GKV/CountryType.php deleted file mode 100644 index 1fdc462c..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/CountryType.php +++ /dev/null @@ -1,85 +0,0 @@ -countryISOCode = $countryISOCode; - } - - /** - * @return string - */ - public function getCountry() - { - return $this->country; - } - - /** - * @param string $country - * @return CountryType - */ - public function setCountry($country) - { - $this->country = $country; - return $this; - } - - /** - * @return string - */ - public function getCountryISOCode() - { - return $this->countryISOCode; - } - - /** - * @param string $countryISOCode - * @return CountryType - */ - public function setCountryISOCode($countryISOCode) - { - $this->countryISOCode = $countryISOCode; - return $this; - } - - /** - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * @param string $state - * @return CountryType - */ - public function setState($state) - { - $this->state = $state; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/CreateShipmentOrderRequest.php b/src/modules/mo/mo_dhl/Api/GKV/CreateShipmentOrderRequest.php deleted file mode 100644 index 474b6cfa..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/CreateShipmentOrderRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -Version = $Version; - $this->ShipmentOrder = is_array($ShipmentOrder) ? $ShipmentOrder : [$ShipmentOrder]; - } - - /** - * @return Version - */ - public function getVersion() - { - return $this->Version; - } - - /** - * @param Version $Version - * @return CreateShipmentOrderRequest - */ - public function setVersion($Version) - { - $this->Version = $Version; - return $this; - } - - /** - * @return ShipmentOrderType[] - */ - public function getShipmentOrder() - { - return $this->ShipmentOrder; - } - - /** - * @param ShipmentOrderType[]|ShipmentOrderType $ShipmentOrder - * @return CreateShipmentOrderRequest - */ - public function setShipmentOrder($ShipmentOrder) - { - $this->ShipmentOrder = is_array($ShipmentOrder) ? $ShipmentOrder : [$ShipmentOrder]; - return $this; - } - - /** - * @return string - */ - public function getLabelResponseType() - { - return $this->labelResponseType; - } - - /** - * @param string $labelResponseType - * @return CreateShipmentOrderRequest - */ - public function setLabelResponseType($labelResponseType) - { - $this->labelResponseType = $labelResponseType; - return $this; - } - - /** - * @return string - */ - public function getGroupProfileName() - { - return $this->groupProfileName; - } - - /** - * @param string $groupProfileName - * @return CreateShipmentOrderRequest - */ - public function setGroupProfileName($groupProfileName) - { - $this->groupProfileName = $groupProfileName; - return $this; - } - - /** - * @return string - */ - public function getLabelFormat() - { - return $this->labelFormat; - } - - /** - * @param string $labelFormat - * @return CreateShipmentOrderRequest - */ - public function setLabelFormat($labelFormat) - { - $this->labelFormat = $labelFormat; - return $this; - } - - /** - * @return string - */ - public function getLabelFormatRetoure() - { - return $this->labelFormatRetoure; - } - - /** - * @param string $labelFormatRetoure - * @return CreateShipmentOrderRequest - */ - public function setLabelFormatRetoure($labelFormatRetoure) - { - $this->labelFormatRetoure = $labelFormatRetoure; - return $this; - } - - /** - * @return string - */ - public function getCombinedPrinting() - { - return $this->combinedPrinting; - } - - /** - * @param string $combinedPrinting - * @return CreateShipmentOrderRequest - */ - public function setCombinedPrinting($combinedPrinting) - { - $this->combinedPrinting = $combinedPrinting; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/CreateShipmentOrderResponse.php b/src/modules/mo/mo_dhl/Api/GKV/CreateShipmentOrderResponse.php deleted file mode 100644 index f113a7d7..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/CreateShipmentOrderResponse.php +++ /dev/null @@ -1,89 +0,0 @@ -Version = $Version; - $this->Status = $Status; - $this->CreationState = $CreationState; - } - - /** - * @return Version - */ - public function getVersion() - { - return $this->Version; - } - - /** - * @param Version $Version - * @return CreateShipmentOrderResponse - */ - public function setVersion($Version) - { - $this->Version = $Version; - return $this; - } - - /** - * @return Statusinformation - */ - public function getStatus() - { - return $this->Status; - } - - /** - * @param Statusinformation $Status - * @return CreateShipmentOrderResponse - */ - public function setStatus($Status) - { - $this->Status = $Status; - return $this; - } - - /** - * @return CreationState[] - */ - public function getCreationState() - { - return $this->CreationState; - } - - /** - * @param CreationState[] $CreationState - * @return CreateShipmentOrderResponse - */ - public function setCreationState($CreationState) - { - $this->CreationState = $CreationState; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/CreationState.php b/src/modules/mo/mo_dhl/Api/GKV/CreationState.php deleted file mode 100644 index 0ed4291b..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/CreationState.php +++ /dev/null @@ -1,110 +0,0 @@ -sequenceNumber = $sequenceNumber; - $this->LabelData = $LabelData; - } - - /** - * @return string - */ - public function getSequenceNumber() - { - return $this->sequenceNumber; - } - - /** - * @param string $sequenceNumber - * @return CreationState - */ - public function setSequenceNumber($sequenceNumber) - { - $this->sequenceNumber = $sequenceNumber; - return $this; - } - - /** - * @return string - */ - public function getShipmentNumber() - { - return $this->shipmentNumber; - } - - /** - * @param string $shipmentNumber - * @return CreationState - */ - public function setShipmentNumber($shipmentNumber) - { - $this->shipmentNumber = $shipmentNumber; - return $this; - } - - /** - * @return string - */ - public function getReturnShipmentNumber() - { - return $this->returnShipmentNumber; - } - - /** - * @param string $returnShipmentNumber - * @return CreationState - */ - public function setReturnShipmentNumber($returnShipmentNumber) - { - $this->returnShipmentNumber = $returnShipmentNumber; - return $this; - } - - /** - * @return LabelData - */ - public function getLabelData() - { - return $this->LabelData; - } - - /** - * @param LabelData $LabelData - * @return CreationState - */ - public function setLabelData($LabelData) - { - $this->LabelData = $LabelData; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/DeleteShipmentOrderRequest.php b/src/modules/mo/mo_dhl/Api/GKV/DeleteShipmentOrderRequest.php deleted file mode 100644 index ae0be7f3..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/DeleteShipmentOrderRequest.php +++ /dev/null @@ -1,64 +0,0 @@ -Version = $Version; - $this->shipmentNumber = $shipmentNumber; - } - - /** - * @return Version - */ - public function getVersion() - { - return $this->Version; - } - - /** - * @param Version $Version - * @return DeleteShipmentOrderRequest - */ - public function setVersion($Version) - { - $this->Version = $Version; - return $this; - } - - /** - * @return string - */ - public function getShipmentNumber() - { - return $this->shipmentNumber; - } - - /** - * @param string $shipmentNumber - * @return DeleteShipmentOrderRequest - */ - public function setShipmentNumber($shipmentNumber) - { - $this->shipmentNumber = $shipmentNumber; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/DeleteShipmentOrderResponse.php b/src/modules/mo/mo_dhl/Api/GKV/DeleteShipmentOrderResponse.php deleted file mode 100644 index 42b65f5f..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/DeleteShipmentOrderResponse.php +++ /dev/null @@ -1,89 +0,0 @@ -Version = $Version; - $this->Status = $Status; - $this->DeletionState = $DeletionState; - } - - /** - * @return Version - */ - public function getVersion() - { - return $this->Version; - } - - /** - * @param Version $Version - * @return DeleteShipmentOrderResponse - */ - public function setVersion($Version) - { - $this->Version = $Version; - return $this; - } - - /** - * @return Statusinformation - */ - public function getStatus() - { - return $this->Status; - } - - /** - * @param Statusinformation $Status - * @return DeleteShipmentOrderResponse - */ - public function setStatus($Status) - { - $this->Status = $Status; - return $this; - } - - /** - * @return DeletionState[] - */ - public function getDeletionState() - { - return $this->DeletionState; - } - - /** - * @param DeletionState[] $DeletionState - * @return DeleteShipmentOrderResponse - */ - public function setDeletionState($DeletionState) - { - $this->DeletionState = $DeletionState; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/DeletionState.php b/src/modules/mo/mo_dhl/Api/GKV/DeletionState.php deleted file mode 100644 index 826a099c..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/DeletionState.php +++ /dev/null @@ -1,64 +0,0 @@ -shipmentNumber = $shipmentNumber; - $this->Status = $Status; - } - - /** - * @return string - */ - public function getShipmentNumber() - { - return $this->shipmentNumber; - } - - /** - * @param string $shipmentNumber - * @return DeletionState - */ - public function setShipmentNumber($shipmentNumber) - { - $this->shipmentNumber = $shipmentNumber; - return $this; - } - - /** - * @return Statusinformation - */ - public function getStatus() - { - return $this->Status; - } - - /** - * @param Statusinformation $Status - * @return DeletionState - */ - public function setStatus($Status) - { - $this->Status = $Status; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/DoManifestRequest.php b/src/modules/mo/mo_dhl/Api/GKV/DoManifestRequest.php deleted file mode 100644 index 28d07694..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/DoManifestRequest.php +++ /dev/null @@ -1,89 +0,0 @@ -Version = $Version; - $this->shipmentNumber = $shipmentNumber; - $this->allShipments = $allShipments; - } - - /** - * @return Version - */ - public function getVersion() - { - return $this->Version; - } - - /** - * @param Version $Version - * @return DoManifestRequest - */ - public function setVersion($Version) - { - $this->Version = $Version; - return $this; - } - - /** - * @return string - */ - public function getShipmentNumber() - { - return $this->shipmentNumber; - } - - /** - * @param string $shipmentNumber - * @return DoManifestRequest - */ - public function setShipmentNumber($shipmentNumber) - { - $this->shipmentNumber = $shipmentNumber; - return $this; - } - - /** - * @return mixed - */ - public function getAllShipments() - { - return $this->allShipments; - } - - /** - * @param mixed $allShipments - * @return DoManifestRequest - */ - public function setAllShipments($allShipments) - { - $this->allShipments = $allShipments; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/DoManifestResponse.php b/src/modules/mo/mo_dhl/Api/GKV/DoManifestResponse.php deleted file mode 100644 index 00f97529..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/DoManifestResponse.php +++ /dev/null @@ -1,89 +0,0 @@ -Version = $Version; - $this->Status = $Status; - $this->ManifestState = $ManifestState; - } - - /** - * @return Version - */ - public function getVersion() - { - return $this->Version; - } - - /** - * @param Version $Version - * @return DoManifestResponse - */ - public function setVersion($Version) - { - $this->Version = $Version; - return $this; - } - - /** - * @return Statusinformation - */ - public function getStatus() - { - return $this->Status; - } - - /** - * @param Statusinformation $Status - * @return DoManifestResponse - */ - public function setStatus($Status) - { - $this->Status = $Status; - return $this; - } - - /** - * @return ManifestState - */ - public function getManifestState() - { - return $this->ManifestState; - } - - /** - * @param ManifestState $ManifestState - * @return DoManifestResponse - */ - public function setManifestState($ManifestState) - { - $this->ManifestState = $ManifestState; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/Economy.php b/src/modules/mo/mo_dhl/Api/GKV/Economy.php deleted file mode 100644 index 6f872cc3..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/Economy.php +++ /dev/null @@ -1,39 +0,0 @@ -active = $active; - } - - /** - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * @param bool $active - * @return Economy - */ - public function setActive($active) - { - $this->active = $active; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ExportDocData.php b/src/modules/mo/mo_dhl/Api/GKV/ExportDocData.php deleted file mode 100644 index 933bb944..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ExportDocData.php +++ /dev/null @@ -1,110 +0,0 @@ -shipmentNumber = $shipmentNumber; - $this->Status = $Status; - } - - /** - * @return string - */ - public function getShipmentNumber() - { - return $this->shipmentNumber; - } - - /** - * @param string $shipmentNumber - * @return ExportDocData - */ - public function setShipmentNumber($shipmentNumber) - { - $this->shipmentNumber = $shipmentNumber; - return $this; - } - - /** - * @return Statusinformation - */ - public function getStatus() - { - return $this->Status; - } - - /** - * @param Statusinformation $Status - * @return ExportDocData - */ - public function setStatus($Status) - { - $this->Status = $Status; - return $this; - } - - /** - * @return string - */ - public function getExportDocData() - { - return $this->exportDocData; - } - - /** - * @param string $exportDocData - * @return ExportDocData - */ - public function setExportDocData($exportDocData) - { - $this->exportDocData = $exportDocData; - return $this; - } - - /** - * @return string - */ - public function getExportDocURL() - { - return $this->exportDocURL; - } - - /** - * @param string $exportDocURL - * @return ExportDocData - */ - public function setExportDocURL($exportDocURL) - { - $this->exportDocURL = $exportDocURL; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ExportDocPosition.php b/src/modules/mo/mo_dhl/Api/GKV/ExportDocPosition.php deleted file mode 100644 index c688bc87..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ExportDocPosition.php +++ /dev/null @@ -1,164 +0,0 @@ -description = $description; - $this->countryCodeOrigin = $countryCodeOrigin; - $this->customsTariffNumber = $customsTariffNumber; - $this->amount = $amount; - $this->netWeightInKG = $netWeightInKG; - $this->customsValue = $customsValue; - } - - /** - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * @param string $description - * @return ExportDocPosition - */ - public function setDescription($description) - { - $this->description = $description; - return $this; - } - - /** - * @return string - */ - public function getCountryCodeOrigin() - { - return $this->countryCodeOrigin; - } - - /** - * @param string $countryCodeOrigin - * @return ExportDocPosition - */ - public function setCountryCodeOrigin($countryCodeOrigin) - { - $this->countryCodeOrigin = $countryCodeOrigin; - return $this; - } - - /** - * @return string - */ - public function getCustomsTariffNumber() - { - return $this->customsTariffNumber; - } - - /** - * @param string $customsTariffNumber - * @return ExportDocPosition - */ - public function setCustomsTariffNumber($customsTariffNumber) - { - $this->customsTariffNumber = $customsTariffNumber; - return $this; - } - - /** - * @return int - */ - public function getAmount() - { - return $this->amount; - } - - /** - * @param int $amount - * @return ExportDocPosition - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * @return float - */ - public function getNetWeightInKG() - { - return $this->netWeightInKG; - } - - /** - * @param float $netWeightInKG - * @return ExportDocPosition - */ - public function setNetWeightInKG($netWeightInKG) - { - $this->netWeightInKG = $netWeightInKG; - return $this; - } - - /** - * @return float - */ - public function getCustomsValue() - { - return $this->customsValue; - } - - /** - * @param float $customsValue - * @return ExportDocPosition - */ - public function setCustomsValue($customsValue) - { - $this->customsValue = $customsValue; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ExportDocumentType.php b/src/modules/mo/mo_dhl/Api/GKV/ExportDocumentType.php deleted file mode 100644 index 4d52606b..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ExportDocumentType.php +++ /dev/null @@ -1,317 +0,0 @@ -exportType = $exportType; - $this->placeOfCommital = $placeOfCommital; - } - - /** - * @return string - */ - public function getInvoiceNumber() - { - return $this->invoiceNumber; - } - - /** - * @param string $invoiceNumber - * @return ExportDocumentType - */ - public function setInvoiceNumber($invoiceNumber) - { - $this->invoiceNumber = $invoiceNumber; - return $this; - } - - /** - * @return string - */ - public function getExportType() - { - return $this->exportType; - } - - /** - * @param string $exportType - * @return ExportDocumentType - */ - public function setExportType($exportType) - { - $this->exportType = $exportType; - return $this; - } - - /** - * @return string - */ - public function getExportTypeDescription() - { - return $this->exportTypeDescription; - } - - /** - * @param string $exportTypeDescription - * @return ExportDocumentType - */ - public function setExportTypeDescription($exportTypeDescription) - { - $this->exportTypeDescription = $exportTypeDescription; - return $this; - } - - /** - * @return string - */ - public function getTermsOfTrade() - { - return $this->termsOfTrade; - } - - /** - * @param string $termsOfTrade - * @return ExportDocumentType - */ - public function setTermsOfTrade($termsOfTrade) - { - $this->termsOfTrade = $termsOfTrade; - return $this; - } - - /** - * @return string - */ - public function getPlaceOfCommital() - { - return $this->placeOfCommital; - } - - /** - * @param string $placeOfCommital - * @return ExportDocumentType - */ - public function setPlaceOfCommital($placeOfCommital) - { - $this->placeOfCommital = $placeOfCommital; - return $this; - } - - /** - * @return float - */ - public function getAdditionalFee() - { - return $this->additionalFee; - } - - /** - * @param float $additionalFee - * @return ExportDocumentType - */ - public function setAdditionalFee($additionalFee) - { - $this->additionalFee = $additionalFee; - return $this; - } - - /** - * @return string - */ - public function getCustomsCurrency() - { - return $this->customsCurrency; - } - - /** - * @param string $customsCurrency - * @return ExportDocumentType - */ - public function setCustomsCurrency($customsCurrency) - { - $this->customsCurrency = $customsCurrency; - return $this; - } - - /** - * @return string - */ - public function getPermitNumber() - { - return $this->permitNumber; - } - - /** - * @param string $permitNumber - * @return ExportDocumentType - */ - public function setPermitNumber($permitNumber) - { - $this->permitNumber = $permitNumber; - return $this; - } - - /** - * @return string - */ - public function getAttestationNumber() - { - return $this->attestationNumber; - } - - /** - * @param string $attestationNumber - * @return ExportDocumentType - */ - public function setAttestationNumber($attestationNumber) - { - $this->attestationNumber = $attestationNumber; - return $this; - } - - /** - * @return string - */ - public function getAddresseesCustomsReference() - { - return $this->addresseesCustomsReference; - } - - /** - * @param string $addresseesCustomsReference - * @return ExportDocumentType - */ - public function setAddresseesCustomsReference($addresseesCustomsReference) - { - $this->addresseesCustomsReference = $addresseesCustomsReference; - return $this; - } - - /** - * @return string - */ - public function getSendersCustomsReference() - { - return $this->sendersCustomsReference; - } - - /** - * @param string $sendersCustomsReference - * @return ExportDocumentType - */ - public function setSendersCustomsReference($sendersCustomsReference) - { - $this->sendersCustomsReference = $sendersCustomsReference; - return $this; - } - - /** - * @return Serviceconfiguration - */ - public function getWithElectronicExportNtfctn() - { - return $this->WithElectronicExportNtfctn; - } - - /** - * @param Serviceconfiguration $WithElectronicExportNtfctn - * @return ExportDocumentType - */ - public function setWithElectronicExportNtfctn($WithElectronicExportNtfctn) - { - $this->WithElectronicExportNtfctn = $WithElectronicExportNtfctn; - return $this; - } - - /** - * @return ExportDocPosition[] - */ - public function getExportDocPosition() - { - return $this->ExportDocPosition; - } - - /** - * @param ExportDocPosition[] $ExportDocPosition - * @return ExportDocumentType - */ - public function setExportDocPosition(array $ExportDocPosition = null) - { - $this->ExportDocPosition = $ExportDocPosition; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/GetExportDocRequest.php b/src/modules/mo/mo_dhl/Api/GKV/GetExportDocRequest.php deleted file mode 100644 index 1f1a248d..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/GetExportDocRequest.php +++ /dev/null @@ -1,139 +0,0 @@ -Version = $Version; - $this->shipmentNumber = $shipmentNumber; - $this->exportDocResponseType = $exportDocResponseType; - $this->groupProfileName = $groupProfileName; - $this->combinedPrinting = $combinedPrinting; - } - - /** - * @return Version - */ - public function getVersion() - { - return $this->Version; - } - - /** - * @param Version $Version - * @return GetExportDocRequest - */ - public function setVersion($Version) - { - $this->Version = $Version; - return $this; - } - - /** - * @return string - */ - public function getShipmentNumber() - { - return $this->shipmentNumber; - } - - /** - * @param string $shipmentNumber - * @return GetExportDocRequest - */ - public function setShipmentNumber($shipmentNumber) - { - $this->shipmentNumber = $shipmentNumber; - return $this; - } - - /** - * @return string - */ - public function getExportDocResponseType() - { - return $this->exportDocResponseType; - } - - /** - * @param string $exportDocResponseType - * @return GetExportDocRequest - */ - public function setExportDocResponseType($exportDocResponseType) - { - $this->exportDocResponseType = $exportDocResponseType; - return $this; - } - - /** - * @return string - */ - public function getGroupProfileName() - { - return $this->groupProfileName; - } - - /** - * @param string $groupProfileName - * @return GetExportDocRequest - */ - public function setGroupProfileName($groupProfileName) - { - $this->groupProfileName = $groupProfileName; - return $this; - } - - /** - * @return string - */ - public function getCombinedPrinting() - { - return $this->combinedPrinting; - } - - /** - * @param string $combinedPrinting - * @return GetExportDocRequest - */ - public function setCombinedPrinting($combinedPrinting) - { - $this->combinedPrinting = $combinedPrinting; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/GetExportDocResponse.php b/src/modules/mo/mo_dhl/Api/GKV/GetExportDocResponse.php deleted file mode 100644 index 21e69cd6..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/GetExportDocResponse.php +++ /dev/null @@ -1,89 +0,0 @@ -Version = $Version; - $this->Status = $Status; - $this->ExportDocData = $ExportDocData; - } - - /** - * @return Version - */ - public function getVersion() - { - return $this->Version; - } - - /** - * @param Version $Version - * @return GetExportDocResponse - */ - public function setVersion($Version) - { - $this->Version = $Version; - return $this; - } - - /** - * @return Statusinformation - */ - public function getStatus() - { - return $this->Status; - } - - /** - * @param Statusinformation $Status - * @return GetExportDocResponse - */ - public function setStatus($Status) - { - $this->Status = $Status; - return $this; - } - - /** - * @return ExportDocData - */ - public function getExportDocData() - { - return $this->ExportDocData; - } - - /** - * @param ExportDocData $ExportDocData - * @return GetExportDocResponse - */ - public function setExportDocData($ExportDocData) - { - $this->ExportDocData = $ExportDocData; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/GetLabelRequest.php b/src/modules/mo/mo_dhl/Api/GKV/GetLabelRequest.php deleted file mode 100644 index 0428f29d..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/GetLabelRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -Version = $Version; - $this->shipmentNumber = $shipmentNumber; - $this->labelResponseType = $labelResponseType; - $this->groupProfileName = $groupProfileName; - $this->labelFormat = $labelFormat; - $this->labelFormatRetoure = $labelFormatRetoure; - $this->combinedPrinting = $combinedPrinting; - } - - /** - * @return Version - */ - public function getVersion() - { - return $this->Version; - } - - /** - * @param Version $Version - * @return GetLabelRequest - */ - public function setVersion($Version) - { - $this->Version = $Version; - return $this; - } - - /** - * @return string - */ - public function getShipmentNumber() - { - return $this->shipmentNumber; - } - - /** - * @param string $shipmentNumber - * @return GetLabelRequest - */ - public function setShipmentNumber($shipmentNumber) - { - $this->shipmentNumber = $shipmentNumber; - return $this; - } - - /** - * @return string - */ - public function getLabelResponseType() - { - return $this->labelResponseType; - } - - /** - * @param string $labelResponseType - * @return GetLabelRequest - */ - public function setLabelResponseType($labelResponseType) - { - $this->labelResponseType = $labelResponseType; - return $this; - } - - /** - * @return string - */ - public function getGroupProfileName() - { - return $this->groupProfileName; - } - - /** - * @param string $groupProfileName - * @return GetLabelRequest - */ - public function setGroupProfileName($groupProfileName) - { - $this->groupProfileName = $groupProfileName; - return $this; - } - - /** - * @return string - */ - public function getLabelFormat() - { - return $this->labelFormat; - } - - /** - * @param string $labelFormat - * @return GetLabelRequest - */ - public function setLabelFormat($labelFormat) - { - $this->labelFormat = $labelFormat; - return $this; - } - - /** - * @return string - */ - public function getLabelFormatRetoure() - { - return $this->labelFormatRetoure; - } - - /** - * @param string $labelFormatRetoure - * @return GetLabelRequest - */ - public function setLabelFormatRetoure($labelFormatRetoure) - { - $this->labelFormatRetoure = $labelFormatRetoure; - return $this; - } - - /** - * @return string - */ - public function getCombinedPrinting() - { - return $this->combinedPrinting; - } - - /** - * @param string $combinedPrinting - * @return GetLabelRequest - */ - public function setCombinedPrinting($combinedPrinting) - { - $this->combinedPrinting = $combinedPrinting; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/GetLabelResponse.php b/src/modules/mo/mo_dhl/Api/GKV/GetLabelResponse.php deleted file mode 100644 index 93400acd..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/GetLabelResponse.php +++ /dev/null @@ -1,89 +0,0 @@ -Version = $Version; - $this->Status = $Status; - $this->LabelData = $LabelData; - } - - /** - * @return Version - */ - public function getVersion() - { - return $this->Version; - } - - /** - * @param Version $Version - * @return GetLabelResponse - */ - public function setVersion($Version) - { - $this->Version = $Version; - return $this; - } - - /** - * @return Statusinformation - */ - public function getStatus() - { - return $this->Status; - } - - /** - * @param Statusinformation $Status - * @return GetLabelResponse - */ - public function setStatus($Status) - { - $this->Status = $Status; - return $this; - } - - /** - * @return LabelData[] - */ - public function getLabelData() - { - return $this->LabelData; - } - - /** - * @param LabelData[] $LabelData - * @return GetLabelResponse - */ - public function setLabelData($LabelData) - { - $this->LabelData = $LabelData; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/GetManifestRequest.php b/src/modules/mo/mo_dhl/Api/GKV/GetManifestRequest.php deleted file mode 100644 index f98234af..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/GetManifestRequest.php +++ /dev/null @@ -1,64 +0,0 @@ -Version = $Version; - $this->manifestDate = $manifestDate; - } - - /** - * @return Version - */ - public function getVersion() - { - return $this->Version; - } - - /** - * @param Version $Version - * @return GetManifestRequest - */ - public function setVersion($Version) - { - $this->Version = $Version; - return $this; - } - - /** - * @return string - */ - public function getManifestDate() - { - return $this->manifestDate; - } - - /** - * @param string $manifestDate - * @return GetManifestRequest - */ - public function setManifestDate($manifestDate) - { - $this->manifestDate = $manifestDate; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/GetManifestResponse.php b/src/modules/mo/mo_dhl/Api/GKV/GetManifestResponse.php deleted file mode 100644 index 5528ae44..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/GetManifestResponse.php +++ /dev/null @@ -1,89 +0,0 @@ -Version = $Version; - $this->Status = $Status; - $this->manifestData = $manifestData; - } - - /** - * @return Version - */ - public function getVersion() - { - return $this->Version; - } - - /** - * @param Version $Version - * @return GetManifestResponse - */ - public function setVersion($Version) - { - $this->Version = $Version; - return $this; - } - - /** - * @return Statusinformation - */ - public function getStatus() - { - return $this->Status; - } - - /** - * @param Statusinformation $Status - * @return GetManifestResponse - */ - public function setStatus($Status) - { - $this->Status = $Status; - return $this; - } - - /** - * @return string - */ - public function getManifestData() - { - return $this->manifestData; - } - - /** - * @param string $manifestData - * @return GetManifestResponse - */ - public function setManifestData($manifestData) - { - $this->manifestData = $manifestData; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/GetVersionResponse.php b/src/modules/mo/mo_dhl/Api/GKV/GetVersionResponse.php deleted file mode 100644 index 12691614..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/GetVersionResponse.php +++ /dev/null @@ -1,39 +0,0 @@ -Version = $Version; - } - - /** - * @return Version - */ - public function getVersion() - { - return $this->Version; - } - - /** - * @param Version $Version - * @return GetVersionResponse - */ - public function setVersion($Version) - { - $this->Version = $Version; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/Ident.php b/src/modules/mo/mo_dhl/Api/GKV/Ident.php deleted file mode 100644 index 7f42c2fb..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/Ident.php +++ /dev/null @@ -1,114 +0,0 @@ -surname = $surname; - $this->givenName = $givenName; - $this->dateOfBirth = $dateOfBirth; - $this->minimumAge = $minimumAge; - } - - /** - * @return string - */ - public function getSurname() - { - return $this->surname; - } - - /** - * @param string $surname - * @return Ident - */ - public function setSurname($surname) - { - $this->surname = $surname; - return $this; - } - - /** - * @return string - */ - public function getGivenName() - { - return $this->givenName; - } - - /** - * @param string $givenName - * @return Ident - */ - public function setGivenName($givenName) - { - $this->givenName = $givenName; - return $this; - } - - /** - * @return string - */ - public function getDateOfBirth() - { - return $this->dateOfBirth; - } - - /** - * @param string $dateOfBirth - * @return Ident - */ - public function setDateOfBirth($dateOfBirth) - { - $this->dateOfBirth = $dateOfBirth; - return $this; - } - - /** - * @return string - */ - public function getMinimumAge() - { - return $this->minimumAge; - } - - /** - * @param string $minimumAge - * @return Ident - */ - public function setMinimumAge($minimumAge) - { - $this->minimumAge = $minimumAge; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/LabelData.php b/src/modules/mo/mo_dhl/Api/GKV/LabelData.php deleted file mode 100644 index ab32b429..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/LabelData.php +++ /dev/null @@ -1,248 +0,0 @@ -Status = $Status; - $this->shipmentNumber = $shipmentNumber; - } - - /** - * @return Statusinformation - */ - public function getStatus() - { - return $this->Status; - } - - /** - * @param Statusinformation $Status - * @return LabelData - */ - public function setStatus($Status) - { - $this->Status = $Status; - return $this; - } - - /** - * @return string - */ - public function getShipmentNumber() - { - return $this->shipmentNumber; - } - - /** - * @param string $shipmentNumber - * @return LabelData - */ - public function setShipmentNumber($shipmentNumber) - { - $this->shipmentNumber = $shipmentNumber; - return $this; - } - - /** - * @return string - */ - public function getLabelUrl() - { - return $this->labelUrl; - } - - /** - * @param string $labelUrl - * @return LabelData - */ - public function setLabelUrl($labelUrl) - { - $this->labelUrl = $labelUrl; - return $this; - } - - /** - * @return string - */ - public function getLabelData() - { - return $this->labelData; - } - - /** - * @param string $labelData - * @return LabelData - */ - public function setLabelData($labelData) - { - $this->labelData = $labelData; - return $this; - } - - /** - * @return string - */ - public function getReturnLabelUrl() - { - return $this->returnLabelUrl; - } - - /** - * @param string $returnLabelUrl - * @return LabelData - */ - public function setReturnLabelUrl($returnLabelUrl) - { - $this->returnLabelUrl = $returnLabelUrl; - return $this; - } - - /** - * @return string - */ - public function getReturnLabelData() - { - return $this->returnLabelData; - } - - /** - * @param string $returnLabelData - * @return LabelData - */ - public function setReturnLabelData($returnLabelData) - { - $this->returnLabelData = $returnLabelData; - return $this; - } - - /** - * @return string - */ - public function getExportLabelUrl() - { - return $this->exportLabelUrl; - } - - /** - * @param string $exportLabelUrl - * @return LabelData - */ - public function setExportLabelUrl($exportLabelUrl) - { - $this->exportLabelUrl = $exportLabelUrl; - return $this; - } - - /** - * @return string - */ - public function getExportLabelData() - { - return $this->exportLabelData; - } - - /** - * @param string $exportLabelData - * @return LabelData - */ - public function setExportLabelData($exportLabelData) - { - $this->exportLabelData = $exportLabelData; - return $this; - } - - /** - * @return string - */ - public function getCodLabelUrl() - { - return $this->codLabelUrl; - } - - /** - * @param string $codLabelUrl - * @return LabelData - */ - public function setCodLabelUrl($codLabelUrl) - { - $this->codLabelUrl = $codLabelUrl; - return $this; - } - - /** - * @return string - */ - public function getCodLabelData() - { - return $this->codLabelData; - } - - /** - * @param string $codLabelData - * @return LabelData - */ - public function setCodLabelData($codLabelData) - { - $this->codLabelData = $codLabelData; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ManifestState.php b/src/modules/mo/mo_dhl/Api/GKV/ManifestState.php deleted file mode 100644 index 7c485196..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ManifestState.php +++ /dev/null @@ -1,64 +0,0 @@ -shipmentNumber = $shipmentNumber; - $this->Status = $Status; - } - - /** - * @return string - */ - public function getShipmentNumber() - { - return $this->shipmentNumber; - } - - /** - * @param string $shipmentNumber - * @return ManifestState - */ - public function setShipmentNumber($shipmentNumber) - { - $this->shipmentNumber = $shipmentNumber; - return $this; - } - - /** - * @return Statusinformation - */ - public function getStatus() - { - return $this->Status; - } - - /** - * @param Statusinformation $Status - * @return ManifestState - */ - public function setStatus($Status) - { - $this->Status = $Status; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/NameType.php b/src/modules/mo/mo_dhl/Api/GKV/NameType.php deleted file mode 100644 index 35f7d01d..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/NameType.php +++ /dev/null @@ -1,89 +0,0 @@ -name1 = $name1; - $this->name2 = $name2; - $this->name3 = $name3; - } - - /** - * @return string - */ - public function getName1() - { - return $this->name1; - } - - /** - * @param string $name1 - * @return NameType - */ - public function setName1($name1) - { - $this->name1 = $name1; - return $this; - } - - /** - * @return string - */ - public function getName2() - { - return $this->name2; - } - - /** - * @param string $name2 - * @return NameType - */ - public function setName2($name2) - { - $this->name2 = $name2; - return $this; - } - - /** - * @return string - */ - public function getName3() - { - return $this->name3; - } - - /** - * @param string $name3 - * @return NameType - */ - public function setName3($name3) - { - $this->name3 = $name3; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/NativeAddressType.php b/src/modules/mo/mo_dhl/Api/GKV/NativeAddressType.php deleted file mode 100644 index cc03f58f..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/NativeAddressType.php +++ /dev/null @@ -1,208 +0,0 @@ -streetName = $streetName; - $this->zip = $zip; - $this->city = $city; - $this->province = $province; - $this->Origin = $Origin; - } - - /** - * @return string - */ - public function getStreetName() - { - return $this->streetName; - } - - /** - * @param string $streetName - * @return NativeAddressType - */ - public function setStreetName($streetName) - { - $this->streetName = $streetName; - return $this; - } - - /** - * @return string - */ - public function getStreetNumber() - { - return $this->streetNumber; - } - - /** - * @param string $streetNumber - * @return NativeAddressType - */ - public function setStreetNumber($streetNumber) - { - $this->streetNumber = $streetNumber; - return $this; - } - - /** - * @return string[] - */ - public function getAddressAddition() - { - return $this->addressAddition; - } - - /** - * @param string[] $addressAddition - * @return NativeAddressType - */ - public function setAddressAddition(array $addressAddition = null) - { - $this->addressAddition = $addressAddition; - return $this; - } - - /** - * @return string - */ - public function getDispatchingInformation() - { - return $this->dispatchingInformation; - } - - /** - * @param string $dispatchingInformation - * @return NativeAddressType - */ - public function setDispatchingInformation($dispatchingInformation) - { - $this->dispatchingInformation = $dispatchingInformation; - return $this; - } - - /** - * @return string - */ - public function getZip() - { - return $this->zip; - } - - /** - * @param string $zip - * @return NativeAddressType - */ - public function setZip($zip) - { - $this->zip = $zip; - return $this; - } - - /** - * @return string - */ - public function getCity() - { - return $this->city; - } - - /** - * @param string $city - * @return NativeAddressType - */ - public function setCity($city) - { - $this->city = $city; - return $this; - } - - /** - * @return string - */ - public function getProvince() - { - return $this->province; - } - - /** - * @param string $province - * @return NativeAddressType - */ - public function setProvince($province) - { - $this->province = $province; - return $this; - } - - /** - * @return CountryType - */ - public function getOrigin() - { - return $this->Origin; - } - - /** - * @param CountryType $Origin - * @return NativeAddressType - */ - public function setOrigin($Origin) - { - $this->Origin = $Origin; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/NativeAddressTypeNew.php b/src/modules/mo/mo_dhl/Api/GKV/NativeAddressTypeNew.php deleted file mode 100644 index ac42a81b..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/NativeAddressTypeNew.php +++ /dev/null @@ -1,142 +0,0 @@ -streetName = $streetName; - $this->streetNumber = $streetNumber; - $this->zip = $zip; - $this->city = $city; - $this->Origin = $Origin; - } - - - /** - * @return string - */ - public function getStreetName() - { - return $this->streetName; - } - - /** - * @param string $streetName - * @return NativeAddressTypeNew - */ - public function setStreetName($streetName) - { - $this->streetName = $streetName; - return $this; - } - - /** - * @return string - */ - public function getStreetNumber() - { - return $this->streetNumber; - } - - /** - * @param string $streetNumber - * @return NativeAddressTypeNew - */ - public function setStreetNumber($streetNumber) - { - $this->streetNumber = $streetNumber; - return $this; - } - - /** - * @return string - */ - public function getZip() - { - return $this->zip; - } - - /** - * @param string $zip - * @return NativeAddressTypeNew - */ - public function setZip($zip) - { - $this->zip = $zip; - return $this; - } - - /** - * @return string - */ - public function getCity() - { - return $this->city; - } - - /** - * @param string $city - * @return NativeAddressTypeNew - */ - public function setCity($city) - { - $this->city = $city; - return $this; - } - - /** - * @return CountryType - */ - public function getOrigin() - { - return $this->Origin; - } - - /** - * @param CountryType $Origin - * @return NativeAddressTypeNew - */ - public function setOrigin($Origin) - { - $this->Origin = $Origin; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/PDDP.php b/src/modules/mo/mo_dhl/Api/GKV/PDDP.php deleted file mode 100644 index 2b0e386c..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/PDDP.php +++ /dev/null @@ -1,39 +0,0 @@ -active = $active; - } - - /** - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * @param bool $active - * @return PDDP - */ - public function setActive($active) - { - $this->active = $active; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/PackStationType.php b/src/modules/mo/mo_dhl/Api/GKV/PackStationType.php deleted file mode 100644 index 3b253f55..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/PackStationType.php +++ /dev/null @@ -1,166 +0,0 @@ -postNumber = $postNumber; - $this->packstationNumber = $packstationNumber; - $this->zip = $zip; - $this->city = $city; - $this->province = $province; - $this->Origin = $Origin; - } - - /** - * @return string - */ - public function getPostNumber() - { - return $this->postNumber; - } - - /** - * @param string $postNumber - * @return PackStationType - */ - public function setPostNumber($postNumber) - { - $this->postNumber = $postNumber; - return $this; - } - - /** - * @return string - */ - public function getPackstationNumber() - { - return $this->packstationNumber; - } - - /** - * @param string $packstationNumber - * @return PackStationType - */ - public function setPackstationNumber($packstationNumber) - { - $this->packstationNumber = $packstationNumber; - return $this; - } - - /** - * @return string - */ - public function getZip() - { - return $this->zip; - } - - /** - * @param string $zip - * @return PackStationType - */ - public function setZip($zip) - { - $this->zip = $zip; - return $this; - } - - /** - * @return string - */ - public function getCity() - { - return $this->city; - } - - /** - * @param string $city - * @return PackStationType - */ - public function setCity($city) - { - $this->city = $city; - return $this; - } - - /** - * @return string - */ - public function getProvince() - { - return $this->province; - } - - /** - * @param string $province - * @return PackStationType - */ - public function setProvince($province) - { - $this->province = $province; - return $this; - } - - /** - * @return CountryType - */ - public function getOrigin() - { - return $this->Origin; - } - - /** - * @param CountryType $Origin - * @return PackStationType - */ - public function setOrigin($Origin) - { - $this->Origin = $Origin; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/PostfilialeType.php b/src/modules/mo/mo_dhl/Api/GKV/PostfilialeType.php deleted file mode 100644 index cbb8e92c..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/PostfilialeType.php +++ /dev/null @@ -1,116 +0,0 @@ -PostfilialNumber = $PostfilialNumber; - $this->PostNumber = $PostNumber; - $this->Zip = $Zip; - $this->City = $City; - } - - /** - * @return string - */ - public function getPostfilialNumber() - { - return $this->PostfilialNumber; - } - - /** - * @param string $PostfilialNumber - * @return PostfilialeType - */ - public function setPostfilialNumber($PostfilialNumber) - { - $this->PostfilialNumber = $PostfilialNumber; - return $this; - } - - /** - * @return string - */ - public function getPostNumber() - { - return $this->PostNumber; - } - - /** - * @param string $PostNumber - * @return PostfilialeType - */ - public function setPostNumber($PostNumber) - { - $this->PostNumber = $PostNumber; - return $this; - } - - /** - * @return string - */ - public function getZip() - { - return $this->Zip; - } - - /** - * @param string $Zip - * @return PostfilialeType - */ - public function setZip($Zip) - { - $this->Zip = $Zip; - return $this; - } - - /** - * @return string - */ - public function getCity() - { - return $this->City; - } - - /** - * @param string $City - * @return PostfilialeType - */ - public function setCity($City) - { - $this->City = $City; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/PostfilialeTypeNoCountry.php b/src/modules/mo/mo_dhl/Api/GKV/PostfilialeTypeNoCountry.php deleted file mode 100644 index c0a6fb1a..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/PostfilialeTypeNoCountry.php +++ /dev/null @@ -1,139 +0,0 @@ -postfilialNumber = $postfilialNumber; - $this->postNumber = $postNumber; - $this->zip = $zip; - $this->city = $city; - } - - /** - * @return string - */ - public function getPostfilialNumber() - { - return $this->postfilialNumber; - } - - /** - * @param string $postfilialNumber - * @return PostfilialeTypeNoCountry - */ - public function setPostfilialNumber($postfilialNumber) - { - $this->postfilialNumber = $postfilialNumber; - return $this; - } - - /** - * @return string - */ - public function getPostNumber() - { - return $this->postNumber; - } - - /** - * @param string $postNumber - * @return PostfilialeTypeNoCountry - */ - public function setPostNumber($postNumber) - { - $this->postNumber = $postNumber; - return $this; - } - - /** - * @return string - */ - public function getZip() - { - return $this->zip; - } - - /** - * @param string $zip - * @return PostfilialeTypeNoCountry - */ - public function setZip($zip) - { - $this->zip = $zip; - return $this; - } - - /** - * @return string - */ - public function getCity() - { - return $this->city; - } - - /** - * @param string $city - * @return PostfilialeTypeNoCountry - */ - public function setCity($city) - { - $this->city = $city; - return $this; - } - - /** - * @return CountryType - */ - public function getOrigin() - { - return $this->Origin; - } - - /** - * @param CountryType $Origin - * @return PostfilialeTypeNoCountry - */ - public function setOrigin($Origin) - { - $this->Origin = $Origin; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ReceiverNativeAddressType.php b/src/modules/mo/mo_dhl/Api/GKV/ReceiverNativeAddressType.php deleted file mode 100644 index 1f343594..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ReceiverNativeAddressType.php +++ /dev/null @@ -1,262 +0,0 @@ -name2 = $name2; - $this->name3 = $name3; - $this->streetName = $streetName; - $this->streetNumber = $streetNumber; - $this->zip = $zip; - $this->city = $city; - $this->province = $province; - $this->Origin = $Origin; - } - - /** - * @return string - */ - public function getName2() - { - return $this->name2; - } - - /** - * @param string $name2 - * @return ReceiverNativeAddressType - */ - public function setName2($name2) - { - $this->name2 = $name2; - return $this; - } - - /** - * @return string - */ - public function getName3() - { - return $this->name3; - } - - /** - * @param string $name3 - * @return ReceiverNativeAddressType - */ - public function setName3($name3) - { - $this->name3 = $name3; - return $this; - } - - /** - * @return string - */ - public function getStreetName() - { - return $this->streetName; - } - - /** - * @param string $streetName - * @return ReceiverNativeAddressType - */ - public function setStreetName($streetName) - { - $this->streetName = $streetName; - return $this; - } - - /** - * @return string - */ - public function getStreetNumber() - { - return $this->streetNumber; - } - - /** - * @param string $streetNumber - * @return ReceiverNativeAddressType - */ - public function setStreetNumber($streetNumber) - { - $this->streetNumber = $streetNumber; - return $this; - } - - /** - * @return string[] - */ - public function getAddressAddition() - { - return $this->addressAddition; - } - - /** - * @param string[] $addressAddition - * @return ReceiverNativeAddressType - */ - public function setAddressAddition(array $addressAddition = null) - { - $this->addressAddition = $addressAddition; - return $this; - } - - /** - * @return string - */ - public function getDispatchingInformation() - { - return $this->dispatchingInformation; - } - - /** - * @param string $dispatchingInformation - * @return ReceiverNativeAddressType - */ - public function setDispatchingInformation($dispatchingInformation) - { - $this->dispatchingInformation = $dispatchingInformation; - return $this; - } - - /** - * @return string - */ - public function getZip() - { - return $this->zip; - } - - /** - * @param string $zip - * @return ReceiverNativeAddressType - */ - public function setZip($zip) - { - $this->zip = $zip; - return $this; - } - - /** - * @return string - */ - public function getCity() - { - return $this->city; - } - - /** - * @param string $city - * @return ReceiverNativeAddressType - */ - public function setCity($city) - { - $this->city = $city; - return $this; - } - - /** - * @return string - */ - public function getProvince() - { - return $this->province; - } - - /** - * @param string $province - * @return ReceiverNativeAddressType - */ - public function setProvince($province) - { - $this->province = $province; - return $this; - } - - /** - * @return CountryType - */ - public function getOrigin() - { - return $this->Origin; - } - - /** - * @param CountryType $Origin - * @return ReceiverNativeAddressType - */ - public function setOrigin($Origin) - { - $this->Origin = $Origin; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ReceiverType.php b/src/modules/mo/mo_dhl/Api/GKV/ReceiverType.php deleted file mode 100644 index 75d64211..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ReceiverType.php +++ /dev/null @@ -1,19 +0,0 @@ -name1 = $name1; - $this->Address = $Address; - $this->Packstation = $Packstation; - $this->Postfiliale = $Postfiliale; - } - - /** - * @return string - */ - public function getName1() - { - return $this->name1; - } - - /** - * @param string $name1 - * @return ReceiverTypeType - */ - public function setName1($name1) - { - $this->name1 = $name1; - return $this; - } - - /** - * @return ReceiverNativeAddressType - */ - public function getAddress() - { - return $this->Address; - } - - /** - * @param ReceiverNativeAddressType $Address - * @return ReceiverTypeType - */ - public function setAddress($Address) - { - $this->Address = $Address; - return $this; - } - - /** - * @return PackStationType - */ - public function getPackstation() - { - return $this->Packstation; - } - - /** - * @param PackStationType $Packstation - * @return ReceiverTypeType - */ - public function setPackstation($Packstation) - { - $this->Packstation = $Packstation; - return $this; - } - - /** - * @return PostfilialeTypeNoCountry - */ - public function getPostfiliale() - { - return $this->Postfiliale; - } - - /** - * @param PostfilialeTypeNoCountry $Postfiliale - * @return ReceiverTypeType - */ - public function setPostfiliale($Postfiliale) - { - $this->Postfiliale = $Postfiliale; - return $this; - } - - /** - * @return CommunicationType - */ - public function getCommunication() - { - return $this->Communication; - } - - /** - * @param CommunicationType $Communication - * @return ReceiverTypeType - */ - public function setCommunication($Communication) - { - $this->Communication = $Communication; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/Serviceconfiguration.php b/src/modules/mo/mo_dhl/Api/GKV/Serviceconfiguration.php deleted file mode 100644 index 986a1eeb..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/Serviceconfiguration.php +++ /dev/null @@ -1,39 +0,0 @@ -active = $active; - } - - /** - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * @param bool $active - * @return Serviceconfiguration - */ - public function setActive($active) - { - $this->active = $active; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationAdditionalInsurance.php b/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationAdditionalInsurance.php deleted file mode 100644 index 79cdfc77..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationAdditionalInsurance.php +++ /dev/null @@ -1,64 +0,0 @@ -active = $active; - $this->insuranceAmount = $insuranceAmount; - } - - /** - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * @param bool $active - * @return ServiceconfigurationAdditionalInsurance - */ - public function setActive($active) - { - $this->active = $active; - return $this; - } - - /** - * @return float - */ - public function getInsuranceAmount() - { - return $this->insuranceAmount; - } - - /** - * @param float $insuranceAmount - * @return ServiceconfigurationAdditionalInsurance - */ - public function setInsuranceAmount($insuranceAmount) - { - $this->insuranceAmount = $insuranceAmount; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationCashOnDelivery.php b/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationCashOnDelivery.php deleted file mode 100644 index ca3b4e14..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationCashOnDelivery.php +++ /dev/null @@ -1,64 +0,0 @@ -active = $active; - $this->codAmount = $codAmount; - } - - /** - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * @param bool $active - * @return ServiceconfigurationCashOnDelivery - */ - public function setActive($active) - { - $this->active = $active; - return $this; - } - - /** - * @return float - */ - public function getCodAmount() - { - return $this->codAmount; - } - - /** - * @param float $codAmount - * @return ServiceconfigurationCashOnDelivery - */ - public function setCodAmount($codAmount) - { - $this->codAmount = $codAmount; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDH.php b/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDH.php deleted file mode 100644 index 0109f3ff..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDH.php +++ /dev/null @@ -1,64 +0,0 @@ -active = $active; - $this->Days = $Days; - } - - /** - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * @param bool $active - * @return ServiceconfigurationDH - */ - public function setActive($active) - { - $this->active = $active; - return $this; - } - - /** - * @return string - */ - public function getDays() - { - return $this->Days; - } - - /** - * @param string $Days - * @return ServiceconfigurationDH - */ - public function setDays($Days) - { - $this->Days = $Days; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDateOfDelivery.php b/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDateOfDelivery.php deleted file mode 100644 index 8504a756..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDateOfDelivery.php +++ /dev/null @@ -1,64 +0,0 @@ -active = $active; - $this->details = $details; - } - - /** - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * @param bool $active - * @return ServiceconfigurationDateOfDelivery - */ - public function setActive($active) - { - $this->active = $active; - return $this; - } - - /** - * @return string - */ - public function getDetails() - { - return $this->details; - } - - /** - * @param string $details - * @return ServiceconfigurationDateOfDelivery - */ - public function setDetails($details) - { - $this->details = $details; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDeliveryTimeframe.php b/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDeliveryTimeframe.php deleted file mode 100644 index c5ae67e3..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDeliveryTimeframe.php +++ /dev/null @@ -1,64 +0,0 @@ -active = $active; - $this->type = $type; - } - - /** - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * @param bool $active - * @return ServiceconfigurationDeliveryTimeframe - */ - public function setActive($active) - { - $this->active = $active; - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * @param string $type - * @return ServiceconfigurationDeliveryTimeframe - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDetails.php b/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDetails.php deleted file mode 100644 index fd0dfddc..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDetails.php +++ /dev/null @@ -1,64 +0,0 @@ -active = $active; - $this->details = $details; - } - - /** - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * @param bool $active - * @return ServiceconfigurationDetails - */ - public function setActive($active) - { - $this->active = $active; - return $this; - } - - /** - * @return string - */ - public function getDetails() - { - return $this->details; - } - - /** - * @param string $details - * @return ServiceconfigurationDetails - */ - public function setDetails($details) - { - $this->details = $details; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDetailsOptional.php b/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDetailsOptional.php deleted file mode 100644 index c5a363de..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDetailsOptional.php +++ /dev/null @@ -1,64 +0,0 @@ -active = $active; - $this->details = $details; - } - - /** - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * @param bool $active - * @return ServiceconfigurationDetailsOptional - */ - public function setActive($active) - { - $this->active = $active; - return $this; - } - - /** - * @return string - */ - public function getDetails() - { - return $this->details; - } - - /** - * @param string $details - * @return ServiceconfigurationDetailsOptional - */ - public function setDetails($details) - { - $this->details = $details; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDetailsPreferredDay.php b/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDetailsPreferredDay.php deleted file mode 100644 index aa288eb6..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDetailsPreferredDay.php +++ /dev/null @@ -1,64 +0,0 @@ -active = $active; - $this->details = $details; - } - - /** - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * @param bool $active - * @return ServiceconfigurationDetailsPreferredDay - */ - public function setActive($active) - { - $this->active = $active; - return $this; - } - - /** - * @return string - */ - public function getDetails() - { - return $this->details; - } - - /** - * @param string $details - * @return ServiceconfigurationDetailsPreferredDay - */ - public function setDetails($details) - { - $this->details = $details; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDetailsPreferredLocation.php b/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDetailsPreferredLocation.php deleted file mode 100644 index e540de3a..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDetailsPreferredLocation.php +++ /dev/null @@ -1,64 +0,0 @@ -active = $active; - $this->details = $details; - } - - /** - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * @param bool $active - * @return ServiceconfigurationDetailsPreferredLocation - */ - public function setActive($active) - { - $this->active = $active; - return $this; - } - - /** - * @return string - */ - public function getDetails() - { - return $this->details; - } - - /** - * @param string $details - * @return ServiceconfigurationDetailsPreferredLocation - */ - public function setDetails($details) - { - $this->details = $details; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDetailsPreferredNeighbour.php b/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDetailsPreferredNeighbour.php deleted file mode 100644 index 9aefe7f6..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDetailsPreferredNeighbour.php +++ /dev/null @@ -1,64 +0,0 @@ -active = $active; - $this->details = $details; - } - - /** - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * @param bool $active - * @return ServiceconfigurationDetailsPreferredNeighbour - */ - public function setActive($active) - { - $this->active = $active; - return $this; - } - - /** - * @return string - */ - public function getDetails() - { - return $this->details; - } - - /** - * @param string $details - * @return ServiceconfigurationDetailsPreferredNeighbour - */ - public function setDetails($details) - { - $this->details = $details; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDetailsResponse.php b/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDetailsResponse.php deleted file mode 100644 index 15a36c49..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationDetailsResponse.php +++ /dev/null @@ -1,39 +0,0 @@ -details = $details; - } - - /** - * @return string - */ - public function getDetails() - { - return $this->details; - } - - /** - * @param string $details - * @return ServiceconfigurationDetailsResponse - */ - public function setDetails($details) - { - $this->details = $details; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationEndorsement.php b/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationEndorsement.php deleted file mode 100644 index 73e135d5..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationEndorsement.php +++ /dev/null @@ -1,64 +0,0 @@ -active = $active; - $this->type = $type; - } - - /** - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * @param bool $active - * @return ServiceconfigurationEndorsement - */ - public function setActive($active) - { - $this->active = $active; - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * @param string $type - * @return ServiceconfigurationEndorsement - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationIC.php b/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationIC.php deleted file mode 100644 index 8d2efb85..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationIC.php +++ /dev/null @@ -1,64 +0,0 @@ -Ident = $Ident; - $this->active = $active; - } - - /** - * @return Ident - */ - public function getIdent() - { - return $this->Ident; - } - - /** - * @param Ident $Ident - * @return ServiceconfigurationIC - */ - public function setIdent($Ident) - { - $this->Ident = $Ident; - return $this; - } - - /** - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * @param bool $active - * @return ServiceconfigurationIC - */ - public function setActive($active) - { - $this->active = $active; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationISR.php b/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationISR.php deleted file mode 100644 index d9075816..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationISR.php +++ /dev/null @@ -1,64 +0,0 @@ -active = $active; - $this->details = $details; - } - - /** - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * @param bool $active - * @return ServiceconfigurationISR - */ - public function setActive($active) - { - $this->active = $active; - return $this; - } - - /** - * @return string - */ - public function getDetails() - { - return $this->details; - } - - /** - * @param string $details - * @return ServiceconfigurationISR - */ - public function setDetails($details) - { - $this->details = $details; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationType.php b/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationType.php deleted file mode 100644 index 73bcfc5b..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationType.php +++ /dev/null @@ -1,64 +0,0 @@ -active = $active; - $this->Type = $Type; - } - - /** - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * @param bool $active - * @return ServiceconfigurationType - */ - public function setActive($active) - { - $this->active = $active; - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->Type; - } - - /** - * @param string $Type - * @return ServiceconfigurationType - */ - public function setType($Type) - { - $this->Type = $Type; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationUnfree.php b/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationUnfree.php deleted file mode 100644 index 886c0d61..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationUnfree.php +++ /dev/null @@ -1,89 +0,0 @@ -active = $active; - $this->PaymentType = $PaymentType; - $this->CustomerNumber = $CustomerNumber; - } - - /** - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * @param bool $active - * @return ServiceconfigurationUnfree - */ - public function setActive($active) - { - $this->active = $active; - return $this; - } - - /** - * @return string - */ - public function getPaymentType() - { - return $this->PaymentType; - } - - /** - * @param string $PaymentType - * @return ServiceconfigurationUnfree - */ - public function setPaymentType($PaymentType) - { - $this->PaymentType = $PaymentType; - return $this; - } - - /** - * @return string - */ - public function getCustomerNumber() - { - return $this->CustomerNumber; - } - - /** - * @param string $CustomerNumber - * @return ServiceconfigurationUnfree - */ - public function setCustomerNumber($CustomerNumber) - { - $this->CustomerNumber = $CustomerNumber; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationVisualAgeCheck.php b/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationVisualAgeCheck.php deleted file mode 100644 index 5a32af08..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ServiceconfigurationVisualAgeCheck.php +++ /dev/null @@ -1,64 +0,0 @@ -active = $active; - $this->type = $type; - } - - /** - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * @param bool $active - * @return ServiceconfigurationVisualAgeCheck - */ - public function setActive($active) - { - $this->active = $active; - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * @param string $type - * @return ServiceconfigurationVisualAgeCheck - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/Shipment.php b/src/modules/mo/mo_dhl/Api/GKV/Shipment.php deleted file mode 100644 index f0cd4266..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/Shipment.php +++ /dev/null @@ -1,164 +0,0 @@ -ShipmentDetails = $ShipmentDetails; - $this->Shipper = $Shipper; - $this->Receiver = $Receiver; - $this->ReturnReceiver = $ReturnReceiver; - $this->ExportDocument = $ExportDocument; - $this->feederSystem = $feederSystem; - } - - /** - * @return ShipmentDetailsTypeType - */ - public function getShipmentDetails() - { - return $this->ShipmentDetails; - } - - /** - * @param ShipmentDetailsTypeType $ShipmentDetails - * @return Shipment - */ - public function setShipmentDetails($ShipmentDetails) - { - $this->ShipmentDetails = $ShipmentDetails; - return $this; - } - - /** - * @return ShipperType - */ - public function getShipper() - { - return $this->Shipper; - } - - /** - * @param ShipperType $Shipper - * @return Shipment - */ - public function setShipper($Shipper) - { - $this->Shipper = $Shipper; - return $this; - } - - /** - * @return ReceiverType - */ - public function getReceiver() - { - return $this->Receiver; - } - - /** - * @param ReceiverType $Receiver - * @return Shipment - */ - public function setReceiver($Receiver) - { - $this->Receiver = $Receiver; - return $this; - } - - /** - * @return ShipperType - */ - public function getReturnReceiver() - { - return $this->ReturnReceiver; - } - - /** - * @param ShipperType $ReturnReceiver - * @return Shipment - */ - public function setReturnReceiver($ReturnReceiver) - { - $this->ReturnReceiver = $ReturnReceiver; - return $this; - } - - /** - * @return ExportDocumentType - */ - public function getExportDocument() - { - return $this->ExportDocument; - } - - /** - * @param ExportDocumentType $ExportDocument - * @return Shipment - */ - public function setExportDocument($ExportDocument) - { - $this->ExportDocument = $ExportDocument; - return $this; - } - - /** - * @return string - */ - public function getFeederSystem() - { - return $this->feederSystem; - } - - /** - * @param string $feederSystem - * @return Shipment - */ - public function setFeederSystem($feederSystem) - { - $this->feederSystem = $feederSystem; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ShipmentDetailsType.php b/src/modules/mo/mo_dhl/Api/GKV/ShipmentDetailsType.php deleted file mode 100644 index 3f3ff16a..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ShipmentDetailsType.php +++ /dev/null @@ -1,181 +0,0 @@ -product = $product; - $this->accountNumber = $accountNumber; - $this->shipmentDate = $shipmentDate; - } - - /** - * @return string - */ - public function getProduct() - { - return $this->product; - } - - /** - * @param string $product - * @return ShipmentDetailsType - */ - public function setProduct($product) - { - $this->product = $product; - return $this; - } - - /** - * @return string - */ - public function getAccountNumber() - { - return $this->accountNumber; - } - - /** - * @param string $accountNumber - * @return ShipmentDetailsType - */ - public function setAccountNumber($accountNumber) - { - $this->accountNumber = $accountNumber; - return $this; - } - - /** - * @return string - */ - public function getCustomerReference() - { - return $this->customerReference; - } - - /** - * @param string $customerReference - * @return ShipmentDetailsType - */ - public function setCustomerReference($customerReference) - { - $this->customerReference = $customerReference; - return $this; - } - - /** - * @return string - */ - public function getShipmentDate() - { - return $this->shipmentDate; - } - - /** - * @param string $shipmentDate - * @return ShipmentDetailsType - */ - public function setShipmentDate($shipmentDate) - { - $this->shipmentDate = $shipmentDate; - return $this; - } - - /** - * @return string - */ - public function getCostCentre() - { - return $this->costCentre; - } - - /** - * @param string $costCentre - * @return ShipmentDetailsType - */ - public function setCostCentre($costCentre) - { - $this->costCentre = $costCentre; - return $this; - } - - /** - * @return string - */ - public function getReturnShipmentAccountNumber() - { - return $this->returnShipmentAccountNumber; - } - - /** - * @param string $returnShipmentAccountNumber - * @return ShipmentDetailsType - */ - public function setReturnShipmentAccountNumber($returnShipmentAccountNumber) - { - $this->returnShipmentAccountNumber = $returnShipmentAccountNumber; - return $this; - } - - /** - * @return string - */ - public function getReturnShipmentReference() - { - return $this->returnShipmentReference; - } - - /** - * @param string $returnShipmentReference - * @return ShipmentDetailsType - */ - public function setReturnShipmentReference($returnShipmentReference) - { - $this->returnShipmentReference = $returnShipmentReference; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ShipmentDetailsTypeType.php b/src/modules/mo/mo_dhl/Api/GKV/ShipmentDetailsTypeType.php deleted file mode 100644 index 8a601c1d..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ShipmentDetailsTypeType.php +++ /dev/null @@ -1,112 +0,0 @@ -ShipmentItem = $ShipmentItem; - } - - /** - * @return ShipmentItemType - */ - public function getShipmentItem() - { - return $this->ShipmentItem; - } - - /** - * @param ShipmentItemType $ShipmentItem - * @return ShipmentDetailsTypeType - */ - public function setShipmentItem($ShipmentItem) - { - $this->ShipmentItem = $ShipmentItem; - return $this; - } - - /** - * @return ShipmentService - */ - public function getService() - { - return $this->Service; - } - - /** - * @param ShipmentService $Service - * @return ShipmentDetailsTypeType - */ - public function setService($Service) - { - $this->Service = $Service; - return $this; - } - - /** - * @return ShipmentNotificationType - */ - public function getNotification() - { - return $this->Notification; - } - - /** - * @param ShipmentNotificationType $Notification - * @return ShipmentDetailsTypeType - */ - public function setNotification($Notification) - { - $this->Notification = $Notification; - return $this; - } - - /** - * @return BankType - */ - public function getBankData() - { - return $this->BankData; - } - - /** - * @param BankType $BankData - * @return ShipmentDetailsTypeType - */ - public function setBankData($BankData) - { - $this->BankData = $BankData; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ShipmentItemType.php b/src/modules/mo/mo_dhl/Api/GKV/ShipmentItemType.php deleted file mode 100644 index 05471c88..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ShipmentItemType.php +++ /dev/null @@ -1,108 +0,0 @@ -weightInKG = $weightInKG; - } - - /** - * @return float - */ - public function getWeightInKG() - { - return $this->weightInKG; - } - - /** - * @param float $weightInKG - * @return ShipmentItemType - */ - public function setWeightInKG($weightInKG) - { - $this->weightInKG = $weightInKG; - return $this; - } - - /** - * @return int - */ - public function getLengthInCM() - { - return $this->lengthInCM; - } - - /** - * @param int $lengthInCM - * @return ShipmentItemType - */ - public function setLengthInCM($lengthInCM) - { - $this->lengthInCM = $lengthInCM; - return $this; - } - - /** - * @return int - */ - public function getWidthInCM() - { - return $this->widthInCM; - } - - /** - * @param int $widthInCM - * @return ShipmentItemType - */ - public function setWidthInCM($widthInCM) - { - $this->widthInCM = $widthInCM; - return $this; - } - - /** - * @return int - */ - public function getHeightInCM() - { - return $this->heightInCM; - } - - /** - * @param int $heightInCM - * @return ShipmentItemType - */ - public function setHeightInCM($heightInCM) - { - $this->heightInCM = $heightInCM; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ShipmentItemTypeType.php b/src/modules/mo/mo_dhl/Api/GKV/ShipmentItemTypeType.php deleted file mode 100644 index 18d01d95..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ShipmentItemTypeType.php +++ /dev/null @@ -1,16 +0,0 @@ -recipientEmailAddress = $recipientEmailAddress; - } - - /** - * @return string - */ - public function getRecipientEmailAddress() - { - return $this->recipientEmailAddress; - } - - /** - * @param string $recipientEmailAddress - * @return ShipmentNotificationType - */ - public function setRecipientEmailAddress($recipientEmailAddress) - { - $this->recipientEmailAddress = $recipientEmailAddress; - return $this; - } - - /** - * @return string - */ - public function getTemplateId() - { - return $this->templateId; - } - - /** - * @param string $templateId - * @return ShipmentNotificationType - */ - public function setTemplateId($templateId) - { - $this->templateId = $templateId; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ShipmentNumberType.php b/src/modules/mo/mo_dhl/Api/GKV/ShipmentNumberType.php deleted file mode 100644 index c635a392..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ShipmentNumberType.php +++ /dev/null @@ -1,39 +0,0 @@ -shipmentNumber = $shipmentNumber; - } - - /** - * @return string - */ - public function getShipmentNumber() - { - return $this->shipmentNumber; - } - - /** - * @param string $shipmentNumber - * @return ShipmentNumberType - */ - public function setShipmentNumber($shipmentNumber) - { - $this->shipmentNumber = $shipmentNumber; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ShipmentOrderType.php b/src/modules/mo/mo_dhl/Api/GKV/ShipmentOrderType.php deleted file mode 100644 index 5d4d8408..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ShipmentOrderType.php +++ /dev/null @@ -1,87 +0,0 @@ -sequenceNumber = $sequenceNumber; - $this->Shipment = $Shipment; - } - - /** - * @return string - */ - public function getSequenceNumber() - { - return $this->sequenceNumber; - } - - /** - * @param string $sequenceNumber - * @return ShipmentOrderType - */ - public function setSequenceNumber($sequenceNumber) - { - $this->sequenceNumber = $sequenceNumber; - return $this; - } - - /** - * @return Shipment - */ - public function getShipment() - { - return $this->Shipment; - } - - /** - * @param Shipment $Shipment - * @return ShipmentOrderType - */ - public function setShipment($Shipment) - { - $this->Shipment = $Shipment; - return $this; - } - - /** - * @return Serviceconfiguration - */ - public function getPrintOnlyIfCodeable() - { - return $this->PrintOnlyIfCodeable; - } - - /** - * @param Serviceconfiguration $PrintOnlyIfCodeable - * @return ShipmentOrderType - */ - public function setPrintOnlyIfCodeable($PrintOnlyIfCodeable) - { - $this->PrintOnlyIfCodeable = $PrintOnlyIfCodeable; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ShipmentService.php b/src/modules/mo/mo_dhl/Api/GKV/ShipmentService.php deleted file mode 100644 index 774c28c8..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ShipmentService.php +++ /dev/null @@ -1,474 +0,0 @@ -IndividualSenderRequirement; - } - - /** - * @param ServiceconfigurationISR $IndividualSenderRequirement - * @return ShipmentService - */ - public function setIndividualSenderRequirement($IndividualSenderRequirement) - { - $this->IndividualSenderRequirement = $IndividualSenderRequirement; - return $this; - } - - /** - * @return Serviceconfiguration - */ - public function getPackagingReturn() - { - return $this->PackagingReturn; - } - - /** - * @param Serviceconfiguration $PackagingReturn - * @return ShipmentService - */ - public function setPackagingReturn($PackagingReturn) - { - $this->PackagingReturn = $PackagingReturn; - return $this; - } - - /** - * @return ServiceconfigurationEndorsement - */ - public function getEndorsement() - { - return $this->Endorsement; - } - - /** - * @param ServiceconfigurationEndorsement $Endorsement - * @return ShipmentService - */ - public function setEndorsement($Endorsement) - { - $this->Endorsement = $Endorsement; - return $this; - } - - /** - * @return ServiceconfigurationVisualAgeCheck - */ - public function getVisualCheckOfAge() - { - return $this->VisualCheckOfAge; - } - - /** - * @param ServiceconfigurationVisualAgeCheck $VisualCheckOfAge - * @return ShipmentService - */ - public function setVisualCheckOfAge($VisualCheckOfAge) - { - $this->VisualCheckOfAge = $VisualCheckOfAge; - return $this; - } - - /** - * @return ServiceconfigurationDetailsPreferredLocation - */ - public function getPreferredLocation() - { - return $this->PreferredLocation; - } - - /** - * @param ServiceconfigurationDetailsPreferredLocation $PreferredLocation - * @return ShipmentService - */ - public function setPreferredLocation($PreferredLocation) - { - $this->PreferredLocation = $PreferredLocation; - return $this; - } - - /** - * @return ServiceconfigurationDetailsPreferredNeighbour - */ - public function getPreferredNeighbour() - { - return $this->PreferredNeighbour; - } - - /** - * @param ServiceconfigurationDetailsPreferredNeighbour $PreferredNeighbour - * @return ShipmentService - */ - public function setPreferredNeighbour($PreferredNeighbour) - { - $this->PreferredNeighbour = $PreferredNeighbour; - return $this; - } - - /** - * @return ServiceconfigurationDetailsPreferredDay - */ - public function getPreferredDay() - { - return $this->PreferredDay; - } - - /** - * @param ServiceconfigurationDetailsPreferredDay $PreferredDay - * @return ShipmentService - */ - public function setPreferredDay($PreferredDay) - { - $this->PreferredDay = $PreferredDay; - return $this; - } - - /** - * @return Serviceconfiguration - */ - public function getNoNeighbourDelivery() - { - return $this->NoNeighbourDelivery; - } - - /** - * @param Serviceconfiguration $NoNeighbourDelivery - * @return ShipmentService - */ - public function setNoNeighbourDelivery($NoNeighbourDelivery) - { - $this->NoNeighbourDelivery = $NoNeighbourDelivery; - return $this; - } - - /** - * @return Serviceconfiguration - */ - public function getNamedPersonOnly() - { - return $this->NamedPersonOnly; - } - - /** - * @param Serviceconfiguration $NamedPersonOnly - * @return ShipmentService - */ - public function setNamedPersonOnly($NamedPersonOnly) - { - $this->NamedPersonOnly = $NamedPersonOnly; - return $this; - } - - /** - * @return Serviceconfiguration - */ - public function getSignedForByRecipient() - { - return $this->SignedForByRecipient; - } - - /** - * @param Serviceconfiguration $SignedForByRecipient - * @return ShipmentService - */ - public function setSignedForByRecipient($SignedForByRecipient) - { - $this->SignedForByRecipient = $SignedForByRecipient; - return $this; - } - - /** - * @return Serviceconfiguration - */ - public function getReturnReceipt() - { - return $this->ReturnReceipt; - } - - /** - * @param Serviceconfiguration $ReturnReceipt - * @return ShipmentService - */ - public function setReturnReceipt($ReturnReceipt) - { - $this->ReturnReceipt = $ReturnReceipt; - return $this; - } - - /** - * @return Serviceconfiguration - */ - public function getPremium() - { - return $this->Premium; - } - - /** - * @param Serviceconfiguration $Premium - * @return ShipmentService - */ - public function setPremium($Premium) - { - $this->Premium = $Premium; - return $this; - } - - /** - * @return ServiceconfigurationCashOnDelivery - */ - public function getCashOnDelivery() - { - return $this->CashOnDelivery; - } - - /** - * @param ServiceconfigurationCashOnDelivery $CashOnDelivery - * @return ShipmentService - */ - public function setCashOnDelivery($CashOnDelivery) - { - $this->CashOnDelivery = $CashOnDelivery; - return $this; - } - - /** - * @return PDDP - */ - public function getPDDP() - { - return $this->PDDP; - } - - /** - * @param PDDP $PDDP - * @return ShipmentService - */ - public function setPDDP($PDDP) - { - $this->PDDP = $PDDP; - return $this; - } - - /** - * @return CDP - */ - public function getCDP() - { - return $this->CDP; - } - - /** - * @param CDP $CDP - * @return ShipmentService - */ - public function setCDP($CDP) - { - $this->CDP = $CDP; - return $this; - } - - /** - * @return Economy - */ - public function getEconomy() - { - return $this->Economy; - } - - /** - * @param Economy $Economy - * @return ShipmentService - */ - public function setEconomy($Economy) - { - $this->Economy = $Economy; - return $this; - } - - /** - * @return ServiceconfigurationAdditionalInsurance - */ - public function getAdditionalInsurance() - { - return $this->AdditionalInsurance; - } - - /** - * @param ServiceconfigurationAdditionalInsurance $AdditionalInsurance - * @return ShipmentService - */ - public function setAdditionalInsurance($AdditionalInsurance) - { - $this->AdditionalInsurance = $AdditionalInsurance; - return $this; - } - - /** - * @return Serviceconfiguration - */ - public function getBulkyGoods() - { - return $this->BulkyGoods; - } - - /** - * @param Serviceconfiguration $BulkyGoods - * @return ShipmentService - */ - public function setBulkyGoods($BulkyGoods) - { - $this->BulkyGoods = $BulkyGoods; - return $this; - } - - /** - * @return ServiceconfigurationIC - */ - public function getIdentCheck() - { - return $this->IdentCheck; - } - - /** - * @param ServiceconfigurationIC $IdentCheck - * @return ShipmentService - */ - public function setIdentCheck($IdentCheck) - { - $this->IdentCheck = $IdentCheck; - return $this; - } - - /** - * @return ServiceconfigurationDetailsOptional - */ - public function getParcelOutletRouting() - { - return $this->ParcelOutletRouting; - } - - /** - * @param ServiceconfigurationDetailsOptional $ParcelOutletRouting - * @return ShipmentService - */ - public function setParcelOutletRouting($ParcelOutletRouting) - { - $this->ParcelOutletRouting = $ParcelOutletRouting; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ShipperType.php b/src/modules/mo/mo_dhl/Api/GKV/ShipperType.php deleted file mode 100644 index 4e92c84c..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ShipperType.php +++ /dev/null @@ -1,17 +0,0 @@ -Name = $Name; - $this->Address = $Address; - } - - /** - * @return NameType - */ - public function getName() - { - return $this->Name; - } - - /** - * @param NameType $Name - * @return ShipperTypeType - */ - public function setName($Name) - { - $this->Name = $Name; - return $this; - } - - /** - * @return NativeAddressTypeNew - */ - public function getAddress() - { - return $this->Address; - } - - /** - * @param NativeAddressTypeNew $Address - * @return ShipperTypeType - */ - public function setAddress($Address) - { - $this->Address = $Address; - return $this; - } - - /** - * @return CommunicationType - */ - public function getCommunication() - { - return $this->Communication; - } - - /** - * @param CommunicationType $Communication - * @return ShipperTypeType - */ - public function setCommunication($Communication) - { - $this->Communication = $Communication; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/Status.php b/src/modules/mo/mo_dhl/Api/GKV/Status.php deleted file mode 100644 index 0bf759fd..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/Status.php +++ /dev/null @@ -1,64 +0,0 @@ -statuscode = $statuscode; - $this->statusDescription = $statusDescription; - } - - /** - * @return Statuscode - */ - public function getStatuscode() - { - return $this->statuscode; - } - - /** - * @param Statuscode $statuscode - * @return Status - */ - public function setStatuscode($statuscode) - { - $this->statuscode = $statuscode; - return $this; - } - - /** - * @return string - */ - public function getStatusDescription() - { - return $this->statusDescription; - } - - /** - * @param string $statusDescription - * @return Status - */ - public function setStatusDescription($statusDescription) - { - $this->statusDescription = $statusDescription; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/StatusCode.php b/src/modules/mo/mo_dhl/Api/GKV/StatusCode.php deleted file mode 100644 index 706b7ebe..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/StatusCode.php +++ /dev/null @@ -1,46 +0,0 @@ -statusElement = $statusElement; - $this->statusMessage = $statusMessage; - } - - /** - * @return string - */ - public function getStatusElement() - { - return $this->statusElement; - } - - /** - * @param string $statusElement - * @return StatusElement - */ - public function setStatusElement($statusElement) - { - $this->statusElement = $statusElement; - return $this; - } - - /** - * @return string - */ - public function getStatusMessage() - { - return $this->statusMessage; - } - - /** - * @param string $statusMessage - * @return StatusElement - */ - public function setStatusMessage($statusMessage) - { - $this->statusMessage = $statusMessage; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/Statusinformation.php b/src/modules/mo/mo_dhl/Api/GKV/Statusinformation.php deleted file mode 100644 index 0c3ef629..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/Statusinformation.php +++ /dev/null @@ -1,168 +0,0 @@ -statusCode = $statusCode; - $this->statusText = $statusText; - } - - /** - * @return int - */ - public function getStatusCode() - { - return $this->statusCode; - } - - /** - * @param int $statusCode - * @return Statusinformation - */ - public function setStatusCode($statusCode) - { - $this->statusCode = $statusCode; - return $this; - } - - /** - * @return string - */ - public function getStatusText() - { - return $this->statusText; - } - - /** - * @param string $statusText - * @return Statusinformation - */ - public function setStatusText($statusText) - { - $this->statusText = $statusText; - return $this; - } - - /** - * @return string[] - */ - public function getStatusMessage() - { - return $this->statusMessage; - } - - /** - * @param string[] $statusMessage - * @return Statusinformation - */ - public function setStatusMessage(array $statusMessage = null) - { - $this->statusMessage = $statusMessage; - return $this; - } - - /** - * @return string - */ - public function getStatusType() - { - return $this->statusType; - } - - /** - * @param string $statusType - * @return Statusinformation - */ - public function setStatusType($statusType) - { - $this->statusType = $statusType; - return $this; - } - - /** - * @return StatusElement[] - */ - public function getErrorMessage() - { - return $this->errorMessage; - } - - /** - * @param StatusElement[] $errorMessage - * @return Statusinformation - */ - public function setErrorMessage(array $errorMessage = null) - { - $this->errorMessage = $errorMessage; - return $this; - } - - /** - * @return StatusElement[] - */ - public function getWarningMessage() - { - return $this->warningMessage; - } - - /** - * @param StatusElement[] $warningMessage - * @return Statusinformation - */ - public function setWarningMessage(array $warningMessage = null) - { - $this->warningMessage = $warningMessage; - return $this; - } - - /** - * @return string[] - */ - public function getErrors(): array - { - if ($this->getStatusCode() === StatusCode::GKV_STATUS_OK) { - return []; - } - $errors = $this->getStatusMessage() ?: $this->getErrorMessage() ?: $this->getWarningMessage() ?: []; - array_unshift($errors, $this->getStatusText()); - return array_unique($errors); - } -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/TimeFrame.php b/src/modules/mo/mo_dhl/Api/GKV/TimeFrame.php deleted file mode 100644 index 37e670f4..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/TimeFrame.php +++ /dev/null @@ -1,64 +0,0 @@ -from = $from; - $this->until = $until; - } - - /** - * @return string - */ - public function getFrom() - { - return $this->from; - } - - /** - * @param string $from - * @return TimeFrame - */ - public function setFrom($from) - { - $this->from = $from; - return $this; - } - - /** - * @return string - */ - public function getUntil() - { - return $this->until; - } - - /** - * @param string $until - * @return TimeFrame - */ - public function setUntil($until) - { - $this->until = $until; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/UpdateShipmentOrderRequest.php b/src/modules/mo/mo_dhl/Api/GKV/UpdateShipmentOrderRequest.php deleted file mode 100644 index 5a3f853f..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/UpdateShipmentOrderRequest.php +++ /dev/null @@ -1,214 +0,0 @@ -Version = $Version; - $this->shipmentNumber = $shipmentNumber; - $this->ShipmentOrder = $ShipmentOrder; - $this->labelResponseType = $labelResponseType; - $this->groupProfileName = $groupProfileName; - $this->labelFormat = $labelFormat; - $this->labelFormatRetoure = $labelFormatRetoure; - $this->combinedPrinting = $combinedPrinting; - } - - /** - * @return Version - */ - public function getVersion() - { - return $this->Version; - } - - /** - * @param Version $Version - * @return UpdateShipmentOrderRequest - */ - public function setVersion($Version) - { - $this->Version = $Version; - return $this; - } - - /** - * @return string - */ - public function getShipmentNumber() - { - return $this->shipmentNumber; - } - - /** - * @param string $shipmentNumber - * @return UpdateShipmentOrderRequest - */ - public function setShipmentNumber($shipmentNumber) - { - $this->shipmentNumber = $shipmentNumber; - return $this; - } - - /** - * @return ShipmentOrderType - */ - public function getShipmentOrder() - { - return $this->ShipmentOrder; - } - - /** - * @param ShipmentOrderType $ShipmentOrder - * @return UpdateShipmentOrderRequest - */ - public function setShipmentOrder($ShipmentOrder) - { - $this->ShipmentOrder = $ShipmentOrder; - return $this; - } - - /** - * @return string - */ - public function getLabelResponseType() - { - return $this->labelResponseType; - } - - /** - * @param string $labelResponseType - * @return UpdateShipmentOrderRequest - */ - public function setLabelResponseType($labelResponseType) - { - $this->labelResponseType = $labelResponseType; - return $this; - } - - /** - * @return string - */ - public function getGroupProfileName() - { - return $this->groupProfileName; - } - - /** - * @param string $groupProfileName - * @return UpdateShipmentOrderRequest - */ - public function setGroupProfileName($groupProfileName) - { - $this->groupProfileName = $groupProfileName; - return $this; - } - - /** - * @return string - */ - public function getLabelFormat() - { - return $this->labelFormat; - } - - /** - * @param string $labelFormat - * @return UpdateShipmentOrderRequest - */ - public function setLabelFormat($labelFormat) - { - $this->labelFormat = $labelFormat; - return $this; - } - - /** - * @return string - */ - public function getLabelFormatRetoure() - { - return $this->labelFormatRetoure; - } - - /** - * @param string $labelFormatRetoure - * @return UpdateShipmentOrderRequest - */ - public function setLabelFormatRetoure($labelFormatRetoure) - { - $this->labelFormatRetoure = $labelFormatRetoure; - return $this; - } - - /** - * @return string - */ - public function getCombinedPrinting() - { - return $this->combinedPrinting; - } - - /** - * @param string $combinedPrinting - * @return UpdateShipmentOrderRequest - */ - public function setCombinedPrinting($combinedPrinting) - { - $this->combinedPrinting = $combinedPrinting; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/UpdateShipmentOrderResponse.php b/src/modules/mo/mo_dhl/Api/GKV/UpdateShipmentOrderResponse.php deleted file mode 100644 index 5c2cccdf..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/UpdateShipmentOrderResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -Version = $Version; - $this->Status = $Status; - $this->shipmentNumber = $shipmentNumber; - $this->returnShipmentNumber = $returnShipmentNumber; - $this->LabelData = $LabelData; - } - - /** - * @return Version - */ - public function getVersion() - { - return $this->Version; - } - - /** - * @param Version $Version - * @return UpdateShipmentOrderResponse - */ - public function setVersion($Version) - { - $this->Version = $Version; - return $this; - } - - /** - * @return Statusinformation - */ - public function getStatus() - { - return $this->Status; - } - - /** - * @param Statusinformation $Status - * @return UpdateShipmentOrderResponse - */ - public function setStatus($Status) - { - $this->Status = $Status; - return $this; - } - - /** - * @return string - */ - public function getShipmentNumber() - { - return $this->shipmentNumber; - } - - /** - * @param string $shipmentNumber - * @return UpdateShipmentOrderResponse - */ - public function setShipmentNumber($shipmentNumber) - { - $this->shipmentNumber = $shipmentNumber; - return $this; - } - - /** - * @return string - */ - public function getReturnShipmentNumber() - { - return $this->returnShipmentNumber; - } - - /** - * @param string $returnShipmentNumber - * @return UpdateShipmentOrderResponse - */ - public function setReturnShipmentNumber($returnShipmentNumber) - { - $this->returnShipmentNumber = $returnShipmentNumber; - return $this; - } - - /** - * @return LabelData[] - */ - public function getLabelData() - { - return $this->LabelData; - } - - /** - * @param LabelData[] $LabelData - * @return UpdateShipmentOrderResponse - */ - public function setLabelData($LabelData) - { - $this->LabelData = $LabelData; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ValidateShipmentOrderRequest.php b/src/modules/mo/mo_dhl/Api/GKV/ValidateShipmentOrderRequest.php deleted file mode 100644 index 4207d0e0..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ValidateShipmentOrderRequest.php +++ /dev/null @@ -1,64 +0,0 @@ -Version = $Version; - $this->ShipmentOrder = $ShipmentOrder; - } - - /** - * @return Version - */ - public function getVersion() - { - return $this->Version; - } - - /** - * @param Version $Version - * @return ValidateShipmentOrderRequest - */ - public function setVersion($Version) - { - $this->Version = $Version; - return $this; - } - - /** - * @return ValidateShipmentOrderType - */ - public function getShipmentOrder() - { - return $this->ShipmentOrder; - } - - /** - * @param ValidateShipmentOrderType $ShipmentOrder - * @return ValidateShipmentOrderRequest - */ - public function setShipmentOrder($ShipmentOrder) - { - $this->ShipmentOrder = $ShipmentOrder; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ValidateShipmentOrderType.php b/src/modules/mo/mo_dhl/Api/GKV/ValidateShipmentOrderType.php deleted file mode 100644 index 4c00e6f8..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ValidateShipmentOrderType.php +++ /dev/null @@ -1,87 +0,0 @@ -sequenceNumber = $sequenceNumber; - $this->Shipment = $Shipment; - } - - /** - * @return string - */ - public function getSequenceNumber() - { - return $this->sequenceNumber; - } - - /** - * @param string $sequenceNumber - * @return ValidateShipmentOrderType - */ - public function setSequenceNumber($sequenceNumber) - { - $this->sequenceNumber = $sequenceNumber; - return $this; - } - - /** - * @return Shipment - */ - public function getShipment() - { - return $this->Shipment; - } - - /** - * @param Shipment $Shipment - * @return ValidateShipmentOrderType - */ - public function setShipment($Shipment) - { - $this->Shipment = $Shipment; - return $this; - } - - /** - * @return Serviceconfiguration - */ - public function getPrintOnlyIfCodeable() - { - return $this->PrintOnlyIfCodeable; - } - - /** - * @param Serviceconfiguration $PrintOnlyIfCodeable - * @return ValidateShipmentOrderType - */ - public function setPrintOnlyIfCodeable($PrintOnlyIfCodeable) - { - $this->PrintOnlyIfCodeable = $PrintOnlyIfCodeable; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ValidateShipmentResponse.php b/src/modules/mo/mo_dhl/Api/GKV/ValidateShipmentResponse.php deleted file mode 100644 index 83891291..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ValidateShipmentResponse.php +++ /dev/null @@ -1,89 +0,0 @@ -Version = $Version; - $this->Status = $Status; - $this->ValidationState = $ValidationState; - } - - /** - * @return Version - */ - public function getVersion() - { - return $this->Version; - } - - /** - * @param Version $Version - * @return ValidateShipmentResponse - */ - public function setVersion($Version) - { - $this->Version = $Version; - return $this; - } - - /** - * @return Statusinformation - */ - public function getStatus() - { - return $this->Status; - } - - /** - * @param Statusinformation $Status - * @return ValidateShipmentResponse - */ - public function setStatus($Status) - { - $this->Status = $Status; - return $this; - } - - /** - * @return ValidationState - */ - public function getValidationState() - { - return $this->ValidationState; - } - - /** - * @param ValidationState $ValidationState - * @return ValidateShipmentResponse - */ - public function setValidationState($ValidationState) - { - $this->ValidationState = $ValidationState; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/ValidationState.php b/src/modules/mo/mo_dhl/Api/GKV/ValidationState.php deleted file mode 100644 index 9ad32f47..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/ValidationState.php +++ /dev/null @@ -1,64 +0,0 @@ -sequenceNumber = $sequenceNumber; - $this->Status = $Status; - } - - /** - * @return string - */ - public function getSequenceNumber() - { - return $this->sequenceNumber; - } - - /** - * @param string $sequenceNumber - * @return ValidationState - */ - public function setSequenceNumber($sequenceNumber) - { - $this->sequenceNumber = $sequenceNumber; - return $this; - } - - /** - * @return Statusinformation - */ - public function getStatus() - { - return $this->Status; - } - - /** - * @param Statusinformation $Status - * @return ValidationState - */ - public function setStatus($Status) - { - $this->Status = $Status; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/Version.php b/src/modules/mo/mo_dhl/Api/GKV/Version.php deleted file mode 100644 index c0967c53..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/Version.php +++ /dev/null @@ -1,89 +0,0 @@ -majorRelease = $majorRelease; - $this->minorRelease = $minorRelease; - $this->build = $build; - } - - /** - * @return string - */ - public function getMajorRelease() - { - return $this->majorRelease; - } - - /** - * @param string $majorRelease - * @return Version - */ - public function setMajorRelease($majorRelease) - { - $this->majorRelease = $majorRelease; - return $this; - } - - /** - * @return string - */ - public function getMinorRelease() - { - return $this->minorRelease; - } - - /** - * @param string $minorRelease - * @return Version - */ - public function setMinorRelease($minorRelease) - { - $this->minorRelease = $minorRelease; - return $this; - } - - /** - * @return string - */ - public function getBuild() - { - return $this->build; - } - - /** - * @param string $build - * @return Version - */ - public function setBuild($build) - { - $this->build = $build; - return $this; - } - -} diff --git a/src/modules/mo/mo_dhl/Api/GKV/geschaeftskundenversand-api-3.5.0-schema-bcs_base.xsd b/src/modules/mo/mo_dhl/Api/GKV/geschaeftskundenversand-api-3.5.0-schema-bcs_base.xsd deleted file mode 100644 index 159138dc..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/geschaeftskundenversand-api-3.5.0-schema-bcs_base.xsd +++ /dev/null @@ -1,3780 +0,0 @@ - - - - - - A sequence number defined by the (soap-) client. The - sequenceNumber is - returned by the webservice within the result of the - createShipment operation, so - that the client is able to assign the - shipment information of the response to the - shipment data of the - request. - - - - - - - - - - The version of the webservice and the version of the - software - build. - - - - - - - The version of the webservice implementation. - - - - - - - - - The shipmentdata for creating a shipment. - - - - - - - The version of the webservice implementation for - which the - requesting client is developed. - - - - - - ShipmentOrder is the highest parent element that - contains all - data with respect to one shipment order. - - - - - - Dial to determine label ouput format. Must be - either 'URL' or - 'B64' = Base64encoded: it is possible to request - an URL for receiving - the label as PDF stream, or to request the - label as base64encoded binary - data directly. If not defined by - client, web service defaults to - 'URL'. - - - - - - - - - - - - - The group profile you select defines the billing - numbers you can use for creating shipments. To define group - profiles please visit our business costumer portal. - - - - - - - - - - - In this optional section you can define the following label formats: - A4:common label laser printing A4 plain paper; - 910-300-700: common label laser printing 105 x 205 mm (A5 plain paper, 910-300-700); - 910-300-700-oz: common label laser printing 105 x 205 mm without additional barcode labels (A5 plain paper, 910-300-700); - 910-300-300: common label laser printing 105 x 148 mm (A5 plain paper, 910-300-700); - 910-300-300-oz: common label laser printing 105 x 148 mm without additional barcode labels (A5 plain paper, 910-300-300); - 910-300-710: common label laser printing 105 x 208 mm (910-300-710); - 910-300-600: common label thermal printing 103 x 199 mm (910-300-600, 910-300-610); - 910-300-400: common label thermal printing 103 x 150 mm (910-300-400, 910-300-410); - 100x70mm: 100 x 70 mm label (only for Warenpost and Warenpost International); - - - - - - - - - - - In this optional section you can define the following label formats: - A4:common label laser printing A4 plain paper; - 910-300-700: common label laser printing 105 x 205 mm (a5 plain paper, 910-300-700); - 910-300-700-oz: common label laser printing 105 x 205 mm without additional barcode labels (A5 plain paper, 910-300-700); - 910-300-300: common label laser printing 105 x 148 mm (A5 plain paper, 910-300-300); - 910-300-300-oz: common label laser printing 105 x 148 mm without additional barcode labels (A5 plain paper, 910-300-300); - 910-300-710: common label laser printing 105 x 208 mm (910-300-710); - 910-300-600: common label thermal printing 103 x 199 mm (910-300-600, 910-300-610); - 910-300-400: common label thermal printing 103 x 150 mm (910-300-400, 910-300-410); - 100x70mm: 100 x 70 mm label (only for Warenpost and Warenpost International); - - - - - - - - - - To get a single PDF for shipping and return label - select this option. - - - - - - - - - - - - - The shipmentdata for validating a shipment. - - - - - - - The version of the webservice implementation for - which the - requesting client is developed. - - - - - - ShipmentOrder is the highest parent element that - contains all - data with respect to one shipment order. - - - - - - - - - - The status of the operation and the shipment - identifier (if - available). - - - - - - - The version of the webservice implementation. - - - - - - Success status after processing the overall - request. - - - - - - The operation's success status for every single - ShipmentOrder - will be returned by one CreationState element. It is - identifiable via - SequenceNumber. - - - - - - - - - The status of the operation and the shipment - identifier (if - available). - - - - - - - The version of the webservice implementation. - - - - - - Success status after processing the overall - request. - - - - - - The operation's success status for every single - ShipmentOrder - will be returned by one CreationState element. It is - identifiable via - SequenceNumber. - - - - - - - - - The identifier for the shipment for which the label - url is - requested. - - - - - - - The version of the webservice implementation for - which the - requesting client is developed. - - - - - - - Dial to determine label ouput format. Must be - either 'URL' or - 'B64' = Base64encoded: it is possible to request - an URL for receiving - the label as PDF stream, or to request the - label as base64encoded binary - data directly. If not defined by - client, web service defaults to - 'URL'. - - - - - - - - - - - - - The group profile you select defines the billing - numbers you can use for creating shipments. To define group - profiles please visit our business costumer portal. - The group - profile defines the shipments you can get documents for. - The - shipment needs to have an account/billing number allocated to - the - group profile. To define group profiles please visit our - business - costumer portal. - - - - - - - - - - - In this optional section you can define the following label formats: - A4:common label laser printing A4 plain paper; - 910-300-700: common label laser printing 105 x 205 mm (910-300-700); - 910-300-700-oz: common label laser printing 105 x 205 mm without additional barcode labels (910-300-700); - 910-300-300: common label laser printing 105 x 148 mm (910-300-700); - 910-300-300-oz: common label laser printing 105 x 148 mm without additional barcode labels (910-300-300); - 910-300-710: common label laser printing 105 x 208 mm (910-300-710); - 910-300-600: common label thermal printing 103 x 199 mm (910-300-600, 910-300-610); - 910-300-400: common label thermal printing 103 x 150 mm (910-300-400, 910-300-410); - 100x70mm: 100 x 70 mm label (only for Warenpost and Warenpost International); - - - - - - - - - - - In this optional section you can define the following label formats: - A4:common label laser printing A4 plain paper; - 910-300-700: common label laser printing 105 x 205 mm (910-300-700); - 910-300-700-oz: common label laser printing 105 x 205 mm without additional barcode labels (910-300-700); - 910-300-300: common label laser printing 105 x 148 mm (910-300-700); - 910-300-300-oz: common label laser printing 105 x 148 mm without additional barcode labels (910-300-300); - 910-300-710: common label laser printing 105 x 208 mm (910-300-710); - 910-300-600: common label thermal printing 103 x 199 mm (910-300-600, 910-300-610); - 910-300-400: common label thermal printing 103 x 150 mm (910-300-400, 910-300-410); - 100x70mm: 100 x 70 mm label (only for Warenpost and Warenpost International); - - - - - - - - - - To get a single PDF for shipping and return label - select this option. - - - - - - - - - - - - - - The status of the operation and requested urls for - getting the - label. - - - - - - - The version of the webservice implementation. - - - - - - Success status after processing the overall - request. - - - - - - For every ShipmentNumber requested, one LabelData - node is - returned that contains the status of the label retrieval - operation and - the URL for the label (if available). - - - - - - - - - Manifests one ore more shipments. - - - - - - The version of the webservice implementation for - which the - requesting client is developed. - - - - - - - - Contains a shipment number. Any number of a printed shipment not already manifested can be used. - A Request can contain the element up to 50 times. - Requests need to either contain at least one times shipmentNumber or allshipments. - Requests cannot contain shipmentNumber and allShipments at the same time. - - - - - - - Manifests all shipments. Can be used instead the element “shipmentNumber”. The element is used without a value, e.g. - - - - - - - - - - The status of the operation - - - - - - The version of the webservice implementation. - - - - - - Status of the request (value of zero means, the - request was - processed without error; value greater than zero - indicates that an error - occurred). - - - - - - The status of the operation for the corresponding - shipment. - - - - - - - - - The identifier for the shipment which should be - deleted. - - - - - - - The version of the webservice implementation for - which the - requesting client is developed. - - - - - - In order to delete previously created DD shipment - orders, - ShipmentNumber. ShipmentNumber is required. This parent - element inherits - from ShipmentNumberType, therefore all following - subelements are valid - according to schema, however the web service - accepts shipmentNumber - only. Note: you can delete more than one - shipment by passing multiple - ShipmentNumber containers. - - - - - - - - - The status of the operation. - - - - - - The version of the webservice implementation. - - - - - - Success status after processing the overall - request. - - - - - - For every ShipmentNumber requested, one - DeletionState node - is returned that contains the status of the - respective deletion - operation. - - - - - - - - - The identifier for the shipment for which the export - document url is - requested. - - - - - - - The version of the webservice implementation for - which the - requesting client is developed. - - - - - - To request export documents, ShipmentNumber. - ShipmentNumber - is required. This parent element inherits from - ShipmentNumberType, - therefore all following subelements are valid - according to schema, - however the web service accepts - shipmentNumber only. - - - - - - Dial to determine label ouput format. Must be - either 'URL' or - 'B64' = Base64encoded: it is possible to request - an URL for receiving - the label as PDF stream, or to request the - label as base64encoded binary - data directly. If not defined by - client, web service defaults to - 'URL'. - - - - - - - - - - - - - The group profile you select defines the billing - numbers you can use for creating shipments. To define group - profiles please visit our business costumer portal. - The group - profile defines the shipments you can get documents for. - The - shipment needs to have an account/billing number allocated to - the - group profile. To define group profiles please visit our - business - costumer portal. - - - - - - - - - - - - - - - - - - - - The status of the operation and requested export - document. - - - - - - - The version of the webservice implementation. - - - - - - Status of the request (value of zero means, the - request was - processed without error; value greater than zero - indicates that an error - occurred). - - - - - - Contains the result of the document processing: in - case of no - errors, a base64 encoded PDF is contained; also, the - status of this - particular document generation and the passed - shipment number are - returned. - - - - - - - - - The request data for the manifest document - - - - - - - The version of the webservice implementation for - which the - requesting client is developed. - - - - - - Date in format yyyy-mm-dd - - - - - - - - - The status of the operation and requested export - document. - - - - - - - The version of the webservice implementation. - - - - - - Status of the request (value of zero means, the - request was - processed without error; value greater than zero - indicates that an error - occurred). - - - - - - The Base64 encoded pdf data for receiving the - manifest. - - - - - - - - - The shipmentdata for creating a shipment. - - - - - - - The version of the webservice implementation for - which the - requesting client is developed. - - - - - - The ShipmentNumber of the shipment, which sould be - updated. - ShipmentNumber is required. This parent element inherits - from - ShipmentNumberType, therefore all following subelements are - valid - according to schema, however the web service accepts - shipmentNumber - only. - - - - - - ShipmentOrder contains an update of all data of the - selected - shipment order. - - - - - - Dial to determine label ouput format. Must be - either 'URL' or - 'B64' = Base64encoded: it is possible to request - an URL for receiving - the label as PDF stream, or to request the - label as base64encoded binary - data directly. If not defined by - client, web service defaults to - 'URL'. - - - - - - - - - - - - - The group profile you select defines the billing - numbers you can use for creating shipments. To define group - profiles please visit our business costumer portal. - - - - - - - - - - - In this optional section you can define the following label formats: - A4:common label laser printing A4 plain paper; - 910-300-700: common label laser printing 105 x 205 mm (910-300-700); - 910-300-700-oz: common label laser printing 105 x 205 mm without additional barcode labels (910-300-700); - 910-300-300: common label laser printing 105 x 148 mm (910-300-700); - 910-300-300-oz: common label laser printing 105 x 148 mm without additional barcode labels (910-300-300); - 910-300-710: common label laser printing 105 x 208 mm (910-300-710); - 910-300-600: common label thermal printing 103 x 199 mm (910-300-600, 910-300-610); - 910-300-400: common label thermal printing 103 x 150 mm (910-300-400, 910-300-410); - 100x70mm: 100 x 70 mm label (only for Warenpost and Warenpost International); - - - - - - - - - - - In this optional section you can define the following label formats: - A4:common label laser printing A4 plain paper; - 910-300-700: common label laser printing 105 x 205 mm (910-300-700); - 910-300-700-oz: common label laser printing 105 x 205 mm without additional barcode labels (910-300-700); - 910-300-300: common label laser printing 105 x 148 mm (910-300-700); - 910-300-300-oz: common label laser printing 105 x 148 mm without additional barcode labels (910-300-300); - 910-300-710: common label laser printing 105 x 208 mm (910-300-710); - 910-300-600: common label thermal printing 103 x 199 mm (910-300-600, 910-300-610); - 910-300-400: common label thermal printing 103 x 150 mm (910-300-400, 910-300-410); - 100x70mm: 100 x 70 mm label (only for Warenpost and Warenpost International); - - - - - - - - - - To get a single PDF for shipping and return label - select this option. - - - - - - - - - - - - - - The status of the operation and the shipment - identifier (if - available). - - - - - - - The version of the webservice implementation. - - - - - - Success status after processing the overall - request. - - - - - - Can contain any DHL shipmentnumber. For successful - and unsuccessful operations, the requested - ShipmentNumber to be - deleted is returned. This is no matter if the operation - could be - performed or not. - - - - - - - - - - - Can contain any DHL shipmentnumber. For successful - and unsuccessful operations, the requested - ShipmentNumber to be - deleted is returned. This is no matter if the operation - could be - performed or not. - - - - - - - - - - - The operation's success status for every single - ShipmentOrder - will be returned by one UpdateState element. It is - identifiable via - ShipmentNumber. - - - - - - - - - The operation's success status for every single - ShipmentOrder will be - returned by one CreationState element. It is - identifiable via SequenceNumber. - - - - - - Identifier for ShipmentOrder set by client - application in - CreateShipment request. The defined value is looped - through and returned - unchanged by the web service within the - response of createShipment. The - client can therefore assign the - status information of the response to the - correct ShipmentOrder of - the request. - - - - - - Can contain any DHL shipmentnumber. For successful - and unsuccessful operations, the requested - ShipmentNumber to be - deleted is returned. This is no matter if the operation - could be - performed or not. - - - - - - - - - - - Can contain any DHL shipmentnumber. For successful - and unsuccessful operations, the requested - ShipmentNumber to be - deleted is returned. This is no matter if the operation - could be - performed or not. - - - - - - - - - - - For successful operations, a shipment number is - created and - returned. Depending on the invoked product. - - - - - - - - The operation's success status for every single - ShipmentOrder will be - returned by one CreationState element. It is - identifiable via SequenceNumber. - - - - - - Identifier for ShipmentOrder set by client - application in - CreateShipment request. The defined value is looped - through and returned - unchanged by the web service within the - response of createShipment. The - client can therefore assign the - status information of the response to the - correct ShipmentOrder of - the request. - - - - - - Success status of processing a particular shipment. - - - - - - - - The status information used in different situations. - - - - - - Overall status of the entire request: A value of - zero means, the - request was processed without error. A value - greater than zero indicates - that an error occurred. The detailed - mapping and explanation of returned - status codes is contained in - the list. - - - - - - Explanation of the statuscode. Explains what types of errors occurred. - - - - - - Detailed explanation of errors or warnings, p.e. “Invalid postal code”. - This element is kept for compatibility reasons only. Please use “statusType” und “errorMassage” with their subelements instead. - - - - - - Explains if an error or warning occurred - - - - - - Explains details of the error and where it occurred - - - - - - Explains if an error or warning occurred - - - - - - Explains details of the error and where it occurred - - - - - - - - - - Explanation of the statusElement and potential errors. - - - - - - Explanation of the statusMessage and potential errors. - - - - - - - - - Information about each piece (e.g. the generated - licence plate). For - every piece, a PieceInformation container holds - the license plate - number. - - - - - - For every piece a piece number is created that is of - one of the - following types (mostly licensePlate). - - - - - - - - Data for the creation of a shipment. - - - - - Free field to to tag multiple shipment orders - individually by - client. Essential for later mapping of response - data returned by webservice - upon createShipment operation. Allows - client to assign the shipment - information of the response to the - correct shipment order of the - request. - - - - - - Is the core element of a ShipmentOrder. It contains - all relevant - information of the shipment. - - - - - - - Contains the information of the shipment product - code, weight and size characteristics and services to be used. - - - - - - - Contains relevant information about the - Shipper. - - - - - - Contains a reference to the Shipper data - configured in GKP. - - - - - - - Contains relevant information about - Receiver. - - - - - - To be used if a return label address shall be - generated. - - - - - - For international shipments. This section - contains information about the exported goods relevant for - customs. For international shipments: commercial invoice and - customs declaration (CN23) have to be attached to the shipment. - Data relevant for customs also has to be transferred as - electronically. - - - - - - Is only to be indicated by DHL partners - - - - - - - - - - - - - If set to true (=1), the label will be only be - printable, if the - receiver address is valid. - - - - - - - - Data for the creation of a shipment. - - - - - Free field to to tag multiple shipment orders - individually by - client. Essential for later mapping of response - data returned by webservice - upon createShipment operation. Allows - client to assign the shipment - information of the response to the - correct shipment order of the - request. - - - - - - Is the core element of a ShipmentOrder. It contains - all relevant - information of the shipment. - - - - - - - Contains the information of the shipment product - code, weight and size characteristics and services to be used. - - - - - - Contains relevant information about the - Shipper. - - - - - - Contains relevant information about - Receiver. - - - - - - To be used if a return label address shall be - generated. - - - - - - For international shipments. This section - contains information about the exported goods relevant for - customs. For international shipments: commercial invoice and - customs declaration (CN23) have to be attached to the shipment. - Data relevant for customs also has to be transferred as - electronically. - - - - - - Is only to be indicated by DHL partners - - - - - - - - - - - - - If set to true (=1), the label will be only be - printable, if the - receiver address is valid. - - - - - - - - The data of the shipper or return receiver. - - - - - - Name of the Return Receiver - - - - - Contains address data. - - - - - Information about communication. - - - - - - - The data of the shipper of a shipment. - - - - - - - - - Key of reference. - - - - - - - - The receiver data. - - - - - - - The address data of the receiver. - - - - - The address of the receiver is a german - Packstation. - - - - - - The address of the receiver is a german - Postfiliale. - - - - - - - Information about communication. - - - - - - - The receiver data of a shipment. - - - - - - - - - Identity data (used for ident services). - - - - - - First name of the person to be verified. Field - length must be - less than or equal to 30. - - - - - - Last name of the person to be verified. Field length - must be less - than or equal to 30. - - - - - - Name of the street of registered address. Field - length must be - less than or equal to 30. - - - - - - House number of registered address. Field length - must be less - than or equal to 10. - - - - - - Postcode of registered address. Field length must be - less than or - equal to 15. - - - - - - City of registered address. Field length must be - less than or - equal to 30. - - - - - - Person's date of birth. Format must be yyyy-mm-dd. - - - - - - Person's nationality. Field length must be less than - or equal to - 30. - - - - - - - - Details of a shipment. - - - - - - Determines the DHL Paket product to be ordered. - V01PAK: DHL PAKET; - V53WPAK: DHL PAKET International; - V54EPAK: DHL Europaket; - V62WP: Warenpost; - V66WPI: Warenpost International - - - - - - - A reference number that the client can assign for - better association purposes. Appears on shipment label. To use the - reference number for tracking purposes, it should be at least 8 - characters long and unique - - - - - - - - - - - Date of shipment should be close to current date and - must not be - in the past. Iso format required: yyyy-mm-dd. - - - - - - - - - - - - Name of a cost center. Appears on shipment label. - - - - - - - - - - - DHL account number (14 digits). - - - - - - - - - - - - A reference number that the client can assign for - better - association purposes. Appears on return shipment label. To - use the reference number for tracking purposes, it should be at - least 8 characters long and unique. - - - - - - - - - - - - - Details of a shipment. - - - - - - extends the ShipmentDetailsType - - - - For every parcel specified, contains weight in kg, - length - in cm, width in cm and height in cm. - - - - - - Use one dedicated Service node for each service to - be - booked with the shipment product. Add another Service node for - booking a further service and so on. Successful booking of a - particular service depends on account permissions and product's - service combinatorics. I.e. not every service is allowed for - every - product, or can be combined with all other allowed - services. The - service bundles that contain all services are the - following. - - - - - - Mechanism to send notifications by email after - successful - manifesting of shipment. - - - - - - Bank data can be provided here for different - purposes. - E.g. if COD is booked as service, bank data must be - provided by DHL - customer (mandatory server logic). The collected - money will be - transferred to specified bank account. - - - - - - - - - - Item/Piece data. - - - - - The weight of the piece in kg - - - - - - - - - - - - The length of the piece in cm. - - - - - - - - - - - The width of the piece in cm. - - - - - - - - - - - The height of the piece in cm. - - - - - - - - - - - - - Item/Piece data of a shipment. - - - - - - - - - GKV shipment services. - - - - can be - - - - - This service is used exclusively for shipments with - special delivery requirements. It is not available for our regular - business customers. - - - - - - Service for package return. For packagingReturn you - also have to book a return label. - - - - - - Service "Endorsement". Mandatory for shipments with - product DHL Paket International: V53WPAK - - - - - - Service visual age check - - - - - Service preferred location - - - - - Service preferred neighbour - The details field should be set to the preferred - neighbours - name. - - - - - - Service preferred day - - - - - Invoke service No Neighbour Delivery. - - - - - - Invoke service Named Person Only. - - - - - Invoke service return receipt. - - - - - Premium for fast and safe delivery of international - shipments. - - - - - - Service Cash on delivery. - - - - - Postal Delivery Duty Paid - Deutsche Post and sender handle import duties instead of consignee - - - - - Closest Droppoint - - Delivery to the droppoint closest to the address of the recipient of the shipment. For this kind of delivery either the phone number and/or the e-mail address of the receiver is mandatory. - - For shipments using DHL Paket International it is recommended that you choose one of the three delivery types: - Economy - Premium - CDP - - Otherwise, the current default for the receiver country will be picked. - - - - - Standard delivery of international shipments - - For shipments using DHL Paket International it is recommended that you choose one of the three delivery types: - - Economy - Premium - CDP - - Otherwise, the current default for the receiver country will be picked. - - - - - Insure shipment with higher than standard amount. - - - - - - Service to ship bulky goods. - - - - - Service configuration for IdentCheck. - - - - - - Service configuration for ParcelOutletRouting. - Details can be an - email-address, if not set receiver email will be - used - - - - - - Delivery is signed for by the recipient instead of the DHL driver - - - - - - - - Indicates, if the option is on/off - - - - - - - - - - - - - - Indicates, if the option is on/off - - - - - - - - - - - - e-mail address for notification in case of - non-deliverability - - - - - - - - - - - - - - Indicates, if the option is on/off - - - - - - - - - - - - - Delivery Day: - Please enter the day (yyyy-mm-ddd) on which you would like the shipment to be delivered. - The requested day must be at least 2 and at most 6 working days after the shipment date. - - - - - - - - - - - - - - Indicates, if the option is on/off - - - - - - - - - - - - - e.g. garage, terrace - - - - - - - - - - - - - - Indicates, if the option is on/off - - - - - - - - - - - - - name, streetname streetnumber - - - - - - - - - - - - - - Indicates, if the option is on/off - - - - - - - - - - - - E-mail address for notification in case of - non-deliverability. - - - - - - - - - - - - - - Details of the Service (freetext) - - - - - - - - - - - - - - - Indicates, if the option is on/off - - - - - - - - - - - - Type of the Service (List of Types) - - - - - - - - - - - - - - Indicates, if the option is on/off - - - - - - - - - - - - - This service defines the handling of parcels that - cannot be delivered. There are two options: IMMEDIATE (Sending back - to sender), ABANDONMENT (Abandonment of parcel at the hands of - sender (free of charge). The definition of undeliverability is - country-specific and depends on the regulations of the postal - company of the receiving country. Usually, if parcels cannot be - delivered at first try, recipients receive a notification card and - can pick up their shipment at a local postal office. After the - storage period has expired, the shipment will be handled according - to your choosen endorsement option. Shipments that cannot be - delivered due to address problems or active refusal will be either - returned immediately or treated as abandoned. - - - - - - - - - - - - - - Indicates, if the option is on/off - - - - - - - - - - - - Individual details for handling (freetext) - - - - - - - - - - - - - - Indicates, if the option is on/off - - - - - - - - - - - - Number of Days to hold shipment before shipment - will be returend - to sender - - - - - - - - - - - - - - Indicates, if the option is on/off - - - - - - - - - - - - - Service VisualCheckOfAge is used to specify the - minimum age of the recipient. - The following types are allowed: "A16" - or "A18" - - - - - - - - - - - - - - Indicates, if the option is on/off - - - - - - - - - - - - - Timeframe of delivery, if the option is used: - ValidValues are - 10001200: 10:00 until 12:00; - 12001400: 12:00 until - 14:00 - 14001600: 14:00 until 16:00; - 16001800: 16:00 until 18:00 - 18002000: 18:00 until 20:00; - 19002100: 19:00 until 21:00 - - - - - - - - - - - - - - - - - - - - Indicates, if the option is on/off - - - - - - - - - - - - Day of Delivery, if the option is used: Date in - format - yyyy-mm-dd - - - - - - - - - - - - - - Indicates, if the option is on/off - - - - - - - - - - - - Please enter the Amount that should be insured - - - - - - - - - - - - - - Indicates, if the option is on/off - - - - - - - - - - - - Money amount to be collected. Mandatory if COD is - chosen. - - - - - - - - - - - - - - Indicates, if the option is on/off - - - - - - - - - - - - Mandatory if unfree is chosen. 0= cash / 1= invoice. - - - - - - - - - - - - Paid by third party, e.g. Receiver. DHL account - number mandatory if - PaymentType 1 = invoice is selected. Field - length must be less than or equal to - 10. - - - - - - - - - - - - - - - Indicates, if the option is on/off - - - - - - - - - - - - - - Indicates, if the option is on/off - - - - - - - - - - - - - - Indicates, if the option is on/off - - - - - - - - - - - - - - Indicates, if the option is on/off - - - - - - - - - - - - - - - - - - Surname (family name) of the person for ident - check. - - - - - - - - - - - - Given name (first name) of the person for - ident - check. - - - - - - - - - - - - date of birth (DOB) of the person for ident - check, - if the option is used: Date in format - yyyy-mm-dd - This attribute is only optional, if you set a minimum age - - - - - - - - - - - - minimum age of the person for ident check - ("A16" or "A18") - This attribute is only optional, if you specify the date of birth - - - - - - - - - - - - - - - - Indicates, if the option is on/off - - - - - - - - - - - - - Notification type - - - - - Email address of the recipient. Mandatory if - Notification is - set. - - - - - - - - - - - - You - may choose between a standard DHL e-mail text (no ID needed) or configure - an individual text within the section "Administration". - - - - - - - - - - - - The data of the export document for a shipment. - - - - - - Invoice number if applicable - - - - - - - - - - Export type - - - - - - - - - - - - - - - Description mandatory if ExportType is OTHER. - - - - - - - - - - - - - - Element provides terms of trades, incoterms codes: -
    -
  • DDP (Delivery Duty Paid)
  • -
  • DXV (Delivery Duty Paid (excl. VAT))
  • -
  • DAP (formerly DDU, Delivery At Place)
  • -
  • DDX (Delivery Duty Paid (excl. Duties, taxes and VAT)
  • -
  • CPT (Carriage Paid To (within EU only))
  • -
- are vaild values. -
-
-
- - - - - - - - - - - -
- - - PlaceOfCommital is a Locaton the shipment is handed - over to DHL - - - - - - - - - - - Postage costs billed in the invoice - - - - - - - - - - - - - CustomsCurrency refers to all stated goods / customs - values as well as postage costs. The information has to match - the currency of the commercial invoice or the invoice for customs - purposes. ISO 4217 alpha, p.E.: - EUR for Euro - USD for US Dollar - GBP for British Pound - - - - - - - - - - - The permit number. - - - - - - - - - - The attestation number. - - - - - - - - - - The customs reference is used by customs authorities - to identify - economics operators an/or other persons involved. With - the given reference, - granted authorizations and/or relevant - processes in customs - clearance an/or - taxation can be taken into - account. - - - - - - - - - - - The customs reference is used by customs authorities - to identify - economics operators an/or other persons involved. With - the given reference, - granted authorizations and/or relevant - processes in customs - clearance an/or - taxation can be taken into - account. - - - - - - - - - - - Sets an electronic export notification. - - - - - - One or more child elements for every position to be - defined within the Export Document. Each one contains description, - country code of origin, amount, net weight, customs value. - Multiple positions only possible for shipments using DHL Paket - International (V53WPAK). - Shipments using DHL Europaket (V54EPAK) - can only contain one - ExportDocPosition. - - - - - - - Description of the goods - - - - - - - - - - ISO-Code (ISO 3166-2) of country the goods were - manufactured - - - - - - - - - - - - Customs tariff number of the unit / position. - If the service PDDP is used, customsTariffNumber is required. - - - - - - - - - - - Quantity of the unit / position. Only positive - values (> 0) are allowed. - - - - - - - - - - - - Net weight of the unit / position. Only positive - values (> 0) are allowed.The total net weight must not exceed - the shipment weight - - - - - - - - - - - - - Customs value amount of the unit /position. Only - positive values (> 0) are allowed. - - - - - - - - - - - - - -
-
- - - Further address information -The following data fields from the cis_base-types are processed/mandatory/optional: -------------------------------------------------------------------------------------------------------- -Salutation (optional) : cis:NameType->Person->salutation -Company Name 1 (mandatory): cis:NameType->Company->name1 -Company Name 2 (optional) : cis:NameType->Company->name2 -Contact Name (mandatory): cis:CommunicationType->contactPerson -Street Name (mandatory): cis:NativeAddressType->streetName -Street Number (mandatory): cis:NativeAddressType->streetNumber -Add. Address (optional) : cis:NativeAddressType->careOfName -Postcode (mandatory): cis:NativeAddressType->zip -City Name (mandatory): cis:NativeAddressType->city -ISO Country Code (mandatory): cis:NativeAddressType->Origin->CountryType->countryISOType -Phone Number (mandatory): cis:CommunicationType->phone -Email Address (mandatory): cis:CommunicationType->email - - - - - - Mandatory if further address is to be specified. - - - - - - - Determines whether further address is one of the - following types. - - - - - - Extra data for name extension. - - - - - Contains address data. - - - - - Info about communication. - - - - - - - - - - The status of the getLabel operation and the url for - requesting the label - (if available). - - - - - - Success status of processing retrieval of particular - shipment - label. - - - - - - For successful and unsuccessful operations, the - requested - ShipmentNumber of the label to be retrieved is returned. - This is no matter - if it the operation could be performed or not. - - - - - - - If label output format was requested as 'URL' via - LabelResponseType, this element will be returned. It contains the - URL to - access the PDF label. This is default output format if not - specified - other by client in labelResponseType. Depending on - setting in customer - profile all labels or just the shipmentlabel. - - - - - - Label as base64 encoded pdf data, depending on - setting in - customer profile all labels or just the shipmentlabel. - - - - - - - - If label output format was requested as 'URL' via - LabelResponseType, this element will be returned. It contains the - URL to - access the PDF label. This is default output format if not - specified - other by client in labelResponseType. Depending on - setting in customer - profile all labels or just the - returnshipmentlabel. - - - - - - Label as base64 encoded pdf data, depending on - setting in - customer profile all labels or just the - returnshipmentlabel. - - - - - - - - If label output format was requested as 'URL' via - LabelResponseType, this element will be returned. It contains the - URL to - access the PDF label. This is default output format if not - specified - other by client in labelResponseType. Depending on - setting in customer - profile all labels or just the export - documents. - - - - - - Label as base64 encoded pdf data, depending on - setting in - customer profile all labels or just the export - documents. - - - - - - - - If label output format was requested as 'URL' via - LabelResponseType, this element will be returned. It contains the - URL to - access the PDF label. This is default output format if not - specified - other by client in labelResponseType. Depending on - setting in customer - profile all labels or just the cod related - documents. - - - - - - Label as base64 encoded pdf data, depending on - setting in - customer profile all labels or just the cod related - documents. - - - - - - - - - The status of the getLabel operation and the url for - requesting the label - (if available) - - - - - - ShipmentNumber - - - - - Status of the request (value of zero means, the - request was - processed without error; value greater than zero - indicates that an error - occurred). - - - - - - - Export doc as base64 encoded pdf data - - - - - - URL for downloading the Export doc as pdf - - - - - - - - - The status of a doManifest operation. - - - - - ShipmentNumber - - - - - Status of the request (value of zero means, the - request was - processed without error; value greater than zero - indicates that an error - occurred). - - - - - - - - The status of a deleteShipment operation. - - - - - - For successful and unsuccessful operations, the - requested - ShipmentNumber to be deleted is returned. This is no - matter if the operation - could be performed or not. - - - - - - Success status of processing the deletion of - particular - shipment. - - - - - - - - The data for a pickup order. - - - - - - The version of the webservice implementation for - which the - requesting client is developed. - - - - - - Contains information in further leaf elements about - product, - DHL account, pickup date and time, pickup location, - amount of pieces, - pallets, and shipments, moreover weight and - volume weight, size. - - - - - - The pickup address. - - - - - The address and contact information of the - orderer. - - - - - - - - - The data for a pickup order. - - - - - - The version of the webservice implementation. - - - - - - Success status after processing the request. - - - - - - The confirmation number of the successfully created - pickup - order. It can later be used for cancelling a pickup order. - Confirmation - number is not available for each pickup type. - - - - - - If available, a shipment number is returned. - - - - - - - - - The details of a pickup order. - - - - - Pickup date in format yyyy-mm-dd. Mandatory if - pickup is booked - along with shipment order. - - - - - - - - - - - - Earliest time for pickup. Format is hh:mm. - - - - - - - - - - - - Lates time for pickup. Format is hh:mm. - - - - - - - - - - - - Remarks to be considered when pickup is done. - - - - - - Area to further detail pickup location beyond - address. - - - - - - - - -The pickup address. In the PickupType the following data fields are processed/mandatory/optional: ----------------------------------------------------------------------------------------------- -Company Name 1 (mandatory): cis:NameType->Company->name1 -Contact Name (mandatory): cis:CommunicationType->contactPerson -Street Name (mandatory): cis:NativeAddressType->streetName -Street Number (mandatory): cis:NativeAddressType->streetNumber -Add. Address (optional) : cis:NativeAddressType->careOfName -Postcode (mandatory): cis:NativeAddressType->zip -City Name (mandatory): cis:NativeAddressType->city -ISO Country Code (mandatory): cis:NativeAddressType->Origin->CountryType->countryISOType -Phone Number (mandatory): cis:CommunicationType->phone -Email Address (mandatory): cis:CommunicationType->email - - - - - - Determines whether pickup address is one of the - following - types. - - - - - - Data fields for pickup address. - - - - - Info about communication. - - - - - - - -Information about the pickup orderer. In the PickupOrdererType the following data fields are processed/mandatory/optional: ----------------------------------------------------------------------------------------------- -Salutation (optional) : cis:NameType->Person->salutation -Company Name 1 (mandatory): cis:NameType->Company->name1 -Company Name 2 (optional) : cis:NameType->Company->name2 -Contact Name (mandatory): cis:CommunicationType->contactPerson -Street Name (mandatory): cis:NativeAddressType->streetName -Street Number (mandatory): cis:NativeAddressType->streetNumber -Add. Address (optional) : cis:NativeAddressType->careOfName -Postcode (mandatory): cis:NativeAddressType->zip -City Name (mandatory): cis:NativeAddressType->city -ISO Country Code (mandatory): cis:NativeAddressType->Origin->CountryType->countryISOType -Phone Number (mandatory): cis:CommunicationType->phone -Email Address (mandatory): cis:CommunicationType->email - - - - - - Determines whether orderer contact address is of the - following - type. - - - - - - Optional name appendix. - - - - - Data fields for orderer's address. - - - - - Info about communication. - - - - - - - The data of the pickup order. - - - - - Depending on whether a DD pickup or TD pickup is - invoked, this - field contains either the 10-digit EKP number (DD - pickups) or the 9-digit - accountNumberExpress (TD pickups). - - - - - - - - - - - Pickup date in format yyyy-mm-dd. - - - - - - - - - - - Earliest time for pickup. Format is hh:mm. - - - - - - - - - - - - Lates time for pickup. Format is hh:mm. - - - - - - - - - - - - Remarks to be considered when pickup is done. - Mandatory if 'TDI' - is selected. - - - - - - Area to further detail pickup location beyond - address. Mandatory - for TDN and TDI, optional for DDN and DDI. - - - - - - Number of pieces to be picked up. - - - - - - - - - - Number of pallets to be picked up. - - - - - - - - - - The weight of all shipment's pieces in kg. Field - length must be - less than or equal to 22. - - - - - - - - - - - - - Number of shipments to be picked up. - - - - - - - - - - The total volumetric weight of all pieces in kg. - Calculated by - piece = length x width x height in centimetres / - 5000. Field length must be - less than or equal to 22. - - - - - - - - - - - - - The maximum length in cm. - - - - - - - - - - - - The maximum width in cm. - - - - - - - - - - - - The maximum height in cm. - - - - - - - - - - - - - - The data for cancelling a pickup order. - - - - - - - The version of the webservice implementation for - which the - requesting client is developed. - - - - - - The confirmation number of the pickup order which - should be - cancelled. Use value from pickup response attribute - 'ConfirmationNumber' - to cancel respective pickup order. Note: only - one pickup can be deleted - at a time. - - - - - - - - - The status of the cancel pickup operation. - - - - - - - The version of the webservice implementation. - - - - - - Success status after processing the request. - - - - - - - - - Identity data (used e.g. for ident services) - - - - - - - If driving license shall be used for verifying - identity. - - - - - - - ID number of the driving license. Mandatory if - DrivingLicense is chosen as identity - instrument. - - - - - - Name of certifying authority of the driving - license. Mandatory if DrivingLicense is chosen as identity - instrument. - - - - - - - - - If identity card shall be used for verifying - identity. - - - - - - - Number of the identity card. Mandatory if - IdentityCard is chosen as identity instrument. Field length - must be less than or equal to 20. - - - - - - Name of certifying card authority. Mandatory if - IdentityCard is chosen as identity instrument. Field length - must be less than or equal to 30. - - - - - - - - - If a bank card shall be used for verifying - identity. - - - - - - - Type of bank card. Mandatory if BankCard is - chosen as identity instrument. - - - - - - Number of bank card. Mandatory if BankCard is - chosen as identity instrument. - - - - - - Name of bank. Mandatory if BankCard is chosen as - identity instrument. - - - - - - Bank code. Mandatory if BankCard is chosen as - identity instrument. - - - - - - - - - - - - Type of Packstation (Receiver is in Germany) - - - - - includes - - - - Number of the packstation - - - - - Post Nummer of the receiver - - - - - Postcode - - - - - - - - - - - - City name. - - - - - - - - - - - - Type of Postfiliale (Receiver is in Germany) - - - - - includes - - - - Number of the postfiliale - - - - - Post Nummer of the receiver - - - - - Postcode - - - - - - - - - - - - City name. - - - - - - - - - - - - Type of ParcelShop (Receiver is in Europe) - - - - - includes - - - - Number of the ParcelShop - - - - - Name of street of the ParcelShop - - - - - - - - - - - House number of the ParcelShop - - - - - - - - - - Postcode - - - - - - - - - - - - City name. - - - - - - - - - - - - The status of the operation and the shipment - identifier (if - available). - - - - - - - The version of the webservice implementation. - - - - - - Success status after processing the overall - request. - - - - - - The operation's success status for every single - ShipmentOrder - will be returned by one CreationState element. It is - identifiable via - SequenceNumber. - - - - - - - - - The version of the webservice implementation for - which the requesting - client is developed. - - - - - - includes - - - - The number of the major release. E.g. the '3' in - version - "3.5.". - - - - - - - - - - - The number of the minor release. E.g. the '5' in version "3.5.". Please note, that if you wish to use the old error handling, you need use Version 3.2 or below - - - - - - - - - - - Optional build id to be addressed. - - - - - - - - - - - -
\ No newline at end of file diff --git a/src/modules/mo/mo_dhl/Api/GKV/geschaeftskundenversand-api-3.5.0-schema-cis_base.xsd b/src/modules/mo/mo_dhl/Api/GKV/geschaeftskundenversand-api-3.5.0-schema-cis_base.xsd deleted file mode 100644 index af9ffa06..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/geschaeftskundenversand-api-3.5.0-schema-cis_base.xsd +++ /dev/null @@ -1,1126 +0,0 @@ - - - - - - - - Country specific ISO code. - - - - - - - - - First 10 digit number extract from the 14 digit DHL Account Number. E.g. if DHL Account Number is "5000000008 72 01" then EKP is equal to 5000000008. - - - - - - - - - - - Field has the partner id. I.e. the last 2 digit number extract from the 14 digit DHL Account Number. E.g. if DHL Account Number is "5000000008 72 01" then Attendance is 01. - - - - - - - - - - - Procedure ID (part of account number). - - - - - - - - - - - DHL account number (14 digits). - - - - - - - - - - - Express AccountNumber (9 digits). - - - - - - - - - - - Ident code number. - - - - - - - - - - - - License plate number. - - - - - - - - - - Airway bill number. - - - - - - - - - - - route code (default). - - - - - - - - - - - - - The following barcode types are: - 1. GS1 Barcode - 2. ASC MH10 Barcode - 3. 2/5 Interleaved - 4. Code 128 ( UPU ) - - - - - - - - - - - - City name. - - - - - - - - - - Province name. - - - - - - - - - - Code for street name (part of routecode). - - - - - - - - - - - Code for street number (part of routecode). - - - - - - - - - - - Country. - - - - - Authentification. - - - - - The version of the webservice implementation for which the -requesting client is developed. - - - - - includes - - - - The number of the major release. E.g. the '3' in version "3.5.". - - - - - - - - - - The number of the minor release. E.g. the '3' in version "3.5.". - - - - - - - - - - Optional build id to be addressed. - - - - - - - - - - - - - Type of authentification - - - - includes - - - - username for the business customer portal (only lower case) - - - - - - - - password for the business customer portal - - - - - - - - - - - - Type of native address - - - - includes - - - - The name of the street. Optionally the house number can be passed in this field too. - In this case the field "streetNumber" must not be present. - - - - - - - - - - The house number. This field is only optional when the house number is passed with - the field streetName. - - - - - - - - - - Address addon, is only printed in the international area (V53WPAK) - - - - - - - - - - DispatchingInformation, is only printed in the international area (V53WPAK) - - - - - - - - - - - - - - - - Type of native address - - - - includes - - - - The name of the street. Optionally the house number can be passed in this field too. - In this case the field "streetNumber" must not be present. - - - - - - - - - - The house number. This field is only optional when the house number is passed with - the field streetName. - - - - - - - - - - - - Country. - - - - - - - - - - - The name of the street. Optionally the house number can be passed in this field too. - In this case the field "streetNumber" must not be present. - - - - - - - - - - The house number. This field is only optional when the house number is passed with - the field streetName. - - - - - - - - - - Address addon, is only printed in the international area (V53WPAK) - - - - - - - - - - DispatchingInformation, is only printed in the international area (V53WPAK) - - - - - - - - - - - - - Country. - - - - - - - Type of pickup address - - - - includes - - - - can be - - - - Default address - - - - - Packstation address - - - - - - - - - - Type of delivery address - - - - includes - - - - can be - - - - Default address - - - - - Postoffice address - - - - - Packstation address - - - - - - - - - - Type of bank information - - - - includes - - - - Name of bank account owner. - - - - - - - - - - Name of bank. - - - - - - - - - - IBAN code of bank account. - - - - - - - - - - Purpose of bank information. - - - - - - - - - - Purpose of bank information. - - - - - - - - - - Bank-Information-Code (BankCCL) of bank account. - - - - - - - - - - Accountreferece to customer profile - - - - - - - - - - - - Type of name - - - - includes - - - - - - - - - Type of name - - - - includes - - - - Name of receiver (first part) - - - - - - - - - - - - Name of receiver (first part) - - - - - - - - - - Name of company (second part). - - - - - - - - - - Name of company (third part). - - - - - - - - - - Type of communication. - - - - includes - - - - Phone number. - - If you are using delivery type CDP, the phone number and/or e-mail address are mandatory - - - - - - - - - - Emailaddress. - - If you are using delivery type CDP, the phone number and/or e-mail address are mandatory - - - - - - - - - - First name and last name of contact person. - - - - - - - - - - - - Type of contact. - - - - includes - - - - Contact communication information. - - - - - Contact address. - - - - - Contact name. - - - - - - - Type of packstation. - - - - includes - - - - Post Nummer of the receiver, if not set receiver e-mail and/or mobilephone number needs to be set. When sending to a packstation with "DHL Paket" (V01PAK), the postnumber must always be entered. - - - - - - - - - - - Number of the Packstation. - - - - - - - - - - - - - - - - - Type of Postfiliale - - - - includes - - - - Number of the postfiliale - - - - - - - - - - - Post Nummer of the receiver - - - - - - - - - - - - - - - - Type of Postfiliale - - - - includes - - - - Number of the postfiliale - - - - - - - - - - - Post Nummer of the receiver or receiver e-mail-adress. - - - - - - - - - - - - - Country. - - - - - - - Type of ParcelShop (Receiver is in Europe) - - - - includes - - - - Number of the ParcelShop - - - - - - - - - - - Name of street of the ParcelShop - - - - - - - - - - House number of the ParcelShop - - - - - - - - - - - - - - - Type of customer - - - - includes - - - - Name of customer. - - - - - VAT id. - - - - - - Address of customer - - - - - Contact information - - - - - Bank information - - - - - Additional notes - - - - - - - Type of error - - - - includes - - - - Priority (e.g. error, warnung, .....) - - - - - Code - - - - - Occurence - - - - - Short description - - - - - Detailed description - - - - - Suggested solution - - - - - Name of application - - - - - Module name - - - - - - - Type of zip code - - - - - - - - Type of country - - - - includes - - - - Name of country. - - - - - - - - - - Country's ISO-Code (ISO-2-Alpha). - - - - - Name of state. - - - - - - - - - - - - Type of shipment number - - - - can be - - - - - - - part of webservice response - - - - - includes - - - - statuscode value. - - - - - - - - - - description corresponding to the statuscode - - - - - - - - - - - - - DHL product Key. - - - - - - - - - - - Package dimensions (length, width, height) - - - - - includes - - - - length of package - - - - - width of package - - - - - height of package - - - - - unit for all measures - - - - - - - - - - - - - - - Time Frame in which actions should affect - - - - - includes - - - - begin of timeframe - - - - - end of timeframe - - - - - - - - Can contain any DHL shipmentnumber. - - - - - - - - diff --git a/src/modules/mo/mo_dhl/Api/GKV/geschaeftskundenversand-api-3.5.0.wsdl b/src/modules/mo/mo_dhl/Api/GKV/geschaeftskundenversand-api-3.5.0.wsdl deleted file mode 100644 index 79cd4805..00000000 --- a/src/modules/mo/mo_dhl/Api/GKV/geschaeftskundenversand-api-3.5.0.wsdl +++ /dev/null @@ -1,340 +0,0 @@ - - - - - - - - - - The authentication data. - - - - The shipmentdata for creating a shipment. - - - - The status of the createShipment operation and the identifier for the - shipment. - - - - The shipmentdata for validating a shipment. - - - - The status of the validateShipment operation and the identifier for the - shipment. - - - - The identifier for the shipment which should be - deleted. - - - - The status of the deletion operation. - - - - The identifier for the shipment which should be - manifested. - - - - The status of the manifest operation. - - - - The identifier for the DD shipment for which the label url is - requested. - - - - The status of the operation and the label url (if - available). - - - - The version of webservice implementation. - - - - The version of webservice implementation. - - - - The identifier for the DD shipment for which the label url is - requested. - - - - The status of the operation and the label url (if - available). - - - - Request a manifest of the given date / date range. - - - - The status of the operation and the manifest url (if - available). - - - - Request a manifest of the given date / date range. - - - - The status of the operation and the manifest url (if - available). - - - - The status of the operation and the manifest url (if - available). - - - - - Creates shipments. - - The shipment data. - - - The status of the createShipment operation and the identifier for the - shipment. - - - - Creates shipments. - - The shipment data. - - - The status of the validateShipment operation and the identifier for the - shipment. - - - - Deletes the requested shipments. - - The identifier for the shipment which should be - deleted. - - - The status of the deletion operation. - - - - Manifest the requested DD shipments. - - The identifier for the shipment which should be - manifested. - - - The status of the manifest operation. - - - - Returns the request-url for getting a label. - - The identifier for the shipment for which the label url is - requested. - - - The status of the operation and the label url (if - available). - - - - Returns the actual version of the implementation of the whole ISService - webservice. - - - The version of webservice implementation. - - - - Returns the request-url for getting a export - document. - - The identifier for the shipment for which the export document url is - requested. - - - The status of the operation and the export document url (if - available). - - - - Request the manifest. - - The request data. - - - The status of the getManifest operation and the manifest - url. - - - - Updates a shipment order. - - The shipment data. - - - The status of the updateShipment operation and the identifier for the - shipment. - - - - - - - Creates shipments. - - - The authentication data and the shipment data. - - - - - The status of the operation and the shipment - identifier. - - - - - Validates shipments. - - - The authentication data and the shipment data. - - - - - The status of the operation and the shipment - identifier. - - - - - Deletes the requested shipments. - - - The authentication data and the shipment - identifier. - - - - - The status of the operation. - - - - - Manifest the requested shipments. - - - The authentication data and the shipment - identifier. - - - - - The status of the operation. - - - - - Returns the request-url for getting a label. - - - The authentication data and the shipment - identifier. - - - - - The status of the operation and the url for requesting the - label. - - - - - Returns the actual version of the implementation of the whole ISService - webservice. - - - - - - The version of the implementation. - - - - - Returns the request-url for getting a export - document. - - - The authentication data and the shipment - identifier. - - - - - The status of the operation and the url for requesting the export - document. - - - - - Requests the manifest. - - - The authentication data and the shipment data. - - - - - The status of the operation and the manifest url. - - - - - Updates a shipment order. - - - The authentication data and the shipment data. - - - - - The status of the operation - - - - - - - - - - \ No newline at end of file diff --git a/src/modules/mo/mo_dhl/Application/Controller/Admin/ModuleConfiguration.php b/src/modules/mo/mo_dhl/Application/Controller/Admin/ModuleConfiguration.php index a8c9c04a..d8fbbc3f 100644 --- a/src/modules/mo/mo_dhl/Application/Controller/Admin/ModuleConfiguration.php +++ b/src/modules/mo/mo_dhl/Application/Controller/Admin/ModuleConfiguration.php @@ -9,26 +9,17 @@ */ use Mediaopt\DHL\Adapter\DHLAdapter; -use Mediaopt\DHL\Adapter\ParcelShippingConverter; -use Mediaopt\DHL\Api\GKV; -use Mediaopt\DHL\Api\GKV\CountryType; -use Mediaopt\DHL\Api\GKV\NameType; -use Mediaopt\DHL\Api\GKV\CommunicationType; -use Mediaopt\DHL\Api\GKV\NativeAddressTypeNew; -use Mediaopt\DHL\Api\GKV\ReceiverNativeAddressType; -use Mediaopt\DHL\Api\GKV\ReceiverType; -use Mediaopt\DHL\Api\GKV\Shipment; -use Mediaopt\DHL\Api\GKV\ShipmentDetailsTypeType; -use Mediaopt\DHL\Api\GKV\ShipmentItemType; -use Mediaopt\DHL\Api\GKV\ShipperType; -use Mediaopt\DHL\Api\GKV\ValidateShipmentOrderRequest; -use Mediaopt\DHL\Api\GKV\ValidateShipmentOrderType; -use Mediaopt\DHL\Api\GKV\Version; +use Mediaopt\DHL\Adapter\ParcelShippingRequestBuilder; use Mediaopt\DHL\Api\Internetmarke; use Mediaopt\DHL\Api\MyAccount\Model\Detail; use Mediaopt\DHL\Api\ParcelShipping\Client; +use Mediaopt\DHL\Api\ParcelShipping\Model\ShipmentDetails; +use Mediaopt\DHL\Api\ParcelShipping\Model\ShipmentOrderRequest; +use Mediaopt\DHL\Api\ParcelShipping\Model\Shipper; +use Mediaopt\DHL\Api\ParcelShipping\Model\Weight; use Mediaopt\DHL\Application\Model\DeliverySetList; use Mediaopt\DHL\Controller\Admin\ErrorDisplayTrait; +use Mediaopt\DHL\Export\CsvExporter; use Mediaopt\DHL\Merchant\Ekp; use Mediaopt\DHL\Shipment\BillingNumber; use Mediaopt\DHL\Shipment\Participation; @@ -131,6 +122,11 @@ public function saveConfVars() } } + protected function getEkp(): string + { + return Registry::getConfig()->getConfigParam('mo_dhl__merchant_ekp'); + } + /** * Converts Multiline text to simple array. Returns this array. * @@ -186,16 +182,14 @@ protected function moReviewWeightSettings() */ protected function moReviewEkp() { - $ekpVariable = 'mo_dhl__merchant_ekp'; - $ekp = Registry::getConfig()->getConfigParam($ekpVariable); - if (empty($ekp)) { + if (!$ekp = $this->getEkp()) { return; } try { Ekp::build($ekp); } catch (\InvalidArgumentException $exception) { - Registry::getConfig()->saveShopConfVar('str', $ekpVariable, '', '', 'module:mo_dhl'); + Registry::getConfig()->saveShopConfVar('str', 'mo_dhl__merchant_ekp', '', '', 'module:mo_dhl'); Registry::get(UtilsView::class)->addErrorToDisplay('MO_DHL__EKP_ERROR'); } } @@ -220,10 +214,9 @@ public function moSaveAndCheckLogin() Registry::get(UtilsView::class)->addErrorToDisplay('MO_DHL__NO_DELIVERYSET'); return; } - $gkv = $adapter->buildGKV(); $parcelShipping = $adapter->buildParcelShipping(); foreach ($deliveries as $delivery) { - $this->checkShippingAPIs($gkv, $parcelShipping, $delivery); + $this->checkShippingAPIs($parcelShipping, $delivery); } } catch (\Exception $e) { $this->displayErrors($e); @@ -378,12 +371,11 @@ private function checkInternetmarke(Internetmarke $internetmarke) } /** - * @param GKV $gkv * @param Client $parcelShipping * @param DeliverySet $deliveryset * @throws \Exception */ - private function checkShippingAPIs(GKV $gkv, Client $parcelShipping, $deliveryset) + private function checkShippingAPIs(Client $parcelShipping, $deliveryset) { $lang = Registry::getLang(); Registry::get(UtilsView::class)->addErrorToDisplay($lang->translateString('MO_DHL__CHECKING_DELIVERYSET') . $deliveryset->oxdeliveryset__oxtitle->value); @@ -395,44 +387,21 @@ private function checkShippingAPIs(GKV $gkv, Client $parcelShipping, $deliveryse if ($process->usesInternetMarke()) { return; } - $shipment = $this->createTestShipment($gkv, $deliveryset); - $shipmentOrder = new ValidateShipmentOrderType('123456', $shipment); - $request = new ValidateShipmentOrderRequest(new Version(3, 4, 0), $shipmentOrder); - - if (Registry::getConfig()->getConfigParam('mo_dhl__account_rest_api')) { - $converter = Registry::get(ParcelShippingConverter::class); - [$query, $request] = $converter->convertValidateShipmentOrderRequest($request); - $response = $parcelShipping->createOrders($request, $query, [], Client::FETCH_RESPONSE); - if ($response->getStatusCode() < 200 || $response->getStatusCode() >= 300) { - $payload = json_decode($response->getBody()->getContents(), true); - if ($payload['status'] == 401) { - Registry::get(UtilsView::class)->addErrorToDisplay('MO_DHL__LOGIN_FAILED'); - return; - } - foreach ($converter->extractErrorsFromResponsePayload($payload) as $error) { - Registry::get(UtilsView::class)->addErrorToDisplay($error); - } + $shipmentOrderRequest = new ShipmentOrderRequest(); + $shipmentOrderRequest->setShipments([$this->createTestShipment($deliveryset)]); + $shipmentOrderRequest->setProfile(ParcelShippingRequestBuilder::STANDARD_GRUPPENPROFIL); + + $response = $parcelShipping->createOrders($shipmentOrderRequest, ['validate' => true], [], Client::FETCH_RESPONSE); + if ($response->getStatusCode() < 200 || $response->getStatusCode() >= 300) { + $payload = json_decode($response->getBody()->getContents(), true); + if ($payload['status'] == 401) { + Registry::get(UtilsView::class)->addErrorToDisplay('MO_DHL__LOGIN_FAILED'); return; } - } else { - $response = $gkv->validateShipment($request); - if ($response->getStatus()->getStatusCode() !== 0) { - switch ($response->getStatus()->getStatusText()) { - case 'login failed': - Registry::get(UtilsView::class)->addErrorToDisplay('MO_DHL__LOGIN_FAILED'); - return; - default: - Registry::get(UtilsView::class)->addErrorToDisplay($response->getStatus()->getStatusText()); - if (!isset($response->getValidationState()[0])) { - return; - } - $errors = array_unique($response->getValidationState()[0]->getStatus()->getStatusMessage()); - foreach ($errors as $error) { - Registry::get(UtilsView::class)->addErrorToDisplay($error); - } - return; - } + foreach ($this->extractErrorsFromResponsePayload($payload) as $error) { + Registry::get(UtilsView::class)->addErrorToDisplay($error); } + return; } } catch (\RuntimeException $e) { $e = $e->getPrevious() ?: $e; @@ -443,26 +412,43 @@ private function checkShippingAPIs(GKV $gkv, Client $parcelShipping, $deliveryse } /** - * @param GKV $gkv * @param DeliverySet $deliveryset - * @return Shipment + * @return \Mediaopt\DHL\Api\ParcelShipping\Model\Shipment */ - protected function createTestShipment(GKV $gkv, $deliveryset): Shipment + protected function createTestShipment($deliveryset): \Mediaopt\DHL\Api\ParcelShipping\Model\Shipment { $process = Process::build($deliveryset->oxdeliveryset__mo_dhl_process->value); - $receiverCountryCode = $process->isInternational() ? 'FR' : 'DE'; - $ShipmentDetails = new ShipmentDetailsTypeType($process->getServiceIdentifier(), new BillingNumber(Ekp::build($gkv->getSoapCredentials()->getEkp()), $process, Participation::build($deliveryset->oxdeliveryset__mo_dhl_participation->value)), (new \DateTime())->format('Y-m-d'), new ShipmentItemType(0.5)); - $Receiver = (new ReceiverType('a b'))->setAddress(new ReceiverNativeAddressType(null, null, 'Elbestr.', '28/29', '12045', 'Berlin', null, new CountryType($receiverCountryCode)))->setCommunication($this->createTestCommunication()); - $Shipper = (new ShipperType(new NameType('a b', null, null), new NativeAddressTypeNew('Elbestr.', '28', '12045', 'Berlin', new CountryType('DE')))); - $shipment = new Shipment($ShipmentDetails, $Shipper, $Receiver); + $receiverCountryCode = $process->isInternational() ? 'FRA' : 'DEU'; + + $shipment = new \Mediaopt\DHL\Api\ParcelShipping\Model\Shipment(); + $shipper = (new Shipper()) + ->setName1('a b') + ->setCity('Berlin') + ->setPostalCode('12045') + ->setAddressStreet('Elbestr.') + ->setAddressHouse('28/29') + ->setCountry('DEU'); + $shipment->setShipper($shipper); + $shipment->setConsignee([ + 'name1' => 'a b', + 'contactName' => 'a b', + 'city' => 'Berlin', + 'postalCode' => '12045', + 'addressStreet' => 'Elbestr.', + 'addressHouse' => '28/29', + 'country' => $receiverCountryCode, + ]); + $shipmentDetails = new ShipmentDetails(); + $weight = new Weight(); + $weight->setUom('kg'); + $weight->setValue('0.5'); + $shipmentDetails->setWeight($weight); + $shipment->setDetails($shipmentDetails); + $shipment->setCreationSoftware(CsvExporter::CREATOR_TAG); + $shipment->setBillingNumber(new BillingNumber(Ekp::build($this->getEkp()), $process, Participation::build($deliveryset->oxdeliveryset__mo_dhl_participation->value))); + $shipment->setProduct($process->getServiceIdentifier()); + $shipment->setRefNo('12345678'); + $shipment->setShipDate((new \DateTime())); return $shipment; } - - /** - * @return CommunicationType - */ - protected function createTestCommunication() - { - return (new CommunicationType())->setContactPerson('a b'); - } } diff --git a/src/modules/mo/mo_dhl/Application/views/admin/de/module_lang.php b/src/modules/mo/mo_dhl/Application/views/admin/de/module_lang.php index 7105a469..fce2ea46 100644 --- a/src/modules/mo/mo_dhl/Application/views/admin/de/module_lang.php +++ b/src/modules/mo/mo_dhl/Application/views/admin/de/module_lang.php @@ -64,14 +64,16 @@ 'MO_DHL__CUSTOM_LABEL_PROCESS' => 'Verfahrensnummer', 'MO_DHL__CUSTOM_LABEL_RECEIVER' => 'Empfänger', 'MO_DHL__CUSTOM_LABEL_RETURN_RECEIVER' => 'Retoure - Empfängerdaten', + 'MO_DHL__CUSTOM_LABEL_NAME1' => 'Name', 'MO_DHL__CUSTOM_LABEL_NAME' => 'Name', - 'MO_DHL__CUSTOM_LABEL_MAIL' => 'E-Mail', + 'MO_DHL__CUSTOM_LABEL_CONTACTNAME' => 'Name', + 'MO_DHL__CUSTOM_LABEL_EMAIL' => 'E-Mail', 'MO_DHL__CUSTOM_LABEL_PHONE' => 'Telefonnummer', - 'MO_DHL__CUSTOM_LABEL_COMPANY' => 'Firma', - 'MO_DHL__CUSTOM_LABEL_ADRESS_ADDITION' => 'Adresszusatz', - 'MO_DHL__CUSTOM_LABEL_STREETNAME' => 'Straßenname', - 'MO_DHL__CUSTOM_LABEL_STREETNUMBER' => 'Hausnummer', - 'MO_DHL__CUSTOM_LABEL_ZIP' => 'Postleitzahl', + 'MO_DHL__CUSTOM_LABEL_NAME2' => 'Firma', + 'MO_DHL__CUSTOM_LABEL_NAME3' => 'Adresszusatz', + 'MO_DHL__CUSTOM_LABEL_ADDRESSSTREET' => 'Straßenname', + 'MO_DHL__CUSTOM_LABEL_ADDRESSHOUSE' => 'Hausnummer', + 'MO_DHL__CUSTOM_LABEL_POSTALCODE' => 'Postleitzahl', 'MO_DHL__CUSTOM_LABEL_CITY' => 'Stadt', 'MO_DHL__CUSTOM_LABEL_STATE' => 'Bundesstaat', 'MO_DHL__CUSTOM_LABEL_COUNTRY' => 'Land', @@ -106,14 +108,14 @@ 'HELP_MO_DHL__PREMIUM' => 'Ein Paket mit Service Premium wird bevorzugt und immer auf dem schnellsten Weg transportiert. Ihr Paket nimmt immer den nächstmöglichen Flug oder LKW in Richtung Zieldestination und wird auch im Zielland prioritär behandelt. So erreicht es deutlich schneller seinen Bestimmungsort.', 'MO_DHL__NAMED_PERSON_ONLY' => 'Persönliche Übergabe', 'MO_DHL__SIGNED_FOR_BY_RECIPIENT' => 'Empfängerunterschrift', - 'MO_DHL__PDDP' => 'PDDP (Postal Delivery Duty Paid)', - 'HELP_MO_DHL__PDDP' => 'DHL führt mit Postal Delivered Duty Paid (Postal DDP) einen Service ein, der es ermöglicht, dass der Versender alle Einfuhrabgaben für den Empfänger bezahlt.', + 'MO_DHL__PDDP' => 'PDDP (Postal Delivery Duty Paid)', + 'HELP_MO_DHL__PDDP' => 'DHL führt mit Postal Delivered Duty Paid (Postal DDP) einen Service ein, der es ermöglicht, dass der Versender alle Einfuhrabgaben für den Empfänger bezahlt.', 'MO_DHL__ZOLLTARIF' => 'Zolltarifnummer', 'HELP_MO_DHL__ZOLLTARIF' => 'Optionaler Parameter bei der Erzeugung von Exportdokumenten für DHL Paket International. International standardisiertes System von Namen und Nummern zur Klassifizierung gehandelter Produkte.', 'MO_DHL__ENDORSEMENT' => 'Vorausverfügung bei Unzustellbarkeit', 'HELP_MO_DHL__ENDORSEMENT' => 'Dieser Service gibt an, was mit einem Paket passieren soll, wenn es nicht zugestellt werden kann. Dieser Service ist nur für Paket International relevant.', - 'MO_DHL__ENDORSEMENT_IMMEDIATE' => 'Rücksendung an den Absender', + 'MO_DHL__ENDORSEMENT_RETURN' => 'Rücksendung an den Absender', 'MO_DHL__ENDORSEMENT_ABANDONMENT' => 'Preisgabe des Pakets (Verzicht auf die Rücksendung)', 'MO_DHL__LABEL_CREATED_WITH_WEAK_VALIDATION_ERROR' => 'Bei der Anfrage ist ein schwacher Fehler aufgetreten. Die Anfrage konnte trotzdem erfolgreich umgesetzt werden.', diff --git a/src/modules/mo/mo_dhl/Application/views/admin/en/module_lang.php b/src/modules/mo/mo_dhl/Application/views/admin/en/module_lang.php index 8640dd8e..1d1e5343 100644 --- a/src/modules/mo/mo_dhl/Application/views/admin/en/module_lang.php +++ b/src/modules/mo/mo_dhl/Application/views/admin/en/module_lang.php @@ -113,7 +113,7 @@ 'MO_DHL__ENDORSEMENT' => 'Endorsement', 'HELP_MO_DHL__ENDORSEMENT' => 'This service defines the handling of parcels that cannot be delivered. This service is only relevant for DHL Paket International.', - 'MO_DHL__ENDORSEMENT_IMMEDIATE' => 'Sending back to sender', + 'MO_DHL__ENDORSEMENT_RETURN' => 'Sending back to sender', 'MO_DHL__ENDORSEMENT_ABANDONMENT' => 'Abandonment of parcel at the hands of sender (free of charge)', 'MO_DHL__LABEL_CREATED_WITH_WEAK_VALIDATION_ERROR' => 'While processing the request a weak error occured. The request was still processed successfully.', diff --git a/src/modules/mo/mo_dhl/Cli/CreateLabels.php b/src/modules/mo/mo_dhl/Cli/CreateLabels.php index 4e4460ff..d2cb574c 100644 --- a/src/modules/mo/mo_dhl/Cli/CreateLabels.php +++ b/src/modules/mo/mo_dhl/Cli/CreateLabels.php @@ -9,11 +9,10 @@ use Mediaopt\DHL\Adapter\DHLAdapter; -use Mediaopt\DHL\Adapter\GKVCreateShipmentOrderRequestBuilder; -use Mediaopt\DHL\Adapter\ParcelShippingConverter; -use Mediaopt\DHL\Api\GKV\CreateShipmentOrderRequest; +use Mediaopt\DHL\Adapter\ParcelShippingRequestBuilder; use Mediaopt\DHL\Api\ParcelShipping\Client; use Mediaopt\DHL\Application\Model\Order; +use Mediaopt\DHL\Controller\Admin\ErrorDisplayTrait; use Mediaopt\DHL\Model\MoDHLLabel; use OxidEsales\Eshop\Core\DatabaseProvider; use OxidEsales\Eshop\Core\Registry; @@ -28,6 +27,8 @@ class CreateLabels extends Command { + use ErrorDisplayTrait; + /** * @var OutputInterface */ @@ -58,41 +59,41 @@ protected function configure() */ protected function execute(InputInterface $input, OutputInterface $output) { - $this->output = $output; - foreach ($input->getOption('status') as $status) { - if (!in_array($status, $this->getOrderStatus())) { - $this->output->writeln($this->translate('%s is not an allowed order status status. Please use one of %s', [$status, implode(', ', $this->getOrderStatus())])); - return; + try { + $this->output = $output; + foreach ($input->getOption('status') as $status) { + if (!in_array($status, $this->getOrderStatus())) { + $this->output->writeln($this->translate('%s is not an allowed order status status. Please use one of %s', [$status, implode(', ', $this->getOrderStatus())])); + return self::FAILURE; + } } + if (!$orderIds = $this->getOrderIds($input->getOption('paid'), $input->getOption('status'))) { + return self::SUCCESS; + } + $request = Registry::get(ParcelShippingRequestBuilder::class)->build($orderIds); + + $this->createWithParcelShipping($orderIds, $request); + } catch (\Exception $e) { + $this->output->writeln($e->getMessage()); + return self::FAILURE; } - if (!$orderIds = $this->getOrderIds($input->getOption('paid'), $input->getOption('status'))) { - return; - } - $request = Registry::get(GKVCreateShipmentOrderRequestBuilder::class)->build($orderIds); - if (Registry::getConfig()->getConfigParam('mo_dhl__account_rest_api')) { - $this->createWithParcelShipping($request); - } else { - $this->createWithGKV($request); - } + return self::SUCCESS; } - /** - * @param CreateShipmentOrderRequest $request - * @throws \Exception - */ - protected function createWithParcelShipping(CreateShipmentOrderRequest $request) + protected function createWithParcelShipping(array $orderIds, array $request) { - [$query, $request] = Registry::get(ParcelShippingConverter::class)->convertCreateShipmentOrderRequest($request); + [$query, $request] = $request; $response = Registry::get(DHLAdapter::class)->buildParcelShipping()->createOrders($request, $query, [], Client::FETCH_RESPONSE); $payload = \json_decode($response->getBody(), true); $createdLabels = 0; - foreach ($payload['items'] as $item) { + foreach ($payload['items'] as $index => $item) { $statusInformation = $item['sstatus']; $order = \oxNew(Order::class); - $order->load($item['shipmentRefNo']); + $order->load($orderIds[$index]); $order->storeCreationStatus($statusInformation['title']); - if ($detail = $statusInformation['detail']) { - $this->output->writeln($this->translate('MO_DHL__BATCH_ERROR_CREATION_ERROR', [$order->getFieldData('oxordernr'), $detail])); + if ($item['sstatus']['statusCode'] < 200 || $item['sstatus']['statusCode'] >= 300) { + $errors = $this->extractErrorsFromResponsePayload($payload, $index); + $this->output->writeln($this->translate('MO_DHL__BATCH_ERROR_CREATION_ERROR', [$order->getFieldData('oxordernr'), implode("\n", $errors)])); continue; } $label = MoDHLLabel::fromOrderAndParcelShippingResponseItem($order, $item); @@ -102,30 +103,6 @@ protected function createWithParcelShipping(CreateShipmentOrderRequest $request) $this->output->writeln($this->translate('MO_DHL__BATCH_LABELS_CREATED', [$createdLabels])); } - /** - * @param CreateShipmentOrderRequest $request - * @throws \Exception - */ - protected function createWithGKV(CreateShipmentOrderRequest $request) - { - $response = Registry::get(DHLAdapter::class)->buildGKV()->createShipmentOrder($request); - $createdLabels = 0; - foreach ($response->getCreationState() as $creationState) { - $statusInformation = $creationState->getLabelData()->getStatus(); - $order = \oxNew(Order::class); - $order->load($creationState->getSequenceNumber()); - $order->storeCreationStatus($statusInformation->getStatusText()); - if ($errors = $statusInformation->getErrors()) { - $this->output->writeln($this->translate('MO_DHL__BATCH_ERROR_CREATION_ERROR', [$order->getFieldData('oxordernr'), implode(' ', $errors)])); - continue; - } - $label = MoDHLLabel::fromOrderAndCreationState($order, $creationState); - $label->save(); - $createdLabels++; - } - $this->output->writeln($this->translate('MO_DHL__BATCH_LABELS_CREATED', [$createdLabels])); - } - /** * @param bool $paid * @param string[] $status diff --git a/src/modules/mo/mo_dhl/Configurator.php b/src/modules/mo/mo_dhl/Configurator.php index 7eabf125..d5466fed 100644 --- a/src/modules/mo/mo_dhl/Configurator.php +++ b/src/modules/mo/mo_dhl/Configurator.php @@ -18,10 +18,8 @@ use Mediaopt\DHL\Api\Standortsuche; use Mediaopt\DHL\Api\Standortsuche\ServiceProviderBuilder; use Mediaopt\DHL\Api\Wunschpaket; -use Mediaopt\DHL\Api\GKV; use Monolog\Logger; use Psr\Log\LoggerInterface; -use Jane\Component\OpenApiRuntime\Client\AuthenticationPlugin; use Psr\Http\Message\RequestInterface; /** @@ -342,24 +340,11 @@ public function buildWunschpaket(LoggerInterface $logger = null, ClientInterface ); } - /** - * @param LoggerInterface|null $logger - * @return GKV - */ - public function buildGKV(LoggerInterface $logger = null) - { - return new GKV( - $this->buildSoapCredentials(), - $this->buildCustomerGKVCredentials(), - $logger ?: $this->buildLogger() - ); - } - /** * @param LoggerInterface $logger * @return Api\ParcelShipping\Client */ - public function buildParcelShipping(LoggerInterface $logger): \Mediaopt\DHL\Api\ParcelShipping\Client + public function buildParcelShipping(LoggerInterface $logger = null): \Mediaopt\DHL\Api\ParcelShipping\Client { $credentials = $this->buildParcelShippingCredentials(); @@ -368,7 +353,7 @@ public function buildParcelShipping(LoggerInterface $logger): \Mediaopt\DHL\Api\ $apiKeyAuthentication = new ApiKeyAuthentication($credentials->getAdditionalFields()['api-key']); $basicAuthentication = new BasicAuthAuthentication($credentials->getUsername(), $credentials->getPassword()); - $loggingPlugin = new class($logger) implements Plugin { + $loggingPlugin = new class($logger ?: $this->buildLogger()) implements Plugin { private $logger; public function __construct(LoggerInterface $logger) diff --git a/src/modules/mo/mo_dhl/Controller/Admin/DeliverySetDHLController.php b/src/modules/mo/mo_dhl/Controller/Admin/DeliverySetDHLController.php index d4d31c2d..742365e6 100644 --- a/src/modules/mo/mo_dhl/Controller/Admin/DeliverySetDHLController.php +++ b/src/modules/mo/mo_dhl/Controller/Admin/DeliverySetDHLController.php @@ -95,7 +95,6 @@ private function validateProcess($identifier) try { Process::build($identifier); } catch (\InvalidArgumentException $exception) { - /** @noinspection PhpParamsInspection */ Registry::get(\OxidEsales\Eshop\Core\UtilsView::class)->addErrorToDisplay('MO_DHL__PROCESS_IDENTIFIER_ERROR'); throw $exception; } @@ -113,7 +112,6 @@ private function validateParticipation($participation) try { Participation::build($participation); } catch (\InvalidArgumentException $exception) { - /** @noinspection PhpParamsInspection */ Registry::get(\OxidEsales\Eshop\Core\UtilsView::class)->addErrorToDisplay('MO_DHL__PARTICIPATION_NUMBER_ERROR'); throw $exception; } @@ -161,7 +159,7 @@ public function getInternetmarkeProductsBySearchString() protected function getEndorsements() { return [ - Registry::getLang()->translateString('MO_DHL__ENDORSEMENT_IMMEDIATE'), + Registry::getLang()->translateString('MO_DHL__ENDORSEMENT_RETURN'), Registry::getLang()->translateString('MO_DHL__ENDORSEMENT_ABANDONMENT'), ]; } diff --git a/src/modules/mo/mo_dhl/Controller/Admin/ErrorDisplayTrait.php b/src/modules/mo/mo_dhl/Controller/Admin/ErrorDisplayTrait.php index c8f561f4..06e9075f 100644 --- a/src/modules/mo/mo_dhl/Controller/Admin/ErrorDisplayTrait.php +++ b/src/modules/mo/mo_dhl/Controller/Admin/ErrorDisplayTrait.php @@ -3,7 +3,6 @@ namespace Mediaopt\DHL\Controller\Admin; -use Mediaopt\DHL\Api\GKV\StatusElement; use OxidEsales\Eshop\Core\Registry; trait ErrorDisplayTrait @@ -25,12 +24,37 @@ protected function displayErrors($errors) if ($error instanceof \Exception) { $lang = Registry::getLang(); $error = sprintf($lang->translateString('MO_DHL__ERROR_PRINT_FORMAT'), $lang->translateString($error->getMessage()), $error->getLine(), $error->getFile()); - } elseif ($error instanceof StatusElement) { - $error = $error->getStatusElement() . ': ' . $error->getStatusMessage(); } $utilsView->addErrorToDisplay($error); $error = $nextError; } } } + + + /** + * @param array $payload + * @param int|false $index if specified only errors for the given index will be returned + * @return string[] + */ + public function extractErrorsFromResponsePayload(array $payload, $index = false): array + { + $errors = []; + $items = $index !== false ? [$payload['items'][$index]] : $payload['items']; + foreach ($items as $error) { + if (\array_key_exists('validationMessages', $error)) { + foreach ($error['validationMessages'] as $validationMessage) { + $errors[] = "{$validationMessage['validationMessage']} ({$validationMessage['property']})"; + } + continue; + } + if (\array_key_exists('message', $error)) { + $errors[] = "{$error['message']} ({$error['propertyPath']})"; + } + } + if ($errors !== []) { + return $errors; + } + return \array_key_exists('detail', $payload) && $index === false ? [$payload['detail']] : []; + } } \ No newline at end of file diff --git a/src/modules/mo/mo_dhl/Controller/Admin/OrderBatchController.php b/src/modules/mo/mo_dhl/Controller/Admin/OrderBatchController.php index f3abee5c..d7fe2354 100644 --- a/src/modules/mo/mo_dhl/Controller/Admin/OrderBatchController.php +++ b/src/modules/mo/mo_dhl/Controller/Admin/OrderBatchController.php @@ -9,8 +9,8 @@ */ use Mediaopt\DHL\Adapter\DHLAdapter; -use Mediaopt\DHL\Adapter\GKVCreateShipmentOrderRequestBuilder; -use Mediaopt\DHL\Api\GKV\CreateShipmentOrderResponse; +use Mediaopt\DHL\Adapter\ParcelShippingRequestBuilder; +use Mediaopt\DHL\Api\ParcelShipping\Client; use Mediaopt\DHL\Application\Model\Order; use Mediaopt\DHL\Export\CsvExporter; use Mediaopt\DHL\Model\MoDHLLabel; @@ -19,6 +19,7 @@ use Mediaopt\DHL\Shipment\RetoureRequest; use Mediaopt\DHL\Shipment\Shipment; use OxidEsales\Eshop\Core\Registry; +use Psr\Http\Message\ResponseInterface; /** @noinspection LongInheritanceChainInspection */ @@ -29,6 +30,9 @@ */ class OrderBatchController extends \OxidEsales\Eshop\Application\Controller\Admin\OrderList { + + use ErrorDisplayTrait; + /** * @var string */ @@ -184,7 +188,7 @@ public function createLabels() $this->createIntermarkeLabels($splittedOrderIds[Process::INTERNETMARKE]); } if (array_key_exists('default', $splittedOrderIds)) { - $this->handleCreationResponse($this->callCreation($splittedOrderIds['default'])); + $this->handleCreationResponse($splittedOrderIds['default'], $this->callCreation($splittedOrderIds['default'])); } } @@ -211,35 +215,40 @@ public function createRetoureLabels() /** * @param string[] $orderIds - * @return CreateShipmentOrderResponse + * @return ResponseInterface * @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException * @throws \OxidEsales\Eshop\Core\Exception\SystemComponentException */ protected function callCreation(array $orderIds) { - $request = Registry::get(GKVCreateShipmentOrderRequestBuilder::class)->build($orderIds); - return Registry::get(DHLAdapter::class)->buildGKV()->createShipmentOrder($request); + [$query, $shipmentOrderRequest] = Registry::get(ParcelShippingRequestBuilder::class)->build($orderIds); + $response = Registry::get(DHLAdapter::class) + ->buildParcelShipping() + ->createOrders($shipmentOrderRequest, $query, [], Client::FETCH_RESPONSE); + return $response; } /** - * @param CreateShipmentOrderResponse $response + * @param ResponseInterface $response * @throws \Exception */ - protected function handleCreationResponse(CreateShipmentOrderResponse $response) + protected function handleCreationResponse(array $orderIds, ResponseInterface $response) { - foreach ($response->getCreationState() as $creationState) { - $statusInformation = $creationState->getLabelData()->getStatus(); + $payload = \json_decode($response->getBody(), true); + foreach ($payload['items'] as $index => $item) { + $errors = $this->extractErrorsFromResponsePayload($payload, $index); $order = \oxNew(Order::class); - $order->load($creationState->getSequenceNumber()); - $order->storeCreationStatus($statusInformation->getStatusText()); - if ($errors = $statusInformation->getErrors()) { + $order->load($orderIds[$index]); + $order->storeCreationStatus($item['sstatus']['title']); + if ($errors) { $message = Registry::getLang()->translateString('MO_DHL__BATCH_ERROR_CREATION_ERROR'); $message = sprintf($message, $order->getFieldData('oxordernr'), implode(' ', $errors)); Registry::get(\OxidEsales\Eshop\Core\UtilsView::class)->addErrorToDisplay($message); - continue; } - $label = MoDHLLabel::fromOrderAndCreationState($order, $creationState); - $label->save(); + if ($item['sstatus']['statusCode'] >= 200 && $item['sstatus']['statusCode'] < 300) { + $label = MoDHLLabel::fromOrderAndParcelShippingResponseItem($order, $item); + $label->save(); + } } } @@ -302,7 +311,6 @@ protected function notifyAboutOrdersWithoutBillingNumber(array $orders) $key = 'MO_DHL__EXPORT_ORDERS_WITHOUT_BILLING_NUMBER'; $translation = Registry::getLang()->translateString($key); $message = sprintf($translation, implode(', ', $idsOfOrdersWithoutBillingNumber)); - /** @noinspection PhpParamsInspection */ Registry::get(\OxidEsales\Eshop\Core\UtilsView::class)->addErrorToDisplay($message); return true; } diff --git a/src/modules/mo/mo_dhl/Controller/Admin/OrderDHLController.php b/src/modules/mo/mo_dhl/Controller/Admin/OrderDHLController.php index 7e0d9c11..dd969b77 100755 --- a/src/modules/mo/mo_dhl/Controller/Admin/OrderDHLController.php +++ b/src/modules/mo/mo_dhl/Controller/Admin/OrderDHLController.php @@ -4,18 +4,13 @@ use GuzzleHttp\Exception\ClientException; use Mediaopt\DHL\Adapter\DHLAdapter; -use Mediaopt\DHL\Adapter\GKVCreateShipmentOrderRequestBuilder; -use Mediaopt\DHL\Adapter\GKVCustomShipmentBuilder; use Mediaopt\DHL\Adapter\InternetmarkeRefundRetoureVouchersRequestBuilder; use Mediaopt\DHL\Adapter\InternetmarkeShoppingCartPDFRequestBuilder; -use Mediaopt\DHL\Adapter\ParcelShippingConverter; -use Mediaopt\DHL\Api\GKV\CreateShipmentOrderRequest; -use Mediaopt\DHL\Api\GKV\CreateShipmentOrderResponse; -use Mediaopt\DHL\Api\GKV\DeleteShipmentOrderRequest; -use Mediaopt\DHL\Api\GKV\DeleteShipmentOrderResponse; -use Mediaopt\DHL\Api\GKV\StatusCode; +use Mediaopt\DHL\Adapter\ParcelShippingCustomRequestBuilder; +use Mediaopt\DHL\Adapter\ParcelShippingRequestBuilder; use Mediaopt\DHL\Api\Internetmarke\ShoppingCartResponseType; use Mediaopt\DHL\Api\ParcelShipping\Client; +use Mediaopt\DHL\Api\ParcelShipping\Model\ShipmentOrderRequest; use Mediaopt\DHL\Api\Wunschpaket; use Mediaopt\DHL\Merchant\Ekp; use Mediaopt\DHL\Model\MoDHLInternetmarkeRefund; @@ -88,11 +83,7 @@ public function createLabel() return; } $shipmentOrderRequest = $this->buildShipmentOrderRequest(); - if ($this->usesParcelShippingAPI()) { - $this->createShipmentOrderWithParcelShipping($shipmentOrderRequest); - } else { - $this->createShipmentOrderWithGKV($shipmentOrderRequest); - } + $this->createShipmentOrderWithParcelShipping($shipmentOrderRequest); } catch (\Exception $e) { $this->displayErrors($e); } @@ -146,22 +137,18 @@ public function createRetoure($order = null) public function createCustomLabel() { try { - $request = $this->buildShipmentOrderRequest(); - $shipmentOrder = $request->getShipmentOrder()[0]; + /** @var $request ShipmentOrderRequest */ + [$query, $request] = $this->buildShipmentOrderRequest(); + $shipmentOrder = $request->getShipments()[0]; $data = Registry::getConfig()->getRequestParameter('data'); - $customShipmentBuilder = new GKVCustomShipmentBuilder(); + $customShipmentBuilder = new ParcelShippingCustomRequestBuilder(); $customShipmentBuilder->applyCustomDataToShipmentOrder($shipmentOrder, $data, $this->getOrder()); + $customShipmentBuilder->applyCustomDataToQuery($query, $data); - $this->addTplParam('shipmentOrder', $customShipmentBuilder->toCustomizableParametersArray($shipmentOrder)); + $this->addTplParam('shipmentOrder', $customShipmentBuilder->toCustomizableParametersArray($query, $shipmentOrder, $this->getOrder())); $this->setTemplateName('mo_dhl__order_dhl_custom_label.tpl'); - - if ($this->usesParcelShippingAPI()) { - $this->createShipmentOrderWithParcelShipping($request); - } else { - $this->createShipmentOrderWithGKV($request); - } - + $this->createShipmentOrderWithParcelShipping([$query, $request]); } catch (\Exception $e) { $this->displayErrors($e); } @@ -176,9 +163,11 @@ public function createCustomLabel() */ public function prepareCustomLabel() { - $shipmentOrder = $this->buildShipmentOrderRequest()->getShipmentOrder()[0]; - $customShipmentBuilder = new GKVCustomShipmentBuilder(); - $this->addTplParam('shipmentOrder', $customShipmentBuilder->toCustomizableParametersArray($shipmentOrder)); + /** @var $request ShipmentOrderRequest */ + [$query, $request] = $this->buildShipmentOrderRequest(); + $shipment = $request->getShipments()[0]; + $customShipmentBuilder = new ParcelShippingCustomRequestBuilder(); + $this->addTplParam('shipmentOrder', $customShipmentBuilder->toCustomizableParametersArray($query, $shipment, $this->getOrder())); $this->setTemplateName('mo_dhl__order_dhl_custom_label.tpl'); } @@ -201,10 +190,8 @@ public function deleteShipment() } if ($this->usesInternetmarke()) { $this->refundInternetmarkeLabel($label); - } elseif ($this->usesParcelShippingAPI()) { - $this->deleteShipmentWithParcelShipping($label); } else { - $this->deleteShipmentWithGKV($label); + $this->deleteShipmentWithParcelShipping($label); } } catch (\Exception $e) { $this->displayErrors($e); @@ -231,16 +218,6 @@ protected function refundInternetmarkeLabel($label) } } - /** - * @param string $shipmentNumber - * @return DeleteShipmentOrderResponse - */ - public function callGKVDeleteShipment(string $shipmentNumber): DeleteShipmentOrderResponse - { - $gkvClient = Registry::get(DHLAdapter::class)->buildGKV(); - return $gkvClient->deleteShipmentOrder(new DeleteShipmentOrderRequest($gkvClient->buildVersion(), $shipmentNumber)); - } - /** * @return string */ @@ -358,7 +335,6 @@ protected function validateEkp() Ekp::build($ekp); return $ekp; } catch (\InvalidArgumentException $exception) { - /** @noinspection PhpParamsInspection */ Registry::get(\OxidEsales\Eshop\Core\UtilsView::class)->addErrorToDisplay('MO_DHL__EKP_ERROR'); return ''; } @@ -374,7 +350,6 @@ protected function validateProcessIdentifier() Process::build($processIdentifier); return $processIdentifier; } catch (\InvalidArgumentException $exception) { - /** @noinspection PhpParamsInspection */ Registry::get(\OxidEsales\Eshop\Core\UtilsView::class)->addErrorToDisplay('MO_DHL__PROCESS_IDENTIFIER_ERROR'); return ''; } @@ -399,7 +374,6 @@ protected function validateParticipationNumber() return $participationNumber; } } catch (\InvalidArgumentException $exception) { - /** @noinspection PhpParamsInspection */ Registry::get(\OxidEsales\Eshop\Core\UtilsView::class)->addErrorToDisplay('MO_DHL__PARTICIPATION_NUMBER_ERROR'); return ''; } @@ -462,30 +436,6 @@ protected function translateString(string $text) return $lang->translateString($text); } - /** - * @param CreateShipmentOrderResponse $response - * @throws \Exception - */ - protected function handleGKVCreationResponse(CreateShipmentOrderResponse $response) - { - $creationState = $response->getCreationState()[0]; - $statusInformation = $creationState ? $creationState->getLabelData()->getStatus() : $response->getStatus(); - $this->getOrder()->storeCreationStatus($statusInformation->getStatusText()); - if ($errors = $statusInformation->getErrors()) { - $this->displayErrors($errors); - return; - } - $label = MoDHLLabel::fromOrderAndCreationState($this->getOrder(), $creationState); - $label->save(); - if ($statusInformation->getStatusCode() === StatusCode::GKV_STATUS_OK && $statusInformation->getStatusText() === 'Weak validation error occured.') { - $errors = $statusInformation->getStatusMessage() ?: []; - array_unshift($errors, $statusInformation->getStatusText()); - array_unshift($errors, 'MO_DHL__LABEL_CREATED_WITH_WEAK_VALIDATION_ERROR'); - $errors = array_unique($errors); - $this->displayErrors($errors); - } - } - protected function handleInternetmarkeCreationResponse(ShoppingCartResponseType $response) { $this->getOrder()->storeCreationStatus('ok'); @@ -500,7 +450,7 @@ protected function handleInternetmarkeCreationResponse(ShoppingCartResponseType protected function handleParcelShippingPostResponse(ResponseInterface $response): void { $payload = \json_decode($response->getBody(), true); - $errors = Registry::get(ParcelShippingConverter::class)->extractErrorsFromResponsePayload($payload); + $errors = $this->extractErrorsFromResponsePayload($payload); if ($response->getStatusCode() >= 200 && $response->getStatusCode() < 300) { $this->getOrder()->storeCreationStatus($payload['status']['title']); $label = MoDHLLabel::fromOrderAndParcelShippingResponseItem($this->getOrder(), $payload['items'][0]); @@ -515,31 +465,13 @@ protected function handleParcelShippingPostResponse(ResponseInterface $response) } /** - * @param MoDHLLabel $label - * @param DeleteShipmentOrderResponse $response - */ - protected function handleGKVDeletionResponse(MoDHLLabel $label, DeleteShipmentOrderResponse $response) - { - $statusInformation = $response->getDeletionState() ? $response->getDeletionState()[0]->getStatus() : $response->getStatus(); - if ($errors = $statusInformation->getErrors()) { - if ($statusInformation->getStatusCode() === StatusCode::GKV_STATUS_UNKNOWN_SHIPMENT) { - $label->delete(); - } - $this->displayErrors($errors); - return; - } - $label->delete(); - } - - - /** - * @return CreateShipmentOrderRequest + * @return array * @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException * @throws \OxidEsales\Eshop\Core\Exception\SystemComponentException */ - protected function buildShipmentOrderRequest(): CreateShipmentOrderRequest + protected function buildShipmentOrderRequest(): array { - return Registry::get(GKVCreateShipmentOrderRequestBuilder::class)->build([$this->getOrder()->getId()]); + return Registry::get(ParcelShippingRequestBuilder::class)->build([$this->getOrder()->getId()]); } /** @@ -550,14 +482,6 @@ public function usesInternetmarke() return $this->getProcess() && $this->getProcess()->usesInternetMarke(); } - /** - * @return bool - */ - public function usesParcelShippingAPI() - { - return (bool)Registry::getConfig()->getConfigParam('mo_dhl__account_rest_api'); - } - /** */ public function createInternetmarkeLabel() @@ -595,24 +519,13 @@ protected function parseInternetmarkeException(\Exception $e): array } /** - * @param CreateShipmentOrderRequest $request + * @param array $shipmentOrderRequest * @return void * @throws \Exception */ - protected function createShipmentOrderWithGKV(CreateShipmentOrderRequest $request): void + protected function createShipmentOrderWithParcelShipping(array $shipmentOrderRequest): void { - $response = Registry::get(DHLAdapter::class)->buildGKV()->createShipmentOrder($request); - $this->handleGKVCreationResponse($response); - } - - /** - * @param CreateShipmentOrderRequest $shipmentOrderRequest - * @return void - * @throws \Exception - */ - protected function createShipmentOrderWithParcelShipping(CreateShipmentOrderRequest $shipmentOrderRequest): void - { - [$query, $shipmentOrderRequest] = Registry::get(ParcelShippingConverter::class)->convertCreateShipmentOrderRequest($shipmentOrderRequest); + [$query, $shipmentOrderRequest] = $shipmentOrderRequest; $response = Registry::get(DHLAdapter::class) ->buildParcelShipping() ->createOrders($shipmentOrderRequest, $query, [], Client::FETCH_RESPONSE); @@ -627,7 +540,7 @@ protected function deleteShipmentWithParcelShipping(MoDHLLabel $label) $label->getFieldData('shipmentNumber'); $response = Registry::get(DHLAdapter::class) ->buildParcelShipping() - ->ordersAccountDelete(['profile' => GKVCreateShipmentOrderRequestBuilder::STANDARD_GRUPPENPROFIL, 'shipment' => $label->getFieldData('shipmentNumber')], [], Client::FETCH_RESPONSE); + ->ordersAccountDelete(['profile' => ParcelShippingRequestBuilder::STANDARD_GRUPPENPROFIL, 'shipment' => $label->getFieldData('shipmentNumber')], [], Client::FETCH_RESPONSE); if ($response->getStatusCode() >= 200 && $response->getStatusCode() < 300) { $label->delete(); return; @@ -640,12 +553,4 @@ protected function deleteShipmentWithParcelShipping(MoDHLLabel $label) } $this->displayErrors([$firstItem['sstatus']['detail']]); } - - /** - * @param MoDHLLabel $label - */ - protected function deleteShipmentWithGKV(MoDHLLabel $label) - { - $this->handleGKVDeletionResponse($label, $this->callGKVDeleteShipment($label->getFieldData('shipmentNumber'))); - } } diff --git a/src/modules/mo/mo_dhl/Main.php b/src/modules/mo/mo_dhl/Main.php index 4225192c..93b566c5 100644 --- a/src/modules/mo/mo_dhl/Main.php +++ b/src/modules/mo/mo_dhl/Main.php @@ -3,7 +3,6 @@ namespace Mediaopt\DHL; use GuzzleHttp\ClientInterface; -use Mediaopt\DHL\Api\GKV; use Mediaopt\DHL\Api\Internetmarke; use Mediaopt\DHL\Api\InternetmarkeRefund; use Mediaopt\DHL\Api\ParcelShipping\Client; @@ -117,14 +116,6 @@ public function buildWunschpaket() return $this->getConfigurator()->buildWunschpaket($this->getLogger(), $this->getClient()); } - /** - * @return GKV - */ - public function buildGKV() - { - return $this->getConfigurator()->buildGKV($this->getLogger()); - } - /** * @return Api\Retoure */ diff --git a/src/modules/mo/mo_dhl/Model/MoDHLLabel.php b/src/modules/mo/mo_dhl/Model/MoDHLLabel.php index 8f684567..b93e395c 100644 --- a/src/modules/mo/mo_dhl/Model/MoDHLLabel.php +++ b/src/modules/mo/mo_dhl/Model/MoDHLLabel.php @@ -8,7 +8,6 @@ namespace Mediaopt\DHL\Model; -use Mediaopt\DHL\Api\GKV\CreationState; use Mediaopt\DHL\Api\Internetmarke\ShoppingCartResponseType; use Mediaopt\DHL\Api\Retoure\RetoureResponse; use OxidEsales\Eshop\Application\Model\Order; @@ -55,27 +54,6 @@ public function __construct() $this->init(); } - /** - * @param Order $order - * @param CreationState $creationState - * @return MoDHLLabel - */ - public static function fromOrderAndCreationState(Order $order, CreationState $creationState) - { - $label = new self(); - $label->assign([ - 'oxshopid' => $order->getShopId(), - 'orderId' => $order->getId(), - 'type' => self::TYPE_DELIVERY, - 'shipmentNumber' => $creationState->getShipmentNumber(), - 'returnShipmentNumber' => $creationState->getReturnShipmentNumber(), - 'labelUrl' => $creationState->getLabelData()->getLabelUrl(), - 'returnLabelUrl' => $creationState->getLabelData()->getReturnLabelUrl(), - 'exportLabelUrl' => $creationState->getLabelData()->getExportLabelUrl(), - ]); - return $label; - } - /** * @param Order $order * @param array $item diff --git a/src/modules/mo/mo_dhl/Model/MoDHLService.php b/src/modules/mo/mo_dhl/Model/MoDHLService.php index 0dd1cc6c..c400faa3 100644 --- a/src/modules/mo/mo_dhl/Model/MoDHLService.php +++ b/src/modules/mo/mo_dhl/Model/MoDHLService.php @@ -65,12 +65,12 @@ class MoDHLService /** * @var string */ - const MO_DHL__ENDORSEMENT_IMMEDIATE = 'IMMEDIATE'; + const MO_DHL__ENDORSEMENT_RETURN = 'RETURN'; /** * @var string */ - const MO_DHL__ENDORSEMENT_ABANDONMENT = 'ABANDONMENT'; + const MO_DHL__ENDORSEMENT_ABANDONMENT = 'ABANDON'; /** * @var string */ diff --git a/src/modules/mo/mo_dhl/views/admin/tpl/order_dhl_custom_label.tpl b/src/modules/mo/mo_dhl/views/admin/tpl/order_dhl_custom_label.tpl index bbeaf1fe..00bd860f 100644 --- a/src/modules/mo/mo_dhl/views/admin/tpl/order_dhl_custom_label.tpl +++ b/src/modules/mo/mo_dhl/views/admin/tpl/order_dhl_custom_label.tpl @@ -53,148 +53,17 @@ [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_RECEIVER'}] - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_NAME'}] - - - - - - [{assign var="address" value=$shipmentOrder.receiver.address}] - [{if $shipmentOrder.receiver.type == 'address'}] - [{assign var="communication" value=$shipmentOrder.receiver.communication}] - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_MAIL'}] - - - - - - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_PHONE'}] - - - - - - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_COMPANY'}] - - - - - - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_STREETNAME'}] - - - - - - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_STREETNUMBER'}] - - - - - - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_ADRESS_ADDITION'}] - - - - - - [{elseif $shipmentOrder.receiver.type == 'packstation'}] - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_PACKSTATION_NUMBER'}] - - - - - - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_POST_NUMBER'}] - - - - - - [{else}] + [{foreach from=$shipmentOrder.receiver key="key" item="item"}] - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_POSTFILIAL_NUMBER'}] + [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_'|cat:$key|upper}] - + - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_POST_NUMBER'}] - - - - - - [{/if}] - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_ZIP'}] - - - - - - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_CITY'}] - - - - - - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_STATE'}] - - - - - - [{if $shipmentOrder.receiver.type == 'address'}] - [{assign var="origin" value=$address->getOrigin()}] - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_COUNTRY'}] - - - - - - [{/if}] + [{/foreach}] @@ -207,79 +76,17 @@ [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_SHIPPER'}] - [{assign var="name" value=$shipmentOrder.shipper.name}] - - - [{oxmultilang ident='SHOP_MODULE_mo_dhl__sender_line1'}] - - - - - - - - [{oxmultilang ident='SHOP_MODULE_mo_dhl__sender_line2'}] - - - - - + [{foreach from=$shipmentOrder.shipper key="key" item="item"}] - [{oxmultilang ident='SHOP_MODULE_mo_dhl__sender_line3'}] + [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_'|cat:$key|upper}] - - - - [{assign var="address" value=$shipmentOrder.shipper.address}] - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_STREETNAME'}] - - - - - - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_STREETNUMBER'}] - - - - - - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_ZIP'}] - - - - - - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_CITY'}] - - - - - - [{assign var="origin" value=$address->getOrigin()}] - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_COUNTRY'}] - - - + + [{/foreach}] @@ -292,81 +99,17 @@ [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_RETURN_RECEIVER'}] - [{assign var="name" value=$shipmentOrder.returnReceiver.name}] - - - [{oxmultilang ident='SHOP_MODULE_mo_dhl__retoure_receiver_line1'}] - - - - - - - - [{oxmultilang ident='SHOP_MODULE_mo_dhl__retoure_receiver_line2'}] - - - - - + [{foreach from=$shipmentOrder.services.dhlRetoure.address key="key" item="item"}] - [{oxmultilang ident='SHOP_MODULE_mo_dhl__retoure_receiver_line3'}] + [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_'|cat:$key|upper}] - - - - [{assign var="address" value=$shipmentOrder.returnReceiver.address}] - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_STREETNAME'}] - - - - - - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_STREETNUMBER'}] - - - - - - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_ZIP'}] - - - - - - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_CITY'}] - - - - - - [{assign var="origin" value=$address->getOrigin()}] - - - [{oxmultilang ident='MO_DHL__CUSTOM_LABEL_COUNTRY'}] - - - + + [{/foreach}] @@ -380,15 +123,14 @@ [{if $process->supportsParcelOutletRouting()}] - [{assign var="service" value=$shipmentOrder.services.parcelOutletRouting}] [{oxmultilang ident='SHOP_MODULE_mo_dhl__filialrouting_active'}] - + getActive()}]checked[{/if}]> + value="1" [{if $shipmentOrder.services.parcelOutletRouting}]checked[{/if}]> @@ -397,7 +139,7 @@ + value="[{$shipmentOrder.services.parcelOutletRouting}]"> [{/if}] @@ -410,7 +152,7 @@ getActive()}]checked[{/if}]> + value="1" [{if $service}]checked[{/if}]> [{/if}] @@ -423,7 +165,7 @@ getActive()}]checked[{/if}]> + value="1" [{if $service}]checked[{/if}]> @@ -432,7 +174,7 @@ + value="[{$service}]"> [{/if}] @@ -445,7 +187,7 @@ getActive()}]checked[{/if}]> + value="1" [{if $service.active}]checked[{/if}]> @@ -454,14 +196,14 @@ + value="[{$service.codAmount}]"> [{/if}] [{if $process->supportsIdentCheck()}] [{assign var="service" value=$shipmentOrder.services.identCheck}] - [{if $service && $service->getActive()}] - [{assign var="identDetails" value=$service->getIdent()}] + [{if $service}] + [{assign var="identDetails" value=$service}] [{/if}] @@ -470,7 +212,7 @@ getActive()}]checked[{/if}]> + value="1" [{if $service}]checked[{/if}]> @@ -478,8 +220,8 @@ [{oxmultilang ident='LAST_NAME'}] [{oxmultilang ident='MO_DHL__FOR_IDENT_CHECK'}] - + @@ -487,8 +229,8 @@ [{oxmultilang ident='FIRST_NAME'}] [{oxmultilang ident='MO_DHL__FOR_IDENT_CHECK'}] - + @@ -497,7 +239,10 @@ + value="[{strip}][{if $identDetails && $identDetails->isInitialized('dateOfBirth')}] + [{assign var="bday" value=$identDetails->getDateOfBirth()}] + [{$bday->format("d.m.Y")}] + [{/if}][{/strip}]"> @@ -507,8 +252,8 @@ @@ -522,8 +267,8 @@ @@ -537,7 +282,7 @@ getActive()}]checked[{/if}]> + [{if $service}]checked[{/if}]> [{if $process->supportsDHLRetoure()}] @@ -546,10 +291,10 @@ [{oxmultilang ident='SHOP_MODULE_mo_dhl__beilegerretoure_active'}] - - + [{/if}] @@ -563,7 +308,7 @@ getActive()}]checked[{/if}]> + [{if $shipmentOrder.services.noNeighbourDelivery}]checked[{/if}]> [{/if}] @@ -576,7 +321,7 @@ getActive()}]checked[{/if}]> + [{if $shipmentOrder.services.namedPersonOnly}]checked[{/if}]> [{/if}] @@ -589,7 +334,7 @@ getActive()}]checked[{/if}]> + [{if $shipmentOrder.services.signedForByRecipient}]checked[{/if}]> [{/if}] @@ -602,7 +347,7 @@ getActive()}]checked[{/if}]> + value="1" [{if $service}]checked[{/if}]> [{/if}] @@ -615,20 +360,7 @@ getActive()}]checked[{/if}]> - - - [{/if}] - [{if $process->supportsEconomy()}] - [{assign var="service" value=$shipmentOrder.services.economy}] - - - [{oxmultilang ident='MO_DHL__ECONOMY'}] - - - - getActive()}]checked[{/if}]> + value="1" [{if $service}]checked[{/if}]> [{/if}] @@ -641,7 +373,7 @@ getActive()}]checked[{/if}]> + value="1" [{if $service}]checked[{/if}]> [{/if}] @@ -653,8 +385,8 @@ diff --git a/tests/Api/GKV/BaseGKVTest.php b/tests/Api/GKV/BaseGKVTest.php deleted file mode 100644 index 57912d73..00000000 --- a/tests/Api/GKV/BaseGKVTest.php +++ /dev/null @@ -1,85 +0,0 @@ -buildGKV(); - } - - /** - * @return string - */ - protected function getUniqueShipmentId() - { - return '22220104' . substr(uniqid(), 0, 6); - } - - /** - * @param string $product - * @return Shipment - */ - protected function createShipmentToGermany($product = 'V01PAK'): Shipment - { - $gkv = $this->buildGKV(); - $ShipmentDetails = new ShipmentDetailsTypeType($product, new BillingNumber(Ekp::build($gkv->getSoapCredentials()->getEkp()), Process::build(Process::PAKET), Participation::build('01')), (new \DateTime())->format('Y-m-d'), new ShipmentItemType(12)); - $Receiver = (new ReceiverType('a b'))->setAddress(new ReceiverNativeAddressType(null, null, 'Elbestr.', '28/29', '12045', 'Berlin', null, new CountryType('DE'))); - $Shipper = (new ShipperType(new NameType('a b', null, null), new NativeAddressTypeNew('Elbestr.', '28', '12045', 'Berlin', new CountryType('DE')))); - $shipment = new Shipment($ShipmentDetails, $Shipper, $Receiver); - return $shipment; - } - - /** - * @param string $product - * @return Shipment - */ - protected function createShipmentToAustria($product = 'V01PAK'): Shipment - { - $shipment = $this->createShipmentToGermany($product); - $shipment->getReceiver()->getAddress()->setOrigin(new CountryType('AT')); - return $shipment; - } - - /** - * @return Version - */ - protected function createVersion(): Version - { - return new Version(3, 4, 0); - } - - public function testDummy() - { - $this->assertTrue(true); - } -} diff --git a/tests/Api/GKV/CreateShipmentOrderTest.php b/tests/Api/GKV/CreateShipmentOrderTest.php deleted file mode 100644 index 58a60981..00000000 --- a/tests/Api/GKV/CreateShipmentOrderTest.php +++ /dev/null @@ -1,44 +0,0 @@ -createShipmentToGermany(); - $shipmentOrder = new ShipmentOrderType('123', $shipment); - $request = new CreateShipmentOrderRequest(new Version(3, 4, 0), $shipmentOrder); - $response = $this->buildGKV()->createShipmentOrder($request); - $this->assertInstanceOf(CreateShipmentOrderResponse::class, $response); - $this->assertEquals(0, $response->getStatus()->getStatusCode(), implode(', ', $response->getCreationState()[0]->getLabelData()->getStatus()->getStatusMessage())); - } - - public function testCreateShipmentOutsideGermany() - { - $shipment = $this->createShipmentToAustria(); - $shipmentOrder = new ShipmentOrderType('123', $shipment); - $request = new CreateShipmentOrderRequest(new Version(3, 4, 0), $shipmentOrder); - $response = $this->buildGKV()->createShipmentOrder($request); - $this->assertInstanceOf(CreateShipmentOrderResponse::class, $response); - $this->assertEquals(1101, $response->getStatus()->getStatusCode(), $response->getStatus()->getStatusText()); - $this->assertContains('Das angegebene Produkt ist für das Land nicht verfügbar.', $response->getCreationState()[0]->getLabelData()->getStatus()->getStatusMessage()); - } - -} diff --git a/tests/Api/GKV/GetLabelTest.php b/tests/Api/GKV/GetLabelTest.php deleted file mode 100644 index c3c2fc11..00000000 --- a/tests/Api/GKV/GetLabelTest.php +++ /dev/null @@ -1,31 +0,0 @@ -buildGKV(); - $request = new GetLabelRequest($this->createVersion(), $this->getUniqueShipmentId(), null, null, null, null, null); - $response = $gkv->getLabel($request); - $this->assertInstanceOf(GetLabelResponse::class, $response); - $this->assertEquals(2000, $response->getStatus()->getStatusCode()); - $this->assertEquals(2000, $response->getLabelData()[0]->getStatus()->getStatusCode()); - $this->assertNull($response->getLabelData()[0]->getLabelUrl()); - } -} diff --git a/tests/Api/GKV/GetManifestTest.php b/tests/Api/GKV/GetManifestTest.php deleted file mode 100644 index 451613e9..00000000 --- a/tests/Api/GKV/GetManifestTest.php +++ /dev/null @@ -1,48 +0,0 @@ -createVersion(), (new \DateTime())->format('Y-m-d')); - $response = $this->buildGKV()->getManifest($request); - $this->assertInstanceOf(GetManifestResponse::class, $response); - $this->assertNotFalse(base64_decode($response->getManifestData())); - $this->assertEquals(0, $response->getStatus()->getStatusCode()); - } - - public function testGetManifestForLastWeek() - { - $manifestDate = (new \DateTime('-7 days'))->format('Y-m-d'); - $request = new GetManifestRequest($this->createVersion(), $manifestDate); - $response = $this->buildGKV()->getManifest($request); - $this->assertInstanceOf(GetManifestResponse::class, $response); - $this->assertNotFalse(base64_decode($response->getManifestData())); - $this->assertEquals(0, $response->getStatus()->getStatusCode()); - } - - public function testGetManifestForNextWeek() - { - $manifestDate = (new \DateTime('+7 days'))->format('Y-m-d'); - $request = new GetManifestRequest($this->createVersion(), $manifestDate); - $response = $this->buildGKV()->getManifest($request); - $this->assertInstanceOf(GetManifestResponse::class, $response); - $this->assertGreaterThan(0, $response->getStatus()->getStatusCode()); - } -} diff --git a/tests/Api/GKV/GetVersionTest.php b/tests/Api/GKV/GetVersionTest.php deleted file mode 100644 index df05439a..00000000 --- a/tests/Api/GKV/GetVersionTest.php +++ /dev/null @@ -1,30 +0,0 @@ -buildGKV(); - $response = $gkv->getVersion($this->createVersion()); - $this->assertInstanceOf(GetVersionResponse::class, $response); - $this->assertInstanceOf(Version::class, $response->getVersion()); - $this->assertEquals(3, $response->getVersion()->getMajorRelease()); - $this->assertEquals(0, $response->getVersion()->getMinorRelease()); - } -} diff --git a/tests/Api/GKV/ValidateShipmentTest.php b/tests/Api/GKV/ValidateShipmentTest.php deleted file mode 100644 index 4d77dc33..00000000 --- a/tests/Api/GKV/ValidateShipmentTest.php +++ /dev/null @@ -1,56 +0,0 @@ -createShipmentToGermany(); - $shipmentOrder = new ValidateShipmentOrderType('123', $shipment); - $request = new ValidateShipmentOrderRequest($this->createVersion(), $shipmentOrder); - $response = $this->buildGKV()->validateShipment($request); - $this->assertInstanceOf(ValidateShipmentResponse::class, $response); - $this->assertEquals(0, $response->getStatus()->getStatusCode(), $response->getStatus()->getStatusText()); - } - - public function testValidateShipmentOutsideGermany() - { - $shipment = $this->createShipmentToGermany(); - $shipment->getReceiver()->getAddress()->setOrigin(new CountryType('AT')); - $shipmentOrder = new ValidateShipmentOrderType('123', $shipment); - $request = new ValidateShipmentOrderRequest($this->createVersion(), $shipmentOrder); - $response = $this->buildGKV()->validateShipment($request); - $this->assertInstanceOf(ValidateShipmentResponse::class, $response); - $this->assertEquals(1101, $response->getStatus()->getStatusCode(), $response->getStatus()->getStatusText()); - $this->assertContains('Das angegebene Produkt ist für das Land nicht verfügbar.', $response->getValidationState()[0]->getStatus()->getStatusMessage(), implode(', ', $response->getValidationState()[0]->getStatus()->getStatusMessage())); - } - - public function testValidateShipmentForYesterday() - { - $shipment = $this->createShipmentToGermany(); - $shipment->getShipmentDetails()->setShipmentDate((new \DateTime('-1 day'))->format('Y-m-d')); - $shipmentOrder = new ValidateShipmentOrderType('123', $shipment); - $request = new ValidateShipmentOrderRequest($this->createVersion(), $shipmentOrder); - $response = $this->buildGKV()->validateShipment($request); - $this->assertInstanceOf(ValidateShipmentResponse::class, $response); - $this->assertEquals(1101, $response->getStatus()->getStatusCode(), $response->getStatus()->getStatusText()); - $this->assertContains('Bitte geben Sie ein gültiges Sendungsdatum an.', $response->getValidationState()[0]->getStatus()->getStatusMessage(), implode(', ', $response->getValidationState()[0]->getStatus()->getStatusMessage())); - } -} diff --git a/tests/Api/ParcelShipping/BaseParcelShippingTest.php b/tests/Api/ParcelShipping/BaseParcelShippingTest.php new file mode 100644 index 00000000..6ad55927 --- /dev/null +++ b/tests/Api/ParcelShipping/BaseParcelShippingTest.php @@ -0,0 +1,105 @@ +buildParcelShipping(); + } + + /** + * @return string + */ + protected function getUniqueShipmentId() + { + return '22220104' . substr(uniqid(), 0, 6); + } + + /** + * @param string $product + * @return Shipment + */ + protected function createShipmentToGermany($product = 'V01PAK'): Shipment + { + $receiver = [ + 'name1' => 'a b', + 'contactName' => 'a b', + 'phone' => '030123', + 'email' => 'a@b.de', + 'city' => 'Berlin', + 'postalCode' => '12045', + 'addressStreet' => 'Elbestr.', + 'addressHouse' => '28/29', + 'country' => 'DEU', + ]; + $shipper = (new Shipper())->setName1('a b')->setAddressStreet('Elbestr.')->setAddressHouse('28')->setPostalCode('12045')->setCity('Berlin')->setCountry('DEU'); + $shipment = new Shipment(); + $shipment->setShipper($shipper); + $shipment->setConsignee($receiver); + $shipmentDetails = new ShipmentDetails(); + $weight = new Weight(); + $weight->setUom('kg'); + $weight->setValue(12); + $shipmentDetails->setWeight($weight); + $shipment->setDetails($shipmentDetails); + $shipment->setCreationSoftware(CsvExporter::CREATOR_TAG); + $shipment->setBillingNumber(new BillingNumber(Ekp::build('3333333333'), Process::build(Process::PAKET), Participation::build('01'))); + $shipment->setProduct($product); + $shipment->setRefNo('Bestellnr. 123'); + $shipment->setShipDate((new \DateTime())); + return $shipment; + } + + /** + * @param string $product + * @return Shipment + */ + protected function createShipmentToAustria($product = 'V01PAK'): Shipment + { + $shipment = $this->createShipmentToGermany($product); + $receiver = $shipment->getConsignee(); + $receiver['country'] = 'AUT'; + $shipment->setConsignee($receiver); + return $shipment; + } + + protected function buildQueryParams(): array + { + return [ + 'includeDocs' => 'URL', + 'combine' => false, + 'mustEncode' => false, + ]; + } + + public function testDummy() + { + $this->assertTrue(true); + } +} diff --git a/tests/Api/ParcelShipping/CreateShipmentOrderTest.php b/tests/Api/ParcelShipping/CreateShipmentOrderTest.php new file mode 100644 index 00000000..77deb9d1 --- /dev/null +++ b/tests/Api/ParcelShipping/CreateShipmentOrderTest.php @@ -0,0 +1,51 @@ +createShipmentToGermany(); + $request = new ShipmentOrderRequest(); + $request->setShipments([$shipment]); + $request->setProfile(ParcelShippingRequestBuilder::STANDARD_GRUPPENPROFIL); + $query = $this->buildQueryParams(); + $response = $this->buildParcelShipping()->createOrders($request, $query, [], Client::FETCH_RESPONSE); + $this->assertInstanceOf(ResponseInterface::class, $response); + $payload = \json_decode($response->getBody(), true); + $this->assertEquals(200, $response->getStatusCode(), $payload['status']['detail']); + } + + public function testCreateShipmentOutsideGermany() + { + $shipment = $this->createShipmentToAustria(); + $request = new ShipmentOrderRequest(); + $request->setShipments([$shipment]); + $request->setProfile(ParcelShippingRequestBuilder::STANDARD_GRUPPENPROFIL); + $query = $this->buildQueryParams(); + $response = $this->buildParcelShipping()->createOrders($request, $query, [], Client::FETCH_RESPONSE); + $this->assertInstanceOf(ResponseInterface::class, $response); + $body = $response->getBody()->getContents(); + $payload = \json_decode($body, true); + $this->assertEquals(400, $response->getStatusCode(), $payload['status']['detail']); + $this->assertContains('The product entered is not available for this country.', $body); + } + +} diff --git a/tests/Api/ParcelShipping/GetLabelTest.php b/tests/Api/ParcelShipping/GetLabelTest.php new file mode 100644 index 00000000..2576252b --- /dev/null +++ b/tests/Api/ParcelShipping/GetLabelTest.php @@ -0,0 +1,26 @@ +buildParcelShipping(); + $response = $gkv->getLabel([ + 'token' => $this->getUniqueShipmentId(), + ]); + $this->assertNull($response); + } +} diff --git a/tests/Api/ParcelShipping/ValidateShipmentTest.php b/tests/Api/ParcelShipping/ValidateShipmentTest.php new file mode 100644 index 00000000..fad66e33 --- /dev/null +++ b/tests/Api/ParcelShipping/ValidateShipmentTest.php @@ -0,0 +1,68 @@ +createShipmentToGermany(); + $request = new ShipmentOrderRequest(); + $request->setShipments([$shipment]); + $request->setProfile(ParcelShippingRequestBuilder::STANDARD_GRUPPENPROFIL); + $query = $this->buildQueryParams(); + $query['validate'] = true; + $response = $this->buildParcelShipping()->createOrders($request, $query, [], \Mediaopt\DHL\Api\MyAccount\Runtime\Client\Client::FETCH_RESPONSE); + $this->assertInstanceOf(ResponseInterface::class, $response); + $payload = \json_decode($response->getBody(), true); + $this->assertEquals(200, $response->getStatusCode(), $payload['status']['detail']); + } + + public function testValidateShipmentOutsideGermany() + { + $shipment = $this->createShipmentToAustria(); + $request = new ShipmentOrderRequest(); + $request->setShipments([$shipment]); + $request->setProfile(ParcelShippingRequestBuilder::STANDARD_GRUPPENPROFIL); + $query = $this->buildQueryParams(); + $query['validate'] = true; + $response = $this->buildParcelShipping()->createOrders($request, $query, [], \Mediaopt\DHL\Api\MyAccount\Runtime\Client\Client::FETCH_RESPONSE); + $this->assertInstanceOf(ResponseInterface::class, $response); + $body = $response->getBody()->getContents(); + $payload = \json_decode($body, true); + $this->assertEquals(400, $response->getStatusCode(), $payload['status']['detail']); + $this->assertContains('The product entered is not available for this country.', $body); + } + + public function testValidateShipmentForYesterday() + { + $shipment = $this->createShipmentToGermany(); + $shipment->setShipDate((new \DateTime('-1 day'))); + $request = new ShipmentOrderRequest(); + $request->setShipments([$shipment]); + $request->setProfile(ParcelShippingRequestBuilder::STANDARD_GRUPPENPROFIL); + $query = $this->buildQueryParams(); + $query['validate'] = true; + $response = $this->buildParcelShipping()->createOrders($request, $query, [], \Mediaopt\DHL\Api\MyAccount\Runtime\Client\Client::FETCH_RESPONSE); + $this->assertInstanceOf(ResponseInterface::class, $response); + $body = $response->getBody()->getContents(); + $payload = \json_decode($body, true); + $this->assertEquals(400, $response->getStatusCode(), $payload['status']['detail']); + $this->assertContains('Please enter a valid shipping date.', $body); + } +} diff --git a/tests/ConfiguratorTest.php b/tests/ConfiguratorTest.php index bdaaef4c..95240935 100644 --- a/tests/ConfiguratorTest.php +++ b/tests/ConfiguratorTest.php @@ -55,32 +55,6 @@ public function testApisClass() $this->assertInstanceOf(Standortsuche::class, $standortsuche); } - public function testSoapEndpointForProductionEnvironment() - { - $configuratorMock = $this->getConfiguratorMock(); - $configuratorMock - ->expects($this->once()) - ->method('isProductionEnvironment') - ->willReturn(true); - - /** @var Standortsuche $standortsuche */ - $standortsuche = $configuratorMock->buildGKV(new \Monolog\Logger(__CLASS__)); - $this->assertContains('production', $standortsuche->getSoapCredentials()->getEndpoint()); - } - - public function testEndpointForSandboxEnvironment() - { - $configuratorMock = $this->getConfiguratorMock(); - $configuratorMock - ->expects($this->once()) - ->method('isProductionEnvironment') - ->willReturn(false); - - /** @var Standortsuche $standortsuche */ - $standortsuche = $configuratorMock->buildGKV(new \Monolog\Logger(__CLASS__)); - $this->assertContains('sandbox', $standortsuche->getSoapCredentials()->getEndpoint()); - } - public function testThatTheLoggerUsesTheLogHandler() { $configuratorMock = $this->getConfiguratorMock(); diff --git a/tests/TestConfigurator.php b/tests/TestConfigurator.php index e4d34598..4826f139 100644 --- a/tests/TestConfigurator.php +++ b/tests/TestConfigurator.php @@ -117,7 +117,7 @@ protected function getStandortsuchePassword() */ protected function getEkp() { - return '2222222222'; + return '3333333333'; } /**