caboose-rets 0.1.36 → 0.1.37

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 59ffe34db24165bd5debca8dda7f399c037fe8de
4
- data.tar.gz: eef77882842f8d501a2dd294bb0a0e68081c5562
3
+ metadata.gz: 376b3dadf82cdcd72093d2c3a5c82a542682d4a3
4
+ data.tar.gz: 5662708cc449525e2829c3655f0998cf44d70e7e
5
5
  SHA512:
6
- metadata.gz: 1164dd76eecf6239bafa8582ef6b4ced66cee845a1340d8011ff14edd5e424103206bebcb88acab9c006993bffe0cebb2b7041fb2bd57f4fb64df2f336bae440
7
- data.tar.gz: 3812f77e613cf362cd0321afb9f314c97686a50a531e3515564047da6fd5a2b9e96740aca0957ea0012ad47341156dd92a037baafe92851f186feac73af27a9c
6
+ metadata.gz: 031ee6d5f7864fdd1529fdefbe06ac9125d1d99e833c18759ccedff3e53f727aba7d3c707d480078dc4f4a7cfe23bbf4bf7a8139f0f0174a036a25aa05fa16d5
7
+ data.tar.gz: 0f1f850e60760b6a2431928597279dd656a73d55c315849e4e53dd6767341927bf0a5f0279e854697726e39473df412cdb9f1fcfcfe93f75258e41d05ae60a2d
@@ -1,9 +1,9 @@
1
1
  class CabooseRets::Agent < ActiveRecord::Base
2
2
  self.table_name = "rets_agents"
3
3
 
4
- has_one :meta, :class_name => 'AgentMeta', :primary_key => 'matrix_unique_id', :foreign_key => 'la_code'
4
+ has_one :meta, :class_name => 'AgentMeta', :primary_key => 'mls_id', :foreign_key => 'la_code'
5
5
  has_many :properties
6
- attr_accessible :id, :agent_number, :matrix_unique_id, :sort_order
6
+ attr_accessible :id, :agent_number, :matrix_unique_id, :sort_order, :mls_id
7
7
  after_initialize :fix_name
8
8
 
9
9
  def image
@@ -30,43 +30,43 @@ class CabooseRets::Agent < ActiveRecord::Base
30
30
  end
31
31
 
32
32
  def refresh_from_mls
33
- CabooseRets::RetsImporter.import('Agent',"(Matrix_Unique_ID=#{self.matrix_unique_id})")
33
+ CabooseRets::RetsImporter.import('Member',"(MemberMlsId=#{self.mls_id})")
34
34
  CabooseRets::RetsImporter.download_property_images(self)
35
35
  end
36
36
 
37
37
  def self.refresh_from_mls(agent_number)
38
- CabooseRets::RetsImporter.import('Agent', "(Agent_Number=#{self.agent_number})")
39
- CabooseRets::RetsImporter.import_agent(self.matrix_unique_id)
38
+ CabooseRets::RetsImporter.import('Member', "(MemberMlsId=#{self.mls_id})")
39
+ CabooseRets::RetsImporter.import_agent(self.mls_id)
40
40
  end
41
41
 
42
42
  def parse(data)
43
- self.agent_number = data['AgentNumber']
44
- self.cell_phone = data['CellPhone']
45
- self.direct_work_phone = data['DirectWorkPhone']
46
- self.email = data['Email']
47
- self.fax_phone = data['FaxPhone']
48
- self.first_name = data['FirstName']
49
- self.full_name = data['FullName']
50
- self.generational_name = data['GenerationalName']
51
- self.last_name = data['LastName']
52
- self.matrix_unique_id = data['Matrix_Unique_ID']
53
- self.matrix_modified_dt = data['MatrixModifiedDT']
54
- self.middle_name = data['MiddleName']
55
- self.mls = data['MLS']
56
- self.mls_id = data['MLSID']
57
- self.office_mui = data['Office_MUI']
58
- self.office_mls_id = data['OfficeMLSID']
59
- self.office_phone = data['OfficePhone']
60
- self.other_phone = data['OtherPhone']
61
- self.phone_toll_free = data['PhoneTollFree']
62
- self.phone_voice_mail = data['PhoneVoiceMail']
63
- self.photo_count = data['PhotoCount']
64
- self.photo_modification_timestamp = data['PhotoModificationTimestamp']
65
- self.slug = "#{data['FirstName']}-#{data['LastName']}".parameterize
43
+ # self.agent_number = data['AgentNumber']
44
+ self.cell_phone = data['MemberMobilePhone']
45
+ self.direct_work_phone = data['MemberDirectPhone']
46
+ self.email = data['MemberEmail']
47
+ self.fax_phone = data['MemberFax']
48
+ self.first_name = data['MemberFirstName']
49
+ self.full_name = data['MemberFullName']
50
+ # self.generational_name = data['MemberMiddleName']
51
+ self.last_name = data['MemberLastName']
52
+ self.matrix_unique_id = data['MemberMlsId']
53
+ self.matrix_modified_dt = data['ModificationTimestamp']
54
+ self.middle_name = data['MemberMiddleName']
55
+ self.mls = 'West Alabama Multiple Listing Service'
56
+ self.mls_id = data['MemberMlsId']
57
+ self.office_mui = data['OfficeMlsId']
58
+ self.office_mls_id = data['OfficeMlsId']
59
+ self.office_phone = data['MemberOfficePhone']
60
+ self.other_phone = data['MemberPreferredPhone']
61
+ self.phone_toll_free = data['MemberTollFreePhone']
62
+ self.phone_voice_mail = data['MemberVoiceMail']
63
+ # self.photo_count = data['PhotoCount']
64
+ # self.photo_modification_timestamp = data['PhotoModificationTimestamp']
65
+ self.slug = "#{data['MemberFirstName']}-#{data['MemberLastName']}".parameterize
66
66
  end
67
67
 
68
68
  def verify_meta_exists
69
- self.meta = CabooseRets::AgentMeta.create(:la_code => self.la_code) if self.meta.nil?
69
+ self.meta = CabooseRets::AgentMeta.create(:la_code => self.mls_id) if self.meta.nil?
70
70
  end
71
71
 
72
72
  def image_url(style)
@@ -1,7 +1,7 @@
1
1
 
2
2
  class CabooseRets::AgentMeta < ActiveRecord::Base
3
3
  self.table_name = "rets_agents_meta"
4
- belongs_to :agent, :foreign_key => 'matrix_unique_id', :primary_key => 'la_code'
4
+ belongs_to :agent, :foreign_key => 'mls_id', :primary_key => 'la_code'
5
5
  has_attached_file :image,
6
6
  :path => 'rets/agent_meta/:id_:style.:extension',
7
7
  :default_url => "https://cabooseit.s3.amazonaws.com/assets/shared/default_profile.png",
@@ -22,7 +22,7 @@ class CabooseRets::Media < ActiveRecord::Base
22
22
  # self.media_order = data['MEDIA_ORDER'].to_i
23
23
  # self.media_remarks = data['MEDIA_REMARKS']
24
24
  # self.mls = data['MLS']
25
- self.media_type = data['content-type']
25
+ self.media_type = data['MediaCategory']
26
26
  self.media_mui = data['content-id']
27
27
  self.media = Caboose::Media.create(
28
28
  :image => content,
@@ -11,38 +11,38 @@ class CabooseRets::Office < ActiveRecord::Base
11
11
  end
12
12
 
13
13
  def parse(data)
14
- self.lo_addr1 = data['Addr1']
15
- self.lo_addr2 = data['Addr2']
16
- self.lo_city = data['City']
17
- self.lo_email = data['Email']
18
- self.lo_fax_phone = data['FaxPhone']
19
- self.lo_mail_addr = data['MailAddr']
20
- self.lo_mail_care_of = data['MailCareOf']
21
- self.lo_mail_city = data['MailCity']
22
- self.lo_mail_postal_code = data['MailPostalCode']
23
- self.lo_mail_postal_code_plus4 = data['MailPostalCodePlus4']
24
- self.lo_mail_state_or_province = data['MailStatOrProvince']
25
- self.matrix_unique_id = data['Matrix_Unique_ID']
26
- self.lo_matrix_modified_dt = data['MatrixModifiedDT']
27
- self.lo_mls = data['MLS']
28
- self.lo_mls_id = data['MLSID']
29
- self.lo_office_contact_mui = data['OfficeContact_MUI']
30
- self.lo_office_contact_mls_id = data['OfficeContactMLSID']
31
- self.lo_office_long_name = data['OfficeLongName']
14
+ self.lo_addr1 = data['OfficeAddress1']
15
+ self.lo_addr2 = data['OfficeAddress2']
16
+ self.lo_city = data['OfficeCity']
17
+ self.lo_email = data['OfficeEmail']
18
+ self.lo_fax_phone = data['OfficeFax']
19
+ self.lo_mail_addr = data['OfficeAddress1']
20
+ # self.lo_mail_care_of = data['MailCareOf']
21
+ self.lo_mail_city = data['OfficeCity']
22
+ self.lo_mail_postal_code = data['OfficePostalCode']
23
+ self.lo_mail_postal_code_plus4 = data['OfficePostalCodePlus4']
24
+ self.lo_mail_state_or_province = data['OfficeStateOrProvince']
25
+ self.matrix_unique_id = data['OfficeKey']
26
+ self.lo_matrix_modified_dt = data['ModificationTimestamp']
27
+ self.lo_mls = 'West Alabama Multiple Listing Service'
28
+ self.lo_mls_id = data['OfficeMlsId']
29
+ self.lo_office_contact_mui = data['OfficeManagerMlsId']
30
+ self.lo_office_contact_mls_id = data['OfficeManagerMlsId']
31
+ self.lo_office_long_name = data['OfficeName']
32
32
  self.lo_office_name = data['OfficeName']
33
- self.lo_phone = data['Phone']
34
- self.lo_photo_count = data['PhotoCount']
35
- self.photo_modification_timestamp = data['PhotoModificationTimestamp']
36
- self.state = data['State']
37
- self.street_address = data['StreetAddress']
38
- self.street_city = data['StreetCity']
39
- self.street_postal_code = data['StreetPostalCode']
40
- self.street_postal_code_plus4 = data['StreetPostalCodePlus4']
41
- self.street_state_or_province = data['StreeStateOrProvince']
42
- self.web_facebook = data['WebFacebook']
43
- self.web_linked_in = data['WebLinkedIn']
44
- self.web_page_address = data['WebPageAddress']
45
- self.web_twitter = data['WebTwitter']
46
- self.zip = data['ZIP']
33
+ self.lo_phone = data['OfficePhone']
34
+ # self.lo_photo_count = data['PhotoCount']
35
+ # self.photo_modification_timestamp = data['PhotoModificationTimestamp']
36
+ self.state = data['OfficeStateOrProvince']
37
+ self.street_address = data['OfficeAddress1']
38
+ self.street_city = data['OfficeCity']
39
+ self.street_postal_code = data['OfficePostalCode']
40
+ self.street_postal_code_plus4 = data['OfficePostalCodePlus4']
41
+ self.street_state_or_province = data['OfficeStateOrProvince']
42
+ # self.web_facebook = data['WebFacebook']
43
+ # self.web_linked_in = data['WebLinkedIn']
44
+ # self.web_page_address = data['WebPageAddress']
45
+ # self.web_twitter = data['WebTwitter']
46
+ self.zip = data['OfficePostalCode']
47
47
  end
48
48
  end
@@ -2,7 +2,7 @@
2
2
  class CabooseRets::OpenHouse < ActiveRecord::Base
3
3
  self.table_name = "rets_open_houses"
4
4
 
5
- has_one :property, :primary_key => 'listing_mui', :foreign_key => 'matrix_unique_id'
5
+ has_one :property, :primary_key => 'listing_mui', :foreign_key => 'mls_number'
6
6
  attr_accessible :id, :matrix_unique_id
7
7
 
8
8
  # def property
@@ -20,17 +20,17 @@ class CabooseRets::OpenHouse < ActiveRecord::Base
20
20
  end
21
21
 
22
22
  def parse(data)
23
- self.active_yn = data['ActiveYN']
24
- self.description = data['Description']
25
- self.end_time = data['EndTime']
26
- self.entry_order = data['EntryOrder']
27
- self.listing_mui = data['Listing_MUI']
28
- self.matrix_unique_id = data['matrix_unique_id']
29
- self.matrix_modified_dt = data['MatrixModifiedDT']
23
+ # self.active_yn = data['ActiveYN']
24
+ self.description = data['OpenHouseRemarks']
25
+ self.end_time = data['OpenHouseEndTime']
26
+ # self.entry_order = data['EntryOrder']
27
+ self.listing_mui = data['ListingId']
28
+ self.matrix_unique_id = data['OpenHouseKey']
29
+ self.matrix_modified_dt = data['ModificationTimestamp']
30
30
  self.open_house_date = data['OpenHouseDate']
31
31
  self.open_house_type = data['OpenHouseType']
32
- self.provider_key = data['ProviderKey']
32
+ self.provider_key = data['ShowingAgentKey']
33
33
  self.refreshments = data['Refrehments']
34
- self.start_time = data['StartTime']
34
+ self.start_time = data['OpenHouseStartTime']
35
35
  end
36
36
  end
@@ -1,8 +1,8 @@
1
1
  class CabooseRets::Property <ActiveRecord::Base
2
2
  self.table_name = "rets_properties"
3
- attr_accessible :id, :matrix_unique_id
3
+ attr_accessible :id, :matrix_unique_id, :mls_number
4
4
 
5
- def url() return "/property/#{self.id}" end
5
+ def url() return "/properties/#{self.mls_number}/details" end
6
6
  def images() return CabooseRets::Media.where(:media_mui => self.matrix_unique_id, :media_type => 'Photo').reorder(:media_order).all end
7
7
  def files() return CabooseRets::Media.where(:media_mui => self.matrix_unique_id, :media_type => 'File' ).reorder(:media_order).all end
8
8
  def virtual_tour
@@ -13,192 +13,195 @@ class CabooseRets::Property <ActiveRecord::Base
13
13
  def self.geolocatable() all(conditions: "latitude IS NOT NULL AND longitude IS NOT NULL") end
14
14
 
15
15
  def refresh_from_mls
16
- CabooseRets::RetsImporter.import_properties(self.matrix_unique_id, false)
16
+ CabooseRets::RetsImporter.import_properties(self.mls_number, false)
17
17
  end
18
18
 
19
19
  def parse(data)
20
- self.access = data['Access']
21
- self.acreage = data['Acreage'].blank? ? nil : data['Acreage'].to_f
22
- self.acreage_source = data['AcreageSource']
23
- self.active_open_house_count = data['ActiveOpenHouseCount']
24
- self.adjoining_land_use = data['AdjoiningLandUse']
25
- self.age = data['Age']
26
- self.annual_taxes = data['AnnualTaxes']
20
+ # puts(data.to_s)
21
+ # self.access = nil
22
+ self.acreage = data['LotSizeAcres'].blank? ? nil : data['LotSizeAcres'].to_f
23
+ self.acreage_source = data['LotSizeSource']
24
+ # self.active_open_house_count = data['ActiveOpenHouseCount']
25
+ # self.adjoining_land_use = data['AdjoiningLandUse']
26
+ # self.age = data['Age']
27
+ self.annual_taxes = data['TaxAnnualAmount']
27
28
  self.appliances = data['Appliances']
28
- self.area = data['Area']
29
- self.attic = data['Attic']
30
- self.available_date = data['AvailableDate']
29
+ self.area = data['MLSAreaMajor']
30
+ # self.attic = data['Attic']
31
+ self.available_date = data['AvailabilityDate']
31
32
  self.basement = data['Basement']
32
- self.basement_yn = data['BasementYN']
33
- self.baths_full = data['BathsFull'].blank? ? nil : data['BathsFull'].to_i
34
- self.baths_half = data['BathsHalf'].blank? ? nil : data['BathsHalf'].to_i
35
- self.baths_total = data['BathsTotal'].blank? ? nil : data['BathsTotal'].to_f
36
- self.beds_total = data['BedsTotal'].blank? ? nil : data['BedsTotal'].to_i
37
- self.book_number = data['BookNumber']
38
- self.book_page = data['BookPage']
39
- self.book_type = data['BookType']
40
- self.building_type = data['BuildingType']
41
- self.business_included_yn = data['BusinessIncludedYN']
42
- self.buyer_name = data['BuyerName']
33
+ # self.basement_yn = data['BasementYN']
34
+ self.baths_full = data['BathroomsFull'].blank? ? nil : data['BathroomsFull'].to_i
35
+ self.baths_half = data['BathroomsHalf'].blank? ? nil : data['BathroomsHalf'].to_i
36
+ self.baths_total = data['BathroomsTotalInteger'].blank? ? nil : data['BathroomsTotalInteger'].to_f
37
+ self.beds_total = data['BedroomsTotal'].blank? ? nil : data['BedroomsTotal'].to_i
38
+ self.book_number = data['TaxBookNumber']
39
+ # self.book_page = data['BookPage']
40
+ # self.book_type = data['BookType']
41
+ # self.building_type = data['BuildingType']
42
+ self.business_included_yn = data['BusinessName']
43
+ self.buyer_name = data['BuyerAgentFullName']
43
44
  self.city = data['City']
44
- self.city_community = data['CityCommunity']
45
- self.closing = data['Closing']
46
- self.co_list_agent_mui = data['CoListAgent_MUI']
47
- self.co_list_agent_direct_work_phone = data['CoListAgentDirectWorkPhone']
45
+ self.city_community = data['CityRegion']
46
+ self.closing = data['CloseDate']
47
+ self.co_list_agent_mui = data['CoListAgentMlsId']
48
+ self.co_list_agent_direct_work_phone = data['CoListAgentDirectPhone']
48
49
  self.co_list_agent_email = data['CoListAgentEmail']
49
50
  self.co_list_agent_full_name = data['CoListAgentFullName']
50
- self.co_list_agent_mls_id = data['CoListAgentMLSID']
51
- self.co_list_office_mui = data['CoListOffice_MUI']
52
- self.co_list_office_mls_id = data['CoListOfficeMLSID']
51
+ self.co_list_agent_mls_id = data['CoListAgentMlsId']
52
+ self.co_list_office_mui = data['CoListOfficeMlsId']
53
+ self.co_list_office_mls_id = data['CoListOfficeMlsId']
53
54
  self.co_list_office_name = data['CoListOfficeName']
54
55
  self.co_list_office_phone = data['CoListOfficePhone']
55
- self.completion_date = data['CompletionDate']
56
- self.comp_tenant_rep = data['CompTenantRep']
57
- self.construction = data['Construction']
58
- self.construction_status = data['ConstructionStatus']
56
+ # self.completion_date = data['CompletionDate']
57
+ # self.comp_tenant_rep = data['CompTenantRep']
58
+ self.construction = data['ConstructionMaterials']
59
+ self.construction_status = data['DevelopmentStatus']
59
60
  self.cooling = data['Cooling']
60
61
  self.county_or_parish = data['CountyOrParish']
61
- self.deposit = data['Deposit']
62
- self.dining_room = data['DiningRoom']
62
+ # self.deposit = data['Deposit']
63
+ # self.dining_room = data['DiningRoom']
63
64
  self.directions = data['Directions']
64
- self.display_address_on_internet_yn = data['DisplayAddressOnInternetYN']
65
- self.dom = data['DOM']
66
- self.driveway = data['Driveway']
65
+ self.display_address_on_internet_yn = data['InternetAddressDisplayYN']
66
+ # self.dom = data['DOM']
67
+ # self.driveway = data['Driveway']
67
68
  self.elementary_school = data['ElementarySchool']
68
- self.exists_struct = data['ExistStruct']
69
- self.expenses_association = data['ExpensesAssociation']
70
- self.expenses_insurance = data['ExpensesInsurance']
71
- self.expenses_maintenance = data['ExpensesMaintenance']
72
- self.expenses_management = data['ExpensesManagement']
73
- self.expenses_other = data['ExpensesOther']
74
- self.expenses_tax = data['ExpensesTax']
75
- self.expenses_utility = data['ExpensesUtility']
69
+ self.exists_struct = data['StructureType']
70
+ # self.expenses_association = data['ExpensesAssociation']
71
+ self.expenses_insurance = data['InsuranceExpense']
72
+ self.expenses_maintenance = data['MaintenanceExpense']
73
+ self.expenses_management = data['ProfessionalManagementExpense']
74
+ self.expenses_other = data['OtherExpense']
75
+ self.expenses_tax = data['NewTaxesExpense']
76
+ # self.expenses_utility = data['ExpensesUtility']
76
77
  self.exterior_features = data['ExteriorFeatures']
77
- self.fireplace = data['Fireplace']
78
- self.flood_plain = data['FloodPlain']
78
+ self.fireplace = data['FireplaceYN']
79
+ # self.flood_plain = data['FloodPlain']
79
80
  self.flooring = data['Flooring']
80
- self.foreclosure_sale_date = data['ForeclosureSaleDate']
81
- self.foreclosure_yn = data['ForeclosureYN']
82
- self.fsboyn = data['FSBOYN']
83
- self.garage = data['Garage']
81
+ # self.foreclosure_sale_date = data['ForeclosureSaleDate']
82
+ # self.foreclosure_yn = data['ForeclosureYN']
83
+ # self.fsboyn = data['FSBOYN']
84
+ self.garage = data['GarageYN']
84
85
  self.heating = data['Heating']
85
86
  self.high_school = data['HighSchool']
86
- self.hoa_amenities = data['HOAAmenities']
87
- self.hoa_fee = data['HOAFee']
88
- self.hoa_included_in_rent_yn = data['HOAIncludedInRentYN']
89
- self.hoa_term = data['HOATerm']
90
- self.hoa_term_mandatory_yn = data['HOATermMandatoryYN']
91
- self.homestead_yn = data['HomesteadYN']
92
- self.idx_opt_in_yn = data['IDXOptInYN']
93
- self.income_other = data['IncomeOther']
94
- self.income_rental = data['IncomeRental']
87
+ self.hoa_amenities = data['AssociationAmenities']
88
+ self.hoa_fee = data['AssociationFee']
89
+ self.hoa_included_in_rent_yn = data['AssociationFeeIncludes']
90
+ self.hoa_term = data['AssociationFeeFrequency']
91
+ self.hoa_term_mandatory_yn = data['AssociationYN']
92
+ # self.homestead_yn = data['HomesteadYN']
93
+ # self.idx_opt_in_yn = data['IDXOptInYN']
94
+ self.income_other = data['GrossIncome']
95
+ # self.income_rental = data['GrossIncome']
95
96
  self.interior_features = data['InteriorFeatures']
96
- self.land_features_extras = data['LandFeaturesExtras']
97
- self.landscaping = data['Landscaping']
98
- self.laundry = data['Laundry']
99
- self.legal_description = data['LegalDescription']
100
- self.legal_lot = data['LegalLot']
101
- self.legal_section = data['LegalSection']
97
+ self.land_features_extras = data['LotFeatures']
98
+ self.latitude = data['Latitude'].blank? ? nil : data['Latitude'].to_f
99
+ # self.landscaping = data['Landscaping']
100
+ self.laundry = data['LaundryFeatures']
101
+ self.legal_description = data['TaxLegalDescription']
102
+ self.legal_lot = data['TaxLot']
103
+ self.legal_section = data['PublicSurveySection']
102
104
  self.levels = data['Levels']
103
- self.list_agent_mui = data['ListAgent_MUI']
104
- self.list_agent_direct_work_phone = data['ListAgentDirectWorkPhone']
105
+ self.list_agent_mui = data['ListAgentMlsId']
106
+ self.list_agent_direct_work_phone = data['ListAgentOfficePhone']
105
107
  self.list_agent_email = data['ListAgentEmail']
106
108
  self.list_agent_full_name = data['ListAgentFullName']
107
- self.list_agent_mls_id = data['ListAgentMLSID']
109
+ self.list_agent_mls_id = data['ListAgentMlsId']
108
110
  self.listing_contract_date = data['ListingContractDate']
109
- self.list_office_mui = data['ListOffice_MUI']
110
- self.list_office_mls_id = data['ListOfficeMLSID']
111
+ self.list_office_mui = data['ListOfficeMlsId']
112
+ self.list_office_mls_id = data['ListOfficeMlsId']
111
113
  self.list_office_name = data['ListOfficeName']
112
114
  self.list_office_phone = data['ListOfficePhone']
113
115
  self.list_price = data['ListPrice'].blank? ? nil : data['ListPrice'].to_i
114
- self.lot_description = data['LotDescription']
115
- self.lot_dimensions = data['LotDimensions']
116
- self.lot_dim_source = data['LotDimSource']
117
- self.management = data['Management']
118
- self.master_bed_level = data['MasterBedLevel']
119
- self.matrix_unique_id = data['Matrix_Unique_ID']
120
- self.matrix_modified_dt = data['MatrixModifiedDT']
121
- self.max_sqft = data['MaxSqft']
116
+ self.longitude = data['Longitude'].blank? ? nil : data['Longitude'].to_f
117
+ self.lot_description = data['LotFeatures']
118
+ self.lot_dimensions = data['LotSizeDimensions']
119
+ self.lot_dim_source = data['LotDimensionsSource']
120
+ # self.management = data['Management']
121
+ # self.master_bed_level = data['MasterBedLevel']
122
+ self.matrix_unique_id = data['ListingKey']
123
+ self.matrix_modified_dt = data['ModificationTimestamp']
124
+ self.max_sqft = data['LivingArea']
122
125
  self.middle_school = data['MiddleSchool']
123
- self.mineral_rights = data['MineralRights']
124
- self.min_sqft = data['MinSqft']
125
- self.misc_indoor_featuresa = data['MiscIndoorFeatures']
126
- self.mls = data['MLS']
127
- self.mls_number = data['MLSNumber']
128
- self.municipality = data['Municipality']
129
- self.net_op_inc = data['NetOpInc']
130
- self.open_house_count = data['OpenHouseCount']
131
- self.open_house_public_count = data['OpenHousePublicCount']
132
- self.open_house_public_upcoming = data['OpenHousePublicUpcoming']
133
- self.open_house_upcoming = data['OpenHouseUpcoming']
134
- self.original_entry_timestamp = data['OriginalEntryTimestamp'].blank? ? data['ListingContractDate'] : data['OriginalEntryTimestamp']
126
+ # self.mineral_rights = data['MineralRights']
127
+ self.min_sqft = data['LivingArea']
128
+ self.misc_indoor_featuresa = data['BuildingFeatures']
129
+ self.mls = data['ListingService']
130
+ self.mls_number = data['ListingId']
131
+ # self.municipality = data['Municipality']
132
+ self.net_op_inc = data['NetOperatingIncome']
133
+ # self.open_house_count = data['OpenHouseCount']
134
+ # self.open_house_public_count = data['OpenHousePublicCount']
135
+ # self.open_house_public_upcoming = data['OpenHousePublicUpcoming']
136
+ # self.open_house_upcoming = data['OpenHouseUpcoming']
137
+ self.original_entry_timestamp = data['OriginalEntryTimestamp'].blank? ? data['OnMarketDate'] : data['OriginalEntryTimestamp']
135
138
  self.parcel_number = data['ParcelNumber']
136
- self.pending_date = data['PendingDate']
137
- self.pets_allowed_yn = data['PetsAllowedYN']
138
- self.photo_count = data['PhotoCount']
139
- self.photo_modification_timestamp = data['PhotoModificationTimestamp']
140
- self.pool = data['Pool']
141
- self.porch_patio = data['PorchPatio']
139
+ self.pending_date = data['PendingTimestamp']
140
+ self.pets_allowed_yn = data['PetsAllowed']
141
+ self.photo_count = data['PhotosCount']
142
+ self.photo_modification_timestamp = data['PhotosChangeTimestamp']
143
+ self.pool = data['PoolFeatures']
144
+ self.porch_patio = data['PatioAndPorchFeatures']
142
145
  self.possession = data['Possession']
143
- self.possible_uses = data['PossibleUses']
146
+ self.possible_uses = data['PossibleUse']
144
147
  self.postal_code = data['PostalCode']
145
148
  self.postal_code_plus4 = data['PostalCodePlus4']
146
- self.price_per_acre = data['PricePerAcre']
147
- self.price_sqft = data['PriceSqft']
148
- self.property_name = data['PropertyName']
149
+ # self.price_per_acre = data['PricePerAcre']
150
+ # self.price_sqft = data['PriceSqft']
151
+ # self.property_name = data['PropertyName']
149
152
  self.property_subtype = data['PropertySubType']
150
153
  self.property_type = data['PropertyType']
151
- self.property_use = data['PropertyUse']
152
- self.prop_mgmt_comp = data['PropMgmtComp']
154
+ self.property_use = data['CurrentUse']
155
+ self.prop_mgmt_comp = data['ParkManagerName']
153
156
  self.public_remarks = data['PublicRemarks']
154
- self.refrigerator_included_yn = data['RefrigeratorIncludedYN']
155
- self.rental_rate_type = data['RentalRateType']
156
- self.rent_incl = data['RentIncl']
157
- self.res_style = data['ResStyle']
158
- self.restrictions = data['Restrictions']
159
- self.road_frontage = data['RoadFrontage']
157
+ # self.refrigerator_included_yn = data['RefrigeratorIncludedYN']
158
+ self.rental_rate_type = data['RentControlYN']
159
+ self.rent_incl = data['RentIncludes']
160
+ self.res_style = data['ArchitecturalStyle']
161
+ # self.restrictions = data['Restrictions']
162
+ self.road_frontage = data['RoadFrontageType']
160
163
  self.roof = data['Roof']
161
- self.roofage = data['Roofage']
162
- self.room_count = data['RoomCount']
163
- self.service_type = data['ServiceType']
164
+ # self.roofage = data['Roofage']
165
+ self.room_count = data['RoomsTotal']
166
+ # self.service_type = data['ServiceType']
164
167
  self.sewer = data['Sewer']
165
- self.sold_terms = data['SoldTerms']
166
- self.sprinkler = data['Sprinkler']
167
- self.sqft_source = data['SqftSource']
168
- self.sqft_total = data['SqFtTotal'].blank? ? nil : data['SqFtTotal'].to_f
168
+ self.sold_terms = data['ListingTerms']
169
+ # self.sprinkler = data['Sprinkler']
170
+ self.sqft_source = data['LivingAreaSource']
171
+ self.sqft_total = data['LivingArea'].blank? ? nil : data['LivingArea'].to_f
169
172
  self.state_or_province = data['StateOrProvince']
170
- self.status = data['Status']
171
- self.status_contractual_search_date = data['StatusContractualSearchDate']
173
+ self.status = data['MlsStatus']
174
+ self.status_contractual_search_date = data['ContractStatusChangeDate']
172
175
  self.street_dir_prefix = data['StreetDirPrefix']
173
176
  self.street_dir_suffix = data['StreetDirSuffix']
174
177
  self.street_name = data['StreetName']
175
178
  self.street_number = data['StreetNumber']
176
179
  self.street_number_numeric = data['StreetNumberNumeric']
177
180
  self.street_suffix = data['StreetSuffix']
178
- self.street_view_param = data['StreetViewParam']
179
- self.style = data['Style']
180
- self.subdivision = data['Subdivision']
181
+ # self.street_view_param = data['StreetViewParam']
182
+ self.style = data['BodyType']
183
+ self.subdivision = data['SubdivisionName']
181
184
  self.topography = data['Topography']
182
- self.total_num_units = data['TotalNumOfUnits']
183
- self.total_num_units_occupied = data['TotalNumOfUnitsOccupied']
184
- self.transaction_type = data['TransactionType']
185
- self.unit_count = data['UnitCount']
185
+ self.total_num_units = data['NumberOfUnitsTotal']
186
+ self.total_num_units_occupied = data['NumberOfUnitsLeased']
187
+ self.transaction_type = data['TransactionBrokerCompensationType']
188
+ self.unit_count = data['NumberOfUnitsInCommunity']
186
189
  self.unit_number = data['UnitNumber']
187
190
  self.utilities = data['Utilities']
188
- self.virtual_tour1 = data['VirtualTour1']
189
- self.vow_allowed_avmyn = data['VOWAllowAVMYN']
190
- self.vow_allowed_third_party_comm_yn = data['VOWAllowThirdPartyCommYN']
191
- self.washer_dryer_included = data['WasherDryerIncludedYN']
192
- self.water = data['Water']
193
- self.waterfronts = data['Waterfronts']
191
+ self.virtual_tour1 = data['VirtualTourURLBranded'].blank? ? data['VirtualTourURLUnbranded'] : data['VirtualTourURLBranded']
192
+ # self.vow_allowed_avmyn = data['VOWAllowAVMYN']
193
+ # self.vow_allowed_third_party_comm_yn = data['VOWAllowThirdPartyCommYN']
194
+ # self.washer_dryer_included = data['WasherDryerIncludedYN']
195
+ self.water = data['WaterSource']
196
+ self.waterfronts = data['WaterBodyName']
194
197
  self.waterfront_yn = data['WaterfrontYN']
195
- self.water_heater = data['WaterHeater']
196
- self.windows = data['Windows']
197
- self.window_treatments = data['WindowTreatments']
198
+ # self.water_heater = data['WaterHeater']
199
+ self.windows = data['WindowFeatures']
200
+ # self.window_treatments = data['WindowTreatments']
198
201
  self.year_built = data['YearBuilt']
199
- self.yr_blt_source = data['YrBltSource']
202
+ self.yr_blt_source = data['YearBuiltSource']
200
203
  self.zoning = data['Zoning']
201
- self.zoning_northport = data['ZoningNorthPort']
202
- self.zoning_tusc = data['ZoningTusc']
204
+ # self.zoning_northport = data['ZoningNorthPort']
205
+ # self.zoning_tusc = data['ZoningTusc']
203
206
  end
204
207
  end