Class: Allegro::WebApi::User
- Inherits:
-
Object
- Object
- Allegro::WebApi::User
- Defined in:
- lib/allegro/webapi/user.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#my_data ⇒ Object
readonly
Returns the value of attribute my_data.
Instance Method Summary collapse
- #address ⇒ Object
- #birth_date ⇒ Object
- #city ⇒ Object
- #company ⇒ Object
- #do_get_my_data ⇒ Object
- #email ⇒ Object
- #first_name ⇒ Object
- #id ⇒ Object
-
#initialize(client) ⇒ User
constructor
A new instance of User.
- #last_name ⇒ Object
- #phone ⇒ Object
- #rating ⇒ Object
Constructor Details
#initialize(client) ⇒ User
Returns a new instance of User.
7 8 9 |
# File 'lib/allegro/webapi/user.rb', line 7 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
4 5 6 |
# File 'lib/allegro/webapi/user.rb', line 4 def client @client end |
#my_data ⇒ Object (readonly)
Returns the value of attribute my_data.
5 6 7 |
# File 'lib/allegro/webapi/user.rb', line 5 def my_data @my_data end |
Instance Method Details
#address ⇒ Object
41 42 43 |
# File 'lib/allegro/webapi/user.rb', line 41 def address my_data[:user_address] end |
#birth_date ⇒ Object
37 38 39 |
# File 'lib/allegro/webapi/user.rb', line 37 def birth_date my_data[:user_birth_date] end |
#city ⇒ Object
45 46 47 |
# File 'lib/allegro/webapi/user.rb', line 45 def city my_data[:user_city] end |
#company ⇒ Object
16 17 18 |
# File 'lib/allegro/webapi/user.rb', line 16 def company my_data[:user_company] end |
#do_get_my_data ⇒ Object
11 12 13 14 |
# File 'lib/allegro/webapi/user.rb', line 11 def do_get_my_data @my_data = client.call(:do_get_my_data, message: {session_handle: client.session_handle}). body[:do_get_my_data_response][:user_data] end |
#email ⇒ Object
28 29 30 |
# File 'lib/allegro/webapi/user.rb', line 28 def email my_data[:user_email] end |
#first_name ⇒ Object
49 50 51 |
# File 'lib/allegro/webapi/user.rb', line 49 def first_name my_data[:user_first_name] end |
#id ⇒ Object
20 21 22 |
# File 'lib/allegro/webapi/user.rb', line 20 def id my_data[:user_id] end |
#last_name ⇒ Object
53 54 55 |
# File 'lib/allegro/webapi/user.rb', line 53 def last_name my_data[:user_last_name] end |
#phone ⇒ Object
32 33 34 |
# File 'lib/allegro/webapi/user.rb', line 32 def phone my_data[:user_phone] end |
#rating ⇒ Object
24 25 26 |
# File 'lib/allegro/webapi/user.rb', line 24 def my_data[:user_rating] end |