Class: Moysklad::Entities::Product

Inherits:
Entity show all
Includes:
AttributesConverter
Defined in:
lib/moysklad/entities/product.rb

Direct Known Subclasses

Bundle

Instance Attribute Summary

Attributes inherited from Base

#dump, #universe

Instance Method Summary collapse

Methods included from AttributesConverter

#initialize

Methods inherited from Entity

#to_s

Methods inherited from Base

build, #initialize, #to_json, #to_s

Instance Method Details

#features(universe) ⇒ Object

preferences



42
43
44
45
46
# File 'lib/moysklad/entities/product.rb', line 42

def features universe
  cache :features, universe do
    universe.features.where goodUuid: uuid
  end
end

#product_images(universe) ⇒ Object



48
49
50
# File 'lib/moysklad/entities/product.rb', line 48

def product_images(universe)
  Moysklad::Resources::ProductImages.new(client: universe.client, list_path: images.meta.href).list
end