Source code for ace.centralize.graphql.selections.policy

"""
Predefined SelectionSets for Policy and related entities.

Based on the Policy/Application GraphQL schema output types:
    GqlPolicyDetail, GqlCoverage, GqlApplicationDetail, GqlPaymentAgreement,
    GqlPolicyPayment, CoverageBenefit, CoverageLife, Rating, Premium,
    SubstandardRating, RequirementDetail
"""

from ace.core.graphql import SelectionSet


[docs] class PremiumSelections: """Reusable selection sets for Premium fields.""" STANDARD = SelectionSet( "id", "premiumTypeId", "premiumAmount", "effectiveDate", "expirationDate", "policyId", "coverageId", )
[docs] class SubstandardRatingSelections: """Reusable selection sets for SubstandardRating fields.""" STANDARD = SelectionSet( "id", "participantRoleId", "tableRatingId", "flatExtraAmount", "flatExtraBasisId", "effectiveDate", "expirationDate", "statusId", )
[docs] class CoverageBenefitSelections: """Reusable selection sets for CoverageBenefit fields.""" STANDARD = SelectionSet( "initialBenefitAmount", "initialBenefitCurrencyId", "currentBenefitAmount", "currentBenefitCurrencyId", "livesTypeId", "eliminationPeriodId", "benefitPeriodId", "expiryDate", "renewalDate", "benefitPercentage", )
[docs] class CoverageLifeSelections: """Reusable selection sets for CoverageLife fields.""" STANDARD = SelectionSet( "initialAmount", "currentAmount", "livesTypeId", "deathBenefitOptionTypeId", "durationDesign", "expiryDate", "renewalDate", "conversionDate", )
[docs] class RatingSelections: """Reusable selection sets for Rating fields.""" STANDARD = SelectionSet( "issueAge", "issueGenderId", "underwritingClassId", "occupation", "employmentClassId", "tobaccoPremiumBasisId", )
[docs] class CoverageSelections: """Reusable selection sets for Coverage fields.""" MINIMAL = SelectionSet( "id", "coverageGUID", "coverageNumber", ) STANDARD = SelectionSet( "id", "coverageGUID", "coverageProductId", "parentCoverageId", "productCode", "currentAmount", "coverageNumber", "annualPremium", "modalPremium", "effectiveDate", "terminationDate", "terminationReasonId", "statusId", ) FULL = SelectionSet( "id", "coverageGUID", "coverageProductId", "parentCoverageId", "productCode", "currentAmount", "coverageNumber", "annualPremium", "modalPremium", "effectiveDate", "terminationDate", "terminationReasonId", "expiryDate", "livesTypeId", "durationDesign", "index", "statusId", "statusChangeDate", "creationDateTimeUTC", "creationUserId", "deletionDateTimeUTC", "deletionUserId", "lastUpdateDateTimeUTC", "lastUpdateUserId", nested={ "coverageLife": CoverageLifeSelections.STANDARD, "coverageBenefit": CoverageBenefitSelections.STANDARD, "rating": RatingSelections.STANDARD, "premiums": PremiumSelections.STANDARD, "substandardRatings": SubstandardRatingSelections.STANDARD, } )
[docs] class PaymentAgreementSelections: """Reusable selection sets for PaymentAgreement fields.""" STANDARD = SelectionSet( "dayOfMonth", "paymentMethodId", "paymentModeId", )
[docs] class PolicyPaymentSelections: """Reusable selection sets for GqlPolicyPayment fields.""" STANDARD = SelectionSet( "id", "billedToDate", "graceAmount", "gracePeriodEndDate", "nextBilledAmount", "paidToDate", "premiumPaidEndDate", "premiumPaidStatusId", )
[docs] class PolicySelections: """Reusable selection sets for Policy fields.""" MINIMAL = SelectionSet( "policyId", "policyGUID", "policyNumber", ) STANDARD = SelectionSet( "policyId", "policyGUID", "policyNumber", "productId", "jurisdictionId", "effectiveDate", "terminationDate", "statusId", nested={ "coverages": CoverageSelections.MINIMAL, } ) WITH_PREMIUM = SelectionSet( "policyId", "policyGUID", "policyNumber", "productId", "jurisdictionId", "effectiveDate", "terminationDate", "annualPremium", "modalPremium", "feeAmount", "statusId", nested={ "premiumPaymentAgreement": PaymentAgreementSelections.STANDARD, "coverages": CoverageSelections.STANDARD, } ) FULL = SelectionSet( "policyId", "policyGUID", "policyNumber", "productId", "productCode", "jurisdictionId", "effectiveDate", "issueDate", "terminationDate", "terminationReasonId", "annualPremium", "modalPremium", "feeAmount", "statusId", "statusChangeDate", "maturityDate", "renewalDate", "referralSourceId", "subStatusId", "subStatusChangeDate", "policyYear", "dynamic", "creationDateTimeUTC", "creationUserId", "deletionDateTimeUTC", "deletionUserId", "lastUpdateDateTimeUTC", "lastUpdateUserId", nested={ "premiumPaymentAgreement": PaymentAgreementSelections.STANDARD, "payment": PolicyPaymentSelections.STANDARD, "premiums": PremiumSelections.STANDARD, "coverages": CoverageSelections.FULL, } ) # For info nested field in mutations INFO_MINIMAL = SelectionSet( "policyId", "policyGUID", "policyNumber", nested={ "coverages": CoverageSelections.MINIMAL, } ) INFO_FULL = SelectionSet( "policyId", "policyGUID", "policyNumber", "productId", "jurisdictionId", "effectiveDate", "issueDate", "terminationDate", "terminationReasonId", "annualPremium", "modalPremium", "feeAmount", "statusId", "dynamic", "creationDateTimeUTC", "creationUserId", "deletionDateTimeUTC", "deletionUserId", "lastUpdateDateTimeUTC", "lastUpdateUserId", nested={ "premiumPaymentAgreement": PaymentAgreementSelections.STANDARD, "premiums": PremiumSelections.STANDARD, "coverages": CoverageSelections.FULL, } )
[docs] class ParticipantSelections: """Reusable selection sets for Participant fields.""" MINIMAL = SelectionSet( "id", nested={ "party": SelectionSet("id"), "roles": SelectionSet("id"), } ) STANDARD = SelectionSet( "id", "entityId", "entityTypeId", nested={ "party": SelectionSet( "id", "partyEntityTypeId", "partyTypeId", ), "roles": SelectionSet( "id", "partyRoleId", "sharedPercent", "effectiveDate", "terminationDate", "terminationReasonId", ), } ) FULL = SelectionSet( "id", "entityId", "entityTypeId", "creationDateTimeUTC", "creationUserId", "deletionDateTimeUTC", "deletionUserId", nested={ "party": SelectionSet( "id", "partyEntityTypeId", "partyTypeId", nested={ "contact": SelectionSet( "preferredCommunicationMethodId", nested={ "addresses": SelectionSet( "id", "street", "city", "stateId", "countryId", "postalCode", "addressTypeId", "additionalInfo", "main", ), "emails": SelectionSet( "id", "emailAddress", "emailTypeId", "isInvalid", "main", ), "phones": SelectionSet( "id", "phoneValue", "phoneTypeId", "extension", "main", ), } ), "individual": SelectionSet( "id", "firstName", "lastName", "middleName", "birthDate", "deathDate", "genderId", "maritalStatusId", "occupation", "occupationTitle", "preferredLanguageId", "suffix", "title", nested={ "displayName": SelectionSet("default"), } ), "organization": SelectionSet( "id", "website", "establishedDate", "dissolvedDate", "preferredLanguageId", nested={ "displayName": SelectionSet("default"), "name": SelectionSet("default"), } ), } ), "roles": SelectionSet( "id", "partyRoleId", "sharedPercent", "effectiveDate", "terminationDate", "terminationReasonId", "statusId", "agentContractId", "participantId", "creationDateTimeUTC", "creationUserId", "deletionDateTimeUTC", "deletionUserId", ), } )
[docs] class PaymentAccountSelections: """Reusable selection sets for PaymentAccount fields.""" MINIMAL = SelectionSet("id") WITH_GATEWAY_PARAMS = SelectionSet( "id", nested={ "gatewayAccountParams": SelectionSet( "accountParamName", "accountParamValue", ) } )
[docs] class MetadataSelections: """Reusable selection sets for Metadata fields.""" STANDARD = SelectionSet( "entityType", "guid", nested={ "data": SelectionSet("key", "value"), } )