change_healthcare-eligibility 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +130 -0
  5. data/.ruby-version +1 -0
  6. data/.travis.yml +7 -0
  7. data/Gemfile +4 -0
  8. data/Gemfile.lock +59 -0
  9. data/LICENSE.txt +21 -0
  10. data/README.md +64 -0
  11. data/Rakefile +6 -0
  12. data/bin/console +11 -0
  13. data/bin/rspec +29 -0
  14. data/bin/setup +8 -0
  15. data/change_healthcare-eligibility.gemspec +44 -0
  16. data/lib/change_healthcare/eligibility.rb +13 -0
  17. data/lib/change_healthcare/eligibility/inspector.rb +82 -0
  18. data/lib/change_healthcare/eligibility/swagger_client.rb +81 -0
  19. data/lib/change_healthcare/eligibility/swagger_client/api_client.rb +388 -0
  20. data/lib/change_healthcare/eligibility/swagger_client/api_error.rb +40 -0
  21. data/lib/change_healthcare/eligibility/swagger_client/configuration.rb +202 -0
  22. data/lib/change_healthcare/eligibility/swagger_client/eligibility_api.rb +198 -0
  23. data/lib/change_healthcare/eligibility/swagger_client/models/additional_identification.rb +266 -0
  24. data/lib/change_healthcare/eligibility/swagger_client/models/additional_information.rb +185 -0
  25. data/lib/change_healthcare/eligibility/swagger_client/models/address.rb +218 -0
  26. data/lib/change_healthcare/eligibility/swagger_client/models/benefits_additional_information.rb +376 -0
  27. data/lib/change_healthcare/eligibility/swagger_client/models/benefits_date_information.rb +340 -0
  28. data/lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb +338 -0
  29. data/lib/change_healthcare/eligibility/swagger_client/models/benefits_related_entity.rb +240 -0
  30. data/lib/change_healthcare/eligibility/swagger_client/models/benefits_service_delivery.rb +220 -0
  31. data/lib/change_healthcare/eligibility/swagger_client/models/composite_medical_procedure_identifier.rb +218 -0
  32. data/lib/change_healthcare/eligibility/swagger_client/models/eligibility_additional_information.rb +200 -0
  33. data/lib/change_healthcare/eligibility/swagger_client/models/encounter.rb +359 -0
  34. data/lib/change_healthcare/eligibility/swagger_client/models/error.rb +205 -0
  35. data/lib/change_healthcare/eligibility/swagger_client/models/health_care_diagnosis_code.rb +190 -0
  36. data/lib/change_healthcare/eligibility/swagger_client/models/health_care_information.rb +229 -0
  37. data/lib/change_healthcare/eligibility/swagger_client/models/health_check.rb +190 -0
  38. data/lib/change_healthcare/eligibility/swagger_client/models/information_receiver_name.rb +303 -0
  39. data/lib/change_healthcare/eligibility/swagger_client/models/loop_2000_cd2100_cd_segment_nm1_ref_dmg_ins_mpi_prv_notes_response_member.rb +429 -0
  40. data/lib/change_healthcare/eligibility/swagger_client/models/loop_2100_a_segments_nm1_and_per_notes_information_source_name.rb +293 -0
  41. data/lib/change_healthcare/eligibility/swagger_client/models/loop_2100_a_segments_per_element_per03_8_notes_communication.rb +194 -0
  42. data/lib/change_healthcare/eligibility/swagger_client/models/loop_2100_a_segments_per_notes_information_source_contact_information.rb +198 -0
  43. data/lib/change_healthcare/eligibility/swagger_client/models/loop_2100_bcd_segment_nm1_prv_notes_provider.rb +322 -0
  44. data/lib/change_healthcare/eligibility/swagger_client/models/loop_2100_cd_segment_trn_notes_subscriber_trace_numbers.rb +218 -0
  45. data/lib/change_healthcare/eligibility/swagger_client/models/loop_2110_cd_segments_ref_notes_subscriber_dependent_additional_identification.rb +488 -0
  46. data/lib/change_healthcare/eligibility/swagger_client/models/medical_eligibility.rb +272 -0
  47. data/lib/change_healthcare/eligibility/swagger_client/models/medical_procedure.rb +254 -0
  48. data/lib/change_healthcare/eligibility/swagger_client/models/plan_date_information.rb +340 -0
  49. data/lib/change_healthcare/eligibility/swagger_client/models/plan_status.rb +204 -0
  50. data/lib/change_healthcare/eligibility/swagger_client/models/provider.rb +304 -0
  51. data/lib/change_healthcare/eligibility/swagger_client/models/provider_information.rb +190 -0
  52. data/lib/change_healthcare/eligibility/swagger_client/models/raw_x12_request.rb +190 -0
  53. data/lib/change_healthcare/eligibility/swagger_client/models/request_dependent.rb +452 -0
  54. data/lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb +456 -0
  55. data/lib/change_healthcare/eligibility/swagger_client/models/response.rb +322 -0
  56. data/lib/change_healthcare/eligibility/swagger_client/version.rb +17 -0
  57. data/lib/change_healthcare/eligibility/version.rb +5 -0
  58. data/lib/change_healthcare/eligibility/wrapper.rb +124 -0
  59. metadata +214 -0
@@ -0,0 +1,218 @@
1
+ # #Eligibility
2
+ #
3
+ # Reference for developers
4
+ #
5
+ # OpenAPI spec version: v3
6
+ #
7
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
8
+ # Swagger Codegen version: 2.4.17
9
+ #
10
+
11
+ require 'date'
12
+
13
+ module ChangeHealthcare
14
+ module Eligibility
15
+ module SwaggerClient
16
+ class Loop2100CDSegmentTRNNotesSubscriberTraceNumbers
17
+ # Loop: 2100[C|D], Segment: TRN, Element: TRN03 Notes: Originating Company Identifier
18
+ attr_accessor :originating_company_identifier
19
+
20
+ # Loop: 2100[C|D], Segment: TRN, Element: TRN02 Notes: Reference Identification
21
+ attr_accessor :reference_identification
22
+
23
+ # Loop: 2100[C|D], Segment: TRN, Element: TRN04 Notes: Originating Company Identifier
24
+ attr_accessor :secondary_reference_identification
25
+
26
+ # Loop: 2100[C|D], Segment: TRN, Element: TRN01 Notes: Trace Type
27
+ attr_accessor :trace_type
28
+
29
+ # Loop: 2100[C|D], Segment: TRN, Element: TRN01 Notes: Trace Type Code
30
+ attr_accessor :trace_type_code
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ 'originating_company_identifier': :originatingCompanyIdentifier,
36
+ 'reference_identification': :referenceIdentification,
37
+ 'secondary_reference_identification': :secondaryReferenceIdentification,
38
+ 'trace_type': :traceType,
39
+ 'trace_type_code': :traceTypeCode
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.swagger_types
45
+ {
46
+ 'originating_company_identifier': :String,
47
+ 'reference_identification': :String,
48
+ 'secondary_reference_identification': :String,
49
+ 'trace_type': :String,
50
+ 'trace_type_code': :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.originating_company_identifier = attributes[:originatingCompanyIdentifier] if attributes.key?(:originatingCompanyIdentifier)
63
+
64
+ self.reference_identification = attributes[:referenceIdentification] if attributes.key?(:referenceIdentification)
65
+
66
+ self.secondary_reference_identification = attributes[:secondaryReferenceIdentification] if attributes.key?(:secondaryReferenceIdentification)
67
+
68
+ self.trace_type = attributes[:traceType] if attributes.key?(:traceType)
69
+
70
+ self.trace_type_code = attributes[:traceTypeCode] if attributes.key?(:traceTypeCode)
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ []
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ def valid?
82
+ true
83
+ end
84
+
85
+ # Checks equality by comparing each attribute.
86
+ # @param [Object] Object to be compared
87
+ def ==(o)
88
+ return true if equal?(o)
89
+
90
+ self.class == o.class &&
91
+ originating_company_identifier == o.originating_company_identifier &&
92
+ reference_identification == o.reference_identification &&
93
+ secondary_reference_identification == o.secondary_reference_identification &&
94
+ trace_type == o.trace_type &&
95
+ trace_type_code == o.trace_type_code
96
+ end
97
+
98
+ # @see the `==` method
99
+ # @param [Object] Object to be compared
100
+ def eql?(o)
101
+ self == o
102
+ end
103
+
104
+ # Calculates hash code according to all attributes.
105
+ # @return [Fixnum] Hash code
106
+ def hash
107
+ [originating_company_identifier, reference_identification, secondary_reference_identification, trace_type, trace_type_code].hash
108
+ end
109
+
110
+ # Builds the object from hash
111
+ # @param [Hash] attributes Model attributes in the form of hash
112
+ # @return [Object] Returns the model itself
113
+ def build_from_hash(attributes)
114
+ return nil unless attributes.is_a?(Hash)
115
+
116
+ self.class.swagger_types.each_pair do |key, type|
117
+ if type =~ /\AArray<(.*)>/i
118
+ # check to ensure the input is an array given that the attribute
119
+ # is documented as an array but the input is not
120
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
121
+ send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize(Regexp.last_match(1), v) })
122
+ end
123
+ elsif !attributes[self.class.attribute_map[key]].nil?
124
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
125
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
126
+ end
127
+
128
+ self
129
+ end
130
+
131
+ # Deserializes the data based on type
132
+ # @param string type Data type
133
+ # @param string value Value to be deserialized
134
+ # @return [Object] Deserialized data
135
+ def _deserialize(type, value)
136
+ case type.to_sym
137
+ when :DateTime
138
+ DateTime.parse(value)
139
+ when :Date
140
+ Date.parse(value)
141
+ when :String
142
+ value.to_s
143
+ when :Integer
144
+ value.to_i
145
+ when :Float
146
+ value.to_f
147
+ when :BOOLEAN
148
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
149
+ true
150
+ else
151
+ false
152
+ end
153
+ when :Object
154
+ # generic object (usually a Hash), return directly
155
+ value
156
+ when /\AArray<(?<inner_type>.+)>\z/
157
+ inner_type = Regexp.last_match[:inner_type]
158
+ value.map { |v| _deserialize(inner_type, v) }
159
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
160
+ k_type = Regexp.last_match[:k_type]
161
+ v_type = Regexp.last_match[:v_type]
162
+ {}.tap do |hash|
163
+ value.each do |k, v|
164
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
165
+ end
166
+ end
167
+ else # model
168
+ temp_model = SwaggerClient.const_get(type).new
169
+ temp_model.build_from_hash(value)
170
+ end
171
+ end
172
+
173
+ # Returns the string representation of the object
174
+ # @return [String] String presentation of the object
175
+ def to_s
176
+ to_hash.to_s
177
+ end
178
+
179
+ # to_body is an alias to to_hash (backward compatibility)
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_body
182
+ to_hash
183
+ end
184
+
185
+ # Returns the object in the form of hash
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_hash
188
+ hash = {}
189
+ self.class.attribute_map.each_pair do |attr, param|
190
+ value = send(attr)
191
+ next if value.nil?
192
+
193
+ hash[param] = _to_hash(value)
194
+ end
195
+ hash
196
+ end
197
+
198
+ # Outputs non-array value in the form of hash
199
+ # For object, use to_hash. Otherwise, just return the value
200
+ # @param [Object] value Any valid value
201
+ # @return [Hash] Returns the value in the form of hash
202
+ def _to_hash(value)
203
+ if value.is_a?(Array)
204
+ value.compact.map { |v| _to_hash(v) }
205
+ elsif value.is_a?(Hash)
206
+ {}.tap do |hash|
207
+ value.each { |k, v| hash[k] = _to_hash(v) }
208
+ end
209
+ elsif value.respond_to? :to_hash
210
+ value.to_hash
211
+ else
212
+ value
213
+ end
214
+ end
215
+ end
216
+ end
217
+ end
218
+ end
@@ -0,0 +1,488 @@
1
+ # #Eligibility
2
+ #
3
+ # Reference for developers
4
+ #
5
+ # OpenAPI spec version: v3
6
+ #
7
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
8
+ # Swagger Codegen version: 2.4.17
9
+ #
10
+
11
+ require 'date'
12
+
13
+ module ChangeHealthcare
14
+ module Eligibility
15
+ module SwaggerClient
16
+ class Loop2110CDSegmentsREFNotesSubscriberDependentAdditionalIdentification
17
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=Y4 agencyClaimNumber
18
+ attr_accessor :agency_claim_number
19
+
20
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=ALS alternativeListId
21
+ attr_accessor :alternative_list_id
22
+
23
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=3H caseNumber
24
+ attr_accessor :case_number
25
+
26
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=HPI centersForMedicareAndMedicaidServicesNPI
27
+ attr_accessor :centers_for_medicare_and_medicaid_services_npi
28
+
29
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=CEE classOfContractCode
30
+ attr_accessor :class_of_contract_code
31
+
32
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=CT contractNumber
33
+ attr_accessor :contract_number
34
+
35
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=CLI coverageListId
36
+ attr_accessor :coverage_list_id
37
+
38
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=FO drugFormularyNumber
39
+ attr_accessor :drug_formulary_number
40
+
41
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=EL electronicDevicePin
42
+ attr_accessor :electronic_device_pin
43
+
44
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=MRC medicalAssistanceCategory
45
+ attr_accessor :eligibility_category
46
+
47
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=1J facilityIdNumber
48
+ attr_accessor :facility_id_number
49
+
50
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=N7 facilityNetworkIdentificationNumber
51
+ attr_accessor :facility_network_identification_number
52
+
53
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=46 familyUnitNumber
54
+ attr_accessor :family_unit_number
55
+
56
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=TJ federalTaxpayersIdentificationNumber
57
+ attr_accessor :federal_taxpayers_identification_number
58
+
59
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=6P groupNumber
60
+ attr_accessor :group_number
61
+
62
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=F6 hicNumber
63
+ attr_accessor :hic_number
64
+
65
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=HJ idCardNumber
66
+ attr_accessor :id_card_number
67
+
68
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=GH drugFormularyNumber
69
+ attr_accessor :id_card_serial_number
70
+
71
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=IG insurancePolicyNumber
72
+ attr_accessor :insurance_policy_number
73
+
74
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=IF issueNumber
75
+ attr_accessor :issue_number
76
+
77
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=1C medicaidProviderNumber
78
+ attr_accessor :medicaid_provider_number
79
+
80
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=NQ medicaidRecipientIdNumber
81
+ attr_accessor :medicaid_recipient_id_number
82
+
83
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=M7 medicalAssistanceCategory
84
+ attr_accessor :medical_assistance_category
85
+
86
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=EA medicalRecordIdentificationNumber
87
+ attr_accessor :medical_record_identification_number
88
+
89
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=1D medicareProviderNumber
90
+ attr_accessor :medicare_provider_number
91
+
92
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=1W memberId
93
+ attr_accessor :member_id
94
+
95
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=EJ patientAccountNumber
96
+ attr_accessor :patient_account_number
97
+
98
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=4A personalIdentificationNumber
99
+ attr_accessor :personal_identification_number
100
+
101
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=N6 planNetworkIdNumber
102
+ attr_accessor :plan_network_id_number
103
+
104
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=18 planNumber
105
+ attr_accessor :plan_number
106
+
107
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=1L policyNumber
108
+ attr_accessor :policy_number
109
+
110
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=G1 drugFormularyNumber
111
+ attr_accessor :prior_authorization_number
112
+
113
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=Q4 priorIdNumber
114
+ attr_accessor :prior_id_number
115
+
116
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=9F referralNumber
117
+ attr_accessor :referral_number
118
+
119
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=SY socialSecurityNumber
120
+ attr_accessor :social_security_number
121
+
122
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=0B stateLicenseNumber
123
+ attr_accessor :state_license_number
124
+
125
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=EO submitterIdentificationNumber
126
+ attr_accessor :submitter_identification_number
127
+
128
+ # Loop: 2110[C|D], Segments: REF, Element: REF02, Notes: REF01=JD userIdentification
129
+ attr_accessor :user_identification
130
+
131
+ # Attribute mapping from ruby-style variable name to JSON key.
132
+ def self.attribute_map
133
+ {
134
+ 'agency_claim_number': :agencyClaimNumber,
135
+ 'alternative_list_id': :alternativeListId,
136
+ 'case_number': :caseNumber,
137
+ 'centers_for_medicare_and_medicaid_services_npi': :centersForMedicareAndMedicaidServicesNPI,
138
+ 'class_of_contract_code': :classOfContractCode,
139
+ 'contract_number': :contractNumber,
140
+ 'coverage_list_id': :coverageListId,
141
+ 'drug_formulary_number': :drugFormularyNumber,
142
+ 'electronic_device_pin': :electronicDevicePin,
143
+ 'eligibility_category': :eligibilityCategory,
144
+ 'facility_id_number': :facilityIdNumber,
145
+ 'facility_network_identification_number': :facilityNetworkIdentificationNumber,
146
+ 'family_unit_number': :familyUnitNumber,
147
+ 'federal_taxpayers_identification_number': :federalTaxpayersIdentificationNumber,
148
+ 'group_number': :groupNumber,
149
+ 'hic_number': :hicNumber,
150
+ 'id_card_number': :idCardNumber,
151
+ 'id_card_serial_number': :idCardSerialNumber,
152
+ 'insurance_policy_number': :insurancePolicyNumber,
153
+ 'issue_number': :issueNumber,
154
+ 'medicaid_provider_number': :medicaidProviderNumber,
155
+ 'medicaid_recipient_id_number': :medicaidRecipientIdNumber,
156
+ 'medical_assistance_category': :medicalAssistanceCategory,
157
+ 'medical_record_identification_number': :medicalRecordIdentificationNumber,
158
+ 'medicare_provider_number': :medicareProviderNumber,
159
+ 'member_id': :memberId,
160
+ 'patient_account_number': :patientAccountNumber,
161
+ 'personal_identification_number': :personalIdentificationNumber,
162
+ 'plan_network_id_number': :planNetworkIdNumber,
163
+ 'plan_number': :planNumber,
164
+ 'policy_number': :policyNumber,
165
+ 'prior_authorization_number': :priorAuthorizationNumber,
166
+ 'prior_id_number': :priorIdNumber,
167
+ 'referral_number': :referralNumber,
168
+ 'social_security_number': :socialSecurityNumber,
169
+ 'state_license_number': :stateLicenseNumber,
170
+ 'submitter_identification_number': :submitterIdentificationNumber,
171
+ 'user_identification': :userIdentification
172
+ }
173
+ end
174
+
175
+ # Attribute type mapping.
176
+ def self.swagger_types
177
+ {
178
+ 'agency_claim_number': :String,
179
+ 'alternative_list_id': :String,
180
+ 'case_number': :String,
181
+ 'centers_for_medicare_and_medicaid_services_npi': :String,
182
+ 'class_of_contract_code': :String,
183
+ 'contract_number': :String,
184
+ 'coverage_list_id': :String,
185
+ 'drug_formulary_number': :String,
186
+ 'electronic_device_pin': :String,
187
+ 'eligibility_category': :String,
188
+ 'facility_id_number': :String,
189
+ 'facility_network_identification_number': :String,
190
+ 'family_unit_number': :String,
191
+ 'federal_taxpayers_identification_number': :String,
192
+ 'group_number': :String,
193
+ 'hic_number': :String,
194
+ 'id_card_number': :String,
195
+ 'id_card_serial_number': :String,
196
+ 'insurance_policy_number': :String,
197
+ 'issue_number': :String,
198
+ 'medicaid_provider_number': :String,
199
+ 'medicaid_recipient_id_number': :String,
200
+ 'medical_assistance_category': :String,
201
+ 'medical_record_identification_number': :String,
202
+ 'medicare_provider_number': :String,
203
+ 'member_id': :String,
204
+ 'patient_account_number': :String,
205
+ 'personal_identification_number': :String,
206
+ 'plan_network_id_number': :String,
207
+ 'plan_number': :String,
208
+ 'policy_number': :String,
209
+ 'prior_authorization_number': :String,
210
+ 'prior_id_number': :String,
211
+ 'referral_number': :String,
212
+ 'social_security_number': :String,
213
+ 'state_license_number': :String,
214
+ 'submitter_identification_number': :String,
215
+ 'user_identification': :String
216
+ }
217
+ end
218
+
219
+ # Initializes the object
220
+ # @param [Hash] attributes Model attributes in the form of hash
221
+ def initialize(attributes = {})
222
+ return unless attributes.is_a?(Hash)
223
+
224
+ # convert string to symbol for hash key
225
+ attributes = attributes.transform_keys(&:to_sym)
226
+
227
+ self.agency_claim_number = attributes[:agencyClaimNumber] if attributes.key?(:agencyClaimNumber)
228
+
229
+ self.alternative_list_id = attributes[:alternativeListId] if attributes.key?(:alternativeListId)
230
+
231
+ self.case_number = attributes[:caseNumber] if attributes.key?(:caseNumber)
232
+
233
+ if attributes.key?(:centersForMedicareAndMedicaidServicesNPI)
234
+ self.centers_for_medicare_and_medicaid_services_npi = attributes[:centersForMedicareAndMedicaidServicesNPI]
235
+ end
236
+
237
+ self.class_of_contract_code = attributes[:classOfContractCode] if attributes.key?(:classOfContractCode)
238
+
239
+ self.contract_number = attributes[:contractNumber] if attributes.key?(:contractNumber)
240
+
241
+ self.coverage_list_id = attributes[:coverageListId] if attributes.key?(:coverageListId)
242
+
243
+ self.drug_formulary_number = attributes[:drugFormularyNumber] if attributes.key?(:drugFormularyNumber)
244
+
245
+ self.electronic_device_pin = attributes[:electronicDevicePin] if attributes.key?(:electronicDevicePin)
246
+
247
+ self.eligibility_category = attributes[:eligibilityCategory] if attributes.key?(:eligibilityCategory)
248
+
249
+ self.facility_id_number = attributes[:facilityIdNumber] if attributes.key?(:facilityIdNumber)
250
+
251
+ if attributes.key?(:facilityNetworkIdentificationNumber)
252
+ self.facility_network_identification_number = attributes[:facilityNetworkIdentificationNumber]
253
+ end
254
+
255
+ self.family_unit_number = attributes[:familyUnitNumber] if attributes.key?(:familyUnitNumber)
256
+
257
+ if attributes.key?(:federalTaxpayersIdentificationNumber)
258
+ self.federal_taxpayers_identification_number = attributes[:federalTaxpayersIdentificationNumber]
259
+ end
260
+
261
+ self.group_number = attributes[:groupNumber] if attributes.key?(:groupNumber)
262
+
263
+ self.hic_number = attributes[:hicNumber] if attributes.key?(:hicNumber)
264
+
265
+ self.id_card_number = attributes[:idCardNumber] if attributes.key?(:idCardNumber)
266
+
267
+ self.id_card_serial_number = attributes[:idCardSerialNumber] if attributes.key?(:idCardSerialNumber)
268
+
269
+ self.insurance_policy_number = attributes[:insurancePolicyNumber] if attributes.key?(:insurancePolicyNumber)
270
+
271
+ self.issue_number = attributes[:issueNumber] if attributes.key?(:issueNumber)
272
+
273
+ self.medicaid_provider_number = attributes[:medicaidProviderNumber] if attributes.key?(:medicaidProviderNumber)
274
+
275
+ self.medicaid_recipient_id_number = attributes[:medicaidRecipientIdNumber] if attributes.key?(:medicaidRecipientIdNumber)
276
+
277
+ self.medical_assistance_category = attributes[:medicalAssistanceCategory] if attributes.key?(:medicalAssistanceCategory)
278
+
279
+ self.medical_record_identification_number = attributes[:medicalRecordIdentificationNumber] if attributes.key?(:medicalRecordIdentificationNumber)
280
+
281
+ self.medicare_provider_number = attributes[:medicareProviderNumber] if attributes.key?(:medicareProviderNumber)
282
+
283
+ self.member_id = attributes[:memberId] if attributes.key?(:memberId)
284
+
285
+ self.patient_account_number = attributes[:patientAccountNumber] if attributes.key?(:patientAccountNumber)
286
+
287
+ self.personal_identification_number = attributes[:personalIdentificationNumber] if attributes.key?(:personalIdentificationNumber)
288
+
289
+ self.plan_network_id_number = attributes[:planNetworkIdNumber] if attributes.key?(:planNetworkIdNumber)
290
+
291
+ self.plan_number = attributes[:planNumber] if attributes.key?(:planNumber)
292
+
293
+ self.policy_number = attributes[:policyNumber] if attributes.key?(:policyNumber)
294
+
295
+ self.prior_authorization_number = attributes[:priorAuthorizationNumber] if attributes.key?(:priorAuthorizationNumber)
296
+
297
+ self.prior_id_number = attributes[:priorIdNumber] if attributes.key?(:priorIdNumber)
298
+
299
+ self.referral_number = attributes[:referralNumber] if attributes.key?(:referralNumber)
300
+
301
+ self.social_security_number = attributes[:socialSecurityNumber] if attributes.key?(:socialSecurityNumber)
302
+
303
+ self.state_license_number = attributes[:stateLicenseNumber] if attributes.key?(:stateLicenseNumber)
304
+
305
+ self.submitter_identification_number = attributes[:submitterIdentificationNumber] if attributes.key?(:submitterIdentificationNumber)
306
+
307
+ self.user_identification = attributes[:userIdentification] if attributes.key?(:userIdentification)
308
+ end
309
+
310
+ # Show invalid properties with the reasons. Usually used together with valid?
311
+ # @return Array for valid properties with the reasons
312
+ def list_invalid_properties
313
+ []
314
+ end
315
+
316
+ # Check to see if the all the properties in the model are valid
317
+ # @return true if the model is valid
318
+ def valid?
319
+ true
320
+ end
321
+
322
+ # Checks equality by comparing each attribute.
323
+ # @param [Object] Object to be compared
324
+ def ==(o)
325
+ return true if equal?(o)
326
+
327
+ self.class == o.class &&
328
+ agency_claim_number == o.agency_claim_number &&
329
+ alternative_list_id == o.alternative_list_id &&
330
+ case_number == o.case_number &&
331
+ centers_for_medicare_and_medicaid_services_npi == o.centers_for_medicare_and_medicaid_services_npi &&
332
+ class_of_contract_code == o.class_of_contract_code &&
333
+ contract_number == o.contract_number &&
334
+ coverage_list_id == o.coverage_list_id &&
335
+ drug_formulary_number == o.drug_formulary_number &&
336
+ electronic_device_pin == o.electronic_device_pin &&
337
+ eligibility_category == o.eligibility_category &&
338
+ facility_id_number == o.facility_id_number &&
339
+ facility_network_identification_number == o.facility_network_identification_number &&
340
+ family_unit_number == o.family_unit_number &&
341
+ federal_taxpayers_identification_number == o.federal_taxpayers_identification_number &&
342
+ group_number == o.group_number &&
343
+ hic_number == o.hic_number &&
344
+ id_card_number == o.id_card_number &&
345
+ id_card_serial_number == o.id_card_serial_number &&
346
+ insurance_policy_number == o.insurance_policy_number &&
347
+ issue_number == o.issue_number &&
348
+ medicaid_provider_number == o.medicaid_provider_number &&
349
+ medicaid_recipient_id_number == o.medicaid_recipient_id_number &&
350
+ medical_assistance_category == o.medical_assistance_category &&
351
+ medical_record_identification_number == o.medical_record_identification_number &&
352
+ medicare_provider_number == o.medicare_provider_number &&
353
+ member_id == o.member_id &&
354
+ patient_account_number == o.patient_account_number &&
355
+ personal_identification_number == o.personal_identification_number &&
356
+ plan_network_id_number == o.plan_network_id_number &&
357
+ plan_number == o.plan_number &&
358
+ policy_number == o.policy_number &&
359
+ prior_authorization_number == o.prior_authorization_number &&
360
+ prior_id_number == o.prior_id_number &&
361
+ referral_number == o.referral_number &&
362
+ social_security_number == o.social_security_number &&
363
+ state_license_number == o.state_license_number &&
364
+ submitter_identification_number == o.submitter_identification_number &&
365
+ user_identification == o.user_identification
366
+ end
367
+
368
+ # @see the `==` method
369
+ # @param [Object] Object to be compared
370
+ def eql?(o)
371
+ self == o
372
+ end
373
+
374
+ # Calculates hash code according to all attributes.
375
+ # @return [Fixnum] Hash code
376
+ def hash
377
+ [agency_claim_number, alternative_list_id, case_number, centers_for_medicare_and_medicaid_services_npi, class_of_contract_code, contract_number, coverage_list_id, drug_formulary_number, electronic_device_pin, eligibility_category, facility_id_number, facility_network_identification_number, family_unit_number, federal_taxpayers_identification_number, group_number, hic_number, id_card_number, id_card_serial_number, insurance_policy_number, issue_number, medicaid_provider_number, medicaid_recipient_id_number, medical_assistance_category, medical_record_identification_number, medicare_provider_number, member_id, patient_account_number, personal_identification_number, plan_network_id_number, plan_number, policy_number, prior_authorization_number, prior_id_number, referral_number, social_security_number, state_license_number, submitter_identification_number, user_identification].hash
378
+ end
379
+
380
+ # Builds the object from hash
381
+ # @param [Hash] attributes Model attributes in the form of hash
382
+ # @return [Object] Returns the model itself
383
+ def build_from_hash(attributes)
384
+ return nil unless attributes.is_a?(Hash)
385
+
386
+ self.class.swagger_types.each_pair do |key, type|
387
+ if type =~ /\AArray<(.*)>/i
388
+ # check to ensure the input is an array given that the attribute
389
+ # is documented as an array but the input is not
390
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
391
+ send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize(Regexp.last_match(1), v) })
392
+ end
393
+ elsif !attributes[self.class.attribute_map[key]].nil?
394
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
395
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
396
+ end
397
+
398
+ self
399
+ end
400
+
401
+ # Deserializes the data based on type
402
+ # @param string type Data type
403
+ # @param string value Value to be deserialized
404
+ # @return [Object] Deserialized data
405
+ def _deserialize(type, value)
406
+ case type.to_sym
407
+ when :DateTime
408
+ DateTime.parse(value)
409
+ when :Date
410
+ Date.parse(value)
411
+ when :String
412
+ value.to_s
413
+ when :Integer
414
+ value.to_i
415
+ when :Float
416
+ value.to_f
417
+ when :BOOLEAN
418
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
419
+ true
420
+ else
421
+ false
422
+ end
423
+ when :Object
424
+ # generic object (usually a Hash), return directly
425
+ value
426
+ when /\AArray<(?<inner_type>.+)>\z/
427
+ inner_type = Regexp.last_match[:inner_type]
428
+ value.map { |v| _deserialize(inner_type, v) }
429
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
430
+ k_type = Regexp.last_match[:k_type]
431
+ v_type = Regexp.last_match[:v_type]
432
+ {}.tap do |hash|
433
+ value.each do |k, v|
434
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
435
+ end
436
+ end
437
+ else # model
438
+ temp_model = SwaggerClient.const_get(type).new
439
+ temp_model.build_from_hash(value)
440
+ end
441
+ end
442
+
443
+ # Returns the string representation of the object
444
+ # @return [String] String presentation of the object
445
+ def to_s
446
+ to_hash.to_s
447
+ end
448
+
449
+ # to_body is an alias to to_hash (backward compatibility)
450
+ # @return [Hash] Returns the object in the form of hash
451
+ def to_body
452
+ to_hash
453
+ end
454
+
455
+ # Returns the object in the form of hash
456
+ # @return [Hash] Returns the object in the form of hash
457
+ def to_hash
458
+ hash = {}
459
+ self.class.attribute_map.each_pair do |attr, param|
460
+ value = send(attr)
461
+ next if value.nil?
462
+
463
+ hash[param] = _to_hash(value)
464
+ end
465
+ hash
466
+ end
467
+
468
+ # Outputs non-array value in the form of hash
469
+ # For object, use to_hash. Otherwise, just return the value
470
+ # @param [Object] value Any valid value
471
+ # @return [Hash] Returns the value in the form of hash
472
+ def _to_hash(value)
473
+ if value.is_a?(Array)
474
+ value.compact.map { |v| _to_hash(v) }
475
+ elsif value.is_a?(Hash)
476
+ {}.tap do |hash|
477
+ value.each { |k, v| hash[k] = _to_hash(v) }
478
+ end
479
+ elsif value.respond_to? :to_hash
480
+ value.to_hash
481
+ else
482
+ value
483
+ end
484
+ end
485
+ end
486
+ end
487
+ end
488
+ end