Skip to content

GroupMusicOnHoldGetDepartmentListRequest

Bases: OCIRequest

Returns a list of all departments that have a Music On Hold instance. The response is either GroupMusicOnHoldGetDepartmentListResponse or ErrorResponse. It is possible to get the instances within a specified department.

Attributes:

service_provider_id (str):

group_id (str):

group_department_name (Optional[str]):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class GroupMusicOnHoldGetDepartmentListRequest(OCIRequest):
    """Returns a list of all departments that have a Music On Hold instance.
        The response is either GroupMusicOnHoldGetDepartmentListResponse or ErrorResponse.
        It is possible to get the instances within a specified department.

    Attributes:

        service_provider_id (str):

        group_id (str):

        group_department_name (Optional[str]):

    """

    service_provider_id: str = field(metadata={"alias": "serviceProviderId"})

    group_id: str = field(metadata={"alias": "groupId"})

    group_department_name: Optional[str] = field(
        default=None, metadata={"alias": "groupDepartmentName"}
    )

Responses

Bases: OCIDataResponse

Response to the GroupMusicOnHoldGetDepartmentListRequest.

Attributes:

has_department (bool):

department (Optional[List[DepartmentKey]]):

department_full_path (Optional[List[str]]):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class GroupMusicOnHoldGetDepartmentListResponse(OCIDataResponse):
    """Response to the GroupMusicOnHoldGetDepartmentListRequest.

    Attributes:

        has_department (bool):

        department (Optional[List[DepartmentKey]]):

        department_full_path (Optional[List[str]]):

    """

    has_department: bool = field(metadata={"alias": "hasDepartment"})

    department: Optional[List[DepartmentKey]] = field(
        default=None, metadata={"alias": "department"}
    )

    department_full_path: Optional[List[str]] = field(
        default=None, metadata={"alias": "departmentFullPath"}
    )

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 GroupMusicOnHoldGetDepartmentListRequest

client = Client()

command = GroupMusicOnHoldGetDepartmentListRequest(
    service_provider_id=...,
    group_id=...,
    group_department_name=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip.client import Client

client = Client()

response = client.raw_command("GroupMusicOnHoldGetDepartmentListRequest",
    service_provider_id=...,
    group_id=...,
    group_department_name=...,
)

print(response)