Class: DataDomeUser
- Inherits:
-
Object
- Object
- DataDomeUser
- Defined in:
- lib/model/user.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#description ⇒ Object
Returns the value of attribute description.
-
#display_name ⇒ Object
Returns the value of attribute display_name.
-
#email ⇒ Object
Returns the value of attribute email.
-
#external_urls ⇒ Object
Returns the value of attribute external_urls.
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#payment_method_updated ⇒ Object
Returns the value of attribute payment_method_updated.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#picture_urls ⇒ Object
Returns the value of attribute picture_urls.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(id:, title: nil, first_name: nil, last_name: nil, created_at: nil, phone: nil, email: nil, display_name: nil, description: nil, picture_urls: nil, external_urls: nil, address: nil, payment_method_updated: nil) ⇒ DataDomeUser
constructor
A new instance of DataDomeUser.
- #to_json(options = {}) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(id:, title: nil, first_name: nil, last_name: nil, created_at: nil, phone: nil, email: nil, display_name: nil, description: nil, picture_urls: nil, external_urls: nil, address: nil, payment_method_updated: nil) ⇒ DataDomeUser
Returns a new instance of DataDomeUser.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/model/user.rb', line 14 def initialize(id:, title: nil, first_name: nil, last_name: nil, created_at: nil, phone: nil, email: nil, display_name: nil, description: nil, picture_urls: nil, external_urls: nil, address: nil, payment_method_updated: nil) @id = id @title = title @first_name = first_name @last_name = last_name @created_at = created_at @phone = phone @email = email @display_name = display_name @description = description @picture_urls = picture_urls || [] @external_urls = external_urls || [] @address = address @payment_method_updated = payment_method_updated end |
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
12 13 14 |
# File 'lib/model/user.rb', line 12 def address @address end |
#created_at ⇒ Object
Returns the value of attribute created_at.
12 13 14 |
# File 'lib/model/user.rb', line 12 def created_at @created_at end |
#description ⇒ Object
Returns the value of attribute description.
12 13 14 |
# File 'lib/model/user.rb', line 12 def description @description end |
#display_name ⇒ Object
Returns the value of attribute display_name.
12 13 14 |
# File 'lib/model/user.rb', line 12 def display_name @display_name end |
#email ⇒ Object
Returns the value of attribute email.
12 13 14 |
# File 'lib/model/user.rb', line 12 def email @email end |
#external_urls ⇒ Object
Returns the value of attribute external_urls.
12 13 14 |
# File 'lib/model/user.rb', line 12 def external_urls @external_urls end |
#first_name ⇒ Object
Returns the value of attribute first_name.
12 13 14 |
# File 'lib/model/user.rb', line 12 def first_name @first_name end |
#id ⇒ Object
Returns the value of attribute id.
12 13 14 |
# File 'lib/model/user.rb', line 12 def id @id end |
#last_name ⇒ Object
Returns the value of attribute last_name.
12 13 14 |
# File 'lib/model/user.rb', line 12 def last_name @last_name end |
#payment_method_updated ⇒ Object
Returns the value of attribute payment_method_updated.
12 13 14 |
# File 'lib/model/user.rb', line 12 def payment_method_updated @payment_method_updated end |
#phone ⇒ Object
Returns the value of attribute phone.
12 13 14 |
# File 'lib/model/user.rb', line 12 def phone @phone end |
#picture_urls ⇒ Object
Returns the value of attribute picture_urls.
12 13 14 |
# File 'lib/model/user.rb', line 12 def picture_urls @picture_urls end |
#title ⇒ Object
Returns the value of attribute title.
12 13 14 |
# File 'lib/model/user.rb', line 12 def title @title end |
Instance Method Details
#to_json(options = {}) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/model/user.rb', line 34 def to_json( = {}) { id: @id, title: @title, firstName: @first_name, lastName: @last_name, createdAt: @created_at, phone: @phone, email: @email, displayName: @display_name, description: @description, pictureUrls: @picture_urls, externalUrls: @external_urls, address: @address.respond_to?(:to_json) ? JSON.parse(@address.to_json) : @address, paymentMethodUpdated: @payment_method_updated, }.to_json end |
#to_s ⇒ Object
30 31 32 |
# File 'lib/model/user.rb', line 30 def to_s "DataDomeUser: id=#{@id}, title=#{@title}, firstName=#{@first_name}, lastName=#{@last_name}, createdAt=#{@created_at}, phone=#{@phone}, email=#{@email}, displayName=#{@display_name}, description=#{@description}, pictureUrls=#{@picture_urls}, externalUrls=#{@external_urls}, address=#{@address}, paymentMethodUpdated=#{@payment_method_updated}" end |