def create(json)
      if json.is_a?(Array)
        json.inject([]) do |result, json_hash|
          result << create_resource(json_hash)
        end
      elsif json.is_a?(Hash)
        create_resource(json)
      else
        raise(ArgumentError, "JSON parameter have to be a Hash or Array object", caller)
      end
    end
def create(json)
      if json.is_a?(Array)
        json.inject([]) do |result, json_hash|
          result << create_resource(json_hash)
        end
      elsif json.is_a?(Hash)
        create_resource(json)
      else
        raise(ArgumentError, "JSON parameter have to be a Hash or Array object", caller)
      end
    end
Public: creates Resource looking recursively for JSON
 objects and transforming in Resources. To create Resource,
 this method use #resource_class.new(json).

 json - Hash or Array parsed from Response body.

 Returns if json is Hash, returns Resource from #resource_class if
 json is Array, returns an Array of Resource from #resource_class.
 Raises ArgumentError if json is not a Hash or Array.