Class: CandidApiClient::Payers::V3::Types::Payer

Inherits:
Object
  • Object
show all
Defined in:
lib/candidhealth/payers/v_3/types/payer.rb

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payer_uuid:, payer_id:, payer_name:, availity_payer_name: OMIT, availity_claims_payer_id: OMIT, availity_eligibility_id: OMIT, availity_remittance_payer_id: OMIT, additional_properties: nil) ⇒ CandidApiClient::Payers::V3::Types::Payer

Parameters:

  • payer_uuid (String)

    Auto-generated ID set on creation.

  • payer_id (String)

    The primary national payer ID of the payer.

  • payer_name (String)

    The primary display name of the payer.

  • availity_payer_name (String) (defaults to: OMIT)

    The name of the payer as it appears in Availity.

  • availity_claims_payer_id (String) (defaults to: OMIT)

    The ID of the payer as it appears in Availity.

  • availity_eligibility_id (String) (defaults to: OMIT)

    The eligibility ID of the payer as it appears in Availity.

  • availity_remittance_payer_id (String) (defaults to: OMIT)

    The remittance ID of the payer as it appears in Availity.

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/candidhealth/payers/v_3/types/payer.rb', line 42

def initialize(payer_uuid:, payer_id:, payer_name:, availity_payer_name: OMIT,
               availity_claims_payer_id: OMIT, availity_eligibility_id: OMIT, availity_remittance_payer_id: OMIT, additional_properties: nil)
  @payer_uuid = payer_uuid
  @payer_id = payer_id
  @payer_name = payer_name
  @availity_payer_name = availity_payer_name if availity_payer_name != OMIT
  @availity_claims_payer_id = availity_claims_payer_id if availity_claims_payer_id != OMIT
  @availity_eligibility_id = availity_eligibility_id if availity_eligibility_id != OMIT
  @availity_remittance_payer_id = availity_remittance_payer_id if availity_remittance_payer_id != OMIT
  @additional_properties = additional_properties
  @_field_set = {
    "payer_uuid": payer_uuid,
    "payer_id": payer_id,
    "payer_name": payer_name,
    "availity_payer_name": availity_payer_name,
    "availity_claims_payer_id": availity_claims_payer_id,
    "availity_eligibility_id": availity_eligibility_id,
    "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



26
27
28
# File 'lib/candidhealth/payers/v_3/types/payer.rb', line 26

def additional_properties
  @additional_properties
end

#availity_claims_payer_idString (readonly)

Returns The ID of the payer as it appears in Availity.

Returns:

  • (String)

    The ID of the payer as it appears in Availity.



20
21
22
# File 'lib/candidhealth/payers/v_3/types/payer.rb', line 20

def availity_claims_payer_id
  @availity_claims_payer_id
end

#availity_eligibility_idString (readonly)

Returns The eligibility ID of the payer as it appears in Availity.

Returns:

  • (String)

    The eligibility ID of the payer as it appears in Availity.



22
23
24
# File 'lib/candidhealth/payers/v_3/types/payer.rb', line 22

def availity_eligibility_id
  @availity_eligibility_id
end

#availity_payer_nameString (readonly)

Returns The name of the payer as it appears in Availity.

Returns:

  • (String)

    The name of the payer as it appears in Availity.



18
19
20
# File 'lib/candidhealth/payers/v_3/types/payer.rb', line 18

def availity_payer_name
  @availity_payer_name
end

#availity_remittance_payer_idString (readonly)

Returns The remittance ID of the payer as it appears in Availity.

Returns:

  • (String)

    The remittance ID of the payer as it appears in Availity.



24
25
26
# File 'lib/candidhealth/payers/v_3/types/payer.rb', line 24

def availity_remittance_payer_id
  @availity_remittance_payer_id
end

#payer_idString (readonly)

Returns The primary national payer ID of the payer.

Returns:

  • (String)

    The primary national payer ID of the payer.



14
15
16
# File 'lib/candidhealth/payers/v_3/types/payer.rb', line 14

def payer_id
  @payer_id
end

#payer_nameString (readonly)

Returns The primary display name of the payer.

Returns:

  • (String)

    The primary display name of the payer.



16
17
18
# File 'lib/candidhealth/payers/v_3/types/payer.rb', line 16

def payer_name
  @payer_name
end

#payer_uuidString (readonly)

Returns Auto-generated ID set on creation.

Returns:

  • (String)

    Auto-generated ID set on creation.



12
13
14
# File 'lib/candidhealth/payers/v_3/types/payer.rb', line 12

def payer_uuid
  @payer_uuid
end

Class Method Details

.from_json(json_object:) ⇒ CandidApiClient::Payers::V3::Types::Payer

Deserialize a JSON object to an instance of Payer

Parameters:

  • json_object (String)

Returns:



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/candidhealth/payers/v_3/types/payer.rb', line 69

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


103
104
105
106
107
108
109
110
111
# File 'lib/candidhealth/payers/v_3/types/payer.rb', line 103

def self.validate_raw(obj:)
  obj.payer_uuid.is_a?(String) != false || raise("Passed value for field obj.payer_uuid is not the expected type, validation failed.")
  obj.payer_id.is_a?(String) != false || raise("Passed value for field obj.payer_id is not the expected type, validation failed.")
  obj.payer_name.is_a?(String) != false || raise("Passed value for field obj.payer_name 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_claims_payer_id&.is_a?(String) != false || raise("Passed value for field obj.availity_claims_payer_id is not the expected type, validation failed.")
  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_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 Payer to a JSON object

Returns:

  • (String)


93
94
95
# File 'lib/candidhealth/payers/v_3/types/payer.rb', line 93

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