Skip to content

UserSharedCallAppearanceModifyEndpointRequest

Bases: OCIRequest

Associate/Disassociate an access device instance to the user's Shared Call Appearance.

The following elements are only used in AS data mode and ignored in XS data mode:
  useHotline
  hotlineContact

 The response is either a SuccessResponse or an ErrorResponse.

Attributes:

user_id (str):

access_device_endpoint (AccessDeviceEndpointKey):

is_active (Optional[bool]):

allow_origination (Optional[bool]):

allow_termination (Optional[bool]):

use_hotline (Optional[bool]):

hotline_contact (Optional[Nillable[str]]):
Source code in src/mercury_ocip_fast/commands/commands.py
@dataclass(kw_only=True)
class UserSharedCallAppearanceModifyEndpointRequest(OCIRequest):
    """Associate/Disassociate an access device instance to the user's Shared Call Appearance.

        The following elements are only used in AS data mode and ignored in XS data mode:
          useHotline
          hotlineContact

         The response is either a SuccessResponse or an ErrorResponse.

    Attributes:

        user_id (str):

        access_device_endpoint (AccessDeviceEndpointKey):

        is_active (Optional[bool]):

        allow_origination (Optional[bool]):

        allow_termination (Optional[bool]):

        use_hotline (Optional[bool]):

        hotline_contact (Optional[Nillable[str]]):

    """

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

    access_device_endpoint: AccessDeviceEndpointKey = field(
        metadata={"alias": "accessDeviceEndpoint"}
    )

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

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

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

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

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

    def __post_init__(self):
        nillable_fields = ["hotline_contact"]
        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_fast/commands/base_command.py
class SuccessResponse(OCIResponse):
    pass

Bases: OCIResponse

Source 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 UserSharedCallAppearanceModifyEndpointRequest

client = Client()

command = UserSharedCallAppearanceModifyEndpointRequest(
    user_id=...,
    access_device_endpoint=...,
    is_active=...,
    allow_origination=...,
    allow_termination=...,
    use_hotline=...,
    hotline_contact=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip_fast.client import Client

client = Client()

response = client.raw_command("UserSharedCallAppearanceModifyEndpointRequest",
    user_id=...,
    access_device_endpoint=...,
    is_active=...,
    allow_origination=...,
    allow_termination=...,
    use_hotline=...,
    hotline_contact=...,
)

print(response)