         self.configuration = configuration
     }
 
-    /// Receives expecte result  as defined by the `adaptor` from the a `Service` and maps this to a `Result` case `case Model(M)`
+    /// Receives expected result  as defined by the `adaptor` from the a `Service` and maps this to a `Result` case `case Model(M)`
     /// Default implementation expects `adaptor` to be     case JSON(AnyObject). If this needs to be different you need to override this method.
     /// Typ! You can subclass 'Bar' and add a default service
     /// - parameter call : gives the details to find the entity on the server

            printFaroError(returnError)
            return returnError
        }
        
        return nil
    }
}


// MARK: - Convenience methods

/// The perform methods are preferred but these methods are for convienience.
/// They do some default error handling.
extension Service {

    /// Performs the call to the server. Provide a model
    /// - parameter call: where can the server be found?
    /// - parameter fail: if we cannot initialize the model this call will fail and print the failure.
    /// - parameter ok: returns initialized model
    func performSingle<ModelType: Deserializable>(_ call: Call, fail: @escaping (FaroError)->(), ok:@escaping (ModelType)->()) {
        perform(call) { (result: Result<ModelType>) in
            switch result {
            case .model(let model):
                guard let model = model else {
                    fail(.malformed(info: "Model could not be initialized. Maybe your init(from raw:) failed?"))
                    return
                }
                ok(model)
            default:
                self.handleFailure(failedResult: result, fail: fail)
            }
        }
    }

    /// Performs the call to the server. Provide a model
    /// - parameter call: where can the server be found?
    /// - parameter fail: if we cannot initialize the model this call will fail and print the failure.
    /// - parameter ok: returns initialized array of models
    func performCollection<ModelType: Deserializable>(_ call: Call, fail: @escaping (FaroError)->(), ok:@escaping ([ModelType])->()) {
        perform(call) { (result: Result<ModelType>) in
            switch result {
            case .models(let models):
                guard let models = models else {
                    fail(.malformed(info: "Model could not be initialized. Maybe your init(from raw:) failed?"))
                    return
                }
                ok(models)
            default:
                self.handleFailure(failedResult: result, fail: fail)
            }
        }
    }

    func performSingle<ModelType: Deserializable, PagingType: Deserializable>(_ call: Call, pagingInformation: @escaping(PagingType?)->(), fail: @escaping (FaroError)->(), ok:@escaping (ModelType)->()) {
        perform(call, pagingInformation: pagingInformation) { (result: Result<ModelType>) in
            switch result {
            case .model(let model):
                guard let model = model else {
                    fail(.malformed(info: "Model could not be initialized. Maybe your init(from raw:) failed?"))
                    return
                }
                ok(model)
            default:
                self.handleFailure(failedResult: result, fail: fail)
            }
        }
    }

    func performCollection<ModelType: Deserializable, PagingType: Deserializable>(_ call: Call, pagingInformation: @escaping(PagingType?)->(), fail: @escaping (FaroError)->(), ok:@escaping ([ModelType])->()) {
        perform(call, pagingInformation: pagingInformation) { (result: Result<ModelType>) in
            switch result {
            case .models(let models):
                guard let models = models else {
                    fail(.malformed(info: "Models could not be initialized. Maybe your init(from raw:) failed?"))
                    return
                }
                ok(models)
            default:
                self.handleFailure(failedResult: result, fail: fail)
            }
        }
    }

}

// MARK: Class implementation

/// Default implementation of a service.
/// Serves your `Order` to a server and parses the respons.
/// Response is delivered to you as a `Result`. The result type depends on the adaptor you have set in the 'Configuration'.
