def prepare_source(model_class, source)
      source = source.attributes if source.is_a? model_class

      if source.is_a?(Hash) && model_class.respond_to?(:adjusted_api_attributes)
        source = model_class.adjusted_api_attributes source
      end

      source
    end
def prepare_source(model_class, source)
      source = source.attributes if source.is_a? model_class

      if source.is_a?(Hash) && model_class.respond_to?(:adjusted_api_attributes)
        source = model_class.adjusted_api_attributes source
      end

      source
    end
This method is a helper for {#instantiate_models} that prepares a source object for instantiation.