Class: CabooseRets::Office
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- CabooseRets::Office
- Defined in:
- app/models/caboose_rets/office.rb
Instance Method Summary collapse
-
#image ⇒ Object
attr_accessible :id, :name, :lo_mls_id, :matrix_unique_id.
- #parse(data) ⇒ Object
Instance Method Details
#image ⇒ Object
attr_accessible :id, :name, :lo_mls_id, :matrix_unique_id
8 9 10 11 |
# File 'app/models/caboose_rets/office.rb', line 8 def image return nil if self..nil? return .image end |
#parse(data) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'app/models/caboose_rets/office.rb', line 13 def parse(data) self.lo_addr1 = data['OfficeAddress1'] self.lo_addr2 = data['OfficeAddress2'] self.lo_city = data['OfficeCity'] self.lo_email = data['OfficeEmail'] self.lo_fax_phone = data['OfficeFax'] self.lo_mail_addr = data['OfficeAddress1'] # self.lo_mail_care_of = data['MailCareOf'] self.lo_mail_city = data['OfficeCity'] self.lo_mail_postal_code = data['OfficePostalCode'] self.lo_mail_postal_code_plus4 = data['OfficePostalCodePlus4'] self.lo_mail_state_or_province = data['OfficeStateOrProvince'] self.matrix_unique_id = data['OfficeKey'] self.lo_matrix_modified_dt = data['ModificationTimestamp'] self.lo_mls = 'West Alabama Multiple Listing Service' self.lo_mls_id = data['OfficeMlsId'] self.lo_office_contact_mui = data['OfficeManagerMlsId'] self.lo_office_contact_mls_id = data['OfficeManagerMlsId'] self.lo_office_long_name = data['OfficeName'] self.lo_office_name = data['OfficeName'] self.lo_phone = data['OfficePhone'] # self.lo_photo_count = data['PhotoCount'] # self.photo_modification_timestamp = data['PhotoModificationTimestamp'] self.state = data['OfficeStateOrProvince'] self.street_address = data['OfficeAddress1'] self.street_city = data['OfficeCity'] self.street_postal_code = data['OfficePostalCode'] self.street_postal_code_plus4 = data['OfficePostalCodePlus4'] self.street_state_or_province = data['OfficeStateOrProvince'] # self.web_facebook = data['WebFacebook'] # self.web_linked_in = data['WebLinkedIn'] # self.web_page_address = data['WebPageAddress'] # self.web_twitter = data['WebTwitter'] self.zip = data['OfficePostalCode'] end |