Class: CandidApiClient::Financials::Types::ServiceLineAllocationTarget

Inherits:
Object
  • Object
show all
Defined in:
lib/candidhealth/financials/types/service_line_allocation_target.rb

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(service_line_id:, claim_id:, encounter_id:, additional_properties: nil) ⇒ CandidApiClient::Financials::Types::ServiceLineAllocationTarget

Parameters:

  • service_line_id (String)
  • claim_id (String)
  • encounter_id (String)
  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



29
30
31
32
33
34
35
# File 'lib/candidhealth/financials/types/service_line_allocation_target.rb', line 29

def initialize(service_line_id:, claim_id:, encounter_id:, additional_properties: nil)
  @service_line_id = service_line_id
  @claim_id = claim_id
  @encounter_id = encounter_id
  @additional_properties = additional_properties
  @_field_set = { "service_line_id": service_line_id, "claim_id": claim_id, "encounter_id": encounter_id }
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



17
18
19
# File 'lib/candidhealth/financials/types/service_line_allocation_target.rb', line 17

def additional_properties
  @additional_properties
end

#claim_idString (readonly)

Returns:

  • (String)


13
14
15
# File 'lib/candidhealth/financials/types/service_line_allocation_target.rb', line 13

def claim_id
  @claim_id
end

#encounter_idString (readonly)

Returns:

  • (String)


15
16
17
# File 'lib/candidhealth/financials/types/service_line_allocation_target.rb', line 15

def encounter_id
  @encounter_id
end

#service_line_idString (readonly)

Returns:

  • (String)


11
12
13
# File 'lib/candidhealth/financials/types/service_line_allocation_target.rb', line 11

def service_line_id
  @service_line_id
end

Class Method Details

.from_json(json_object:) ⇒ CandidApiClient::Financials::Types::ServiceLineAllocationTarget

Deserialize a JSON object to an instance of ServiceLineAllocationTarget

Parameters:

  • json_object (String)

Returns:



41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/candidhealth/financials/types/service_line_allocation_target.rb', line 41

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


67
68
69
70
71
# File 'lib/candidhealth/financials/types/service_line_allocation_target.rb', line 67

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

Instance Method Details

#to_json(*_args) ⇒ String

Serialize an instance of ServiceLineAllocationTarget to a JSON object

Returns:

  • (String)


57
58
59
# File 'lib/candidhealth/financials/types/service_line_allocation_target.rb', line 57

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