sinch.domains.numbers.api.v1.available_numbers_apis module

class sinch.domains.numbers.api.v1.available_numbers_apis.AvailableNumbers(sinch)[source]

Bases: BaseNumbers

check_availability(
phone_number: str,
**kwargs,
) AvailableNumber[source]
Parameters:

phone_number (str)

Return type:

AvailableNumber

search_for_available_numbers(
region_code: str,
number_type: Literal['MOBILE', 'LOCAL', 'TOLL_FREE'] | Annotated[str, Strict(strict=True)],
number_pattern: str | None = None,
number_search_pattern: Literal['START', 'CONTAINS', 'END'] | Annotated[str, Strict(strict=True)] | None = None,
capabilities: List[Literal['SMS', 'VOICE'] | Annotated[str, Strict(strict=True)]] | None = None,
page_size: int | None = None,
**kwargs,
) Paginator[AvailableNumber][source]
Parameters:
  • region_code (str)

  • number_type (Literal['MOBILE', 'LOCAL', 'TOLL_FREE'] | ~typing.Annotated[str, ~pydantic.types.Strict(strict=True)])

  • number_pattern (str | None)

  • number_search_pattern (Literal['START', 'CONTAINS', 'END'] | ~typing.Annotated[str, ~pydantic.types.Strict(strict=True)] | None)

  • capabilities (List[Literal['SMS', 'VOICE'] | ~typing.Annotated[str, ~pydantic.types.Strict(strict=True)]] | None)

  • page_size (int | None)

Return type:

Paginator[AvailableNumber]

rent(
phone_number: str,
sms_configuration: SmsConfigurationDict | None = None,
voice_configuration: Annotated[VoiceConfigurationFAXDict | VoiceConfigurationRTCDict | VoiceConfigurationESTDict | VoiceConfigurationCustomDict, FieldInfo(annotation=NoneType, required=True, discriminator='type')] | None = None,
event_destination_target: str | None = None,
**kwargs,
) ActiveNumber[source]
Parameters:
Return type:

ActiveNumber

rent_any(
region_code: str,
number_type: Literal['MOBILE', 'LOCAL', 'TOLL_FREE'] | Annotated[str, Strict(strict=True)],
number_pattern: NumberPatternDict | None = None,
capabilities: List[Literal['SMS', 'VOICE'] | Annotated[str, Strict(strict=True)]] | None = None,
sms_configuration: SmsConfigurationDict | None = None,
voice_configuration: Annotated[VoiceConfigurationFAXDict | VoiceConfigurationRTCDict | VoiceConfigurationESTDict | VoiceConfigurationCustomDict, FieldInfo(annotation=NoneType, required=True, discriminator='type')] | None = None,
event_destination_target: str | None = None,
**kwargs,
) ActiveNumber[source]
Parameters:
Return type:

ActiveNumber