Module mailslurp_client.api.phone_controller_api
MailSlurp API
MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - Homepage - Get an API KEY - Generated SDK Clients - Examples repository # noqa: E501
The version of the OpenAPI document: 6.5.2 Contact: contact@mailslurp.dev Generated by: https://openapi-generator.tech
Classes
class PhoneControllerApi (api_client=None)-
NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech
Do not edit the class manually.
Expand source code
class PhoneControllerApi(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def acquire_phone_pool_lease(self, pool_id, acquire_phone_pool_lease_options, **kwargs): # noqa: E501 """Acquire phone pool lease # noqa: E501 Acquire an available phone number from the pool and mark it leased # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.acquire_phone_pool_lease(pool_id, acquire_phone_pool_lease_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str pool_id: (required) :param AcquirePhonePoolLeaseOptions acquire_phone_pool_lease_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhonePoolLeaseDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.acquire_phone_pool_lease_with_http_info(pool_id, acquire_phone_pool_lease_options, **kwargs) # noqa: E501 def acquire_phone_pool_lease_with_http_info(self, pool_id, acquire_phone_pool_lease_options, **kwargs): # noqa: E501 """Acquire phone pool lease # noqa: E501 Acquire an available phone number from the pool and mark it leased # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.acquire_phone_pool_lease_with_http_info(pool_id, acquire_phone_pool_lease_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str pool_id: (required) :param AcquirePhonePoolLeaseOptions acquire_phone_pool_lease_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhonePoolLeaseDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'pool_id', 'acquire_phone_pool_lease_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method acquire_phone_pool_lease" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pool_id' is set if self.api_client.client_side_validation and ('pool_id' not in local_var_params or # noqa: E501 local_var_params['pool_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pool_id` when calling `acquire_phone_pool_lease`") # noqa: E501 # verify the required parameter 'acquire_phone_pool_lease_options' is set if self.api_client.client_side_validation and ('acquire_phone_pool_lease_options' not in local_var_params or # noqa: E501 local_var_params['acquire_phone_pool_lease_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `acquire_phone_pool_lease_options` when calling `acquire_phone_pool_lease`") # noqa: E501 collection_formats = {} path_params = {} if 'pool_id' in local_var_params: path_params['poolId'] = local_var_params['pool_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'acquire_phone_pool_lease_options' in local_var_params: body_params = local_var_params['acquire_phone_pool_lease_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/pools/{poolId}/leases', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhonePoolLeaseDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def add_all_phone_numbers_to_phone_pool(self, pool_id, **kwargs): # noqa: E501 """Add all phone numbers to phone pool # noqa: E501 Add all active owned phone numbers to a pool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_all_phone_numbers_to_phone_pool(pool_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str pool_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhonePoolDetailDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.add_all_phone_numbers_to_phone_pool_with_http_info(pool_id, **kwargs) # noqa: E501 def add_all_phone_numbers_to_phone_pool_with_http_info(self, pool_id, **kwargs): # noqa: E501 """Add all phone numbers to phone pool # noqa: E501 Add all active owned phone numbers to a pool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_all_phone_numbers_to_phone_pool_with_http_info(pool_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str pool_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhonePoolDetailDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'pool_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method add_all_phone_numbers_to_phone_pool" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pool_id' is set if self.api_client.client_side_validation and ('pool_id' not in local_var_params or # noqa: E501 local_var_params['pool_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pool_id` when calling `add_all_phone_numbers_to_phone_pool`") # noqa: E501 collection_formats = {} path_params = {} if 'pool_id' in local_var_params: path_params['poolId'] = local_var_params['pool_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/pools/{poolId}/numbers/add-all', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhonePoolDetailDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def add_phone_number_tags(self, phone_number_id, phone_number_tags_options, **kwargs): # noqa: E501 """Add phone number tags # noqa: E501 Add one or more tags to a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_phone_number_tags(phone_number_id, phone_number_tags_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param PhoneNumberTagsOptions phone_number_tags_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.add_phone_number_tags_with_http_info(phone_number_id, phone_number_tags_options, **kwargs) # noqa: E501 def add_phone_number_tags_with_http_info(self, phone_number_id, phone_number_tags_options, **kwargs): # noqa: E501 """Add phone number tags # noqa: E501 Add one or more tags to a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_phone_number_tags_with_http_info(phone_number_id, phone_number_tags_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param PhoneNumberTagsOptions phone_number_tags_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'phone_number_id', 'phone_number_tags_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method add_phone_number_tags" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone_number_id' is set if self.api_client.client_side_validation and ('phone_number_id' not in local_var_params or # noqa: E501 local_var_params['phone_number_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone_number_id` when calling `add_phone_number_tags`") # noqa: E501 # verify the required parameter 'phone_number_tags_options' is set if self.api_client.client_side_validation and ('phone_number_tags_options' not in local_var_params or # noqa: E501 local_var_params['phone_number_tags_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone_number_tags_options` when calling `add_phone_number_tags`") # noqa: E501 collection_formats = {} path_params = {} if 'phone_number_id' in local_var_params: path_params['phoneNumberId'] = local_var_params['phone_number_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'phone_number_tags_options' in local_var_params: body_params = local_var_params['phone_number_tags_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/numbers/{phoneNumberId}/tags', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhoneNumberDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def add_phone_numbers_to_phone_pool(self, pool_id, add_phone_pool_numbers_options, **kwargs): # noqa: E501 """Add phone numbers to phone pool # noqa: E501 Add one or more owned phone numbers to a pool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_phone_numbers_to_phone_pool(pool_id, add_phone_pool_numbers_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str pool_id: (required) :param AddPhonePoolNumbersOptions add_phone_pool_numbers_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhonePoolDetailDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.add_phone_numbers_to_phone_pool_with_http_info(pool_id, add_phone_pool_numbers_options, **kwargs) # noqa: E501 def add_phone_numbers_to_phone_pool_with_http_info(self, pool_id, add_phone_pool_numbers_options, **kwargs): # noqa: E501 """Add phone numbers to phone pool # noqa: E501 Add one or more owned phone numbers to a pool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_phone_numbers_to_phone_pool_with_http_info(pool_id, add_phone_pool_numbers_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str pool_id: (required) :param AddPhonePoolNumbersOptions add_phone_pool_numbers_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhonePoolDetailDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'pool_id', 'add_phone_pool_numbers_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method add_phone_numbers_to_phone_pool" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pool_id' is set if self.api_client.client_side_validation and ('pool_id' not in local_var_params or # noqa: E501 local_var_params['pool_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pool_id` when calling `add_phone_numbers_to_phone_pool`") # noqa: E501 # verify the required parameter 'add_phone_pool_numbers_options' is set if self.api_client.client_side_validation and ('add_phone_pool_numbers_options' not in local_var_params or # noqa: E501 local_var_params['add_phone_pool_numbers_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `add_phone_pool_numbers_options` when calling `add_phone_numbers_to_phone_pool`") # noqa: E501 collection_formats = {} path_params = {} if 'pool_id' in local_var_params: path_params['poolId'] = local_var_params['pool_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'add_phone_pool_numbers_options' in local_var_params: body_params = local_var_params['add_phone_pool_numbers_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/pools/{poolId}/numbers', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhonePoolDetailDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def create_emergency_address(self, create_emergency_address_options, **kwargs): # noqa: E501 """Create an emergency address # noqa: E501 Add an emergency address to a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_emergency_address(create_emergency_address_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param CreateEmergencyAddressOptions create_emergency_address_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmergencyAddress If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.create_emergency_address_with_http_info(create_emergency_address_options, **kwargs) # noqa: E501 def create_emergency_address_with_http_info(self, create_emergency_address_options, **kwargs): # noqa: E501 """Create an emergency address # noqa: E501 Add an emergency address to a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_emergency_address_with_http_info(create_emergency_address_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param CreateEmergencyAddressOptions create_emergency_address_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmergencyAddress, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'create_emergency_address_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_emergency_address" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'create_emergency_address_options' is set if self.api_client.client_side_validation and ('create_emergency_address_options' not in local_var_params or # noqa: E501 local_var_params['create_emergency_address_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `create_emergency_address_options` when calling `create_emergency_address`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'create_emergency_address_options' in local_var_params: body_params = local_var_params['create_emergency_address_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/emergency-addresses', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmergencyAddress', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def create_phone_number(self, create_phone_number_options, **kwargs): # noqa: E501 """Add phone number to your account. Only works if you have already added a plan and an initial phone number in your account and acknowledged the pricing and terms of service by enabling API phone creation. # noqa: E501 Create new phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_phone_number(create_phone_number_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param CreatePhoneNumberOptions create_phone_number_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.create_phone_number_with_http_info(create_phone_number_options, **kwargs) # noqa: E501 def create_phone_number_with_http_info(self, create_phone_number_options, **kwargs): # noqa: E501 """Add phone number to your account. Only works if you have already added a plan and an initial phone number in your account and acknowledged the pricing and terms of service by enabling API phone creation. # noqa: E501 Create new phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_phone_number_with_http_info(create_phone_number_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param CreatePhoneNumberOptions create_phone_number_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'create_phone_number_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_phone_number" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'create_phone_number_options' is set if self.api_client.client_side_validation and ('create_phone_number_options' not in local_var_params or # noqa: E501 local_var_params['create_phone_number_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `create_phone_number_options` when calling `create_phone_number`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'create_phone_number_options' in local_var_params: body_params = local_var_params['create_phone_number_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhoneNumberDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def create_phone_pool(self, create_phone_pool_options, **kwargs): # noqa: E501 """Create phone pool # noqa: E501 Create a reusable pool of phone numbers for coordinated leasing # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_phone_pool(create_phone_pool_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param CreatePhonePoolOptions create_phone_pool_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhonePoolDetailDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.create_phone_pool_with_http_info(create_phone_pool_options, **kwargs) # noqa: E501 def create_phone_pool_with_http_info(self, create_phone_pool_options, **kwargs): # noqa: E501 """Create phone pool # noqa: E501 Create a reusable pool of phone numbers for coordinated leasing # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_phone_pool_with_http_info(create_phone_pool_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param CreatePhonePoolOptions create_phone_pool_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhonePoolDetailDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'create_phone_pool_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_phone_pool" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'create_phone_pool_options' is set if self.api_client.client_side_validation and ('create_phone_pool_options' not in local_var_params or # noqa: E501 local_var_params['create_phone_pool_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `create_phone_pool_options` when calling `create_phone_pool`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'create_phone_pool_options' in local_var_params: body_params = local_var_params['create_phone_pool_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/pools', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhonePoolDetailDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def create_phone_provisioning_job(self, create_phone_provisioning_job_options, **kwargs): # noqa: E501 """Create a phone provisioning job # noqa: E501 Create an advanced phone provisioning job from shortlisted numbers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_phone_provisioning_job(create_phone_provisioning_job_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param CreatePhoneProvisioningJobOptions create_phone_provisioning_job_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneProvisioningJobDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.create_phone_provisioning_job_with_http_info(create_phone_provisioning_job_options, **kwargs) # noqa: E501 def create_phone_provisioning_job_with_http_info(self, create_phone_provisioning_job_options, **kwargs): # noqa: E501 """Create a phone provisioning job # noqa: E501 Create an advanced phone provisioning job from shortlisted numbers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_phone_provisioning_job_with_http_info(create_phone_provisioning_job_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param CreatePhoneProvisioningJobOptions create_phone_provisioning_job_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneProvisioningJobDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'create_phone_provisioning_job_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_phone_provisioning_job" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'create_phone_provisioning_job_options' is set if self.api_client.client_side_validation and ('create_phone_provisioning_job_options' not in local_var_params or # noqa: E501 local_var_params['create_phone_provisioning_job_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `create_phone_provisioning_job_options` when calling `create_phone_provisioning_job`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'create_phone_provisioning_job_options' in local_var_params: body_params = local_var_params['create_phone_provisioning_job_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/provisioning/jobs', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhoneProvisioningJobDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def delete_all_phone_number(self, **kwargs): # noqa: E501 """Delete all phone numbers # noqa: E501 Remove all phone number from account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_all_phone_number(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.delete_all_phone_number_with_http_info(**kwargs) # noqa: E501 def delete_all_phone_number_with_http_info(self, **kwargs): # noqa: E501 """Delete all phone numbers # noqa: E501 Remove all phone number from account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_all_phone_number_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_all_phone_number" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/numbers', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def delete_emergency_address(self, address_id, **kwargs): # noqa: E501 """Delete an emergency address # noqa: E501 Delete an emergency address # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_emergency_address(address_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str address_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmptyResponseDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.delete_emergency_address_with_http_info(address_id, **kwargs) # noqa: E501 def delete_emergency_address_with_http_info(self, address_id, **kwargs): # noqa: E501 """Delete an emergency address # noqa: E501 Delete an emergency address # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_emergency_address_with_http_info(address_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str address_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmptyResponseDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'address_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_emergency_address" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'address_id' is set if self.api_client.client_side_validation and ('address_id' not in local_var_params or # noqa: E501 local_var_params['address_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `address_id` when calling `delete_emergency_address`") # noqa: E501 collection_formats = {} path_params = {} if 'address_id' in local_var_params: path_params['addressId'] = local_var_params['address_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/emergency-addresses/{addressId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmptyResponseDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def delete_phone_message_thread_items(self, phone_number_id, other_number, **kwargs): # noqa: E501 """Delete messages in a phone thread # noqa: E501 Delete all messages in an SMS thread # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_phone_message_thread_items(phone_number_id, other_number, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param str other_number: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmptyResponseDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.delete_phone_message_thread_items_with_http_info(phone_number_id, other_number, **kwargs) # noqa: E501 def delete_phone_message_thread_items_with_http_info(self, phone_number_id, other_number, **kwargs): # noqa: E501 """Delete messages in a phone thread # noqa: E501 Delete all messages in an SMS thread # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_phone_message_thread_items_with_http_info(phone_number_id, other_number, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param str other_number: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmptyResponseDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'phone_number_id', 'other_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_phone_message_thread_items" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone_number_id' is set if self.api_client.client_side_validation and ('phone_number_id' not in local_var_params or # noqa: E501 local_var_params['phone_number_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone_number_id` when calling `delete_phone_message_thread_items`") # noqa: E501 # verify the required parameter 'other_number' is set if self.api_client.client_side_validation and ('other_number' not in local_var_params or # noqa: E501 local_var_params['other_number'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `other_number` when calling `delete_phone_message_thread_items`") # noqa: E501 collection_formats = {} path_params = {} if 'phone_number_id' in local_var_params: path_params['phoneNumberId'] = local_var_params['phone_number_id'] # noqa: E501 if 'other_number' in local_var_params: path_params['otherNumber'] = local_var_params['other_number'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/numbers/{phoneNumberId}/message-threads/{otherNumber}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmptyResponseDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def delete_phone_number(self, phone_number_id, **kwargs): # noqa: E501 """Delete a phone number # noqa: E501 Remove phone number from account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_phone_number(phone_number_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.delete_phone_number_with_http_info(phone_number_id, **kwargs) # noqa: E501 def delete_phone_number_with_http_info(self, phone_number_id, **kwargs): # noqa: E501 """Delete a phone number # noqa: E501 Remove phone number from account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_phone_number_with_http_info(phone_number_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'phone_number_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_phone_number" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone_number_id' is set if self.api_client.client_side_validation and ('phone_number_id' not in local_var_params or # noqa: E501 local_var_params['phone_number_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone_number_id` when calling `delete_phone_number`") # noqa: E501 collection_formats = {} path_params = {} if 'phone_number_id' in local_var_params: path_params['phoneNumberId'] = local_var_params['phone_number_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/numbers/{phoneNumberId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def delete_phone_pool(self, pool_id, **kwargs): # noqa: E501 """Delete phone pool # noqa: E501 Delete a phone pool and release any active leases from that pool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_phone_pool(pool_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str pool_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.delete_phone_pool_with_http_info(pool_id, **kwargs) # noqa: E501 def delete_phone_pool_with_http_info(self, pool_id, **kwargs): # noqa: E501 """Delete phone pool # noqa: E501 Delete a phone pool and release any active leases from that pool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_phone_pool_with_http_info(pool_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str pool_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'pool_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_phone_pool" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pool_id' is set if self.api_client.client_side_validation and ('pool_id' not in local_var_params or # noqa: E501 local_var_params['pool_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pool_id` when calling `delete_phone_pool`") # noqa: E501 collection_formats = {} path_params = {} if 'pool_id' in local_var_params: path_params['poolId'] = local_var_params['pool_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/pools/{poolId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def download_phone_number_media(self, media_id, **kwargs): # noqa: E501 """download_phone_number_media # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.download_phone_number_media(media_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str media_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.download_phone_number_media_with_http_info(media_id, **kwargs) # noqa: E501 def download_phone_number_media_with_http_info(self, media_id, **kwargs): # noqa: E501 """download_phone_number_media # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.download_phone_number_media_with_http_info(media_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str media_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'media_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method download_phone_number_media" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'media_id' is set if self.api_client.client_side_validation and ('media_id' not in local_var_params or # noqa: E501 local_var_params['media_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `media_id` when calling `download_phone_number_media`") # noqa: E501 collection_formats = {} path_params = {} if 'media_id' in local_var_params: path_params['mediaId'] = local_var_params['media_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/media/{mediaId}/bytes', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def download_phone_number_media_base64(self, media_id, **kwargs): # noqa: E501 """download_phone_number_media_base64 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.download_phone_number_media_base64(media_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str media_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.download_phone_number_media_base64_with_http_info(media_id, **kwargs) # noqa: E501 def download_phone_number_media_base64_with_http_info(self, media_id, **kwargs): # noqa: E501 """download_phone_number_media_base64 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.download_phone_number_media_base64_with_http_info(media_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str media_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'media_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method download_phone_number_media_base64" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'media_id' is set if self.api_client.client_side_validation and ('media_id' not in local_var_params or # noqa: E501 local_var_params['media_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `media_id` when calling `download_phone_number_media_base64`") # noqa: E501 collection_formats = {} path_params = {} if 'media_id' in local_var_params: path_params['mediaId'] = local_var_params['media_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/media/{mediaId}/base64', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def export_phone_numbers_csv(self, **kwargs): # noqa: E501 """Export phone numbers CSV # noqa: E501 Download all active phone numbers for account as CSV # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.export_phone_numbers_csv(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.export_phone_numbers_csv_with_http_info(**kwargs) # noqa: E501 def export_phone_numbers_csv_with_http_info(self, **kwargs): # noqa: E501 """Export phone numbers CSV # noqa: E501 Download all active phone numbers for account as CSV # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.export_phone_numbers_csv_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method export_phone_numbers_csv" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/numbers/csv', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_all_phone_message_threads(self, **kwargs): # noqa: E501 """Get the latest messages for all phones # noqa: E501 List all message threads for all phones # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_all_phone_message_threads(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param int page: :param int size: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PagePhoneMessageThreadProjection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_all_phone_message_threads_with_http_info(**kwargs) # noqa: E501 def get_all_phone_message_threads_with_http_info(self, **kwargs): # noqa: E501 """Get the latest messages for all phones # noqa: E501 List all message threads for all phones # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_all_phone_message_threads_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param int page: :param int size: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PagePhoneMessageThreadProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'page', 'size' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_all_phone_message_threads" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 query_params.append(('page', local_var_params['page'])) # noqa: E501 if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 query_params.append(('size', local_var_params['size'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/numbers/message-threads', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PagePhoneMessageThreadProjection', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_all_phone_number_releases(self, **kwargs): # noqa: E501 """Get all phone number releases # noqa: E501 List released or deleted phone numbers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_all_phone_number_releases(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param int page: :param int size: :param str sort: Optional createdAt sort direction ASC or DESC :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PagePhoneNumberReleaseProjection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_all_phone_number_releases_with_http_info(**kwargs) # noqa: E501 def get_all_phone_number_releases_with_http_info(self, **kwargs): # noqa: E501 """Get all phone number releases # noqa: E501 List released or deleted phone numbers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_all_phone_number_releases_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param int page: :param int size: :param str sort: Optional createdAt sort direction ASC or DESC :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PagePhoneNumberReleaseProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'page', 'size', 'sort' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_all_phone_number_releases" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 query_params.append(('page', local_var_params['page'])) # noqa: E501 if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 query_params.append(('size', local_var_params['size'])) # noqa: E501 if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 query_params.append(('sort', local_var_params['sort'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/releases', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PagePhoneNumberReleaseProjection', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_consent_status(self, **kwargs): # noqa: E501 """Get consent status # noqa: E501 Get the status of phone usage consent # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_consent_status(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: ConsentStatusDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_consent_status_with_http_info(**kwargs) # noqa: E501 def get_consent_status_with_http_info(self, **kwargs): # noqa: E501 """Get consent status # noqa: E501 Get the status of phone usage consent # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_consent_status_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(ConsentStatusDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_consent_status" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/consent', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ConsentStatusDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_emergency_address(self, address_id, **kwargs): # noqa: E501 """Get an emergency address # noqa: E501 Fetch an emergency address by ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_emergency_address(address_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str address_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmergencyAddress If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_emergency_address_with_http_info(address_id, **kwargs) # noqa: E501 def get_emergency_address_with_http_info(self, address_id, **kwargs): # noqa: E501 """Get an emergency address # noqa: E501 Fetch an emergency address by ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_emergency_address_with_http_info(address_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str address_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmergencyAddress, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'address_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_emergency_address" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'address_id' is set if self.api_client.client_side_validation and ('address_id' not in local_var_params or # noqa: E501 local_var_params['address_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `address_id` when calling `get_emergency_address`") # noqa: E501 collection_formats = {} path_params = {} if 'address_id' in local_var_params: path_params['addressId'] = local_var_params['address_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/emergency-addresses/{addressId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EmergencyAddress', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_emergency_addresses(self, **kwargs): # noqa: E501 """Get emergency addresses # noqa: E501 List emergency addresses # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_emergency_addresses(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: list[EmergencyAddressDto] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_emergency_addresses_with_http_info(**kwargs) # noqa: E501 def get_emergency_addresses_with_http_info(self, **kwargs): # noqa: E501 """Get emergency addresses # noqa: E501 List emergency addresses # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_emergency_addresses_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(list[EmergencyAddressDto], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_emergency_addresses" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/emergency-addresses', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[EmergencyAddressDto]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_or_create_phone_pool(self, get_or_create_phone_pool_options, **kwargs): # noqa: E501 """Get or create phone pool # noqa: E501 Get a phone pool by name or create it if it does not exist # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_or_create_phone_pool(get_or_create_phone_pool_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param GetOrCreatePhonePoolOptions get_or_create_phone_pool_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhonePoolDetailDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_or_create_phone_pool_with_http_info(get_or_create_phone_pool_options, **kwargs) # noqa: E501 def get_or_create_phone_pool_with_http_info(self, get_or_create_phone_pool_options, **kwargs): # noqa: E501 """Get or create phone pool # noqa: E501 Get a phone pool by name or create it if it does not exist # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_or_create_phone_pool_with_http_info(get_or_create_phone_pool_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param GetOrCreatePhonePoolOptions get_or_create_phone_pool_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhonePoolDetailDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'get_or_create_phone_pool_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_or_create_phone_pool" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'get_or_create_phone_pool_options' is set if self.api_client.client_side_validation and ('get_or_create_phone_pool_options' not in local_var_params or # noqa: E501 local_var_params['get_or_create_phone_pool_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `get_or_create_phone_pool_options` when calling `get_or_create_phone_pool`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'get_or_create_phone_pool_options' in local_var_params: body_params = local_var_params['get_or_create_phone_pool_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/pools/get-or-create', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhonePoolDetailDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_message_thread_items(self, phone_number_id, other_number, **kwargs): # noqa: E501 """Get messages in a phone thread # noqa: E501 List message thread messages for a phone message thread # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_message_thread_items(phone_number_id, other_number, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param str other_number: (required) :param int page: :param int size: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PagePhoneMessageThreadItemProjection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_message_thread_items_with_http_info(phone_number_id, other_number, **kwargs) # noqa: E501 def get_phone_message_thread_items_with_http_info(self, phone_number_id, other_number, **kwargs): # noqa: E501 """Get messages in a phone thread # noqa: E501 List message thread messages for a phone message thread # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_message_thread_items_with_http_info(phone_number_id, other_number, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param str other_number: (required) :param int page: :param int size: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PagePhoneMessageThreadItemProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'phone_number_id', 'other_number', 'page', 'size' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_message_thread_items" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone_number_id' is set if self.api_client.client_side_validation and ('phone_number_id' not in local_var_params or # noqa: E501 local_var_params['phone_number_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone_number_id` when calling `get_phone_message_thread_items`") # noqa: E501 # verify the required parameter 'other_number' is set if self.api_client.client_side_validation and ('other_number' not in local_var_params or # noqa: E501 local_var_params['other_number'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `other_number` when calling `get_phone_message_thread_items`") # noqa: E501 collection_formats = {} path_params = {} if 'phone_number_id' in local_var_params: path_params['phoneNumberId'] = local_var_params['phone_number_id'] # noqa: E501 if 'other_number' in local_var_params: path_params['otherNumber'] = local_var_params['other_number'] # noqa: E501 query_params = [] if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 query_params.append(('page', local_var_params['page'])) # noqa: E501 if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 query_params.append(('size', local_var_params['size'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/numbers/{phoneNumberId}/message-threads/{otherNumber}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PagePhoneMessageThreadItemProjection', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_message_threads(self, phone_number_id, **kwargs): # noqa: E501 """Get the latest message preview for a thread # noqa: E501 List message threads for a phone # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_message_threads(phone_number_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param int page: :param int size: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PagePhoneMessageThreadProjection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_message_threads_with_http_info(phone_number_id, **kwargs) # noqa: E501 def get_phone_message_threads_with_http_info(self, phone_number_id, **kwargs): # noqa: E501 """Get the latest message preview for a thread # noqa: E501 List message threads for a phone # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_message_threads_with_http_info(phone_number_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param int page: :param int size: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PagePhoneMessageThreadProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'phone_number_id', 'page', 'size' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_message_threads" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone_number_id' is set if self.api_client.client_side_validation and ('phone_number_id' not in local_var_params or # noqa: E501 local_var_params['phone_number_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone_number_id` when calling `get_phone_message_threads`") # noqa: E501 collection_formats = {} path_params = {} if 'phone_number_id' in local_var_params: path_params['phoneNumberId'] = local_var_params['phone_number_id'] # noqa: E501 query_params = [] if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 query_params.append(('page', local_var_params['page'])) # noqa: E501 if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 query_params.append(('size', local_var_params['size'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/numbers/{phoneNumberId}/message-threads', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PagePhoneMessageThreadProjection', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_number(self, phone_number_id, **kwargs): # noqa: E501 """Get a phone number by ID # noqa: E501 Get a phone number by ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_number(phone_number_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_number_with_http_info(phone_number_id, **kwargs) # noqa: E501 def get_phone_number_with_http_info(self, phone_number_id, **kwargs): # noqa: E501 """Get a phone number by ID # noqa: E501 Get a phone number by ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_number_with_http_info(phone_number_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'phone_number_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_number" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone_number_id' is set if self.api_client.client_side_validation and ('phone_number_id' not in local_var_params or # noqa: E501 local_var_params['phone_number_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone_number_id` when calling `get_phone_number`") # noqa: E501 collection_formats = {} path_params = {} if 'phone_number_id' in local_var_params: path_params['phoneNumberId'] = local_var_params['phone_number_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/numbers/{phoneNumberId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhoneNumberDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_number_by_name(self, name, **kwargs): # noqa: E501 """Get a phone number by name # noqa: E501 Get a phone number by name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_number_by_name(name, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_number_by_name_with_http_info(name, **kwargs) # noqa: E501 def get_phone_number_by_name_with_http_info(self, name, **kwargs): # noqa: E501 """Get a phone number by name # noqa: E501 Get a phone number by name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_number_by_name_with_http_info(name, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'name' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_number_by_name" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 local_var_params['name'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `get_phone_number_by_name`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 query_params.append(('name', local_var_params['name'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/numbers/by-name', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhoneNumberDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_number_by_phone_number(self, phone_number, **kwargs): # noqa: E501 """Get a phone number by phone number # noqa: E501 Get a phone number by phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_number_by_phone_number(phone_number, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_number_by_phone_number_with_http_info(phone_number, **kwargs) # noqa: E501 def get_phone_number_by_phone_number_with_http_info(self, phone_number, **kwargs): # noqa: E501 """Get a phone number by phone number # noqa: E501 Get a phone number by phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_number_by_phone_number_with_http_info(phone_number, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'phone_number' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_number_by_phone_number" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone_number' is set if self.api_client.client_side_validation and ('phone_number' not in local_var_params or # noqa: E501 local_var_params['phone_number'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone_number` when calling `get_phone_number_by_phone_number`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'phone_number' in local_var_params and local_var_params['phone_number'] is not None: # noqa: E501 query_params.append(('phoneNumber', local_var_params['phone_number'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/numbers/by-phone-number', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhoneNumberDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_number_line_type_intelligence(self, validate_phone_number_options, **kwargs): # noqa: E501 """Get line type intelligence for a phone number # noqa: E501 Lookup line type intelligence for a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_number_line_type_intelligence(validate_phone_number_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param ValidatePhoneNumberOptions validate_phone_number_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberLineTypeLookupDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_number_line_type_intelligence_with_http_info(validate_phone_number_options, **kwargs) # noqa: E501 def get_phone_number_line_type_intelligence_with_http_info(self, validate_phone_number_options, **kwargs): # noqa: E501 """Get line type intelligence for a phone number # noqa: E501 Lookup line type intelligence for a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_number_line_type_intelligence_with_http_info(validate_phone_number_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param ValidatePhoneNumberOptions validate_phone_number_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberLineTypeLookupDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'validate_phone_number_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_number_line_type_intelligence" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'validate_phone_number_options' is set if self.api_client.client_side_validation and ('validate_phone_number_options' not in local_var_params or # noqa: E501 local_var_params['validate_phone_number_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `validate_phone_number_options` when calling `get_phone_number_line_type_intelligence`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'validate_phone_number_options' in local_var_params: body_params = local_var_params['validate_phone_number_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/validate/line-type-intelligence', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhoneNumberLineTypeLookupDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_number_media(self, phone_number_id, **kwargs): # noqa: E501 """get_phone_number_media # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_number_media(phone_number_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param int page: Optional page index in SMS media list pagination :param int size: Optional page size in SMS media list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param datetime since: Optional filter SMS media created after given date time :param datetime before: Optional filter SMS media created before given date time :param str search: Optional search filter :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PageSmsMessageMedia If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_number_media_with_http_info(phone_number_id, **kwargs) # noqa: E501 def get_phone_number_media_with_http_info(self, phone_number_id, **kwargs): # noqa: E501 """get_phone_number_media # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_number_media_with_http_info(phone_number_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param int page: Optional page index in SMS media list pagination :param int size: Optional page size in SMS media list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param datetime since: Optional filter SMS media created after given date time :param datetime before: Optional filter SMS media created before given date time :param str search: Optional search filter :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PageSmsMessageMedia, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'phone_number_id', 'page', 'size', 'sort', 'since', 'before', 'search' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_number_media" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone_number_id' is set if self.api_client.client_side_validation and ('phone_number_id' not in local_var_params or # noqa: E501 local_var_params['phone_number_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone_number_id` when calling `get_phone_number_media`") # noqa: E501 if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 100: # noqa: E501 raise ApiValueError("Invalid value for parameter `size` when calling `get_phone_number_media`, must be a value less than or equal to `100`") # noqa: E501 collection_formats = {} path_params = {} if 'phone_number_id' in local_var_params: path_params['phoneNumberId'] = local_var_params['phone_number_id'] # noqa: E501 query_params = [] if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 query_params.append(('page', local_var_params['page'])) # noqa: E501 if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 query_params.append(('size', local_var_params['size'])) # noqa: E501 if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 query_params.append(('sort', local_var_params['sort'])) # noqa: E501 if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 query_params.append(('since', local_var_params['since'])) # noqa: E501 if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 query_params.append(('before', local_var_params['before'])) # noqa: E501 if 'search' in local_var_params and local_var_params['search'] is not None: # noqa: E501 query_params.append(('search', local_var_params['search'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/{phoneNumberId}/media', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PageSmsMessageMedia', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_number_media1(self, **kwargs): # noqa: E501 """get_phone_number_media1 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_number_media1(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param int page: Optional page index in SMS media list pagination :param int size: Optional page size in SMS media list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param datetime since: Optional filter SMS media created after given date time :param datetime before: Optional filter SMS media created before given date time :param str search: Optional search filter :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PageSmsMessageMedia If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_number_media1_with_http_info(**kwargs) # noqa: E501 def get_phone_number_media1_with_http_info(self, **kwargs): # noqa: E501 """get_phone_number_media1 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_number_media1_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param int page: Optional page index in SMS media list pagination :param int size: Optional page size in SMS media list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param datetime since: Optional filter SMS media created after given date time :param datetime before: Optional filter SMS media created before given date time :param str search: Optional search filter :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PageSmsMessageMedia, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'page', 'size', 'sort', 'since', 'before', 'search' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_number_media1" % key ) local_var_params[key] = val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 100: # noqa: E501 raise ApiValueError("Invalid value for parameter `size` when calling `get_phone_number_media1`, must be a value less than or equal to `100`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 query_params.append(('page', local_var_params['page'])) # noqa: E501 if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 query_params.append(('size', local_var_params['size'])) # noqa: E501 if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 query_params.append(('sort', local_var_params['sort'])) # noqa: E501 if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 query_params.append(('since', local_var_params['since'])) # noqa: E501 if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 query_params.append(('before', local_var_params['before'])) # noqa: E501 if 'search' in local_var_params and local_var_params['search'] is not None: # noqa: E501 query_params.append(('search', local_var_params['search'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/media', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PageSmsMessageMedia', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_number_media_by_id(self, media_id, **kwargs): # noqa: E501 """get_phone_number_media_by_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_number_media_by_id(media_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str media_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: SmsMessageMediaDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_number_media_by_id_with_http_info(media_id, **kwargs) # noqa: E501 def get_phone_number_media_by_id_with_http_info(self, media_id, **kwargs): # noqa: E501 """get_phone_number_media_by_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_number_media_by_id_with_http_info(media_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str media_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(SmsMessageMediaDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'media_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_number_media_by_id" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'media_id' is set if self.api_client.client_side_validation and ('media_id' not in local_var_params or # noqa: E501 local_var_params['media_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `media_id` when calling `get_phone_number_media_by_id`") # noqa: E501 collection_formats = {} path_params = {} if 'media_id' in local_var_params: path_params['mediaId'] = local_var_params['media_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/media/{mediaId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SmsMessageMediaDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_number_release(self, release_id, **kwargs): # noqa: E501 """Get phone number release # noqa: E501 Get a released or deleted phone numbers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_number_release(release_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str release_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberReleaseProjection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_number_release_with_http_info(release_id, **kwargs) # noqa: E501 def get_phone_number_release_with_http_info(self, release_id, **kwargs): # noqa: E501 """Get phone number release # noqa: E501 Get a released or deleted phone numbers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_number_release_with_http_info(release_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str release_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberReleaseProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'release_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_number_release" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'release_id' is set if self.api_client.client_side_validation and ('release_id' not in local_var_params or # noqa: E501 local_var_params['release_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `release_id` when calling `get_phone_number_release`") # noqa: E501 collection_formats = {} path_params = {} if 'release_id' in local_var_params: path_params['releaseId'] = local_var_params['release_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/releases/{releaseId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhoneNumberReleaseProjection', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_number_tags(self, phone_number_id, **kwargs): # noqa: E501 """Get phone number tags # noqa: E501 Get tags for a specific phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_number_tags(phone_number_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: list[str] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_number_tags_with_http_info(phone_number_id, **kwargs) # noqa: E501 def get_phone_number_tags_with_http_info(self, phone_number_id, **kwargs): # noqa: E501 """Get phone number tags # noqa: E501 Get tags for a specific phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_number_tags_with_http_info(phone_number_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'phone_number_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_number_tags" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone_number_id' is set if self.api_client.client_side_validation and ('phone_number_id' not in local_var_params or # noqa: E501 local_var_params['phone_number_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone_number_id` when calling `get_phone_number_tags`") # noqa: E501 collection_formats = {} path_params = {} if 'phone_number_id' in local_var_params: path_params['phoneNumberId'] = local_var_params['phone_number_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/numbers/{phoneNumberId}/tags', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[str]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_numbers(self, **kwargs): # noqa: E501 """Get phone numbers # noqa: E501 List phone numbers for account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_numbers(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_country: Optional phone country :param str line_type: Optional line type filter :param str carrier_name: Optional carrier name filter :param str mobile_country_code: Optional mobile country code filter :param str mobile_network_code: Optional mobile network code filter :param str provider_label: Optional provider label filter such as T1 or T2 :param int page: Optional page index for list pagination :param int size: Optional page size for list pagination :param str sort: Optional createdAt sort direction ASC or DESC :param datetime since: Filter by created at after the given timestamp :param datetime before: Filter by created at before the given timestamp :param str search: Optional search filter :param list[str] tag: Optional tags to filter by. A phone must include all provided tags :param list[str] include: Optional phoneIds to include in result :param bool favourite: Optionally filter results for favourites only :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PagePhoneNumberProjection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_numbers_with_http_info(**kwargs) # noqa: E501 def get_phone_numbers_with_http_info(self, **kwargs): # noqa: E501 """Get phone numbers # noqa: E501 List phone numbers for account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_numbers_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_country: Optional phone country :param str line_type: Optional line type filter :param str carrier_name: Optional carrier name filter :param str mobile_country_code: Optional mobile country code filter :param str mobile_network_code: Optional mobile network code filter :param str provider_label: Optional provider label filter such as T1 or T2 :param int page: Optional page index for list pagination :param int size: Optional page size for list pagination :param str sort: Optional createdAt sort direction ASC or DESC :param datetime since: Filter by created at after the given timestamp :param datetime before: Filter by created at before the given timestamp :param str search: Optional search filter :param list[str] tag: Optional tags to filter by. A phone must include all provided tags :param list[str] include: Optional phoneIds to include in result :param bool favourite: Optionally filter results for favourites only :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PagePhoneNumberProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'phone_country', 'line_type', 'carrier_name', 'mobile_country_code', 'mobile_network_code', 'provider_label', 'page', 'size', 'sort', 'since', 'before', 'search', 'tag', 'include', 'favourite' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_numbers" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'phone_country' in local_var_params and local_var_params['phone_country'] is not None: # noqa: E501 query_params.append(('phoneCountry', local_var_params['phone_country'])) # noqa: E501 if 'line_type' in local_var_params and local_var_params['line_type'] is not None: # noqa: E501 query_params.append(('lineType', local_var_params['line_type'])) # noqa: E501 if 'carrier_name' in local_var_params and local_var_params['carrier_name'] is not None: # noqa: E501 query_params.append(('carrierName', local_var_params['carrier_name'])) # noqa: E501 if 'mobile_country_code' in local_var_params and local_var_params['mobile_country_code'] is not None: # noqa: E501 query_params.append(('mobileCountryCode', local_var_params['mobile_country_code'])) # noqa: E501 if 'mobile_network_code' in local_var_params and local_var_params['mobile_network_code'] is not None: # noqa: E501 query_params.append(('mobileNetworkCode', local_var_params['mobile_network_code'])) # noqa: E501 if 'provider_label' in local_var_params and local_var_params['provider_label'] is not None: # noqa: E501 query_params.append(('providerLabel', local_var_params['provider_label'])) # noqa: E501 if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 query_params.append(('page', local_var_params['page'])) # noqa: E501 if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 query_params.append(('size', local_var_params['size'])) # noqa: E501 if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 query_params.append(('sort', local_var_params['sort'])) # noqa: E501 if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 query_params.append(('since', local_var_params['since'])) # noqa: E501 if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 query_params.append(('before', local_var_params['before'])) # noqa: E501 if 'search' in local_var_params and local_var_params['search'] is not None: # noqa: E501 query_params.append(('search', local_var_params['search'])) # noqa: E501 if 'tag' in local_var_params and local_var_params['tag'] is not None: # noqa: E501 query_params.append(('tag', local_var_params['tag'])) # noqa: E501 collection_formats['tag'] = 'multi' # noqa: E501 if 'include' in local_var_params and local_var_params['include'] is not None: # noqa: E501 query_params.append(('include', local_var_params['include'])) # noqa: E501 collection_formats['include'] = 'multi' # noqa: E501 if 'favourite' in local_var_params and local_var_params['favourite'] is not None: # noqa: E501 query_params.append(('favourite', local_var_params['favourite'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/numbers', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PagePhoneNumberProjection', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_plans(self, **kwargs): # noqa: E501 """Get phone plans # noqa: E501 Get phone number plans # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_plans(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: list[PhonePlanDto] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_plans_with_http_info(**kwargs) # noqa: E501 def get_phone_plans_with_http_info(self, **kwargs): # noqa: E501 """Get phone plans # noqa: E501 Get phone number plans # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_plans_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(list[PhonePlanDto], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_plans" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/plans', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[PhonePlanDto]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_plans_availability(self, **kwargs): # noqa: E501 """Get phone plans availability # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_plans_availability(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhonePlanAvailability If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_plans_availability_with_http_info(**kwargs) # noqa: E501 def get_phone_plans_availability_with_http_info(self, **kwargs): # noqa: E501 """Get phone plans availability # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_plans_availability_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhonePlanAvailability, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_plans_availability" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/plans/availability', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhonePlanAvailability', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_pool(self, pool_id, **kwargs): # noqa: E501 """Get phone pool # noqa: E501 Get phone pool details by ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_pool(pool_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str pool_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhonePoolDetailDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_pool_with_http_info(pool_id, **kwargs) # noqa: E501 def get_phone_pool_with_http_info(self, pool_id, **kwargs): # noqa: E501 """Get phone pool # noqa: E501 Get phone pool details by ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_pool_with_http_info(pool_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str pool_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhonePoolDetailDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'pool_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_pool" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pool_id' is set if self.api_client.client_side_validation and ('pool_id' not in local_var_params or # noqa: E501 local_var_params['pool_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pool_id` when calling `get_phone_pool`") # noqa: E501 collection_formats = {} path_params = {} if 'pool_id' in local_var_params: path_params['poolId'] = local_var_params['pool_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/pools/{poolId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhonePoolDetailDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_pool_by_name(self, name, **kwargs): # noqa: E501 """Get phone pool by name # noqa: E501 Get phone pool details by name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_pool_by_name(name, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhonePoolDetailDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_pool_by_name_with_http_info(name, **kwargs) # noqa: E501 def get_phone_pool_by_name_with_http_info(self, name, **kwargs): # noqa: E501 """Get phone pool by name # noqa: E501 Get phone pool details by name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_pool_by_name_with_http_info(name, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhonePoolDetailDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'name' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_pool_by_name" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 local_var_params['name'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `get_phone_pool_by_name`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 query_params.append(('name', local_var_params['name'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/pools/by-name', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhonePoolDetailDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_pools(self, **kwargs): # noqa: E501 """Get phone pools # noqa: E501 List phone pools for the authenticated user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_pools(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: list[PhonePoolDto] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_pools_with_http_info(**kwargs) # noqa: E501 def get_phone_pools_with_http_info(self, **kwargs): # noqa: E501 """Get phone pools # noqa: E501 List phone pools for the authenticated user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_pools_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(list[PhonePoolDto], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_pools" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/pools', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[PhonePoolDto]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_provisioning_capabilities(self, phone_country, **kwargs): # noqa: E501 """Get phone provisioning capabilities # noqa: E501 Get supported provider-country variant capabilities for advanced provisioning # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_provisioning_capabilities(phone_country, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_country: (required) :param str provider_label: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneProviderCapabilitiesResult If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_provisioning_capabilities_with_http_info(phone_country, **kwargs) # noqa: E501 def get_phone_provisioning_capabilities_with_http_info(self, phone_country, **kwargs): # noqa: E501 """Get phone provisioning capabilities # noqa: E501 Get supported provider-country variant capabilities for advanced provisioning # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_provisioning_capabilities_with_http_info(phone_country, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_country: (required) :param str provider_label: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneProviderCapabilitiesResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'phone_country', 'provider_label' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_provisioning_capabilities" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone_country' is set if self.api_client.client_side_validation and ('phone_country' not in local_var_params or # noqa: E501 local_var_params['phone_country'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone_country` when calling `get_phone_provisioning_capabilities`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'phone_country' in local_var_params and local_var_params['phone_country'] is not None: # noqa: E501 query_params.append(('phoneCountry', local_var_params['phone_country'])) # noqa: E501 if 'provider_label' in local_var_params and local_var_params['provider_label'] is not None: # noqa: E501 query_params.append(('providerLabel', local_var_params['provider_label'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/provisioning/capabilities', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhoneProviderCapabilitiesResult', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_provisioning_job(self, job_id, **kwargs): # noqa: E501 """Get phone provisioning job # noqa: E501 Get advanced phone provisioning job status # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_provisioning_job(job_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str job_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneProvisioningJobDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_provisioning_job_with_http_info(job_id, **kwargs) # noqa: E501 def get_phone_provisioning_job_with_http_info(self, job_id, **kwargs): # noqa: E501 """Get phone provisioning job # noqa: E501 Get advanced phone provisioning job status # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_provisioning_job_with_http_info(job_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str job_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneProvisioningJobDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'job_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_provisioning_job" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'job_id' is set if self.api_client.client_side_validation and ('job_id' not in local_var_params or # noqa: E501 local_var_params['job_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `job_id` when calling `get_phone_provisioning_job`") # noqa: E501 collection_formats = {} path_params = {} if 'job_id' in local_var_params: path_params['jobId'] = local_var_params['job_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/provisioning/jobs/{jobId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhoneProvisioningJobDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_sms_prepaid_credit(self, credit_id, **kwargs): # noqa: E501 """Get SMS prepaid credit # noqa: E501 Get a specific SMS prepaid credit balance for the authenticated account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_sms_prepaid_credit(credit_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str credit_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneSmsPrepaidCreditDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_sms_prepaid_credit_with_http_info(credit_id, **kwargs) # noqa: E501 def get_phone_sms_prepaid_credit_with_http_info(self, credit_id, **kwargs): # noqa: E501 """Get SMS prepaid credit # noqa: E501 Get a specific SMS prepaid credit balance for the authenticated account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_sms_prepaid_credit_with_http_info(credit_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str credit_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneSmsPrepaidCreditDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'credit_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_sms_prepaid_credit" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'credit_id' is set if self.api_client.client_side_validation and ('credit_id' not in local_var_params or # noqa: E501 local_var_params['credit_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `credit_id` when calling `get_phone_sms_prepaid_credit`") # noqa: E501 collection_formats = {} path_params = {} if 'credit_id' in local_var_params: path_params['creditId'] = local_var_params['credit_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/sms-prepaid-credits/{creditId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhoneSmsPrepaidCreditDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_sms_prepaid_credits(self, **kwargs): # noqa: E501 """Get SMS prepaid credits # noqa: E501 List SMS prepaid credits for the authenticated account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_sms_prepaid_credits(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneSmsPrepaidCreditsDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_sms_prepaid_credits_with_http_info(**kwargs) # noqa: E501 def get_phone_sms_prepaid_credits_with_http_info(self, **kwargs): # noqa: E501 """Get SMS prepaid credits # noqa: E501 List SMS prepaid credits for the authenticated account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_sms_prepaid_credits_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneSmsPrepaidCreditsDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_sms_prepaid_credits" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/sms-prepaid-credits', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhoneSmsPrepaidCreditsDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_summary(self, **kwargs): # noqa: E501 """Get phone summary # noqa: E501 Get overview of assigned phones # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_summary(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneSummaryDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_summary_with_http_info(**kwargs) # noqa: E501 def get_phone_summary_with_http_info(self, **kwargs): # noqa: E501 """Get phone summary # noqa: E501 Get overview of assigned phones # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_summary_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneSummaryDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_summary" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/summary', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhoneSummaryDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_phone_tags(self, **kwargs): # noqa: E501 """Get phone tags # noqa: E501 List all unique tags used by your phone numbers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_tags(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str search: Optional search filter :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: list[str] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_phone_tags_with_http_info(**kwargs) # noqa: E501 def get_phone_tags_with_http_info(self, **kwargs): # noqa: E501 """Get phone tags # noqa: E501 List all unique tags used by your phone numbers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_phone_tags_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str search: Optional search filter :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'search' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_phone_tags" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'search' in local_var_params and local_var_params['search'] is not None: # noqa: E501 query_params.append(('search', local_var_params['search'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/tags', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[str]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_sent_sms_by_phone_number(self, phone_number_id, **kwargs): # noqa: E501 """List sent TXT messages for a phone number # noqa: E501 Get sent SMS messages for a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_sent_sms_by_phone_number(phone_number_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param int page: Optional page index in SMS list pagination :param int size: Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param datetime since: Optional filter SMSs received after given date time :param datetime before: Optional filter SMSs received before given date time :param str search: Optional search filter :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PageSentSmsProjection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_sent_sms_by_phone_number_with_http_info(phone_number_id, **kwargs) # noqa: E501 def get_sent_sms_by_phone_number_with_http_info(self, phone_number_id, **kwargs): # noqa: E501 """List sent TXT messages for a phone number # noqa: E501 Get sent SMS messages for a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_sent_sms_by_phone_number_with_http_info(phone_number_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param int page: Optional page index in SMS list pagination :param int size: Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param datetime since: Optional filter SMSs received after given date time :param datetime before: Optional filter SMSs received before given date time :param str search: Optional search filter :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PageSentSmsProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'phone_number_id', 'page', 'size', 'sort', 'since', 'before', 'search' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_sent_sms_by_phone_number" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone_number_id' is set if self.api_client.client_side_validation and ('phone_number_id' not in local_var_params or # noqa: E501 local_var_params['phone_number_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone_number_id` when calling `get_sent_sms_by_phone_number`") # noqa: E501 if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 100: # noqa: E501 raise ApiValueError("Invalid value for parameter `size` when calling `get_sent_sms_by_phone_number`, must be a value less than or equal to `100`") # noqa: E501 collection_formats = {} path_params = {} if 'phone_number_id' in local_var_params: path_params['phoneNumberId'] = local_var_params['phone_number_id'] # noqa: E501 query_params = [] if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 query_params.append(('page', local_var_params['page'])) # noqa: E501 if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 query_params.append(('size', local_var_params['size'])) # noqa: E501 if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 query_params.append(('sort', local_var_params['sort'])) # noqa: E501 if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 query_params.append(('since', local_var_params['since'])) # noqa: E501 if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 query_params.append(('before', local_var_params['before'])) # noqa: E501 if 'search' in local_var_params and local_var_params['search'] is not None: # noqa: E501 query_params.append(('search', local_var_params['search'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/numbers/{phoneNumberId}/sms-sent', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PageSentSmsProjection', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_sms_by_phone_number(self, phone_number_id, **kwargs): # noqa: E501 """List SMS messages for a phone number # noqa: E501 Get SMS messages for a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_sms_by_phone_number(phone_number_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param int page: Optional page index in SMS list pagination :param int size: Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param bool unread_only: Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly :param datetime since: Optional filter SMSs received after given date time :param datetime before: Optional filter SMSs received before given date time :param str search: Optional search filter :param bool favourite: Optionally filter results for favourites only :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PageSmsProjection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_sms_by_phone_number_with_http_info(phone_number_id, **kwargs) # noqa: E501 def get_sms_by_phone_number_with_http_info(self, phone_number_id, **kwargs): # noqa: E501 """List SMS messages for a phone number # noqa: E501 Get SMS messages for a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_sms_by_phone_number_with_http_info(phone_number_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param int page: Optional page index in SMS list pagination :param int size: Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param bool unread_only: Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly :param datetime since: Optional filter SMSs received after given date time :param datetime before: Optional filter SMSs received before given date time :param str search: Optional search filter :param bool favourite: Optionally filter results for favourites only :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PageSmsProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'phone_number_id', 'page', 'size', 'sort', 'unread_only', 'since', 'before', 'search', 'favourite' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_sms_by_phone_number" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone_number_id' is set if self.api_client.client_side_validation and ('phone_number_id' not in local_var_params or # noqa: E501 local_var_params['phone_number_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone_number_id` when calling `get_sms_by_phone_number`") # noqa: E501 if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 100: # noqa: E501 raise ApiValueError("Invalid value for parameter `size` when calling `get_sms_by_phone_number`, must be a value less than or equal to `100`") # noqa: E501 collection_formats = {} path_params = {} if 'phone_number_id' in local_var_params: path_params['phoneNumberId'] = local_var_params['phone_number_id'] # noqa: E501 query_params = [] if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 query_params.append(('page', local_var_params['page'])) # noqa: E501 if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 query_params.append(('size', local_var_params['size'])) # noqa: E501 if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 query_params.append(('sort', local_var_params['sort'])) # noqa: E501 if 'unread_only' in local_var_params and local_var_params['unread_only'] is not None: # noqa: E501 query_params.append(('unreadOnly', local_var_params['unread_only'])) # noqa: E501 if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 query_params.append(('since', local_var_params['since'])) # noqa: E501 if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 query_params.append(('before', local_var_params['before'])) # noqa: E501 if 'search' in local_var_params and local_var_params['search'] is not None: # noqa: E501 query_params.append(('search', local_var_params['search'])) # noqa: E501 if 'favourite' in local_var_params and local_var_params['favourite'] is not None: # noqa: E501 query_params.append(('favourite', local_var_params['favourite'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/numbers/{phoneNumberId}/sms', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PageSmsProjection', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def reassign_phone_number_release(self, release_id, **kwargs): # noqa: E501 """Reassign phone number release # noqa: E501 Reassign phone number that was released or deleted # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.reassign_phone_number_release(release_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str release_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.reassign_phone_number_release_with_http_info(release_id, **kwargs) # noqa: E501 def reassign_phone_number_release_with_http_info(self, release_id, **kwargs): # noqa: E501 """Reassign phone number release # noqa: E501 Reassign phone number that was released or deleted # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.reassign_phone_number_release_with_http_info(release_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str release_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'release_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method reassign_phone_number_release" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'release_id' is set if self.api_client.client_side_validation and ('release_id' not in local_var_params or # noqa: E501 local_var_params['release_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `release_id` when calling `reassign_phone_number_release`") # noqa: E501 collection_formats = {} path_params = {} if 'release_id' in local_var_params: path_params['releaseId'] = local_var_params['release_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/releases/{releaseId}/reassign', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhoneNumberDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def release_phone_pool_lease(self, pool_id, lease_id, **kwargs): # noqa: E501 """Release phone pool lease # noqa: E501 Release an active phone pool lease # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.release_phone_pool_lease(pool_id, lease_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str pool_id: (required) :param str lease_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.release_phone_pool_lease_with_http_info(pool_id, lease_id, **kwargs) # noqa: E501 def release_phone_pool_lease_with_http_info(self, pool_id, lease_id, **kwargs): # noqa: E501 """Release phone pool lease # noqa: E501 Release an active phone pool lease # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.release_phone_pool_lease_with_http_info(pool_id, lease_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str pool_id: (required) :param str lease_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'pool_id', 'lease_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method release_phone_pool_lease" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pool_id' is set if self.api_client.client_side_validation and ('pool_id' not in local_var_params or # noqa: E501 local_var_params['pool_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pool_id` when calling `release_phone_pool_lease`") # noqa: E501 # verify the required parameter 'lease_id' is set if self.api_client.client_side_validation and ('lease_id' not in local_var_params or # noqa: E501 local_var_params['lease_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `lease_id` when calling `release_phone_pool_lease`") # noqa: E501 collection_formats = {} path_params = {} if 'pool_id' in local_var_params: path_params['poolId'] = local_var_params['pool_id'] # noqa: E501 if 'lease_id' in local_var_params: path_params['leaseId'] = local_var_params['lease_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/pools/{poolId}/leases/{leaseId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def remove_phone_number_from_phone_pool(self, pool_id, phone_number_id, **kwargs): # noqa: E501 """Remove phone number from phone pool # noqa: E501 Remove a phone number from a pool. If the number is leased from this pool the lease is released. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.remove_phone_number_from_phone_pool(pool_id, phone_number_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str pool_id: (required) :param str phone_number_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.remove_phone_number_from_phone_pool_with_http_info(pool_id, phone_number_id, **kwargs) # noqa: E501 def remove_phone_number_from_phone_pool_with_http_info(self, pool_id, phone_number_id, **kwargs): # noqa: E501 """Remove phone number from phone pool # noqa: E501 Remove a phone number from a pool. If the number is leased from this pool the lease is released. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.remove_phone_number_from_phone_pool_with_http_info(pool_id, phone_number_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str pool_id: (required) :param str phone_number_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'pool_id', 'phone_number_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method remove_phone_number_from_phone_pool" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pool_id' is set if self.api_client.client_side_validation and ('pool_id' not in local_var_params or # noqa: E501 local_var_params['pool_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pool_id` when calling `remove_phone_number_from_phone_pool`") # noqa: E501 # verify the required parameter 'phone_number_id' is set if self.api_client.client_side_validation and ('phone_number_id' not in local_var_params or # noqa: E501 local_var_params['phone_number_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone_number_id` when calling `remove_phone_number_from_phone_pool`") # noqa: E501 collection_formats = {} path_params = {} if 'pool_id' in local_var_params: path_params['poolId'] = local_var_params['pool_id'] # noqa: E501 if 'phone_number_id' in local_var_params: path_params['phoneNumberId'] = local_var_params['phone_number_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/pools/{poolId}/numbers/{phoneNumberId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def remove_phone_number_tags(self, phone_number_id, phone_number_tags_options, **kwargs): # noqa: E501 """Remove phone number tags # noqa: E501 Remove one or more tags from a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.remove_phone_number_tags(phone_number_id, phone_number_tags_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param PhoneNumberTagsOptions phone_number_tags_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.remove_phone_number_tags_with_http_info(phone_number_id, phone_number_tags_options, **kwargs) # noqa: E501 def remove_phone_number_tags_with_http_info(self, phone_number_id, phone_number_tags_options, **kwargs): # noqa: E501 """Remove phone number tags # noqa: E501 Remove one or more tags from a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.remove_phone_number_tags_with_http_info(phone_number_id, phone_number_tags_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param PhoneNumberTagsOptions phone_number_tags_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'phone_number_id', 'phone_number_tags_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method remove_phone_number_tags" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone_number_id' is set if self.api_client.client_side_validation and ('phone_number_id' not in local_var_params or # noqa: E501 local_var_params['phone_number_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone_number_id` when calling `remove_phone_number_tags`") # noqa: E501 # verify the required parameter 'phone_number_tags_options' is set if self.api_client.client_side_validation and ('phone_number_tags_options' not in local_var_params or # noqa: E501 local_var_params['phone_number_tags_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone_number_tags_options` when calling `remove_phone_number_tags`") # noqa: E501 collection_formats = {} path_params = {} if 'phone_number_id' in local_var_params: path_params['phoneNumberId'] = local_var_params['phone_number_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'phone_number_tags_options' in local_var_params: body_params = local_var_params['phone_number_tags_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/numbers/{phoneNumberId}/tags', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhoneNumberDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def search_available_phone_numbers(self, search_available_phone_numbers_options, **kwargs): # noqa: E501 """Search available phone numbers # noqa: E501 Search available numbers for advanced provisioning # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_available_phone_numbers(search_available_phone_numbers_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param SearchAvailablePhoneNumbersOptions search_available_phone_numbers_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: AvailablePhoneNumbersResult If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.search_available_phone_numbers_with_http_info(search_available_phone_numbers_options, **kwargs) # noqa: E501 def search_available_phone_numbers_with_http_info(self, search_available_phone_numbers_options, **kwargs): # noqa: E501 """Search available phone numbers # noqa: E501 Search available numbers for advanced provisioning # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_available_phone_numbers_with_http_info(search_available_phone_numbers_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param SearchAvailablePhoneNumbersOptions search_available_phone_numbers_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(AvailablePhoneNumbersResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'search_available_phone_numbers_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method search_available_phone_numbers" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'search_available_phone_numbers_options' is set if self.api_client.client_side_validation and ('search_available_phone_numbers_options' not in local_var_params or # noqa: E501 local_var_params['search_available_phone_numbers_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `search_available_phone_numbers_options` when calling `search_available_phone_numbers`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'search_available_phone_numbers_options' in local_var_params: body_params = local_var_params['search_available_phone_numbers_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/provisioning/search', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='AvailablePhoneNumbersResult', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def send_sms_from_phone_number(self, phone_number_id, sms_send_options, **kwargs): # noqa: E501 """Send TXT message from a phone number # noqa: E501 Send SMS from a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.send_sms_from_phone_number(phone_number_id, sms_send_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param SmsSendOptions sms_send_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: SentSmsDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.send_sms_from_phone_number_with_http_info(phone_number_id, sms_send_options, **kwargs) # noqa: E501 def send_sms_from_phone_number_with_http_info(self, phone_number_id, sms_send_options, **kwargs): # noqa: E501 """Send TXT message from a phone number # noqa: E501 Send SMS from a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.send_sms_from_phone_number_with_http_info(phone_number_id, sms_send_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param SmsSendOptions sms_send_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(SentSmsDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'phone_number_id', 'sms_send_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method send_sms_from_phone_number" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone_number_id' is set if self.api_client.client_side_validation and ('phone_number_id' not in local_var_params or # noqa: E501 local_var_params['phone_number_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone_number_id` when calling `send_sms_from_phone_number`") # noqa: E501 # verify the required parameter 'sms_send_options' is set if self.api_client.client_side_validation and ('sms_send_options' not in local_var_params or # noqa: E501 local_var_params['sms_send_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `sms_send_options` when calling `send_sms_from_phone_number`") # noqa: E501 collection_formats = {} path_params = {} if 'phone_number_id' in local_var_params: path_params['phoneNumberId'] = local_var_params['phone_number_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'sms_send_options' in local_var_params: body_params = local_var_params['sms_send_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/numbers/{phoneNumberId}/sms', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SentSmsDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def set_consent_status(self, agree, **kwargs): # noqa: E501 """Set consent status # noqa: E501 Give or revoke consent for phone usage # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_consent_status(agree, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param bool agree: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: ConsentStatusDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.set_consent_status_with_http_info(agree, **kwargs) # noqa: E501 def set_consent_status_with_http_info(self, agree, **kwargs): # noqa: E501 """Set consent status # noqa: E501 Give or revoke consent for phone usage # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_consent_status_with_http_info(agree, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param bool agree: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(ConsentStatusDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'agree' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method set_consent_status" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'agree' is set if self.api_client.client_side_validation and ('agree' not in local_var_params or # noqa: E501 local_var_params['agree'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `agree` when calling `set_consent_status`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'agree' in local_var_params and local_var_params['agree'] is not None: # noqa: E501 query_params.append(('agree', local_var_params['agree'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/consent', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ConsentStatusDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def set_phone_favourited(self, phone_number_id, set_phone_favourited_options, **kwargs): # noqa: E501 """Set phone favourited state # noqa: E501 Set and return new favorite state for a phone # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_phone_favourited(phone_number_id, set_phone_favourited_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: ID of phone to set favourite state (required) :param SetPhoneFavouritedOptions set_phone_favourited_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.set_phone_favourited_with_http_info(phone_number_id, set_phone_favourited_options, **kwargs) # noqa: E501 def set_phone_favourited_with_http_info(self, phone_number_id, set_phone_favourited_options, **kwargs): # noqa: E501 """Set phone favourited state # noqa: E501 Set and return new favorite state for a phone # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_phone_favourited_with_http_info(phone_number_id, set_phone_favourited_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: ID of phone to set favourite state (required) :param SetPhoneFavouritedOptions set_phone_favourited_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'phone_number_id', 'set_phone_favourited_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method set_phone_favourited" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone_number_id' is set if self.api_client.client_side_validation and ('phone_number_id' not in local_var_params or # noqa: E501 local_var_params['phone_number_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone_number_id` when calling `set_phone_favourited`") # noqa: E501 # verify the required parameter 'set_phone_favourited_options' is set if self.api_client.client_side_validation and ('set_phone_favourited_options' not in local_var_params or # noqa: E501 local_var_params['set_phone_favourited_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `set_phone_favourited_options` when calling `set_phone_favourited`") # noqa: E501 collection_formats = {} path_params = {} if 'phone_number_id' in local_var_params: path_params['phoneNumberId'] = local_var_params['phone_number_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'set_phone_favourited_options' in local_var_params: body_params = local_var_params['set_phone_favourited_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/numbers/{phoneNumberId}/favourite', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhoneNumberDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def set_phone_number_tags(self, phone_number_id, phone_number_tags_options, **kwargs): # noqa: E501 """Set phone number tags # noqa: E501 Replace all tags on a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_phone_number_tags(phone_number_id, phone_number_tags_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param PhoneNumberTagsOptions phone_number_tags_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.set_phone_number_tags_with_http_info(phone_number_id, phone_number_tags_options, **kwargs) # noqa: E501 def set_phone_number_tags_with_http_info(self, phone_number_id, phone_number_tags_options, **kwargs): # noqa: E501 """Set phone number tags # noqa: E501 Replace all tags on a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_phone_number_tags_with_http_info(phone_number_id, phone_number_tags_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param PhoneNumberTagsOptions phone_number_tags_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'phone_number_id', 'phone_number_tags_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method set_phone_number_tags" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone_number_id' is set if self.api_client.client_side_validation and ('phone_number_id' not in local_var_params or # noqa: E501 local_var_params['phone_number_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone_number_id` when calling `set_phone_number_tags`") # noqa: E501 # verify the required parameter 'phone_number_tags_options' is set if self.api_client.client_side_validation and ('phone_number_tags_options' not in local_var_params or # noqa: E501 local_var_params['phone_number_tags_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone_number_tags_options` when calling `set_phone_number_tags`") # noqa: E501 collection_formats = {} path_params = {} if 'phone_number_id' in local_var_params: path_params['phoneNumberId'] = local_var_params['phone_number_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'phone_number_tags_options' in local_var_params: body_params = local_var_params['phone_number_tags_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/numbers/{phoneNumberId}/tags', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhoneNumberDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def test_phone_number_send_sms(self, phone_number_id, test_phone_number_options, **kwargs): # noqa: E501 """Test sending an SMS to a number # noqa: E501 Test a phone number by sending an SMS to it. NOTE this is only for internal use to check that a phone number is working. For end-to-end phone testing see https://docs.mailslurp.com/txt-sms/ # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.test_phone_number_send_sms(phone_number_id, test_phone_number_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param TestPhoneNumberOptions test_phone_number_options: (required) :param str x_test_id: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.test_phone_number_send_sms_with_http_info(phone_number_id, test_phone_number_options, **kwargs) # noqa: E501 def test_phone_number_send_sms_with_http_info(self, phone_number_id, test_phone_number_options, **kwargs): # noqa: E501 """Test sending an SMS to a number # noqa: E501 Test a phone number by sending an SMS to it. NOTE this is only for internal use to check that a phone number is working. For end-to-end phone testing see https://docs.mailslurp.com/txt-sms/ # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.test_phone_number_send_sms_with_http_info(phone_number_id, test_phone_number_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param TestPhoneNumberOptions test_phone_number_options: (required) :param str x_test_id: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'phone_number_id', 'test_phone_number_options', 'x_test_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method test_phone_number_send_sms" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone_number_id' is set if self.api_client.client_side_validation and ('phone_number_id' not in local_var_params or # noqa: E501 local_var_params['phone_number_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone_number_id` when calling `test_phone_number_send_sms`") # noqa: E501 # verify the required parameter 'test_phone_number_options' is set if self.api_client.client_side_validation and ('test_phone_number_options' not in local_var_params or # noqa: E501 local_var_params['test_phone_number_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `test_phone_number_options` when calling `test_phone_number_send_sms`") # noqa: E501 collection_formats = {} path_params = {} if 'phone_number_id' in local_var_params: path_params['phoneNumberId'] = local_var_params['phone_number_id'] # noqa: E501 query_params = [] header_params = {} if 'x_test_id' in local_var_params: header_params['x-test-id'] = local_var_params['x_test_id'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'test_phone_number_options' in local_var_params: body_params = local_var_params['test_phone_number_options'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/numbers/{phoneNumberId}/test', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def update_phone_number(self, phone_number_id, update_phone_number_options, **kwargs): # noqa: E501 """Update a phone number # noqa: E501 Set field for phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_phone_number(phone_number_id, update_phone_number_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: ID of phone to set favourite state (required) :param UpdatePhoneNumberOptions update_phone_number_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.update_phone_number_with_http_info(phone_number_id, update_phone_number_options, **kwargs) # noqa: E501 def update_phone_number_with_http_info(self, phone_number_id, update_phone_number_options, **kwargs): # noqa: E501 """Update a phone number # noqa: E501 Set field for phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_phone_number_with_http_info(phone_number_id, update_phone_number_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str phone_number_id: ID of phone to set favourite state (required) :param UpdatePhoneNumberOptions update_phone_number_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'phone_number_id', 'update_phone_number_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_phone_number" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone_number_id' is set if self.api_client.client_side_validation and ('phone_number_id' not in local_var_params or # noqa: E501 local_var_params['phone_number_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone_number_id` when calling `update_phone_number`") # noqa: E501 # verify the required parameter 'update_phone_number_options' is set if self.api_client.client_side_validation and ('update_phone_number_options' not in local_var_params or # noqa: E501 local_var_params['update_phone_number_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `update_phone_number_options` when calling `update_phone_number`") # noqa: E501 collection_formats = {} path_params = {} if 'phone_number_id' in local_var_params: path_params['phoneNumberId'] = local_var_params['phone_number_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'update_phone_number_options' in local_var_params: body_params = local_var_params['update_phone_number_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/numbers/{phoneNumberId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhoneNumberDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def update_phone_pool(self, pool_id, update_phone_pool_options, **kwargs): # noqa: E501 """Update phone pool # noqa: E501 Update phone pool metadata such as name or description # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_phone_pool(pool_id, update_phone_pool_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str pool_id: (required) :param UpdatePhonePoolOptions update_phone_pool_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhonePoolDetailDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.update_phone_pool_with_http_info(pool_id, update_phone_pool_options, **kwargs) # noqa: E501 def update_phone_pool_with_http_info(self, pool_id, update_phone_pool_options, **kwargs): # noqa: E501 """Update phone pool # noqa: E501 Update phone pool metadata such as name or description # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_phone_pool_with_http_info(pool_id, update_phone_pool_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str pool_id: (required) :param UpdatePhonePoolOptions update_phone_pool_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhonePoolDetailDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'pool_id', 'update_phone_pool_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_phone_pool" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pool_id' is set if self.api_client.client_side_validation and ('pool_id' not in local_var_params or # noqa: E501 local_var_params['pool_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pool_id` when calling `update_phone_pool`") # noqa: E501 # verify the required parameter 'update_phone_pool_options' is set if self.api_client.client_side_validation and ('update_phone_pool_options' not in local_var_params or # noqa: E501 local_var_params['update_phone_pool_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `update_phone_pool_options` when calling `update_phone_pool`") # noqa: E501 collection_formats = {} path_params = {} if 'pool_id' in local_var_params: path_params['poolId'] = local_var_params['pool_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'update_phone_pool_options' in local_var_params: body_params = local_var_params['update_phone_pool_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/pools/{poolId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhonePoolDetailDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def validate_phone_number(self, validate_phone_number_options, **kwargs): # noqa: E501 """Verify validity of a phone number # noqa: E501 Validate a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.validate_phone_number(validate_phone_number_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param ValidatePhoneNumberOptions validate_phone_number_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberValidationDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.validate_phone_number_with_http_info(validate_phone_number_options, **kwargs) # noqa: E501 def validate_phone_number_with_http_info(self, validate_phone_number_options, **kwargs): # noqa: E501 """Verify validity of a phone number # noqa: E501 Validate a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.validate_phone_number_with_http_info(validate_phone_number_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param ValidatePhoneNumberOptions validate_phone_number_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberValidationDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'validate_phone_number_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method validate_phone_number" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'validate_phone_number_options' is set if self.api_client.client_side_validation and ('validate_phone_number_options' not in local_var_params or # noqa: E501 local_var_params['validate_phone_number_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `validate_phone_number_options` when calling `validate_phone_number`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'validate_phone_number_options' in local_var_params: body_params = local_var_params['validate_phone_number_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/phone/validate', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PhoneNumberValidationDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)Methods
def acquire_phone_pool_lease(self, pool_id, acquire_phone_pool_lease_options, **kwargs)-
Acquire phone pool lease # noqa: E501
Acquire an available phone number from the pool and mark it leased # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.acquire_phone_pool_lease(pool_id, acquire_phone_pool_lease_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str pool_id: (required) :param AcquirePhonePoolLeaseOptions acquire_phone_pool_lease_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhonePoolLeaseDto If the method is called asynchronously, returns the request thread.
def acquire_phone_pool_lease_with_http_info(self, pool_id, acquire_phone_pool_lease_options, **kwargs)-
Acquire phone pool lease # noqa: E501
Acquire an available phone number from the pool and mark it leased # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.acquire_phone_pool_lease_with_http_info(pool_id, acquire_phone_pool_lease_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str pool_id: (required) :param AcquirePhonePoolLeaseOptions acquire_phone_pool_lease_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhonePoolLeaseDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def add_all_phone_numbers_to_phone_pool(self, pool_id, **kwargs)-
Add all phone numbers to phone pool # noqa: E501
Add all active owned phone numbers to a pool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_all_phone_numbers_to_phone_pool(pool_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str pool_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhonePoolDetailDto If the method is called asynchronously, returns the request thread.
def add_all_phone_numbers_to_phone_pool_with_http_info(self, pool_id, **kwargs)-
Add all phone numbers to phone pool # noqa: E501
Add all active owned phone numbers to a pool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_all_phone_numbers_to_phone_pool_with_http_info(pool_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str pool_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhonePoolDetailDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
-
Add phone number tags # noqa: E501
Add one or more tags to a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_phone_number_tags(phone_number_id, phone_number_tags_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param PhoneNumberTagsOptions phone_number_tags_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberDto If the method is called asynchronously, returns the request thread.
-
Add phone number tags # noqa: E501
Add one or more tags to a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_phone_number_tags_with_http_info(phone_number_id, phone_number_tags_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param PhoneNumberTagsOptions phone_number_tags_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def add_phone_numbers_to_phone_pool(self, pool_id, add_phone_pool_numbers_options, **kwargs)-
Add phone numbers to phone pool # noqa: E501
Add one or more owned phone numbers to a pool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_phone_numbers_to_phone_pool(pool_id, add_phone_pool_numbers_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str pool_id: (required) :param AddPhonePoolNumbersOptions add_phone_pool_numbers_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhonePoolDetailDto If the method is called asynchronously, returns the request thread.
def add_phone_numbers_to_phone_pool_with_http_info(self, pool_id, add_phone_pool_numbers_options, **kwargs)-
Add phone numbers to phone pool # noqa: E501
Add one or more owned phone numbers to a pool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_phone_numbers_to_phone_pool_with_http_info(pool_id, add_phone_pool_numbers_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str pool_id: (required) :param AddPhonePoolNumbersOptions add_phone_pool_numbers_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhonePoolDetailDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def create_emergency_address(self, create_emergency_address_options, **kwargs)-
Create an emergency address # noqa: E501
Add an emergency address to a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_emergency_address(create_emergency_address_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param CreateEmergencyAddressOptions create_emergency_address_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmergencyAddress If the method is called asynchronously, returns the request thread.
def create_emergency_address_with_http_info(self, create_emergency_address_options, **kwargs)-
Create an emergency address # noqa: E501
Add an emergency address to a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_emergency_address_with_http_info(create_emergency_address_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param CreateEmergencyAddressOptions create_emergency_address_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmergencyAddress, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def create_phone_number(self, create_phone_number_options, **kwargs)-
Add phone number to your account. Only works if you have already added a plan and an initial phone number in your account and acknowledged the pricing and terms of service by enabling API phone creation. # noqa: E501
Create new phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_phone_number(create_phone_number_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param CreatePhoneNumberOptions create_phone_number_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberDto If the method is called asynchronously, returns the request thread.
def create_phone_number_with_http_info(self, create_phone_number_options, **kwargs)-
Add phone number to your account. Only works if you have already added a plan and an initial phone number in your account and acknowledged the pricing and terms of service by enabling API phone creation. # noqa: E501
Create new phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_phone_number_with_http_info(create_phone_number_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param CreatePhoneNumberOptions create_phone_number_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def create_phone_pool(self, create_phone_pool_options, **kwargs)-
Create phone pool # noqa: E501
Create a reusable pool of phone numbers for coordinated leasing # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_phone_pool(create_phone_pool_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param CreatePhonePoolOptions create_phone_pool_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhonePoolDetailDto If the method is called asynchronously, returns the request thread.
def create_phone_pool_with_http_info(self, create_phone_pool_options, **kwargs)-
Create phone pool # noqa: E501
Create a reusable pool of phone numbers for coordinated leasing # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_phone_pool_with_http_info(create_phone_pool_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param CreatePhonePoolOptions create_phone_pool_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhonePoolDetailDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def create_phone_provisioning_job(self, create_phone_provisioning_job_options, **kwargs)-
Create a phone provisioning job # noqa: E501
Create an advanced phone provisioning job from shortlisted numbers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_phone_provisioning_job(create_phone_provisioning_job_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param CreatePhoneProvisioningJobOptions create_phone_provisioning_job_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneProvisioningJobDto If the method is called asynchronously, returns the request thread.
def create_phone_provisioning_job_with_http_info(self, create_phone_provisioning_job_options, **kwargs)-
Create a phone provisioning job # noqa: E501
Create an advanced phone provisioning job from shortlisted numbers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_phone_provisioning_job_with_http_info(create_phone_provisioning_job_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param CreatePhoneProvisioningJobOptions create_phone_provisioning_job_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneProvisioningJobDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def delete_all_phone_number(self, **kwargs)-
Delete all phone numbers # noqa: E501
Remove all phone number from account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_all_phone_number(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def delete_all_phone_number_with_http_info(self, **kwargs)-
Delete all phone numbers # noqa: E501
Remove all phone number from account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_all_phone_number_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def delete_emergency_address(self, address_id, **kwargs)-
Delete an emergency address # noqa: E501
Delete an emergency address # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_emergency_address(address_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str address_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmptyResponseDto If the method is called asynchronously, returns the request thread.
def delete_emergency_address_with_http_info(self, address_id, **kwargs)-
Delete an emergency address # noqa: E501
Delete an emergency address # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_emergency_address_with_http_info(address_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str address_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmptyResponseDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def delete_phone_message_thread_items(self, phone_number_id, other_number, **kwargs)-
Delete messages in a phone thread # noqa: E501
Delete all messages in an SMS thread # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_phone_message_thread_items(phone_number_id, other_number, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param str other_number: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmptyResponseDto If the method is called asynchronously, returns the request thread.
def delete_phone_message_thread_items_with_http_info(self, phone_number_id, other_number, **kwargs)-
Delete messages in a phone thread # noqa: E501
Delete all messages in an SMS thread # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_phone_message_thread_items_with_http_info(phone_number_id, other_number, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param str other_number: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmptyResponseDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def delete_phone_number(self, phone_number_id, **kwargs)-
Delete a phone number # noqa: E501
Remove phone number from account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_phone_number(phone_number_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def delete_phone_number_with_http_info(self, phone_number_id, **kwargs)-
Delete a phone number # noqa: E501
Remove phone number from account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_phone_number_with_http_info(phone_number_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def delete_phone_pool(self, pool_id, **kwargs)-
Delete phone pool # noqa: E501
Delete a phone pool and release any active leases from that pool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_phone_pool(pool_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str pool_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def delete_phone_pool_with_http_info(self, pool_id, **kwargs)-
Delete phone pool # noqa: E501
Delete a phone pool and release any active leases from that pool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_phone_pool_with_http_info(pool_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str pool_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def download_phone_number_media(self, media_id, **kwargs)-
download_phone_number_media # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.download_phone_number_media(media_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str media_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def download_phone_number_media_base64(self, media_id, **kwargs)-
download_phone_number_media_base64 # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.download_phone_number_media_base64(media_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str media_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def download_phone_number_media_base64_with_http_info(self, media_id, **kwargs)-
download_phone_number_media_base64 # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.download_phone_number_media_base64_with_http_info(media_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str media_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def download_phone_number_media_with_http_info(self, media_id, **kwargs)-
download_phone_number_media # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.download_phone_number_media_with_http_info(media_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str media_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def export_phone_numbers_csv(self, **kwargs)-
Export phone numbers CSV # noqa: E501
Download all active phone numbers for account as CSV # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.export_phone_numbers_csv(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def export_phone_numbers_csv_with_http_info(self, **kwargs)-
Export phone numbers CSV # noqa: E501
Download all active phone numbers for account as CSV # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.export_phone_numbers_csv_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def get_all_phone_message_threads(self, **kwargs)-
Get the latest messages for all phones # noqa: E501
List all message threads for all phones # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_phone_message_threads(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param int page: :param int size: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PagePhoneMessageThreadProjection If the method is called asynchronously, returns the request thread.
def get_all_phone_message_threads_with_http_info(self, **kwargs)-
Get the latest messages for all phones # noqa: E501
List all message threads for all phones # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_phone_message_threads_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param int page: :param int size: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PagePhoneMessageThreadProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_all_phone_number_releases(self, **kwargs)-
Get all phone number releases # noqa: E501
List released or deleted phone numbers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_phone_number_releases(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param int page: :param int size: :param str sort: Optional createdAt sort direction ASC or DESC :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PagePhoneNumberReleaseProjection If the method is called asynchronously, returns the request thread.
def get_all_phone_number_releases_with_http_info(self, **kwargs)-
Get all phone number releases # noqa: E501
List released or deleted phone numbers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_phone_number_releases_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param int page: :param int size: :param str sort: Optional createdAt sort direction ASC or DESC :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PagePhoneNumberReleaseProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_consent_status(self, **kwargs)-
Get consent status # noqa: E501
Get the status of phone usage consent # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_consent_status(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: ConsentStatusDto If the method is called asynchronously, returns the request thread.
def get_consent_status_with_http_info(self, **kwargs)-
Get consent status # noqa: E501
Get the status of phone usage consent # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_consent_status_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(ConsentStatusDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_emergency_address(self, address_id, **kwargs)-
Get an emergency address # noqa: E501
Fetch an emergency address by ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_emergency_address(address_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str address_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: EmergencyAddress If the method is called asynchronously, returns the request thread.
def get_emergency_address_with_http_info(self, address_id, **kwargs)-
Get an emergency address # noqa: E501
Fetch an emergency address by ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_emergency_address_with_http_info(address_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str address_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(EmergencyAddress, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_emergency_addresses(self, **kwargs)-
Get emergency addresses # noqa: E501
List emergency addresses # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_emergency_addresses(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: list[EmergencyAddressDto] If the method is called asynchronously, returns the request thread.
def get_emergency_addresses_with_http_info(self, **kwargs)-
Get emergency addresses # noqa: E501
List emergency addresses # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_emergency_addresses_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(list[EmergencyAddressDto], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_or_create_phone_pool(self, get_or_create_phone_pool_options, **kwargs)-
Get or create phone pool # noqa: E501
Get a phone pool by name or create it if it does not exist # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_or_create_phone_pool(get_or_create_phone_pool_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param GetOrCreatePhonePoolOptions get_or_create_phone_pool_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhonePoolDetailDto If the method is called asynchronously, returns the request thread.
def get_or_create_phone_pool_with_http_info(self, get_or_create_phone_pool_options, **kwargs)-
Get or create phone pool # noqa: E501
Get a phone pool by name or create it if it does not exist # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_or_create_phone_pool_with_http_info(get_or_create_phone_pool_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param GetOrCreatePhonePoolOptions get_or_create_phone_pool_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhonePoolDetailDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_phone_message_thread_items(self, phone_number_id, other_number, **kwargs)-
Get messages in a phone thread # noqa: E501
List message thread messages for a phone message thread # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_message_thread_items(phone_number_id, other_number, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param str other_number: (required) :param int page: :param int size: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PagePhoneMessageThreadItemProjection If the method is called asynchronously, returns the request thread.
def get_phone_message_thread_items_with_http_info(self, phone_number_id, other_number, **kwargs)-
Get messages in a phone thread # noqa: E501
List message thread messages for a phone message thread # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_message_thread_items_with_http_info(phone_number_id, other_number, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param str other_number: (required) :param int page: :param int size: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PagePhoneMessageThreadItemProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_phone_message_threads(self, phone_number_id, **kwargs)-
Get the latest message preview for a thread # noqa: E501
List message threads for a phone # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_message_threads(phone_number_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param int page: :param int size: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PagePhoneMessageThreadProjection If the method is called asynchronously, returns the request thread.
def get_phone_message_threads_with_http_info(self, phone_number_id, **kwargs)-
Get the latest message preview for a thread # noqa: E501
List message threads for a phone # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_message_threads_with_http_info(phone_number_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param int page: :param int size: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PagePhoneMessageThreadProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_phone_number(self, phone_number_id, **kwargs)-
Get a phone number by ID # noqa: E501
Get a phone number by ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_number(phone_number_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberDto If the method is called asynchronously, returns the request thread.
def get_phone_number_by_name(self, name, **kwargs)-
Get a phone number by name # noqa: E501
Get a phone number by name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_number_by_name(name, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str name: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberDto If the method is called asynchronously, returns the request thread.
def get_phone_number_by_name_with_http_info(self, name, **kwargs)-
Get a phone number by name # noqa: E501
Get a phone number by name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_number_by_name_with_http_info(name, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str name: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_phone_number_by_phone_number(self, phone_number, **kwargs)-
Get a phone number by phone number # noqa: E501
Get a phone number by phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_number_by_phone_number(phone_number, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberDto If the method is called asynchronously, returns the request thread.
def get_phone_number_by_phone_number_with_http_info(self, phone_number, **kwargs)-
Get a phone number by phone number # noqa: E501
Get a phone number by phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_number_by_phone_number_with_http_info(phone_number, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_phone_number_line_type_intelligence(self, validate_phone_number_options, **kwargs)-
Get line type intelligence for a phone number # noqa: E501
Lookup line type intelligence for a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_number_line_type_intelligence(validate_phone_number_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param ValidatePhoneNumberOptions validate_phone_number_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberLineTypeLookupDto If the method is called asynchronously, returns the request thread.
def get_phone_number_line_type_intelligence_with_http_info(self, validate_phone_number_options, **kwargs)-
Get line type intelligence for a phone number # noqa: E501
Lookup line type intelligence for a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_number_line_type_intelligence_with_http_info(validate_phone_number_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param ValidatePhoneNumberOptions validate_phone_number_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberLineTypeLookupDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_phone_number_media(self, phone_number_id, **kwargs)-
get_phone_number_media # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_number_media(phone_number_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param int page: Optional page index in SMS media list pagination :param int size: Optional page size in SMS media list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param datetime since: Optional filter SMS media created after given date time :param datetime before: Optional filter SMS media created before given date time :param str search: Optional search filter :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PageSmsMessageMedia If the method is called asynchronously, returns the request thread.
def get_phone_number_media1(self, **kwargs)-
get_phone_number_media1 # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_number_media1(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param int page: Optional page index in SMS media list pagination :param int size: Optional page size in SMS media list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param datetime since: Optional filter SMS media created after given date time :param datetime before: Optional filter SMS media created before given date time :param str search: Optional search filter :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PageSmsMessageMedia If the method is called asynchronously, returns the request thread.
def get_phone_number_media1_with_http_info(self, **kwargs)-
get_phone_number_media1 # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_number_media1_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param int page: Optional page index in SMS media list pagination :param int size: Optional page size in SMS media list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param datetime since: Optional filter SMS media created after given date time :param datetime before: Optional filter SMS media created before given date time :param str search: Optional search filter :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PageSmsMessageMedia, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_phone_number_media_by_id(self, media_id, **kwargs)-
get_phone_number_media_by_id # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_number_media_by_id(media_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str media_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: SmsMessageMediaDto If the method is called asynchronously, returns the request thread.
def get_phone_number_media_by_id_with_http_info(self, media_id, **kwargs)-
get_phone_number_media_by_id # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_number_media_by_id_with_http_info(media_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str media_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(SmsMessageMediaDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_phone_number_media_with_http_info(self, phone_number_id, **kwargs)-
get_phone_number_media # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_number_media_with_http_info(phone_number_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param int page: Optional page index in SMS media list pagination :param int size: Optional page size in SMS media list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param datetime since: Optional filter SMS media created after given date time :param datetime before: Optional filter SMS media created before given date time :param str search: Optional search filter :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PageSmsMessageMedia, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_phone_number_release(self, release_id, **kwargs)-
Get phone number release # noqa: E501
Get a released or deleted phone numbers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_number_release(release_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str release_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberReleaseProjection If the method is called asynchronously, returns the request thread.
def get_phone_number_release_with_http_info(self, release_id, **kwargs)-
Get phone number release # noqa: E501
Get a released or deleted phone numbers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_number_release_with_http_info(release_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str release_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberReleaseProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
-
Get phone number tags # noqa: E501
Get tags for a specific phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_number_tags(phone_number_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: list[str] If the method is called asynchronously, returns the request thread.
-
Get phone number tags # noqa: E501
Get tags for a specific phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_number_tags_with_http_info(phone_number_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_phone_number_with_http_info(self, phone_number_id, **kwargs)-
Get a phone number by ID # noqa: E501
Get a phone number by ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_number_with_http_info(phone_number_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_phone_numbers(self, **kwargs)-
Get phone numbers # noqa: E501
List phone numbers for account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_numbers(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_country: Optional phone country :param str line_type: Optional line type filter :param str carrier_name: Optional carrier name filter :param str mobile_country_code: Optional mobile country code filter :param str mobile_network_code: Optional mobile network code filter :param str provider_label: Optional provider label filter such as T1 or T2 :param int page: Optional page index for list pagination :param int size: Optional page size for list pagination :param str sort: Optional createdAt sort direction ASC or DESC :param datetime since: Filter by created at after the given timestamp :param datetime before: Filter by created at before the given timestamp :param str search: Optional search filter :param list[str] tag: Optional tags to filter by. A phone must include all provided tags :param list[str] include: Optional phoneIds to include in result :param bool favourite: Optionally filter results for favourites only :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PagePhoneNumberProjection If the method is called asynchronously, returns the request thread.
def get_phone_numbers_with_http_info(self, **kwargs)-
Get phone numbers # noqa: E501
List phone numbers for account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_numbers_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_country: Optional phone country :param str line_type: Optional line type filter :param str carrier_name: Optional carrier name filter :param str mobile_country_code: Optional mobile country code filter :param str mobile_network_code: Optional mobile network code filter :param str provider_label: Optional provider label filter such as T1 or T2 :param int page: Optional page index for list pagination :param int size: Optional page size for list pagination :param str sort: Optional createdAt sort direction ASC or DESC :param datetime since: Filter by created at after the given timestamp :param datetime before: Filter by created at before the given timestamp :param str search: Optional search filter :param list[str] tag: Optional tags to filter by. A phone must include all provided tags :param list[str] include: Optional phoneIds to include in result :param bool favourite: Optionally filter results for favourites only :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PagePhoneNumberProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_phone_plans(self, **kwargs)-
Get phone plans # noqa: E501
Get phone number plans # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_plans(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: list[PhonePlanDto] If the method is called asynchronously, returns the request thread.
def get_phone_plans_availability(self, **kwargs)-
Get phone plans availability # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_plans_availability(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhonePlanAvailability If the method is called asynchronously, returns the request thread.
def get_phone_plans_availability_with_http_info(self, **kwargs)-
Get phone plans availability # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_plans_availability_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhonePlanAvailability, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_phone_plans_with_http_info(self, **kwargs)-
Get phone plans # noqa: E501
Get phone number plans # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_plans_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(list[PhonePlanDto], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_phone_pool(self, pool_id, **kwargs)-
Get phone pool # noqa: E501
Get phone pool details by ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_pool(pool_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str pool_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhonePoolDetailDto If the method is called asynchronously, returns the request thread.
def get_phone_pool_by_name(self, name, **kwargs)-
Get phone pool by name # noqa: E501
Get phone pool details by name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_pool_by_name(name, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str name: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhonePoolDetailDto If the method is called asynchronously, returns the request thread.
def get_phone_pool_by_name_with_http_info(self, name, **kwargs)-
Get phone pool by name # noqa: E501
Get phone pool details by name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_pool_by_name_with_http_info(name, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str name: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhonePoolDetailDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_phone_pool_with_http_info(self, pool_id, **kwargs)-
Get phone pool # noqa: E501
Get phone pool details by ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_pool_with_http_info(pool_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str pool_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhonePoolDetailDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_phone_pools(self, **kwargs)-
Get phone pools # noqa: E501
List phone pools for the authenticated user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_pools(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: list[PhonePoolDto] If the method is called asynchronously, returns the request thread.
def get_phone_pools_with_http_info(self, **kwargs)-
Get phone pools # noqa: E501
List phone pools for the authenticated user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_pools_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(list[PhonePoolDto], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_phone_provisioning_capabilities(self, phone_country, **kwargs)-
Get phone provisioning capabilities # noqa: E501
Get supported provider-country variant capabilities for advanced provisioning # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_provisioning_capabilities(phone_country, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_country: (required) :param str provider_label: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneProviderCapabilitiesResult If the method is called asynchronously, returns the request thread.
def get_phone_provisioning_capabilities_with_http_info(self, phone_country, **kwargs)-
Get phone provisioning capabilities # noqa: E501
Get supported provider-country variant capabilities for advanced provisioning # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_provisioning_capabilities_with_http_info(phone_country, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_country: (required) :param str provider_label: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneProviderCapabilitiesResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_phone_provisioning_job(self, job_id, **kwargs)-
Get phone provisioning job # noqa: E501
Get advanced phone provisioning job status # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_provisioning_job(job_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str job_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneProvisioningJobDto If the method is called asynchronously, returns the request thread.
def get_phone_provisioning_job_with_http_info(self, job_id, **kwargs)-
Get phone provisioning job # noqa: E501
Get advanced phone provisioning job status # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_provisioning_job_with_http_info(job_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str job_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneProvisioningJobDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_phone_sms_prepaid_credit(self, credit_id, **kwargs)-
Get SMS prepaid credit # noqa: E501
Get a specific SMS prepaid credit balance for the authenticated account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_sms_prepaid_credit(credit_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str credit_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneSmsPrepaidCreditDto If the method is called asynchronously, returns the request thread.
def get_phone_sms_prepaid_credit_with_http_info(self, credit_id, **kwargs)-
Get SMS prepaid credit # noqa: E501
Get a specific SMS prepaid credit balance for the authenticated account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_sms_prepaid_credit_with_http_info(credit_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str credit_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneSmsPrepaidCreditDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_phone_sms_prepaid_credits(self, **kwargs)-
Get SMS prepaid credits # noqa: E501
List SMS prepaid credits for the authenticated account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_sms_prepaid_credits(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneSmsPrepaidCreditsDto If the method is called asynchronously, returns the request thread.
def get_phone_sms_prepaid_credits_with_http_info(self, **kwargs)-
Get SMS prepaid credits # noqa: E501
List SMS prepaid credits for the authenticated account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_sms_prepaid_credits_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneSmsPrepaidCreditsDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_phone_summary(self, **kwargs)-
Get phone summary # noqa: E501
Get overview of assigned phones # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_summary(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneSummaryDto If the method is called asynchronously, returns the request thread.
def get_phone_summary_with_http_info(self, **kwargs)-
Get phone summary # noqa: E501
Get overview of assigned phones # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_summary_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneSummaryDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
-
Get phone tags # noqa: E501
List all unique tags used by your phone numbers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_tags(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str search: Optional search filter :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: list[str] If the method is called asynchronously, returns the request thread.
-
Get phone tags # noqa: E501
List all unique tags used by your phone numbers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_phone_tags_with_http_info(async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str search: Optional search filter :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_sent_sms_by_phone_number(self, phone_number_id, **kwargs)-
List sent TXT messages for a phone number # noqa: E501
Get sent SMS messages for a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_sent_sms_by_phone_number(phone_number_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param int page: Optional page index in SMS list pagination :param int size: Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param datetime since: Optional filter SMSs received after given date time :param datetime before: Optional filter SMSs received before given date time :param str search: Optional search filter :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PageSentSmsProjection If the method is called asynchronously, returns the request thread.
def get_sent_sms_by_phone_number_with_http_info(self, phone_number_id, **kwargs)-
List sent TXT messages for a phone number # noqa: E501
Get sent SMS messages for a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_sent_sms_by_phone_number_with_http_info(phone_number_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param int page: Optional page index in SMS list pagination :param int size: Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param datetime since: Optional filter SMSs received after given date time :param datetime before: Optional filter SMSs received before given date time :param str search: Optional search filter :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PageSentSmsProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_sms_by_phone_number(self, phone_number_id, **kwargs)-
List SMS messages for a phone number # noqa: E501
Get SMS messages for a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_sms_by_phone_number(phone_number_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param int page: Optional page index in SMS list pagination :param int size: Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param bool unread_only: Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly :param datetime since: Optional filter SMSs received after given date time :param datetime before: Optional filter SMSs received before given date time :param str search: Optional search filter :param bool favourite: Optionally filter results for favourites only :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PageSmsProjection If the method is called asynchronously, returns the request thread.
def get_sms_by_phone_number_with_http_info(self, phone_number_id, **kwargs)-
List SMS messages for a phone number # noqa: E501
Get SMS messages for a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_sms_by_phone_number_with_http_info(phone_number_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param int page: Optional page index in SMS list pagination :param int size: Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results :param str sort: Optional createdAt sort direction ASC or DESC :param bool unread_only: Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly :param datetime since: Optional filter SMSs received after given date time :param datetime before: Optional filter SMSs received before given date time :param str search: Optional search filter :param bool favourite: Optionally filter results for favourites only :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PageSmsProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def reassign_phone_number_release(self, release_id, **kwargs)-
Reassign phone number release # noqa: E501
Reassign phone number that was released or deleted # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.reassign_phone_number_release(release_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str release_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberDto If the method is called asynchronously, returns the request thread.
def reassign_phone_number_release_with_http_info(self, release_id, **kwargs)-
Reassign phone number release # noqa: E501
Reassign phone number that was released or deleted # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.reassign_phone_number_release_with_http_info(release_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str release_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def release_phone_pool_lease(self, pool_id, lease_id, **kwargs)-
Release phone pool lease # noqa: E501
Release an active phone pool lease # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.release_phone_pool_lease(pool_id, lease_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str pool_id: (required) :param str lease_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def release_phone_pool_lease_with_http_info(self, pool_id, lease_id, **kwargs)-
Release phone pool lease # noqa: E501
Release an active phone pool lease # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.release_phone_pool_lease_with_http_info(pool_id, lease_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str pool_id: (required) :param str lease_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def remove_phone_number_from_phone_pool(self, pool_id, phone_number_id, **kwargs)-
Remove phone number from phone pool # noqa: E501
Remove a phone number from a pool. If the number is leased from this pool the lease is released. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.remove_phone_number_from_phone_pool(pool_id, phone_number_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str pool_id: (required) :param str phone_number_id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def remove_phone_number_from_phone_pool_with_http_info(self, pool_id, phone_number_id, **kwargs)-
Remove phone number from phone pool # noqa: E501
Remove a phone number from a pool. If the number is leased from this pool the lease is released. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.remove_phone_number_from_phone_pool_with_http_info(pool_id, phone_number_id, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str pool_id: (required) :param str phone_number_id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
-
Remove phone number tags # noqa: E501
Remove one or more tags from a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.remove_phone_number_tags(phone_number_id, phone_number_tags_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param PhoneNumberTagsOptions phone_number_tags_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberDto If the method is called asynchronously, returns the request thread.
-
Remove phone number tags # noqa: E501
Remove one or more tags from a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.remove_phone_number_tags_with_http_info(phone_number_id, phone_number_tags_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param PhoneNumberTagsOptions phone_number_tags_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def search_available_phone_numbers(self, search_available_phone_numbers_options, **kwargs)-
Search available phone numbers # noqa: E501
Search available numbers for advanced provisioning # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.search_available_phone_numbers(search_available_phone_numbers_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param SearchAvailablePhoneNumbersOptions search_available_phone_numbers_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: AvailablePhoneNumbersResult If the method is called asynchronously, returns the request thread.
def search_available_phone_numbers_with_http_info(self, search_available_phone_numbers_options, **kwargs)-
Search available phone numbers # noqa: E501
Search available numbers for advanced provisioning # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.search_available_phone_numbers_with_http_info(search_available_phone_numbers_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param SearchAvailablePhoneNumbersOptions search_available_phone_numbers_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(AvailablePhoneNumbersResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def send_sms_from_phone_number(self, phone_number_id, sms_send_options, **kwargs)-
Send TXT message from a phone number # noqa: E501
Send SMS from a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.send_sms_from_phone_number(phone_number_id, sms_send_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param SmsSendOptions sms_send_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: SentSmsDto If the method is called asynchronously, returns the request thread.
def send_sms_from_phone_number_with_http_info(self, phone_number_id, sms_send_options, **kwargs)-
Send TXT message from a phone number # noqa: E501
Send SMS from a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.send_sms_from_phone_number_with_http_info(phone_number_id, sms_send_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param SmsSendOptions sms_send_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(SentSmsDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def set_consent_status(self, agree, **kwargs)-
Set consent status # noqa: E501
Give or revoke consent for phone usage # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.set_consent_status(agree, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param bool agree: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: ConsentStatusDto If the method is called asynchronously, returns the request thread.
def set_consent_status_with_http_info(self, agree, **kwargs)-
Set consent status # noqa: E501
Give or revoke consent for phone usage # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.set_consent_status_with_http_info(agree, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param bool agree: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(ConsentStatusDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def set_phone_favourited(self, phone_number_id, set_phone_favourited_options, **kwargs)-
Set phone favourited state # noqa: E501
Set and return new favorite state for a phone # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.set_phone_favourited(phone_number_id, set_phone_favourited_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: ID of phone to set favourite state (required) :param SetPhoneFavouritedOptions set_phone_favourited_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberDto If the method is called asynchronously, returns the request thread.
def set_phone_favourited_with_http_info(self, phone_number_id, set_phone_favourited_options, **kwargs)-
Set phone favourited state # noqa: E501
Set and return new favorite state for a phone # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.set_phone_favourited_with_http_info(phone_number_id, set_phone_favourited_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: ID of phone to set favourite state (required) :param SetPhoneFavouritedOptions set_phone_favourited_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
-
Set phone number tags # noqa: E501
Replace all tags on a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.set_phone_number_tags(phone_number_id, phone_number_tags_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param PhoneNumberTagsOptions phone_number_tags_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberDto If the method is called asynchronously, returns the request thread.
-
Set phone number tags # noqa: E501
Replace all tags on a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.set_phone_number_tags_with_http_info(phone_number_id, phone_number_tags_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param PhoneNumberTagsOptions phone_number_tags_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def test_phone_number_send_sms(self, phone_number_id, test_phone_number_options, **kwargs)-
Test sending an SMS to a number # noqa: E501
Test a phone number by sending an SMS to it. NOTE this is only for internal use to check that a phone number is working. For end-to-end phone testing see https://docs.mailslurp.com/txt-sms/ # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.test_phone_number_send_sms(phone_number_id, test_phone_number_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param TestPhoneNumberOptions test_phone_number_options: (required) :param str x_test_id: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def test_phone_number_send_sms_with_http_info(self, phone_number_id, test_phone_number_options, **kwargs)-
Test sending an SMS to a number # noqa: E501
Test a phone number by sending an SMS to it. NOTE this is only for internal use to check that a phone number is working. For end-to-end phone testing see https://docs.mailslurp.com/txt-sms/ # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.test_phone_number_send_sms_with_http_info(phone_number_id, test_phone_number_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: (required) :param TestPhoneNumberOptions test_phone_number_options: (required) :param str x_test_id: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.
def update_phone_number(self, phone_number_id, update_phone_number_options, **kwargs)-
Update a phone number # noqa: E501
Set field for phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_phone_number(phone_number_id, update_phone_number_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: ID of phone to set favourite state (required) :param UpdatePhoneNumberOptions update_phone_number_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberDto If the method is called asynchronously, returns the request thread.
def update_phone_number_with_http_info(self, phone_number_id, update_phone_number_options, **kwargs)-
Update a phone number # noqa: E501
Set field for phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_phone_number_with_http_info(phone_number_id, update_phone_number_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str phone_number_id: ID of phone to set favourite state (required) :param UpdatePhoneNumberOptions update_phone_number_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def update_phone_pool(self, pool_id, update_phone_pool_options, **kwargs)-
Update phone pool # noqa: E501
Update phone pool metadata such as name or description # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_phone_pool(pool_id, update_phone_pool_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str pool_id: (required) :param UpdatePhonePoolOptions update_phone_pool_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhonePoolDetailDto If the method is called asynchronously, returns the request thread.
def update_phone_pool_with_http_info(self, pool_id, update_phone_pool_options, **kwargs)-
Update phone pool # noqa: E501
Update phone pool metadata such as name or description # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_phone_pool_with_http_info(pool_id, update_phone_pool_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param str pool_id: (required) :param UpdatePhonePoolOptions update_phone_pool_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhonePoolDetailDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def validate_phone_number(self, validate_phone_number_options, **kwargs)-
Verify validity of a phone number # noqa: E501
Validate a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.validate_phone_number(validate_phone_number_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param ValidatePhoneNumberOptions validate_phone_number_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PhoneNumberValidationDto If the method is called asynchronously, returns the request thread.
def validate_phone_number_with_http_info(self, validate_phone_number_options, **kwargs)-
Verify validity of a phone number # noqa: E501
Validate a phone number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.validate_phone_number_with_http_info(validate_phone_number_options, async_req=True) >>> result = thread.get():param async_req bool: execute request asynchronously :param ValidatePhoneNumberOptions validate_phone_number_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PhoneNumberValidationDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.