Class: NwmlsClient::Codes

Inherits:
Object
  • Object
show all
Defined in:
lib/nwmls_client/codes.rb

Constant Summary collapse

ALL_CODES =
{
"ACC"                 => "Acreage Comments",
"ADU"                 => "Approved Accessory Dwelling",
"AFFILIATIONS"        => "Affiliations",
"AFH"                 => "FHA VA Approved",
"AFR"                 => "Additional Finished Rooms ",
"AGR"                 => "Age Restrictions",
"ALLOW_AVM"           => "Allow Automated Valuation",
"AMN"                 => "Amenities",
"AMP"                 => "Power Service in AMPS",
"ANC"                 => "Foundation",
"APH"                 => "Appliance Hookups",
"APP"                 => "Appliances Provided",
"APS"                 => "Appliances That Stay",
"AR"                  => "Area",
"ARC"                 => "Architecture",
"ASC"                 => "Association Contact",
"ASF"                 => "Approximate Square Footage",
"ATF"                 => "Assessment Fees",
"AUCTION"             => "Auction",
"AVDT"                => "Available Date",
"AVP"                 => "Number of Available Pads",
"AllowAVM"            => "Allow AVM",
"BA1"                 => "Bathrooms Unit 1",
"BA2"                 => "Bathrooms Unit 2",
"BA3"                 => "Bathrooms Unit 3",
"BA4"                 => "Bathrooms Unit 4",
"BA5"                 => "Bathrooms Unit 5",
"BA6"                 => "Bathrooms Unit 6",
"BCC"                 => "Barn Outbuilding Comments",
"BDC"                 => "Building Condition",
"BDI"                 => "Building Information",
"BDL"                 => "Bedrooms Lower",
"BDM"                 => "Bedrooms main",
"BDU"                 => "Bedrooms Upper",
"BFE"                 => "Barn Features",
"BLD"                 => "Builder",
"BLK"                 => "Block",
"BON"                 => "Boundary Survey",
"BR"                  => "Bedrooms",
"BR1"                 => "Bedrooms Unit 1",
"BR2"                 => "Bedrooms Unit 2",
"BR3"                 => "Bedrooms Unit 3",
"BR4"                 => "Bedrooms Unit 4",
"BR5"                 => "Bedrooms Unit 5",
"BR6"                 => "Bedrooms Unit 6",
"BREO"                => "Bank Owned",
"BRI"                 => "Boarding Income",
"BRM"                 => "Bonus Room Location",
"BSM"                 => "Basement",
"BSZ"                 => "Barn Size",
"BTH"                 => "Bathrooms",
"BTP"                 => "Barn Type",
"BUS"                 => "Bus Line Nearby",
"BUSR"                => "Bus Route Number",
"BUILT_GREEN_RATING"  => "Built Green Certification Rating",
"CAP"                 => "Cap Rate",
"CCC"                 => "Crop Soil Comments",
"CDOM"                => "Cumulative Days on Market",
"CFE"                 => "Features",
"CHT"                 => "Ceiling Height",
"CIT"                 => "City",
"CLA"                 => "CoListing Agent Number",
"CLO"                 => "Selling Date",
"CMFE"                => "Community Features",
"CMN"                 => "Common Features",
"CODE"                => "Code", 
"COLO"                => "Co Office Number",
"COO"                 => "Coop",
"COU"                 => "County",
"CRI"                 => "Crop Income",
"CSP"                 => "Column Spacing",
"CTD"                 => "Cats and Dogs",
"CTDT"                => "Contingent Date",
"CONSTRUCTION_METHODS" => "Construction Methods",
"DD"                  => "Directions",
"DESCRIPTION"         => "Description", 
"DLT"                 => "Depth of Lot",
"DNO"                 => "Den or Office Location",
"DOC"                 => "Documents Provided",
"DOM"                 => "Days on Market",
"DRM"                 => "Dining Room Location",
"DRP"                 => "Directional Prefix",
"DRS"                 => "Directional Suffix",
"DSR"                 => "Community Name",
"DSRNUM"              => "Community Number",
"DW1"                 => "Dishwasher Unit 1",
"DW2"                 => "Dishwasher Unit 2",
"DW3"                 => "Dishwasher Unit 3",
"DW4"                 => "Dishwasher Unit 4",
"DW5"                 => "Dishwasher Unit 5",
"DW6"                 => "Dishwasher Unit 6",
"ECRT"                => "Environmental Cert",
"EFFECTIVE_YEAR_BUILT" => "Effective Year Built",
"EFFECTIVE_YEAR_BUILT_SOURCE" => "Effective Year Built Source",
"EFR"                 => "Extra Finished Room Location",
"EL"                  => "Elementary School",
"ELE"                 => "Electricity",
"ELEV"                => "Elevation",
"ELEX"                => "Electrical Expenses",
"EMP"                 => "Number of Employees",
"ENS"                 => "Energy Source",
"ENT"                 => "Entry Location",
"ENV"                 => "Environmental Survey",
"EPS_ENERGY"          => "EPS Energy",
"EQI"                 => "Equity",
"EQP"                 => "Equipment Included",
"EQU"                 => "Equipment",
"EQV"                 => "Equipment Value",
"ESM"                 => "Easements",
"EXA"                 => "Expansion Area",
"EXP"                 => "Expenses",
"EXT"                 => "Exterior",
"F17"                 => "Form 17",
"FAC"                 => "Free and Clear",
"FAM"                 => "Family Room Location",
"FBG"                 => "Full Baths Garage",
"FBL"                 => "Full Baths Lower",
"FBM"                 => "Full Baths Main",
"FBT"                 => "Full Bathrooms",
"FBU"                 => "Full Baths Upper",
"FEA"                 => "Interior Features",
"FEN"                 => "Fence",
"FG1"                 => "Refrigerator Unit 1",
"FG2"                 => "Refrigerator Unit 2",
"FG3"                 => "Refrigerator Unit 3",
"FG4"                 => "Refrigerator Unit 4",
"FG5"                 => "Refrigerator Unit 5",
"FG6"                 => "Refrigerator Unit 6",
"FIN"                 => "Financing",
"FLS"                 => "Floor Covering",
"FND"                 => "Foundation",
"FP"                  => "Fireplaces Total",
"FP1"                 => "Fireplaces Unit 1",
"FP2"                 => "Fireplaces Unit 2",
"FP3"                 => "Fireplaces Unit 3",
"FP4"                 => "Fireplaces Unit 4",
"FP5"                 => "Fireplaces Unit 5",
"FP6"                 => "Fireplaces Unit 6",
"FPL"                 => "Fireplaces Lower",
"FPM"                 => "Fireplaces Main",
"FPU"                 => "Fireplaces Upper",
"FRN"                 => "Franchise",
"FTP"                 => "Farm Type",
"FTR"                 => "Property Features",
"FUR"                 => "Furnished",
"GAI"                 => "Gross Adjusted Income",
"GAR"                 => "Total Covered Parking",
"GAS"                 => "Gas",
"GR"                  => "Parking Type",
"GRDX"                => "X Coordinate",
"GRDY"                => "Y Coordinate",
"GRM"                 => "Gross Rent Multiplier",
"GRS"                 => "Annual Gross Sales",
"GSI"                 => "Gross Scheduled Income",
"GSP"                 => "Number of Garage Spaces",
"GW"                  => "Goodwill Value",
"GZC"                 => "General Zoning Classification",
"HBG"                 => "Half Baths Garage",
"HBL"                 => "Half Baths Lower",
"HBM"                 => "Half Baths Main",
"HBT"                 => "Half Bathrooms",
"HBU"                 => "Half Baths Upper",
"HERS_INDEX"          => "HERS Index",
"HET"                 => "Heating Expenses",
"HOD"                 => "Annual Association Dues",
"HOI"                 => "Home Owner Dues Include",
"HRS"                 => "Hours of Operation",
"HSN"                 => "House Number",
"HSNA"                => "Street Number Modifier",
"HTC"                 => "Heating and Cooling",
"IMP"                 => "Improvements",
"INDT"                => "Inactive Date",
"INS"                 => "Insurance Expenses",
"INV"                 => "Inventory Value",
"IRRC"                => "Irrigation Comments",
"IRS"                 => "Irrigation Source",
"ITP"                 => "Irrigation Type",
"JH"                  => "Junior High",
"KES"                 => "Kitchen with Eating Space Location",
"KIT"                 => "Kitchen Location",
"LAG"                 => "Listing Agent Number",
"LAT"                 => "Latitude",
"LCC"                 => "Livestock Comments",
"LD"                  => "List Date",
"LDE"                 => "Lot Details",
"LDG"                 => "Loading",
"LDR"                 => "List Date Received",
"LEED_RATING"         => "LEED Certification Rating",
"LEQ"                 => "Leased Equipment",
"LES"                 => "Lease Terms",
"LIC"                 => "Licenses",
"LIT"                 => "Leased Items",
"LN"                  => "Listing Number",
"LNI"                 => "Labor and Industries Inspected",
"LNM"                 => "Liens Mortgages",
"LO"                  => "Listing Office Number",
"LOC"                 => "Location",
"LONG"                => "Longitude",
"LP"                  => "Listing Price",
"LPH"                 => "Listing Price History",
"LRM"                 => "Living Room Location",
"LSD"                 => "Leased Equipment",
"LSF"                 => "Lot Square Footage",
"LSI"                 => "Lease Income",
"LSZ"                 => "Lot Dimensions",
"LOT_SIZE_SOURCE"     => "Lot Size Source",
"LT"                  => "Lot Number",
"LTG"                 => "Leased Terms",
"LTP"                 => "Livestock Type",
"LTV"                 => "Lot Topography Vegetation",
"LVL"                 => "Level",
"LX1"                 => "Lease Expiration Unit 1",
"LX2"                 => "Lease Expiration Unit 2",
"LX3"                 => "Lease Expiration Unit 3",
"LX4"                 => "Lease Expiration Unit 4",
"LX5"                 => "Lease Expiration Unit 5",
"LX6"                 => "Lease Expiration Unit 6",
"MAP"                 => "Map Page",
"MAPBOOK"             => "Map Book",
"MBD"                 => "Master Bedroom Location",
"MFY"                 => "Manufactured After 1976",
"MGR"                 => "Manager Contact Information",
"MHF"                 => "Manufactured Home Features",
"MHM"                 => "Manufactured Home Manufacturer",
"MHN"                 => "Manufactured Home Model Name",
"MHS"                 => "Manufactured Home Serial Number",
"MIF"                 => "Move In Funds Required",
"MLT"                 => "Minimum Rental Terms",
"MOR"                 => "Monthly Rent if Rented",
"MR"                  => "Marketing Remarks",
"MTB"                 => "Major Type of Business",
"NA"                  => "Business Name",
"NAS"                 => "Number of Assigned Spaces",
"NC"                  => "New Construction",
"NCS"                 => "Number of Carport Spaces",
"NIA"                 => "Publish To Internet",
"NN1"                 => "Monthly NN Unit 1",
"NN2"                 => "Monthly NN Unit 2",
"NN3"                 => "Monthly NN Unit 3",
"NN4"                 => "Monthly NN Unit 4",
"NN5"                 => "Monthly NN Unit 5",
"NN6"                 => "Monthly NN Unit 6",
"NNN"                 => "Total Monthly NNN",
"NOC"                 => "Number of Units in Complex",
"NOH"                 => "Number of Homes in Park",
"NOI"                 => "Net Operating Income",
"NOS"                 => "Number of Stories in Building",
"NOU"                 => "Number of Units",
"NP"                  => "Net Proceeds",
"NWESH_RATING"        => "NWESH Certification Rating",
"NEW_CONSTRUCTION"    => "New Construction",
"OLP"                 => "Original Price",
"OOC"                 => "Owner Occupancy Percentage",
"OSF"                 => "Approximate Office Square Feet",
"OTR"                 => "Other Rooms",
"OTX"                 => "Other Expenses",
"OUT"                 => "Outbuildings",
"OWNERSHIP"           => "Ownership",
"PAD"                 => "Pad Ready",
"PARQ"                => "Third Party Approval Required",
"PAS"                 => "Park For Sale",
"PDR"                 => "Pending Date",
"PIC"                 => "Picture Count",
"PKA"                 => "Park Amenities",
"PKC"                 => "Total Covered Parking",
"PKG"                 => "Parking Types",
"PKS"                 => "Parking Space Number",
"PKU"                 => "Total Uncovered Parking",
"PL4"                 => "Zip Plus 4",
"POC"                 => "Power Company",
"POL"                 => "Pool",
"POS"                 => "Possession",
"PRJ"                 => "Project",
"PRK"                 => "Park Name",
"PROHIBIT_BLOG"       => "Prohibit Blogging",
"PSZ"                 => "Parlor Size",
"PTO"                 => "Preliminary Title Ordered",
"PTYP"                => "Property Type",
"ProhibitBLOG"        => "Allow Blog",
"QBT"                 => "Quarter Bathrooms",
"QTR"                 => "Three Quarter Baths Total",
"RD"                  => "Road On Which Side of Property",
"RDI"                 => "Road Information",
"REM"                 => "Remodeled",
"RES"                 => "Real Estate Value",
"RF"                  => "Roof",
"RN1"                 => "Rent Unit 1",
"RN2"                 => "Rent Unit 2",
"RN3"                 => "Rent Unit 3",
"RN4"                 => "Rent Unit 4",
"RN5"                 => "Rent Unit 5",
"RN6"                 => "Rent Unit 6",
"RNT"                 => "Annual Rent",
"RO1"                 => "Range Oven Unit 1",
"RO2"                 => "Range Oven Unit 2",
"RO3"                 => "Range Oven Unit 3",
"RO4"                 => "Range Oven Unit 4",
"RO5"                 => "Range Oven Unit 5",
"RO6"                 => "Range Oven Unit 6",
"ROFR"                => "Right of First Refusal",
"RP"                  => "Real Property",
"RRM"                 => "Rec Room Location",
"RS2"                 => "Restrictions",
"SAA"                 => "Special Assessment Amount",
"SAG"                 => "Selling Agent Number",
"SAP"                 => "Septic Approved for Number of Bedrooms",
"SCA"                 => "Selling Co Agent Number",
"SCO"                 => "Selling Co Office Number",
"SD"                  => "School District Code",
"SDA"                 => "Septic Designed and Applied for",
"SDT"                 => "Status Date",
"SEC"                 => "Section Township Range",
"SEP"                 => "Septic System Installed",
"SF1"                 => "Square Feet Unit 1",
"SF2"                 => "Square Feet Unit 2",
"SF3"                 => "Square Feet Unit 3",
"SF4"                 => "Square Feet Unit 4",
"SF5"                 => "Square Feet Unit 5",
"SF6"                 => "Square Feet Unit 6",
"SFA"                 => "Soils Feasibility Available",
"SFF"                 => "Square Footage Finished",
"SFS"                 => "Square Footage Source",
"SFU"                 => "Square Footage Unfinished",
"SH"                  => "Senior High",
"SHOADR"              => "Show Address to Public",
"SIB"                 => "Number of Stories in Building",
"SIN"                 => "Signage",
"SIT"                 => "Site Features",
"SIZ"                 => "Approximate Building Square Feet",
"SKR"                 => "Skirting Material",
"SLP"                 => "Slope of Property",
"SML"                 => "Show Map Link to Public",
"SNR"                 => "Senior Exemption",
"SO"                  => "Selling Office Number",
"SP"                  => "Selling Price",
"SPA"                 => "Special Assessment ",
"SPR"                 => "Space Rent Per Month",
"SRI"                 => "Space Rent Includes",
"SST"                 => "Septic System Type",
"SSUF"                => "Street Suffix",
"SSZ"                 => "Storage Size",
"ST"                  => "Status",
"STA"                 => "State",
"STF"                 => "Site Frontage",
"STG"                 => "Storage Number",
"STL"                 => "Storage Location",
"STO"                 => "Storage",
"STP"                 => "Soil Type",
"STR"                 => "Street",
"STRS"                => "Number of Access Stairs",
"STY"                 => "Style",
"SUR"                 => "Survey Information",
"SWC"                 => "Sewer Company",
"SWR"                 => "Sewer",
"TAC"                 => "Till Acres",
"TAV"                 => "Total Assessed Value",
"TAX"                 => "Parcel Number",
"TBG"                 => "Three Quarter Baths Garage",
"TBL"                 => "Three Quarter Baths Lower",
"TBM"                 => "Three Quarter Baths Main",
"TBU"                 => "Three Quarter Baths Upper",
"TER"                 => "Terms Remarks",
"TEX"                 => "Total Expenses",
"TEXP"                => "Annual Expenses",
"TIN"                 => "Total Monthly Income",
"TMC"                 => "Terms and Conditions",
"TN1"                 => "Description Unit 1",
"TN2"                 => "Description Unit 2",
"TN3"                 => "Description Unit 3",
"TN4"                 => "Description Unit 4",
"TN5"                 => "Description Unit 5",
"TN6"                 => "Description Unit 6",
"TOB"                 => "Type of Business",
"TOF"                 => "Type of Fireplace",
"TPO"                 => "Topography",
"TQBT"                => "Three Quarter Bathrooms",
"TRI"                 => "Total Monthly Rent",
"TRM"                 => "Potential Terms",
"TSF"                 => "Total Square Feet Rented",
"TSP"                 => "Total Number of Parking Spaces",
"TURN_OVER"           => "Turn Over",
"TX"                  => "Tax Amount",
"TXY"                 => "Tax Year",
"TYP"                 => "Type of Property",
"UBG"                 => "Units Below Grade",
"UCS"                 => "Unit Can Stay in Park After Sale",
"UD"                  => "Update Date",
"UFN"                 => "Unit Floor Number",
"UN1"                 => "Description Unit 1",
"UN2"                 => "Description Unit 2",
"UN3"                 => "Description Unit 3",
"UN4"                 => "Description Unit 4",
"UN5"                 => "Description Unit 5",
"UN6"                 => "Description Unit 6",
"UNF"                 => "Unit Features",
"UNT"                 => "Unit",
"US1"                 => "Type of Use Unit 1",
"US2"                 => "Type of Use Unit 2",
"US3"                 => "Type of Use Unit 3",
"US4"                 => "Type of Use Unit 4",
"US5"                 => "Type of Use Unit 5",
"US6"                 => "Type of Use Unit 6",
"USP"                 => "Number of Uncovered Spaces",
"UTL"                 => "Included in Rent",
"UTR"                 => "Utility Room Location",
"VAC"                 => "Vacancy Rate",
"VAI"                 => "Improved Assessed Value",
"VAL"                 => "Land Assessed Value",
"VALUES"              => "Values", 
"VCC"                 => "View Comments",
"VEW"                 => "View",
"VIRT"                => "Virtual Tour URL",
"WAC"                 => "Water Company",
"WAS"                 => "Water Source",
"WD1"                 => "Washer Dryer Unit 1",
"WD2"                 => "Washer Dryer Unit 2",
"WD3"                 => "Washer Dryer Unit 3",
"WD4"                 => "Washer Dryer Unit 4",
"WD5"                 => "Washer Dryer Unit 5",
"WD6"                 => "Washer Dryer Unit 6",
"WEEK_ASSIGNMENT"     => "Week Assignment",
"WDW"                 => "Window Covering",
"WFG"                 => "Waterfront Footage",
"WFT"                 => "Waterfront",
"WHT"                 => "Water Heater Location",
"WRJ"                 => "Water Jurisdiction",
"WSF"                 => "Approximate Whse Mfg Square Feet",
"WSG"                 => "Water Sewer Garbage",
"WTR"                 => "Water",
"XP"                  => "Expiration Date",
"YBT"                 => "Year Built",
"YRE"                 => "Year Established",
"YRS"                 => "Years Current Owner In Business",
"YVA"                 => "Year Value Assessed",
"ZIP"                 => "Zip Code",
"ZJD"                 => "Zoning Jurisdiction",
"ZNC"                 => "Zoning Code",
"ZNR"                 => "Zoning Remarks"
}

Class Method Summary collapse

Class Method Details

.expand_attribute(attr) ⇒ Object



446
447
448
449
450
451
452
# File 'lib/nwmls_client/codes.rb', line 446

def self.expand_attribute(attr)
  begin
    combined = "#{ALL_CODES.fetch(attr)} (#{attr})"
  rescue KeyError
    attr
  end
end

.expand_code(attr) ⇒ Object



454
455
456
457
458
459
460
461
# File 'lib/nwmls_client/codes.rb', line 454

def self.expand_code(attr)
  begin
    combined = "#{ALL_CODES.fetch(attr)}"
    field_name = "#{combined.gsub(/\s+/, "_").downcase}"
  rescue KeyError
    attr
  end
end


463
464
465
466
467
468
# File 'lib/nwmls_client/codes.rb', line 463

def self.print
  ALL_CODES.each do |key, value|
      field = value.gsub(/\s+/, "_").downcase
      puts "add_column :residentials, :#{field}, :string"        
  end      
end