lib/moysklad/entities/product.rb in moysklad-0.4.6 vs lib/moysklad/entities/product.rb in moysklad-0.4.7
- old
+ new
@@ -15,11 +15,11 @@
attribute :minPrice, Float
attribute :buyPrice, Currency
attribute :salePrices, Array[Price]
- attribute :image, Image
+ attribute :images, Images # MetaArray
attribute :article, String
attribute :weighed, Boolean
attribute :attrs, Array[Attribute]
attribute :weight, Float
@@ -41,8 +41,12 @@
def features universe
cache :features, universe do
universe.features.where goodUuid: uuid
end
+ end
+
+ def product_images(universe)
+ Moysklad::Resources::ProductImages.new(client: universe.client, list_path: images.meta.href).list
end
end
end