/**
  * {@inheritDoc}
  * 
  * Format:
  * 
  *  <ProductKit_Generate_Variants product_code="test" pricing_method="master"/>
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<ProductKit_Generate_Variants />');
     $xmlObject->addAttribute('product_code', $this->getProductCode());
     $xmlObject->addAttribute('pricing_method', $this->getPricingMethod());
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  * 
  * Format:
  * 
  *  <CategoryProduct_Assign category_code="Food" product_code="ale-gallon" />
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<CategoryProduct_Assign />');
     $xmlObject->addAttribute('category_code', $this->getCategoryCode());
     $xmlObject->addAttribute('product_code', $this->getProductCode());
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  *
  * Format:
  *
  * <CouponPriceGroup_Assign coupon_code="xxx" group_name="yyy" />
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<CouponPriceGroup_Assign />');
     $xmlObject->addAttribute('coupon_code', $this->getCouponCode());
     $xmlObject->addAttribute('group_name', $this->getGroupName());
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  * 
  * Format:
  * 
  * <AvailabilityGroupProduct_Assign group_name="Thief" product_code="kit-disguise" />
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<AvailabilityGroupCustomer_Assign />');
     $xmlObject->addAttribute('group_name', $this->getGroupName());
     $xmlObject->addAttribute('product_code', $this->getProductCode());
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  * 
  * Format:
  * 
  *  <ProductImage_Delete product_code="test" filepath="graphics/00000001/s2k_silver_front.jpg" />
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<ProductImage_Add></ProductImage_Add>');
     $xmlObject->addAttribute('product_code', $this->getProductCode());
     $xmlObject->addAttribute('filepath', $this->getFilePath());
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  *
  * Format:
  *
  * <Order_Delete_Item order_id="1000" line_id="1000" />
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<Order_Delete_Item />');
     $xmlObject->addAttribute('order_id', $this->getOrderId());
     $xmlObject->addAttribute('line_id', $this->getLineId());
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  * 
  * Format:
  * 
  *  <Attribute_Option attribute_code="select" option_code="s1" />
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<Attribute_Option />');
     $xmlObject->addAttribute('attribute_code', $this->getAttributeCode());
     $xmlObject->addAttribute('option_code', $this->getOptionCode());
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  *
  * Format:
  *
  * <ProductAttribute_Delete product_code="chest" attribute_code="bar" />
  *
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<ProductAttribute_Delete />');
     $xmlObject->addAttribute('product_code', $this->getProductCode());
     $xmlObject->addAttribute('attribute_code', $this->getAttributeCode());
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  *
  * Format:
  *
  *  <Attribute_Boolean attribute_code="text" present="true"/>
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<Attribute_Boolean />');
     $xmlObject->addAttribute('attribute_code', $this->getAttributeCode());
     $xmlObject->addAttribute('present', $this->getPresent() ? 'true' : 'false');
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  *
  * Format:
  *
  * <ShippingMethod module_code="upsxml" method_code="02" />
  *
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<ShippingMethod />');
     $xmlObject->addAttribute('module_code', $this->getModuleCode());
     $xmlObject->addAttribute('method_code', $this->getMethodCode());
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  *
  * Format:
  *
  * <CouponCustomer_Assign coupon_code="xxx" customer_login="******" />
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<CouponCustomer_Assign />');
     $xmlObject->addAttribute('coupon_code', $this->getCouponCode());
     $xmlObject->addAttribute('customer_login', $this->getCustomerLogin());
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  *
  * Format:
  *
  *  <ProductRelatedProduct_Unassign product_code="bolts" relatedproduct_code="bolts-silver" />
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<ProductRelatedProduct_Unassign />');
     $xmlObject->addAttribute('product_code', $this->getProductCode());
     $xmlObject->addAttribute('relatedproduct_code', $this->getRelatedProductCode());
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  * 
  * Format:
  * 
  * <AttributeTemplate_Add code="spikes-armor" prompt="Armor Spikes" />
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<AttributeTemplate_Add />');
     $xmlObject->addAttribute('code', $this->getCode());
     $xmlObject->addAttribute('prompt', $this->getPrompt());
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  * 
  * Format:
  * 
  * <Module code="customfields" feature="fields_prod">
  *      <ProductField_Delete code="code" />
  *  </Module>
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<Module />');
     $xmlObject->addAttribute('code', 'customfields');
     $xmlObject->addAttribute('feature', 'fields_prod');
     $mainTag = $xmlObject->addChild('ProductField_Delete');
     $mainTag->addAttribute('Code', $this->getCode());
     return $xmlObject;
 }
Beispiel #15
0
 /**
  * {@inheritDoc}
  *
  * Format:
  *
  *  <Module code="discount_volume" feature="discount">
  *      <!-- Non-existent product -->
  *      <ProductPricingTable group_name="Volume Pricing Product Provisioning Test 01" product_code="non-existent" />
  *  </Module>
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<Module />');
     $xmlObject->addAttribute('code', 'discount_volume');
     $xmlObject->addAttribute('feature', 'discount');
     foreach ($this->getProductPricingTables() as $productPricingTable) {
         XmlHelper::appendToParent($xmlObject, $productPricingTable->toXml($version, $options));
     }
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  * 
  * Format:
  * 
  * <Module code="customfields" feature="fields_cust">
  *  <CustomerField_Value customer="login" field="code">No</CustomerField_Value>
  * </Module>
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<Module />');
     $xmlObject->addAttribute('code', 'customfields');
     $xmlObject->addAttribute('feature', 'fields_cust');
     $mainTag = $xmlObject->addChild('CustomerField_Value', $this->getValue());
     $mainTag->addAttribute('customer', $this->getCustomerLogin());
     $mainTag->addAttribute('field', $this->getFieldCode());
     return $xmlObject;
 }
Beispiel #17
0
 /**
  * {@inheritDoc}
  * 
  * Format:
  * 
  * <Module code="customfields" feature="util">
  *   <Group_Add>
  *      <Code>group_code</Code>
  *      <Name>Group Name</Name>
  *  </Group_Add>
  * </Module>
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<Module />');
     $xmlObject->addAttribute('code', 'customfields');
     $xmlObject->addAttribute('feature', 'util');
     $mainTag = $xmlObject->addChild('Group_Add');
     $mainTag->addChild('Code', $this->getCode());
     $mainTag->addChild('Name', $this->getName())->addAttribute('method-call', 'addCDATA');
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  * 
  * Format:
  * 
  * <Item code="product_display">
  *      <ImageDimensions constrain="no"/>
  * </Item>
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<Item />');
     $xmlObject->addAttribute('code', $this->getCode());
     XmlHelper::appendArrayToParent($xmlObject, $this->getData());
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  *
  * Format:
  *
  * <Coupon_Delete code="xxx" />
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     if ($version < Version::NINE) {
         return;
     }
     $xmlObject = new SimpleXMLElement('<Coupon_Delete />');
     $xmlObject->addAttribute('code', $this->getCode());
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  * 
  * Format:
  * 
  * <AvailabilityGroup_Add name="Thief" />
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<AvailabilityGroup_Add />');
     $xmlObject->addAttribute('name', $this->getName());
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  * 
  * Format:
  * 
  * <ImageType_Update code="type_1">
  *       <Code>type_a</Code>
  * </ImageType_Update>
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<ImageType_Update></ImageType_Update>');
     $xmlObject->addAttribute('code', $this->getCode());
     $xmlObject->addChild('Description', $this->getDescription());
     if ($this->getNewCode()) {
         $xmlObject->addChild('Code', $this->getNewCode());
     }
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  *
  * Format:
  *  <Order_Add_Product order_id="X">
  *      <Code></Code>
  *      <Status></Status>
  *      <Quantity></Quantity>
  *      <TrackingNumber></TrackingNumber> <!-- optional -->
  *      <TrackingType></TrackingType> <!-- optional -->
  *      <Shipment>
  *          <!-- SEE Child/OrderShipment -->
  *      </Shipment>
  * </Order_Add_Product>
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<Order_Add_Product />');
     $xmlObject->addAttribute('order_id', $this->getOrderId());
     $xmlObject->addChild('Code', $this->getCode());
     $xmlObject->addChild('Status', $this->getStatus());
     if ($this->getTrackingNumber()) {
         $xmlObject->addChild('TrackingNumber', $this->getTrackingNumber());
     }
     if ($this->getTrackingType()) {
         $xmlObject->addChild('TrackingType', $this->getTrackingType());
     }
     if ($this->getShipment()) {
         XmlHelper::appendToParent($xmlObject, $this->getShipment()->toXml());
     }
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  * 
  * Format:
  * 
  *  <Category_Update code="Food">
  *      <Name>Name</Name>
  *      <Active>True</Active>
  *      <ParentCategoryCode>Goods</ParentCategoryCode>
  *  </Category_Update>
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<Category_Update />');
     $xmlObject->addAttribute('code', $this->getCode());
     if ($this->getName()) {
         $xmlObject->addChild('Name', $this->getName());
     }
     if ($this->getNewCode()) {
         $xmlObject->addChild('Code', $this->getNewCode());
     }
     if ($this->getParentCategoryCode()) {
         $xmlObject->addChild('ParentCategoryCode', $this->getParentCategoryCode());
     }
     if ($this->getAlternateDisplayPage()) {
         $xmlObject->addChild('AlternateDisplayPage', $this->getAlternateDisplayPage());
     }
     $xmlObject->addChild('Active', $this->getActive() ? 'Yes' : 'No');
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  * 
  * Format:
  * 
  * <OrderShipment_SetStatus code="SHIPMENT_CODE">
  *       <MarkAsShipped>1</MarkAsShipped>                (Optional)
  *       <TrackingNumber>0123456</TrackingNumber>        (Optional)
  *       <TrackingType>FedEx</TrackingType>              (Optional)
  *       <ShipDate>                                      (Optional)
  *           <Day>01</Day>                                   (required)
  *           <Month>01</Month>                               (required)
  *           <Year>1970</Year>                               (required)
  *           <Minute>30</Minute>                             (optional)
  *           <Hour>12</Hour>                                 (optional)
  *       </ShipDate>
  *   </OrderShipment_SetStatus>
  *
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<OrderShipment_SetStatus />');
     $xmlObject->addAttribute('code', $this->getCode());
     if ($this->getMarkAsShipped()) {
         $xmlObject->addChild('MarkAsShipped', $this->getMarkAsShipped());
     }
     if ($this->getTrackingNumber()) {
         $xmlObject->addChild('TrackingNumber', $this->getTrackingNumber());
     }
     if ($this->getTrackingType()) {
         $xmlObject->addChild('TrackingType', $this->getTrackingType());
     }
     if ($this->getShipDate() instanceof \DateTime) {
         $shipDateXml = $xmlObject->addChild('ShipDate');
         XmlHelper::dateTimeToXml($shipDateXml, $this->getShipDate());
     }
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  * 
  * Format:
  * 
  * <ProductKit_Update product_code="test">
  *      <AttributeTemplateAttribute_Option attribute_code="test" attributetemplateattribute_code="radio" option_code="r2"/>
  *      <Parts>
  *          <Part product_code="part" quantity="4"/>
  *      </Parts>
  * </ProductKit_Update>
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<ProductKit_Update />');
     $xmlObject->addAttribute('product_code', $this->getProductCode());
     foreach ($this->getAttributes() as $attribute) {
         XmlHelper::appendToParent($xmlObject, $attribute->toXml());
     }
     if (count($this->getParts())) {
         $partsXmlRoot = $xmlObject->addChild('Parts');
         foreach ($this->getParts() as $part) {
             XmlHelper::appendToParent($partsXmlRoot, $part->toXml());
         }
     }
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  *
  * Format:
  *
  *   <Customer_Update login="******">
  *       <Login>c1</Login>
  *       <LostPasswordEmail>noreply@miva.com</LostPasswordEmail>
  *       <Password>c1</Password>
  *       <ShipFirstName>Testy</ShipFirstName>
  *       <ShipLastName>Testerman</ShipLastName>
  *       <ShipEmail>noreply@miva.com</ShipEmail>
  *       <ShipPhone>555-555-5555</ShipPhone>
  *       <ShipFax>555-555-1212</ShipFax>
  *       <ShipCompany>MivaCorp</ShipCompany>
  *       <ShipAddress>5060 Santa Fe St</ShipAddress>
  *       <ShipCity>San Diego</ShipCity>
  *       <ShipStateCode>CA</ShipStateCode>
  *       <ShipZip>92109</ShipZip>
  *       <ShipCountryCode>US</ShipCountryCode>
  *       <BillFirstName>Testy</BillFirstName>
  *       <BillLastName>Testerman</BillLastName>
  *       <BillEmail>noreply@miva.com</BillEmail>
  *       <BillPhone>555-555-5555</BillPhone>
  *       <BillFax>555-555-1212</BillFax>
  *       <BillCompany>MivaCorp</BillCompany>
  *       <BillAddress>5060 Santa Fe St</BillAddress>
  *       <BillCity>San Diego</BillCity>
  *       <BillStateCode>CA</BillStateCode>
  *       <BillZip>92109</BillZip>
  *       <BillCountryCode>US</BillCountryCode>
  *   </Customer_Update>
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<Customer_Update />');
     $xmlObject->addAttribute('login', $this->getLogin());
     if ($this->getNewLogin()) {
         $xmlObject->addChild('Login', $this->getNewLogin());
     }
     if ($this->getLostPasswordEmail()) {
         $xmlObject->addChild('LostPasswordEmail', $this->getLostPasswordEmail());
     }
     if ($this->getPassword()) {
         $xmlObject->addChild('Password', $this->getPassword());
     }
     if ($this->getShipFirstName()) {
         $xmlObject->addChild('ShipFirstName', $this->getShipFirstName());
     }
     if ($this->getShipLastName()) {
         $xmlObject->addChild('ShipLastName', $this->getShipLastName());
     }
     if ($this->getShipEmail()) {
         $xmlObject->addChild('ShipEmail', $this->getShipEmail());
     }
     if ($this->getShipPhone()) {
         $xmlObject->addChild('ShipPhone', $this->getShipPhone());
     }
     if ($this->getShipFax()) {
         $xmlObject->addChild('ShipFax', $this->getShipFax());
     }
     if ($this->getShipCompany()) {
         $xmlObject->addChild('ShipCompany', $this->getShipCompany());
     }
     if ($this->getShipAddress()) {
         $xmlObject->addChild('ShipAddress', $this->getShipAddress());
     }
     if ($this->getShipCity()) {
         $xmlObject->addChild('ShipCity', $this->getShipCity());
     }
     if ($this->getShipStateCode()) {
         $xmlObject->addChild('ShipStateCode', $this->getShipStateCode());
     }
     if ($this->getShipZip()) {
         $xmlObject->addChild('ShipZip', $this->getShipZip());
     }
     if ($this->getShipCountryCode()) {
         $xmlObject->addChild('ShipCountryCode', $this->getShipCountryCode());
     }
     if ($this->getBillFirstName()) {
         $xmlObject->addChild('BillFirstName', $this->getBillFirstName());
     }
     if ($this->getBillLastName()) {
         $xmlObject->addChild('BillLastName', $this->getBillLastName());
     }
     if ($this->getBillEmail()) {
         $xmlObject->addChild('BillEmail', $this->getBillEmail());
     }
     if ($this->getBillPhone()) {
         $xmlObject->addChild('BillPhone', $this->getBillPhone());
     }
     if ($this->getBillFax()) {
         $xmlObject->addChild('BillFax', $this->getBillFax());
     }
     if ($this->getBillCompany()) {
         $xmlObject->addChild('BillCompany', $this->getBillCompany());
     }
     if ($this->getBillAddress()) {
         $xmlObject->addChild('BillAddress', $this->getBillAddress());
     }
     if ($this->getBillCity()) {
         $xmlObject->addChild('BillCity', $this->getBillCity());
     }
     if ($this->getBillStateCode()) {
         $xmlObject->addChild('BillStateCode', $this->getBillStateCode());
     }
     if ($this->getBillZip()) {
         $xmlObject->addChild('BillZip', $this->getBillZip());
     }
     if ($this->getBillCountryCode()) {
         $xmlObject->addChild('BillCountryCode', $this->getBillCountryCode());
     }
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  * 
  * Format:
  *
  * <ImageType_Delete code="type_a"/>
  *   
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<ImageType_Delete></ImageType_Delete>');
     $xmlObject->addAttribute('code', $this->getCode());
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  * 
  * Format:
  * 
  * <Country_Delete name="Burchtopia is great" />
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<Country_Delete></Country_Delete>');
     $xmlObject->addAttribute('name', $this->getName());
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  *
  * Format:
  *
  *     <AttributeTemplateAttribute_Update template_code="spikes-armor" attribute_code="armor">
  *        <Code>spikes</Code>
  *        <Type>checkbox</Type>
  *        <Prompt><![CDATA[Would you like to add spikes to the armor? (+500 sp)]]></Prompt>
  *        <Image></Image>
  *        <Price>500.00</Price>
  *        <Cost>375.00</Cost>
  *        <Weight>0.00</Weight>
  *        <Required>No</Required>
  *        <Inventory>No</Inventory>
  *    </AttributeTemplateAttribute_Update>
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<AttributeTemplateAttribute_Update />');
     $xmlObject->addAttribute('template_code', $this->getTemplateCode());
     $xmlObject->addAttribute('attribute_code', $this->getAttributeCode());
     if ($this->getCode()) {
         $xmlObject->addChild('Code', $this->getCode());
     }
     if ($this->getType()) {
         $xmlObject->addChild('Type', $this->getType());
     }
     if ($this->getPrompt()) {
         $xmlObject->addChild('Prompt', $this->getPrompt())->addAttribute('method-call', 'addCDATA');
     }
     if ($this->getImage()) {
         $xmlObject->addChild('Image', $this->getImage());
     }
     if ($this->getPrice()) {
         $xmlObject->addChild('Price', $this->getPrice());
     }
     if ($this->getCost()) {
         $xmlObject->addChild('Cost', $this->getCost());
     }
     if ($this->getWeight()) {
         $xmlObject->addChild('Weight', $this->getWeight());
     }
     $xmlObject->addChild('Required', $this->getRequired() ? 'Yes' : 'No');
     $xmlObject->addChild('Inventory', $this->getInventory() ? 'Yes' : 'No');
     return $xmlObject;
 }
 /**
  * {@inheritDoc}
  * 
  * Format:
  * 
  * <ShippingMethodRules_Update module_code="upsxml" method_code="02">
  *       
  *       <Priority>5</Priority>
  *       <Description>2 Day Air</Description>
  *       <MinimumSubTotal>0.00</MinimumSubTotal>
  *       <MaximumSubTotal>0.00</MaximumSubTotal>
  *       <MinimumQuantity>0</MinimumQuantity>
  *       <MaximumQuantity>0</MaximumQuantity>
  *       <MinimumWeight>0.00</MinimumWeight>
  *       <MaximumWeight>0.00</MaximumWeight>
  *       <States>
  *           <State code="CA"/>
  *           <State code="OH"/>
  *       </States>
  *
  *        <ZipCodes>92109,44145</ZipCodes>
  *
  *            <Countries>
  *                <Country code="US"/>
  *                <Country code="GB"/>
  *            </Countries>
  *
  *            <Exclusions>
  *                <Excludes module_code="flatrate" method_code="flat_2day"/>     
  *                <ExcludedBy module_code="baseunit" method_code="base_2day"/>  
  *            </Exclusions>
  *        </ShippingMethodRules_Update>
  */
 public function toXml($version = Version::CURRENT, array $options = array())
 {
     $xmlObject = new SimpleXMLElement('<ShippingMethodRules_Update />');
     $xmlObject->addAttribute('module_code', $this->getModuleCode());
     $xmlObject->addAttribute('method_code', $this->getMethodCode());
     $xmlObject->addChild('Priority', $this->getPriority());
     $xmlObject->addChild('Description', $this->getDescription());
     $xmlObject->addChild('MinimumSubTotal', $this->getMinimumSubTotal());
     $xmlObject->addChild('MaximumSubTotal', $this->getMaximumSubTotal());
     $xmlObject->addChild('MinimumQuantity', $this->getMinimumQuantity());
     $xmlObject->addChild('MaximumQuantity', $this->getMaximumQuantity());
     $xmlObject->addChild('MinimumWeight', $this->getMinimumWeight());
     $xmlObject->addChild('MaximumWeight', $this->getMaximumWeight());
     if (count($this->getStates())) {
         $statesXmlRoot = $xmlObject->addChild('States');
         foreach ($this->getStates() as $state) {
             XmlHelper::appendToParent($statesXmlRoot, $state->toXml($version, $options));
         }
     }
     if (count($this->getZipCodes())) {
         $xmlObject->addChild('ZipCodes', implode(',', $this->getZipCodes()));
     }
     if (count($this->getCountries())) {
         $countriesXmlRoot = $xmlObject->addChild('Countries');
         foreach ($this->getCountries() as $country) {
             XmlHelper::appendToParent($countriesXmlRoot, $country->toXml($version, $options));
         }
     }
     if (count($this->getExclusions())) {
         $exclusionsXmlRoot = $xmlObject->addChild('Exclusions');
         foreach ($this->getExclusions() as $exclusion) {
             XmlHelper::appendToParent($exclusionsXmlRoot, $exclusion->toXml($version, $options));
         }
     }
     return $xmlObject;
 }