twilio.rest.lookups.v2 package

Submodules

twilio.rest.lookups.v2.phone_number module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.lookups.v2.phone_number.PhoneNumberContext(version, phone_number)[source]

Bases: twilio.base.instance_context.InstanceContext

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

fetch(fields=<object object>, country_code=<object object>)[source]

Fetch the PhoneNumberInstance

Parameters:
  • fields (unicode) – Fields to return
  • country_code (unicode) – Country code for national phone number lookups
Returns:

The fetched PhoneNumberInstance

Return type:

twilio.rest.lookups.v2.phone_number.PhoneNumberInstance

class twilio.rest.lookups.v2.phone_number.PhoneNumberInstance(version, payload, phone_number=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

class Type[source]

Bases: object

LANDLINE = 'landline'
MOBILE = 'mobile'
VOIP = 'voip'
class ValidationError[source]

Bases: object

INVALID_BUT_POSSIBLE = 'INVALID_BUT_POSSIBLE'
INVALID_COUNTRY_CODE = 'INVALID_COUNTRY_CODE'
INVALID_LENGTH = 'INVALID_LENGTH'
NOT_A_NUMBER = 'NOT_A_NUMBER'
TOO_LONG = 'TOO_LONG'
TOO_SHORT = 'TOO_SHORT'
call_forwarding
Returns:An object that contains call forwarding status information
Return type:dict
caller_name
Returns:An object that contains caller name information
Return type:dict
calling_country_code
Returns:International dialing prefix
Return type:unicode
country_code
Returns:Phone number’s ISO country code
Return type:unicode
enhanced_line_type
Returns:An object that contains line type information
Return type:dict
fetch(fields=<object object>, country_code=<object object>)[source]

Fetch the PhoneNumberInstance

Parameters:
  • fields (unicode) – Fields to return
  • country_code (unicode) – Country code for national phone number lookups
Returns:

The fetched PhoneNumberInstance

Return type:

twilio.rest.lookups.v2.phone_number.PhoneNumberInstance

line_type_intelligence
Returns:An object that contains line type information
Return type:dict
live_activity
Returns:An object that contains live activity information
Return type:dict
national_format
Returns:Phone number in national format
Return type:unicode
phone_number
Returns:Phone number in E.164 format
Return type:unicode
sim_swap
Returns:An object that contains SIM swap information
Return type:dict
url
Returns:The absolute URL of the resource
Return type:unicode
valid
Returns:Boolean which indicates if the phone number is valid
Return type:bool
validation_errors
Returns:Contains reasons why a phone number is invalid
Return type:list[PhoneNumberInstance.ValidationError]
class twilio.rest.lookups.v2.phone_number.PhoneNumberList(version)[source]

Bases: twilio.base.list_resource.ListResource

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

get(phone_number)[source]

Constructs a PhoneNumberContext

Parameters:phone_number – Phone number to lookup
Returns:twilio.rest.lookups.v2.phone_number.PhoneNumberContext
Return type:twilio.rest.lookups.v2.phone_number.PhoneNumberContext
class twilio.rest.lookups.v2.phone_number.PhoneNumberPage(version, response, solution)[source]

Bases: twilio.base.page.Page

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

get_instance(payload)[source]

Build an instance of PhoneNumberInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.lookups.v2.phone_number.PhoneNumberInstance
Return type:twilio.rest.lookups.v2.phone_number.PhoneNumberInstance

Module contents

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.lookups.v2.V2(domain)[source]

Bases: twilio.base.version.Version

phone_numbers
Return type:twilio.rest.lookups.v2.phone_number.PhoneNumberList