lib/moy_sklad/client/resource.rb
# Nested object finder by type uuid + object uuid.
#
# MS data model have arrays which contains objects where each object have a special "type"
# uuid and object uuid. Type + Object uuids are PK for the object.
#
# @attr name [Symbol] attribute name
# @attr type [String] "type" uuid
# @attr key  [String] "object" uuid
#
Nested object finder by type uuid + object uuid.
MS data model have arrays which contains objects where each object have a special "type"
uuid and object uuid. Type + Object uuids are PK for the object.
Nested object finder by type uuid + object uuid . MS data model have arrays which contains objects where each object have a special " type " uuid and object uuid . Type + Object uuids are PK for the object .
def create_nested_collection_or_resource(name, collection = true)
      name = name.to_s
      if !known_attributes.include?(name) || attributes[name].nil?
        known_attributes << name
        attributes[name] = collection ? [] : create_and_load_resource(name)
      end
    end
def create_nested_collection_or_resource ( name , collection = true ) name = name . to_s if ! known_attributes . include? ( name ) || attributes [ name ] . nil? known_attributes << name attributes [ name ] = collection ? [ ] : create_and_load_resource ( name ) end end
Nested object finder by type uuid + object uuid.
Nested object finder by type uuid + object uuid .
name
<not_specific>
collection
<not_specific>
attr
None
attr
None
attr
None