Class: ChangeHealthcare::Eligibility::SwaggerClient::BenefitsInformation

Inherits:
Object
  • Object
show all
Defined in:
lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ BenefitsInformation

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 89

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.transform_keys(&:to_sym)

  if attributes.key?(:additionalInformation)
    if (value = attributes[:additionalInformation]).is_a?(Array)
      self.additional_information = value
    end
  end

  self.auth_or_cert_indicator = attributes[:authOrCertIndicator] if attributes.key?(:authOrCertIndicator)

  self.benefit_amount = attributes[:benefitAmount] if attributes.key?(:benefitAmount)

  self.benefit_percent = attributes[:benefitPercent] if attributes.key?(:benefitPercent)

  self.benefit_quantity = attributes[:benefitQuantity] if attributes.key?(:benefitQuantity)

  self.benefits_additional_information = attributes[:benefitsAdditionalInformation] if attributes.key?(:benefitsAdditionalInformation)

  self.benefits_date_information = attributes[:benefitsDateInformation] if attributes.key?(:benefitsDateInformation)

  self.benefits_related_entity = attributes[:benefitsRelatedEntity] if attributes.key?(:benefitsRelatedEntity)

  if attributes.key?(:benefitsServiceDelivery)
    if (value = attributes[:benefitsServiceDelivery]).is_a?(Array)
      self.benefits_service_delivery = value
    end
  end

  self.code = attributes[:code] if attributes.key?(:code)

  if attributes.key?(:compositeMedicalProcedureIdentifier)
    self.composite_medical_procedure_identifier = attributes[:compositeMedicalProcedureIdentifier]
  end

  self.coverage_level = attributes[:coverageLevel] if attributes.key?(:coverageLevel)

  self.coverage_level_code = attributes[:coverageLevelCode] if attributes.key?(:coverageLevelCode)

  self.eligibility_additional_information = attributes[:eligibilityAdditionalInformation] if attributes.key?(:eligibilityAdditionalInformation)

  self.header_loop_identifier_code = attributes[:headerLoopIdentifierCode] if attributes.key?(:headerLoopIdentifierCode)

  self.in_plan_network_indicator = attributes[:inPlanNetworkIndicator] if attributes.key?(:inPlanNetworkIndicator)

  self.in_plan_network_indicator_code = attributes[:inPlanNetworkIndicatorCode] if attributes.key?(:inPlanNetworkIndicatorCode)

  self.insurance_type = attributes[:insuranceType] if attributes.key?(:insuranceType)

  self.insurance_type_code = attributes[:insuranceTypeCode] if attributes.key?(:insuranceTypeCode)

  self.name = attributes[:name] if attributes.key?(:name)

  self.plan_coverage = attributes[:planCoverage] if attributes.key?(:planCoverage)

  self.quantity_qualifier = attributes[:quantityQualifier] if attributes.key?(:quantityQualifier)

  self.quantity_qualifier_code = attributes[:quantityQualifierCode] if attributes.key?(:quantityQualifierCode)

  if attributes.key?(:serviceTypeCodes)
    if (value = attributes[:serviceTypeCodes]).is_a?(Array)
      self.service_type_codes = value
    end
  end

  if attributes.key?(:serviceTypes)
    if (value = attributes[:serviceTypes]).is_a?(Array)
      self.service_types = value
    end
  end

  self.time_qualifier = attributes[:timeQualifier] if attributes.key?(:timeQualifier)

  self.time_qualifier_code = attributes[:timeQualifierCode] if attributes.key?(:timeQualifierCode)

  self.trailer_loop_identifier_code = attributes[:trailerLoopIdentifierCode] if attributes.key?(:trailerLoopIdentifierCode)
end

Instance Attribute Details

#additional_informationObject

Returns the value of attribute additional_information.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def additional_information
  @additional_information
end

#auth_or_cert_indicatorObject

Returns the value of attribute auth_or_cert_indicator.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def auth_or_cert_indicator
  @auth_or_cert_indicator
end

#benefit_amountObject

Returns the value of attribute benefit_amount.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def benefit_amount
  @benefit_amount
end

#benefit_percentObject

Returns the value of attribute benefit_percent.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def benefit_percent
  @benefit_percent
end

#benefit_quantityObject

Returns the value of attribute benefit_quantity.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def benefit_quantity
  @benefit_quantity
end

#benefits_additional_informationObject

Returns the value of attribute benefits_additional_information.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def benefits_additional_information
  @benefits_additional_information
end

#benefits_date_informationObject

Returns the value of attribute benefits_date_information.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def benefits_date_information
  @benefits_date_information
end

Returns the value of attribute benefits_related_entity.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def benefits_related_entity
  @benefits_related_entity
end

#benefits_service_deliveryObject

Returns the value of attribute benefits_service_delivery.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def benefits_service_delivery
  @benefits_service_delivery
end

#codeObject

Returns the value of attribute code.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def code
  @code
end

#composite_medical_procedure_identifierObject

Returns the value of attribute composite_medical_procedure_identifier.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def composite_medical_procedure_identifier
  @composite_medical_procedure_identifier
end

#coverage_levelObject

Returns the value of attribute coverage_level.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def coverage_level
  @coverage_level
end

#coverage_level_codeObject

Returns the value of attribute coverage_level_code.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def coverage_level_code
  @coverage_level_code
end

#eligibility_additional_informationObject

Returns the value of attribute eligibility_additional_information.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def eligibility_additional_information
  @eligibility_additional_information
end

#header_loop_identifier_codeObject

Returns the value of attribute header_loop_identifier_code.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def header_loop_identifier_code
  @header_loop_identifier_code
end

#in_plan_network_indicatorObject

Returns the value of attribute in_plan_network_indicator.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def in_plan_network_indicator
  @in_plan_network_indicator
end

#in_plan_network_indicator_codeObject

Returns the value of attribute in_plan_network_indicator_code.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def in_plan_network_indicator_code
  @in_plan_network_indicator_code
end

#insurance_typeObject

Returns the value of attribute insurance_type.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def insurance_type
  @insurance_type
end

#insurance_type_codeObject

Returns the value of attribute insurance_type_code.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def insurance_type_code
  @insurance_type_code
end

#nameObject

Returns the value of attribute name.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def name
  @name
end

#plan_coverageObject

Returns the value of attribute plan_coverage.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def plan_coverage
  @plan_coverage
end

#quantity_qualifierObject

Returns the value of attribute quantity_qualifier.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def quantity_qualifier
  @quantity_qualifier
end

#quantity_qualifier_codeObject

Returns the value of attribute quantity_qualifier_code.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def quantity_qualifier_code
  @quantity_qualifier_code
end

#service_type_codesObject

Returns the value of attribute service_type_codes.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def service_type_codes
  @service_type_codes
end

#service_typesObject

Returns the value of attribute service_types.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def service_types
  @service_types
end

#time_qualifierObject

Returns the value of attribute time_qualifier.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def time_qualifier
  @time_qualifier
end

#time_qualifier_codeObject

Returns the value of attribute time_qualifier_code.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def time_qualifier_code
  @time_qualifier_code
end

#trailer_loop_identifier_codeObject

Returns the value of attribute trailer_loop_identifier_code.



17
18
19
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 17

def trailer_loop_identifier_code
  @trailer_loop_identifier_code
end

Class Method Details

.attribute_mapObject

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



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 20

def self.attribute_map
  {
    'additional_information': :additionalInformation,
    'auth_or_cert_indicator': :authOrCertIndicator,
    'benefit_amount': :benefitAmount,
    'benefit_percent': :benefitPercent,
    'benefit_quantity': :benefitQuantity,
    'benefits_additional_information': :benefitsAdditionalInformation,
    'benefits_date_information': :benefitsDateInformation,
    'benefits_related_entity': :benefitsRelatedEntity,
    'benefits_service_delivery': :benefitsServiceDelivery,
    'code': :code,
    'composite_medical_procedure_identifier': :compositeMedicalProcedureIdentifier,
    'coverage_level': :coverageLevel,
    'coverage_level_code': :coverageLevelCode,
    'eligibility_additional_information': :eligibilityAdditionalInformation,
    'header_loop_identifier_code': :headerLoopIdentifierCode,
    'in_plan_network_indicator': :inPlanNetworkIndicator,
    'in_plan_network_indicator_code': :inPlanNetworkIndicatorCode,
    'insurance_type': :insuranceType,
    'insurance_type_code': :insuranceTypeCode,
    'name': :name,
    'plan_coverage': :planCoverage,
    'quantity_qualifier': :quantityQualifier,
    'quantity_qualifier_code': :quantityQualifierCode,
    'service_type_codes': :serviceTypeCodes,
    'service_types': :serviceTypes,
    'time_qualifier': :timeQualifier,
    'time_qualifier_code': :timeQualifierCode,
    'trailer_loop_identifier_code': :trailerLoopIdentifierCode
  }
end

.swagger_typesObject

Attribute type mapping.



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 54

def self.swagger_types
  {
    'additional_information': :'Array<AdditionalInformation>',
    'auth_or_cert_indicator': :String,
    'benefit_amount': :String,
    'benefit_percent': :String,
    'benefit_quantity': :String,
    'benefits_additional_information': :BenefitsAdditionalInformation,
    'benefits_date_information': :BenefitsDateInformation,
    'benefits_related_entity': :BenefitsRelatedEntity,
    'benefits_service_delivery': :'Array<BenefitsServiceDelivery>',
    'code': :String,
    'composite_medical_procedure_identifier': :CompositeMedicalProcedureIdentifier,
    'coverage_level': :String,
    'coverage_level_code': :String,
    'eligibility_additional_information': :EligibilityAdditionalInformation,
    'header_loop_identifier_code': :String,
    'in_plan_network_indicator': :String,
    'in_plan_network_indicator_code': :String,
    'insurance_type': :String,
    'insurance_type_code': :String,
    'name': :String,
    'plan_coverage': :String,
    'quantity_qualifier': :String,
    'quantity_qualifier_code': :String,
    'service_type_codes': :'Array<String>',
    'service_types': :'Array<String>',
    'time_qualifier': :String,
    'time_qualifier_code': :String,
    'trailer_loop_identifier_code': :String
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 184

def ==(o)
  return true if equal?(o)

  self.class == o.class &&
    additional_information == o.additional_information &&
    auth_or_cert_indicator == o.auth_or_cert_indicator &&
    benefit_amount == o.benefit_amount &&
    benefit_percent == o.benefit_percent &&
    benefit_quantity == o.benefit_quantity &&
    benefits_additional_information == o.benefits_additional_information &&
    benefits_date_information == o.benefits_date_information &&
    benefits_related_entity == o.benefits_related_entity &&
    benefits_service_delivery == o.benefits_service_delivery &&
    code == o.code &&
    composite_medical_procedure_identifier == o.composite_medical_procedure_identifier &&
    coverage_level == o.coverage_level &&
    coverage_level_code == o.coverage_level_code &&
    eligibility_additional_information == o.eligibility_additional_information &&
    header_loop_identifier_code == o.header_loop_identifier_code &&
    in_plan_network_indicator == o.in_plan_network_indicator &&
    in_plan_network_indicator_code == o.in_plan_network_indicator_code &&
    insurance_type == o.insurance_type &&
    insurance_type_code == o.insurance_type_code &&
    name == o.name &&
    plan_coverage == o.plan_coverage &&
    quantity_qualifier == o.quantity_qualifier &&
    quantity_qualifier_code == o.quantity_qualifier_code &&
    service_type_codes == o.service_type_codes &&
    service_types == o.service_types &&
    time_qualifier == o.time_qualifier &&
    time_qualifier_code == o.time_qualifier_code &&
    trailer_loop_identifier_code == o.trailer_loop_identifier_code
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 255

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 = SwaggerClient.const_get(type).new
    temp_model.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



322
323
324
325
326
327
328
329
330
331
332
333
334
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 322

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) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 233

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 attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize(Regexp.last_match(1), v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      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) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


220
221
222
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 220

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



226
227
228
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 226

def hash
  [additional_information, auth_or_cert_indicator, benefit_amount, benefit_percent, benefit_quantity, benefits_additional_information, benefits_date_information, benefits_related_entity, benefits_service_delivery, code, composite_medical_procedure_identifier, coverage_level, coverage_level_code, eligibility_additional_information, header_loop_identifier_code, in_plan_network_indicator, in_plan_network_indicator_code, insurance_type, insurance_type_code, name, plan_coverage, quantity_qualifier, quantity_qualifier_code, service_type_codes, service_types, time_qualifier, time_qualifier_code, trailer_loop_identifier_code].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



172
173
174
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 172

def list_invalid_properties
  []
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



301
302
303
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 301

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



307
308
309
310
311
312
313
314
315
316
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 307

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = send(attr)
    next if value.nil?

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



295
296
297
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 295

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



178
179
180
# File 'lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb', line 178

def valid?
  true
end