Class: Synapsis::RetrievedUser

Inherits:
Object
  • Object
show all
Defined in:
lib/synapsis/user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(synapse_response) ⇒ RetrievedUser

Returns a new instance of RetrievedUser.



80
81
82
83
84
85
86
# File 'lib/synapsis/user.rb', line 80

def initialize(synapse_response)
  parsed_response = JSON.parse(synapse_response.body)

  parsed_response['user'].each do |k, v|
    send("#{k}=", v)
  end
end

Instance Attribute Details

#accept_bank_paymentsObject

Returns the value of attribute accept_bank_payments.



66
67
68
# File 'lib/synapsis/user.rb', line 66

def accept_bank_payments
  @accept_bank_payments
end

#accept_gratuityObject

Returns the value of attribute accept_gratuity.



66
67
68
# File 'lib/synapsis/user.rb', line 66

def accept_gratuity
  @accept_gratuity
end

#balanceObject

Returns the value of attribute balance.



66
67
68
# File 'lib/synapsis/user.rb', line 66

def balance
  @balance
end

#emailObject

Returns the value of attribute email.



66
67
68
# File 'lib/synapsis/user.rb', line 66

def email
  @email
end

#fullnameObject

Returns the value of attribute fullname.



66
67
68
# File 'lib/synapsis/user.rb', line 66

def fullname
  @fullname
end

#has_avatarObject

Returns the value of attribute has_avatar.



66
67
68
# File 'lib/synapsis/user.rb', line 66

def has_avatar
  @has_avatar
end

#phone_numberObject

Returns the value of attribute phone_number.



66
67
68
# File 'lib/synapsis/user.rb', line 66

def phone_number
  @phone_number
end

#resource_uriObject

Returns the value of attribute resource_uri.



66
67
68
# File 'lib/synapsis/user.rb', line 66

def resource_uri
  @resource_uri
end

#seller_detailsObject

Returns the value of attribute seller_details.



66
67
68
# File 'lib/synapsis/user.rb', line 66

def seller_details
  @seller_details
end

#user_idObject

Returns the value of attribute user_id.



66
67
68
# File 'lib/synapsis/user.rb', line 66

def user_id
  @user_id
end

#usernameObject

Returns the value of attribute username.



66
67
68
# File 'lib/synapsis/user.rb', line 66

def username
  @username
end

#visit_countObject

Returns the value of attribute visit_count.



66
67
68
# File 'lib/synapsis/user.rb', line 66

def visit_count
  @visit_count
end

#visit_messageObject

Returns the value of attribute visit_message.



66
67
68
# File 'lib/synapsis/user.rb', line 66

def visit_message
  @visit_message
end