Class: CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder

Inherits:
Object
  • Object
show all
Defined in:
lib/candidhealth/pre_encounter/patients/v_1/types/filing_order.rb

Overview

The patient’s active coverages, in order of primary, secondary, etc.

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(coverages:, additional_properties: nil) ⇒ CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder

Parameters:

  • coverages (Array<String>)
  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



26
27
28
29
30
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/filing_order.rb', line 26

def initialize(coverages:, additional_properties: nil)
  @coverages = coverages
  @additional_properties = additional_properties
  @_field_set = { "coverages": coverages }
end

Instance Attribute Details

#additional_propertiesOpenStruct (readonly)

Returns Additional properties unmapped to the current class definition.

Returns:

  • (OpenStruct)

    Additional properties unmapped to the current class definition



16
17
18
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/filing_order.rb', line 16

def additional_properties
  @additional_properties
end

#coveragesArray<String> (readonly)

Returns:

  • (Array<String>)


14
15
16
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/filing_order.rb', line 14

def coverages
  @coverages
end

Class Method Details

.from_json(json_object:) ⇒ CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder

Deserialize a JSON object to an instance of FilingOrder

Parameters:

  • json_object (String)

Returns:



36
37
38
39
40
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/filing_order.rb', line 36

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  coverages = struct["coverages"]
  new(coverages: coverages, 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.

Parameters:

  • obj (Object)

Returns:

  • (Void)


55
56
57
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/filing_order.rb', line 55

def self.validate_raw(obj:)
  obj.coverages.is_a?(Array) != false || raise("Passed value for field obj.coverages is not the expected type, validation failed.")
end

Instance Method Details

#to_json(*_args) ⇒ String

Serialize an instance of FilingOrder to a JSON object

Returns:

  • (String)


45
46
47
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/filing_order.rb', line 45

def to_json(*_args)
  @_field_set&.to_json
end