Class: CandidApiClient::PreEncounter::Coverages::V1::Types::PlanCoverageDetails
- Inherits:
-
Object
- Object
- CandidApiClient::PreEncounter::Coverages::V1::Types::PlanCoverageDetails
- Defined in:
- lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage_details.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
- #additional_notes ⇒ String readonly
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #deductible ⇒ CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageValue readonly
- #deductible_remaining ⇒ CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageValue readonly
- #oop_max ⇒ CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageValue readonly
- #oop_max_remaining ⇒ CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageValue readonly
Class Method Summary collapse
-
.from_json(json_object:) ⇒ CandidApiClient::PreEncounter::Coverages::V1::Types::PlanCoverageDetails
Deserialize a JSON object to an instance of PlanCoverageDetails.
-
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object’s property definitions.
Instance Method Summary collapse
- #initialize(deductible: OMIT, deductible_remaining: OMIT, oop_max: OMIT, oop_max_remaining: OMIT, additional_notes: OMIT, additional_properties: nil) ⇒ CandidApiClient::PreEncounter::Coverages::V1::Types::PlanCoverageDetails constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of PlanCoverageDetails to a JSON object.
Constructor Details
#initialize(deductible: OMIT, deductible_remaining: OMIT, oop_max: OMIT, oop_max_remaining: OMIT, additional_notes: OMIT, additional_properties: nil) ⇒ CandidApiClient::PreEncounter::Coverages::V1::Types::PlanCoverageDetails
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage_details.rb', line 38 def initialize(deductible: OMIT, deductible_remaining: OMIT, oop_max: OMIT, oop_max_remaining: OMIT, additional_notes: OMIT, additional_properties: nil) @deductible = deductible if deductible != OMIT @deductible_remaining = deductible_remaining if deductible_remaining != OMIT @oop_max = oop_max if oop_max != OMIT @oop_max_remaining = oop_max_remaining if oop_max_remaining != OMIT @additional_notes = additional_notes if additional_notes != OMIT @additional_properties = additional_properties @_field_set = { "deductible": deductible, "deductible_remaining": deductible_remaining, "oop_max": oop_max, "oop_max_remaining": oop_max_remaining, "additional_notes": additional_notes }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_notes ⇒ String (readonly)
22 23 24 |
# File 'lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage_details.rb', line 22 def additional_notes @additional_notes end |
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
24 25 26 |
# File 'lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage_details.rb', line 24 def additional_properties @additional_properties end |
#deductible ⇒ CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageValue (readonly)
14 15 16 |
# File 'lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage_details.rb', line 14 def deductible @deductible end |
#deductible_remaining ⇒ CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageValue (readonly)
16 17 18 |
# File 'lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage_details.rb', line 16 def deductible_remaining @deductible_remaining end |
#oop_max ⇒ CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageValue (readonly)
18 19 20 |
# File 'lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage_details.rb', line 18 def oop_max @oop_max end |
#oop_max_remaining ⇒ CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageValue (readonly)
20 21 22 |
# File 'lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage_details.rb', line 20 def oop_max_remaining @oop_max_remaining end |
Class Method Details
.from_json(json_object:) ⇒ CandidApiClient::PreEncounter::Coverages::V1::Types::PlanCoverageDetails
Deserialize a JSON object to an instance of PlanCoverageDetails
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage_details.rb', line 61 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) if parsed_json["deductible"].nil? deductible = nil else deductible = parsed_json["deductible"].to_json deductible = CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageValue.from_json(json_object: deductible) end if parsed_json["deductible_remaining"].nil? deductible_remaining = nil else deductible_remaining = parsed_json["deductible_remaining"].to_json deductible_remaining = CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageValue.from_json(json_object: deductible_remaining) end if parsed_json["oop_max"].nil? oop_max = nil else oop_max = parsed_json["oop_max"].to_json oop_max = CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageValue.from_json(json_object: oop_max) end if parsed_json["oop_max_remaining"].nil? oop_max_remaining = nil else oop_max_remaining = parsed_json["oop_max_remaining"].to_json oop_max_remaining = CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageValue.from_json(json_object: oop_max_remaining) end additional_notes = struct["additional_notes"] new( deductible: deductible, deductible_remaining: deductible_remaining, oop_max: oop_max, oop_max_remaining: oop_max_remaining, additional_notes: additional_notes, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given
hash and check each fields type against the current object's property
definitions.
112 113 114 115 116 117 118 |
# File 'lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage_details.rb', line 112 def self.validate_raw(obj:) obj.deductible.nil? || CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageValue.validate_raw(obj: obj.deductible) obj.deductible_remaining.nil? || CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageValue.validate_raw(obj: obj.deductible_remaining) obj.oop_max.nil? || CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageValue.validate_raw(obj: obj.oop_max) obj.oop_max_remaining.nil? || CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageValue.validate_raw(obj: obj.oop_max_remaining) obj.additional_notes&.is_a?(String) != false || raise("Passed value for field obj.additional_notes is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of PlanCoverageDetails to a JSON object
102 103 104 |
# File 'lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage_details.rb', line 102 def to_json(*_args) @_field_set&.to_json end |