change_healthcare-professional_claims 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +12 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +30 -0
  5. data/.travis.yml +6 -0
  6. data/.yardopts +1 -0
  7. data/CHANGELOG.md +0 -0
  8. data/Gemfile +6 -0
  9. data/Gemfile.lock +118 -0
  10. data/LICENSE.txt +21 -0
  11. data/README.md +39 -0
  12. data/Rakefile +8 -0
  13. data/TODO.md +8 -0
  14. data/bin/console +15 -0
  15. data/bin/rspec +29 -0
  16. data/bin/setup +8 -0
  17. data/change_healthcare-professional_claims.gemspec +43 -0
  18. data/lib/change_healthcare/professional_claims.rb +16 -0
  19. data/lib/change_healthcare/professional_claims/swagger_client.rb +106 -0
  20. data/lib/change_healthcare/professional_claims/swagger_client/api_client.rb +390 -0
  21. data/lib/change_healthcare/professional_claims/swagger_client/api_error.rb +42 -0
  22. data/lib/change_healthcare/professional_claims/swagger_client/configuration.rb +204 -0
  23. data/lib/change_healthcare/professional_claims/swagger_client/models/address.rb +219 -0
  24. data/lib/change_healthcare/professional_claims/swagger_client/models/ambulance_certification.rb +247 -0
  25. data/lib/change_healthcare/professional_claims/swagger_client/models/ambulance_transport_information.rb +259 -0
  26. data/lib/change_healthcare/professional_claims/swagger_client/models/clai_request.rb +283 -0
  27. data/lib/change_healthcare/professional_claims/swagger_client/models/claim_adjustment.rb +244 -0
  28. data/lib/change_healthcare/professional_claims/swagger_client/models/claim_adjustment_details.rb +199 -0
  29. data/lib/change_healthcare/professional_claims/swagger_client/models/claim_contract_information.rb +265 -0
  30. data/lib/change_healthcare/professional_claims/swagger_client/models/claim_date_information.rb +298 -0
  31. data/lib/change_healthcare/professional_claims/swagger_client/models/claim_information.rb +579 -0
  32. data/lib/change_healthcare/professional_claims/swagger_client/models/claim_note.rb +216 -0
  33. data/lib/change_healthcare/professional_claims/swagger_client/models/claim_pricing_repricing_information.rb +363 -0
  34. data/lib/change_healthcare/professional_claims/swagger_client/models/claim_reference.rb +231 -0
  35. data/lib/change_healthcare/professional_claims/swagger_client/models/claim_submission_request.rb +278 -0
  36. data/lib/change_healthcare/professional_claims/swagger_client/models/claim_supplemental_information.rb +315 -0
  37. data/lib/change_healthcare/professional_claims/swagger_client/models/composite_diagnosis_code_pointers.rb +191 -0
  38. data/lib/change_healthcare/professional_claims/swagger_client/models/condition_indicator_durable_medical_equipment.rb +281 -0
  39. data/lib/change_healthcare/professional_claims/swagger_client/models/condition_information.rb +190 -0
  40. data/lib/change_healthcare/professional_claims/swagger_client/models/contact_information.rb +209 -0
  41. data/lib/change_healthcare/professional_claims/swagger_client/models/contract_information.rb +255 -0
  42. data/lib/change_healthcare/professional_claims/swagger_client/models/dependent.rb +294 -0
  43. data/lib/change_healthcare/professional_claims/swagger_client/models/drug_identification.rb +278 -0
  44. data/lib/change_healthcare/professional_claims/swagger_client/models/durable_medical_equipment_certificate_of_medical_necessity.rb +226 -0
  45. data/lib/change_healthcare/professional_claims/swagger_client/models/durable_medical_equipment_certification.rb +233 -0
  46. data/lib/change_healthcare/professional_claims/swagger_client/models/durable_medical_equipment_service.rb +243 -0
  47. data/lib/change_healthcare/professional_claims/swagger_client/models/edit_response.rb +251 -0
  48. data/lib/change_healthcare/professional_claims/swagger_client/models/epsdt_referral.rb +236 -0
  49. data/lib/change_healthcare/professional_claims/swagger_client/models/error.rb +214 -0
  50. data/lib/change_healthcare/professional_claims/swagger_client/models/failure.rb +194 -0
  51. data/lib/change_healthcare/professional_claims/swagger_client/models/form_identification.rb +240 -0
  52. data/lib/change_healthcare/professional_claims/swagger_client/models/health_care_information.rb +233 -0
  53. data/lib/change_healthcare/professional_claims/swagger_client/models/line_adjudication_information.rb +284 -0
  54. data/lib/change_healthcare/professional_claims/swagger_client/models/measurements.rb +256 -0
  55. data/lib/change_healthcare/professional_claims/swagger_client/models/medicare_outpatient_adjudication.rb +213 -0
  56. data/lib/change_healthcare/professional_claims/swagger_client/models/other_payer_billing_provider.rb +236 -0
  57. data/lib/change_healthcare/professional_claims/swagger_client/models/other_payer_name.rb +285 -0
  58. data/lib/change_healthcare/professional_claims/swagger_client/models/other_payer_referring_provider.rb +192 -0
  59. data/lib/change_healthcare/professional_claims/swagger_client/models/other_payer_rendering_provider.rb +236 -0
  60. data/lib/change_healthcare/professional_claims/swagger_client/models/other_payer_service_facility_location.rb +192 -0
  61. data/lib/change_healthcare/professional_claims/swagger_client/models/other_payer_supervising_provider.rb +192 -0
  62. data/lib/change_healthcare/professional_claims/swagger_client/models/other_subscriber_information.rb +430 -0
  63. data/lib/change_healthcare/professional_claims/swagger_client/models/other_subscriber_name.rb +288 -0
  64. data/lib/change_healthcare/professional_claims/swagger_client/models/patient_condition_information_vision.rb +259 -0
  65. data/lib/change_healthcare/professional_claims/swagger_client/models/pay_to_plan.rb +278 -0
  66. data/lib/change_healthcare/professional_claims/swagger_client/models/payer.rb +194 -0
  67. data/lib/change_healthcare/professional_claims/swagger_client/models/prior_authorization.rb +194 -0
  68. data/lib/change_healthcare/professional_claims/swagger_client/models/professional_service.rb +290 -0
  69. data/lib/change_healthcare/professional_claims/swagger_client/models/provider.rb +281 -0
  70. data/lib/change_healthcare/professional_claims/swagger_client/models/purchased_service_information.rb +194 -0
  71. data/lib/change_healthcare/professional_claims/swagger_client/models/raw_x12_request.rb +194 -0
  72. data/lib/change_healthcare/professional_claims/swagger_client/models/receiver.rb +189 -0
  73. data/lib/change_healthcare/professional_claims/swagger_client/models/reference_identification.rb +199 -0
  74. data/lib/change_healthcare/professional_claims/swagger_client/models/report_information.rb +261 -0
  75. data/lib/change_healthcare/professional_claims/swagger_client/models/response.rb +240 -0
  76. data/lib/change_healthcare/professional_claims/swagger_client/models/service_facility_location.rb +224 -0
  77. data/lib/change_healthcare/professional_claims/swagger_client/models/service_line.rb +388 -0
  78. data/lib/change_healthcare/professional_claims/swagger_client/models/service_line_date_information.rb +236 -0
  79. data/lib/change_healthcare/professional_claims/swagger_client/models/service_line_provider.rb +293 -0
  80. data/lib/change_healthcare/professional_claims/swagger_client/models/service_line_reference_information.rb +230 -0
  81. data/lib/change_healthcare/professional_claims/swagger_client/models/spinal_manipulation_service_information.rb +238 -0
  82. data/lib/change_healthcare/professional_claims/swagger_client/models/submitter.rb +209 -0
  83. data/lib/change_healthcare/professional_claims/swagger_client/models/subscriber.rb +309 -0
  84. data/lib/change_healthcare/professional_claims/swagger_client/models/supporting_documentation.rb +249 -0
  85. data/lib/change_healthcare/professional_claims/swagger_client/professional_claims_api.rb +361 -0
  86. data/lib/change_healthcare/professional_claims/swagger_client/version.rb +19 -0
  87. data/lib/change_healthcare/professional_claims/version.rb +7 -0
  88. data/lib/change_healthcare/professional_claims/wrapper.rb +141 -0
  89. metadata +274 -0
@@ -0,0 +1,236 @@
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 ServiceLineDateInformation
19
+ attr_accessor :begin_therapy_date, :certification_revision_or_recertification_date, :hemoglobin_test_date,
20
+ :initial_treatment_date, :last_certification_date, :last_x_ray_date, :prescription_date, :serum_creatine_test_date, :shipped_date, :treatment_or_therapy_date
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ begin_therapy_date: :beginTherapyDate,
26
+ certification_revision_or_recertification_date: :certificationRevisionOrRecertificationDate,
27
+ hemoglobin_test_date: :hemoglobinTestDate,
28
+ initial_treatment_date: :initialTreatmentDate,
29
+ last_certification_date: :lastCertificationDate,
30
+ last_x_ray_date: :lastXRayDate,
31
+ prescription_date: :prescriptionDate,
32
+ serum_creatine_test_date: :serumCreatineTestDate,
33
+ shipped_date: :shippedDate,
34
+ treatment_or_therapy_date: :treatmentOrTherapyDate
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.swagger_types
40
+ {
41
+ begin_therapy_date: :String,
42
+ certification_revision_or_recertification_date: :String,
43
+ hemoglobin_test_date: :String,
44
+ initial_treatment_date: :String,
45
+ last_certification_date: :String,
46
+ last_x_ray_date: :String,
47
+ prescription_date: :String,
48
+ serum_creatine_test_date: :String,
49
+ shipped_date: :String,
50
+ treatment_or_therapy_date: :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.begin_therapy_date = attributes[:beginTherapyDate] if attributes.key?(:beginTherapyDate)
63
+
64
+ self.certification_revision_or_recertification_date = attributes[:certificationRevisionOrRecertificationDate] if attributes.key?(:certificationRevisionOrRecertificationDate)
65
+
66
+ self.hemoglobin_test_date = attributes[:hemoglobinTestDate] if attributes.key?(:hemoglobinTestDate)
67
+
68
+ self.initial_treatment_date = attributes[:initialTreatmentDate] if attributes.key?(:initialTreatmentDate)
69
+
70
+ self.last_certification_date = attributes[:lastCertificationDate] if attributes.key?(:lastCertificationDate)
71
+
72
+ self.last_x_ray_date = attributes[:lastXRayDate] if attributes.key?(:lastXRayDate)
73
+
74
+ self.prescription_date = attributes[:prescriptionDate] if attributes.key?(:prescriptionDate)
75
+
76
+ self.serum_creatine_test_date = attributes[:serumCreatineTestDate] if attributes.key?(:serumCreatineTestDate)
77
+
78
+ self.shipped_date = attributes[:shippedDate] if attributes.key?(:shippedDate)
79
+
80
+ self.treatment_or_therapy_date = attributes[:treatmentOrTherapyDate] if attributes.key?(:treatmentOrTherapyDate)
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ []
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ true
93
+ end
94
+
95
+ # Checks equality by comparing each attribute.
96
+ # @param [Object] Object to be compared
97
+ def ==(other)
98
+ return true if equal?(other)
99
+
100
+ self.class == other.class &&
101
+ begin_therapy_date == other.begin_therapy_date &&
102
+ certification_revision_or_recertification_date == other.certification_revision_or_recertification_date &&
103
+ hemoglobin_test_date == other.hemoglobin_test_date &&
104
+ initial_treatment_date == other.initial_treatment_date &&
105
+ last_certification_date == other.last_certification_date &&
106
+ last_x_ray_date == other.last_x_ray_date &&
107
+ prescription_date == other.prescription_date &&
108
+ serum_creatine_test_date == other.serum_creatine_test_date &&
109
+ shipped_date == other.shipped_date &&
110
+ treatment_or_therapy_date == other.treatment_or_therapy_date
111
+ end
112
+
113
+ # @see the `==` method
114
+ # @param [Object] Object to be compared
115
+ def eql?(other)
116
+ self == other
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Fixnum] Hash code
121
+ def hash
122
+ [begin_therapy_date, certification_revision_or_recertification_date, hemoglobin_test_date,
123
+ initial_treatment_date, last_certification_date, last_x_ray_date, prescription_date, serum_creatine_test_date, shipped_date, treatment_or_therapy_date].hash
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+
132
+ self.class.swagger_types.each_pair do |key, type|
133
+ if type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
137
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
138
+ _deserialize(Regexp.last_match(1), v)
139
+ end)
140
+ end
141
+ elsif !attributes[self.class.attribute_map[key]].nil?
142
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ end
144
+ end
145
+
146
+ self
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :DateTime
156
+ DateTime.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :BOOLEAN
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ temp_model = SwaggerClient.const_get(type).new
187
+ temp_model.build_from_hash(value)
188
+ end
189
+ end
190
+
191
+ # Returns the string representation of the object
192
+ # @return [String] String presentation of the object
193
+ def to_s
194
+ to_hash.to_s
195
+ end
196
+
197
+ # to_body is an alias to to_hash (backward compatibility)
198
+ # @return [Hash] Returns the object in the form of hash
199
+ def to_body
200
+ to_hash
201
+ end
202
+
203
+ # Returns the object in the form of hash
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_hash
206
+ hash = {}
207
+ self.class.attribute_map.each_pair do |attr, param|
208
+ value = send(attr)
209
+ next if value.nil?
210
+
211
+ hash[param] = _to_hash(value)
212
+ end
213
+ hash
214
+ end
215
+
216
+ # Outputs non-array value in the form of hash
217
+ # For object, use to_hash. Otherwise, just return the value
218
+ # @param [Object] value Any valid value
219
+ # @return [Hash] Returns the value in the form of hash
220
+ def _to_hash(value)
221
+ if value.is_a?(Array)
222
+ value.compact.map { |v| _to_hash(v) }
223
+ elsif value.is_a?(Hash)
224
+ {}.tap do |hash|
225
+ value.each { |k, v| hash[k] = _to_hash(v) }
226
+ end
227
+ elsif value.respond_to? :to_hash
228
+ value.to_hash
229
+ else
230
+ value
231
+ end
232
+ end
233
+ end
234
+ end
235
+ end
236
+ end
@@ -0,0 +1,293 @@
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 ServiceLineProvider
19
+ attr_accessor :address, :claim_office_number, :commercial_number, :contact_information, :employer_id,
20
+ :employer_identification_number, :first_name, :last_name, :location_number, :middle_name, :naic, :npi, :organization_name, :other_identifier, :payer_identification_number, :provider_type, :provider_upin_number, :secondary_identifier, :ssn, :state_license_number, :taxonomy_code
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ address: :address,
26
+ claim_office_number: :claimOfficeNumber,
27
+ commercial_number: :commercialNumber,
28
+ contact_information: :contactInformation,
29
+ employer_id: :employerId,
30
+ employer_identification_number: :employerIdentificationNumber,
31
+ first_name: :firstName,
32
+ last_name: :lastName,
33
+ location_number: :locationNumber,
34
+ middle_name: :middleName,
35
+ naic: :naic,
36
+ npi: :npi,
37
+ organization_name: :organizationName,
38
+ other_identifier: :otherIdentifier,
39
+ payer_identification_number: :payerIdentificationNumber,
40
+ provider_type: :providerType,
41
+ provider_upin_number: :providerUpinNumber,
42
+ secondary_identifier: :secondaryIdentifier,
43
+ ssn: :ssn,
44
+ state_license_number: :stateLicenseNumber,
45
+ taxonomy_code: :taxonomyCode
46
+ }
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.swagger_types
51
+ {
52
+ address: :Address,
53
+ claim_office_number: :String,
54
+ commercial_number: :String,
55
+ contact_information: :ContactInformation,
56
+ employer_id: :String,
57
+ employer_identification_number: :String,
58
+ first_name: :String,
59
+ last_name: :String,
60
+ location_number: :String,
61
+ middle_name: :String,
62
+ naic: :String,
63
+ npi: :String,
64
+ organization_name: :String,
65
+ other_identifier: :String,
66
+ payer_identification_number: :String,
67
+ provider_type: :String,
68
+ provider_upin_number: :String,
69
+ secondary_identifier: :'Array<ReferenceIdentification>',
70
+ ssn: :String,
71
+ state_license_number: :String,
72
+ taxonomy_code: :String
73
+ }
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ return unless attributes.is_a?(Hash)
80
+
81
+ # convert string to symbol for hash key
82
+ attributes = attributes.transform_keys(&:to_sym)
83
+
84
+ self.address = attributes[:address] if attributes.key?(:address)
85
+
86
+ self.claim_office_number = attributes[:claimOfficeNumber] if attributes.key?(:claimOfficeNumber)
87
+
88
+ self.commercial_number = attributes[:commercialNumber] if attributes.key?(:commercialNumber)
89
+
90
+ self.contact_information = attributes[:contactInformation] if attributes.key?(:contactInformation)
91
+
92
+ self.employer_id = attributes[:employerId] if attributes.key?(:employerId)
93
+
94
+ self.employer_identification_number = attributes[:employerIdentificationNumber] if attributes.key?(:employerIdentificationNumber)
95
+
96
+ self.first_name = attributes[:firstName] if attributes.key?(:firstName)
97
+
98
+ self.last_name = attributes[:lastName] if attributes.key?(:lastName)
99
+
100
+ self.location_number = attributes[:locationNumber] if attributes.key?(:locationNumber)
101
+
102
+ self.middle_name = attributes[:middleName] if attributes.key?(:middleName)
103
+
104
+ self.naic = attributes[:naic] if attributes.key?(:naic)
105
+
106
+ self.npi = attributes[:npi] if attributes.key?(:npi)
107
+
108
+ self.organization_name = attributes[:organizationName] if attributes.key?(:organizationName)
109
+
110
+ self.other_identifier = attributes[:otherIdentifier] if attributes.key?(:otherIdentifier)
111
+
112
+ self.payer_identification_number = attributes[:payerIdentificationNumber] if attributes.key?(:payerIdentificationNumber)
113
+
114
+ self.provider_type = attributes[:providerType] if attributes.key?(:providerType)
115
+
116
+ self.provider_upin_number = attributes[:providerUpinNumber] if attributes.key?(:providerUpinNumber)
117
+
118
+ if attributes.key?(:secondaryIdentifier) && (value = attributes[:secondaryIdentifier]).is_a?(Array)
119
+ self.secondary_identifier = value
120
+ end
121
+
122
+ self.ssn = attributes[:ssn] if attributes.key?(:ssn)
123
+
124
+ self.state_license_number = attributes[:stateLicenseNumber] if attributes.key?(:stateLicenseNumber)
125
+
126
+ self.taxonomy_code = attributes[:taxonomyCode] if attributes.key?(:taxonomyCode)
127
+ end
128
+
129
+ # Show invalid properties with the reasons. Usually used together with valid?
130
+ # @return Array for valid properties with the reasons
131
+ def list_invalid_properties
132
+ []
133
+ end
134
+
135
+ # Check to see if the all the properties in the model are valid
136
+ # @return true if the model is valid
137
+ def valid?
138
+ true
139
+ end
140
+
141
+ # Checks equality by comparing each attribute.
142
+ # @param [Object] Object to be compared
143
+ def ==(other)
144
+ return true if equal?(other)
145
+
146
+ self.class == other.class &&
147
+ address == other.address &&
148
+ claim_office_number == other.claim_office_number &&
149
+ commercial_number == other.commercial_number &&
150
+ contact_information == other.contact_information &&
151
+ employer_id == other.employer_id &&
152
+ employer_identification_number == other.employer_identification_number &&
153
+ first_name == other.first_name &&
154
+ last_name == other.last_name &&
155
+ location_number == other.location_number &&
156
+ middle_name == other.middle_name &&
157
+ naic == other.naic &&
158
+ npi == other.npi &&
159
+ organization_name == other.organization_name &&
160
+ other_identifier == other.other_identifier &&
161
+ payer_identification_number == other.payer_identification_number &&
162
+ provider_type == other.provider_type &&
163
+ provider_upin_number == other.provider_upin_number &&
164
+ secondary_identifier == other.secondary_identifier &&
165
+ ssn == other.ssn &&
166
+ state_license_number == other.state_license_number &&
167
+ taxonomy_code == other.taxonomy_code
168
+ end
169
+
170
+ # @see the `==` method
171
+ # @param [Object] Object to be compared
172
+ def eql?(other)
173
+ self == other
174
+ end
175
+
176
+ # Calculates hash code according to all attributes.
177
+ # @return [Fixnum] Hash code
178
+ def hash
179
+ [address, claim_office_number, commercial_number, contact_information, employer_id,
180
+ employer_identification_number, first_name, last_name, location_number, middle_name, naic, npi, organization_name, other_identifier, payer_identification_number, provider_type, provider_upin_number, secondary_identifier, ssn, state_license_number, taxonomy_code].hash
181
+ end
182
+
183
+ # Builds the object from hash
184
+ # @param [Hash] attributes Model attributes in the form of hash
185
+ # @return [Object] Returns the model itself
186
+ def build_from_hash(attributes)
187
+ return nil unless attributes.is_a?(Hash)
188
+
189
+ self.class.swagger_types.each_pair do |key, type|
190
+ if type =~ /\AArray<(.*)>/i
191
+ # check to ensure the input is an array given that the attribute
192
+ # is documented as an array but the input is not
193
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
194
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
195
+ _deserialize(Regexp.last_match(1), v)
196
+ end)
197
+ end
198
+ elsif !attributes[self.class.attribute_map[key]].nil?
199
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
200
+ end
201
+ end
202
+
203
+ self
204
+ end
205
+
206
+ # Deserializes the data based on type
207
+ # @param string type Data type
208
+ # @param string value Value to be deserialized
209
+ # @return [Object] Deserialized data
210
+ def _deserialize(type, value)
211
+ case type.to_sym
212
+ when :DateTime
213
+ DateTime.parse(value)
214
+ when :Date
215
+ Date.parse(value)
216
+ when :String
217
+ value.to_s
218
+ when :Integer
219
+ value.to_i
220
+ when :Float
221
+ value.to_f
222
+ when :BOOLEAN
223
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
224
+ true
225
+ else
226
+ false
227
+ end
228
+ when :Object
229
+ # generic object (usually a Hash), return directly
230
+ value
231
+ when /\AArray<(?<inner_type>.+)>\z/
232
+ inner_type = Regexp.last_match[:inner_type]
233
+ value.map { |v| _deserialize(inner_type, v) }
234
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
235
+ k_type = Regexp.last_match[:k_type]
236
+ v_type = Regexp.last_match[:v_type]
237
+ {}.tap do |hash|
238
+ value.each do |k, v|
239
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
240
+ end
241
+ end
242
+ else # model
243
+ temp_model = SwaggerClient.const_get(type).new
244
+ temp_model.build_from_hash(value)
245
+ end
246
+ end
247
+
248
+ # Returns the string representation of the object
249
+ # @return [String] String presentation of the object
250
+ def to_s
251
+ to_hash.to_s
252
+ end
253
+
254
+ # to_body is an alias to to_hash (backward compatibility)
255
+ # @return [Hash] Returns the object in the form of hash
256
+ def to_body
257
+ to_hash
258
+ end
259
+
260
+ # Returns the object in the form of hash
261
+ # @return [Hash] Returns the object in the form of hash
262
+ def to_hash
263
+ hash = {}
264
+ self.class.attribute_map.each_pair do |attr, param|
265
+ value = send(attr)
266
+ next if value.nil?
267
+
268
+ hash[param] = _to_hash(value)
269
+ end
270
+ hash
271
+ end
272
+
273
+ # Outputs non-array value in the form of hash
274
+ # For object, use to_hash. Otherwise, just return the value
275
+ # @param [Object] value Any valid value
276
+ # @return [Hash] Returns the value in the form of hash
277
+ def _to_hash(value)
278
+ if value.is_a?(Array)
279
+ value.compact.map { |v| _to_hash(v) }
280
+ elsif value.is_a?(Hash)
281
+ {}.tap do |hash|
282
+ value.each { |k, v| hash[k] = _to_hash(v) }
283
+ end
284
+ elsif value.respond_to? :to_hash
285
+ value.to_hash
286
+ else
287
+ value
288
+ end
289
+ end
290
+ end
291
+ end
292
+ end
293
+ end