Class: CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureError
- Inherits:
-
Object
- Object
- CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureError
- Defined in:
- lib/candidhealth/charge_capture/v_1/types/charge_capture_error.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#charge_capture_id ⇒ String
readonly
The underlying Charge Capture that this error object references.
-
#claim_creation_id ⇒ String
readonly
The ID of the ChargeCaptureClaimCreation associated with this Error.
-
#field_in_error ⇒ String
readonly
The field of the corresponding underlying ChargeCapture that has a field that is failing validations, is not present but marked as required, or otherwise in error.
- #id ⇒ String readonly
-
#message ⇒ String
readonly
A human readable error explaining why this charge capture Claim Creation failed to create a claim.
-
#resolution_reason ⇒ String
readonly
A string denoting how or why an error was resolved.
-
#resolved ⇒ Boolean
readonly
Whether or not the error has been resolved as part of user workflows.
-
#resolved_by ⇒ String
readonly
A string denoting who resolved the error within candid’s system.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureError
Deserialize a JSON object to an instance of ChargeCaptureError.
-
.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.
Instance Method Summary collapse
- #initialize(id:, message:, claim_creation_id:, charge_capture_id: OMIT, resolved: OMIT, resolved_by: OMIT, resolution_reason: OMIT, field_in_error: OMIT, additional_properties: nil) ⇒ CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureError constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of ChargeCaptureError to a JSON object.
Constructor Details
#initialize(id:, message:, claim_creation_id:, charge_capture_id: OMIT, resolved: OMIT, resolved_by: OMIT, resolution_reason: OMIT, field_in_error: OMIT, additional_properties: nil) ⇒ CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureError
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_error.rb', line 59 def initialize(id:, message:, claim_creation_id:, charge_capture_id: OMIT, resolved: OMIT, resolved_by: OMIT, resolution_reason: OMIT, field_in_error: OMIT, additional_properties: nil) @id = id @charge_capture_id = charge_capture_id if charge_capture_id != OMIT = @resolved = resolved if resolved != OMIT @resolved_by = resolved_by if resolved_by != OMIT @resolution_reason = resolution_reason if resolution_reason != OMIT @field_in_error = field_in_error if field_in_error != OMIT @claim_creation_id = claim_creation_id @additional_properties = additional_properties @_field_set = { "id": id, "charge_capture_id": charge_capture_id, "message": , "resolved": resolved, "resolved_by": resolved_by, "resolution_reason": resolution_reason, "field_in_error": field_in_error, "claim_creation_id": claim_creation_id }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
35 36 37 |
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_error.rb', line 35 def additional_properties @additional_properties end |
#charge_capture_id ⇒ String (readonly)
Returns The underlying Charge Capture that this error object references. The Charge Capture referenced will be a part of the Claim Creation tied to this error. Errors may also refer to all charge_captures present in a Claim Creation, in which case this field will be null.
18 19 20 |
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_error.rb', line 18 def charge_capture_id @charge_capture_id end |
#claim_creation_id ⇒ String (readonly)
Returns The ID of the ChargeCaptureClaimCreation associated with this Error.
33 34 35 |
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_error.rb', line 33 def claim_creation_id @claim_creation_id end |
#field_in_error ⇒ String (readonly)
Returns The field of the corresponding underlying ChargeCapture that has a field that is failing validations, is not present but marked as required, or otherwise in error.
31 32 33 |
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_error.rb', line 31 def field_in_error @field_in_error end |
#id ⇒ String (readonly)
12 13 14 |
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_error.rb', line 12 def id @id end |
#message ⇒ String (readonly)
Returns A human readable error explaining why this charge capture Claim Creation failed to create a claim.
21 22 23 |
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_error.rb', line 21 def end |
#resolution_reason ⇒ String (readonly)
Returns A string denoting how or why an error was resolved.
27 28 29 |
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_error.rb', line 27 def resolution_reason @resolution_reason end |
#resolved ⇒ Boolean (readonly)
Returns Whether or not the error has been resolved as part of user workflows.
23 24 25 |
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_error.rb', line 23 def resolved @resolved end |
#resolved_by ⇒ String (readonly)
Returns A string denoting who resolved the error within candid’s system.
25 26 27 |
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_error.rb', line 25 def resolved_by @resolved_by end |
Class Method Details
.from_json(json_object:) ⇒ CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureError
Deserialize a JSON object to an instance of ChargeCaptureError
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_error.rb', line 88 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) id = struct["id"] charge_capture_id = struct["charge_capture_id"] = struct["message"] resolved = struct["resolved"] resolved_by = struct["resolved_by"] resolution_reason = struct["resolution_reason"] field_in_error = struct["field_in_error"] claim_creation_id = struct["claim_creation_id"] new( id: id, charge_capture_id: charge_capture_id, message: , resolved: resolved, resolved_by: resolved_by, resolution_reason: resolution_reason, field_in_error: field_in_error, claim_creation_id: claim_creation_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.
124 125 126 127 128 129 130 131 132 133 |
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_error.rb', line 124 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.charge_capture_id&.is_a?(String) != false || raise("Passed value for field obj.charge_capture_id is not the expected type, validation failed.") obj..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.") obj.resolved_by&.is_a?(String) != false || raise("Passed value for field obj.resolved_by is not the expected type, validation failed.") obj.resolution_reason&.is_a?(String) != false || raise("Passed value for field obj.resolution_reason is not the expected type, validation failed.") obj.field_in_error&.is_a?(String) != false || raise("Passed value for field obj.field_in_error is not the expected type, validation failed.") obj.claim_creation_id.is_a?(String) != false || raise("Passed value for field obj.claim_creation_id is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of ChargeCaptureError to a JSON object
114 115 116 |
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_error.rb', line 114 def to_json(*_args) @_field_set&.to_json end |