def register_api_request
      Apicasso::Request.delay.create(api_key_id: @api_key.try(:id),
                                     object: { request: request_metadata,
                                               response: response_metadata })
    rescue NoMethodError
      Apicasso::Request.create(api_key_id: @api_key.try(:id),
                               object: { request: request_metadata,
                                         response: response_metadata })
    end
def register_api_request
      Apicasso::Request.delay.create(api_key_id: @api_key.try(:id),
                                     object: { request: request_metadata,
                                               response: response_metadata })
    rescue NoMethodError
      Apicasso::Request.create(api_key_id: @api_key.try(:id),
                               object: { request: request_metadata,
                                         response: response_metadata })
    end
Creates a request object in databse, registering the API key and
 a hash of the request and the response. It's an auditing proccess,
 all relevant information about the requests and it's reponses get
 recorded within the `Apicasso::Request`. This method assumes that
 your project is using some kind of ActiveRecord extension with a
 `.delay` method, which when not present makes your API very slow.