1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
|
# File 'lib/XMLFields.rb', line 1025
def self.from_hash(hash,index=0, name="createAddOn")
base = hash[name][index]
if(base)
this = CreateAddOn.new
this.addOnCode = base['addOnCode']
this.name = base['name']
this.amount = base['amount']
this.startDate = base['startDate']
this.endDate = base['endDate']
SchemaValidation.validate_length(this.addOnCode, true, 1, 25, name, 'addOnCode')
SchemaValidation.validate_length(this.name, true, 1, 100, name, "name")
SchemaValidation.validate_size(this.amount,true,0,999999999999,name,'amount')
SchemaValidation.validate_date(this.startDate, true, name, 'startDate')
SchemaValidation.validate_date(this.endDate, true, name, 'endDate')
this
end
end
|