class NedbankApi::Models::IntentToken
Constants
- ERRORS
Attributes
error[RW]
error_description[RW]
token_expires_at[RW]
Public Instance Methods
authenticated?()
click to toggle source
# File lib/nedbank_api/models/intent_token.rb, line 19 def authenticated? return false if self.access_token.nil? !expired? end
expired?()
click to toggle source
# File lib/nedbank_api/models/intent_token.rb, line 24 def expired? return true if self.expires_in.nil? raise Exceptions::TokenExpired if token_expires_at < Time.now return false rescue Exceptions::TokenExpired self.error = ERRORS[:token_expired][:error] self.error_description = ERRORS[:token_expired][:error_description ] return true end