Class: Gonebusy::EntitiesUserResponse
- Defined in:
- lib/gonebusy/models/entities_user_response.rb
Instance Attribute Summary collapse
-
#account_manager_id ⇒ Integer
id of Account Manager user for User.
-
#address ⇒ EntitiesAddressEntity
address of User.
-
#business_name ⇒ String
business name for User.
-
#disabled ⇒ Boolean
status of user.
-
#email ⇒ String
email of User.
-
#external_url ⇒ String
external url to business.
-
#first_name ⇒ String
first name of User.
-
#id ⇒ Integer
id of User.
-
#last_name ⇒ String
last name of User.
-
#permalink ⇒ String
permalink of User.
-
#phone ⇒ String
phone number of User.
-
#resource_id ⇒ Integer
id of defacto Resource for User.
-
#role ⇒ String
User account type.
-
#timezone ⇒ String
timezone of User,.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
Instance Method Summary collapse
-
#initialize(id = nil, resource_id = nil, account_manager_id = nil, email = nil, phone = nil, first_name = nil, last_name = nil, disabled = nil, business_name = nil, external_url = nil, permalink = nil, timezone = nil, address = nil, role = nil) ⇒ EntitiesUserResponse
constructor
A new instance of EntitiesUserResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(id = nil, resource_id = nil, account_manager_id = nil, email = nil, phone = nil, first_name = nil, last_name = nil, disabled = nil, business_name = nil, external_url = nil, permalink = nil, timezone = nil, address = nil, role = nil) ⇒ EntitiesUserResponse
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/gonebusy/models/entities_user_response.rb', line 83 def initialize(id = nil, resource_id = nil, account_manager_id = nil, email = nil, phone = nil, first_name = nil, last_name = nil, disabled = nil, business_name = nil, external_url = nil, permalink = nil, timezone = nil, address = nil, role = nil) @id = id @resource_id = resource_id @account_manager_id = account_manager_id @email = email @phone = phone @first_name = first_name @last_name = last_name @disabled = disabled @business_name = business_name @external_url = external_url @permalink = permalink @timezone = timezone @address = address @role = role end |
Instance Attribute Details
#account_manager_id ⇒ Integer
id of Account Manager user for User
15 16 17 |
# File 'lib/gonebusy/models/entities_user_response.rb', line 15 def account_manager_id @account_manager_id end |
#address ⇒ EntitiesAddressEntity
address of User
55 56 57 |
# File 'lib/gonebusy/models/entities_user_response.rb', line 55 def address @address end |
#business_name ⇒ String
business name for User
39 40 41 |
# File 'lib/gonebusy/models/entities_user_response.rb', line 39 def business_name @business_name end |
#disabled ⇒ Boolean
status of user
35 36 37 |
# File 'lib/gonebusy/models/entities_user_response.rb', line 35 def disabled @disabled end |
#email ⇒ String
email of User
19 20 21 |
# File 'lib/gonebusy/models/entities_user_response.rb', line 19 def email @email end |
#external_url ⇒ String
external url to business
43 44 45 |
# File 'lib/gonebusy/models/entities_user_response.rb', line 43 def external_url @external_url end |
#first_name ⇒ String
first name of User
27 28 29 |
# File 'lib/gonebusy/models/entities_user_response.rb', line 27 def first_name @first_name end |
#id ⇒ Integer
id of User
7 8 9 |
# File 'lib/gonebusy/models/entities_user_response.rb', line 7 def id @id end |
#last_name ⇒ String
last name of User
31 32 33 |
# File 'lib/gonebusy/models/entities_user_response.rb', line 31 def last_name @last_name end |
#permalink ⇒ String
permalink of User
47 48 49 |
# File 'lib/gonebusy/models/entities_user_response.rb', line 47 def permalink @permalink end |
#phone ⇒ String
phone number of User
23 24 25 |
# File 'lib/gonebusy/models/entities_user_response.rb', line 23 def phone @phone end |
#resource_id ⇒ Integer
id of defacto Resource for User
11 12 13 |
# File 'lib/gonebusy/models/entities_user_response.rb', line 11 def resource_id @resource_id end |
#role ⇒ String
User account type
59 60 61 |
# File 'lib/gonebusy/models/entities_user_response.rb', line 59 def role @role end |
#timezone ⇒ String
timezone of User,
51 52 53 |
# File 'lib/gonebusy/models/entities_user_response.rb', line 51 def timezone @timezone end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/gonebusy/models/entities_user_response.rb', line 114 def self.from_hash(hash) return nil unless hash # Extract variables from the hash id = hash['id'] resource_id = hash['resource_id'] account_manager_id = hash['account_manager_id'] email = hash['email'] phone = hash['phone'] first_name = hash['first_name'] last_name = hash['last_name'] disabled = hash['disabled'] business_name = hash['business_name'] external_url = hash['external_url'] permalink = hash['permalink'] timezone = hash['timezone'] address = EntitiesAddressEntity.from_hash(hash['address']) if hash['address'] role = hash['role'] # Create object from extracted values EntitiesUserResponse.new(id, resource_id, account_manager_id, email, phone, first_name, last_name, disabled, business_name, external_url, permalink, timezone, address, role) end |
.names ⇒ Object
A mapping from model property names to API property names
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/gonebusy/models/entities_user_response.rb', line 62 def self.names if @_hash.nil? @_hash = {} @_hash["id"] = "id" @_hash["resource_id"] = "resource_id" @_hash["account_manager_id"] = "account_manager_id" @_hash["email"] = "email" @_hash["phone"] = "phone" @_hash["first_name"] = "first_name" @_hash["last_name"] = "last_name" @_hash["disabled"] = "disabled" @_hash["business_name"] = "business_name" @_hash["external_url"] = "external_url" @_hash["permalink"] = "permalink" @_hash["timezone"] = "timezone" @_hash["address"] = "address" @_hash["role"] = "role" end @_hash end |