Class: CandidApiClient::PreEncounter::Common::Types::AdditionalPayerInformation

Inherits:
Object
  • Object
show all
Defined in:
lib/candidhealth/pre_encounter/common/types/additional_payer_information.rb

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(availity_eligibility_id: OMIT, availity_payer_id: OMIT, availity_payer_name: OMIT, availity_remittance_payer_id: OMIT, additional_properties: nil) ⇒ CandidApiClient::PreEncounter::Common::Types::AdditionalPayerInformation

Parameters:

  • availity_eligibility_id (String) (defaults to: OMIT)
  • availity_payer_id (String) (defaults to: OMIT)
  • availity_payer_name (String) (defaults to: OMIT)
  • availity_remittance_payer_id (String) (defaults to: OMIT)
  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/candidhealth/pre_encounter/common/types/additional_payer_information.rb', line 33

def initialize(availity_eligibility_id: OMIT, availity_payer_id: OMIT, availity_payer_name: OMIT,
               availity_remittance_payer_id: OMIT, additional_properties: nil)
  @availity_eligibility_id = availity_eligibility_id if availity_eligibility_id != OMIT
  @availity_payer_id = availity_payer_id if availity_payer_id != OMIT
  @availity_payer_name = availity_payer_name if availity_payer_name != OMIT
  @availity_remittance_payer_id = availity_remittance_payer_id if availity_remittance_payer_id != OMIT
  @additional_properties = additional_properties
  @_field_set = {
    "availity_eligibility_id": availity_eligibility_id,
    "availity_payer_id": availity_payer_id,
    "availity_payer_name": availity_payer_name,
    "availity_remittance_payer_id": availity_remittance_payer_id
  }.reject do |_k, v|
    v == OMIT
  end
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



20
21
22
# File 'lib/candidhealth/pre_encounter/common/types/additional_payer_information.rb', line 20

def additional_properties
  @additional_properties
end

#availity_eligibility_idString (readonly)

Returns:

  • (String)


12
13
14
# File 'lib/candidhealth/pre_encounter/common/types/additional_payer_information.rb', line 12

def availity_eligibility_id
  @availity_eligibility_id
end

#availity_payer_idString (readonly)

Returns:

  • (String)


14
15
16
# File 'lib/candidhealth/pre_encounter/common/types/additional_payer_information.rb', line 14

def availity_payer_id
  @availity_payer_id
end

#availity_payer_nameString (readonly)

Returns:

  • (String)


16
17
18
# File 'lib/candidhealth/pre_encounter/common/types/additional_payer_information.rb', line 16

def availity_payer_name
  @availity_payer_name
end

#availity_remittance_payer_idString (readonly)

Returns:

  • (String)


18
19
20
# File 'lib/candidhealth/pre_encounter/common/types/additional_payer_information.rb', line 18

def availity_remittance_payer_id
  @availity_remittance_payer_id
end

Class Method Details

.from_json(json_object:) ⇒ CandidApiClient::PreEncounter::Common::Types::AdditionalPayerInformation

Deserialize a JSON object to an instance of AdditionalPayerInformation



54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/candidhealth/pre_encounter/common/types/additional_payer_information.rb', line 54

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


82
83
84
85
86
87
# File 'lib/candidhealth/pre_encounter/common/types/additional_payer_information.rb', line 82

def self.validate_raw(obj:)
  obj.availity_eligibility_id&.is_a?(String) != false || raise("Passed value for field obj.availity_eligibility_id is not the expected type, validation failed.")
  obj.availity_payer_id&.is_a?(String) != false || raise("Passed value for field obj.availity_payer_id is not the expected type, validation failed.")
  obj.availity_payer_name&.is_a?(String) != false || raise("Passed value for field obj.availity_payer_name is not the expected type, validation failed.")
  obj.availity_remittance_payer_id&.is_a?(String) != false || raise("Passed value for field obj.availity_remittance_payer_id is not the expected type, validation failed.")
end

Instance Method Details

#to_json(*_args) ⇒ String

Serialize an instance of AdditionalPayerInformation to a JSON object

Returns:

  • (String)


72
73
74
# File 'lib/candidhealth/pre_encounter/common/types/additional_payer_information.rb', line 72

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