class VericredClient::VisionPlanBenefits

Attributes

additional_pairs_of_eyeglasses[RW]

Additional Pairs of Eyeglasses benefit string

contact_lenses_conventional[RW]

Contact Lenses - Conventional benefit string

contact_lenses_disposable[RW]

Contact Lenses - Disposable benefit string

contact_lenses_medically_necessary[RW]

Contact Lenses - Medically Necessary benefit string

eye_exam[RW]

Eye Exam benefit string

eyeglass_lenses_bifocal[RW]

Eyeglass Lenses - Bifocal benefit string

eyeglass_lenses_lenticular[RW]

Eyeglass Lenses - Lenticular benefit string

eyeglass_lenses_single_vision[RW]

Eyeglass Lenses - Single Vision benefit string

eyeglass_lenses_trifocal[RW]

Eyeglass Lenses - Trifocal benefit string

frame[RW]

Frame benefit string

laser_vision_correction[RW]

Laser Vision Correction benefit string

photochromatic_lenses[RW]

Photochromatic Lenses benefit string

polarized_lenses[RW]

Polarized Lenses benefit string

premium_antireflective_coating[RW]

Premium Anti-Reflective Coating benefit string

premium_contact_lens_fit_and_follow_up[RW]

Premium Contact Lens Fit and Follow-Up benefit string

premium_progressive_lenses[RW]

Premium Progressive Lenses benefit string

retinal_imaging[RW]

Retinal Imaging benefit string

standard_antireflective_coating[RW]

Standard Anti-Reflective Coating benefit string

standard_contact_lens_fit_and_follow_up[RW]

Standard Contact Lens Fit and Follow-Up benefit string

standard_polycarbonate_lenses_adult[RW]

Standard Polycarbonate Lenses - Adult benefit string

standard_polycarbonate_lenses_child[RW]

Standard Polycarbonate Lenses - Child benefit string

standard_progressive_lenses[RW]

Standard Progressive Lenses benefit string

standard_scratch_resistance[RW]

Standard Scratch-Resistance Coating benefit string

tint[RW]

Tint benefit string

uv_coating[RW]

UV Coating benefit string

Public Class Methods

attribute_map() click to toggle source

Attribute mapping from ruby-style variable name to JSON key.

# File lib/vericred_client/models/vision_plan_benefits.rb, line 1094
def self.attribute_map
  {
    :'additional_pairs_of_eyeglasses' => :'additional_pairs_of_eyeglasses',
    :'contact_lenses_conventional' => :'contact_lenses_conventional',
    :'contact_lenses_disposable' => :'contact_lenses_disposable',
    :'contact_lenses_medically_necessary' => :'contact_lenses_medically_necessary',
    :'eye_exam' => :'eye_exam',
    :'eyeglass_lenses_bifocal' => :'eyeglass_lenses_bifocal',
    :'eyeglass_lenses_lenticular' => :'eyeglass_lenses_lenticular',
    :'eyeglass_lenses_single_vision' => :'eyeglass_lenses_single_vision',
    :'eyeglass_lenses_trifocal' => :'eyeglass_lenses_trifocal',
    :'frame' => :'frame',
    :'laser_vision_correction' => :'laser_vision_correction',
    :'photochromatic_lenses' => :'photochromatic_lenses',
    :'polarized_lenses' => :'polarized_lenses',
    :'premium_antireflective_coating' => :'premium_antireflective_coating',
    :'premium_contact_lens_fit_and_follow_up' => :'premium_contact_lens_fit_and_follow_up',
    :'premium_progressive_lenses' => :'premium_progressive_lenses',
    :'retinal_imaging' => :'retinal_imaging',
    :'standard_antireflective_coating' => :'standard_antireflective_coating',
    :'standard_contact_lens_fit_and_follow_up' => :'standard_contact_lens_fit_and_follow_up',
    :'standard_polycarbonate_lenses_adult' => :'standard_polycarbonate_lenses_adult',
    :'standard_polycarbonate_lenses_child' => :'standard_polycarbonate_lenses_child',
    :'standard_progressive_lenses' => :'standard_progressive_lenses',
    :'standard_scratch_resistance' => :'standard_scratch_resistance',
    :'tint' => :'tint',
    :'uv_coating' => :'uv_coating'
  }
end
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

# File lib/vericred_client/models/vision_plan_benefits.rb, line 1157
def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}

  if attributes.has_key?(:'additional_pairs_of_eyeglasses')
    self.additional_pairs_of_eyeglasses = attributes[:'additional_pairs_of_eyeglasses']
  end

  if attributes.has_key?(:'contact_lenses_conventional')
    self.contact_lenses_conventional = attributes[:'contact_lenses_conventional']
  end

  if attributes.has_key?(:'contact_lenses_disposable')
    self.contact_lenses_disposable = attributes[:'contact_lenses_disposable']
  end

  if attributes.has_key?(:'contact_lenses_medically_necessary')
    self.contact_lenses_medically_necessary = attributes[:'contact_lenses_medically_necessary']
  end

  if attributes.has_key?(:'eye_exam')
    self.eye_exam = attributes[:'eye_exam']
  end

  if attributes.has_key?(:'eyeglass_lenses_bifocal')
    self.eyeglass_lenses_bifocal = attributes[:'eyeglass_lenses_bifocal']
  end

  if attributes.has_key?(:'eyeglass_lenses_lenticular')
    self.eyeglass_lenses_lenticular = attributes[:'eyeglass_lenses_lenticular']
  end

  if attributes.has_key?(:'eyeglass_lenses_single_vision')
    self.eyeglass_lenses_single_vision = attributes[:'eyeglass_lenses_single_vision']
  end

  if attributes.has_key?(:'eyeglass_lenses_trifocal')
    self.eyeglass_lenses_trifocal = attributes[:'eyeglass_lenses_trifocal']
  end

  if attributes.has_key?(:'frame')
    self.frame = attributes[:'frame']
  end

  if attributes.has_key?(:'laser_vision_correction')
    self.laser_vision_correction = attributes[:'laser_vision_correction']
  end

  if attributes.has_key?(:'photochromatic_lenses')
    self.photochromatic_lenses = attributes[:'photochromatic_lenses']
  end

  if attributes.has_key?(:'polarized_lenses')
    self.polarized_lenses = attributes[:'polarized_lenses']
  end

  if attributes.has_key?(:'premium_antireflective_coating')
    self.premium_antireflective_coating = attributes[:'premium_antireflective_coating']
  end

  if attributes.has_key?(:'premium_contact_lens_fit_and_follow_up')
    self.premium_contact_lens_fit_and_follow_up = attributes[:'premium_contact_lens_fit_and_follow_up']
  end

  if attributes.has_key?(:'premium_progressive_lenses')
    self.premium_progressive_lenses = attributes[:'premium_progressive_lenses']
  end

  if attributes.has_key?(:'retinal_imaging')
    self.retinal_imaging = attributes[:'retinal_imaging']
  end

  if attributes.has_key?(:'standard_antireflective_coating')
    self.standard_antireflective_coating = attributes[:'standard_antireflective_coating']
  end

  if attributes.has_key?(:'standard_contact_lens_fit_and_follow_up')
    self.standard_contact_lens_fit_and_follow_up = attributes[:'standard_contact_lens_fit_and_follow_up']
  end

  if attributes.has_key?(:'standard_polycarbonate_lenses_adult')
    self.standard_polycarbonate_lenses_adult = attributes[:'standard_polycarbonate_lenses_adult']
  end

  if attributes.has_key?(:'standard_polycarbonate_lenses_child')
    self.standard_polycarbonate_lenses_child = attributes[:'standard_polycarbonate_lenses_child']
  end

  if attributes.has_key?(:'standard_progressive_lenses')
    self.standard_progressive_lenses = attributes[:'standard_progressive_lenses']
  end

  if attributes.has_key?(:'standard_scratch_resistance')
    self.standard_scratch_resistance = attributes[:'standard_scratch_resistance']
  end

  if attributes.has_key?(:'tint')
    self.tint = attributes[:'tint']
  end

  if attributes.has_key?(:'uv_coating')
    self.uv_coating = attributes[:'uv_coating']
  end

end
swagger_types() click to toggle source

Attribute type mapping.

# File lib/vericred_client/models/vision_plan_benefits.rb, line 1125
def self.swagger_types
  {
    :'additional_pairs_of_eyeglasses' => :'String',
    :'contact_lenses_conventional' => :'String',
    :'contact_lenses_disposable' => :'String',
    :'contact_lenses_medically_necessary' => :'String',
    :'eye_exam' => :'String',
    :'eyeglass_lenses_bifocal' => :'String',
    :'eyeglass_lenses_lenticular' => :'String',
    :'eyeglass_lenses_single_vision' => :'String',
    :'eyeglass_lenses_trifocal' => :'String',
    :'frame' => :'String',
    :'laser_vision_correction' => :'String',
    :'photochromatic_lenses' => :'String',
    :'polarized_lenses' => :'String',
    :'premium_antireflective_coating' => :'String',
    :'premium_contact_lens_fit_and_follow_up' => :'String',
    :'premium_progressive_lenses' => :'String',
    :'retinal_imaging' => :'String',
    :'standard_antireflective_coating' => :'String',
    :'standard_contact_lens_fit_and_follow_up' => :'String',
    :'standard_polycarbonate_lenses_adult' => :'String',
    :'standard_polycarbonate_lenses_child' => :'String',
    :'standard_progressive_lenses' => :'String',
    :'standard_scratch_resistance' => :'String',
    :'tint' => :'String',
    :'uv_coating' => :'String'
  }
end

Public Instance Methods

==(o) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# File lib/vericred_client/models/vision_plan_benefits.rb, line 1280
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      additional_pairs_of_eyeglasses == o.additional_pairs_of_eyeglasses &&
      contact_lenses_conventional == o.contact_lenses_conventional &&
      contact_lenses_disposable == o.contact_lenses_disposable &&
      contact_lenses_medically_necessary == o.contact_lenses_medically_necessary &&
      eye_exam == o.eye_exam &&
      eyeglass_lenses_bifocal == o.eyeglass_lenses_bifocal &&
      eyeglass_lenses_lenticular == o.eyeglass_lenses_lenticular &&
      eyeglass_lenses_single_vision == o.eyeglass_lenses_single_vision &&
      eyeglass_lenses_trifocal == o.eyeglass_lenses_trifocal &&
      frame == o.frame &&
      laser_vision_correction == o.laser_vision_correction &&
      photochromatic_lenses == o.photochromatic_lenses &&
      polarized_lenses == o.polarized_lenses &&
      premium_antireflective_coating == o.premium_antireflective_coating &&
      premium_contact_lens_fit_and_follow_up == o.premium_contact_lens_fit_and_follow_up &&
      premium_progressive_lenses == o.premium_progressive_lenses &&
      retinal_imaging == o.retinal_imaging &&
      standard_antireflective_coating == o.standard_antireflective_coating &&
      standard_contact_lens_fit_and_follow_up == o.standard_contact_lens_fit_and_follow_up &&
      standard_polycarbonate_lenses_adult == o.standard_polycarbonate_lenses_adult &&
      standard_polycarbonate_lenses_child == o.standard_polycarbonate_lenses_child &&
      standard_progressive_lenses == o.standard_progressive_lenses &&
      standard_scratch_resistance == o.standard_scratch_resistance &&
      tint == o.tint &&
      uv_coating == o.uv_coating
end
_deserialize(type, value) click to toggle source

Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data

# File lib/vericred_client/models/vision_plan_benefits.rb, line 1346
def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = VericredClient.const_get(type).new
    temp_model.build_from_hash(value)
  end
end
_to_hash(value) click to toggle source

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash

# File lib/vericred_client/models/vision_plan_benefits.rb, line 1412
def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map{ |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end
build_from_hash(attributes) click to toggle source

Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself

# File lib/vericred_client/models/vision_plan_benefits.rb, line 1325
def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end
eql?(o) click to toggle source

@see the `==` method @param [Object] Object to be compared

# File lib/vericred_client/models/vision_plan_benefits.rb, line 1312
def eql?(o)
  self == o
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Fixnum] Hash code

# File lib/vericred_client/models/vision_plan_benefits.rb, line 1318
def hash
  [additional_pairs_of_eyeglasses, contact_lenses_conventional, contact_lenses_disposable, contact_lenses_medically_necessary, eye_exam, eyeglass_lenses_bifocal, eyeglass_lenses_lenticular, eyeglass_lenses_single_vision, eyeglass_lenses_trifocal, frame, laser_vision_correction, photochromatic_lenses, polarized_lenses, premium_antireflective_coating, premium_contact_lens_fit_and_follow_up, premium_progressive_lenses, retinal_imaging, standard_antireflective_coating, standard_contact_lens_fit_and_follow_up, standard_polycarbonate_lenses_adult, standard_polycarbonate_lenses_child, standard_progressive_lenses, standard_scratch_resistance, tint, uv_coating].hash
end
list_invalid_properties() click to toggle source

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properies with the reasons

# File lib/vericred_client/models/vision_plan_benefits.rb, line 1267
def list_invalid_properties
  invalid_properties = Array.new
  return invalid_properties
end
to_body() click to toggle source

to_body is an alias to to_hash (backward compatibility) @return [Hash] Returns the object in the form of hash

# File lib/vericred_client/models/vision_plan_benefits.rb, line 1392
def to_body
  to_hash
end
to_hash() click to toggle source

Returns the object in the form of hash @return [Hash] Returns the object in the form of hash

# File lib/vericred_client/models/vision_plan_benefits.rb, line 1398
def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end
to_s() click to toggle source

Returns the string representation of the object @return [String] String presentation of the object

# File lib/vericred_client/models/vision_plan_benefits.rb, line 1386
def to_s
  to_hash.to_s
end
valid?() click to toggle source

Check to see if the all the properties in the model are valid @return true if the model is valid

# File lib/vericred_client/models/vision_plan_benefits.rb, line 1274
def valid?
  return true
end