Class: ACTV::User
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#created_date ⇒ Object
readonly
Returns the value of attribute created_date.
-
#date_of_birth ⇒ Object
(also: #dob)
readonly
Returns the value of attribute date_of_birth.
-
#display_name ⇒ Object
readonly
Returns the value of attribute display_name.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#first_name ⇒ Object
readonly
Returns the value of attribute first_name.
-
#gender ⇒ Object
readonly
Returns the value of attribute gender.
-
#last_name ⇒ Object
readonly
Returns the value of attribute last_name.
-
#middle_name ⇒ Object
readonly
Returns the value of attribute middle_name.
-
#user_name ⇒ Object
readonly
Returns the value of attribute user_name.
Attributes inherited from Base
Instance Method Summary collapse
- #address ⇒ Object
- #advantage_member ⇒ Object (also: #is_advantage_member?)
- #avatar_url ⇒ Object
- #phone_number ⇒ Object
Methods inherited from Identity
Methods inherited from Base
#[], attr_reader, define_attribute_method, define_predicate_method, define_uri_method, #delete, from_response, #initialize, #memoize, #method_missing, object_attr_reader, #respond_to?, #to_hash, #update, uri_attr_reader
Constructor Details
This class inherits a constructor from ACTV::Identity
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ACTV::Base
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
10 11 12 |
# File 'lib/actv/user.rb', line 10 def access_token @access_token end |
#created_date ⇒ Object (readonly)
Returns the value of attribute created_date.
7 8 9 |
# File 'lib/actv/user.rb', line 7 def created_date @created_date end |
#date_of_birth ⇒ Object (readonly) Also known as: dob
Returns the value of attribute date_of_birth.
7 8 9 |
# File 'lib/actv/user.rb', line 7 def date_of_birth @date_of_birth end |
#display_name ⇒ Object (readonly)
Returns the value of attribute display_name.
7 8 9 |
# File 'lib/actv/user.rb', line 7 def display_name @display_name end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
7 8 9 |
# File 'lib/actv/user.rb', line 7 def email @email end |
#first_name ⇒ Object (readonly)
Returns the value of attribute first_name.
7 8 9 |
# File 'lib/actv/user.rb', line 7 def first_name @first_name end |
#gender ⇒ Object (readonly)
Returns the value of attribute gender.
7 8 9 |
# File 'lib/actv/user.rb', line 7 def gender @gender end |
#last_name ⇒ Object (readonly)
Returns the value of attribute last_name.
7 8 9 |
# File 'lib/actv/user.rb', line 7 def last_name @last_name end |
#middle_name ⇒ Object (readonly)
Returns the value of attribute middle_name.
7 8 9 |
# File 'lib/actv/user.rb', line 7 def middle_name @middle_name end |
#user_name ⇒ Object (readonly)
Returns the value of attribute user_name.
7 8 9 |
# File 'lib/actv/user.rb', line 7 def user_name @user_name end |
Instance Method Details
#address ⇒ Object
29 30 31 |
# File 'lib/actv/user.rb', line 29 def address @address ||= ACTV::Address.new(@attrs[:address]) unless @attrs[:address].nil? end |
#advantage_member ⇒ Object Also known as: is_advantage_member?
14 15 16 17 18 19 |
# File 'lib/actv/user.rb', line 14 def advantage_member @is_member ||= begin client= ACTV::Client.new({ oauth_token: @access_token }) client.is_advantage_member? end end |
#avatar_url ⇒ Object
22 23 24 25 26 27 |
# File 'lib/actv/user.rb', line 22 def avatar_url @avatar_url ||= begin client= ACTV::Client.new({ oauth_token: @access_token }) client.avatar_url end end |
#phone_number ⇒ Object
33 34 35 |
# File 'lib/actv/user.rb', line 33 def phone_number @phone_number ||= ACTV::PhoneNumber.new(@attrs[:phone_number]) unless @attrs[:phone_number].nil? end |