Class: Edi::Wayfair::ListingGenerator::Attributes::MaximumTemperature
- Inherits:
-
BaseAttribute
- Object
- BaseAttribute
- Edi::Wayfair::ListingGenerator::Attributes::MaximumTemperature
- Defined in:
- app/services/edi/wayfair/listing_generator/attributes/maximum_temperature.rb
Overview
Maps maximum temperature from Item to Wayfair's Maximum Temperature attribute
Taxonomy Attribute ID: 912
Datatype: DECIMAL
Constant Summary
Constants inherited from BaseAttribute
Instance Attribute Summary
Attributes inherited from BaseAttribute
#attribute_definition, #catalog_item, #item, #taxonomy_attribute_id, #wayfair_schema
Instance Method Summary collapse
Methods inherited from BaseAttribute
attribute_name, #attribute_title, #build, #build_attribute_hash, #can_build?, #custom_values_allowed?, #datatype, #fetch_value, #format_boolean, #format_decimal, #initialize, #map_unit, #possible_values, #requirement, set_taxonomy_attribute_id, taxonomy_attribute_id, #valid_value?
Constructor Details
This class inherits a constructor from Edi::Wayfair::ListingGenerator::Attributes::BaseAttribute
Instance Method Details
#value ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'app/services/edi/wayfair/listing_generator/attributes/maximum_temperature.rb', line 10 def value # Try various spec names temp = fetch_value(:max_temperature) || fetch_value(:maximum_temperature) || fetch_value(:max_temp) return nil unless temp.present? format_decimal(temp) end |