Class: CandidApiClient::Invoices::V2::Types::ClaimInvoiceItemInfo
- Inherits:
-
Object
- Object
- CandidApiClient::Invoices::V2::Types::ClaimInvoiceItemInfo
- Defined in:
- lib/candidhealth/invoices/v_2/types/claim_invoice_item_info.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #claim_invoice_item ⇒ CandidApiClient::Invoices::V2::Types::ClaimInvoiceItem readonly
- #service_line_invoice_items ⇒ Hash{String => CandidApiClient::Invoices::V2::Types::ServiceLineInvoiceItem} readonly
Class Method Summary collapse
-
.from_json(json_object:) ⇒ CandidApiClient::Invoices::V2::Types::ClaimInvoiceItemInfo
Deserialize a JSON object to an instance of ClaimInvoiceItemInfo.
-
.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(service_line_invoice_items:, claim_invoice_item: OMIT, additional_properties: nil) ⇒ CandidApiClient::Invoices::V2::Types::ClaimInvoiceItemInfo constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of ClaimInvoiceItemInfo to a JSON object.
Constructor Details
#initialize(service_line_invoice_items:, claim_invoice_item: OMIT, additional_properties: nil) ⇒ CandidApiClient::Invoices::V2::Types::ClaimInvoiceItemInfo
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/candidhealth/invoices/v_2/types/claim_invoice_item_info.rb', line 28 def initialize(service_line_invoice_items:, claim_invoice_item: OMIT, additional_properties: nil) @claim_invoice_item = claim_invoice_item if claim_invoice_item != OMIT @service_line_invoice_items = service_line_invoice_items @additional_properties = additional_properties @_field_set = { "claim_invoice_item": claim_invoice_item, "service_line_invoice_items": service_line_invoice_items }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
17 18 19 |
# File 'lib/candidhealth/invoices/v_2/types/claim_invoice_item_info.rb', line 17 def additional_properties @additional_properties end |
#claim_invoice_item ⇒ CandidApiClient::Invoices::V2::Types::ClaimInvoiceItem (readonly)
13 14 15 |
# File 'lib/candidhealth/invoices/v_2/types/claim_invoice_item_info.rb', line 13 def claim_invoice_item @claim_invoice_item end |
#service_line_invoice_items ⇒ Hash{String => CandidApiClient::Invoices::V2::Types::ServiceLineInvoiceItem} (readonly)
15 16 17 |
# File 'lib/candidhealth/invoices/v_2/types/claim_invoice_item_info.rb', line 15 def service_line_invoice_items @service_line_invoice_items end |
Class Method Details
.from_json(json_object:) ⇒ CandidApiClient::Invoices::V2::Types::ClaimInvoiceItemInfo
Deserialize a JSON object to an instance of ClaimInvoiceItemInfo
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/candidhealth/invoices/v_2/types/claim_invoice_item_info.rb', line 44 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) if parsed_json["claim_invoice_item"].nil? claim_invoice_item = nil else claim_invoice_item = parsed_json["claim_invoice_item"].to_json claim_invoice_item = CandidApiClient::Invoices::V2::Types::ClaimInvoiceItem.from_json(json_object: claim_invoice_item) end service_line_invoice_items = parsed_json["service_line_invoice_items"]&.transform_values do |value| value = value.to_json CandidApiClient::Invoices::V2::Types::ServiceLineInvoiceItem.from_json(json_object: value) end new( claim_invoice_item: claim_invoice_item, service_line_invoice_items: service_line_invoice_items, 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.
77 78 79 80 |
# File 'lib/candidhealth/invoices/v_2/types/claim_invoice_item_info.rb', line 77 def self.validate_raw(obj:) obj.claim_invoice_item.nil? || CandidApiClient::Invoices::V2::Types::ClaimInvoiceItem.validate_raw(obj: obj.claim_invoice_item) obj.service_line_invoice_items.is_a?(Hash) != false || raise("Passed value for field obj.service_line_invoice_items is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of ClaimInvoiceItemInfo to a JSON object
67 68 69 |
# File 'lib/candidhealth/invoices/v_2/types/claim_invoice_item_info.rb', line 67 def to_json(*_args) @_field_set&.to_json end |