Skip to content

SystemCountryCodeModifyRequest

Bases: OCIRequest

Modify the attributes of a country code. If becomeDefaultCountryCode is true, the country code in this request becomes the default country code for the system. The following elements are only used in AS data mode: disableNationalPrefixForOffNetCalls

The response is either a SuccessResponse or an ErrorResponse.

Attributes:

country_code (str):

ring_period_milliseconds (Optional[int]):

off_hook_warning_timer_seconds (Optional[int]):

enable_national_prefix (Optional[bool]):

national_prefix (Optional[Nillable[str]]):

become_default_country_code (Optional[bool]):

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_fast/commands/commands.py
@dataclass(kw_only=True)
class SystemCountryCodeModifyRequest(OCIRequest):
    """Modify the attributes of a country code.
        If becomeDefaultCountryCode is true, the country code
        in this request becomes the default country code for the system.
        The following elements are only used in AS data mode:
          disableNationalPrefixForOffNetCalls

        The response is either a SuccessResponse or an ErrorResponse.

    Attributes:

        country_code (str):

        ring_period_milliseconds (Optional[int]):

        off_hook_warning_timer_seconds (Optional[int]):

        enable_national_prefix (Optional[bool]):

        national_prefix (Optional[Nillable[str]]):

        become_default_country_code (Optional[bool]):

        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"})

    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[Nillable[str]] = field(
        default=None, metadata={"alias": "nationalPrefix"}
    )

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

    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"}
    )

    def __post_init__(self):
        nillable_fields = ["national_prefix"]
        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 SystemCountryCodeModifyRequest

client = Client()

command = SystemCountryCodeModifyRequest(
    country_code=...,
    ring_period_milliseconds=...,
    off_hook_warning_timer_seconds=...,
    enable_national_prefix=...,
    national_prefix=...,
    become_default_country_code=...,
    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_fast.client import Client

client = Client()

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

print(response)