Module mailslurp_client.api.phone_controller_api

MailSlurp API

MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. 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

Expand source code
# coding: utf-8

"""
    MailSlurp API

    MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more.  ## Resources  - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository  # noqa: E501

    The version of the OpenAPI document: 6.5.2
    Contact: contact@mailslurp.dev
    Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from mailslurp_client.api_client import ApiClient
from mailslurp_client.exceptions import (  # noqa: F401
    ApiTypeError,
    ApiValueError
)


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 create_emergency_address(self, create_emergency_address_options, **kwargs):  # noqa: E501
        """create_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.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_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.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 delete_emergency_address(self, address_id, **kwargs):  # noqa: E501
        """delete_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_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_number(self, phone_number_id, **kwargs):  # noqa: E501
        """delete_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.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_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.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 get_emergency_address(self, address_id, **kwargs):  # noqa: E501
        """get_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.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_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.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

        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

        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_phone_number(self, phone_number_id, **kwargs):  # noqa: E501
        """get_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(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_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_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_numbers(self, **kwargs):  # noqa: E501
        """get_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_numbers(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str phone_country: Optional phone country
        :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 _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

        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 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 _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',
            'page',
            'size',
            'sort',
            'since',
            'before'
        ]
        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 '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

        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

        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

        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 test_phone_number_send_sms(self, phone_number_id, test_phone_number_options, **kwargs):  # noqa: E501
        """test_phone_number_send_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_phone_number_send_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)

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 create_emergency_address(self, create_emergency_address_options, **kwargs):  # noqa: E501
        """create_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.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_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.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 delete_emergency_address(self, address_id, **kwargs):  # noqa: E501
        """delete_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_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_number(self, phone_number_id, **kwargs):  # noqa: E501
        """delete_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.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_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.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 get_emergency_address(self, address_id, **kwargs):  # noqa: E501
        """get_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.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_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.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

        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

        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_phone_number(self, phone_number_id, **kwargs):  # noqa: E501
        """get_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(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_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_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_numbers(self, **kwargs):  # noqa: E501
        """get_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_numbers(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str phone_country: Optional phone country
        :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 _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

        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 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 _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',
            'page',
            'size',
            'sort',
            'since',
            'before'
        ]
        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 '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

        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

        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

        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 test_phone_number_send_sms(self, phone_number_id, test_phone_number_options, **kwargs):  # noqa: E501
        """test_phone_number_send_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_phone_number_send_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)

Methods

def create_emergency_address(self, create_emergency_address_options, **kwargs)

create_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.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.

Expand source code
def create_emergency_address(self, create_emergency_address_options, **kwargs):  # noqa: E501
    """create_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.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)

create_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.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.

Expand source code
def create_emergency_address_with_http_info(self, create_emergency_address_options, **kwargs):  # noqa: E501
    """create_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.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 delete_emergency_address(self, address_id, **kwargs)

delete_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.

Expand source code
def delete_emergency_address(self, address_id, **kwargs):  # noqa: E501
    """delete_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)

delete_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.

Expand source code
def delete_emergency_address_with_http_info(self, address_id, **kwargs):  # noqa: E501
    """delete_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_number(self, phone_number_id, **kwargs)

delete_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.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.

Expand source code
def delete_phone_number(self, phone_number_id, **kwargs):  # noqa: E501
    """delete_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.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)

delete_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.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.

Expand source code
def delete_phone_number_with_http_info(self, phone_number_id, **kwargs):  # noqa: E501
    """delete_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.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 get_emergency_address(self, address_id, **kwargs)

get_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.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.

Expand source code
def get_emergency_address(self, address_id, **kwargs):  # noqa: E501
    """get_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.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)

get_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.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.

Expand source code
def get_emergency_address_with_http_info(self, address_id, **kwargs):  # noqa: E501
    """get_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.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)

get_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.

Expand source code
def get_emergency_addresses(self, **kwargs):  # noqa: E501
    """get_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)

get_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.

Expand source code
def get_emergency_addresses_with_http_info(self, **kwargs):  # noqa: E501
    """get_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_phone_number(self, phone_number_id, **kwargs)

get_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(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.

Expand source code
def get_phone_number(self, phone_number_id, **kwargs):  # noqa: E501
    """get_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(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)

get_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_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.

Expand source code
def get_phone_number_with_http_info(self, phone_number_id, **kwargs):  # noqa: E501
    """get_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_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_numbers(self, **kwargs)

get_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_numbers(async_req=True)
>>> result = thread.get()

:param async_req bool: execute request asynchronously :param str phone_country: Optional phone country :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 _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.

Expand source code
def get_phone_numbers(self, **kwargs):  # noqa: E501
    """get_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_numbers(async_req=True)
    >>> result = thread.get()

    :param async_req bool: execute request asynchronously
    :param str phone_country: Optional phone country
    :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 _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)

get_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_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 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 _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.

Expand source code
def get_phone_numbers_with_http_info(self, **kwargs):  # noqa: E501
    """get_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_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 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 _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',
        'page',
        'size',
        'sort',
        'since',
        'before'
    ]
    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 '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

    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)

get_phone_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.

Expand source code
def get_phone_plans(self, **kwargs):  # noqa: E501
    """get_phone_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)

get_phone_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.

Expand source code
def get_phone_plans_with_http_info(self, **kwargs):  # noqa: E501
    """get_phone_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 test_phone_number_send_sms(self, phone_number_id, test_phone_number_options, **kwargs)

test_phone_number_send_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.

Expand source code
def test_phone_number_send_sms(self, phone_number_id, test_phone_number_options, **kwargs):  # noqa: E501
    """test_phone_number_send_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)

test_phone_number_send_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.

Expand source code
def test_phone_number_send_sms_with_http_info(self, phone_number_id, test_phone_number_options, **kwargs):  # noqa: E501
    """test_phone_number_send_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)