Class: CandidApiClient::FeeSchedules::V3::Types::OverlappingRateEntriesError
- Inherits:
-
Object
- Object
- CandidApiClient::FeeSchedules::V3::Types::OverlappingRateEntriesError
- Defined in:
- lib/candidhealth/fee_schedules/v_3/types/overlapping_rate_entries_error.rb
Overview
This error is thrown when two rate entries have time ranges that overlap.
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #message ⇒ String readonly
- #rate_a ⇒ CandidApiClient::FeeSchedules::V3::Types::RateEntry readonly
- #rate_b ⇒ CandidApiClient::FeeSchedules::V3::Types::RateEntry readonly
Class Method Summary collapse
-
.from_json(json_object:) ⇒ CandidApiClient::FeeSchedules::V3::Types::OverlappingRateEntriesError
Deserialize a JSON object to an instance of OverlappingRateEntriesError.
-
.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(message:, rate_a:, rate_b:, additional_properties: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::OverlappingRateEntriesError constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of OverlappingRateEntriesError to a JSON object.
Constructor Details
#initialize(message:, rate_a:, rate_b:, additional_properties: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::OverlappingRateEntriesError
32 33 34 35 36 37 38 |
# File 'lib/candidhealth/fee_schedules/v_3/types/overlapping_rate_entries_error.rb', line 32 def initialize(message:, rate_a:, rate_b:, additional_properties: nil) @message = @rate_a = rate_a @rate_b = rate_b @additional_properties = additional_properties @_field_set = { "message": , "rate_a": rate_a, "rate_b": rate_b } end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
20 21 22 |
# File 'lib/candidhealth/fee_schedules/v_3/types/overlapping_rate_entries_error.rb', line 20 def additional_properties @additional_properties end |
#message ⇒ String (readonly)
14 15 16 |
# File 'lib/candidhealth/fee_schedules/v_3/types/overlapping_rate_entries_error.rb', line 14 def @message end |
#rate_a ⇒ CandidApiClient::FeeSchedules::V3::Types::RateEntry (readonly)
16 17 18 |
# File 'lib/candidhealth/fee_schedules/v_3/types/overlapping_rate_entries_error.rb', line 16 def rate_a @rate_a end |
#rate_b ⇒ CandidApiClient::FeeSchedules::V3::Types::RateEntry (readonly)
18 19 20 |
# File 'lib/candidhealth/fee_schedules/v_3/types/overlapping_rate_entries_error.rb', line 18 def rate_b @rate_b end |
Class Method Details
.from_json(json_object:) ⇒ CandidApiClient::FeeSchedules::V3::Types::OverlappingRateEntriesError
Deserialize a JSON object to an instance of OverlappingRateEntriesError
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/candidhealth/fee_schedules/v_3/types/overlapping_rate_entries_error.rb', line 44 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) = struct["message"] if parsed_json["rate_a"].nil? rate_a = nil else rate_a = parsed_json["rate_a"].to_json rate_a = CandidApiClient::FeeSchedules::V3::Types::RateEntry.from_json(json_object: rate_a) end if parsed_json["rate_b"].nil? rate_b = nil else rate_b = parsed_json["rate_b"].to_json rate_b = CandidApiClient::FeeSchedules::V3::Types::RateEntry.from_json(json_object: rate_b) end new( message: , rate_a: rate_a, rate_b: rate_b, 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.
81 82 83 84 85 |
# File 'lib/candidhealth/fee_schedules/v_3/types/overlapping_rate_entries_error.rb', line 81 def self.validate_raw(obj:) obj..is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.") CandidApiClient::FeeSchedules::V3::Types::RateEntry.validate_raw(obj: obj.rate_a) CandidApiClient::FeeSchedules::V3::Types::RateEntry.validate_raw(obj: obj.rate_b) end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of OverlappingRateEntriesError to a JSON object
71 72 73 |
# File 'lib/candidhealth/fee_schedules/v_3/types/overlapping_rate_entries_error.rb', line 71 def to_json(*_args) @_field_set&.to_json end |