def setUp(self): configuration = Configuration(api_key={"ApiKeyAuth": "test-api-key"}) self.api = WorldCheckApi(api_client=ApiClient( configuration=configuration))
def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def __connection_async_callback_url( self, transaction_status, mode="trial", **kwargs ): """Connection Async Callback Url # noqa: E501 If set, the transaction will run asynchronously and Trulioo will try to update the client with transaction state updates until completed. If callback is not desired but the client wants to initiate an asynchronous transaction, provide https://api.globaldatacompany.com/connection/v1/async-callback as the Callback URL. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.connection_async_callback_url(transaction_status, mode="trial", async_req=True) >>> result = thread.get() Args: transaction_status (TransactionStatus): transactionStatus mode (str): trial or live. defaults to "trial", must be one of ["trial"] Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: {str: (bool, date, datetime, dict, float, int, list, str, none_type)} If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['mode'] = \ mode kwargs['transaction_status'] = \ transaction_status return self.call_with_http_info(**kwargs) self.connection_async_callback_url = _Endpoint( settings={ 'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), 'auth': [], 'endpoint_path': '/{mode}/connection/v1/async-callback', 'operation_id': 'connection_async_callback_url', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'mode', 'transaction_status', ], 'required': [ 'mode', 'transaction_status', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'mode': (str,), 'transaction_status': (TransactionStatus,), }, 'attribute_map': { 'mode': 'mode', }, 'location_map': { 'mode': 'path', 'transaction_status': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json', 'text/json' ], 'content_type': [ 'application/json', 'text/json' ] }, api_client=api_client, callable=__connection_async_callback_url ) def __say_hello( self, name, mode="trial", **kwargs ): """Say Hello # noqa: E501 This method enables you to check if your system can connect to our system. You can even use a web browser to verify a connection to our system. Applied a maximum length for the name parameter of 100 via a route constraint # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.say_hello(name, mode="trial", async_req=True) >>> result = thread.get() Args: name (str): Name to be returned in the response mode (str): trial or live. defaults to "trial", must be one of ["trial"] Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['mode'] = \ mode kwargs['name'] = \ name return self.call_with_http_info(**kwargs) self.say_hello = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/{mode}/connection/v1/sayhello/{name}', 'operation_id': 'say_hello', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'mode', 'name', ], 'required': [ 'mode', 'name', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'mode': (str,), 'name': (str,), }, 'attribute_map': { 'mode': 'mode', 'name': 'name', }, 'location_map': { 'mode': 'path', 'name': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json', 'text/json' ], 'content_type': [], }, api_client=api_client, callable=__say_hello ) def __test_authentication( self, mode="trial", **kwargs ): """Test Authentication # noqa: E501 This method enables you to check if your credentials are valid. You will need to use basic authentication to ensure a successful response. # 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_authentication(mode="trial", async_req=True) >>> result = thread.get() Args: mode (str): trial or live. defaults to "trial", must be one of ["trial"] Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['mode'] = \ mode return self.call_with_http_info(**kwargs) self.test_authentication = _Endpoint( settings={ 'response_type': (str,), 'auth': [ 'ApiKeyAuth' ], 'endpoint_path': '/{mode}/connection/v1/testauthentication', 'operation_id': 'test_authentication', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'mode', ], 'required': [ 'mode', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'mode': (str,), }, 'attribute_map': { 'mode': 'mode', }, 'location_map': { 'mode': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json', 'text/json' ], 'content_type': [], }, api_client=api_client, callable=__test_authentication )
def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def __document_download(self, transaction_record_id, field_name, mode="trial", **kwargs): """Document Download # noqa: E501 Download Document # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.document_download(transaction_record_id, field_name, mode="trial", async_req=True) >>> result = thread.get() Args: transaction_record_id (str): id of the transactionrecord, this will be a GUID field_name (str): document field name mode (str): trial or live. defaults to "trial", must be one of ["trial"] Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: {str: (bool, date, datetime, dict, float, int, list, str, none_type)} If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['mode'] = \ mode kwargs['transaction_record_id'] = \ transaction_record_id kwargs['field_name'] = \ field_name return self.call_with_http_info(**kwargs) self.document_download = _Endpoint(settings={ 'response_type': ({ str: (bool, date, datetime, dict, float, int, list, str, none_type) }, ), 'auth': ['ApiKeyAuth'], 'endpoint_path': '/{mode}/verifications/v1/documentdownload/{transactionRecordId}/{fieldName}', 'operation_id': 'document_download', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'mode', 'transaction_record_id', 'field_name', ], 'required': [ 'mode', 'transaction_record_id', 'field_name', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'mode': (str, ), 'transaction_record_id': (str, ), 'field_name': (str, ), }, 'attribute_map': { 'mode': 'mode', 'transaction_record_id': 'transactionRecordId', 'field_name': 'fieldName', }, 'location_map': { 'mode': 'path', 'transaction_record_id': 'path', 'field_name': 'path', }, 'collection_format_map': {} }, headers_map={ 'accept': [ 'application/json', 'text/json' ], 'content_type': [], }, api_client=api_client, callable=__document_download) def __get_transaction_record(self, id, mode="trial", **kwargs): """Get Transaction Record # noqa: E501 This method is used to retrieve the request and results of a verification performed using the verify method. The response for this method includes the same information as verify method's response, along with data present in the input fields of the verify request. # 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_transaction_record(id, mode="trial", async_req=True) >>> result = thread.get() Args: id (str): id of the transactionrecord, this will be a GUID mode (str): trial or live. defaults to "trial", must be one of ["trial"] Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: TransactionRecordResult If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['mode'] = \ mode kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_transaction_record = _Endpoint( settings={ 'response_type': (TransactionRecordResult, ), 'auth': ['ApiKeyAuth'], 'endpoint_path': '/{mode}/verifications/v1/transactionrecord/{id}', 'operation_id': 'get_transaction_record', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'mode', 'id', ], 'required': [ 'mode', 'id', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'mode': (str, ), 'id': (str, ), }, 'attribute_map': { 'mode': 'mode', 'id': 'id', }, 'location_map': { 'mode': 'path', 'id': 'path', }, 'collection_format_map': {} }, headers_map={ 'accept': ['application/json', 'text/json'], 'content_type': [], }, api_client=api_client, callable=__get_transaction_record) def __get_transaction_record_address(self, id, mode="trial", **kwargs): """Get Transaction Record Address # noqa: E501 Fetch the results of a verification with the TransactionRecordId for the transaction this will include additional information if your account includes address cleansing. # 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_transaction_record_address(id, mode="trial", async_req=True) >>> result = thread.get() Args: id (str): id of the transactionrecord, this will be a GUID mode (str): trial or live. defaults to "trial", must be one of ["trial"] Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: TransactionRecordResult If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['mode'] = \ mode kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_transaction_record_address = _Endpoint( settings={ 'response_type': (TransactionRecordResult, ), 'auth': ['ApiKeyAuth'], 'endpoint_path': '/{mode}/verifications/v1/transactionrecord/{id}/withaddress', 'operation_id': 'get_transaction_record_address', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'mode', 'id', ], 'required': [ 'mode', 'id', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'mode': (str, ), 'id': (str, ), }, 'attribute_map': { 'mode': 'mode', 'id': 'id', }, 'location_map': { 'mode': 'path', 'id': 'path', }, 'collection_format_map': {} }, headers_map={ 'accept': ['application/json', 'text/json'], 'content_type': [], }, api_client=api_client, callable=__get_transaction_record_address) def __get_transaction_record_document(self, transaction_record_id, document_field, mode="trial", **kwargs): """Get Transaction Record Document # noqa: E501 This method is used to retrieve the document of a verification performed using the verify method. The response for this method includes the processed base64 JPEG formatted string # 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_transaction_record_document(transaction_record_id, document_field, mode="trial", async_req=True) >>> result = thread.get() Args: transaction_record_id (str): id of the transactionrecord, this will be a GUID document_field (str): FieldName of the Document, this will be a string mode (str): trial or live. defaults to "trial", must be one of ["trial"] Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['mode'] = \ mode kwargs['transaction_record_id'] = \ transaction_record_id kwargs['document_field'] = \ document_field return self.call_with_http_info(**kwargs) self.get_transaction_record_document = _Endpoint( settings={ 'response_type': (str, ), 'auth': ['ApiKeyAuth'], 'endpoint_path': '/{mode}/verifications/v1/transactionrecord/{transactionRecordID}/{documentField}', 'operation_id': 'get_transaction_record_document', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'mode', 'transaction_record_id', 'document_field', ], 'required': [ 'mode', 'transaction_record_id', 'document_field', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'mode': (str, ), 'transaction_record_id': (str, ), 'document_field': (str, ), }, 'attribute_map': { 'mode': 'mode', 'transaction_record_id': 'transactionRecordID', 'document_field': 'documentField', }, 'location_map': { 'mode': 'path', 'transaction_record_id': 'path', 'document_field': 'path', }, 'collection_format_map': {} }, headers_map={ 'accept': ['application/json', 'text/json'], 'content_type': [], }, api_client=api_client, callable=__get_transaction_record_document) def __get_transaction_record_verbose(self, id, mode="trial", **kwargs): """Get Transaction Record Verbose # noqa: E501 Fetch the results of a verification with the TransactionRecordId for the transaction this will include additional information if your account includes address cleansing and watchlist details. # 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_transaction_record_verbose(id, mode="trial", async_req=True) >>> result = thread.get() Args: id (str): id of the transactionrecord, this will be a GUID mode (str): trial or live. defaults to "trial", must be one of ["trial"] Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: TransactionRecordResult If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['mode'] = \ mode kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_transaction_record_verbose = _Endpoint( settings={ 'response_type': (TransactionRecordResult, ), 'auth': ['ApiKeyAuth'], 'endpoint_path': '/{mode}/verifications/v1/transactionrecord/{id}/verbose', 'operation_id': 'get_transaction_record_verbose', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'mode', 'id', ], 'required': [ 'mode', 'id', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'mode': (str, ), 'id': (str, ), }, 'attribute_map': { 'mode': 'mode', 'id': 'id', }, 'location_map': { 'mode': 'path', 'id': 'path', }, 'collection_format_map': {} }, headers_map={ 'accept': ['application/json', 'text/json'], 'content_type': [], }, api_client=api_client, callable=__get_transaction_record_verbose) def __get_transaction_status(self, id, mode="trial", **kwargs): """Get Transaction Status # noqa: E501 This method is used to retrieve the processing status of an asynchronous transaction. The response for this method includes the processing status of the verification, the TransactionID, the TransactionRecordID as well as whether the verification request has timed out. # 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_transaction_status(id, mode="trial", async_req=True) >>> result = thread.get() Args: id (str): id of the asynchronous transaction, this will be a GUID mode (str): trial or live. defaults to "trial", must be one of ["trial"] Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: TransactionStatus If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['mode'] = \ mode kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_transaction_status = _Endpoint( settings={ 'response_type': (TransactionStatus, ), 'auth': ['ApiKeyAuth'], 'endpoint_path': '/{mode}/verifications/v1/transaction/{id}/status', 'operation_id': 'get_transaction_status', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'mode', 'id', ], 'required': [ 'mode', 'id', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'mode': (str, ), 'id': (str, ), }, 'attribute_map': { 'mode': 'mode', 'id': 'id', }, 'location_map': { 'mode': 'path', 'id': 'path', }, 'collection_format_map': {} }, headers_map={ 'accept': ['application/json', 'text/json'], 'content_type': [], }, api_client=api_client, callable=__get_transaction_status) def __verify(self, verify_request, mode="trial", **kwargs): """Verify # noqa: E501 Calling this method will perform a verification. If your account includes address cleansing set the CleansedAddress flag to get additional address information in the result. You can query configuration to get what fields are available to you in each each country. It is also possible to get sample requests from the customer portal. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.verify(verify_request, mode="trial", async_req=True) >>> result = thread.get() Args: verify_request (VerifyRequest): mode (str): trial or live. defaults to "trial", must be one of ["trial"] Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: VerifyResult If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['mode'] = \ mode kwargs['verify_request'] = \ verify_request return self.call_with_http_info(**kwargs) self.verify = _Endpoint(settings={ 'response_type': (VerifyResult, ), 'auth': ['ApiKeyAuth'], 'endpoint_path': '/{mode}/verifications/v1/verify', 'operation_id': 'verify', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'mode', 'verify_request', ], 'required': [ 'mode', 'verify_request', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'mode': (str, ), 'verify_request': (VerifyRequest, ), }, 'attribute_map': { 'mode': 'mode', }, 'location_map': { 'mode': 'path', 'verify_request': 'body', }, 'collection_format_map': {} }, headers_map={ 'accept': ['application/json', 'text/json'], 'content_type': ['application/json', 'text/json'] }, api_client=api_client, callable=__verify)
def setUp(self): configuration = Configuration(api_key={"ApiKeyAuth": "test-api-key"}) self.api = VerificationsApi(api_client=ApiClient( configuration=configuration))
def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def __get_world_check_profile(self, original_transaction_id, reference_id, mode="trial", **kwargs): """Get World Check Profile # noqa: E501 Returns the corresponding world-check profile of the specified transaction ID and reference ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_world_check_profile(original_transaction_id, reference_id, mode="trial", async_req=True) >>> result = thread.get() Args: original_transaction_id (str): reference_id (str): mode (str): trial or live. defaults to "trial", must be one of ["trial"] Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: {str: (bool, date, datetime, dict, float, int, list, str, none_type)} If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['mode'] = \ mode kwargs['original_transaction_id'] = \ original_transaction_id kwargs['reference_id'] = \ reference_id return self.call_with_http_info(**kwargs) self.get_world_check_profile = _Endpoint( settings={ 'response_type': ({ str: (bool, date, datetime, dict, float, int, list, str, none_type) }, ), 'auth': ['ApiKeyAuth'], 'endpoint_path': '/{mode}/worldcheck/v1/profile/{originalTransactionID}/{referenceID}', 'operation_id': 'get_world_check_profile', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'mode', 'original_transaction_id', 'reference_id', ], 'required': [ 'mode', 'original_transaction_id', 'reference_id', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'mode': (str, ), 'original_transaction_id': (str, ), 'reference_id': (str, ), }, 'attribute_map': { 'mode': 'mode', 'original_transaction_id': 'originalTransactionID', 'reference_id': 'referenceID', }, 'location_map': { 'mode': 'path', 'original_transaction_id': 'path', 'reference_id': 'path', }, 'collection_format_map': {} }, headers_map={ 'accept': ['application/json', 'text/json'], 'content_type': [], }, api_client=api_client, callable=__get_world_check_profile)
def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def __get_business_search_result(self, id, mode="trial", **kwargs): """Get Business Search Result # noqa: E501 returns the a business search result. # 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_business_search_result(id, mode="trial", async_req=True) >>> result = thread.get() Args: id (str): transaction record id mode (str): trial or live. defaults to "trial", must be one of ["trial"] Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: BusinessSearchResponse If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['mode'] = \ mode kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_business_search_result = _Endpoint( settings={ 'response_type': (BusinessSearchResponse, ), 'auth': ['ApiKeyAuth'], 'endpoint_path': '/{mode}/business/v1/search/transactionrecord/{id}', 'operation_id': 'get_business_search_result', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'mode', 'id', ], 'required': [ 'mode', 'id', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'mode': (str, ), 'id': (str, ), }, 'attribute_map': { 'mode': 'mode', 'id': 'id', }, 'location_map': { 'mode': 'path', 'id': 'path', }, 'collection_format_map': {} }, headers_map={ 'accept': ['application/json', 'text/json'], 'content_type': [], }, api_client=api_client, callable=__get_business_search_result) def __search(self, business_search_request, mode="trial", **kwargs): """Search # noqa: E501 Calling this method will perform a business search. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search(business_search_request, mode="trial", async_req=True) >>> result = thread.get() Args: business_search_request (BusinessSearchRequest): mode (str): trial or live. defaults to "trial", must be one of ["trial"] Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: BusinessSearchResponse If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['mode'] = \ mode kwargs['business_search_request'] = \ business_search_request return self.call_with_http_info(**kwargs) self.search = _Endpoint(settings={ 'response_type': (BusinessSearchResponse, ), 'auth': ['ApiKeyAuth'], 'endpoint_path': '/{mode}/business/v1/search', 'operation_id': 'search', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'mode', 'business_search_request', ], 'required': [ 'mode', 'business_search_request', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'mode': (str, ), 'business_search_request': (BusinessSearchRequest, ), }, 'attribute_map': { 'mode': 'mode', }, 'location_map': { 'mode': 'path', 'business_search_request': 'body', }, 'collection_format_map': {} }, headers_map={ 'accept': ['application/json', 'text/json'], 'content_type': ['application/json', 'text/json'] }, api_client=api_client, callable=__search)