class Cb::Responses::User::CheckExisting

Protected Instance Methods

extract_models() click to toggle source
# File lib/cb/responses/user/check_existing.rb, line 26
def extract_models
  model = Model.new
  model.email = response[root_node][request_node][email_node]
  model.status = response[root_node][user_check_status_node]
  model.external_id = response[root_node][external_id_node]
  model.oauth_token = response[root_node][oauth_token_node]
  model.partner_id = response[root_node][partner_id_node]
  model.temp_password = temp_password?
  model
end
hash_containing_metadata() click to toggle source
# File lib/cb/responses/user/check_existing.rb, line 37
def hash_containing_metadata
  response
end
validate_api_hash() click to toggle source
# File lib/cb/responses/user/check_existing.rb, line 19
def validate_api_hash
  required_response_field(root_node, response)
  required_response_field(request_node, response[root_node])
  required_response_field(email_node, response[root_node][request_node])
  required_response_field(user_check_status_node, response[root_node])
end

Private Instance Methods

email_node() click to toggle source
# File lib/cb/responses/user/check_existing.rb, line 51
def email_node
  'Email'
end
external_id_node() click to toggle source
# File lib/cb/responses/user/check_existing.rb, line 59
def external_id_node
  'ResponseExternalID'
end
oauth_token_node() click to toggle source
# File lib/cb/responses/user/check_existing.rb, line 63
def oauth_token_node
  'ResponseOAuthToken'
end
partner_id_node() click to toggle source
# File lib/cb/responses/user/check_existing.rb, line 67
def partner_id_node
  'ResponsePartnerID'
end
request_node() click to toggle source
# File lib/cb/responses/user/check_existing.rb, line 47
def request_node
  'Request'
end
response_temp_password_node() click to toggle source
# File lib/cb/responses/user/check_existing.rb, line 71
def response_temp_password_node
  'ResponseTempPassword'
end
root_node() click to toggle source
# File lib/cb/responses/user/check_existing.rb, line 43
def root_node
  'ResponseUserCheck'
end
temp_password?() click to toggle source
# File lib/cb/responses/user/check_existing.rb, line 75
def temp_password?
  value = response[root_node][response_temp_password_node]
  value.to_s.downcase == 'true'
end
user_check_status_node() click to toggle source
# File lib/cb/responses/user/check_existing.rb, line 55
def user_check_status_node
  'UserCheckStatus'
end