Skip to content

ServiceProviderExtensionLengthModifyRequest

Bases: OCIRequest

Modify the service provider's extension length range. The response is either a SuccessResponse or an ErrorResponse.

Attributes:

service_provider_id (str):

default_extension_length (Optional[Nillable[int]]):

location_routing_prefix_digit (Optional[Nillable[int]]):

location_code_length (Optional[Nillable[int]]):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class ServiceProviderExtensionLengthModifyRequest(OCIRequest):
    """Modify the service provider's extension length range.
        The response is either a SuccessResponse or an ErrorResponse.

    Attributes:

        service_provider_id (str):

        default_extension_length (Optional[Nillable[int]]):

        location_routing_prefix_digit (Optional[Nillable[int]]):

        location_code_length (Optional[Nillable[int]]):

    """

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

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

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

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

    def __post_init__(self):
        nillable_fields = [
            "default_extension_length",
            "location_routing_prefix_digit",
            "location_code_length",
        ]
        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 ServiceProviderExtensionLengthModifyRequest

client = Client()

command = ServiceProviderExtensionLengthModifyRequest(
    service_provider_id=...,
    default_extension_length=...,
    location_routing_prefix_digit=...,
    location_code_length=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip.client import Client

client = Client()

response = client.raw_command("ServiceProviderExtensionLengthModifyRequest",
    service_provider_id=...,
    default_extension_length=...,
    location_routing_prefix_digit=...,
    location_code_length=...,
)

print(response)