def method_missing(name, *args)
    # Queries
    if @collections.include?(name.to_s)
      @query = build_collection_query_object(name,@additional_params, *args)
      return @query
    # Adds
    elsif name.to_s =~ /^AddTo(.*)/
      type = $1
      if @collections.include?(type)
        @save_operations << Operation.new("Add", $1, args[0])
      else
        super
      end
    elsif @function_imports.include?(name.to_s)
      execute_import_function(name.to_s, args)
    else
      super
    end
  end
def method_missing(name, *args)
    # Queries
    if @collections.include?(name.to_s)
      @query = build_collection_query_object(name,@additional_params, *args)
      return @query
    # Adds
    elsif name.to_s =~ /^AddTo(.*)/
      type = $1
      if @collections.include?(type)
        @save_operations << Operation.new("Add", $1, args[0])
      else
        super
      end
    elsif @function_imports.include?(name.to_s)
      execute_import_function(name.to_s, args)
    else
      super
    end
  end
Creates a new instance of the Service class

 @param [String] service_uri the root URI of the OData service
 @param [Hash] options the options to pass to the service
 @option options [String] :username for http basic auth
 @option options [String] :password for http basic auth
 @option options [Object] :verify_ssl false if no verification, otherwise mode (OpenSSL::SSL::VERIFY_PEER is default)
 @option options [Hash] :rest_options a hash of rest-client options that will be passed to all OData::Resource.new calls
 @option options [Hash] :additional_params a hash of query string params that will be passed on all calls
 @option options [Boolean, true] :eager_partial true if queries should consume partial feeds until the feed is complete, false if explicit calls to next must be performed
 Handles the dynamic `AddTo<EntityName>` methods as well as the collections on the service