Class: Product

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

Constant Summary

Constants inherited from Base

Base::BASE_URL

Instance Method Summary collapse

Instance Method Details

#collectionsObject



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

def collections
  Collection.find(:all, :from => "/v1/products/#{self.handle}/collections.xml")
end

#images(options = {}) ⇒ Object



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

def images(options={})
  ProductImage.find(:all, :from => "/v1/products/#{self.handle}/images.xml")
end

#propertiesObject



10
11
12
# File 'app/models/product.rb', line 10

def properties
  ProductProperty.find(:all, :from => "/v1/products/#{self.handle}/properties.xml")
end

#variantsObject



14
15
16
# File 'app/models/product.rb', line 14

def variants
  Variant.find(:all, :from => "/v1/products/#{self.handle}/variants.xml")
end