lib/moy_sklad/client/resource.rb
# Construct nested resource class and load with given attributes
# NB: ALL nested classes should be created through this way.
Construct nested resource class and load with given attributes
NB: ALL nested classes should be created through this way.
Construct nested resource class and load with given attributes NB : ALL nested classes should be created through this way .
def create_and_load_resource(name, attributes = nil)
      res = find_or_create_resource_for(name).new
      res.load(attributes) if !attributes.nil?
      res
    end
def create_and_load_resource ( name , attributes = nil ) res = find_or_create_resource_for ( name ) . new res . load ( attributes ) if ! attributes . nil? res end
Construct nested resource class and load with given attributes
NB: ALL nested classes should be created through this way.
Construct nested resource class and load with given attributes NB : ALL nested classes should be created through this way .
name
<not_specific>
attributes
<not_specific>