Class: Realogy::Agent
- Inherits:
-
Entity
- Object
- ActiveRecord::Base
- ApplicationRecord
- Entity
- Realogy::Agent
- Defined in:
- lib/realogy/app/models/realogy/agent.rb
Instance Method Summary collapse
-
#addl_emails ⇒ Object
addlEmails : [Hash] Additional emails of agent.
-
#addl_languages_names ⇒ Object
addlLanguageNames : [Hash] Additional languages of agent.
-
#addl_phones ⇒ Object
addlPhones : [Hash] Additional phone numbers for agent.
-
#agent_id ⇒ Object
id : String Globally unique identifier assigned to an Agent by Realogy.
-
#agent_summary ⇒ Object
agentSummary : Hash.
-
#areas_of_specialization ⇒ Object
areasOfSpecialization : [String] Area of specialization for the agent.
-
#business_phone ⇒ Object
businessPhone : String Business phone number of agent.
-
#business_phone_ext ⇒ Object
businessPhoneExt : String Business phone extension of agent.
-
#company_brand_code ⇒ Object
office / brandCode : String The Franchise that the Office is part of.
-
#company_id ⇒ Object
office / companyId : String description“: ”Globally unique identifier assigned to a company by Realogy.
-
#company_name ⇒ Object
office / companyName : String Name of the Company.
-
#default_photo_url ⇒ Object
defaultPhotoURL : String Profile photo URL for the Agent.
-
#designations ⇒ Object
designations : String Designation of the agent.
-
#display_title ⇒ Object
displayTitle : String Title of the agent.
-
#email_address ⇒ Object
emailAddress : String Email address of the agent.
-
#first_name ⇒ Object
firstName : String First name of the agent.
-
#gender ⇒ Object
gender : String Gender of the agent (male/female).
-
#has_producing_role? ⇒ Boolean
isProducingRole : Boolean.
-
#is_agent? ⇒ Boolean
isAgent : Boolean Indicates whether the person is an agent or not.
-
#is_full_time? ⇒ Boolean
isFullTime : Boolean.
-
#is_team_member? ⇒ Boolean
isTeamMember : Boolean Indicates whether the person is a team member or not.
-
#languages_spoken ⇒ Object
languagesSpoken : [Hash] The languages agent speaks.
-
#last_name ⇒ Object
lastName : String Last name of the agent.
-
#last_updated ⇒ Object
lastUpdateOn : DateTime The date/time that the Agent record was last updated in the system (UTC).
-
#lead_email_address ⇒ Object
leadEmailAddress : String Email address to send leads to the agent.
-
#license_info ⇒ Object
licenseInfo : [Hash] A collection of licenses associated with the Agent.
-
#media ⇒ Object
media: [Hash].
-
#middle_name ⇒ Object
middleName : String Middle name of the agent.
-
#mls_information ⇒ Object
mlsInformation : [String] MLS numbers associated with the Agent.
-
#mobile_phone ⇒ Object
mobilePhone : String Mobile phone number of agent.
-
#name ⇒ Object
name : String Display Name of the agent.
-
#office ⇒ Object
office : String.
-
#office_address ⇒ Object
office / officeAddress : Hash.
-
#office_city ⇒ Object
office / officeAddress / city : String City.
-
#office_country ⇒ Object
office / officeAddress / country : String Country.
-
#office_country_code ⇒ Object
office / officeAddress / countryCode : String ISO Code of the country.
-
#office_district ⇒ Object
office / officeAddress / district : String Subdivision name in the country or region for the address.
-
#office_email_address ⇒ Object
office / emailAddress : String Main contact email address for the office.
-
#office_fax_number ⇒ Object
office / faxNumber : String Fax number for the office.
-
#office_formatted_address ⇒ Object
office / officeAddress / formattedAddress : String Formatted address for display purpose.
-
#office_id ⇒ Object
office / officeId : String Globally unique identifier assigned to an office by Realogy.
-
#office_latitude ⇒ Object
office / officeAddress / latitude : Decimal Latitude of a location.
-
#office_longitude ⇒ Object
office / officeAddress / longitude : Decimal Longitude of a location.
-
#office_name ⇒ Object
office / name : String Name of the office.
-
#office_phone_number ⇒ Object
office / officeAddress / phoneNumber : String Main contact phone number for the office.
-
#office_postal_code ⇒ Object
office / officeAddress / postalCode : String ZIP/Postal code.
-
#office_state_province ⇒ Object
office / officeAddress / stateProvince : String State/Province where the address is.
-
#office_state_province_code ⇒ Object
office / officeAddress / stateProvinceCode : String ISO code of the state.
-
#office_street_address ⇒ Object
office / officeAddress / streetAddress : String Street address.
-
#office_type ⇒ Object
office / type : String Type of office (Main, Branch, etc.).
-
#remarks ⇒ Object
remarks : [Hash] A collection of Profile descriptions associated with the Agent.
-
#roles ⇒ Object
roles : [Hash] Role details of the agent.
-
#specialty ⇒ Object
specialty : String Specialty of the agent.
-
#websites ⇒ Object
webSites : [Hash] A collection of websites associated with the Agent.
Methods inherited from Entity
#dig_for_array, #dig_for_boolean, #dig_for_datetime, #dig_for_decimal, #dig_for_hash, #dig_for_integer, #dig_for_string, #needs_updating?, #populate, triage
Instance Method Details
#addl_emails ⇒ Object
addlEmails : [Hash] Additional emails of agent
6 7 8 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 6 def addl_emails self.dig_for_array("addlEmails") end |
#addl_languages_names ⇒ Object
addlLanguageNames : [Hash] Additional languages of agent
13 14 15 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 13 def addl_languages_names self.dig_for_array("addlLanguageNames") end |
#addl_phones ⇒ Object
addlPhones : [Hash] Additional phone numbers for agent
20 21 22 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 20 def addl_phones self.dig_for_array("addlPhones") end |
#agent_id ⇒ Object
id : String Globally unique identifier assigned to an Agent by Realogy
33 34 35 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 33 def agent_id self.dig_for_string("agentSummary", "id") end |
#agent_summary ⇒ Object
agentSummary : Hash
26 27 28 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 26 def agent_summary self.dig_for_hash("agentSummary") end |
#areas_of_specialization ⇒ Object
areasOfSpecialization : [String] Area of specialization for the agent
40 41 42 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 40 def areas_of_specialization self.dig_for_array("areasOfSpecialization") end |
#business_phone ⇒ Object
businessPhone : String Business phone number of agent
47 48 49 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 47 def business_phone self.dig_for_string("agentSummary", "businessPhone") end |
#business_phone_ext ⇒ Object
businessPhoneExt : String Business phone extension of agent
54 55 56 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 54 def business_phone_ext self.dig_for_string("agentSummary", "businessPhoneExt") end |
#company_brand_code ⇒ Object
office / brandCode : String The Franchise that the Office is part of
61 62 63 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 61 def company_brand_code self.dig_for_string("agentSummary", "office", "brandCode") end |
#company_id ⇒ Object
office / companyId : String description“: ”Globally unique identifier assigned to a company by Realogy
68 69 70 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 68 def company_id self.dig_for_string("agentSummary", "office", "companyId") end |
#company_name ⇒ Object
office / companyName : String Name of the Company
75 76 77 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 75 def company_name self.dig_for_string("agentSummary", "office", "companyName") end |
#default_photo_url ⇒ Object
defaultPhotoURL : String Profile photo URL for the Agent
82 83 84 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 82 def default_photo_url self.dig_for_string("agentSummary", "defaultPhotoURL") end |
#designations ⇒ Object
designations : String Designation of the agent
89 90 91 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 89 def designations self.dig_for_string("designations") end |
#display_title ⇒ Object
displayTitle : String Title of the agent
96 97 98 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 96 def display_title self.dig_for_string("agentSummary", "displayTitle") end |
#email_address ⇒ Object
emailAddress : String Email address of the agent
103 104 105 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 103 def email_address self.dig_for_string("agentSummary", "emailAddress") end |
#first_name ⇒ Object
firstName : String First name of the agent
110 111 112 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 110 def first_name self.dig_for_string("agentSummary", "firstName") end |
#gender ⇒ Object
gender : String Gender of the agent (male/female)
117 118 119 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 117 def gender self.dig_for_string("agentSummary", "gender") end |
#has_producing_role? ⇒ Boolean
isProducingRole : Boolean
123 124 125 126 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 123 def has_producing_role? return nil unless (arr = self.roles).is_a?(Array) arr.map{|r| r.dig_for_boolean("isProducingRole")}.include?(true) end |
#is_agent? ⇒ Boolean
isAgent : Boolean Indicates whether the person is an agent or not
131 132 133 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 131 def is_agent? self.dig_for_boolean("agentSummary", "isAgent") end |
#is_full_time? ⇒ Boolean
isFullTime : Boolean
137 138 139 140 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 137 def is_full_time? return nil unless (arr = self.roles).is_a?(Array) arr.map{|r| r.dig_for_boolean("isFullTime")}.include?(true) end |
#is_team_member? ⇒ Boolean
isTeamMember : Boolean Indicates whether the person is a team member or not
145 146 147 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 145 def is_team_member? self.dig_for_boolean("isTeamMember") end |
#languages_spoken ⇒ Object
languagesSpoken : [Hash] The languages agent speaks
152 153 154 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 152 def languages_spoken self.dig_for_array("languagesSpoken") end |
#last_name ⇒ Object
lastName : String Last name of the agent
159 160 161 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 159 def last_name self.dig_for_string("agentSummary", "lastName") end |
#last_updated ⇒ Object
lastUpdateOn : DateTime The date/time that the Agent record was last updated in the system (UTC)
166 167 168 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 166 def last_updated self.dig_for_datetime("lastUpdateOn") end |
#lead_email_address ⇒ Object
leadEmailAddress : String Email address to send leads to the agent
173 174 175 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 173 def lead_email_address self.dig_for_string("agentSummary", "leadEmailAddress") end |
#license_info ⇒ Object
licenseInfo : [Hash] A collection of licenses associated with the Agent
180 181 182 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 180 def license_info self.dig_for_array("licenseInfo") end |
#media ⇒ Object
media: [Hash]
186 187 188 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 186 def media self.dig_for_array("media") end |
#middle_name ⇒ Object
middleName : String Middle name of the agent
193 194 195 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 193 def middle_name self.dig_for_string("agentSummary", "middleName") end |
#mls_information ⇒ Object
mlsInformation : [String] MLS numbers associated with the Agent
200 201 202 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 200 def mls_information self.dig_for_array("mlsInformation") end |
#mobile_phone ⇒ Object
mobilePhone : String Mobile phone number of agent
207 208 209 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 207 def mobile_phone self.dig_for_string("agentSummary", "mobilePhone") end |
#name ⇒ Object
name : String Display Name of the agent
214 215 216 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 214 def name self.dig_for_string("agentSummary", "name") end |
#office ⇒ Object
office : String
220 221 222 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 220 def office self.dig_for_string("agentSummary", "office") end |
#office_address ⇒ Object
office / officeAddress : Hash
226 227 228 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 226 def office_address self.dig_for_hash("agentSummary", "office", "officeAddress") end |
#office_city ⇒ Object
office / officeAddress / city : String City
233 234 235 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 233 def office_city self.dig_for_string("agentSummary", "office", "officeAddress", "city") end |
#office_country ⇒ Object
office / officeAddress / country : String Country
240 241 242 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 240 def office_country self.dig_for_string("agentSummary", "office", "officeAddress", "country") end |
#office_country_code ⇒ Object
office / officeAddress / countryCode : String ISO Code of the country
247 248 249 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 247 def office_country_code self.dig_for_string("agentSummary", "office", "officeAddress", "countryCode") end |
#office_district ⇒ Object
office / officeAddress / district : String Subdivision name in the country or region for the address. In USA it’s same as County.
254 255 256 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 254 def office_district self.dig_for_string("agentSummary", "office", "officeAddress", "district") end |
#office_email_address ⇒ Object
office / emailAddress : String Main contact email address for the office
261 262 263 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 261 def office_email_address self.dig_for_string("agentSummary", "office", "emailAddress") end |
#office_fax_number ⇒ Object
office / faxNumber : String Fax number for the office
268 269 270 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 268 def office_fax_number self.dig_for_string("agentSummary", "office", "faxNumber") end |
#office_formatted_address ⇒ Object
office / officeAddress / formattedAddress : String Formatted address for display purpose
275 276 277 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 275 def office_formatted_address self.dig_for_string("agentSummary", "office", "officeAddress", "formattedAddress") end |
#office_id ⇒ Object
office / officeId : String Globally unique identifier assigned to an office by Realogy
282 283 284 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 282 def office_id self.dig_for_string("agentSummary", "office", "officeId") end |
#office_latitude ⇒ Object
office / officeAddress / latitude : Decimal Latitude of a location
289 290 291 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 289 def office_latitude self.dig_for_decimal("agentSummary", "office", "officeAddress", "latitude") end |
#office_longitude ⇒ Object
office / officeAddress / longitude : Decimal Longitude of a location
296 297 298 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 296 def office_longitude self.dig_for_decimal("agentSummary", "office", "officeAddress", "longitude") end |
#office_name ⇒ Object
office / name : String Name of the office
303 304 305 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 303 def office_name self.dig_for_string("agentSummary", "office", "name") end |
#office_phone_number ⇒ Object
office / officeAddress / phoneNumber : String Main contact phone number for the office
310 311 312 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 310 def office_phone_number self.dig_for_string("agentSummary", "office", "officeAddress", "phoneNumber") end |
#office_postal_code ⇒ Object
office / officeAddress / postalCode : String ZIP/Postal code
317 318 319 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 317 def office_postal_code self.dig_for_string("agentSummary", "office", "officeAddress", "postalCode") end |
#office_state_province ⇒ Object
office / officeAddress / stateProvince : String State/Province where the address is
324 325 326 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 324 def office_state_province self.dig_for_string("agentSummary", "office", "officeAddress", "stateProvince") end |
#office_state_province_code ⇒ Object
office / officeAddress / stateProvinceCode : String ISO code of the state
331 332 333 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 331 def office_state_province_code self.dig_for_string("agentSummary", "office", "officeAddress", "stateProvinceCode") end |
#office_street_address ⇒ Object
office / officeAddress / streetAddress : String Street address
338 339 340 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 338 def office_street_address self.dig_for_string("agentSummary", "office", "officeAddress", "streetAddress") end |
#office_type ⇒ Object
office / type : String Type of office (Main, Branch, etc.)
345 346 347 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 345 def office_type self.dig_for_string("agentSummary", "office", "type") end |
#remarks ⇒ Object
remarks : [Hash] A collection of Profile descriptions associated with the Agent
352 353 354 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 352 def remarks self.dig_for_array("remarks") end |
#roles ⇒ Object
roles : [Hash] Role details of the agent
359 360 361 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 359 def roles self.dig_for_array("roles") end |
#specialty ⇒ Object
specialty : String Specialty of the agent
366 367 368 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 366 def specialty self.dig_for_string("agentSummary", "specialty") end |
#websites ⇒ Object
webSites : [Hash] A collection of websites associated with the Agent
373 374 375 |
# File 'lib/realogy/app/models/realogy/agent.rb', line 373 def websites self.dig_for_array("webSites") end |