Skip to content

SystemCallingPartyCategoryAddRequest

Bases: OCIRequest

Add a Calling Party Category to system. The response is either a SuccessResponse or an ErrorResponse.

Attributes:

category (str):

cpc_value (Optional[str]):

isup_oli_value (Optional[int]):

gtd_oli_value (Optional[str]):

user_category (bool):

pay_phone (bool):

operator (bool):

default (bool):

collect_call (bool):

web_display_key (Optional[str]):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class SystemCallingPartyCategoryAddRequest(OCIRequest):
    """Add a Calling Party Category to system.
        The response is either a SuccessResponse or an ErrorResponse.

    Attributes:

        category (str):

        cpc_value (Optional[str]):

        isup_oli_value (Optional[int]):

        gtd_oli_value (Optional[str]):

        user_category (bool):

        pay_phone (bool):

        operator (bool):

        default (bool):

        collect_call (bool):

        web_display_key (Optional[str]):

    """

    category: str = field(metadata={"alias": "category"})

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

    isup_oli_value: Optional[int] = field(
        default=None, metadata={"alias": "isupOliValue"}
    )

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

    user_category: bool = field(metadata={"alias": "userCategory"})

    pay_phone: bool = field(metadata={"alias": "payPhone"})

    operator: bool = field(metadata={"alias": "operator"})

    default: bool = field(metadata={"alias": "default"})

    collect_call: bool = field(metadata={"alias": "collectCall"})

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

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 SystemCallingPartyCategoryAddRequest

client = Client()

command = SystemCallingPartyCategoryAddRequest(
    category=...,
    cpc_value=...,
    isup_oli_value=...,
    gtd_oli_value=...,
    user_category=...,
    pay_phone=...,
    operator=...,
    default=...,
    collect_call=...,
    web_display_key=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip.client import Client

client = Client()

response = client.raw_command("SystemCallingPartyCategoryAddRequest",
    category=...,
    cpc_value=...,
    isup_oli_value=...,
    gtd_oli_value=...,
    user_category=...,
    pay_phone=...,
    operator=...,
    default=...,
    collect_call=...,
    web_display_key=...,
)

print(response)