Class: CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePostBilledChange

Inherits:
Object
  • Object
show all
Defined in:
lib/candidhealth/charge_capture/v_1/types/charge_capture_post_billed_change.rb

Overview

ChargeCapturePostBilledChange represents a change to a ChargeCapture that

occurred after the ChargeCapture's status moved to BILLED. Action must be taken
to resolve the update, and then the update should be marked as resolved.

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, message:, resolved:, additional_properties: nil) ⇒ CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePostBilledChange

Parameters:

  • id (String)
  • message (String)
  • resolved (Boolean)
  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



33
34
35
36
37
38
39
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_post_billed_change.rb', line 33

def initialize(id:, message:, resolved:, additional_properties: nil)
  @id = id
  @message = message
  @resolved = resolved
  @additional_properties = additional_properties
  @_field_set = { "id": id, "message": message, "resolved": resolved }
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



21
22
23
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_post_billed_change.rb', line 21

def additional_properties
  @additional_properties
end

#idString (readonly)

Returns:

  • (String)


15
16
17
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_post_billed_change.rb', line 15

def id
  @id
end

#messageString (readonly)

Returns:

  • (String)


17
18
19
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_post_billed_change.rb', line 17

def message
  @message
end

#resolvedBoolean (readonly)

Returns:

  • (Boolean)


19
20
21
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_post_billed_change.rb', line 19

def resolved
  @resolved
end

Class Method Details

.from_json(json_object:) ⇒ CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePostBilledChange

Deserialize a JSON object to an instance of ChargeCapturePostBilledChange



45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_post_billed_change.rb', line 45

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


71
72
73
74
75
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_post_billed_change.rb', line 71

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.message.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
  obj.resolved.is_a?(Boolean) != false || raise("Passed value for field obj.resolved is not the expected type, validation failed.")
end

Instance Method Details

#to_json(*_args) ⇒ String

Serialize an instance of ChargeCapturePostBilledChange to a JSON object

Returns:

  • (String)


61
62
63
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_post_billed_change.rb', line 61

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