class Irankish::ValidateTokenResponse

Attributes

response[R]
status[R]
statusmessage[R]

Public Instance Methods

full_message_errors() click to toggle source
# File lib/irankish/validate_token_response.rb, line 19
def full_message_errors
  return @response[:make_token_response][:make_token_result][:message]
end
get_token() click to toggle source
# File lib/irankish/validate_token_response.rb, line 15
def get_token
  return @response[:make_token_response][:make_token_result][:token]
end
valid?() click to toggle source
# File lib/irankish/validate_token_response.rb, line 11
def valid?
  @valid
end
validate(response = nil) click to toggle source
# File lib/irankish/validate_token_response.rb, line 5
def validate(response = nil)
  @response = response
  perform_validation
  return self
end

Private Instance Methods

perform_validation() click to toggle source
# File lib/irankish/validate_token_response.rb, line 25
def perform_validation
  raise ArgumentError, 'not a valid response' if @response.nil?
  @valid = (@response[:make_token_response][:make_token_result][:message] == 'Success')
end