Class: Candid::Internal::Types::Model Abstract

Inherits:
Object
  • Object
show all
Includes:
Type
Defined in:
lib/candid/internal/types/model.rb,
lib/candid/internal/types/model/field.rb

Overview

This class is abstract.

An abstract model that all data objects will inherit from

Direct Known Subclasses

Auth::Default::Types::AuthGetTokenRequest, Auth::Default::Types::AuthGetTokenResponse, Auth::Default::Types::InvalidContentTypeErrorType, Auth::Default::Types::TooManyRequestsErrorType, BillingNotes::V2::Types::BillingNote, BillingNotes::V2::Types::BillingNoteBase, BillingNotes::V2::Types::BillingNoteBaseOptional, BillingNotes::V2::Types::BillingNoteUpdate, BillingNotes::V2::Types::StandaloneBillingNoteCreate, ChargeCapture::V1::Types::ChargeCapture, ChargeCapture::V1::Types::ChargeCaptureData, ChargeCapture::V1::Types::ChargeCaptureError, ChargeCapture::V1::Types::ChargeCapturePage, ChargeCapture::V1::Types::ChargeCapturePostBilledChange, ChargeCapture::V1::Types::ChargeCapturePostBilledChangeUpdate, ChargeCapture::V1::Types::ChargeCaptureUpdate, ChargeCapture::V1::Types::ChargeExternalIdConflictErrorMessage, ChargeCapture::V1::Types::CreateChargeCaptureFromPreEncounterRequest, ChargeCapture::V1::Types::CreateChargeCaptureRequest, ChargeCapture::V1::Types::GetAllChargeCapturesRequest, ChargeCaptureBundles::V1::Types::ChargeCaptureBundleErrorResolution, ChargeCaptureBundles::V1::Types::ChargeCaptureClaimCreation, ChargeCaptureBundles::V1::Types::ChargeCaptureClaimCreationPage, ChargeCaptureBundles::V1::Types::ChargeCaptureClaimCreationSummary, ChargeCaptureBundles::V1::Types::GetAllChargeCaptureClaimCreationsRequest, ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate, ClaimSubmission::V1::Types::ClaimSubmissionRecordCreateOptional, ClaimSubmission::V1::Types::ExternalClaimSubmissionCreate, ClaimSubmission::V1::Types::ExternalClaimSubmissionCreateOptional, Claims::Types::Claim, ClinicalTrials::V1::Types::ClinicalTrial, ClinicalTrials::V1::Types::MutableClinicalTrial, Commons::Types::DateRangeOptionalEnd, Commons::Types::EntityConflictErrorMessage, Commons::Types::EntityNotFoundErrorMessage, Commons::Types::HttpServiceUnavailableErrorMessage, Commons::Types::OrganizationNotAuthorizedErrorMessage, Commons::Types::PhoneNumber, Commons::Types::PhoneNumberOptional, Commons::Types::RegionNational, Commons::Types::RegionStates, Commons::Types::Regions, Commons::Types::RemovableDateRangeOptionalEnd, Commons::Types::RequestValidationError, Commons::Types::ResourcePage, Commons::Types::StreetAddressBase, Commons::Types::StreetAddressLongZip, Commons::Types::StreetAddressLongZipOptional, Commons::Types::StreetAddressOptionalBase, Commons::Types::StreetAddressShortZip, Commons::Types::StreetAddressShortZipOptional, Commons::Types::UnauthorizedErrorMessage, Commons::Types::UnprocessableEntityErrorMessage, Commons::Types::UpdatesDisabledDueToExternalSystemIntegrationErrorMessage, Contracts::V2::Types::AuthorizedSignatory, Contracts::V2::Types::AuthorizedSignatoryUpdate, Contracts::V2::Types::Contract, Contracts::V2::Types::ContractBase, Contracts::V2::Types::ContractCreate, Contracts::V2::Types::ContractInvalidExpirationDateError, Contracts::V2::Types::ContractIsLinkedToFeeScheduleError, Contracts::V2::Types::ContractUpdate, Contracts::V2::Types::ContractWithProviders, Contracts::V2::Types::ContractsPage, Contracts::V2::Types::DateUpdate, Contracts::V2::Types::GetMultiContractsRequest, Contracts::V2::Types::InsuranceTypes, Contracts::V2::Types::RegionsUpdate, Credentialing::V2::Types::BaseCredentialingSpan, Credentialing::V2::Types::FacilityCredentialingSpan, Credentialing::V2::Types::FacilityCredentialingSpanCreate, Credentialing::V2::Types::FacilityCredentialingSpanPage, Credentialing::V2::Types::FacilityCredentialingSpanUpdate, Credentialing::V2::Types::GetAllFacilityCredentialingSpansRequest, Credentialing::V2::Types::GetAllProviderCredentialingSpansRequest, Credentialing::V2::Types::ProviderCredentialingSpan, Credentialing::V2::Types::ProviderCredentialingSpanCreate, Credentialing::V2::Types::ProviderCredentialingSpanPage, Credentialing::V2::Types::ProviderCredentialingSpanUpdate, CustomSchemas::V1::Types::KeyWithNameAlreadyExistsError, CustomSchemas::V1::Types::Schema, CustomSchemas::V1::Types::SchemaCreate, CustomSchemas::V1::Types::SchemaField, CustomSchemas::V1::Types::SchemaGetMultiResponse, CustomSchemas::V1::Types::SchemaInstance, CustomSchemas::V1::Types::SchemaInstanceOptional, CustomSchemas::V1::Types::SchemaUpdate, CustomSchemas::V1::Types::SchemaValidationError, CustomSchemas::V1::Types::SchemaValidationFailure, CustomSchemas::V1::Types::SchemaWithNameAlreadyExistsError, Diagnoses::Types::Diagnosis, Diagnoses::Types::DiagnosisCreate, Diagnoses::Types::DiagnosisCreateOptional, Diagnoses::Types::DiagnosisNotFoundError, Diagnoses::Types::DiagnosisUpdate, Diagnoses::Types::DisallowMultiplePrimaryDiagnosisError, Diagnoses::Types::ServiceLinesMustHaveAtLeastOneDiagnosisError, Diagnoses::Types::StandaloneDiagnosisCreate, EncounterAttachments::V1::Types::BaseAttachment, EncounterAttachments::V1::Types::CreateAttachmentRequest, EncounterAttachments::V1::Types::CreateAttachmentV2Request, EncounterAttachments::V1::Types::DeleteAttachmentRequest, EncounterAttachments::V1::Types::EncounterAttachment, EncounterProviders::V2::Types::BillingProvider, EncounterProviders::V2::Types::BillingProviderUpdate, EncounterProviders::V2::Types::BillingProviderUpdateWithOptionalAddress, EncounterProviders::V2::Types::EncounterProvider, EncounterProviders::V2::Types::EncounterProviderBase, EncounterProviders::V2::Types::InitialReferringProvider, EncounterProviders::V2::Types::InitialReferringProviderUpdate, EncounterProviders::V2::Types::InitialReferringProviderUpdateWithOptionalAddress, EncounterProviders::V2::Types::OrderingProvider, EncounterProviders::V2::Types::OrderingProviderOptional, EncounterProviders::V2::Types::OrderingProviderUpdate, EncounterProviders::V2::Types::ReferringProvider, EncounterProviders::V2::Types::ReferringProviderUpdate, EncounterProviders::V2::Types::ReferringProviderUpdateWithOptionalAddress, EncounterProviders::V2::Types::RenderingProvider, EncounterProviders::V2::Types::RenderingProviderUpdate, EncounterProviders::V2::Types::RenderingProviderUpdateWithOptionalAddress, EncounterProviders::V2::Types::SupervisingProvider, EncounterProviders::V2::Types::SupervisingProviderUpdate, EncounterProviders::V2::Types::SupervisingProviderUpdateWithOptionalAddress, EncounterSupplementalInformation::V1::Types::CreateSupplementalInformationRequest, EncounterSupplementalInformation::V1::Types::SupplementalInformation, EncounterSupplementalInformation::V1::Types::UpdateSupplementalInformationRequest, Encounters::V4::Types::CashPayPayerErrorMessage, Encounters::V4::Types::ClaimSupplementalInformation, Encounters::V4::Types::ClaimSupplementalInformationOptional, Encounters::V4::Types::ClinicalNote, Encounters::V4::Types::ClinicalNoteCategory, Encounters::V4::Types::ClinicalNoteCategoryCreate, Encounters::V4::Types::ClinicalNoteCategoryCreateOptional, Encounters::V4::Types::ClinicalNoteOptional, Encounters::V4::Types::Encounter, Encounters::V4::Types::EncounterBase, Encounters::V4::Types::EncounterCreate, Encounters::V4::Types::EncounterCreateFromPreEncounter, Encounters::V4::Types::EncounterDeepOptional, Encounters::V4::Types::EncounterExternalIdUniquenessErrorType, Encounters::V4::Types::EncounterGuarantorMissingContactInfoErrorType, Encounters::V4::Types::EncounterOptional, Encounters::V4::Types::EncounterPage, Encounters::V4::Types::EncounterPatientControlNumberUniquenessErrorType, Encounters::V4::Types::EncounterRenderingOrAttendingProviderRequiredError, Encounters::V4::Types::EncounterUpdate, Encounters::V4::Types::EpsdtReferral, Encounters::V4::Types::EpsdtReferralOptional, Encounters::V4::Types::GetAllEncountersRequest, Encounters::V4::Types::IntakeFollowUp, Encounters::V4::Types::IntakeQuestion, Encounters::V4::Types::IntakeQuestionOptional, Encounters::V4::Types::IntakeResponseAndFollowUps, Encounters::V4::Types::Intervention, Encounters::V4::Types::InterventionOptional, Encounters::V4::Types::InvalidTagNamesErrorType, Encounters::V4::Types::KeyDoesNotExistError, Encounters::V4::Types::Lab, Encounters::V4::Types::LabOptional, Encounters::V4::Types::Medication, Encounters::V4::Types::MedicationOptional, Encounters::V4::Types::MultipleInstancesForSchemaError, Encounters::V4::Types::PatientHistoryCategory, Encounters::V4::Types::PatientHistoryCategoryOptional, Encounters::V4::Types::PayerPlanGroupPayerDoesNotMatchInsuranceCardError, Encounters::V4::Types::SchemaDoesNotExistError, Encounters::V4::Types::SchemaInstanceValidationError, Encounters::V4::Types::SchemaInstanceValidationFailure, Encounters::V4::Types::SchemaUnauthorizedAccessError, Encounters::V4::Types::ValueDoesNotMatchKeyTypeError, Encounters::V4::Types::Vitals, Encounters::V4::Types::VitalsUpdate, EncountersUniversal::Types::UniversalEncounterCreate, EncountersUniversal::Types::UniversalEncounterCreateBase, EncountersUniversal::Types::UniversalEncounterCreateFromPreEncounter, EncountersUniversal::Types::UniversalEncounterCreateFromPreEncounterBase, EncountersUniversal::Types::UniversalEncounterUpdate, EncountersUniversal::Types::UniversalEncounterUpdateBase, Era::Types::Era, Era::Types::EraBase, ExpectedNetworkStatus::V1::Types::ExpectedNetworkStatusRequest, ExpectedNetworkStatus::V1::Types::ExpectedNetworkStatusResponse, ExpectedNetworkStatus::V2::Types::ComputeAllInNetworkProvidersRequest, ExpectedNetworkStatus::V2::Types::ComputeAllInNetworkProvidersResponse, ExpectedNetworkStatus::V2::Types::ComputeAllInNetworkRenderingProvidersResult, ExpectedNetworkStatus::V2::Types::EmptyObject, ExpectedNetworkStatus::V2::Types::ExpectedNetworkStatusCheckErrorMessage, ExpectedNetworkStatus::V2::Types::ExpectedNetworkStatusRequestV2, ExpectedNetworkStatus::V2::Types::ExpectedNetworkStatusResponseV2, ExpectedNetworkStatus::V2::Types::ExpectedNetworkStatusSubscriberInformation, ExpectedNetworkStatus::V2::Types::ExpectedNetworkStatusV2, ExpectedNetworkStatus::V2::Types::InNetworkRenderingProvidersDetail, ExpectedNetworkStatus::V2::Types::InNetworkStatus, ExpectedNetworkStatus::V2::Types::IndeterminateNetworkStatus, ExpectedNetworkStatus::V2::Types::InsuranceType, ExpectedNetworkStatus::V2::Types::InsuranceTypeCodes, ExpectedNetworkStatus::V2::Types::OutOfNetworkStatus, Exports::V3::Types::GetExportsRequest, Exports::V3::Types::GetExportsResponse, ExternalPaymentAccountConfig::V1::Types::ExternalPaymentAccountConfig, ExternalPaymentAccountConfig::V1::Types::ExternalPaymentAccountConfigPage, ExternalPaymentAccountConfig::V1::Types::GetExternalPaymentAccountConfigsRequest, FeeSchedules::V3::Types::DimensionMatch, FeeSchedules::V3::Types::Dimensions, FeeSchedules::V3::Types::DimensionsPage, FeeSchedules::V3::Types::FeeScheduleUploadRequest, FeeSchedules::V3::Types::GetMultiRequest, FeeSchedules::V3::Types::GetUniqueDimensionValuesRequest, FeeSchedules::V3::Types::HardDeleteRatesByIdsRequest, FeeSchedules::V3::Types::MatchCptCode, FeeSchedules::V3::Types::MatchDate, FeeSchedules::V3::Types::MatchFacilityTypeCode, FeeSchedules::V3::Types::MatchGeo, FeeSchedules::V3::Types::MatchLicenseType, FeeSchedules::V3::Types::MatchModifiers, FeeSchedules::V3::Types::MatchNetworkTypes, FeeSchedules::V3::Types::MatchPayer, FeeSchedules::V3::Types::MatchPayerPlanGroups, FeeSchedules::V3::Types::MatchProvider, FeeSchedules::V3::Types::MatchResult, FeeSchedules::V3::Types::MatchTestResult, FeeSchedules::V3::Types::NewRate, FeeSchedules::V3::Types::NewRateVersion, FeeSchedules::V3::Types::OptionalDimensions, FeeSchedules::V3::Types::OverlappingRateEntriesError, FeeSchedules::V3::Types::PayerPlanGroupDoesNotMatchRatePayerError, FeeSchedules::V3::Types::PayerThreshold, FeeSchedules::V3::Types::PayerThresholdGetRequest, FeeSchedules::V3::Types::PayerThresholdsPage, FeeSchedules::V3::Types::Rate, FeeSchedules::V3::Types::RateEntry, FeeSchedules::V3::Types::RateUpload, FeeSchedules::V3::Types::RateUploadWithPossibleErrors, FeeSchedules::V3::Types::RatesPage, FeeSchedules::V3::Types::ThresholdMatch, FeeSchedules::V3::Types::ValidationError, Financials::Types::Allocation, Financials::Types::AllocationCreate, Financials::Types::AllocationTarget, Financials::Types::AllocationTargetCreate, Financials::Types::AppointmentAllocationTarget, Financials::Types::AppointmentByIdAndPatientExternalId, Financials::Types::BillingProviderAllocationTarget, Financials::Types::ClaimAllocationTarget, Financials::Types::InvoiceUpdate, Financials::Types::NoteUpdate, Financials::Types::RefundReasonUpdate, Financials::Types::ServiceLineAllocationTarget, Guarantor::V1::Types::EncounterHasExistingGuarantorErrorType, Guarantor::V1::Types::Guarantor, Guarantor::V1::Types::GuarantorBase, Guarantor::V1::Types::GuarantorCreate, Guarantor::V1::Types::GuarantorOptional, Guarantor::V1::Types::GuarantorUpdate, HealthCareCodeInformation::V1::Types::AdmittingDiagnosis, HealthCareCodeInformation::V1::Types::AdmittingDiagnosisNew, HealthCareCodeInformation::V1::Types::ConditionInformation, HealthCareCodeInformation::V1::Types::ConditionInformationNew, HealthCareCodeInformation::V1::Types::DiagnosisRelatedGroup, HealthCareCodeInformation::V1::Types::DiagnosisRelatedGroupNew, HealthCareCodeInformation::V1::Types::ExternalCauseOfInjury, HealthCareCodeInformation::V1::Types::ExternalCauseOfInjuryNew, HealthCareCodeInformation::V1::Types::HealthCareCodeInformation, HealthCareCodeInformation::V1::Types::HealthCareCodeInformationCreate, HealthCareCodeInformation::V1::Types::HealthCareCodeInformationGetAllResponse, HealthCareCodeInformation::V1::Types::HealthCareCodeInformationNew, HealthCareCodeInformation::V1::Types::HealthCareCodeInformationUpdate, HealthCareCodeInformation::V1::Types::OccurrenceInformation, HealthCareCodeInformation::V1::Types::OccurrenceInformationNew, HealthCareCodeInformation::V1::Types::OccurrenceSpanInformation, HealthCareCodeInformation::V1::Types::OccurrenceSpanInformationNew, HealthCareCodeInformation::V1::Types::OtherDiagnosisInformation, HealthCareCodeInformation::V1::Types::OtherDiagnosisInformationNew, HealthCareCodeInformation::V1::Types::OtherProcedureInformation, HealthCareCodeInformation::V1::Types::OtherProcedureInformationNew, HealthCareCodeInformation::V1::Types::PatientReasonForVisit, HealthCareCodeInformation::V1::Types::PatientReasonForVisitNew, HealthCareCodeInformation::V1::Types::PrincipalDiagnosis, HealthCareCodeInformation::V1::Types::PrincipalDiagnosisNew, HealthCareCodeInformation::V1::Types::PrincipalProcedureInformation, HealthCareCodeInformation::V1::Types::PrincipalProcedureInformationNew, HealthCareCodeInformation::V1::Types::Rd8Date, HealthCareCodeInformation::V1::Types::SetOrClearAdmittingDiagnosis, HealthCareCodeInformation::V1::Types::SetOrClearDiagnosisRelatedGroup, HealthCareCodeInformation::V1::Types::SetOrClearPrincipalDiagnosis, HealthCareCodeInformation::V1::Types::SetOrClearPrincipalProcedureInformation, HealthCareCodeInformation::V1::Types::TreatmentCodeInformation, HealthCareCodeInformation::V1::Types::TreatmentCodeInformationNew, HealthCareCodeInformation::V1::Types::ValueInformation, HealthCareCodeInformation::V1::Types::ValueInformationNew, Candid::Identifiers::Types::Identifier, Candid::Identifiers::Types::IdentifierBase, Candid::Identifiers::Types::IdentifierCreate, Candid::Identifiers::Types::IdentifierUpdate, Candid::Identifiers::Types::IdentifierValue, Candid::Identifiers::Types::MedicaidProviderIdentifier, Candid::Identifiers::Types::MedicareProviderIdentifier, Candid::Identifiers::Types::UpdatableIdentifier, Candid::ImportInvoice::V1::Types::CreateImportInvoiceRequest, Candid::ImportInvoice::V1::Types::ImportInvoice, Candid::ImportInvoice::V1::Types::ImportInvoiceUpdateRequest, Candid::ImportInvoice::V1::Types::ImportInvoicesPage, Candid::ImportInvoice::V1::Types::InvoiceItemInfoUpdate, Candid::ImportInvoice::V1::Types::SearchImportedInvoicesRequest, Candid::Individual::Types::IndividualBase, Candid::Individual::Types::IndividualBaseOptional, Candid::Individual::Types::Patient, Candid::Individual::Types::PatientBase, Candid::Individual::Types::PatientClinicalTrialInfo, Candid::Individual::Types::PatientClinicalTrialInfoCreate, Candid::Individual::Types::PatientCreate, Candid::Individual::Types::PatientNonInsurancePayerInfo, Candid::Individual::Types::PatientNonInsurancePayerInfoCreate, Candid::Individual::Types::PatientNonInsurancePayerInfoCreateOptional, Candid::Individual::Types::PatientUpdate, Candid::Individual::Types::PatientUpdateWithOptionalAddress, Candid::Individual::Types::Subscriber, Candid::Individual::Types::SubscriberBase, Candid::Individual::Types::SubscriberBaseOptional, Candid::Individual::Types::SubscriberCreate, Candid::Individual::Types::SubscriberCreateOptional, Candid::InsuranceCards::V2::Types::InsuranceCard, Candid::InsuranceCards::V2::Types::InsuranceCardBase, Candid::InsuranceCards::V2::Types::InsuranceCardCreate, Candid::InsuranceCards::V2::Types::InsuranceCardCreateOptional, Candid::InsurancePayments::V1::Types::GetMultiInsurancePaymentRequest, Candid::InsurancePayments::V1::Types::InsurancePayment, Candid::InsurancePayments::V1::Types::InsurancePaymentsPage, Candid::InsuranceRefunds::V1::Types::GetMultiInsuranceRefundsRequest, Candid::InsuranceRefunds::V1::Types::InsuranceRefund, Candid::InsuranceRefunds::V1::Types::InsuranceRefundCreate, Candid::InsuranceRefunds::V1::Types::InsuranceRefundUpdate, Candid::InsuranceRefunds::V1::Types::InsuranceRefundsPage, Candid::Invoices::Types::Invoice, Candid::Invoices::Types::InvoiceItem, Candid::Invoices::V2::Types::ClaimInvoiceItem, Candid::Invoices::V2::Types::ClaimInvoiceItemInfo, Candid::Invoices::V2::Types::Invoice, Candid::Invoices::V2::Types::InvoiceDestinationMetadata, Candid::Invoices::V2::Types::InvoiceInfo, Candid::Invoices::V2::Types::InvoiceItemAttributionCreate, Candid::Invoices::V2::Types::InvoiceItemCreate, Candid::Invoices::V2::Types::InvoiceItemInfo, Candid::Invoices::V2::Types::ServiceLineInvoiceItem, Candid::Invoices::V2::Types::UnattributedInvoiceItem, MedicationDispense::V1::Types::MedicationDispenseCreate, NonInsurancePayerPayments::V1::Types::GetMultiNonInsurancePayerPaymentRequest, NonInsurancePayerPayments::V1::Types::NonInsurancePayerPayment, NonInsurancePayerPayments::V1::Types::NonInsurancePayerPaymentCreate, NonInsurancePayerPayments::V1::Types::NonInsurancePayerPaymentsPage, NonInsurancePayerPayments::V1::Types::UpdateNonInsurancePayerPaymentRequest, NonInsurancePayerRefunds::V1::Types::GetMultiNonInsurancePayerRefundsRequest, NonInsurancePayerRefunds::V1::Types::NonInsurancePayerRefund, NonInsurancePayerRefunds::V1::Types::NonInsurancePayerRefundCreate, NonInsurancePayerRefunds::V1::Types::NonInsurancePayerRefundUpdate, NonInsurancePayerRefunds::V1::Types::NonInsurancePayerRefundsPage, NonInsurancePayers::V1::Types::CreateNonInsurancePayerRequest, NonInsurancePayers::V1::Types::GetMultiNonInsurancePayersRequest, NonInsurancePayers::V1::Types::GetNonInsurancePayersCategoriesRequest, NonInsurancePayers::V1::Types::NonInsurancePayer, NonInsurancePayers::V1::Types::NonInsurancePayerAddressUpdate, NonInsurancePayers::V1::Types::NonInsurancePayerCategoriesPage, NonInsurancePayers::V1::Types::NonInsurancePayerCategoryUpdate, NonInsurancePayers::V1::Types::NonInsurancePayerDescriptionUpdate, NonInsurancePayers::V1::Types::NonInsurancePayerPage, NonInsurancePayers::V1::Types::NonInsurancePayerUpdateRequest, NonInsurancePayers::V1::Types::ToggleNonInsurancePayerEnablementRequest, OrganizationProviders::V2::Types::OrganizationProvider, OrganizationProviders::V2::Types::OrganizationProviderAddress, OrganizationProviders::V2::Types::OrganizationProviderBase, OrganizationProviders::V3::Types::GetAllOrganizationProvidersRequestV2, OrganizationProviders::V3::Types::OrganizationProviderCreateV2, OrganizationProviders::V3::Types::OrganizationProviderPageV2, OrganizationProviders::V3::Types::OrganizationProviderUpdateV2, OrganizationProviders::V3::Types::OrganizationProviderV2, OrganizationServiceFacilities::V2::Types::GetAllOrganizationServiceFacilitiesRequest, OrganizationServiceFacilities::V2::Types::OrganizationServiceFacility, OrganizationServiceFacilities::V2::Types::OrganizationServiceFacilityCreate, OrganizationServiceFacilities::V2::Types::OrganizationServiceFacilityPage, OrganizationServiceFacilities::V2::Types::OrganizationServiceFacilityUpdate, PatientAr::V1::Types::GetInventoryRecordsRequest, PatientAr::V1::Types::InsuranceAdjustmentInfo, PatientAr::V1::Types::InsurancePaymentInfo, PatientAr::V1::Types::InvalidFiltersErrorType, PatientAr::V1::Types::InventoryRecord, PatientAr::V1::Types::InvoiceItemizationResponse, PatientAr::V1::Types::ListInventoryPagedResponse, PatientAr::V1::Types::NonInsuranceAdjustmentInfo, PatientAr::V1::Types::NonInsurancePaymentInfo, PatientAr::V1::Types::PatientAdjustmentInfo, PatientAr::V1::Types::PatientPaymentAllocation, PatientAr::V1::Types::PatientPaymentInfo, PatientAr::V1::Types::ServiceLineItemization, PatientPayments::V3::Types::PatientPayment, PatientPayments::V4::Types::GetMultiPatientPaymentsRequest, PatientPayments::V4::Types::PatientPayment, PatientPayments::V4::Types::PatientPaymentCreate, PatientPayments::V4::Types::PatientPaymentUpdate, PatientPayments::V4::Types::PatientPaymentsPage, PatientRefunds::V1::Types::GetMultiPatientRefundsRequest, PatientRefunds::V1::Types::PatientRefund, PatientRefunds::V1::Types::PatientRefundCreate, PatientRefunds::V1::Types::PatientRefundUpdate, PatientRefunds::V1::Types::PatientRefundsPage, PayerPlanGroups::V1::Types::MutablePayerPlanGroup, PayerPlanGroups::V1::Types::PayerPlanGroup, PayerPlanGroups::V1::Types::PayerPlanGroupAlreadyExistsError, PayerPlanGroups::V1::Types::PayerPlanGroupGetMultiRequest, PayerPlanGroups::V1::Types::PayerPlanGroupPage, Payers::V3::Types::GetAllPayersRequest, Payers::V3::Types::Payer, Payers::V3::Types::PayerIdentifier, Payers::V3::Types::PayerInfo, Payers::V3::Types::PayerPage, Payers::V4::Types::ClearinghousePayerInfo, Payers::V4::Types::GetAllPayersRequest, Payers::V4::Types::Payer, Payers::V4::Types::PayerIds, Payers::V4::Types::PayerPage, Payers::V4::Types::PrimaryPayerIds, PreEncounter::Appointments::V1::Types::Appointment, PreEncounter::Appointments::V1::Types::AppointmentScanRequest, PreEncounter::Appointments::V1::Types::MutableAppointment, PreEncounter::Appointments::V1::Types::Service, PreEncounter::Appointments::V1::Types::Visit, PreEncounter::Appointments::V1::Types::VisitsPage, PreEncounter::Appointments::V1::Types::VisitsRequest, PreEncounter::Common::Types::AdditionalPayerInformation, PreEncounter::Common::Types::Address, PreEncounter::Common::Types::BaseModel, PreEncounter::Common::Types::CanonicalClinicalTrialAssociation, PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation, PreEncounter::Common::Types::ContactPoint, PreEncounter::Common::Types::ErrorBase4Xx, PreEncounter::Common::Types::ExternalIdentifier, PreEncounter::Common::Types::ExternalProvider, PreEncounter::Common::Types::HumanName, PreEncounter::Common::Types::PatientServiceFacility, PreEncounter::Common::Types::Period, PreEncounter::Common::Types::ResourcePage, PreEncounter::Common::Types::VersionConflictErrorBody, PreEncounter::Coverages::V1::Types::Address, PreEncounter::Coverages::V1::Types::BenefitsRelatedEntity, PreEncounter::Coverages::V1::Types::CheckEligibilityRequest, PreEncounter::Coverages::V1::Types::Coverage, PreEncounter::Coverages::V1::Types::CoverageBenefits, PreEncounter::Coverages::V1::Types::CoverageDetails, PreEncounter::Coverages::V1::Types::CoverageEligibilityCheckResponse, PreEncounter::Coverages::V1::Types::CoverageGetMultiPaginatedRequest, PreEncounter::Coverages::V1::Types::CoverageGetMultiRequest, PreEncounter::Coverages::V1::Types::CoverageScanRequest, PreEncounter::Coverages::V1::Types::CoverageValue, PreEncounter::Coverages::V1::Types::CoveragesPage, PreEncounter::Coverages::V1::Types::ExpandedMemberInfo, PreEncounter::Coverages::V1::Types::InsurancePlan, PreEncounter::Coverages::V1::Types::LatestEligibilityCheck, PreEncounter::Coverages::V1::Types::MemberInfo, PreEncounter::Coverages::V1::Types::MutableCoverage, PreEncounter::Coverages::V1::Types::PayerPlanGroupFields, PreEncounter::Coverages::V1::Types::PlanCoverage, PreEncounter::Coverages::V1::Types::PlanCoverageDetails, PreEncounter::Coverages::V1::Types::PlanDate, PreEncounter::Coverages::V1::Types::PlanMetadata, PreEncounter::Coverages::V1::Types::RelatedEntityContact, PreEncounter::Coverages::V1::Types::ServiceCoverage, PreEncounter::Coverages::V1::Types::ServiceCoverageDetails, PreEncounter::Coverages::V1::Types::Subscriber, PreEncounter::EligibilityChecks::V1::Types::BatchEligibilityPollRequest, PreEncounter::EligibilityChecks::V1::Types::BatchEligibilityResponse, PreEncounter::EligibilityChecks::V1::Types::CoordinationOfBenefitsRecommendation, PreEncounter::EligibilityChecks::V1::Types::EligibilityCheck, PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckError, PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckErrorDetails, PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata, PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckPage, PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendation, PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPatientInfo, PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPayload, PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationRequest, PreEncounter::EligibilityChecks::V1::Types::EligibilityRequest, PreEncounter::EligibilityChecks::V1::Types::Encounter, PreEncounter::EligibilityChecks::V1::Types::IndividualProvider, PreEncounter::EligibilityChecks::V1::Types::MedicareAdvantageRecommendation, PreEncounter::EligibilityChecks::V1::Types::MedicareAdvantageRecommendationPayload, PreEncounter::EligibilityChecks::V1::Types::OrganizationProvider, PreEncounter::EligibilityChecks::V1::Types::ParsedResponse, PreEncounter::EligibilityChecks::V1::Types::PayerSearchRequest, PreEncounter::EligibilityChecks::V1::Types::PayerSearchResponse, PreEncounter::EligibilityChecks::V1::Types::PostEligibilityRecommendationRequest, PreEncounter::EligibilityChecks::V1::Types::RequestCorrection, PreEncounter::EligibilityChecks::V1::Types::StediPayer, PreEncounter::EligibilityChecks::V1::Types::StediPayerItem, PreEncounter::Images::V1::Types::CoverageAssociation, PreEncounter::Images::V1::Types::Image, PreEncounter::Images::V1::Types::ImageGetMultiRequest, PreEncounter::Images::V1::Types::MutableImage, PreEncounter::Images::V1::Types::PatientAssociation, PreEncounter::Lists::V1::Types::AppointmentListItem, PreEncounter::Lists::V1::Types::AppointmentListPage, PreEncounter::Lists::V1::Types::AppointmentsGetListRequest, PreEncounter::Lists::V1::Types::PatientListItem, PreEncounter::Lists::V1::Types::PatientListPage, PreEncounter::Lists::V1::Types::PatientListRequest, PreEncounter::Notes::V1::Types::MutableNote, PreEncounter::Notes::V1::Types::Note, PreEncounter::Patients::V1::Types::Authorization, PreEncounter::Patients::V1::Types::Contact, PreEncounter::Patients::V1::Types::CreatePatientRequest, PreEncounter::Patients::V1::Types::CreatePatientWithMrnRequest, PreEncounter::Patients::V1::Types::ExternalProvenance, PreEncounter::Patients::V1::Types::FilingOrder, PreEncounter::Patients::V1::Types::Guarantor, PreEncounter::Patients::V1::Types::InferredPatientMetadata, PreEncounter::Patients::V1::Types::MutablePatient, PreEncounter::Patients::V1::Types::MutablePatientWithMrn, PreEncounter::Patients::V1::Types::OriginationDetail, PreEncounter::Patients::V1::Types::Patient, PreEncounter::Patients::V1::Types::PatientGetMultiRequest, PreEncounter::Patients::V1::Types::PatientPage, PreEncounter::Patients::V1::Types::PatientScanRequest, PreEncounter::Patients::V1::Types::PatientsSearchRequestPaginated, PreEncounter::Patients::V1::Types::Referral, PreEncounter::Patients::V1::Types::SearchProvidersRequest, PreEncounter::Tags::V1::Types::GetAllTagsRequest, PreEncounter::Tags::V1::Types::MutableTag, PreEncounter::Tags::V1::Types::Tag, PreEncounter::Tags::V1::Types::TagPage, ServiceFacility::Types::EncounterServiceFacility, ServiceFacility::Types::EncounterServiceFacilityBase, ServiceFacility::Types::EncounterServiceFacilityUpdate, ServiceFacility::Types::EncounterServiceFacilityUpdateWithOptionalAddress, ServiceLines::V2::Types::DrugIdentification, ServiceLines::V2::Types::DrugIdentificationOptional, ServiceLines::V2::Types::ServiceLine, ServiceLines::V2::Types::ServiceLineAdjustment, ServiceLines::V2::Types::ServiceLineCreate, ServiceLines::V2::Types::ServiceLineCreateBase, ServiceLines::V2::Types::ServiceLineCreateBaseBase, ServiceLines::V2::Types::ServiceLineCreateOptional, ServiceLines::V2::Types::ServiceLineCreateStandalone, ServiceLines::V2::Types::ServiceLineCreateStandaloneBase, ServiceLines::V2::Types::ServiceLineCreateStandaloneBaseBase, ServiceLines::V2::Types::ServiceLineDenialReason, ServiceLines::V2::Types::ServiceLineEraData, ServiceLines::V2::Types::ServiceLineUpdate, ServiceLines::V2::Types::ServiceLineUpdateBase, ServiceLines::V2::Types::TestResult, ServiceLines::V2::Types::TestResultOptional, ServiceLines::V2::Types::UniversalServiceLineCreate, ServiceLines::V2::Types::UniversalServiceLineCreateStandalone, ServiceLines::V2::Types::UniversalServiceLineUpdate, Superbills::V1::Types::CreateSuperbillRequest, Superbills::V1::Types::Superbill, Superbills::V1::Types::SuperbillResponse, Tags::Types::Tag, Tags::Types::TagCreate, Tasks::V3::Types::GetAllTasksRequest, Tasks::V3::Types::Task, Tasks::V3::Types::TaskAction, Tasks::V3::Types::TaskActionExecutionMethod, Tasks::V3::Types::TaskActions, Tasks::V3::Types::TaskAssignment, Tasks::V3::Types::TaskCreateV3, Tasks::V3::Types::TaskNote, Tasks::V3::Types::TaskPage, Tasks::V3::Types::TaskUpdateV3, Tasks::V3::Types::TaskUpdatedToDeprecatedStatusErrorType, Users::V2::Types::AuthZeroMetadata, Users::V2::Types::GoogleAppsMetadata, Users::V2::Types::HumanUserMetadata, Users::V2::Types::IdpUserMetadata, Users::V2::Types::MachineUserMetadata, Users::V2::Types::OtherIdpMetadata, Users::V2::Types::UserMetadata, Users::V2::Types::UserV2, WriteOffs::V1::Types::CreateWriteOffsRequest, WriteOffs::V1::Types::CreateWriteOffsResponse, WriteOffs::V1::Types::GetMultiWriteOffsRequest, WriteOffs::V1::Types::InsuranceWriteOff, WriteOffs::V1::Types::InsuranceWriteOffCreate, WriteOffs::V1::Types::InsuranceWriteOffTarget, WriteOffs::V1::Types::NonInsurancePayerWriteOff, WriteOffs::V1::Types::NonInsurancePayerWriteOffCreate, WriteOffs::V1::Types::PatientWriteOff, WriteOffs::V1::Types::PatientWriteOffCreate, WriteOffs::V1::Types::WriteOff, WriteOffs::V1::Types::WriteOffCreate, WriteOffs::V1::Types::WriteOffsPage, X12::V1::Types::TypeOfBillComposite, X12::V1::Types::TypeOfBillCompositeBase, X12::V1::Types::TypeOfBillCompositeUpdate

Defined Under Namespace

Classes: Field

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Type

#coerce, #strict!, #strict?

Methods included from JSON::Serializable

#dump, #load

Constructor Details

#initialize(values = {}) ⇒ self

Creates a new instance of this model TODO: Should all this logic be in ‘#coerce` instead?

Parameters:

  • values (Hash) (defaults to: {})
  • strict (Hash)

    a customizable set of options



138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# File 'lib/candid/internal/types/model.rb', line 138

def initialize(values = {})
  @data = {}

  values = Utils.symbolize_keys(values.dup)

  self.class.fields.each do |field_name, field|
    value = values.delete(field.api_name)

    field_value = value || (if field.literal?
                              field.value
                            elsif field.default
                              field.default
                            end)

    @data[field_name] = Utils.coerce(field.type, field_value)
  end

  # Any remaining values in the input become extra fields
  values.each do |name, value|
    self.class.add_extra_field_definition(name: name, type: value.class)

    @data[name.to_sym] = value
  end
end

Class Method Details

.===(instance) ⇒ Object



127
128
129
# File 'lib/candid/internal/types/model.rb', line 127

def ===(instance)
  instance.class.ancestors.include?(self)
end

.add_extra_field_definition(name:, type:) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Adds a new field definition into the class’s extra fields registry

Parameters:

  • name (Symbol)
  • type (Class)
  • required (Hash)

    a customizable set of options

  • optional (Hash)

    a customizable set of options



88
89
90
91
92
93
94
95
# File 'lib/candid/internal/types/model.rb', line 88

def add_extra_field_definition(name:, type:)
  return if extra_fields.key?(name.to_sym)

  extra_fields[name.to_sym] = Field.new(name: name, type: type, optional: true, nullable: false)

  define_accessor(name)
  define_setter(name)
end

.coerce(value, strict: (respond_to?(:strict?) ? strict? : false)) ⇒ Object



115
116
117
118
119
120
121
# File 'lib/candid/internal/types/model.rb', line 115

def coerce(value, strict: (respond_to?(:strict?) ? strict? : false))
  return value if value.is_a?(self)

  return value unless value.is_a?(::Hash)

  new(value)
end

.extra_fieldsHash<Symbol, Field>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Any extra fields that have been created from instantiation

Returns:



31
32
33
# File 'lib/candid/internal/types/model.rb', line 31

def extra_fields
  @extra_fields ||= {}
end

.field(name, type, optional: false, nullable: false, api_name: nil, default: nil) ⇒ void

This method returns an undefined value.

Define a new field on this model

Parameters:

  • name (Symbol)

    The name of the field

  • type (Class)

    Type of the field

  • optional (Hash) (defaults to: false)

    a customizable set of options

  • nullable (Hash) (defaults to: false)

    a customizable set of options

  • api_name (Hash) (defaults to: nil)

    a customizable set of options

Options Hash (optional:):

  • If (Boolean)

    it is an optional field

Options Hash (nullable:):

  • If (Boolean)

    it is a nullable field

Options Hash (api_name:):

  • Name (Symbol, String)

    in the API of this field. When serializing/deserializing, will use this field name



44
45
46
47
48
49
50
# File 'lib/candid/internal/types/model.rb', line 44

def field(name, type, optional: false, nullable: false, api_name: nil, default: nil)
  add_field_definition(name: name, type: type, optional: optional, nullable: nullable, api_name: api_name,
                       default: default)

  define_accessor(name)
  define_setter(name)
end

.fieldsHash<Symbol, Field>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

The defined fields for this model

Returns:



18
19
20
21
22
23
24
# File 'lib/candid/internal/types/model.rb', line 18

def fields
  @fields ||= if self < Candid::Internal::Types::Model
                superclass.fields.dup
              else
                {}
              end
end

.literal(name, value, api_name: nil) ⇒ void

This method returns an undefined value.

Define a new literal for this model

Parameters:

  • name (Symbol)
  • value (Object)
  • api_name (Hash) (defaults to: nil)

    a customizable set of options

Options Hash (api_name:):

  • (Symbol, String)


58
59
60
61
62
63
# File 'lib/candid/internal/types/model.rb', line 58

def literal(name, value, api_name: nil)
  add_field_definition(name: name, type: value.class, optional: false, nullable: false, api_name: api_name,
                       value: value)

  define_accessor(name)
end

.load(str) ⇒ Object



123
124
125
# File 'lib/candid/internal/types/model.rb', line 123

def load(str)
  coerce(::JSON.parse(str, symbolize_names: true))
end

Instance Method Details

#==(other) ⇒ Object



183
184
185
# File 'lib/candid/internal/types/model.rb', line 183

def ==(other)
  self.class == other.class && to_h == other.to_h
end

#inspectString

Returns:

  • (String)


188
189
190
191
192
193
194
# File 'lib/candid/internal/types/model.rb', line 188

def inspect
  attrs = @data.map do |name, value|
    "#{name}=#{value.inspect}"
  end

  "#<#{self.class.name}:0x#{object_id&.to_s(16)} #{attrs.join(" ")}>"
end

#to_hObject



163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# File 'lib/candid/internal/types/model.rb', line 163

def to_h
  self.class.fields.merge(self.class.extra_fields).each_with_object({}) do |(name, field), acc|
    # If there is a value present in the data, use that value
    # If there is a `nil` value present in the data, and it is optional but NOT nullable, exclude key altogether
    # If there is a `nil` value present in the data, and it is optional and nullable, use the nil value

    value = @data[name]

    next if value.nil? && field.optional && !field.nullable

    if value.is_a?(::Array)
      value = value.map { |item| item.respond_to?(:to_h) ? item.to_h : item }
    elsif value.respond_to?(:to_h)
      value = value.to_h
    end

    acc[field.api_name] = value
  end
end