Object.from_hash takes an existing object as second argument to update its attributes
add validations for integers