Class: CandidApiClient::InsuranceAdjudications::V1::Types::ServiceLineAdjudicationCreate
- Inherits:
-
Object
- Object
- CandidApiClient::InsuranceAdjudications::V1::Types::ServiceLineAdjudicationCreate
- Defined in:
- lib/candidhealth/insurance_adjudications/v_1/types/service_line_adjudication_create.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #carcs ⇒ Array<CandidApiClient::X12::V1::Types::ClaimAdjustmentReasonCode> readonly
- #coinsurance_amount_cents ⇒ Integer readonly
- #copay_amount_cents ⇒ Integer readonly
- #deductible_amount_cents ⇒ Integer readonly
-
#denial_reason ⇒ CandidApiClient::ServiceLines::V2::Types::DenialReasonContent
readonly
Will be treated as a denial if present.
- #insurance_allowed_amount_cents ⇒ Integer readonly
- #insurance_paid_amount_cents ⇒ Integer readonly
- #rarcs ⇒ Array<CandidApiClient::X12::V1::Types::RemittanceAdviceRemarkCode> readonly
Class Method Summary collapse
-
.from_json(json_object:) ⇒ CandidApiClient::InsuranceAdjudications::V1::Types::ServiceLineAdjudicationCreate
Deserialize a JSON object to an instance of ServiceLineAdjudicationCreate.
-
.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(carcs:, rarcs:, denial_reason: OMIT, insurance_allowed_amount_cents: OMIT, insurance_paid_amount_cents: OMIT, deductible_amount_cents: OMIT, coinsurance_amount_cents: OMIT, copay_amount_cents: OMIT, additional_properties: nil) ⇒ CandidApiClient::InsuranceAdjudications::V1::Types::ServiceLineAdjudicationCreate constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of ServiceLineAdjudicationCreate to a JSON object.
Constructor Details
#initialize(carcs:, rarcs:, denial_reason: OMIT, insurance_allowed_amount_cents: OMIT, insurance_paid_amount_cents: OMIT, deductible_amount_cents: OMIT, coinsurance_amount_cents: OMIT, copay_amount_cents: OMIT, additional_properties: nil) ⇒ CandidApiClient::InsuranceAdjudications::V1::Types::ServiceLineAdjudicationCreate
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/candidhealth/insurance_adjudications/v_1/types/service_line_adjudication_create.rb', line 48 def initialize(carcs:, rarcs:, denial_reason: OMIT, insurance_allowed_amount_cents: OMIT, insurance_paid_amount_cents: OMIT, deductible_amount_cents: OMIT, coinsurance_amount_cents: OMIT, copay_amount_cents: OMIT, additional_properties: nil) @denial_reason = denial_reason if denial_reason != OMIT @insurance_allowed_amount_cents = insurance_allowed_amount_cents if insurance_allowed_amount_cents != OMIT @insurance_paid_amount_cents = insurance_paid_amount_cents if insurance_paid_amount_cents != OMIT @deductible_amount_cents = deductible_amount_cents if deductible_amount_cents != OMIT @coinsurance_amount_cents = coinsurance_amount_cents if coinsurance_amount_cents != OMIT @copay_amount_cents = copay_amount_cents if copay_amount_cents != OMIT @carcs = carcs @rarcs = rarcs @additional_properties = additional_properties @_field_set = { "denial_reason": denial_reason, "insurance_allowed_amount_cents": insurance_allowed_amount_cents, "insurance_paid_amount_cents": insurance_paid_amount_cents, "deductible_amount_cents": deductible_amount_cents, "coinsurance_amount_cents": coinsurance_amount_cents, "copay_amount_cents": copay_amount_cents, "carcs": carcs, "rarcs": rarcs }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
31 32 33 |
# File 'lib/candidhealth/insurance_adjudications/v_1/types/service_line_adjudication_create.rb', line 31 def additional_properties @additional_properties end |
#carcs ⇒ Array<CandidApiClient::X12::V1::Types::ClaimAdjustmentReasonCode> (readonly)
27 28 29 |
# File 'lib/candidhealth/insurance_adjudications/v_1/types/service_line_adjudication_create.rb', line 27 def carcs @carcs end |
#coinsurance_amount_cents ⇒ Integer (readonly)
23 24 25 |
# File 'lib/candidhealth/insurance_adjudications/v_1/types/service_line_adjudication_create.rb', line 23 def coinsurance_amount_cents @coinsurance_amount_cents end |
#copay_amount_cents ⇒ Integer (readonly)
25 26 27 |
# File 'lib/candidhealth/insurance_adjudications/v_1/types/service_line_adjudication_create.rb', line 25 def copay_amount_cents @copay_amount_cents end |
#deductible_amount_cents ⇒ Integer (readonly)
21 22 23 |
# File 'lib/candidhealth/insurance_adjudications/v_1/types/service_line_adjudication_create.rb', line 21 def deductible_amount_cents @deductible_amount_cents end |
#denial_reason ⇒ CandidApiClient::ServiceLines::V2::Types::DenialReasonContent (readonly)
Returns Will be treated as a denial if present.
15 16 17 |
# File 'lib/candidhealth/insurance_adjudications/v_1/types/service_line_adjudication_create.rb', line 15 def denial_reason @denial_reason end |
#insurance_allowed_amount_cents ⇒ Integer (readonly)
17 18 19 |
# File 'lib/candidhealth/insurance_adjudications/v_1/types/service_line_adjudication_create.rb', line 17 def insurance_allowed_amount_cents @insurance_allowed_amount_cents end |
#insurance_paid_amount_cents ⇒ Integer (readonly)
19 20 21 |
# File 'lib/candidhealth/insurance_adjudications/v_1/types/service_line_adjudication_create.rb', line 19 def insurance_paid_amount_cents @insurance_paid_amount_cents end |
#rarcs ⇒ Array<CandidApiClient::X12::V1::Types::RemittanceAdviceRemarkCode> (readonly)
29 30 31 |
# File 'lib/candidhealth/insurance_adjudications/v_1/types/service_line_adjudication_create.rb', line 29 def rarcs @rarcs end |
Class Method Details
.from_json(json_object:) ⇒ CandidApiClient::InsuranceAdjudications::V1::Types::ServiceLineAdjudicationCreate
Deserialize a JSON object to an instance of ServiceLineAdjudicationCreate
77 78 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/insurance_adjudications/v_1/types/service_line_adjudication_create.rb', line 77 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) denial_reason = struct["denial_reason"] insurance_allowed_amount_cents = struct["insurance_allowed_amount_cents"] insurance_paid_amount_cents = struct["insurance_paid_amount_cents"] deductible_amount_cents = struct["deductible_amount_cents"] coinsurance_amount_cents = struct["coinsurance_amount_cents"] copay_amount_cents = struct["copay_amount_cents"] carcs = parsed_json["carcs"]&.map do |item| item = item.to_json CandidApiClient::X12::V1::Types::ClaimAdjustmentReasonCode.from_json(json_object: item) end rarcs = parsed_json["rarcs"]&.map do |item| item = item.to_json CandidApiClient::X12::V1::Types::RemittanceAdviceRemarkCode.from_json(json_object: item) end new( denial_reason: denial_reason, insurance_allowed_amount_cents: insurance_allowed_amount_cents, insurance_paid_amount_cents: insurance_paid_amount_cents, deductible_amount_cents: deductible_amount_cents, coinsurance_amount_cents: coinsurance_amount_cents, copay_amount_cents: copay_amount_cents, carcs: carcs, rarcs: rarcs, 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.
120 121 122 123 124 125 126 127 128 129 |
# File 'lib/candidhealth/insurance_adjudications/v_1/types/service_line_adjudication_create.rb', line 120 def self.validate_raw(obj:) obj.denial_reason&.is_a?(CandidApiClient::ServiceLines::V2::Types::DenialReasonContent) != false || raise("Passed value for field obj.denial_reason is not the expected type, validation failed.") obj.insurance_allowed_amount_cents&.is_a?(Integer) != false || raise("Passed value for field obj.insurance_allowed_amount_cents is not the expected type, validation failed.") obj.insurance_paid_amount_cents&.is_a?(Integer) != false || raise("Passed value for field obj.insurance_paid_amount_cents is not the expected type, validation failed.") obj.deductible_amount_cents&.is_a?(Integer) != false || raise("Passed value for field obj.deductible_amount_cents is not the expected type, validation failed.") obj.coinsurance_amount_cents&.is_a?(Integer) != false || raise("Passed value for field obj.coinsurance_amount_cents is not the expected type, validation failed.") obj.copay_amount_cents&.is_a?(Integer) != false || raise("Passed value for field obj.copay_amount_cents is not the expected type, validation failed.") obj.carcs.is_a?(Array) != false || raise("Passed value for field obj.carcs is not the expected type, validation failed.") obj.rarcs.is_a?(Array) != false || raise("Passed value for field obj.rarcs is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of ServiceLineAdjudicationCreate to a JSON object
110 111 112 |
# File 'lib/candidhealth/insurance_adjudications/v_1/types/service_line_adjudication_create.rb', line 110 def to_json(*_args) @_field_set&.to_json end |