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.zadd("APILimits", Time.now.to_i + time, self.id)
  else
    Redis.current.zrem("APILimits", self.id)
  end
end