929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
|
# File 'lib/XMLFields.rb', line 929
def self.from_hash(hash, name='echeck')
base = hash[name]
if(base)
this = Echeck.new
this.accType = base['accType']
this.accNum = base['accNum']
this.routingNum = base['routingNum']
this.checkNum = base['checkNum']
SchemaValidation.validate_enum(this.accType, true, ['Checking','Savings','Corporate','Corp Savings'], name, 'accType')
SchemaValidation.validate_length(this.accNum, true, 1, 17, name, 'accNum')
SchemaValidation.validate_length(this.routingNum, true, 9, 9, name, 'routingNum')
SchemaValidation.validate_length(this.checkNum, false, 1, 15, name, 'checkNum')
this
else
nil
end
end
|