Skip to content

SystemCountryCodeAddRequest

Bases: OCIRequest

Add a country code to the system. If ringPeriodMilliseconds is not specified, a default of 6000 milliseconds is assumed. If offHookWarningTimerSeconds is not specified, a default of 30 seconds is assumed. If enableNationalPrefix is not specified, a default of false is assumed. If nationalPrefix is not specified, a default of null string is assumed. If disableNationalPrefixForOffNetCalls is not specified, a default of false is assumed. The following elements are only used in AS data mode: disableNationalPrefixForOffNetCalls. The response is either a SuccessResponse or an ErrorResponse.

Attributes:

country_code (str):

country_name (str):

ring_period_milliseconds (Optional[int]):

off_hook_warning_timer_seconds (Optional[int]):

enable_national_prefix (Optional[bool]):

national_prefix (Optional[str]):

max_call_waiting_tones (Optional[int]):

time_between_call_waiting_tones_milliseconds (Optional[int]):

disable_national_prefix_for_off_net_calls (Optional[bool]):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class SystemCountryCodeAddRequest(OCIRequest):
    """Add a country code to the system.
        If ringPeriodMilliseconds is not specified, a default of 6000 milliseconds is assumed.
        If offHookWarningTimerSeconds is not specified, a default of 30 seconds is assumed.
        If enableNationalPrefix is not specified, a default of false is assumed.
        If nationalPrefix is not specified, a default of null string is assumed.
        If disableNationalPrefixForOffNetCalls is not specified, a default of false is assumed.
        The following elements are only used in AS data mode:
           disableNationalPrefixForOffNetCalls.
        The response is either a SuccessResponse or an ErrorResponse.

    Attributes:

        country_code (str):

        country_name (str):

        ring_period_milliseconds (Optional[int]):

        off_hook_warning_timer_seconds (Optional[int]):

        enable_national_prefix (Optional[bool]):

        national_prefix (Optional[str]):

        max_call_waiting_tones (Optional[int]):

        time_between_call_waiting_tones_milliseconds (Optional[int]):

        disable_national_prefix_for_off_net_calls (Optional[bool]):

    """

    country_code: str = field(metadata={"alias": "countryCode"})

    country_name: str = field(metadata={"alias": "countryName"})

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

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

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

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

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

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

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

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 SystemCountryCodeAddRequest

client = Client()

command = SystemCountryCodeAddRequest(
    country_code=...,
    country_name=...,
    ring_period_milliseconds=...,
    off_hook_warning_timer_seconds=...,
    enable_national_prefix=...,
    national_prefix=...,
    max_call_waiting_tones=...,
    time_between_call_waiting_tones_milliseconds=...,
    disable_national_prefix_for_off_net_calls=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip.client import Client

client = Client()

response = client.raw_command("SystemCountryCodeAddRequest",
    country_code=...,
    country_name=...,
    ring_period_milliseconds=...,
    off_hook_warning_timer_seconds=...,
    enable_national_prefix=...,
    national_prefix=...,
    max_call_waiting_tones=...,
    time_between_call_waiting_tones_milliseconds=...,
    disable_national_prefix_for_off_net_calls=...,
)

print(response)