Class: CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureClaimCreation

Inherits:
Object
  • Object
show all
Defined in:
lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation.rb

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, status:, characteristics:, errors:, created_encounter_id: OMIT, encounter_creation_input: OMIT, additional_properties: nil) ⇒ CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureClaimCreation

Parameters:

  • id (String)
  • created_encounter_id (String) (defaults to: OMIT)
  • status (CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureClaimCreationStatus)

    Status of the Claim Creation, Successful means that the Claim Creation created a corresponding Claim

  • characteristics (Hash{String => Object})

    A dictionary of characteristics that are used to group charge captures together based on the bundling configuration. Example: “99999999”, “date_of_service”: “2023-01-01”

  • errors (Array<CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureError>)

    All errors that were found when the Claim was attempted to be created. Errors can correspond to the Claim Creation as a whole or specific underlying Charge Captures.

  • encounter_creation_input (CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureData) (defaults to: OMIT)

    If a ChargeCaptureBundle attempts creation, this is the input that was created from the underlying charges and used to attempt encounter creation.

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation.rb', line 54

def initialize(id:, status:, characteristics:, errors:, created_encounter_id: OMIT,
               encounter_creation_input: OMIT, additional_properties: nil)
  @id = id
  @created_encounter_id = created_encounter_id if created_encounter_id != OMIT
  @status = status
  @characteristics = characteristics
  @errors = errors
  @encounter_creation_input = encounter_creation_input if encounter_creation_input != OMIT
  @additional_properties = additional_properties
  @_field_set = {
    "id": id,
    "created_encounter_id": created_encounter_id,
    "status": status,
    "characteristics": characteristics,
    "errors": errors,
    "encounter_creation_input": encounter_creation_input
  }.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



33
34
35
# File 'lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation.rb', line 33

def additional_properties
  @additional_properties
end

#characteristicsHash{String => Object} (readonly)

Returns A dictionary of characteristics that are used to group charge captures together based on the bundling configuration. Example: “99999999”, “date_of_service”: “2023-01-01”.

Returns:

  • (Hash{String => Object})

    A dictionary of characteristics that are used to group charge captures together based on the bundling configuration. Example: “99999999”, “date_of_service”: “2023-01-01”



24
25
26
# File 'lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation.rb', line 24

def characteristics
  @characteristics
end

#created_encounter_idString (readonly)

Returns:

  • (String)


17
18
19
# File 'lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation.rb', line 17

def created_encounter_id
  @created_encounter_id
end

#encounter_creation_inputCandidApiClient::ChargeCapture::V1::Types::ChargeCaptureData (readonly)

Returns If a ChargeCaptureBundle attempts creation, this is the input that was created from the underlying charges and used to attempt encounter creation.

Returns:



31
32
33
# File 'lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation.rb', line 31

def encounter_creation_input
  @encounter_creation_input
end

#errorsArray<CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureError> (readonly)

Returns All errors that were found when the Claim was attempted to be created. Errors can correspond to the Claim Creation as a whole or specific underlying Charge Captures.

Returns:



28
29
30
# File 'lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation.rb', line 28

def errors
  @errors
end

#idString (readonly)

Returns:

  • (String)


15
16
17
# File 'lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation.rb', line 15

def id
  @id
end

#statusCandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureClaimCreationStatus (readonly)

Returns Status of the Claim Creation, Successful means that the Claim Creation created a corresponding Claim.

Returns:



20
21
22
# File 'lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation.rb', line 20

def status
  @status
end

Class Method Details

.from_json(json_object:) ⇒ CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureClaimCreation

Deserialize a JSON object to an instance of ChargeCaptureClaimCreation



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation.rb', line 79

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  id = struct["id"]
  created_encounter_id = struct["created_encounter_id"]
  status = struct["status"]
  characteristics = struct["characteristics"]
  errors = parsed_json["errors"]&.map do |item|
    item = item.to_json
    CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureError.from_json(json_object: item)
  end
  if parsed_json["encounter_creation_input"].nil?
    encounter_creation_input = nil
  else
    encounter_creation_input = parsed_json["encounter_creation_input"].to_json
    encounter_creation_input = CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureData.from_json(json_object: encounter_creation_input)
  end
  new(
    id: id,
    created_encounter_id: created_encounter_id,
    status: status,
    characteristics: characteristics,
    errors: errors,
    encounter_creation_input: encounter_creation_input,
    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)


120
121
122
123
124
125
126
127
# File 'lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation.rb', line 120

def self.validate_raw(obj:)
  obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
  obj.created_encounter_id&.is_a?(String) != false || raise("Passed value for field obj.created_encounter_id is not the expected type, validation failed.")
  obj.status.is_a?(CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureClaimCreationStatus) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
  obj.characteristics.is_a?(Hash) != false || raise("Passed value for field obj.characteristics is not the expected type, validation failed.")
  obj.errors.is_a?(Array) != false || raise("Passed value for field obj.errors is not the expected type, validation failed.")
  obj.encounter_creation_input.nil? || CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureData.validate_raw(obj: obj.encounter_creation_input)
end

Instance Method Details

#to_json(*_args) ⇒ String

Serialize an instance of ChargeCaptureClaimCreation to a JSON object

Returns:

  • (String)


110
111
112
# File 'lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation.rb', line 110

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