Class: CandidApiClient::PreEncounter::Coverages::V1::Types::EligibilityCheckMetadata
- Inherits:
-
Object
- Object
- CandidApiClient::PreEncounter::Coverages::V1::Types::EligibilityCheckMetadata
- Defined in:
- lib/candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_metadata.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #check_id ⇒ String readonly
- #initiated_at ⇒ DateTime readonly
- #initiated_by ⇒ String readonly
- #service_code ⇒ CandidApiClient::PreEncounter::Coverages::V1::Types::ServiceTypeCode readonly
- #status ⇒ CandidApiClient::PreEncounter::Coverages::V1::Types::EligibilityCheckStatus readonly
Class Method Summary collapse
-
.from_json(json_object:) ⇒ CandidApiClient::PreEncounter::Coverages::V1::Types::EligibilityCheckMetadata
Deserialize a JSON object to an instance of EligibilityCheckMetadata.
-
.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(check_id:, service_code:, status:, initiated_by:, initiated_at:, additional_properties: nil) ⇒ CandidApiClient::PreEncounter::Coverages::V1::Types::EligibilityCheckMetadata constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of EligibilityCheckMetadata to a JSON object.
Constructor Details
#initialize(check_id:, service_code:, status:, initiated_by:, initiated_at:, additional_properties: nil) ⇒ CandidApiClient::PreEncounter::Coverages::V1::Types::EligibilityCheckMetadata
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_metadata.rb', line 40 def initialize(check_id:, service_code:, status:, initiated_by:, initiated_at:, additional_properties: nil) @check_id = check_id @service_code = service_code @status = status @initiated_by = initiated_by @initiated_at = initiated_at @additional_properties = additional_properties @_field_set = { "check_id": check_id, "service_code": service_code, "status": status, "initiated_by": initiated_by, "initiated_at": initiated_at } end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
26 27 28 |
# File 'lib/candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_metadata.rb', line 26 def additional_properties @additional_properties end |
#check_id ⇒ String (readonly)
16 17 18 |
# File 'lib/candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_metadata.rb', line 16 def check_id @check_id end |
#initiated_at ⇒ DateTime (readonly)
24 25 26 |
# File 'lib/candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_metadata.rb', line 24 def initiated_at @initiated_at end |
#initiated_by ⇒ String (readonly)
22 23 24 |
# File 'lib/candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_metadata.rb', line 22 def initiated_by @initiated_by end |
#service_code ⇒ CandidApiClient::PreEncounter::Coverages::V1::Types::ServiceTypeCode (readonly)
18 19 20 |
# File 'lib/candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_metadata.rb', line 18 def service_code @service_code end |
#status ⇒ CandidApiClient::PreEncounter::Coverages::V1::Types::EligibilityCheckStatus (readonly)
20 21 22 |
# File 'lib/candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_metadata.rb', line 20 def status @status end |
Class Method Details
.from_json(json_object:) ⇒ CandidApiClient::PreEncounter::Coverages::V1::Types::EligibilityCheckMetadata
Deserialize a JSON object to an instance of EligibilityCheckMetadata
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_metadata.rb', line 60 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) check_id = struct["check_id"] service_code = struct["service_code"] status = struct["status"] initiated_by = struct["initiated_by"] initiated_at = (DateTime.parse(parsed_json["initiated_at"]) unless parsed_json["initiated_at"].nil?) new( check_id: check_id, service_code: service_code, status: status, initiated_by: initiated_by, initiated_at: initiated_at, 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.
91 92 93 94 95 96 97 |
# File 'lib/candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_metadata.rb', line 91 def self.validate_raw(obj:) obj.check_id.is_a?(String) != false || raise("Passed value for field obj.check_id is not the expected type, validation failed.") obj.service_code.is_a?(CandidApiClient::PreEncounter::Coverages::V1::Types::ServiceTypeCode) != false || raise("Passed value for field obj.service_code is not the expected type, validation failed.") obj.status.is_a?(CandidApiClient::PreEncounter::Coverages::V1::Types::EligibilityCheckStatus) != false || raise("Passed value for field obj.status is not the expected type, validation failed.") obj.initiated_by.is_a?(String) != false || raise("Passed value for field obj.initiated_by is not the expected type, validation failed.") obj.initiated_at.is_a?(DateTime) != false || raise("Passed value for field obj.initiated_at is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of EligibilityCheckMetadata to a JSON object
81 82 83 |
# File 'lib/candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_metadata.rb', line 81 def to_json(*_args) @_field_set&.to_json end |