change_healthcare-professional_claims 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +3 -0
- data/.rubocop.yml +30 -0
- data/.travis.yml +6 -0
- data/.yardopts +1 -0
- data/CHANGELOG.md +0 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +118 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +8 -0
- data/TODO.md +8 -0
- data/bin/console +15 -0
- data/bin/rspec +29 -0
- data/bin/setup +8 -0
- data/change_healthcare-professional_claims.gemspec +43 -0
- data/lib/change_healthcare/professional_claims.rb +16 -0
- data/lib/change_healthcare/professional_claims/swagger_client.rb +106 -0
- data/lib/change_healthcare/professional_claims/swagger_client/api_client.rb +390 -0
- data/lib/change_healthcare/professional_claims/swagger_client/api_error.rb +42 -0
- data/lib/change_healthcare/professional_claims/swagger_client/configuration.rb +204 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/address.rb +219 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/ambulance_certification.rb +247 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/ambulance_transport_information.rb +259 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/clai_request.rb +283 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/claim_adjustment.rb +244 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/claim_adjustment_details.rb +199 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/claim_contract_information.rb +265 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/claim_date_information.rb +298 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/claim_information.rb +579 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/claim_note.rb +216 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/claim_pricing_repricing_information.rb +363 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/claim_reference.rb +231 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/claim_submission_request.rb +278 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/claim_supplemental_information.rb +315 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/composite_diagnosis_code_pointers.rb +191 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/condition_indicator_durable_medical_equipment.rb +281 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/condition_information.rb +190 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/contact_information.rb +209 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/contract_information.rb +255 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/dependent.rb +294 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/drug_identification.rb +278 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/durable_medical_equipment_certificate_of_medical_necessity.rb +226 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/durable_medical_equipment_certification.rb +233 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/durable_medical_equipment_service.rb +243 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/edit_response.rb +251 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/epsdt_referral.rb +236 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/error.rb +214 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/failure.rb +194 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/form_identification.rb +240 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/health_care_information.rb +233 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/line_adjudication_information.rb +284 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/measurements.rb +256 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/medicare_outpatient_adjudication.rb +213 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/other_payer_billing_provider.rb +236 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/other_payer_name.rb +285 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/other_payer_referring_provider.rb +192 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/other_payer_rendering_provider.rb +236 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/other_payer_service_facility_location.rb +192 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/other_payer_supervising_provider.rb +192 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/other_subscriber_information.rb +430 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/other_subscriber_name.rb +288 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/patient_condition_information_vision.rb +259 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/pay_to_plan.rb +278 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/payer.rb +194 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/prior_authorization.rb +194 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/professional_service.rb +290 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/provider.rb +281 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/purchased_service_information.rb +194 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/raw_x12_request.rb +194 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/receiver.rb +189 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/reference_identification.rb +199 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/report_information.rb +261 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/response.rb +240 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/service_facility_location.rb +224 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/service_line.rb +388 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/service_line_date_information.rb +236 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/service_line_provider.rb +293 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/service_line_reference_information.rb +230 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/spinal_manipulation_service_information.rb +238 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/submitter.rb +209 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/subscriber.rb +309 -0
- data/lib/change_healthcare/professional_claims/swagger_client/models/supporting_documentation.rb +249 -0
- data/lib/change_healthcare/professional_claims/swagger_client/professional_claims_api.rb +361 -0
- data/lib/change_healthcare/professional_claims/swagger_client/version.rb +19 -0
- data/lib/change_healthcare/professional_claims/version.rb +7 -0
- data/lib/change_healthcare/professional_claims/wrapper.rb +141 -0
- metadata +274 -0
@@ -0,0 +1,284 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# #Medical Network Professional Claims v3
|
4
|
+
#
|
5
|
+
# Reference for developers
|
6
|
+
#
|
7
|
+
# OpenAPI spec version: v3
|
8
|
+
#
|
9
|
+
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
10
|
+
# Swagger Codegen version: 2.4.19
|
11
|
+
#
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module ChangeHealthcare
|
16
|
+
module ProfessionalClaims
|
17
|
+
module SwaggerClient
|
18
|
+
class LineAdjudicationInformation
|
19
|
+
attr_accessor :adjudication_or_payment_date, :bundled_or_unbundled_line_number, :claim_adjustment_information,
|
20
|
+
:other_payer_primary_identifier, :paid_service_unit_count, :procedure_code, :procedure_code_description, :procedure_modifier, :remaining_patient_liability, :service_line_paid_amount
|
21
|
+
|
22
|
+
# Allowed Values are: 'ER' Jurisdiction Specific Procedure and Supply Codes, 'HC' Health Care Financing Administration Common Procedural Coding System (HCPCS) Codes, 'HP' Health Insurance Prospective Payment System (HIPPS) Skilled Nursing Facility Rate Code, 'IV' Home Infusion EDI Coalition (HIEC) Product/Service Code, 'WK' Advanced Billing Concepts (ABC) Codes
|
23
|
+
attr_accessor :service_id_qualifier
|
24
|
+
|
25
|
+
class EnumAttributeValidator
|
26
|
+
attr_reader :datatype, :allowable_values
|
27
|
+
|
28
|
+
def initialize(datatype, allowable_values)
|
29
|
+
@allowable_values = allowable_values.map do |value|
|
30
|
+
case datatype.to_s
|
31
|
+
when /Integer/i
|
32
|
+
value.to_i
|
33
|
+
when /Float/i
|
34
|
+
value.to_f
|
35
|
+
else
|
36
|
+
value
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def valid?(value)
|
42
|
+
!value || allowable_values.include?(value)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
47
|
+
def self.attribute_map
|
48
|
+
{
|
49
|
+
adjudication_or_payment_date: :adjudicationOrPaymentDate,
|
50
|
+
bundled_or_unbundled_line_number: :bundledOrUnbundledLineNumber,
|
51
|
+
claim_adjustment_information: :claimAdjustmentInformation,
|
52
|
+
other_payer_primary_identifier: :otherPayerPrimaryIdentifier,
|
53
|
+
paid_service_unit_count: :paidServiceUnitCount,
|
54
|
+
procedure_code: :procedureCode,
|
55
|
+
procedure_code_description: :procedureCodeDescription,
|
56
|
+
procedure_modifier: :procedureModifier,
|
57
|
+
remaining_patient_liability: :remainingPatientLiability,
|
58
|
+
service_id_qualifier: :serviceIdQualifier,
|
59
|
+
service_line_paid_amount: :serviceLinePaidAmount
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
# Attribute type mapping.
|
64
|
+
def self.swagger_types
|
65
|
+
{
|
66
|
+
adjudication_or_payment_date: :String,
|
67
|
+
bundled_or_unbundled_line_number: :String,
|
68
|
+
claim_adjustment_information: :'Array<ClaimAdjustment>',
|
69
|
+
other_payer_primary_identifier: :String,
|
70
|
+
paid_service_unit_count: :String,
|
71
|
+
procedure_code: :String,
|
72
|
+
procedure_code_description: :String,
|
73
|
+
procedure_modifier: :'Array<String>',
|
74
|
+
remaining_patient_liability: :String,
|
75
|
+
service_id_qualifier: :String,
|
76
|
+
service_line_paid_amount: :String
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
80
|
+
# Initializes the object
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
82
|
+
def initialize(attributes = {})
|
83
|
+
return unless attributes.is_a?(Hash)
|
84
|
+
|
85
|
+
# convert string to symbol for hash key
|
86
|
+
attributes = attributes.transform_keys(&:to_sym)
|
87
|
+
|
88
|
+
self.adjudication_or_payment_date = attributes[:adjudicationOrPaymentDate] if attributes.key?(:adjudicationOrPaymentDate)
|
89
|
+
|
90
|
+
self.bundled_or_unbundled_line_number = attributes[:bundledOrUnbundledLineNumber] if attributes.key?(:bundledOrUnbundledLineNumber)
|
91
|
+
|
92
|
+
if attributes.key?(:claimAdjustmentInformation) && (value = attributes[:claimAdjustmentInformation]).is_a?(Array)
|
93
|
+
self.claim_adjustment_information = value
|
94
|
+
end
|
95
|
+
|
96
|
+
self.other_payer_primary_identifier = attributes[:otherPayerPrimaryIdentifier] if attributes.key?(:otherPayerPrimaryIdentifier)
|
97
|
+
|
98
|
+
self.paid_service_unit_count = attributes[:paidServiceUnitCount] if attributes.key?(:paidServiceUnitCount)
|
99
|
+
|
100
|
+
self.procedure_code = attributes[:procedureCode] if attributes.key?(:procedureCode)
|
101
|
+
|
102
|
+
self.procedure_code_description = attributes[:procedureCodeDescription] if attributes.key?(:procedureCodeDescription)
|
103
|
+
|
104
|
+
if attributes.key?(:procedureModifier) && (value = attributes[:procedureModifier]).is_a?(Array)
|
105
|
+
self.procedure_modifier = value
|
106
|
+
end
|
107
|
+
|
108
|
+
self.remaining_patient_liability = attributes[:remainingPatientLiability] if attributes.key?(:remainingPatientLiability)
|
109
|
+
|
110
|
+
self.service_id_qualifier = attributes[:serviceIdQualifier] if attributes.key?(:serviceIdQualifier)
|
111
|
+
|
112
|
+
self.service_line_paid_amount = attributes[:serviceLinePaidAmount] if attributes.key?(:serviceLinePaidAmount)
|
113
|
+
end
|
114
|
+
|
115
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
116
|
+
# @return Array for valid properties with the reasons
|
117
|
+
def list_invalid_properties
|
118
|
+
[]
|
119
|
+
end
|
120
|
+
|
121
|
+
# Check to see if the all the properties in the model are valid
|
122
|
+
# @return true if the model is valid
|
123
|
+
def valid?
|
124
|
+
service_id_qualifier_validator = EnumAttributeValidator.new('String', %w[ER HC HP IV WK])
|
125
|
+
return false unless service_id_qualifier_validator.valid?(@service_id_qualifier)
|
126
|
+
|
127
|
+
true
|
128
|
+
end
|
129
|
+
|
130
|
+
# Custom attribute writer method checking allowed values (enum).
|
131
|
+
# @param [Object] service_id_qualifier Object to be assigned
|
132
|
+
def service_id_qualifier=(service_id_qualifier)
|
133
|
+
validator = EnumAttributeValidator.new('String', %w[ER HC HP IV WK])
|
134
|
+
unless validator.valid?(service_id_qualifier)
|
135
|
+
raise ArgumentError,
|
136
|
+
%(invalid value for "service_id_qualifier", must be one of #{validator.allowable_values}.)
|
137
|
+
end
|
138
|
+
|
139
|
+
@service_id_qualifier = service_id_qualifier
|
140
|
+
end
|
141
|
+
|
142
|
+
# Checks equality by comparing each attribute.
|
143
|
+
# @param [Object] Object to be compared
|
144
|
+
def ==(other)
|
145
|
+
return true if equal?(other)
|
146
|
+
|
147
|
+
self.class == other.class &&
|
148
|
+
adjudication_or_payment_date == other.adjudication_or_payment_date &&
|
149
|
+
bundled_or_unbundled_line_number == other.bundled_or_unbundled_line_number &&
|
150
|
+
claim_adjustment_information == other.claim_adjustment_information &&
|
151
|
+
other_payer_primary_identifier == other.other_payer_primary_identifier &&
|
152
|
+
paid_service_unit_count == other.paid_service_unit_count &&
|
153
|
+
procedure_code == other.procedure_code &&
|
154
|
+
procedure_code_description == other.procedure_code_description &&
|
155
|
+
procedure_modifier == other.procedure_modifier &&
|
156
|
+
remaining_patient_liability == other.remaining_patient_liability &&
|
157
|
+
service_id_qualifier == other.service_id_qualifier &&
|
158
|
+
service_line_paid_amount == other.service_line_paid_amount
|
159
|
+
end
|
160
|
+
|
161
|
+
# @see the `==` method
|
162
|
+
# @param [Object] Object to be compared
|
163
|
+
def eql?(other)
|
164
|
+
self == other
|
165
|
+
end
|
166
|
+
|
167
|
+
# Calculates hash code according to all attributes.
|
168
|
+
# @return [Fixnum] Hash code
|
169
|
+
def hash
|
170
|
+
[adjudication_or_payment_date, bundled_or_unbundled_line_number, claim_adjustment_information,
|
171
|
+
other_payer_primary_identifier, paid_service_unit_count, procedure_code, procedure_code_description, procedure_modifier, remaining_patient_liability, service_id_qualifier, service_line_paid_amount].hash
|
172
|
+
end
|
173
|
+
|
174
|
+
# Builds the object from hash
|
175
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
176
|
+
# @return [Object] Returns the model itself
|
177
|
+
def build_from_hash(attributes)
|
178
|
+
return nil unless attributes.is_a?(Hash)
|
179
|
+
|
180
|
+
self.class.swagger_types.each_pair do |key, type|
|
181
|
+
if type =~ /\AArray<(.*)>/i
|
182
|
+
# check to ensure the input is an array given that the attribute
|
183
|
+
# is documented as an array but the input is not
|
184
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
185
|
+
send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
|
186
|
+
_deserialize(Regexp.last_match(1), v)
|
187
|
+
end)
|
188
|
+
end
|
189
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
190
|
+
send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
self
|
195
|
+
end
|
196
|
+
|
197
|
+
# Deserializes the data based on type
|
198
|
+
# @param string type Data type
|
199
|
+
# @param string value Value to be deserialized
|
200
|
+
# @return [Object] Deserialized data
|
201
|
+
def _deserialize(type, value)
|
202
|
+
case type.to_sym
|
203
|
+
when :DateTime
|
204
|
+
DateTime.parse(value)
|
205
|
+
when :Date
|
206
|
+
Date.parse(value)
|
207
|
+
when :String
|
208
|
+
value.to_s
|
209
|
+
when :Integer
|
210
|
+
value.to_i
|
211
|
+
when :Float
|
212
|
+
value.to_f
|
213
|
+
when :BOOLEAN
|
214
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
215
|
+
true
|
216
|
+
else
|
217
|
+
false
|
218
|
+
end
|
219
|
+
when :Object
|
220
|
+
# generic object (usually a Hash), return directly
|
221
|
+
value
|
222
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
223
|
+
inner_type = Regexp.last_match[:inner_type]
|
224
|
+
value.map { |v| _deserialize(inner_type, v) }
|
225
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
226
|
+
k_type = Regexp.last_match[:k_type]
|
227
|
+
v_type = Regexp.last_match[:v_type]
|
228
|
+
{}.tap do |hash|
|
229
|
+
value.each do |k, v|
|
230
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
231
|
+
end
|
232
|
+
end
|
233
|
+
else # model
|
234
|
+
temp_model = SwaggerClient.const_get(type).new
|
235
|
+
temp_model.build_from_hash(value)
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
# Returns the string representation of the object
|
240
|
+
# @return [String] String presentation of the object
|
241
|
+
def to_s
|
242
|
+
to_hash.to_s
|
243
|
+
end
|
244
|
+
|
245
|
+
# to_body is an alias to to_hash (backward compatibility)
|
246
|
+
# @return [Hash] Returns the object in the form of hash
|
247
|
+
def to_body
|
248
|
+
to_hash
|
249
|
+
end
|
250
|
+
|
251
|
+
# Returns the object in the form of hash
|
252
|
+
# @return [Hash] Returns the object in the form of hash
|
253
|
+
def to_hash
|
254
|
+
hash = {}
|
255
|
+
self.class.attribute_map.each_pair do |attr, param|
|
256
|
+
value = send(attr)
|
257
|
+
next if value.nil?
|
258
|
+
|
259
|
+
hash[param] = _to_hash(value)
|
260
|
+
end
|
261
|
+
hash
|
262
|
+
end
|
263
|
+
|
264
|
+
# Outputs non-array value in the form of hash
|
265
|
+
# For object, use to_hash. Otherwise, just return the value
|
266
|
+
# @param [Object] value Any valid value
|
267
|
+
# @return [Hash] Returns the value in the form of hash
|
268
|
+
def _to_hash(value)
|
269
|
+
if value.is_a?(Array)
|
270
|
+
value.compact.map { |v| _to_hash(v) }
|
271
|
+
elsif value.is_a?(Hash)
|
272
|
+
{}.tap do |hash|
|
273
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
274
|
+
end
|
275
|
+
elsif value.respond_to? :to_hash
|
276
|
+
value.to_hash
|
277
|
+
else
|
278
|
+
value
|
279
|
+
end
|
280
|
+
end
|
281
|
+
end
|
282
|
+
end
|
283
|
+
end
|
284
|
+
end
|
@@ -0,0 +1,256 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# #Medical Network Professional Claims v3
|
4
|
+
#
|
5
|
+
# Reference for developers
|
6
|
+
#
|
7
|
+
# OpenAPI spec version: v3
|
8
|
+
#
|
9
|
+
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
10
|
+
# Swagger Codegen version: 2.4.19
|
11
|
+
#
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module ChangeHealthcare
|
16
|
+
module ProfessionalClaims
|
17
|
+
module SwaggerClient
|
18
|
+
class Measurements
|
19
|
+
attr_accessor :measurement_qualifier
|
20
|
+
|
21
|
+
# Allowed Values are: 'OG' Original, 'TR' Test Results
|
22
|
+
attr_accessor :measurement_reference_identification_code
|
23
|
+
|
24
|
+
# Allowed Values are: 'HT' Height, 'R1' Hemoglobin, 'R2' Hematocrit, 'R3' Epoetin Starting Dosage, 'R4' Creatinine
|
25
|
+
attr_accessor :test_results
|
26
|
+
|
27
|
+
class EnumAttributeValidator
|
28
|
+
attr_reader :datatype, :allowable_values
|
29
|
+
|
30
|
+
def initialize(datatype, allowable_values)
|
31
|
+
@allowable_values = allowable_values.map do |value|
|
32
|
+
case datatype.to_s
|
33
|
+
when /Integer/i
|
34
|
+
value.to_i
|
35
|
+
when /Float/i
|
36
|
+
value.to_f
|
37
|
+
else
|
38
|
+
value
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def valid?(value)
|
44
|
+
!value || allowable_values.include?(value)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
49
|
+
def self.attribute_map
|
50
|
+
{
|
51
|
+
measurement_qualifier: :measurementQualifier,
|
52
|
+
measurement_reference_identification_code: :measurementReferenceIdentificationCode,
|
53
|
+
test_results: :testResults
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
# Attribute type mapping.
|
58
|
+
def self.swagger_types
|
59
|
+
{
|
60
|
+
measurement_qualifier: :String,
|
61
|
+
measurement_reference_identification_code: :String,
|
62
|
+
test_results: :String
|
63
|
+
}
|
64
|
+
end
|
65
|
+
|
66
|
+
# Initializes the object
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
68
|
+
def initialize(attributes = {})
|
69
|
+
return unless attributes.is_a?(Hash)
|
70
|
+
|
71
|
+
# convert string to symbol for hash key
|
72
|
+
attributes = attributes.transform_keys(&:to_sym)
|
73
|
+
|
74
|
+
self.measurement_qualifier = attributes[:measurementQualifier] if attributes.key?(:measurementQualifier)
|
75
|
+
|
76
|
+
self.measurement_reference_identification_code = attributes[:measurementReferenceIdentificationCode] if attributes.key?(:measurementReferenceIdentificationCode)
|
77
|
+
|
78
|
+
self.test_results = attributes[:testResults] if attributes.key?(:testResults)
|
79
|
+
end
|
80
|
+
|
81
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
82
|
+
# @return Array for valid properties with the reasons
|
83
|
+
def list_invalid_properties
|
84
|
+
[]
|
85
|
+
end
|
86
|
+
|
87
|
+
# Check to see if the all the properties in the model are valid
|
88
|
+
# @return true if the model is valid
|
89
|
+
def valid?
|
90
|
+
measurement_reference_identification_code_validator = EnumAttributeValidator.new('String', %w[OG TR])
|
91
|
+
return false unless measurement_reference_identification_code_validator.valid?(@measurement_reference_identification_code)
|
92
|
+
|
93
|
+
test_results_validator = EnumAttributeValidator.new('String', %w[I Y])
|
94
|
+
return false unless test_results_validator.valid?(@test_results)
|
95
|
+
|
96
|
+
true
|
97
|
+
end
|
98
|
+
|
99
|
+
# Custom attribute writer method checking allowed values (enum).
|
100
|
+
# @param [Object] measurement_reference_identification_code Object to be assigned
|
101
|
+
def measurement_reference_identification_code=(measurement_reference_identification_code)
|
102
|
+
validator = EnumAttributeValidator.new('String', %w[OG TR])
|
103
|
+
unless validator.valid?(measurement_reference_identification_code)
|
104
|
+
raise ArgumentError,
|
105
|
+
%(invalid value for "measurement_reference_identification_code", must be one of #{validator.allowable_values}.)
|
106
|
+
end
|
107
|
+
|
108
|
+
@measurement_reference_identification_code = measurement_reference_identification_code
|
109
|
+
end
|
110
|
+
|
111
|
+
# Custom attribute writer method checking allowed values (enum).
|
112
|
+
# @param [Object] test_results Object to be assigned
|
113
|
+
def test_results=(test_results)
|
114
|
+
validator = EnumAttributeValidator.new('String', %w[I Y])
|
115
|
+
unless validator.valid?(test_results)
|
116
|
+
raise ArgumentError,
|
117
|
+
%(invalid value for "test_results", must be one of #{validator.allowable_values}.)
|
118
|
+
end
|
119
|
+
|
120
|
+
@test_results = test_results
|
121
|
+
end
|
122
|
+
|
123
|
+
# Checks equality by comparing each attribute.
|
124
|
+
# @param [Object] Object to be compared
|
125
|
+
def ==(other)
|
126
|
+
return true if equal?(other)
|
127
|
+
|
128
|
+
self.class == other.class &&
|
129
|
+
measurement_qualifier == other.measurement_qualifier &&
|
130
|
+
measurement_reference_identification_code == other.measurement_reference_identification_code &&
|
131
|
+
test_results == other.test_results
|
132
|
+
end
|
133
|
+
|
134
|
+
# @see the `==` method
|
135
|
+
# @param [Object] Object to be compared
|
136
|
+
def eql?(other)
|
137
|
+
self == other
|
138
|
+
end
|
139
|
+
|
140
|
+
# Calculates hash code according to all attributes.
|
141
|
+
# @return [Fixnum] Hash code
|
142
|
+
def hash
|
143
|
+
[measurement_qualifier, measurement_reference_identification_code, test_results].hash
|
144
|
+
end
|
145
|
+
|
146
|
+
# Builds the object from hash
|
147
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
148
|
+
# @return [Object] Returns the model itself
|
149
|
+
def build_from_hash(attributes)
|
150
|
+
return nil unless attributes.is_a?(Hash)
|
151
|
+
|
152
|
+
self.class.swagger_types.each_pair do |key, type|
|
153
|
+
if type =~ /\AArray<(.*)>/i
|
154
|
+
# check to ensure the input is an array given that the attribute
|
155
|
+
# is documented as an array but the input is not
|
156
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
157
|
+
send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
|
158
|
+
_deserialize(Regexp.last_match(1), v)
|
159
|
+
end)
|
160
|
+
end
|
161
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
162
|
+
send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
self
|
167
|
+
end
|
168
|
+
|
169
|
+
# Deserializes the data based on type
|
170
|
+
# @param string type Data type
|
171
|
+
# @param string value Value to be deserialized
|
172
|
+
# @return [Object] Deserialized data
|
173
|
+
def _deserialize(type, value)
|
174
|
+
case type.to_sym
|
175
|
+
when :DateTime
|
176
|
+
DateTime.parse(value)
|
177
|
+
when :Date
|
178
|
+
Date.parse(value)
|
179
|
+
when :String
|
180
|
+
value.to_s
|
181
|
+
when :Integer
|
182
|
+
value.to_i
|
183
|
+
when :Float
|
184
|
+
value.to_f
|
185
|
+
when :BOOLEAN
|
186
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
187
|
+
true
|
188
|
+
else
|
189
|
+
false
|
190
|
+
end
|
191
|
+
when :Object
|
192
|
+
# generic object (usually a Hash), return directly
|
193
|
+
value
|
194
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
195
|
+
inner_type = Regexp.last_match[:inner_type]
|
196
|
+
value.map { |v| _deserialize(inner_type, v) }
|
197
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
198
|
+
k_type = Regexp.last_match[:k_type]
|
199
|
+
v_type = Regexp.last_match[:v_type]
|
200
|
+
{}.tap do |hash|
|
201
|
+
value.each do |k, v|
|
202
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
203
|
+
end
|
204
|
+
end
|
205
|
+
else # model
|
206
|
+
temp_model = SwaggerClient.const_get(type).new
|
207
|
+
temp_model.build_from_hash(value)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
# Returns the string representation of the object
|
212
|
+
# @return [String] String presentation of the object
|
213
|
+
def to_s
|
214
|
+
to_hash.to_s
|
215
|
+
end
|
216
|
+
|
217
|
+
# to_body is an alias to to_hash (backward compatibility)
|
218
|
+
# @return [Hash] Returns the object in the form of hash
|
219
|
+
def to_body
|
220
|
+
to_hash
|
221
|
+
end
|
222
|
+
|
223
|
+
# Returns the object in the form of hash
|
224
|
+
# @return [Hash] Returns the object in the form of hash
|
225
|
+
def to_hash
|
226
|
+
hash = {}
|
227
|
+
self.class.attribute_map.each_pair do |attr, param|
|
228
|
+
value = send(attr)
|
229
|
+
next if value.nil?
|
230
|
+
|
231
|
+
hash[param] = _to_hash(value)
|
232
|
+
end
|
233
|
+
hash
|
234
|
+
end
|
235
|
+
|
236
|
+
# Outputs non-array value in the form of hash
|
237
|
+
# For object, use to_hash. Otherwise, just return the value
|
238
|
+
# @param [Object] value Any valid value
|
239
|
+
# @return [Hash] Returns the value in the form of hash
|
240
|
+
def _to_hash(value)
|
241
|
+
if value.is_a?(Array)
|
242
|
+
value.compact.map { |v| _to_hash(v) }
|
243
|
+
elsif value.is_a?(Hash)
|
244
|
+
{}.tap do |hash|
|
245
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
246
|
+
end
|
247
|
+
elsif value.respond_to? :to_hash
|
248
|
+
value.to_hash
|
249
|
+
else
|
250
|
+
value
|
251
|
+
end
|
252
|
+
end
|
253
|
+
end
|
254
|
+
end
|
255
|
+
end
|
256
|
+
end
|