diff --git a/src/Entity/PackagingType.php b/src/Entity/PackagingType.php index afa5148..4b69d73 100644 --- a/src/Entity/PackagingType.php +++ b/src/Entity/PackagingType.php @@ -65,11 +65,17 @@ class PackagingType implements NodeInterface */ private $code = self::PT_UNKNOWN; + /** @deprecated */ + private $Code = self::PT_UNKNOWN; + /** * @var string */ private $description; + /** @deprecated */ + private $Description; + public function __construct($attributes = null) { if (isset($attributes->Description)) { @@ -93,7 +99,7 @@ public function toNode(DOMDocument $document = null) $node = $document->createElement('PackagingType'); $node->appendChild($document->createElement('Code', $this->getCode())); - $node->appendChild($document->createElement('Description', $this->getDescription())); + $node->appendChild($document->createElement('Description', $this->getDescription() ?? '')); return $node; } diff --git a/src/Entity/PickupType.php b/src/Entity/PickupType.php index e0f4258..6ad0ea1 100644 --- a/src/Entity/PickupType.php +++ b/src/Entity/PickupType.php @@ -43,7 +43,7 @@ public function toNode(DOMDocument $document = null) $node = $document->createElement('PickupType'); $node->appendChild($document->createElement('Code', $this->getCode())); - $node->appendChild($document->createElement('Description', $this->getDescription())); + $node->appendChild($document->createElement('Description', $this->getDescription() ?? '')); return $node; } diff --git a/src/Entity/Service.php b/src/Entity/Service.php index 137753d..5bdb231 100644 --- a/src/Entity/Service.php +++ b/src/Entity/Service.php @@ -157,7 +157,7 @@ public function toNode(DOMDocument $document = null) $node = $document->createElement('Service'); $node->appendChild($document->createElement('Code', $this->getCode())); - $node->appendChild($document->createElement('Description', $this->getDescription())); + $node->appendChild($document->createElement('Description', $this->getDescription() ?? '')); return $node; } diff --git a/src/Entity/ShipFrom.php b/src/Entity/ShipFrom.php index a192b51..0419b02 100644 --- a/src/Entity/ShipFrom.php +++ b/src/Entity/ShipFrom.php @@ -22,7 +22,7 @@ public function toNode(DOMDocument $document = null) $node = $document->createElement('ShipFrom'); if ($this->getCompanyName()) { - $node->appendChild($document->createElement('CompanyName', $this->getCompanyName())); + $node->appendChild($document->createElement('CompanyName', $this->getCompanyName() ?? '')); } if ($this->getAttentionName()) { diff --git a/src/Entity/ShipTo.php b/src/Entity/ShipTo.php index f2330cb..9862986 100644 --- a/src/Entity/ShipTo.php +++ b/src/Entity/ShipTo.php @@ -142,8 +142,8 @@ public function toNode(DOMDocument $document = null) } $node = $document->createElement('ShipTo'); - $node->appendChild($document->createElement('CompanyName', $this->getCompanyName())); - $node->appendChild($document->createElement('AttentionName', $this->getAttentionName())); + $node->appendChild($document->createElement('CompanyName', $this->getCompanyName() ?? '')); + $node->appendChild($document->createElement('AttentionName', $this->getAttentionName() ?? '')); $address = $this->getAddress(); if (isset($address)) { diff --git a/src/Entity/ShipmentIndicationType.php b/src/Entity/ShipmentIndicationType.php index be438ac..3b868ec 100644 --- a/src/Entity/ShipmentIndicationType.php +++ b/src/Entity/ShipmentIndicationType.php @@ -40,7 +40,7 @@ public function toNode(DOMDocument $document = null) $node->appendChild($document->createElement('Code', $this->getCode())); if ($this->getDescription()) { - $node->appendChild($document->createElement('Description', $this->getDescription())); + $node->appendChild($document->createElement('Description', $this->getDescription() ?? '')); } return $node; diff --git a/src/Entity/UnitOfMeasurement.php b/src/Entity/UnitOfMeasurement.php index eb04d17..94f1ae2 100644 --- a/src/Entity/UnitOfMeasurement.php +++ b/src/Entity/UnitOfMeasurement.php @@ -102,7 +102,7 @@ public function toNode(DOMDocument $document = null) if (null !== $document) { $node = $document->createElement('UnitOfMeasurement'); $node->appendChild($document->createElement('Code', $this->getCode())); - $node->appendChild($document->createElement('Description', $this->getDescription())); + $node->appendChild($document->createElement('Description', $this->getDescription() ?? '')); return $node; }