Class: CandidApiClient::FeeSchedules::V3::Types::MatchPayer
- Inherits:
-
Object
- Object
- CandidApiClient::FeeSchedules::V3::Types::MatchPayer
- Defined in:
- lib/candidhealth/fee_schedules/v_3/types/match_payer.rb
Overview
Match information for a payer
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #explanation ⇒ String readonly
- #match ⇒ Boolean readonly
- #value ⇒ String readonly
Class Method Summary collapse
-
.from_json(json_object:) ⇒ CandidApiClient::FeeSchedules::V3::Types::MatchPayer
Deserialize a JSON object to an instance of MatchPayer.
-
.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(value:, match:, explanation:, additional_properties: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::MatchPayer constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of MatchPayer to a JSON object.
Constructor Details
#initialize(value:, match:, explanation:, additional_properties: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::MatchPayer
31 32 33 34 35 36 37 |
# File 'lib/candidhealth/fee_schedules/v_3/types/match_payer.rb', line 31 def initialize(value:, match:, explanation:, additional_properties: nil) @value = value @match = match @explanation = explanation @additional_properties = additional_properties @_field_set = { "value": value, "match": match, "explanation": explanation } end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
19 20 21 |
# File 'lib/candidhealth/fee_schedules/v_3/types/match_payer.rb', line 19 def additional_properties @additional_properties end |
#explanation ⇒ String (readonly)
17 18 19 |
# File 'lib/candidhealth/fee_schedules/v_3/types/match_payer.rb', line 17 def explanation @explanation end |
#match ⇒ Boolean (readonly)
15 16 17 |
# File 'lib/candidhealth/fee_schedules/v_3/types/match_payer.rb', line 15 def match @match end |
#value ⇒ String (readonly)
13 14 15 |
# File 'lib/candidhealth/fee_schedules/v_3/types/match_payer.rb', line 13 def value @value end |
Class Method Details
.from_json(json_object:) ⇒ CandidApiClient::FeeSchedules::V3::Types::MatchPayer
Deserialize a JSON object to an instance of MatchPayer
43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/candidhealth/fee_schedules/v_3/types/match_payer.rb', line 43 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) value = struct["value"] match = struct["match"] explanation = struct["explanation"] new( value: value, match: match, explanation: explanation, 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.
69 70 71 72 73 |
# File 'lib/candidhealth/fee_schedules/v_3/types/match_payer.rb', line 69 def self.validate_raw(obj:) obj.value.is_a?(String) != false || raise("Passed value for field obj.value is not the expected type, validation failed.") obj.match.is_a?(Boolean) != false || raise("Passed value for field obj.match is not the expected type, validation failed.") obj.explanation.is_a?(String) != false || raise("Passed value for field obj.explanation is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of MatchPayer to a JSON object
59 60 61 |
# File 'lib/candidhealth/fee_schedules/v_3/types/match_payer.rb', line 59 def to_json(*_args) @_field_set&.to_json end |