Class: Incognia::Credentials

Inherits:
APIResource show all
Defined in:
lib/incognia_api/resources/credentials.rb

Constant Summary collapse

STALE_BEFORE =
10

Instance Method Summary collapse

Methods inherited from APIResource

from_hash

Instance Method Details

#stale?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/incognia_api/resources/credentials.rb', line 7

def stale?
  Time.now >= (generated_at + expires_in.to_i - STALE_BEFORE)
end