Sha256: 4d94e3218ce1a3aeac9e6031e2af75cf5fb323e44e97174125049024d502cb97

Contents?: true

Size: 550 Bytes

Versions: 4

Compression:

Stored size: 550 Bytes

Contents

# Элемент в справочнике (DictionaryEntity)
module Moysklad::Entities
  class CustomEntity < Base
    attribute :meta, Meta
    attribute :accountId,                String
    attribute :id,                String
    attribute :name, String
    attribute :externalCode,      String
    attribute :description,      String

    # TODO remove
    def entityMetadataUuid
      dictionaryId
    end

    # ID Словаря
    def dictionaryId
      meta.metadataHref.split('/').last
    end

    def to_s
      name
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
moysklad-0.3.4 lib/moysklad/entities/custom_entity.rb
moysklad-0.3.3 lib/moysklad/entities/custom_entity.rb
moysklad-0.3.2 lib/moysklad/entities/custom_entity.rb
moysklad-0.3.1 lib/moysklad/entities/custom_entity.rb