Sha256: 5ed2852a4e83d888686afdd9b145d7180c183e9a8b9c28b50f4f0c31633791c4

Contents?: true

Size: 895 Bytes

Versions: 7

Compression:

Stored size: 895 Bytes

Contents

module Moysklad::Entities
  class Good < Base
    include CommonObject
    include Moysklad::Entities::XmlFix

    tag 'good'

    attribute :isSerialTrackable, Boolean
    attribute :buyPrice,          Float
    attribute :buyCurrencyUuid,   String
    attribute :minPrice,          Float
    attribute :salePrice,         Float
    attribute :saleCurrencyUuid,  String
    attribute :weight,            Float
    attribute :volume,            Float
    attribute :parentUuid,        String
    attribute :productCode,       String
    attribute :uomUuid,           String

    element   :code,              String
    element   :salePrices,        Moysklad::Entities::SalePrices

    has_many  :attributes,        Attribute

    # preferences
    # images

    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.2.1 lib/moysklad/entities/good.rb
moysklad-0.2.0 lib/moysklad/entities/good.rb
moysklad-0.1.5 lib/moysklad/entities/good.rb
moysklad-0.1.4 lib/moysklad/entities/good.rb
moysklad-0.1.3 lib/moysklad/entities/good.rb
moysklad-0.1.2 lib/moysklad/entities/good.rb
moysklad-0.1.1 lib/moysklad/entities/good.rb