Skip to content

Commit

Permalink
Merge pull request #190 from conrad10781/delivery-confirmation
Browse files Browse the repository at this point in the history
Adding Delivery Confirmation functionality to PackageServiceOptions f…
  • Loading branch information
stefandoorn authored Oct 25, 2017
2 parents 7867787 + 4d19234 commit 17c5f77
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/Entity/PackageServiceOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ class PackageServiceOptions implements NodeInterface
*/
private $holdForPickup;

/**
* @var DeliveryConfirmation
*/
private $deliveryConfirmation;

/**
* @param null $parameters
*/
Expand All @@ -60,6 +65,9 @@ public function __construct($parameters = null)
if (isset($parameters->HoldForPickup)) {
$this->setHoldForPickup($parameters->HoldForPickup);
}
if (isset($parameters->DeliveryConfirmation)) {
$this->setDeliveryConfirmation($parameters->DeliveryConfirmation);
}
}
}

Expand Down Expand Up @@ -87,6 +95,9 @@ public function toNode(DOMDocument $document = null)
if ($this->getHazMatPackageInformation() !== null) {
$node->appendChild($this->getHazMatPackageInformation()->toNode($document));
}
if (isset($this->deliveryConfirmation)) {
$node->appendChild($this->deliveryConfirmation->toNode($document));
}

return $node;
}
Expand Down Expand Up @@ -194,4 +205,22 @@ public function setHazMatPackageInformation($hazMatPackageInformation)
{
$this->hazMatPackageInformation = $hazMatPackageInformation;
}

/**
* @param DeliveryConfirmation $deliveryConfirmation
* @return ShipmentServiceOptions
*/
public function setDeliveryConfirmation(DeliveryConfirmation $deliveryConfirmation)
{
$this->deliveryConfirmation = $deliveryConfirmation;
return $this;
}

/**
* @return DeliveryConfirmation|null
*/
public function getDeliveryConfirmation()
{
return $this->deliveryConfirmation;
}
}

0 comments on commit 17c5f77

Please sign in to comment.