Skip to content

CommPilotExpressRedirectionWithExceptionModify

Bases: OCIType

CommPilot Express type to transfer to voice mail or forward to a number with certain exceptions used in the context of a modify.

Attributes:

send_calls_to_voice_mail_except_excluded_numbers (Optional[bool]):

excluded_phone_number01 (Optional[Nillable[str]]):

excluded_phone_number02 (Optional[Nillable[str]]):

excluded_phone_number03 (Optional[Nillable[str]]):

forward_excluded_numbers_to (Optional[Nillable[str]]):
Source code in src/mercury_ocip_fast/commands/commands.py
@dataclass(kw_only=True)
class CommPilotExpressRedirectionWithExceptionModify(OCIType):
    """CommPilot Express type to transfer to voice mail or forward to a number
        with certain exceptions used in the context of a modify.

    Attributes:

        send_calls_to_voice_mail_except_excluded_numbers (Optional[bool]):

        excluded_phone_number01 (Optional[Nillable[str]]):

        excluded_phone_number02 (Optional[Nillable[str]]):

        excluded_phone_number03 (Optional[Nillable[str]]):

        forward_excluded_numbers_to (Optional[Nillable[str]]):

    """

    send_calls_to_voice_mail_except_excluded_numbers: Optional[bool] = field(
        default=None, metadata={"alias": "sendCallsToVoiceMailExceptExcludedNumbers"}
    )

    excluded_phone_number01: Optional[Nillable[str]] = field(
        default=None, metadata={"alias": "excludedPhoneNumber01"}
    )

    excluded_phone_number02: Optional[Nillable[str]] = field(
        default=None, metadata={"alias": "excludedPhoneNumber02"}
    )

    excluded_phone_number03: Optional[Nillable[str]] = field(
        default=None, metadata={"alias": "excludedPhoneNumber03"}
    )

    forward_excluded_numbers_to: Optional[Nillable[str]] = field(
        default=None, metadata={"alias": "forwardExcludedNumbersTo"}
    )

    def __post_init__(self):
        nillable_fields = [
            "excluded_phone_number01",
            "excluded_phone_number02",
            "excluded_phone_number03",
            "forward_excluded_numbers_to",
        ]
        for field_name in nillable_fields:
            value = getattr(self, field_name)
            if value == "" or value == "None":
                object.__setattr__(self, field_name, OCINil)