Skip to content

SystemCallingPartyCategoryModifyRequest

Bases: OCIRequest

Modify a Calling Party Category in system. The response is either a SuccessResponse or an ErrorResponse.

Attributes:

category (str):

cpc_value (Optional[Nillable[str]]):

isup_oli_value (Optional[Nillable[int]]):

gtd_oli_value (Optional[Nillable[str]]):

user_category (Optional[bool]):

pay_phone (Optional[bool]):

operator (Optional[bool]):

become_default (Optional[bool]):

collect_call (Optional[bool]):

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

    Attributes:

        category (str):

        cpc_value (Optional[Nillable[str]]):

        isup_oli_value (Optional[Nillable[int]]):

        gtd_oli_value (Optional[Nillable[str]]):

        user_category (Optional[bool]):

        pay_phone (Optional[bool]):

        operator (Optional[bool]):

        become_default (Optional[bool]):

        collect_call (Optional[bool]):

        web_display_key (Optional[Nillable[str]]):

    """

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

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

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

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

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

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

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

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

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

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

    def __post_init__(self):
        nillable_fields = [
            "cpc_value",
            "isup_oli_value",
            "gtd_oli_value",
            "web_display_key",
        ]
        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 SystemCallingPartyCategoryModifyRequest

client = Client()

command = SystemCallingPartyCategoryModifyRequest(
    category=...,
    cpc_value=...,
    isup_oli_value=...,
    gtd_oli_value=...,
    user_category=...,
    pay_phone=...,
    operator=...,
    become_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("SystemCallingPartyCategoryModifyRequest",
    category=...,
    cpc_value=...,
    isup_oli_value=...,
    gtd_oli_value=...,
    user_category=...,
    pay_phone=...,
    operator=...,
    become_default=...,
    collect_call=...,
    web_display_key=...,
)

print(response)