lib/economic/entity/handle.rb in rconomic-0.5.1 vs lib/economic/entity/handle.rb in rconomic-0.5.2

- old
+ new

@@ -10,10 +10,11 @@ { :code => 'Code', :id => 'Id', :id1 => 'Id1', :id2 => 'Id2', + :name => 'Name', :number => 'Number', :serial_number => 'SerialNumber', :vat_code => 'VatCode' } end @@ -33,10 +34,10 @@ def initialize(hash) verify_sanity_of_arguments!(hash) hash = prepare_hash_argument(hash) unless hash.is_a?(self.class) - [:code, :vat_code].each do |key| + [:code, :name, :vat_code].each do |key| instance_variable_set("@#{key}", hash[key]) if hash[key] end [:id, :id1, :id2, :number, :serial_number].each do |key| instance_variable_set("@#{key}", hash[key].to_i) if hash[key] end