Class: CandidApiClient::ServiceLines::V2::Types::ServiceLineEraData

Inherits:
Object
  • Object
show all
Defined in:
lib/candidhealth/service_lines/v_2/types/service_line_era_data.rb

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(service_line_adjustments:, remittance_advice_remark_codes:, additional_properties: nil) ⇒ CandidApiClient::ServiceLines::V2::Types::ServiceLineEraData

Parameters:



28
29
30
31
32
33
34
35
36
# File 'lib/candidhealth/service_lines/v_2/types/service_line_era_data.rb', line 28

def initialize(service_line_adjustments:, remittance_advice_remark_codes:, additional_properties: nil)
  @service_line_adjustments = service_line_adjustments
  @remittance_advice_remark_codes = remittance_advice_remark_codes
  @additional_properties = additional_properties
  @_field_set = {
    "service_line_adjustments": service_line_adjustments,
    "remittance_advice_remark_codes": remittance_advice_remark_codes
  }
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/service_lines/v_2/types/service_line_era_data.rb', line 17

def additional_properties
  @additional_properties
end

#remittance_advice_remark_codesArray<String> (readonly)

Returns:

  • (Array<String>)


15
16
17
# File 'lib/candidhealth/service_lines/v_2/types/service_line_era_data.rb', line 15

def remittance_advice_remark_codes
  @remittance_advice_remark_codes
end

#service_line_adjustmentsArray<CandidApiClient::ServiceLines::V2::Types::ServiceLineAdjustment> (readonly)



13
14
15
# File 'lib/candidhealth/service_lines/v_2/types/service_line_era_data.rb', line 13

def service_line_adjustments
  @service_line_adjustments
end

Class Method Details

.from_json(json_object:) ⇒ CandidApiClient::ServiceLines::V2::Types::ServiceLineEraData

Deserialize a JSON object to an instance of ServiceLineEraData

Parameters:

  • json_object (String)

Returns:



42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/candidhealth/service_lines/v_2/types/service_line_era_data.rb', line 42

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  service_line_adjustments = parsed_json["service_line_adjustments"]&.map do |item|
    item = item.to_json
    CandidApiClient::ServiceLines::V2::Types::ServiceLineAdjustment.from_json(json_object: item)
  end
  remittance_advice_remark_codes = struct["remittance_advice_remark_codes"]
  new(
    service_line_adjustments: service_line_adjustments,
    remittance_advice_remark_codes: remittance_advice_remark_codes,
    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)


70
71
72
73
# File 'lib/candidhealth/service_lines/v_2/types/service_line_era_data.rb', line 70

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

Instance Method Details

#to_json(*_args) ⇒ String

Serialize an instance of ServiceLineEraData to a JSON object

Returns:

  • (String)


60
61
62
# File 'lib/candidhealth/service_lines/v_2/types/service_line_era_data.rb', line 60

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