Class: EcwidApi::ProductTypeAttribute
- Defined in:
- lib/ecwid_api/product_type_attribute.rb
Constant Summary collapse
- VALID_TYPES =
%w(CUSTOM UPC BRAND GENDER AGE_GROUP COLOR SIZE PRICE_PER_UNIT UNITS_IN_PRODUCT)
- VALID_SHOWS =
%w(NOTSHOW DESCR PRICE)
Instance Method Summary collapse
Methods inherited from Entity
#==, #[], #assign_attributes, #assign_raw_attributes, define_accessor, #destroy!, ecwid_accessor, ecwid_reader, ecwid_writer, #initialize, #marshal_dump, #marshal_load, #save, #to_hash, #to_json, #update_attributes, #update_raw_attributes, #url
Constructor Details
This class inherits a constructor from EcwidApi::Entity
Instance Method Details
#show=(show_type) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/ecwid_api/product_type_attribute.rb', line 19 def show=(show_type) show_type = show_type.to_s.upcase unless VALID_SHOWS.include?(show_type) raise ::StandardError.new("#{show_type} is an invalid 'show'") end super(show_type) end |
#type=(type_type) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/ecwid_api/product_type_attribute.rb', line 10 def type=(type_type) type_type = type_type.to_s.upcase unless VALID_TYPES.include?(type_type) raise ::StandardError.new("#{type_type} is an invalid 'type'") end super(type_type) end |