Class: CandidApiClient::X12::V1::Types::RemittanceAdviceRemarkCode

Inherits:
Object
  • Object
show all
Defined in:
lib/candidhealth/x_12/v_1/types/remittance_advice_remark_code.rb

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reason_code:, additional_properties: nil) ⇒ CandidApiClient::X12::V1::Types::RemittanceAdviceRemarkCode

Parameters:



25
26
27
28
29
# File 'lib/candidhealth/x_12/v_1/types/remittance_advice_remark_code.rb', line 25

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



15
16
17
# File 'lib/candidhealth/x_12/v_1/types/remittance_advice_remark_code.rb', line 15

def additional_properties
  @additional_properties
end

#reason_codeCandidApiClient::X12::V1::Types::Rarc (readonly)



13
14
15
# File 'lib/candidhealth/x_12/v_1/types/remittance_advice_remark_code.rb', line 13

def reason_code
  @reason_code
end

Class Method Details

.from_json(json_object:) ⇒ CandidApiClient::X12::V1::Types::RemittanceAdviceRemarkCode

Deserialize a JSON object to an instance of RemittanceAdviceRemarkCode

Parameters:

  • json_object (String)

Returns:



35
36
37
38
39
# File 'lib/candidhealth/x_12/v_1/types/remittance_advice_remark_code.rb', line 35

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


54
55
56
# File 'lib/candidhealth/x_12/v_1/types/remittance_advice_remark_code.rb', line 54

def self.validate_raw(obj:)
  obj.reason_code.is_a?(CandidApiClient::X12::V1::Types::Rarc) != false || raise("Passed value for field obj.reason_code is not the expected type, validation failed.")
end

Instance Method Details

#to_json(*_args) ⇒ String

Serialize an instance of RemittanceAdviceRemarkCode to a JSON object

Returns:

  • (String)


44
45
46
# File 'lib/candidhealth/x_12/v_1/types/remittance_advice_remark_code.rb', line 44

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