def build_rates_request(origin, destination, line_items = [], options = {}, package = nil, services = [])
      line_items = Array(line_items)

      builder = Nokogiri::XML::Builder.new do |xml|
        xml.public_send('mailing-scenario', :xmlns => "http://www.canadapost.ca/ws/ship/rate") do
          customer_number_node(xml, options)
          contract_id_node(xml, options)
          quote_type_node(xml, options)
          expected_mailing_date_node(xml, shipping_date(options)) if options[:shipping_date]
          shipping_options_node(xml, RATES_OPTIONS, options)
          parcel_node(xml, line_items, package)
          origin_node(xml, origin)
          destination_node(xml, destination)
          services_node(xml, services) unless services.blank?
        end
      end
      builder.to_xml
    end
def build_rates_request(origin, destination, line_items = [], options = {}, package = nil, services = [])
      line_items = Array(line_items)

      builder = Nokogiri::XML::Builder.new do |xml|
        xml.public_send('mailing-scenario', :xmlns => "http://www.canadapost.ca/ws/ship/rate") do
          customer_number_node(xml, options)
          contract_id_node(xml, options)
          quote_type_node(xml, options)
          expected_mailing_date_node(xml, shipping_date(options)) if options[:shipping_date]
          shipping_options_node(xml, RATES_OPTIONS, options)
          parcel_node(xml, line_items, package)
          origin_node(xml, origin)
          destination_node(xml, destination)
          services_node(xml, services) unless services.blank?
        end
      end
      builder.to_xml
    end
rating