Skip to content

UserCallForwardingSelectiveModifyRequest

Bases: OCIRequest

Modify the user's call forwarding selective service setting. The response is either a SuccessResponse or an ErrorResponse.

Attributes:

user_id (str):

is_active (Optional[bool]):

default_forward_to_phone_number (Optional[Nillable[str]]):

play_ring_reminder (Optional[bool]):

criteria_activation (Optional[List[CriteriaActivation]]):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class UserCallForwardingSelectiveModifyRequest(OCIRequest):
    """Modify the user's call forwarding selective service setting.
        The response is either a SuccessResponse or an ErrorResponse.

    Attributes:

        user_id (str):

        is_active (Optional[bool]):

        default_forward_to_phone_number (Optional[Nillable[str]]):

        play_ring_reminder (Optional[bool]):

        criteria_activation (Optional[List[CriteriaActivation]]):

    """

    user_id: str = field(metadata={"alias": "userId"})

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

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

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

    criteria_activation: Optional[List[CriteriaActivation]] = field(
        default=None, metadata={"alias": "criteriaActivation"}
    )

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

Responses

Bases: OCIResponse

Source code in src/mercury_ocip/commands/base_command.py
class SuccessResponse(OCIResponse):
    pass

Bases: OCIResponse

Source code in src/mercury_ocip/commands/base_command.py
class ErrorResponse(OCIResponse):
    errorCode: Optional[int] = None
    summary: str
    summaryEnglish: str
    detail: Optional[str] = None

Example Usage

from mercury_ocip.client import Client
from mercury_ocip.commands import UserCallForwardingSelectiveModifyRequest

client = Client()

command = UserCallForwardingSelectiveModifyRequest(
    user_id=...,
    is_active=...,
    default_forward_to_phone_number=...,
    play_ring_reminder=...,
    criteria_activation=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip.client import Client

client = Client()

response = client.raw_command("UserCallForwardingSelectiveModifyRequest",
    user_id=...,
    is_active=...,
    default_forward_to_phone_number=...,
    play_ring_reminder=...,
    criteria_activation=...,
)

print(response)