     @method query
     @public
     @param {Object} [params] query parameters
+    @param {ResourceClientInterface} [client=@client]
     @return {Promise<Array>} array of entities
     ###
-    query: (params) ->
-        @client.find(params).then (objs) =>
+    query: (params, client) ->
+        client ?= @client
+        client.find(params).then (objs) =>
             return (@factory.createFromObject(obj) for obj in objs)
 
 

    @method singleQuery
    @public
    @param {Object} [params] query parameters
    @return {Promise<Entity>} entity
    ###
    singleQuery: (params) ->
        @client.findOne(params).then (obj) =>
            return @factory.createFromObject(obj)



    @method get
    @public
    @param {any} id
    @param {ResourceClientInterface} [client=@client]
    @return {Promise<Entity>} entity
    ###
    get: (id, client) ->
        client ?= @client
        client.findById(id).then (obj) =>
            return @factory.createFromObject(obj)


