class ZuoraConnect::AppInstanceBase

def api_limit(start: true, time: API_LIMIT_TIMEOUT.to_i)

## START Resque Helping Methods ####
def api_limit(start: true, time: API_LIMIT_TIMEOUT.to_i)
  if start
    Redis.current.setex("APILimits:#{self.id}", time, true)
  else
    Redis.current.del("APILimits:#{self.id}")
  end
end