Skip to content

ServiceProviderPreferredCarrierGetCarrierListRequest

Bases: OCIRequest

Requests the lists of carriers for a specified country code for a service provider / enterprise. The response is either a ServiceProviderPreferredCarrierGetCarrierListResponse or an ErrorResponse.

Attributes:

service_provider_id (str):

country_code (str):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class ServiceProviderPreferredCarrierGetCarrierListRequest(OCIRequest):
    """Requests the lists of carriers for a specified country code for a service provider / enterprise.
        The response is either a ServiceProviderPreferredCarrierGetCarrierListResponse or an ErrorResponse.

    Attributes:

        service_provider_id (str):

        country_code (str):

    """

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

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

Responses

Bases: OCIDataResponse

Response to a ServiceProviderPreferredCarrierGetCarrierListRequest. Contains the lists of carriers for a specified country code for a service provider / enterprise.

Attributes:

intra_lata_carrier (Optional[List[str]]):

inter_lata_carrier (Optional[List[str]]):

international_carrier (Optional[List[str]]):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class ServiceProviderPreferredCarrierGetCarrierListResponse(OCIDataResponse):
    """Response to a ServiceProviderPreferredCarrierGetCarrierListRequest.
        Contains the lists of carriers for a specified country code for a service provider / enterprise.

    Attributes:

        intra_lata_carrier (Optional[List[str]]):

        inter_lata_carrier (Optional[List[str]]):

        international_carrier (Optional[List[str]]):

    """

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

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

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

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 ServiceProviderPreferredCarrierGetCarrierListRequest

client = Client()

command = ServiceProviderPreferredCarrierGetCarrierListRequest(
    service_provider_id=...,
    country_code=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip.client import Client

client = Client()

response = client.raw_command("ServiceProviderPreferredCarrierGetCarrierListRequest",
    service_provider_id=...,
    country_code=...,
)

print(response)