def parse!
      unless raw.has_key?(:sales_orders)
        raw[:sales_orders] = {}
      end

      # force orders to be an array
      orders = raw[:sales_orders].fetch(:sales_order_summary, {})
      unless orders.kind_of?(Array)
        raw[:sales_orders][:sales_order_summary] = [orders]
      end

      # typecast :count_more_sales_orders_available to integer
      if raw.has_key?(:count_more_sales_orders_available)
        convert_to_integer!(:count_more_sales_orders_available, raw)
      end

      # typecast :count_sales_orders_returned to integer
      if raw.has_key?(:count_sales_orders_returned)
        convert_to_integer!(:count_sales_orders_returned, raw)
      end

      raw[:sales_orders][:sales_order_summary].each do |summary|

        # typecast :shipment_key to integer
        if summary.fetch(:shipments, {}).fetch(:shipment_summary, {}).has_key?(:shipment_key)
          convert_to_integer!(:shipment_key, summary[:shipments][:shipment_summary])
        end

        # typecast :zip1 to integer
        if summary.fetch(:shipments, {}).fetch(:shipment_summary, {}).fetch(:ship_to, {}).has_key?(:zip1)
          convert_to_integer!(:zip1, summary[:shipments][:shipment_summary][:ship_to])
        end
      end
    end
def parse!
      unless raw.has_key?(:sales_orders)
        raw[:sales_orders] = {}
      end

      # force orders to be an array
      orders = raw[:sales_orders].fetch(:sales_order_summary, {})
      unless orders.kind_of?(Array)
        raw[:sales_orders][:sales_order_summary] = [orders]
      end

      # typecast :count_more_sales_orders_available to integer
      if raw.has_key?(:count_more_sales_orders_available)
        convert_to_integer!(:count_more_sales_orders_available, raw)
      end

      # typecast :count_sales_orders_returned to integer
      if raw.has_key?(:count_sales_orders_returned)
        convert_to_integer!(:count_sales_orders_returned, raw)
      end

      raw[:sales_orders][:sales_order_summary].each do |summary|

        # typecast :shipment_key to integer
        if summary.fetch(:shipments, {}).fetch(:shipment_summary, {}).has_key?(:shipment_key)
          convert_to_integer!(:shipment_key, summary[:shipments][:shipment_summary])
        end

        # typecast :zip1 to integer
        if summary.fetch(:shipments, {}).fetch(:shipment_summary, {}).fetch(:ship_to, {}).has_key?(:zip1)
          convert_to_integer!(:zip1, summary[:shipments][:shipment_summary][:ship_to])
        end
      end
    end
Standardizes the XML response by converting fields to integers
 and forcing the order summaries into an array.