class ChangeHealthcare::Eligibility::SwaggerClient::Loop2000CD2100CDSegmentNM1REFDMGINSMPIPRVNotesResponseMember
Attributes
Public Class Methods
Attribute mapping from ruby-style variable name to JSON key.
# File lib/change_healthcare/eligibility/swagger_client/models/loop_2000_cd2100_cd_segment_nm1_ref_dmg_ins_mpi_prv_notes_response_member.rb, line 110 def self.attribute_map { 'address': :address, 'birth_sequence_number': :birthSequenceNumber, 'date_of_birth': :dateOfBirth, 'date_time_period': :dateTimePeriod, 'date_time_period_format_qualifier': :dateTimePeriodFormatQualifier, 'description': :description, 'employment_status_code': :employmentStatusCode, 'end_date_time_period': :endDateTimePeriod, 'entity_identifier': :entityIdentifier, 'entity_type': :entityType, 'first_name': :firstName, 'gender': :gender, 'government_service_affiliation_code': :governmentServiceAffiliationCode, 'group_number': :groupNumber, 'health_care_diagnosis_codes': :healthCareDiagnosisCodes, 'information_status_code': :informationStatusCode, 'insured_indicator': :insuredIndicator, 'last_name': :lastName, 'maintenance_reason_code': :maintenanceReasonCode, 'maintenance_type_code': :maintenanceTypeCode, 'member_id': :memberId, 'middle_name': :middleName, 'military_service_rank_code': :militaryServiceRankCode, 'plan_number': :planNumber, 'provider': :provider, 'relation_to_subscriber': :relationToSubscriber, 'relation_to_subscriber_code': :relationToSubscriberCode, 'ssn': :ssn, 'start_date_time_period': :startDateTimePeriod, 'suffix': :suffix, 'unique_health_identifier': :uniqueHealthIdentifier } end
Initializes the object @param [Hash] attributes Model attributes in the form of hash
# File lib/change_healthcare/eligibility/swagger_client/models/loop_2000_cd2100_cd_segment_nm1_ref_dmg_ins_mpi_prv_notes_response_member.rb, line 185 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.transform_keys(&:to_sym) self.address = attributes[:address] if attributes.key?(:address) self.birth_sequence_number = attributes[:birthSequenceNumber] if attributes.key?(:birthSequenceNumber) self.date_of_birth = attributes[:dateOfBirth] if attributes.key?(:dateOfBirth) self.date_time_period = attributes[:dateTimePeriod] if attributes.key?(:dateTimePeriod) self.date_time_period_format_qualifier = attributes[:dateTimePeriodFormatQualifier] if attributes.key?(:dateTimePeriodFormatQualifier) self.description = attributes[:description] if attributes.key?(:description) self.employment_status_code = attributes[:employmentStatusCode] if attributes.key?(:employmentStatusCode) self.end_date_time_period = attributes[:endDateTimePeriod] if attributes.key?(:endDateTimePeriod) self.entity_identifier = attributes[:entityIdentifier] if attributes.key?(:entityIdentifier) self.entity_type = attributes[:entityType] if attributes.key?(:entityType) self.first_name = attributes[:firstName] if attributes.key?(:firstName) self.gender = attributes[:gender] if attributes.key?(:gender) self.government_service_affiliation_code = attributes[:governmentServiceAffiliationCode] if attributes.key?(:governmentServiceAffiliationCode) self.group_number = attributes[:groupNumber] if attributes.key?(:groupNumber) if attributes.key?(:healthCareDiagnosisCodes) if (value = attributes[:healthCareDiagnosisCodes]).is_a?(Array) self.health_care_diagnosis_codes = value end end self.information_status_code = attributes[:informationStatusCode] if attributes.key?(:informationStatusCode) self.insured_indicator = attributes[:insuredIndicator] if attributes.key?(:insuredIndicator) self.last_name = attributes[:lastName] if attributes.key?(:lastName) self.maintenance_reason_code = attributes[:maintenanceReasonCode] if attributes.key?(:maintenanceReasonCode) self.maintenance_type_code = attributes[:maintenanceTypeCode] if attributes.key?(:maintenanceTypeCode) self.member_id = attributes[:memberId] if attributes.key?(:memberId) self.middle_name = attributes[:middleName] if attributes.key?(:middleName) self.military_service_rank_code = attributes[:militaryServiceRankCode] if attributes.key?(:militaryServiceRankCode) self.plan_number = attributes[:planNumber] if attributes.key?(:planNumber) self.provider = attributes[:provider] if attributes.key?(:provider) self.relation_to_subscriber = attributes[:relationToSubscriber] if attributes.key?(:relationToSubscriber) self.relation_to_subscriber_code = attributes[:relationToSubscriberCode] if attributes.key?(:relationToSubscriberCode) self.ssn = attributes[:ssn] if attributes.key?(:ssn) self.start_date_time_period = attributes[:startDateTimePeriod] if attributes.key?(:startDateTimePeriod) self.suffix = attributes[:suffix] if attributes.key?(:suffix) self.unique_health_identifier = attributes[:uniqueHealthIdentifier] if attributes.key?(:uniqueHealthIdentifier) end
Attribute type mapping.
# File lib/change_healthcare/eligibility/swagger_client/models/loop_2000_cd2100_cd_segment_nm1_ref_dmg_ins_mpi_prv_notes_response_member.rb, line 147 def self.swagger_types { 'address': :Address, 'birth_sequence_number': :String, 'date_of_birth': :Date, 'date_time_period': :String, 'date_time_period_format_qualifier': :String, 'description': :String, 'employment_status_code': :String, 'end_date_time_period': :String, 'entity_identifier': :String, 'entity_type': :String, 'first_name': :String, 'gender': :String, 'government_service_affiliation_code': :String, 'group_number': :String, 'health_care_diagnosis_codes': :'Array<HealthCareDiagnosisCode>', 'information_status_code': :String, 'insured_indicator': :String, 'last_name': :String, 'maintenance_reason_code': :String, 'maintenance_type_code': :String, 'member_id': :String, 'middle_name': :String, 'military_service_rank_code': :String, 'plan_number': :String, 'provider': :Loop2100BCDSegmentNM1PRVNotesProvider, 'relation_to_subscriber': :String, 'relation_to_subscriber_code': :String, 'ssn': :String, 'start_date_time_period': :String, 'suffix': :String, 'unique_health_identifier': :String } end
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] Object to be compared
# File lib/change_healthcare/eligibility/swagger_client/models/loop_2000_cd2100_cd_segment_nm1_ref_dmg_ins_mpi_prv_notes_response_member.rb, line 272 def ==(o) return true if equal?(o) self.class == o.class && address == o.address && birth_sequence_number == o.birth_sequence_number && date_of_birth == o.date_of_birth && date_time_period == o.date_time_period && date_time_period_format_qualifier == o.date_time_period_format_qualifier && description == o.description && employment_status_code == o.employment_status_code && end_date_time_period == o.end_date_time_period && entity_identifier == o.entity_identifier && entity_type == o.entity_type && first_name == o.first_name && gender == o.gender && government_service_affiliation_code == o.government_service_affiliation_code && group_number == o.group_number && health_care_diagnosis_codes == o.health_care_diagnosis_codes && information_status_code == o.information_status_code && insured_indicator == o.insured_indicator && last_name == o.last_name && maintenance_reason_code == o.maintenance_reason_code && maintenance_type_code == o.maintenance_type_code && member_id == o.member_id && middle_name == o.middle_name && military_service_rank_code == o.military_service_rank_code && plan_number == o.plan_number && provider == o.provider && relation_to_subscriber == o.relation_to_subscriber && relation_to_subscriber_code == o.relation_to_subscriber_code && ssn == o.ssn && start_date_time_period == o.start_date_time_period && suffix == o.suffix && unique_health_identifier == o.unique_health_identifier end
Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data
# File lib/change_healthcare/eligibility/swagger_client/models/loop_2000_cd2100_cd_segment_nm1_ref_dmg_ins_mpi_prv_notes_response_member.rb, line 346 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = SwaggerClient.const_get(type).new temp_model.build_from_hash(value) end end
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash
# File lib/change_healthcare/eligibility/swagger_client/models/loop_2000_cd2100_cd_segment_nm1_ref_dmg_ins_mpi_prv_notes_response_member.rb, line 413 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end
Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself
# File lib/change_healthcare/eligibility/swagger_client/models/loop_2000_cd2100_cd_segment_nm1_ref_dmg_ins_mpi_prv_notes_response_member.rb, line 324 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize(Regexp.last_match(1), v) }) end elsif !attributes[self.class.attribute_map[key]].nil? send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end
@see the `==` method @param [Object] Object to be compared
# File lib/change_healthcare/eligibility/swagger_client/models/loop_2000_cd2100_cd_segment_nm1_ref_dmg_ins_mpi_prv_notes_response_member.rb, line 311 def eql?(o) self == o end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
# File lib/change_healthcare/eligibility/swagger_client/models/loop_2000_cd2100_cd_segment_nm1_ref_dmg_ins_mpi_prv_notes_response_member.rb, line 317 def hash [address, birth_sequence_number, date_of_birth, date_time_period, date_time_period_format_qualifier, description, employment_status_code, end_date_time_period, entity_identifier, entity_type, first_name, gender, government_service_affiliation_code, group_number, health_care_diagnosis_codes, information_status_code, insured_indicator, last_name, maintenance_reason_code, maintenance_type_code, member_id, middle_name, military_service_rank_code, plan_number, provider, relation_to_subscriber, relation_to_subscriber_code, ssn, start_date_time_period, suffix, unique_health_identifier].hash end
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
# File lib/change_healthcare/eligibility/swagger_client/models/loop_2000_cd2100_cd_segment_nm1_ref_dmg_ins_mpi_prv_notes_response_member.rb, line 260 def list_invalid_properties [] end
Returns the object in the form of hash @return [Hash] Returns the object in the form of hash
# File lib/change_healthcare/eligibility/swagger_client/models/loop_2000_cd2100_cd_segment_nm1_ref_dmg_ins_mpi_prv_notes_response_member.rb, line 398 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end
Returns the string representation of the object @return [String] String presentation of the object
# File lib/change_healthcare/eligibility/swagger_client/models/loop_2000_cd2100_cd_segment_nm1_ref_dmg_ins_mpi_prv_notes_response_member.rb, line 386 def to_s to_hash.to_s end
Check to see if the all the properties in the model are valid @return true if the model is valid
# File lib/change_healthcare/eligibility/swagger_client/models/loop_2000_cd2100_cd_segment_nm1_ref_dmg_ins_mpi_prv_notes_response_member.rb, line 266 def valid? true end