sinch.domains.numbers.api.v1 package
- class sinch.domains.numbers.api.v1.ActiveNumbers(sinch)[source]
Bases:
BaseNumbers- list(
- region_code: str | None = None,
- number_type: Literal['MOBILE', 'LOCAL', 'TOLL_FREE'] | Annotated[str, Strict(strict=True)] | None = None,
- 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,
- page_token: str | None = None,
- order_by: Literal['PHONE_NUMBER', 'DISPLAY_NAME'] | Annotated[str, Strict(strict=True)] | None = None,
- **kwargs,
- Parameters:
region_code (str | None)
number_type (Literal['MOBILE', 'LOCAL', 'TOLL_FREE'] | ~typing.Annotated[str, ~pydantic.types.Strict(strict=True)] | None)
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)
page_token (str | None)
order_by (Literal['PHONE_NUMBER', 'DISPLAY_NAME'] | ~typing.Annotated[str, ~pydantic.types.Strict(strict=True)] | None)
- Return type:
- update(
- phone_number: str,
- display_name: str | 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,
- Parameters:
phone_number (str)
display_name (str | None)
sms_configuration (SmsConfigurationDict | None)
voice_configuration (Annotated[VoiceConfigurationFAXDict | VoiceConfigurationRTCDict | VoiceConfigurationESTDict | VoiceConfigurationCustomDict, FieldInfo(annotation=NoneType, required=True, discriminator='type')] | None)
event_destination_target (str | None)
- Return type:
- get(
- phone_number: str,
- **kwargs,
- Parameters:
phone_number (str)
- Return type:
- release(
- phone_number: str,
- **kwargs,
- Parameters:
phone_number (str)
- Return type:
- class sinch.domains.numbers.api.v1.AvailableNumbers(sinch)[source]
Bases:
BaseNumbers- check_availability(
- phone_number: str,
- **kwargs,
- Parameters:
phone_number (str)
- Return type:
- 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,
- 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:
- 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,
- Parameters:
phone_number (str)
sms_configuration (SmsConfigurationDict | None)
voice_configuration (Annotated[VoiceConfigurationFAXDict | VoiceConfigurationRTCDict | VoiceConfigurationESTDict | VoiceConfigurationCustomDict, FieldInfo(annotation=NoneType, required=True, discriminator='type')] | None)
event_destination_target (str | None)
- Return type:
- 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,
- Parameters:
region_code (str)
number_type (Literal['MOBILE', 'LOCAL', 'TOLL_FREE'] | ~typing.Annotated[str, ~pydantic.types.Strict(strict=True)])
number_pattern (NumberPatternDict | None)
capabilities (List[Literal['SMS', 'VOICE'] | ~typing.Annotated[str, ~pydantic.types.Strict(strict=True)]] | None)
sms_configuration (SmsConfigurationDict | None)
voice_configuration (Annotated[VoiceConfigurationFAXDict | VoiceConfigurationRTCDict | VoiceConfigurationESTDict | VoiceConfigurationCustomDict, FieldInfo(annotation=NoneType, required=True, discriminator='type')] | None)
event_destination_target (str | None)
- Return type:
- class sinch.domains.numbers.api.v1.AvailableRegions(sinch)[source]
Bases:
object- list(
- types: List[Literal['MOBILE', 'LOCAL', 'TOLL_FREE'] | Annotated[str, Strict(strict=True)]] | None = None,
- **kwargs,
Lists all regions for numbers provided using the project ID. Some numbers can be configured for multiple regions. See which regions apply to your virtual number.
- Parameters:
types (Optional[List[NumberType]]) – List of number types to filter the regions.
kwargs (Optional[dict]) – Additional parameters for the request.
- Returns:
A paginator object containing the list of available regions.
- Return type:
Paginator[Region]
For additional documentation, see https://www.sinch.com and visit our developer portal.
- class sinch.domains.numbers.api.v1.EventDestinations(sinch)[source]
Bases:
BaseNumbers- get(
- **kwargs,
Returns the event destination configuration for the specified project
- Parameters:
kwargs (dict) – Additional parameters for the request.
- Returns:
The event destination configuration for the project.
- Return type:
For detailed documentation, visit: https://developers.sinch.com
- update(
- hmac_secret: str,
- **kwargs,
Updates the event destination configuration for the specified project
- Parameters:
hmac_secret (str) – The HMAC secret used to sign the event destination requests.
kwargs (dict) – Additional parameters for the request.
- Returns:
The updated event destination configuration for the project.
- Return type:
For detailed documentation, visit https://developers.sinch.com