Class: CandidApiClient::ServiceLines::V2::Types::ServiceLineDenialReason
- Inherits:
-
Object
- Object
- CandidApiClient::ServiceLines::V2::Types::ServiceLineDenialReason
- Defined in:
- lib/candidhealth/service_lines/v_2/types/service_line_denial_reason.rb
Overview
The reason a given service line was denied within a given time range.
A service line may be denied for different reasons over time, but only one
reason at a time.
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#reason ⇒ CandidApiClient::ServiceLines::V2::Types::DenialReasonContent
readonly
Text of the denial reason.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ CandidApiClient::ServiceLines::V2::Types::ServiceLineDenialReason
Deserialize a JSON object to an instance of ServiceLineDenialReason.
-
.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(reason: OMIT, additional_properties: nil) ⇒ CandidApiClient::ServiceLines::V2::Types::ServiceLineDenialReason constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of ServiceLineDenialReason to a JSON object.
Constructor Details
#initialize(reason: OMIT, additional_properties: nil) ⇒ CandidApiClient::ServiceLines::V2::Types::ServiceLineDenialReason
28 29 30 31 32 33 34 |
# File 'lib/candidhealth/service_lines/v_2/types/service_line_denial_reason.rb', line 28 def initialize(reason: OMIT, additional_properties: nil) @reason = reason if reason != OMIT @additional_properties = additional_properties @_field_set = { "reason": reason }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
18 19 20 |
# File 'lib/candidhealth/service_lines/v_2/types/service_line_denial_reason.rb', line 18 def additional_properties @additional_properties end |
#reason ⇒ CandidApiClient::ServiceLines::V2::Types::DenialReasonContent (readonly)
Returns Text of the denial reason.
16 17 18 |
# File 'lib/candidhealth/service_lines/v_2/types/service_line_denial_reason.rb', line 16 def reason @reason end |
Class Method Details
.from_json(json_object:) ⇒ CandidApiClient::ServiceLines::V2::Types::ServiceLineDenialReason
Deserialize a JSON object to an instance of ServiceLineDenialReason
40 41 42 43 44 |
# File 'lib/candidhealth/service_lines/v_2/types/service_line_denial_reason.rb', line 40 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) reason = struct["reason"] new(reason: reason, 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.
59 60 61 |
# File 'lib/candidhealth/service_lines/v_2/types/service_line_denial_reason.rb', line 59 def self.validate_raw(obj:) obj.reason&.is_a?(CandidApiClient::ServiceLines::V2::Types::DenialReasonContent) != false || raise("Passed value for field obj.reason is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of ServiceLineDenialReason to a JSON object
49 50 51 |
# File 'lib/candidhealth/service_lines/v_2/types/service_line_denial_reason.rb', line 49 def to_json(*_args) @_field_set&.to_json end |