Sha256: c2a3d6ddd2a0667cd1e491d6eca96f6db4b2ce80467ab68c597af00b07fbd9b3

Contents?: true

Size: 728 Bytes

Versions: 3

Compression:

Stored size: 728 Bytes

Contents

module Moysklad::Entities
  # https://online.moysklad.ru/exchange/rest/ms/xml/Metadata/list
  class AttributeMetadata < Base
    include CommonObject

    tag 'attributeMetadata'

    # ID_CUSTOM - элемент из dictionary
    # TEXT
    # STRING
    attribute :attrType,            String
    attribute :entityMetadataUuid,  String
    attribute :feature,             Boolean
    attribute :position,            Integer
    attribute :required,            Boolean
    attribute :dictionaryMetadataUuid, String

    def dictionatyMetadata universe
      universe.custom_entity_metadata.find dictionaryMetadataUuid
    end

    def entityMetadata universe
      universe.metadata.find entityMetadataUuid
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
moysklad-0.1.3 lib/moysklad/entities/attribute_metadata.rb
moysklad-0.1.2 lib/moysklad/entities/attribute_metadata.rb
moysklad-0.1.1 lib/moysklad/entities/attribute_metadata.rb