Class: FdxV660Api::HealthInsuranceCoveredIndividual
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::HealthInsuranceCoveredIndividual
- Defined in:
- lib/fdx_v660_api/models/health_insurance_covered_individual.rb
Overview
Used on Form 1095-B Part IV and Form 1095-C Part III
Instance Attribute Summary collapse
-
#covered_all12_months ⇒ TrueClass | FalseClass
Covered all 12 months.
-
#covered_months ⇒ Array[MonthAbbreviation]
Months covered.
-
#date_of_birth ⇒ Date
Date of birth.
-
#name ⇒ IndividualName5
Name of responsible individual.
-
#tin ⇒ String
Social security number or other TIN.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(name: SKIP, tin: SKIP, date_of_birth: SKIP, covered_all12_months: SKIP, covered_months: SKIP, additional_properties: nil) ⇒ HealthInsuranceCoveredIndividual
constructor
A new instance of HealthInsuranceCoveredIndividual.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(name: SKIP, tin: SKIP, date_of_birth: SKIP, covered_all12_months: SKIP, covered_months: SKIP, additional_properties: nil) ⇒ HealthInsuranceCoveredIndividual
Returns a new instance of HealthInsuranceCoveredIndividual.
59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/fdx_v660_api/models/health_insurance_covered_individual.rb', line 59 def initialize(name: SKIP, tin: SKIP, date_of_birth: SKIP, covered_all12_months: SKIP, covered_months: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @name = name unless name == SKIP @tin = tin unless tin == SKIP @date_of_birth = date_of_birth unless date_of_birth == SKIP @covered_all12_months = covered_all12_months unless covered_all12_months == SKIP @covered_months = covered_months unless covered_months == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#covered_all12_months ⇒ TrueClass | FalseClass
Covered all 12 months
26 27 28 |
# File 'lib/fdx_v660_api/models/health_insurance_covered_individual.rb', line 26 def covered_all12_months @covered_all12_months end |
#covered_months ⇒ Array[MonthAbbreviation]
Months covered
30 31 32 |
# File 'lib/fdx_v660_api/models/health_insurance_covered_individual.rb', line 30 def covered_months @covered_months end |
#date_of_birth ⇒ Date
Date of birth
22 23 24 |
# File 'lib/fdx_v660_api/models/health_insurance_covered_individual.rb', line 22 def date_of_birth @date_of_birth end |
#name ⇒ IndividualName5
Name of responsible individual
14 15 16 |
# File 'lib/fdx_v660_api/models/health_insurance_covered_individual.rb', line 14 def name @name end |
#tin ⇒ String
Social security number or other TIN
18 19 20 |
# File 'lib/fdx_v660_api/models/health_insurance_covered_individual.rb', line 18 def tin @tin end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/fdx_v660_api/models/health_insurance_covered_individual.rb', line 74 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = IndividualName5.from_hash(hash['name']) if hash['name'] tin = hash.key?('tin') ? hash['tin'] : SKIP date_of_birth = hash.key?('dateOfBirth') ? hash['dateOfBirth'] : SKIP covered_all12_months = hash.key?('coveredAll12Months') ? hash['coveredAll12Months'] : SKIP covered_months = hash.key?('coveredMonths') ? hash['coveredMonths'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. HealthInsuranceCoveredIndividual.new(name: name, tin: tin, date_of_birth: date_of_birth, covered_all12_months: covered_all12_months, covered_months: covered_months, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 40 41 |
# File 'lib/fdx_v660_api/models/health_insurance_covered_individual.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['tin'] = 'tin' @_hash['date_of_birth'] = 'dateOfBirth' @_hash['covered_all12_months'] = 'coveredAll12Months' @_hash['covered_months'] = 'coveredMonths' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 |
# File 'lib/fdx_v660_api/models/health_insurance_covered_individual.rb', line 55 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
44 45 46 47 48 49 50 51 52 |
# File 'lib/fdx_v660_api/models/health_insurance_covered_individual.rb', line 44 def self.optionals %w[ name tin date_of_birth covered_all12_months covered_months ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
110 111 112 113 114 115 116 |
# File 'lib/fdx_v660_api/models/health_insurance_covered_individual.rb', line 110 def inspect class_name = self.class.name.split('::').last "<#{class_name} name: #{@name.inspect}, tin: #{@tin.inspect}, date_of_birth:"\ " #{@date_of_birth.inspect}, covered_all12_months: #{@covered_all12_months.inspect},"\ " covered_months: #{@covered_months.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
102 103 104 105 106 107 |
# File 'lib/fdx_v660_api/models/health_insurance_covered_individual.rb', line 102 def to_s class_name = self.class.name.split('::').last "<#{class_name} name: #{@name}, tin: #{@tin}, date_of_birth: #{@date_of_birth},"\ " covered_all12_months: #{@covered_all12_months}, covered_months: #{@covered_months},"\ " additional_properties: #{@additional_properties}>" end |