Sha256: 710a4dd83f491664e1d93fa22a8a61dba7d2e5c9f89b6191b2318b3fd577aa95

Contents?: true

Size: 1.36 KB

Versions: 7

Compression:

Stored size: 1.36 KB

Contents

module Moysklad::Entities
  class Product < Entity
    include AttributesConverter
    attribute :accountId,         String
    attribute :owner,             Owner
    attribute :group,             Group
    attribute :description,       String
    # attribute :shared,            Shared
    attribute :vat, Float
    attribute :effectiveVat, Float
    attribute :pathName,          String
    attribute :productFolder,     Productfolder

    attribute :uom,               Uom

    attribute :minPrice,          Float
    attribute :buyPrice,          Currency
    attribute :salePrices,        Array[Price]

    attribute :image,             Image

    attribute :article,           String
    attribute :weighed,           Boolean
    attribute :attrs,             Array[Attribute]
    attribute :weight,            Float
    attribute :volume,            Float
    attribute :barcodes,          Array[String]

    attribute :isSerialTrackable, Boolean

    attribute :modificationsCount, Integer


    # Когда загружаем через ассортименты эти поля устанавливаются
    attribute :stock, Float
    attribute :reserve, Float
    attribute :inTransit, Float
    attribute :quantity, Float

    # preferences

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
moysklad-0.4.6 lib/moysklad/entities/product.rb
moysklad-0.4.5 lib/moysklad/entities/product.rb
moysklad-0.4.4 lib/moysklad/entities/product.rb
moysklad-0.4.3 lib/moysklad/entities/product.rb
moysklad-0.4.2 lib/moysklad/entities/product.rb
moysklad-0.4.1 lib/moysklad/entities/product.rb
moysklad-0.4.0 lib/moysklad/entities/product.rb