Class: LitleOnline::HealthcareAmounts

Inherits:
Object
  • Object
show all
Includes:
XML::Mapping
Defined in:
lib/XMLFields.rb

Class Method Summary collapse

Class Method Details

.from_hash(hash, name = 'healthcareAmounts') ⇒ Object



404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
# File 'lib/XMLFields.rb', line 404

def self.from_hash(hash, name='healthcareAmounts')
  base = hash[name]
  if(base)
    this = HealthcareAmounts.new
    this.totalHealthcareAmount = base['totalHealthcareAmount']
    this.rxAmount = base['RxAmount']
    this.visionAmount = base['visionAmount']
    this.clinicOtherAmount = base['clinicOtherAmount']
    this.dentalAmount = base['dentalAmount']
    SchemaValidation.validate_size(this.totalHealthcareAmount, true, -999999999999, 999999999999, name, 'totalHealthcareAmount')
    SchemaValidation.validate_size(this.rxAmount, false, -999999999999, 999999999999, name, 'RxAmount')
    SchemaValidation.validate_size(this.visionAmount, false, -999999999999, 999999999999, name, 'visionAmount')
    SchemaValidation.validate_size(this.clinicOtherAmount, false, -999999999999, 999999999999, name, 'clinicOtherAmount')
    SchemaValidation.validate_size(this.dentalAmount, false, -999999999999, 999999999999, name, 'dentalAmount')
    this
  else
    nil
  end
end