Skip to content

ServiceProviderPreferredCarrierAddRequest

Bases: OCIRequest

Add 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 three types of carriers is optional. 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[str]):

inter_lata_carrier (Optional[str]):

international_carrier (Optional[str]):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class ServiceProviderPreferredCarrierAddRequest(OCIRequest):
    """Add 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 three types of carriers is optional.
        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[str]):

        inter_lata_carrier (Optional[str]):

        international_carrier (Optional[str]):

    """

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

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

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

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

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

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 ServiceProviderPreferredCarrierAddRequest

client = Client()

command = ServiceProviderPreferredCarrierAddRequest(
    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("ServiceProviderPreferredCarrierAddRequest",
    service_provider_id=...,
    country_code=...,
    intra_lata_carrier=...,
    inter_lata_carrier=...,
    international_carrier=...,
)

print(response)