Sha256: 37143a2fe578d6b37afa096d73f96fc294ea6b1e4f7dbb8b454353b46fe48a69

Contents?: true

Size: 602 Bytes

Versions: 1

Compression:

Stored size: 602 Bytes

Contents

require_relative 'meta'
require_relative 'context'

# Элемент в справочнике (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

1 entries across 1 versions & 1 rubygems

Version Path
moysklad-0.3.0 lib/moysklad/entities/custom_entity.rb