"""
Predefined SelectionSets for Carrier and Product entities.
"""
from ace.core.graphql import SelectionSet
from ace.centralize.graphql.selections.party import DisplayNameSelections
[docs]
class CarrierSelections:
"""Reusable selection sets for Carrier fields."""
MINIMAL = SelectionSet(
"id",
"abbreviation",
)
STANDARD = SelectionSet(
"id",
"abbreviation",
"terminateDate",
)
FULL = SelectionSet(
"id",
"abbreviation",
"terminateDate",
"creationDateTimeUtc",
"creationUserId",
"lastUpdateDateTimeUtc",
"lastUpdateUserId",
"deletionDateTimeUtc",
"deletionUserId",
)
[docs]
class CoverageProductSelections:
"""Reusable selection sets for Coverage Product fields."""
STANDARD = SelectionSet(
"id",
"coverageProductGuid",
"carrierId",
"coverageLevelId",
"coverageTypeId",
"productCodes",
"effectiveDate",
"terminationDate",
nested={
"name": DisplayNameSelections.WITH_TRANSLATIONS,
}
)
[docs]
class ProductSelections:
"""Reusable selection sets for Product fields."""
MINIMAL = SelectionSet(
"productId",
"productGUID",
)
STANDARD = SelectionSet(
"productId",
"productGUID",
"productTypeId",
"carrierId",
"productCodes",
"effectiveDate",
"terminationDate",
nested={
"name": SelectionSet("default", "translation"),
}
)
FULL = SelectionSet(
"productId",
"productGUID",
"productTypeId",
"carrierId",
"productCodes",
"effectiveDate",
"terminationDate",
nested={
"name": SelectionSet("default", "translation"),
"carrierName": DisplayNameSelections.WITH_TRANSLATIONS,
"productCoverages": CoverageProductSelections.STANDARD,
}
)