Skip to content

Commit

Permalink
add schema version property.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunmoxue committed Jan 4, 2017
1 parent 063eeb7 commit fd1b894
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 7 additions & 1 deletion DHL/Entity/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ abstract class Base extends BaseDataType
*/
protected $_isSubobject = null;

/**
* @var boolean
* Is object a subobject or not
*/
protected $_schemaVersion = '1.0';

/**
* @var boolean
* Render the schema version or not
Expand Down Expand Up @@ -140,7 +146,7 @@ public function toXML(\XMLWriter $xmlWriter = null)

if ($this->_displaySchemaVersion)
{
$xmlWriter->writeAttribute('schemaVersion', '1.0');
$xmlWriter->writeAttribute('schemaVersion', $this->_schemaVersion);
}

if (null !== $this->_xmlNodeName)
Expand Down
7 changes: 6 additions & 1 deletion DHL/Entity/GB/ShipmentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,12 @@ class ShipmentRequest extends Base
'type' => 'string',
'required' => false,
'subobject' => false,
),
),
'NumberOfArchiveDoc' => array(
'type' => 'integer',
'required' => false,
'subobject' => false,
),
'Label' => array(
'type' => 'Label',
'required' => false,
Expand Down

0 comments on commit fd1b894

Please sign in to comment.