def purchasing_xml
      purch = REXML::Element.new('purchasing')

      purch.add_element('applecare_id').text = @applecare_id
      purch.add_element('is_leased').text = @is_leased
      purch.add_element('is_purchased').text = @is_purchased.to_s
      purch.add_element('lease_expires_epoch').text = @lease_expires ? @lease_expires.to_jss_epoch : nil
      # Note, life expectancy can't be an empty xml element, it must be zero if emtpy.
      purch.add_element('life_expectancy').text = @life_expectancy ? @life_expectancy : 0
      purch.add_element('po_date_epoch').text = @po_date ? @po_date.to_jss_epoch : nil
      purch.add_element('po_number').text = @po_number
      purch.add_element('purchase_price').text = @purchase_price
      purch.add_element('purchasing_account').text = @purchasing_account
      purch.add_element('purchasing_contact').text = @purchasing_contact
      purch.add_element('vendor').text = @vendor
      purch.add_element('warranty_expires_epoch').text = @warranty_expires ? @warranty_expires.to_jss_epoch : nil
      return purch
    end
def purchasing_xml
      purch = REXML::Element.new('purchasing')

      purch.add_element('applecare_id').text = @applecare_id
      purch.add_element('is_leased').text = @is_leased
      purch.add_element('is_purchased').text = @is_purchased.to_s
      purch.add_element('lease_expires_epoch').text = @lease_expires ? @lease_expires.to_jss_epoch : nil
      # Note, life expectancy can't be an empty xml element, it must be zero if emtpy.
      purch.add_element('life_expectancy').text = @life_expectancy ? @life_expectancy : 0
      purch.add_element('po_date_epoch').text = @po_date ? @po_date.to_jss_epoch : nil
      purch.add_element('po_number').text = @po_number
      purch.add_element('purchase_price').text = @purchase_price
      purch.add_element('purchasing_account').text = @purchasing_account
      purch.add_element('purchasing_contact').text = @purchasing_contact
      purch.add_element('vendor').text = @vendor
      purch.add_element('warranty_expires_epoch').text = @warranty_expires ? @warranty_expires.to_jss_epoch : nil
      return purch
    end
@api private

 @return [REXML::Element] A <purchasing> element to be
   included in the rest_xml of objects that mix-in this module.