Skip to content

ServiceProviderPreferredCarrierModifyRequest

Bases: OCIRequest

Modify the country code preferred carriers for a service provider or enterprise. For each combination of service provider and country code, you can assign an intra-lata, inter-lata, and international carrier. Each of the 3 types of carriers is optional. If an optional carrier is not specified, the assignment will not change. To clear a preferred carrier, set the value to an empty string. The response is either a SuccessResponse or an ErrorResponse. Note: At the system level, more than one carrier may be assigned to each country code. At the service provider level, you must choose from the carriers assigned at the system level.

Attributes:

service_provider_id (str):

country_code (str):

intra_lata_carrier (Optional[Nillable[str]]):

inter_lata_carrier (Optional[Nillable[str]]):

international_carrier (Optional[Nillable[str]]):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class ServiceProviderPreferredCarrierModifyRequest(OCIRequest):
    """Modify the country code preferred carriers for a service provider or enterprise. For each
        combination of service provider and country code, you can assign an intra-lata, inter-lata,
        and international carrier. Each of the 3 types of carriers is optional.
        If an optional carrier is not specified, the assignment will not change.
        To clear a preferred carrier, set the value to an empty string.
        The response is either a SuccessResponse or an ErrorResponse.
        Note: At the system level, more than one carrier may be assigned to each country code.
        At the service provider level, you must choose from the carriers assigned at the system level.

    Attributes:

        service_provider_id (str):

        country_code (str):

        intra_lata_carrier (Optional[Nillable[str]]):

        inter_lata_carrier (Optional[Nillable[str]]):

        international_carrier (Optional[Nillable[str]]):

    """

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

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

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

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

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

    def __post_init__(self):
        nillable_fields = [
            "intra_lata_carrier",
            "inter_lata_carrier",
            "international_carrier",
        ]
        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 ServiceProviderPreferredCarrierModifyRequest

client = Client()

command = ServiceProviderPreferredCarrierModifyRequest(
    service_provider_id=...,
    country_code=...,
    intra_lata_carrier=...,
    inter_lata_carrier=...,
    international_carrier=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip.client import Client

client = Client()

response = client.raw_command("ServiceProviderPreferredCarrierModifyRequest",
    service_provider_id=...,
    country_code=...,
    intra_lata_carrier=...,
    inter_lata_carrier=...,
    international_carrier=...,
)

print(response)