def shipping_methods(methods)
      # We need to check that the necessary keys are in the hash,
      # Otherwise the error will happen in the middle of to_xml,
      # and the bug will be harder to track.
      
      methods.each do |method|
        missing_keys = [ :name, :price ].select { |key|
          !method.include? key
        }
        unless missing_keys.empty?
          raise ArgumentError,
          "Required keys missing: #{missing_keys.inspect}"
        end
      end
      
      @shipping_methods = methods
    end
def shipping_methods(methods)
      # We need to check that the necessary keys are in the hash,
      # Otherwise the error will happen in the middle of to_xml,
      # and the bug will be harder to track.
      
      methods.each do |method|
        missing_keys = [ :name, :price ].select { |key|
          !method.include? key
        }
        unless missing_keys.empty?
          raise ArgumentError,
          "Required keys missing: #{missing_keys.inspect}"
        end
      end
      
      @shipping_methods = methods
    end
This method sets the shipping methods
 +options+ should be an array with hashes containing the following options:
 * name
 * price
 You may fill an some optional values as well:
 * currency (defaults to 'USD')