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,261 @@
|
|
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 ReportInformation
|
19
|
+
attr_accessor :attachment_control_number
|
20
|
+
|
21
|
+
# Allowed Values are: '03' Report Justifying Treatment Beyond Utilization Guidelines, '04' Drugs Administered, '05' Treatment Diagnosis, '06' Initial Assessment, '07' Functional Goals, '08' Plan of Treatment, '09' Progress Report, '10' Continued Treatment, '11' Chemical Analysis, '13' Certified Test Report, '15' Justification for Admission, '21' Recovery Plan, 'A3' Allergies/Sensitivities Document, 'A4' Autopsy Report, 'AM' Ambulance Certification, 'AS' Admission Summary, 'B2' Prescription, 'B3' Physician Order, 'B4' Referral Form, 'BR' Benchmark Testing Results, 'BS' Baseline, 'BT' Blanket Test Results, 'CB' Chiropractic Justification, 'CK' Consent Form(s), 'CT' Certification, 'D2' Drug Profile Document, 'DA' Dental Models, 'DB' Durable Medical Equipment Prescription, 'DG' Diagnostic Report, 'DJ' Discharge Monitoring Report, 'DS' Discharge Summary, 'EB' Explanation of Benefits (Coordination of Benefits or Medicare Secondary Payor), 'HC' Health Certificate, 'HR' Health Clinic Records, 'I5' Immunization Record,'IR' State School Immunization Records, 'LA' Laboratory Results, 'M1' Medical Record Attachment, 'MT' Models, 'NM Nursing Notes', 'OB' Operative Note, 'OC' Oxygen Content Averaging Report, 'OD' Orders and Treatments Document, 'OE' Objective Physical Examination (including vital signs) Document, 'OX' Oxygen Therapy Certification, 'OZ' Support Data for Claim, 'P4' Pathology Report, 'P5' Patient Medical History Document, 'PE' Parenteral or Enteral Certification, 'PN' Physical Therapy Notes, 'PO' Prosthetics or Orthotic Certification, 'PQ' Paramedical Results, 'PY' Physician’s Report, 'PZ' Physical Therapy Certification, 'RB' Radiology Films, 'RR' Radiology Reports, 'RT' Report of Tests and Analysis Report, 'RX' Renewable Oxygen Content Averaging Report, 'SG' Symptoms Document, 'V5' Death Notification, 'XP' Photographs
|
22
|
+
attr_accessor :attachment_report_type_code
|
23
|
+
|
24
|
+
# Allowed Values are: 'AA' Available on Request at Provider Site, 'BM' By Mail, 'EL' Electronically Only, 'EM' E-Mail, 'FT' File Transfer, 'FX' By Fax
|
25
|
+
attr_accessor :attachment_transmission_code
|
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
|
+
attachment_control_number: :attachmentControlNumber,
|
52
|
+
attachment_report_type_code: :attachmentReportTypeCode,
|
53
|
+
attachment_transmission_code: :attachmentTransmissionCode
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
# Attribute type mapping.
|
58
|
+
def self.swagger_types
|
59
|
+
{
|
60
|
+
attachment_control_number: :String,
|
61
|
+
attachment_report_type_code: :String,
|
62
|
+
attachment_transmission_code: :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.attachment_control_number = attributes[:attachmentControlNumber] if attributes.key?(:attachmentControlNumber)
|
75
|
+
|
76
|
+
self.attachment_report_type_code = attributes[:attachmentReportTypeCode] if attributes.key?(:attachmentReportTypeCode)
|
77
|
+
|
78
|
+
self.attachment_transmission_code = attributes[:attachmentTransmissionCode] if attributes.key?(:attachmentTransmissionCode)
|
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
|
+
attachment_report_type_code_validator = EnumAttributeValidator.new('String',
|
91
|
+
%w[03 04 05 06 07 08 09 10 11 13 15 21 A3 A4 AM AS B2 B3 B4 BR BS BT CB CK CT D2 DA DB DG DJ DS EB HC HR I5 IR LA M1
|
92
|
+
MT NM OB OC OD OE OX OZ P4 P5 PE PN PO PQ PY PZ RB RR RT RX SG V5 XP])
|
93
|
+
return false unless attachment_report_type_code_validator.valid?(@attachment_report_type_code)
|
94
|
+
|
95
|
+
attachment_transmission_code_validator = EnumAttributeValidator.new('String',
|
96
|
+
%w[AA BM EL EM FT FX])
|
97
|
+
return false unless attachment_transmission_code_validator.valid?(@attachment_transmission_code)
|
98
|
+
|
99
|
+
true
|
100
|
+
end
|
101
|
+
|
102
|
+
# Custom attribute writer method checking allowed values (enum).
|
103
|
+
# @param [Object] attachment_report_type_code Object to be assigned
|
104
|
+
def attachment_report_type_code=(attachment_report_type_code)
|
105
|
+
validator = EnumAttributeValidator.new('String',
|
106
|
+
%w[03 04 05 06 07 08 09 10 11 13 15 21 A3 A4 AM AS B2 B3 B4 BR BS BT CB CK CT D2 DA DB DG DJ DS EB HC HR I5 IR LA M1
|
107
|
+
MT NM OB OC OD OE OX OZ P4 P5 PE PN PO PQ PY PZ RB RR RT RX SG V5 XP])
|
108
|
+
unless validator.valid?(attachment_report_type_code)
|
109
|
+
raise ArgumentError,
|
110
|
+
%(invalid value for "attachment_report_type_code", must be one of #{validator.allowable_values}.)
|
111
|
+
end
|
112
|
+
|
113
|
+
@attachment_report_type_code = attachment_report_type_code
|
114
|
+
end
|
115
|
+
|
116
|
+
# Custom attribute writer method checking allowed values (enum).
|
117
|
+
# @param [Object] attachment_transmission_code Object to be assigned
|
118
|
+
def attachment_transmission_code=(attachment_transmission_code)
|
119
|
+
validator = EnumAttributeValidator.new('String', %w[AA BM EL EM FT FX])
|
120
|
+
unless validator.valid?(attachment_transmission_code)
|
121
|
+
raise ArgumentError,
|
122
|
+
%(invalid value for "attachment_transmission_code", must be one of #{validator.allowable_values}.)
|
123
|
+
end
|
124
|
+
|
125
|
+
@attachment_transmission_code = attachment_transmission_code
|
126
|
+
end
|
127
|
+
|
128
|
+
# Checks equality by comparing each attribute.
|
129
|
+
# @param [Object] Object to be compared
|
130
|
+
def ==(other)
|
131
|
+
return true if equal?(other)
|
132
|
+
|
133
|
+
self.class == other.class &&
|
134
|
+
attachment_control_number == other.attachment_control_number &&
|
135
|
+
attachment_report_type_code == other.attachment_report_type_code &&
|
136
|
+
attachment_transmission_code == other.attachment_transmission_code
|
137
|
+
end
|
138
|
+
|
139
|
+
# @see the `==` method
|
140
|
+
# @param [Object] Object to be compared
|
141
|
+
def eql?(other)
|
142
|
+
self == other
|
143
|
+
end
|
144
|
+
|
145
|
+
# Calculates hash code according to all attributes.
|
146
|
+
# @return [Fixnum] Hash code
|
147
|
+
def hash
|
148
|
+
[attachment_control_number, attachment_report_type_code, attachment_transmission_code].hash
|
149
|
+
end
|
150
|
+
|
151
|
+
# Builds the object from hash
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
153
|
+
# @return [Object] Returns the model itself
|
154
|
+
def build_from_hash(attributes)
|
155
|
+
return nil unless attributes.is_a?(Hash)
|
156
|
+
|
157
|
+
self.class.swagger_types.each_pair do |key, type|
|
158
|
+
if type =~ /\AArray<(.*)>/i
|
159
|
+
# check to ensure the input is an array given that the attribute
|
160
|
+
# is documented as an array but the input is not
|
161
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
162
|
+
send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
|
163
|
+
_deserialize(Regexp.last_match(1), v)
|
164
|
+
end)
|
165
|
+
end
|
166
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
167
|
+
send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
self
|
172
|
+
end
|
173
|
+
|
174
|
+
# Deserializes the data based on type
|
175
|
+
# @param string type Data type
|
176
|
+
# @param string value Value to be deserialized
|
177
|
+
# @return [Object] Deserialized data
|
178
|
+
def _deserialize(type, value)
|
179
|
+
case type.to_sym
|
180
|
+
when :DateTime
|
181
|
+
DateTime.parse(value)
|
182
|
+
when :Date
|
183
|
+
Date.parse(value)
|
184
|
+
when :String
|
185
|
+
value.to_s
|
186
|
+
when :Integer
|
187
|
+
value.to_i
|
188
|
+
when :Float
|
189
|
+
value.to_f
|
190
|
+
when :BOOLEAN
|
191
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
192
|
+
true
|
193
|
+
else
|
194
|
+
false
|
195
|
+
end
|
196
|
+
when :Object
|
197
|
+
# generic object (usually a Hash), return directly
|
198
|
+
value
|
199
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
200
|
+
inner_type = Regexp.last_match[:inner_type]
|
201
|
+
value.map { |v| _deserialize(inner_type, v) }
|
202
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
203
|
+
k_type = Regexp.last_match[:k_type]
|
204
|
+
v_type = Regexp.last_match[:v_type]
|
205
|
+
{}.tap do |hash|
|
206
|
+
value.each do |k, v|
|
207
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
else # model
|
211
|
+
temp_model = SwaggerClient.const_get(type).new
|
212
|
+
temp_model.build_from_hash(value)
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
# Returns the string representation of the object
|
217
|
+
# @return [String] String presentation of the object
|
218
|
+
def to_s
|
219
|
+
to_hash.to_s
|
220
|
+
end
|
221
|
+
|
222
|
+
# to_body is an alias to to_hash (backward compatibility)
|
223
|
+
# @return [Hash] Returns the object in the form of hash
|
224
|
+
def to_body
|
225
|
+
to_hash
|
226
|
+
end
|
227
|
+
|
228
|
+
# Returns the object in the form of hash
|
229
|
+
# @return [Hash] Returns the object in the form of hash
|
230
|
+
def to_hash
|
231
|
+
hash = {}
|
232
|
+
self.class.attribute_map.each_pair do |attr, param|
|
233
|
+
value = send(attr)
|
234
|
+
next if value.nil?
|
235
|
+
|
236
|
+
hash[param] = _to_hash(value)
|
237
|
+
end
|
238
|
+
hash
|
239
|
+
end
|
240
|
+
|
241
|
+
# Outputs non-array value in the form of hash
|
242
|
+
# For object, use to_hash. Otherwise, just return the value
|
243
|
+
# @param [Object] value Any valid value
|
244
|
+
# @return [Hash] Returns the value in the form of hash
|
245
|
+
def _to_hash(value)
|
246
|
+
if value.is_a?(Array)
|
247
|
+
value.compact.map { |v| _to_hash(v) }
|
248
|
+
elsif value.is_a?(Hash)
|
249
|
+
{}.tap do |hash|
|
250
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
251
|
+
end
|
252
|
+
elsif value.respond_to? :to_hash
|
253
|
+
value.to_hash
|
254
|
+
else
|
255
|
+
value
|
256
|
+
end
|
257
|
+
end
|
258
|
+
end
|
259
|
+
end
|
260
|
+
end
|
261
|
+
end
|
@@ -0,0 +1,240 @@
|
|
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 Response
|
19
|
+
attr_accessor :claim_reference, :control_number, :edit_responses, :edit_status, :errors, :failure, :payer,
|
20
|
+
:status, :trading_partner_id, :trading_partner_service_id
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
claim_reference: :claimReference,
|
26
|
+
control_number: :controlNumber,
|
27
|
+
edit_responses: :editResponses,
|
28
|
+
edit_status: :editStatus,
|
29
|
+
errors: :errors,
|
30
|
+
failure: :failure,
|
31
|
+
payer: :payer,
|
32
|
+
status: :status,
|
33
|
+
trading_partner_id: :tradingPartnerId,
|
34
|
+
trading_partner_service_id: :tradingPartnerServiceId
|
35
|
+
}
|
36
|
+
end
|
37
|
+
|
38
|
+
# Attribute type mapping.
|
39
|
+
def self.swagger_types
|
40
|
+
{
|
41
|
+
claim_reference: :ClaimReference,
|
42
|
+
control_number: :String,
|
43
|
+
edit_responses: :'Array<EditResponse>',
|
44
|
+
edit_status: :String,
|
45
|
+
errors: :'Array<Error>',
|
46
|
+
failure: :Failure,
|
47
|
+
payer: :Payer,
|
48
|
+
status: :String,
|
49
|
+
trading_partner_id: :String,
|
50
|
+
trading_partner_service_id: :String
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Initializes the object
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
56
|
+
def initialize(attributes = {})
|
57
|
+
return unless attributes.is_a?(Hash)
|
58
|
+
|
59
|
+
# convert string to symbol for hash key
|
60
|
+
attributes = attributes.transform_keys(&:to_sym)
|
61
|
+
|
62
|
+
self.claim_reference = attributes[:claimReference] if attributes.key?(:claimReference)
|
63
|
+
|
64
|
+
self.control_number = attributes[:controlNumber] if attributes.key?(:controlNumber)
|
65
|
+
|
66
|
+
if attributes.key?(:editResponses) && (value = attributes[:editResponses]).is_a?(Array)
|
67
|
+
self.edit_responses = value
|
68
|
+
end
|
69
|
+
|
70
|
+
self.edit_status = attributes[:editStatus] if attributes.key?(:editStatus)
|
71
|
+
|
72
|
+
if attributes.key?(:errors) && (value = attributes[:errors]).is_a?(Array)
|
73
|
+
self.errors = value
|
74
|
+
end
|
75
|
+
|
76
|
+
self.failure = attributes[:failure] if attributes.key?(:failure)
|
77
|
+
|
78
|
+
self.payer = attributes[:payer] if attributes.key?(:payer)
|
79
|
+
|
80
|
+
self.status = attributes[:status] if attributes.key?(:status)
|
81
|
+
|
82
|
+
self.trading_partner_id = attributes[:tradingPartnerId] if attributes.key?(:tradingPartnerId)
|
83
|
+
|
84
|
+
self.trading_partner_service_id = attributes[:tradingPartnerServiceId] if attributes.key?(:tradingPartnerServiceId)
|
85
|
+
end
|
86
|
+
|
87
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
88
|
+
# @return Array for valid properties with the reasons
|
89
|
+
def list_invalid_properties
|
90
|
+
[]
|
91
|
+
end
|
92
|
+
|
93
|
+
# Check to see if the all the properties in the model are valid
|
94
|
+
# @return true if the model is valid
|
95
|
+
def valid?
|
96
|
+
true
|
97
|
+
end
|
98
|
+
|
99
|
+
# Checks equality by comparing each attribute.
|
100
|
+
# @param [Object] Object to be compared
|
101
|
+
def ==(other)
|
102
|
+
return true if equal?(other)
|
103
|
+
|
104
|
+
self.class == other.class &&
|
105
|
+
claim_reference == other.claim_reference &&
|
106
|
+
control_number == other.control_number &&
|
107
|
+
edit_responses == other.edit_responses &&
|
108
|
+
edit_status == other.edit_status &&
|
109
|
+
errors == other.errors &&
|
110
|
+
failure == other.failure &&
|
111
|
+
payer == other.payer &&
|
112
|
+
status == other.status &&
|
113
|
+
trading_partner_id == other.trading_partner_id &&
|
114
|
+
trading_partner_service_id == other.trading_partner_service_id
|
115
|
+
end
|
116
|
+
|
117
|
+
# @see the `==` method
|
118
|
+
# @param [Object] Object to be compared
|
119
|
+
def eql?(other)
|
120
|
+
self == other
|
121
|
+
end
|
122
|
+
|
123
|
+
# Calculates hash code according to all attributes.
|
124
|
+
# @return [Fixnum] Hash code
|
125
|
+
def hash
|
126
|
+
[claim_reference, control_number, edit_responses, edit_status, errors, failure, payer, status,
|
127
|
+
trading_partner_id, trading_partner_service_id].hash
|
128
|
+
end
|
129
|
+
|
130
|
+
# Builds the object from hash
|
131
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
132
|
+
# @return [Object] Returns the model itself
|
133
|
+
def build_from_hash(attributes)
|
134
|
+
return nil unless attributes.is_a?(Hash)
|
135
|
+
|
136
|
+
self.class.swagger_types.each_pair do |key, type|
|
137
|
+
if type =~ /\AArray<(.*)>/i
|
138
|
+
# check to ensure the input is an array given that the attribute
|
139
|
+
# is documented as an array but the input is not
|
140
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
141
|
+
send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
|
142
|
+
_deserialize(Regexp.last_match(1), v)
|
143
|
+
end)
|
144
|
+
end
|
145
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
146
|
+
send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
self
|
151
|
+
end
|
152
|
+
|
153
|
+
# Deserializes the data based on type
|
154
|
+
# @param string type Data type
|
155
|
+
# @param string value Value to be deserialized
|
156
|
+
# @return [Object] Deserialized data
|
157
|
+
def _deserialize(type, value)
|
158
|
+
case type.to_sym
|
159
|
+
when :DateTime
|
160
|
+
DateTime.parse(value)
|
161
|
+
when :Date
|
162
|
+
Date.parse(value)
|
163
|
+
when :String
|
164
|
+
value.to_s
|
165
|
+
when :Integer
|
166
|
+
value.to_i
|
167
|
+
when :Float
|
168
|
+
value.to_f
|
169
|
+
when :BOOLEAN
|
170
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
171
|
+
true
|
172
|
+
else
|
173
|
+
false
|
174
|
+
end
|
175
|
+
when :Object
|
176
|
+
# generic object (usually a Hash), return directly
|
177
|
+
value
|
178
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
179
|
+
inner_type = Regexp.last_match[:inner_type]
|
180
|
+
value.map { |v| _deserialize(inner_type, v) }
|
181
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
182
|
+
k_type = Regexp.last_match[:k_type]
|
183
|
+
v_type = Regexp.last_match[:v_type]
|
184
|
+
{}.tap do |hash|
|
185
|
+
value.each do |k, v|
|
186
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
else # model
|
190
|
+
temp_model = SwaggerClient.const_get(type).new
|
191
|
+
temp_model.build_from_hash(value)
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
# Returns the string representation of the object
|
196
|
+
# @return [String] String presentation of the object
|
197
|
+
def to_s
|
198
|
+
to_hash.to_s
|
199
|
+
end
|
200
|
+
|
201
|
+
# to_body is an alias to to_hash (backward compatibility)
|
202
|
+
# @return [Hash] Returns the object in the form of hash
|
203
|
+
def to_body
|
204
|
+
to_hash
|
205
|
+
end
|
206
|
+
|
207
|
+
# Returns the object in the form of hash
|
208
|
+
# @return [Hash] Returns the object in the form of hash
|
209
|
+
def to_hash
|
210
|
+
hash = {}
|
211
|
+
self.class.attribute_map.each_pair do |attr, param|
|
212
|
+
value = send(attr)
|
213
|
+
next if value.nil?
|
214
|
+
|
215
|
+
hash[param] = _to_hash(value)
|
216
|
+
end
|
217
|
+
hash
|
218
|
+
end
|
219
|
+
|
220
|
+
# Outputs non-array value in the form of hash
|
221
|
+
# For object, use to_hash. Otherwise, just return the value
|
222
|
+
# @param [Object] value Any valid value
|
223
|
+
# @return [Hash] Returns the value in the form of hash
|
224
|
+
def _to_hash(value)
|
225
|
+
if value.is_a?(Array)
|
226
|
+
value.compact.map { |v| _to_hash(v) }
|
227
|
+
elsif value.is_a?(Hash)
|
228
|
+
{}.tap do |hash|
|
229
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
230
|
+
end
|
231
|
+
elsif value.respond_to? :to_hash
|
232
|
+
value.to_hash
|
233
|
+
else
|
234
|
+
value
|
235
|
+
end
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|
239
|
+
end
|
240
|
+
end
|