Sha256: b18c754d5f5a10f6c941a4b61828f092add97f695b011497189d352f58157a21

Contents?: true

Size: 467 Bytes

Versions: 12

Compression:

Stored size: 467 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

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

    def to_s
      name
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
moysklad-0.5 lib/moysklad/entities/custom_entity.rb
moysklad-0.4.10 lib/moysklad/entities/custom_entity.rb
moysklad-0.4.9 lib/moysklad/entities/custom_entity.rb
moysklad-0.4.8 lib/moysklad/entities/custom_entity.rb
moysklad-0.4.7 lib/moysklad/entities/custom_entity.rb
moysklad-0.4.6 lib/moysklad/entities/custom_entity.rb
moysklad-0.4.5 lib/moysklad/entities/custom_entity.rb
moysklad-0.4.4 lib/moysklad/entities/custom_entity.rb
moysklad-0.4.3 lib/moysklad/entities/custom_entity.rb
moysklad-0.4.2 lib/moysklad/entities/custom_entity.rb
moysklad-0.4.1 lib/moysklad/entities/custom_entity.rb
moysklad-0.4.0 lib/moysklad/entities/custom_entity.rb