Class: Harvest::RateLimitStatus

Inherits:
BaseModel show all
Includes:
HappyMapper
Defined in:
lib/harvest/rate_limit_status.rb

Overview

The model that contains the information about the user’s rate limit

Fields

last_access_at

The last registered request

count

The current number of requests registered

timeframe_limit

The amount of seconds before a rate limit refresh occurs

max_calls

The number of requests you can make within the timeframe_limit

lockout_seconds

If you exceed the rate limit, how long you will be locked out from Harvest

Instance Method Summary collapse

Methods inherited from BaseModel

#==, api_path, #attributes=, #initialize, #to_i, #to_xml

Constructor Details

This class inherits a constructor from Harvest::BaseModel

Instance Method Details

#over_limit?Boolean

Returns true if the user is over their rate limit

Returns:

  • (Boolean)

See Also:



24
25
26
# File 'lib/harvest/rate_limit_status.rb', line 24

def over_limit?
  count > max_calls
end