       schema.type
 
   wrap: (type, data) ->
-    if wrapper = @representation_ids[type]
+    if wrapper = @representations[type]
       new wrapper(data)
     else
       data

        url: resource.url
        method: method
        headers: {}
        content: options.content
        query: options.query
        on: {}

      # verify presence of the required query params from the schema
      for key, value of required_params

      value: client
      enumerable: false

    @define_actions(constructor, definition.actions)
    constructor

  define_actions: (constructor, actions) ->
