diff --git a/src/Entity/LabelDelivery.php b/src/Entity/LabelDelivery.php index e5db141..8fcec67 100644 --- a/src/Entity/LabelDelivery.php +++ b/src/Entity/LabelDelivery.php @@ -13,6 +13,11 @@ class LabelDelivery implements NodeInterface */ public $LabelLinkIndicator; + /** + * @var boolean + */ + public $LabelLinksIndicator; + /** * @var string */ @@ -55,11 +60,17 @@ public function __construct(\stdClass $response = null) { $this->LabelLinkIndicator = null; + $this->LabelLinksIndicator = null; + if (null !== $response) { if (isset($response->LabelLinkIndicator)) { $this->LabelLinkIndicator = true; } + if (isset($response->LabelLinksIndicator)) { + $this->LabelLinksIndicator = true; + } + if (isset($response->EMailAddress)) { $this->setEmailAddress($response->EMailAddress); } @@ -106,6 +117,10 @@ public function toNode(DOMDocument $document = null) $node->appendChild($document->createElement('LabelLinkIndicator', $this->LabelLinkIndicator)); } + if (isset($this->LabelLinksIndicator)) { + $node->appendChild($document->createElement('LabelLinksIndicator', $this->LabelLinksIndicator)); + } + if (isset($this->EMailAddress)) { $node->appendChild($document->createElement('EMailAddress', $this->EMailAddress)); } @@ -155,6 +170,24 @@ public function setLabelLinkIndicator($labelLinkIndicator) return $this; } + /** + * @return string + */ + public function getLabelLinksIndicator() + { + return $this->LabelLinksIndicator; + } + + /** + * @return $this + */ + public function setLabelLinksIndicator($labelLinksIndicator) + { + $this->LabelLinksIndicator = $labelLinksIndicator; + + return $this; + } + /** * @return string */ diff --git a/src/Entity/ShipmentServiceOptions.php b/src/Entity/ShipmentServiceOptions.php index b2b9f18..fdea228 100644 --- a/src/Entity/ShipmentServiceOptions.php +++ b/src/Entity/ShipmentServiceOptions.php @@ -188,7 +188,7 @@ public function toNode(DOMDocument $document = null) $emailMessageNode = $labelDeliveryNode->appendChild($document->createElement('EMailMessage')); $labelDelivery = $this->getLabelDelivery(); foreach ($labelDelivery as $key => $value) { - if ($key == 'LabelLinkIndicator') { + if ($key == 'LabelLinksIndicator') { $labelDeliveryNode->appendChild($document->createElement($key, $value)); } elseif ($key == 'SubjectCode') { $SubjectNode = $emailMessageNode->appendChild($document->createElement('Subject'));