def convert object
      return {resource_name => object} if object.is_a? Hash
      {resource_name =>  object.to_hash}
    end
def convert object
      return {resource_name => object} if object.is_a? Hash
      {resource_name =>  object.to_hash}
    end
Converts a resource object to a hash.
 @param [Object] object to convert to a hash
 @raise [ArgumentError] if the object given does not respond to to_hash