Class: Variant

Inherits:
Base
  • Object
show all
Defined in:
app/models/variant.rb

Constant Summary

Constants inherited from Base

Base::BASE_URL

Instance Method Summary collapse

Instance Method Details

#productObject



2
3
4
# File 'app/models/variant.rb', line 2

def product
  Product.find(:first, :from => "/v1/products/#{self.product_id}.xml")
end

#propertiesObject



6
7
8
# File 'app/models/variant.rb', line 6

def properties
  VariantProperty.find(:all, :from => "/v1/variant_properties.xml?search[product_variant_id_equals]=#{self.id}")
end