Class: FdxV660Api::OfferOfHealthInsuranceCoverage
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::OfferOfHealthInsuranceCoverage
- Defined in:
- lib/fdx_v660_api/models/offer_of_health_insurance_coverage.rb
Overview
Health insurance coverage offer for part II of IRS Form 1095-C
Instance Attribute Summary collapse
-
#coverage_code ⇒ String
Offer of Coverage (enter required code).
-
#month ⇒ CoverageMonth1
Month.
-
#postal_code ⇒ String
Box 17, ZIP Code.
-
#required_contribution ⇒ Float
Employee required contribution.
-
#section4980_h_code ⇒ String
Section 4980H Safe Harbor and Other Relief (enter code).
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(coverage_code: SKIP, required_contribution: SKIP, section4980_h_code: SKIP, postal_code: SKIP, month: SKIP, additional_properties: nil) ⇒ OfferOfHealthInsuranceCoverage
constructor
A new instance of OfferOfHealthInsuranceCoverage.
-
#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(coverage_code: SKIP, required_contribution: SKIP, section4980_h_code: SKIP, postal_code: SKIP, month: SKIP, additional_properties: nil) ⇒ OfferOfHealthInsuranceCoverage
Returns a new instance of OfferOfHealthInsuranceCoverage.
59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/fdx_v660_api/models/offer_of_health_insurance_coverage.rb', line 59 def initialize(coverage_code: SKIP, required_contribution: SKIP, section4980_h_code: SKIP, postal_code: SKIP, month: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @coverage_code = coverage_code unless coverage_code == SKIP @required_contribution = required_contribution unless required_contribution == SKIP @section4980_h_code = section4980_h_code unless section4980_h_code == SKIP @postal_code = postal_code unless postal_code == SKIP @month = month unless month == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#coverage_code ⇒ String
Offer of Coverage (enter required code)
14 15 16 |
# File 'lib/fdx_v660_api/models/offer_of_health_insurance_coverage.rb', line 14 def coverage_code @coverage_code end |
#month ⇒ CoverageMonth1
Month
30 31 32 |
# File 'lib/fdx_v660_api/models/offer_of_health_insurance_coverage.rb', line 30 def month @month end |
#postal_code ⇒ String
Box 17, ZIP Code
26 27 28 |
# File 'lib/fdx_v660_api/models/offer_of_health_insurance_coverage.rb', line 26 def postal_code @postal_code end |
#required_contribution ⇒ Float
Employee required contribution
18 19 20 |
# File 'lib/fdx_v660_api/models/offer_of_health_insurance_coverage.rb', line 18 def required_contribution @required_contribution end |
#section4980_h_code ⇒ String
Section 4980H Safe Harbor and Other Relief (enter code)
22 23 24 |
# File 'lib/fdx_v660_api/models/offer_of_health_insurance_coverage.rb', line 22 def section4980_h_code @section4980_h_code 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 100 |
# File 'lib/fdx_v660_api/models/offer_of_health_insurance_coverage.rb', line 74 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. coverage_code = hash.key?('coverageCode') ? hash['coverageCode'] : SKIP required_contribution = hash.key?('requiredContribution') ? hash['requiredContribution'] : SKIP section4980_h_code = hash.key?('section4980HCode') ? hash['section4980HCode'] : SKIP postal_code = hash.key?('postalCode') ? hash['postalCode'] : SKIP month = hash.key?('month') ? hash['month'] : 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. OfferOfHealthInsuranceCoverage.new(coverage_code: coverage_code, required_contribution: required_contribution, section4980_h_code: section4980_h_code, postal_code: postal_code, month: month, 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/offer_of_health_insurance_coverage.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['coverage_code'] = 'coverageCode' @_hash['required_contribution'] = 'requiredContribution' @_hash['section4980_h_code'] = 'section4980HCode' @_hash['postal_code'] = 'postalCode' @_hash['month'] = 'month' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 |
# File 'lib/fdx_v660_api/models/offer_of_health_insurance_coverage.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/offer_of_health_insurance_coverage.rb', line 44 def self.optionals %w[ coverage_code required_contribution section4980_h_code postal_code month ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
111 112 113 114 115 116 117 |
# File 'lib/fdx_v660_api/models/offer_of_health_insurance_coverage.rb', line 111 def inspect class_name = self.class.name.split('::').last "<#{class_name} coverage_code: #{@coverage_code.inspect}, required_contribution:"\ " #{@required_contribution.inspect}, section4980_h_code: #{@section4980_h_code.inspect},"\ " postal_code: #{@postal_code.inspect}, month: #{@month.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
103 104 105 106 107 108 |
# File 'lib/fdx_v660_api/models/offer_of_health_insurance_coverage.rb', line 103 def to_s class_name = self.class.name.split('::').last "<#{class_name} coverage_code: #{@coverage_code}, required_contribution:"\ " #{@required_contribution}, section4980_h_code: #{@section4980_h_code}, postal_code:"\ " #{@postal_code}, month: #{@month}, additional_properties: #{@additional_properties}>" end |