UserCallForwardingNoAnswerModifyRequest
Bases: OCIRequest
Modify the user level data associated with Call Forwarding No Answer. The response is either a SuccessResponse or an ErrorResponse. Engineering Note: This command is used internally by Call Processing.
Attributes:
user_id (str):
is_active (Optional[bool]):
forward_to_phone_number (Optional[Nillable[str]]):
number_of_rings (Optional[int]):
Source code in src/mercury_ocip_fast/commands/commands.py
| @dataclass(kw_only=True)
class UserCallForwardingNoAnswerModifyRequest(OCIRequest):
"""Modify the user level data associated with Call Forwarding No Answer.
The response is either a SuccessResponse or an ErrorResponse.
Engineering Note: This command is used internally by Call Processing.
Attributes:
user_id (str):
is_active (Optional[bool]):
forward_to_phone_number (Optional[Nillable[str]]):
number_of_rings (Optional[int]):
"""
user_id: str = field(metadata={"alias": "userId"})
is_active: Optional[bool] = field(default=None, metadata={"alias": "isActive"})
forward_to_phone_number: Optional[Nillable[str]] = field(
default=None, metadata={"alias": "forwardToPhoneNumber"}
)
number_of_rings: Optional[int] = field(
default=None, metadata={"alias": "numberOfRings"}
)
def __post_init__(self):
nillable_fields = ["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: OCIResponseSource code in src/mercury_ocip_fast/commands/base_command.py
| class SuccessResponse(OCIResponse):
pass
|
Bases: OCIResponseSource code in src/mercury_ocip_fast/commands/base_command.py
| class ErrorResponse(OCIResponse):
errorCode: Optional[int] = None
summary: str
summaryEnglish: str
detail: Optional[str] = None
|
Example Usage
from mercury_ocip_fast.client import Client
from mercury_ocip_fast.commands import UserCallForwardingNoAnswerModifyRequest
client = Client()
command = UserCallForwardingNoAnswerModifyRequest(
user_id=...,
is_active=...,
forward_to_phone_number=...,
number_of_rings=...,
)
response = client.command(command)
print(response)
Example 2 with Raw Command
from mercury_ocip_fast.client import Client
client = Client()
response = client.raw_command("UserCallForwardingNoAnswerModifyRequest",
user_id=...,
is_active=...,
forward_to_phone_number=...,
number_of_rings=...,
)
print(response)