Sha256: bac0abba29ba0dff23b0c532fb8670e7f4416752fbd9a7d4dc140ff785f0e20e

Contents?: true

Size: 994 Bytes

Versions: 1

Compression:

Stored size: 994 Bytes

Contents

module AmoCRM::Entities
  class Good < Base
    include CommonObject
    include AmoCRM::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,        AmoCRM::Entities::SalePrices

    has_many  :attributes,        Attribute
    element   :images,            AmoCRM::Entities::Images
    element   :barcode,           AmoCRM::Entities::Barcode
    # preferences

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
amo_crm-0.2.2 lib/amo_crm/entities/good.rb