class CountryStateServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def all(self, **kwargs): """All This operation returns all states of all countries. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.all(async_req=True) >>> result = thread.get() :param async_req bool :return: list[RestCountryState] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.all_with_http_info(**kwargs) else: (data) = self.all_with_http_info(**kwargs) return data def all_with_http_info(self, **kwargs): """All This operation returns all states of all countries. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.all_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: list[RestCountryState] If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method all" % key ) params[key] = val del 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( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['*/*']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/country-state/all', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[RestCountryState]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def country(self, code, **kwargs): """Find by Country This operation returns all states for a given country. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.country(code, async_req=True) >>> result = thread.get() :param async_req bool :param str code: The country code in ISO code two letter format for which all states should be returned. (required) :return: list[RestCountryState] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.country_with_http_info(code, **kwargs) else: (data) = self.country_with_http_info(code, **kwargs) return data def country_with_http_info(self, code, **kwargs): """Find by Country This operation returns all states for a given country. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.country_with_http_info(code, async_req=True) >>> result = thread.get() :param async_req bool :param str code: The country code in ISO code two letter format for which all states should be returned. (required) :return: list[RestCountryState] If the method is called asynchronously, returns the request thread. """ all_params = ['code'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method country" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'code' is set if ('code' not in params or params['code'] is None): raise ValueError("Missing the required parameter `code` when calling `country`") collection_formats = {} path_params = {} query_params = [] if 'code' in params: query_params.append(('code', params['code'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['*/*']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/country-state/country', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[RestCountryState]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
class CurrencyServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def all(self, **kwargs): """All This operation returns all currencies. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.all(async_req=True) >>> result = thread.get() :param async_req bool :return: list[RestCurrency] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.all_with_http_info(**kwargs) else: (data) = self.all_with_http_info(**kwargs) return data def all_with_http_info(self, **kwargs): """All This operation returns all currencies. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.all_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: list[RestCurrency] If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method all" % key) params[key] = val del 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( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['*/*']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/currency/all', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[RestCurrency]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
class TransactionCommentServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def all(self, space_id, transaction_id, **kwargs): """Find by transaction Returns all comments of the transaction. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.all(space_id, transaction_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int transaction_id: (required) :return: list[TransactionComment] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.all_with_http_info(space_id, transaction_id, **kwargs) else: (data) = self.all_with_http_info(space_id, transaction_id, **kwargs) return data def all_with_http_info(self, space_id, transaction_id, **kwargs): """Find by transaction Returns all comments of the transaction. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.all_with_http_info(space_id, transaction_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int transaction_id: (required) :return: list[TransactionComment] If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'transaction_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method all" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `all`") # verify the required parameter 'transaction_id' is set if ('transaction_id' not in params or params['transaction_id'] is None): raise ValueError("Missing the required parameter `transaction_id` when calling `all`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'transaction_id' in params: query_params.append(('transactionId', params['transaction_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/transaction-comment/all', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[TransactionComment]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def create(self, space_id, entity, **kwargs): """Create Creates the comment with the given properties. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create(space_id, entity, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param TransactionCommentCreate entity: (required) :return: TransactionComment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_with_http_info(space_id, entity, **kwargs) else: (data) = self.create_with_http_info(space_id, entity, **kwargs) return data def create_with_http_info(self, space_id, entity, **kwargs): """Create Creates the comment with the given properties. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_with_http_info(space_id, entity, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param TransactionCommentCreate entity: (required) :return: TransactionComment If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'entity'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `create`") # verify the required parameter 'entity' is set if ('entity' not in params or params['entity'] is None): raise ValueError("Missing the required parameter `entity` when calling `create`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'entity' in params: body_params = params['entity'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/transaction-comment/create', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TransactionComment', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def delete(self, space_id, id, **kwargs): """Delete Deletes the comment with the given id. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_with_http_info(space_id, id, **kwargs) else: (data) = self.delete_with_http_info(space_id, id, **kwargs) return data def delete_with_http_info(self, space_id, id, **kwargs): """Delete Deletes the comment with the given id. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `delete`") # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `delete`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/transaction-comment/delete', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def pin(self, space_id, id, **kwargs): """Pin Pins the comment to the top. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.pin(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.pin_with_http_info(space_id, id, **kwargs) else: (data) = self.pin_with_http_info(space_id, id, **kwargs) return data def pin_with_http_info(self, space_id, id, **kwargs): """Pin Pins the comment to the top. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.pin_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method pin" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `pin`") # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `pin`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['*/*']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/transaction-comment/pin', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def read(self, space_id, id, **kwargs): """Read Reads the comment with the given 'id' and returns it. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: (required) :return: TransactionComment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.read_with_http_info(space_id, id, **kwargs) else: (data) = self.read_with_http_info(space_id, id, **kwargs) return data def read_with_http_info(self, space_id, id, **kwargs): """Read Reads the comment with the given 'id' and returns it. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: (required) :return: TransactionComment If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method read" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `read`") # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `read`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['*/*']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/transaction-comment/read', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TransactionComment', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def unpin(self, space_id, id, **kwargs): """Unpin Unpins the comment from the top. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.unpin(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.unpin_with_http_info(space_id, id, **kwargs) else: (data) = self.unpin_with_http_info(space_id, id, **kwargs) return data def unpin_with_http_info(self, space_id, id, **kwargs): """Unpin Unpins the comment from the top. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.unpin_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method unpin" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `unpin`") # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `unpin`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['*/*']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/transaction-comment/unpin', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def update(self, space_id, entity, **kwargs): """Update This updates the comment with the given properties. Only those properties which should be updated can be provided. The 'id' and 'version' are required to identify the comment. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update(space_id, entity, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param TransactionCommentActive entity: (required) :return: TransactionComment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_with_http_info(space_id, entity, **kwargs) else: (data) = self.update_with_http_info(space_id, entity, **kwargs) return data def update_with_http_info(self, space_id, entity, **kwargs): """Update This updates the comment with the given properties. Only those properties which should be updated can be provided. The 'id' and 'version' are required to identify the comment. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_with_http_info(space_id, entity, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param TransactionCommentActive entity: (required) :return: TransactionComment If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'entity'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `update`") # verify the required parameter 'entity' is set if ('entity' not in params or params['entity'] is None): raise ValueError("Missing the required parameter `entity` when calling `update`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'entity' in params: body_params = params['entity'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/transaction-comment/update', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TransactionComment', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
class CardProcessingServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def process(self, space_id, transaction_id, payment_method_configuration_id, card_data, **kwargs): """Process The process method will process the transaction with the given card details without using 3-D secure. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.process(space_id, transaction_id, payment_method_configuration_id, card_data, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int transaction_id: The ID of the transaction which should be processed. (required) :param int payment_method_configuration_id: The payment method configuration ID which is applied to the transaction. (required) :param AuthenticatedCardDataCreate card_data: The card details as JSON in plain which should be used to authorize the payment. (required) :return: Transaction If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.process_with_http_info( space_id, transaction_id, payment_method_configuration_id, card_data, **kwargs) else: (data) = self.process_with_http_info( space_id, transaction_id, payment_method_configuration_id, card_data, **kwargs) return data def process_with_http_info(self, space_id, transaction_id, payment_method_configuration_id, card_data, **kwargs): """Process The process method will process the transaction with the given card details without using 3-D secure. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.process_with_http_info(space_id, transaction_id, payment_method_configuration_id, card_data, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int transaction_id: The ID of the transaction which should be processed. (required) :param int payment_method_configuration_id: The payment method configuration ID which is applied to the transaction. (required) :param AuthenticatedCardDataCreate card_data: The card details as JSON in plain which should be used to authorize the payment. (required) :return: Transaction If the method is called asynchronously, returns the request thread. """ all_params = [ 'space_id', 'transaction_id', 'payment_method_configuration_id', 'card_data' ] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method process" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `process`" ) # verify the required parameter 'transaction_id' is set if ('transaction_id' not in params or params['transaction_id'] is None): raise ValueError( "Missing the required parameter `transaction_id` when calling `process`" ) # verify the required parameter 'payment_method_configuration_id' is set if ('payment_method_configuration_id' not in params or params['payment_method_configuration_id'] is None): raise ValueError( "Missing the required parameter `payment_method_configuration_id` when calling `process`" ) # verify the required parameter 'card_data' is set if ('card_data' not in params or params['card_data'] is None): raise ValueError( "Missing the required parameter `card_data` when calling `process`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'transaction_id' in params: query_params.append(('transactionId', params['transaction_id'])) if 'payment_method_configuration_id' in params: query_params.append(('paymentMethodConfigurationId', params['payment_method_configuration_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'card_data' in params: body_params = params['card_data'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/card-processing/process', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Transaction', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def process_with3_d_secure(self, space_id, transaction_id, payment_method_configuration_id, card_data, **kwargs): """Process With 3-D Secure The process method will process the transaction with the given card details by eventually using 3-D secure. The buyer has to be redirect to the URL returned by this method. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.process_with3_d_secure(space_id, transaction_id, payment_method_configuration_id, card_data, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int transaction_id: The ID of the transaction which should be processed. (required) :param int payment_method_configuration_id: The payment method configuration ID which is applied to the transaction. (required) :param TokenizedCardDataCreate card_data: The card details as JSON in plain which should be used to authorize the payment. (required) :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.process_with3_d_secure_with_http_info( space_id, transaction_id, payment_method_configuration_id, card_data, **kwargs) else: (data) = self.process_with3_d_secure_with_http_info( space_id, transaction_id, payment_method_configuration_id, card_data, **kwargs) return data def process_with3_d_secure_with_http_info(self, space_id, transaction_id, payment_method_configuration_id, card_data, **kwargs): """Process With 3-D Secure The process method will process the transaction with the given card details by eventually using 3-D secure. The buyer has to be redirect to the URL returned by this method. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.process_with3_d_secure_with_http_info(space_id, transaction_id, payment_method_configuration_id, card_data, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int transaction_id: The ID of the transaction which should be processed. (required) :param int payment_method_configuration_id: The payment method configuration ID which is applied to the transaction. (required) :param TokenizedCardDataCreate card_data: The card details as JSON in plain which should be used to authorize the payment. (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = [ 'space_id', 'transaction_id', 'payment_method_configuration_id', 'card_data' ] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method process_with3_d_secure" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `process_with3_d_secure`" ) # verify the required parameter 'transaction_id' is set if ('transaction_id' not in params or params['transaction_id'] is None): raise ValueError( "Missing the required parameter `transaction_id` when calling `process_with3_d_secure`" ) # verify the required parameter 'payment_method_configuration_id' is set if ('payment_method_configuration_id' not in params or params['payment_method_configuration_id'] is None): raise ValueError( "Missing the required parameter `payment_method_configuration_id` when calling `process_with3_d_secure`" ) # verify the required parameter 'card_data' is set if ('card_data' not in params or params['card_data'] is None): raise ValueError( "Missing the required parameter `card_data` when calling `process_with3_d_secure`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'transaction_id' in params: query_params.append(('transactionId', params['transaction_id'])) if 'payment_method_configuration_id' in params: query_params.append(('paymentMethodConfigurationId', params['payment_method_configuration_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'card_data' in params: body_params = params['card_data'] # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/card-processing/processWith3DSecure', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
class PaymentTerminalTillServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def perform_transaction(self, space_id, transaction_id, terminal_id, **kwargs): """Perform Payment Terminal Transaction Starts a payment terminal transaction and waits for its completion. If the call returns with a long polling timeout status, you may try again. The processing of the transaction will be picked up where it was left off. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.perform_transaction(space_id, transaction_id, terminal_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int transaction_id: The ID of the transaction which is used to process with the terminal. (required) :param int terminal_id: The ID of the terminal which should be used to process the transaction. (required) :param str language: The language in which the messages should be rendered in. :return: Transaction If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True kwargs['_request_timeout'] = 90 if kwargs.get('async_req'): return self.perform_transaction_with_http_info( space_id, transaction_id, terminal_id, **kwargs) else: (data) = self.perform_transaction_with_http_info( space_id, transaction_id, terminal_id, **kwargs) return data def perform_transaction_with_http_info(self, space_id, transaction_id, terminal_id, **kwargs): """Perform Payment Terminal Transaction Starts a payment terminal transaction and waits for its completion. If the call returns with a long polling timeout status, you may try again. The processing of the transaction will be picked up where it was left off. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.perform_transaction_with_http_info(space_id, transaction_id, terminal_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int transaction_id: The ID of the transaction which is used to process with the terminal. (required) :param int terminal_id: The ID of the terminal which should be used to process the transaction. (required) :param str language: The language in which the messages should be rendered in. :return: Transaction If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'transaction_id', 'terminal_id', 'language'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method perform_transaction" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `perform_transaction`" ) # verify the required parameter 'transaction_id' is set if ('transaction_id' not in params or params['transaction_id'] is None): raise ValueError( "Missing the required parameter `transaction_id` when calling `perform_transaction`" ) # verify the required parameter 'terminal_id' is set if ('terminal_id' not in params or params['terminal_id'] is None): raise ValueError( "Missing the required parameter `terminal_id` when calling `perform_transaction`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'transaction_id' in params: query_params.append(('transactionId', params['transaction_id'])) if 'terminal_id' in params: query_params.append(('terminalId', params['terminal_id'])) if 'language' in params: query_params.append(('language', params['language'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/payment-terminal-till/perform-transaction', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Transaction', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def perform_transaction_by_identifier(self, space_id, transaction_id, terminal_identifier, **kwargs): """Perform Payment Terminal Transaction (using TID) Starts a payment terminal transaction and waits for its completion. If the call returns with a long polling timeout status, you may try again. The processing of the transaction will be picked up where it was left off. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.perform_transaction_by_identifier(space_id, transaction_id, terminal_identifier, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int transaction_id: The ID of the transaction which is used to process with the terminal. (required) :param str terminal_identifier: The identifier (aka TID) of the terminal which should be used to process the transaction. (required) :param str language: The language in which the messages should be rendered in. :return: Transaction If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True kwargs['_request_timeout'] = 90 if kwargs.get('async_req'): return self.perform_transaction_by_identifier_with_http_info( space_id, transaction_id, terminal_identifier, **kwargs) else: (data) = self.perform_transaction_by_identifier_with_http_info( space_id, transaction_id, terminal_identifier, **kwargs) return data def perform_transaction_by_identifier_with_http_info( self, space_id, transaction_id, terminal_identifier, **kwargs): """Perform Payment Terminal Transaction (using TID) Starts a payment terminal transaction and waits for its completion. If the call returns with a long polling timeout status, you may try again. The processing of the transaction will be picked up where it was left off. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.perform_transaction_by_identifier_with_http_info(space_id, transaction_id, terminal_identifier, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int transaction_id: The ID of the transaction which is used to process with the terminal. (required) :param str terminal_identifier: The identifier (aka TID) of the terminal which should be used to process the transaction. (required) :param str language: The language in which the messages should be rendered in. :return: Transaction If the method is called asynchronously, returns the request thread. """ all_params = [ 'space_id', 'transaction_id', 'terminal_identifier', 'language' ] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method perform_transaction_by_identifier" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `perform_transaction_by_identifier`" ) # verify the required parameter 'transaction_id' is set if ('transaction_id' not in params or params['transaction_id'] is None): raise ValueError( "Missing the required parameter `transaction_id` when calling `perform_transaction_by_identifier`" ) # verify the required parameter 'terminal_identifier' is set if ('terminal_identifier' not in params or params['terminal_identifier'] is None): raise ValueError( "Missing the required parameter `terminal_identifier` when calling `perform_transaction_by_identifier`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'transaction_id' in params: query_params.append(('transactionId', params['transaction_id'])) if 'terminal_identifier' in params: query_params.append( ('terminalIdentifier', params['terminal_identifier'])) if 'language' in params: query_params.append(('language', params['language'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/payment-terminal-till/perform-transaction-by-identifier', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Transaction', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
class ShopifySubscriptionServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def count(self, space_id, **kwargs): """Count Counts the number of items in the database as restricted by the given filter. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.count(space_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQueryFilter filter: The filter which restricts the entities which are used to calculate the count. :return: int If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.count_with_http_info(space_id, **kwargs) else: (data) = self.count_with_http_info(space_id, **kwargs) return data def count_with_http_info(self, space_id, **kwargs): """Count Counts the number of items in the database as restricted by the given filter. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.count_with_http_info(space_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQueryFilter filter: The filter which restricts the entities which are used to calculate the count. :return: int If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'filter'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method count" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `count`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'filter' in params: body_params = params['filter'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/shopify-subscription/count', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='int', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def create(self, space_id, creation_request, **kwargs): """Create This operation allows to create a Shopify subscription. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create(space_id, creation_request, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param ShopifySubscriptionCreationRequest creation_request: (required) :return: ShopifySubscriptionVersion If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_with_http_info(space_id, creation_request, **kwargs) else: (data) = self.create_with_http_info(space_id, creation_request, **kwargs) return data def create_with_http_info(self, space_id, creation_request, **kwargs): """Create This operation allows to create a Shopify subscription. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_with_http_info(space_id, creation_request, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param ShopifySubscriptionCreationRequest creation_request: (required) :return: ShopifySubscriptionVersion If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'creation_request'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method create" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `create`" ) # verify the required parameter 'creation_request' is set if ('creation_request' not in params or params['creation_request'] is None): raise ValueError( "Missing the required parameter `creation_request` when calling `create`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'creation_request' in params: body_params = params['creation_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/shopify-subscription/create', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ShopifySubscriptionVersion', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def read(self, space_id, id, **kwargs): """Read Reads the entity with the given 'id' and returns it. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the Shopify subscription which should be returned. (required) :return: ShopifySubscription If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.read_with_http_info(space_id, id, **kwargs) else: (data) = self.read_with_http_info(space_id, id, **kwargs) return data def read_with_http_info(self, space_id, id, **kwargs): """Read Reads the entity with the given 'id' and returns it. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the Shopify subscription which should be returned. (required) :return: ShopifySubscription If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method read" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `read`" ) # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError( "Missing the required parameter `id` when calling `read`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['*/*']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/shopify-subscription/read', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ShopifySubscription', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def search(self, space_id, query, **kwargs): """Search Searches for the entities as specified by the given query. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search(space_id, query, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQuery query: The query restricts the Shopify subscriptions which are returned by the search. (required) :return: list[ShopifySubscription] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.search_with_http_info(space_id, query, **kwargs) else: (data) = self.search_with_http_info(space_id, query, **kwargs) return data def search_with_http_info(self, space_id, query, **kwargs): """Search Searches for the entities as specified by the given query. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_with_http_info(space_id, query, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQuery query: The query restricts the Shopify subscriptions which are returned by the search. (required) :return: list[ShopifySubscription] If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'query'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method search" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `search`" ) # verify the required parameter 'query' is set if ('query' not in params or params['query'] is None): raise ValueError( "Missing the required parameter `query` when calling `search`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'query' in params: body_params = params['query'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/shopify-subscription/search', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[ShopifySubscription]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def terminate(self, space_id, subscription_id, respect_termination_period, **kwargs): """Terminate This operation allows to terminate a Shopify subscription. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.terminate(space_id, subscription_id, respect_termination_period, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int subscription_id: The ID identifies the Shopify subscription which should be terminated. (required) :param bool respect_termination_period: The respect termination period controls whether the termination period configured on the product version should be respected or if the operation should take effect immediately. (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.terminate_with_http_info(space_id, subscription_id, respect_termination_period, **kwargs) else: (data) = self.terminate_with_http_info(space_id, subscription_id, respect_termination_period, **kwargs) return data def terminate_with_http_info(self, space_id, subscription_id, respect_termination_period, **kwargs): """Terminate This operation allows to terminate a Shopify subscription. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.terminate_with_http_info(space_id, subscription_id, respect_termination_period, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int subscription_id: The ID identifies the Shopify subscription which should be terminated. (required) :param bool respect_termination_period: The respect termination period controls whether the termination period configured on the product version should be respected or if the operation should take effect immediately. (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = [ 'space_id', 'subscription_id', 'respect_termination_period' ] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method terminate" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `terminate`" ) # verify the required parameter 'subscription_id' is set if ('subscription_id' not in params or params['subscription_id'] is None): raise ValueError( "Missing the required parameter `subscription_id` when calling `terminate`" ) # verify the required parameter 'respect_termination_period' is set if ('respect_termination_period' not in params or params['respect_termination_period'] is None): raise ValueError( "Missing the required parameter `respect_termination_period` when calling `terminate`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'subscription_id' in params: query_params.append(('subscriptionId', params['subscription_id'])) if 'respect_termination_period' in params: query_params.append(('respectTerminationPeriod', params['respect_termination_period'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/shopify-subscription/terminate', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def update(self, space_id, subscription, **kwargs): """Update This operation allows to update a Shopify subscription. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update(space_id, subscription, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param ShopifySubscriptionUpdateRequest subscription: (required) :return: ShopifySubscriptionVersion If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_with_http_info(space_id, subscription, **kwargs) else: (data) = self.update_with_http_info(space_id, subscription, **kwargs) return data def update_with_http_info(self, space_id, subscription, **kwargs): """Update This operation allows to update a Shopify subscription. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_with_http_info(space_id, subscription, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param ShopifySubscriptionUpdateRequest subscription: (required) :return: ShopifySubscriptionVersion If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'subscription'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method update" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `update`" ) # verify the required parameter 'subscription' is set if ('subscription' not in params or params['subscription'] is None): raise ValueError( "Missing the required parameter `subscription` when calling `update`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'subscription' in params: body_params = params['subscription'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/shopify-subscription/update', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ShopifySubscriptionVersion', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def update_addresses(self, space_id, update_request, **kwargs): """Update Addresses This operation allows to update a Shopify subscription addresses. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_addresses(space_id, update_request, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param ShopifySubscriptionUpdateAddressesRequest update_request: (required) :return: ShopifySubscriptionVersion If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_addresses_with_http_info( space_id, update_request, **kwargs) else: (data) = self.update_addresses_with_http_info( space_id, update_request, **kwargs) return data def update_addresses_with_http_info(self, space_id, update_request, **kwargs): """Update Addresses This operation allows to update a Shopify subscription addresses. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_addresses_with_http_info(space_id, update_request, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param ShopifySubscriptionUpdateAddressesRequest update_request: (required) :return: ShopifySubscriptionVersion If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'update_request'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method update_addresses" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `update_addresses`" ) # verify the required parameter 'update_request' is set if ('update_request' not in params or params['update_request'] is None): raise ValueError( "Missing the required parameter `update_request` when calling `update_addresses`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'update_request' in params: body_params = params['update_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/shopify-subscription/update-addresses', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ShopifySubscriptionVersion', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
class TokenServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def check_token_creation_possible(self, space_id, transaction_id, **kwargs): """Check If Token Creation Is Possible This operation checks if the given transaction can be used to create a token out of it. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.check_token_creation_possible(space_id, transaction_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int transaction_id: The id of the transaction for which we want to check if the token can be created or not. (required) :return: bool If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.check_token_creation_possible_with_http_info(space_id, transaction_id, **kwargs) else: (data) = self.check_token_creation_possible_with_http_info(space_id, transaction_id, **kwargs) return data def check_token_creation_possible_with_http_info(self, space_id, transaction_id, **kwargs): """Check If Token Creation Is Possible This operation checks if the given transaction can be used to create a token out of it. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.check_token_creation_possible_with_http_info(space_id, transaction_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int transaction_id: The id of the transaction for which we want to check if the token can be created or not. (required) :return: bool If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'transaction_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method check_token_creation_possible" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `check_token_creation_possible`") # verify the required parameter 'transaction_id' is set if ('transaction_id' not in params or params['transaction_id'] is None): raise ValueError("Missing the required parameter `transaction_id` when calling `check_token_creation_possible`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'transaction_id' in params: query_params.append(('transactionId', params['transaction_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] return self.api_client.call_api( '/token/check-token-creation-possible', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='bool', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def count(self, space_id, **kwargs): """Count Counts the number of items in the database as restricted by the given filter. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.count(space_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQueryFilter filter: The filter which restricts the entities which are used to calculate the count. :return: int If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.count_with_http_info(space_id, **kwargs) else: (data) = self.count_with_http_info(space_id, **kwargs) return data def count_with_http_info(self, space_id, **kwargs): """Count Counts the number of items in the database as restricted by the given filter. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.count_with_http_info(space_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQueryFilter filter: The filter which restricts the entities which are used to calculate the count. :return: int If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'filter'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method count" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `count`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'filter' in params: body_params = params['filter'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/token/count', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='int', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def create(self, space_id, entity, **kwargs): """Create Creates the entity with the given properties. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create(space_id, entity, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param TokenCreate entity: The token object with the properties which should be created. (required) :return: Token If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_with_http_info(space_id, entity, **kwargs) else: (data) = self.create_with_http_info(space_id, entity, **kwargs) return data def create_with_http_info(self, space_id, entity, **kwargs): """Create Creates the entity with the given properties. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_with_http_info(space_id, entity, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param TokenCreate entity: The token object with the properties which should be created. (required) :return: Token If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'entity'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `create`") # verify the required parameter 'entity' is set if ('entity' not in params or params['entity'] is None): raise ValueError("Missing the required parameter `entity` when calling `create`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'entity' in params: body_params = params['entity'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/token/create', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Token', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def create_token_based_on_transaction(self, space_id, transaction_id, **kwargs): """Create Token Based On Transaction This operation creates a token for the given transaction and fills it with the stored payment information of the transaction. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_token_based_on_transaction(space_id, transaction_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int transaction_id: The id of the transaction for which we want to create the token. (required) :return: TokenVersion If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_token_based_on_transaction_with_http_info(space_id, transaction_id, **kwargs) else: (data) = self.create_token_based_on_transaction_with_http_info(space_id, transaction_id, **kwargs) return data def create_token_based_on_transaction_with_http_info(self, space_id, transaction_id, **kwargs): """Create Token Based On Transaction This operation creates a token for the given transaction and fills it with the stored payment information of the transaction. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_token_based_on_transaction_with_http_info(space_id, transaction_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int transaction_id: The id of the transaction for which we want to create the token. (required) :return: TokenVersion If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'transaction_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_token_based_on_transaction" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `create_token_based_on_transaction`") # verify the required parameter 'transaction_id' is set if ('transaction_id' not in params or params['transaction_id'] is None): raise ValueError("Missing the required parameter `transaction_id` when calling `create_token_based_on_transaction`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'transaction_id' in params: query_params.append(('transactionId', params['transaction_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] return self.api_client.call_api( '/token/create-token-based-on-transaction', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TokenVersion', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def create_transaction_for_token_update(self, space_id, token_id, **kwargs): """Create Transaction for Token Update This operation creates a transaction which allows the updating of the provided token. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_transaction_for_token_update(space_id, token_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int token_id: The id of the token which should be updated. (required) :return: Transaction If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_transaction_for_token_update_with_http_info(space_id, token_id, **kwargs) else: (data) = self.create_transaction_for_token_update_with_http_info(space_id, token_id, **kwargs) return data def create_transaction_for_token_update_with_http_info(self, space_id, token_id, **kwargs): """Create Transaction for Token Update This operation creates a transaction which allows the updating of the provided token. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_transaction_for_token_update_with_http_info(space_id, token_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int token_id: The id of the token which should be updated. (required) :return: Transaction If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'token_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_transaction_for_token_update" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `create_transaction_for_token_update`") # verify the required parameter 'token_id' is set if ('token_id' not in params or params['token_id'] is None): raise ValueError("Missing the required parameter `token_id` when calling `create_transaction_for_token_update`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'token_id' in params: query_params.append(('tokenId', params['token_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] return self.api_client.call_api( '/token/createTransactionForTokenUpdate', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Transaction', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def delete(self, space_id, id, **kwargs): """Delete Deletes the entity with the given id. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_with_http_info(space_id, id, **kwargs) else: (data) = self.delete_with_http_info(space_id, id, **kwargs) return data def delete_with_http_info(self, space_id, id, **kwargs): """Delete Deletes the entity with the given id. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `delete`") # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `delete`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'id' in params: body_params = params['id'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/token/delete', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def read(self, space_id, id, **kwargs): """Read Reads the entity with the given 'id' and returns it. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the token which should be returned. (required) :return: Token If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.read_with_http_info(space_id, id, **kwargs) else: (data) = self.read_with_http_info(space_id, id, **kwargs) return data def read_with_http_info(self, space_id, id, **kwargs): """Read Reads the entity with the given 'id' and returns it. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the token which should be returned. (required) :return: Token If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method read" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `read`") # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `read`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['*/*']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/token/read', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Token', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def search(self, space_id, query, **kwargs): """Search Searches for the entities as specified by the given query. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search(space_id, query, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQuery query: The query restricts the tokens which are returned by the search. (required) :return: list[Token] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.search_with_http_info(space_id, query, **kwargs) else: (data) = self.search_with_http_info(space_id, query, **kwargs) return data def search_with_http_info(self, space_id, query, **kwargs): """Search Searches for the entities as specified by the given query. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_with_http_info(space_id, query, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQuery query: The query restricts the tokens which are returned by the search. (required) :return: list[Token] If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'query'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method search" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `search`") # verify the required parameter 'query' is set if ('query' not in params or params['query'] is None): raise ValueError("Missing the required parameter `query` when calling `search`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'query' in params: body_params = params['query'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/token/search', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Token]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def update(self, space_id, entity, **kwargs): """Update This updates the entity with the given properties. Only those properties which should be updated can be provided. The 'id' and 'version' are required to identify the entity. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update(space_id, entity, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param TokenUpdate entity: The object with all the properties which should be updated. The id and the version are required properties. (required) :return: Token If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_with_http_info(space_id, entity, **kwargs) else: (data) = self.update_with_http_info(space_id, entity, **kwargs) return data def update_with_http_info(self, space_id, entity, **kwargs): """Update This updates the entity with the given properties. Only those properties which should be updated can be provided. The 'id' and 'version' are required to identify the entity. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_with_http_info(space_id, entity, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param TokenUpdate entity: The object with all the properties which should be updated. The id and the version are required properties. (required) :return: Token If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'entity'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `update`") # verify the required parameter 'entity' is set if ('entity' not in params or params['entity'] is None): raise ValueError("Missing the required parameter `entity` when calling `update`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'entity' in params: body_params = params['entity'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/token/update', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Token', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
class ApplicationUserServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def count(self, **kwargs): """Count Counts the number of items in the database as restricted by the given filter. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.count(async_req=True) >>> result = thread.get() :param async_req bool :param EntityQueryFilter filter: The filter which restricts the entities which are used to calculate the count. :return: int If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.count_with_http_info(**kwargs) else: (data) = self.count_with_http_info(**kwargs) return data def count_with_http_info(self, **kwargs): """Count Counts the number of items in the database as restricted by the given filter. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.count_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param EntityQueryFilter filter: The filter which restricts the entities which are used to calculate the count. :return: int If the method is called asynchronously, returns the request thread. """ all_params = ['filter'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method count" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'filter' in params: body_params = params['filter'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/application-user/count', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='int', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def create(self, entity, **kwargs): """Create Creates the application user with the given properties. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create(entity, async_req=True) >>> result = thread.get() :param async_req bool :param ApplicationUserCreate entity: The user object with the properties which should be created. (required) :return: ApplicationUserCreateWithMacKey If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_with_http_info(entity, **kwargs) else: (data) = self.create_with_http_info(entity, **kwargs) return data def create_with_http_info(self, entity, **kwargs): """Create Creates the application user with the given properties. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_with_http_info(entity, async_req=True) >>> result = thread.get() :param async_req bool :param ApplicationUserCreate entity: The user object with the properties which should be created. (required) :return: ApplicationUserCreateWithMacKey If the method is called asynchronously, returns the request thread. """ all_params = ['entity'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'entity' is set if ('entity' not in params or params['entity'] is None): raise ValueError("Missing the required parameter `entity` when calling `create`") collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'entity' in params: body_params = params['entity'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/application-user/create', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ApplicationUserCreateWithMacKey', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def delete(self, id, **kwargs): """Delete Deletes the entity with the given id. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_with_http_info(id, **kwargs) else: (data) = self.delete_with_http_info(id, **kwargs) return data def delete_with_http_info(self, id, **kwargs): """Delete Deletes the entity with the given id. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `delete`") collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'id' in params: body_params = params['id'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/application-user/delete', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def read(self, id, **kwargs): """Read Reads the entity with the given 'id' and returns it. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: The id of the application user which should be returned. (required) :return: ApplicationUser If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.read_with_http_info(id, **kwargs) else: (data) = self.read_with_http_info(id, **kwargs) return data def read_with_http_info(self, id, **kwargs): """Read Reads the entity with the given 'id' and returns it. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: The id of the application user which should be returned. (required) :return: ApplicationUser If the method is called asynchronously, returns the request thread. """ all_params = ['id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method read" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `read`") collection_formats = {} path_params = {} query_params = [] if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['*/*']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/application-user/read', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ApplicationUser', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def search(self, query, **kwargs): """Search Searches for the entities as specified by the given query. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search(query, async_req=True) >>> result = thread.get() :param async_req bool :param EntityQuery query: The query restricts the application users which are returned by the search. (required) :return: list[ApplicationUser] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.search_with_http_info(query, **kwargs) else: (data) = self.search_with_http_info(query, **kwargs) return data def search_with_http_info(self, query, **kwargs): """Search Searches for the entities as specified by the given query. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_with_http_info(query, async_req=True) >>> result = thread.get() :param async_req bool :param EntityQuery query: The query restricts the application users which are returned by the search. (required) :return: list[ApplicationUser] If the method is called asynchronously, returns the request thread. """ all_params = ['query'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method search" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'query' is set if ('query' not in params or params['query'] is None): raise ValueError("Missing the required parameter `query` when calling `search`") collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'query' in params: body_params = params['query'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/application-user/search', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[ApplicationUser]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def update(self, entity, **kwargs): """Update This updates the entity with the given properties. Only those properties which should be updated can be provided. The 'id' and 'version' are required to identify the entity. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update(entity, async_req=True) >>> result = thread.get() :param async_req bool :param ApplicationUserUpdate entity: The application user entity with all the properties which should be updated. The id and the version are required properties. (required) :return: ApplicationUser If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_with_http_info(entity, **kwargs) else: (data) = self.update_with_http_info(entity, **kwargs) return data def update_with_http_info(self, entity, **kwargs): """Update This updates the entity with the given properties. Only those properties which should be updated can be provided. The 'id' and 'version' are required to identify the entity. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_with_http_info(entity, async_req=True) >>> result = thread.get() :param async_req bool :param ApplicationUserUpdate entity: The application user entity with all the properties which should be updated. The id and the version are required properties. (required) :return: ApplicationUser If the method is called asynchronously, returns the request thread. """ all_params = ['entity'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'entity' is set if ('entity' not in params or params['entity'] is None): raise ValueError("Missing the required parameter `entity` when calling `update`") collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'entity' in params: body_params = params['entity'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/application-user/update', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ApplicationUser', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
class TransactionInvoiceServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def count(self, space_id, **kwargs): """Count Counts the number of items in the database as restricted by the given filter. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.count(space_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQueryFilter filter: The filter which restricts the entities which are used to calculate the count. :return: int If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.count_with_http_info(space_id, **kwargs) else: (data) = self.count_with_http_info(space_id, **kwargs) return data def count_with_http_info(self, space_id, **kwargs): """Count Counts the number of items in the database as restricted by the given filter. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.count_with_http_info(space_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQueryFilter filter: The filter which restricts the entities which are used to calculate the count. :return: int If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'filter'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method count" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `count`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'filter' in params: body_params = params['filter'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/transaction-invoice/count', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='int', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_invoice_document(self, space_id, id, **kwargs): """getInvoiceDocument Returns the PDF document for the transaction invoice with given id. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_invoice_document(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the transaction invoice to get the document for. (required) :return: RenderedDocument If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_invoice_document_with_http_info( space_id, id, **kwargs) else: (data) = self.get_invoice_document_with_http_info( space_id, id, **kwargs) return data def get_invoice_document_with_http_info(self, space_id, id, **kwargs): """getInvoiceDocument Returns the PDF document for the transaction invoice with given id. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_invoice_document_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the transaction invoice to get the document for. (required) :return: RenderedDocument If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method get_invoice_document" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `get_invoice_document`" ) # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError( "Missing the required parameter `id` when calling `get_invoice_document`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['*/*']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/transaction-invoice/getInvoiceDocument', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='RenderedDocument', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_invoice_document_with_target_media_type(self, space_id, id, target_media_type_id, **kwargs): """getInvoiceDocumentWithTargetMediaType Returns the PDF document for the transaction invoice with given id and target media type id. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_invoice_document_with_target_media_type(space_id, id, target_media_type_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the transaction invoice to get the document for. (required) :param int target_media_type_id: The id of the target media type for which the invoice should be generated for. (required) :return: RenderedDocument If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_invoice_document_with_target_media_type_with_http_info( space_id, id, target_media_type_id, **kwargs) else: ( data ) = self.get_invoice_document_with_target_media_type_with_http_info( space_id, id, target_media_type_id, **kwargs) return data def get_invoice_document_with_target_media_type_with_http_info( self, space_id, id, target_media_type_id, **kwargs): """getInvoiceDocumentWithTargetMediaType Returns the PDF document for the transaction invoice with given id and target media type id. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_invoice_document_with_target_media_type_with_http_info(space_id, id, target_media_type_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the transaction invoice to get the document for. (required) :param int target_media_type_id: The id of the target media type for which the invoice should be generated for. (required) :return: RenderedDocument If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id', 'target_media_type_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_invoice_document_with_target_media_type" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `get_invoice_document_with_target_media_type`" ) # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError( "Missing the required parameter `id` when calling `get_invoice_document_with_target_media_type`" ) # verify the required parameter 'target_media_type_id' is set if ('target_media_type_id' not in params or params['target_media_type_id'] is None): raise ValueError( "Missing the required parameter `target_media_type_id` when calling `get_invoice_document_with_target_media_type`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) if 'target_media_type_id' in params: query_params.append( ('targetMediaTypeId', params['target_media_type_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['*/*']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/transaction-invoice/getInvoiceDocumentWithTargetMediaType', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='RenderedDocument', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def is_replacement_possible(self, space_id, id, **kwargs): """isReplacementPossible Returns whether the transaction invoice with the given id can be replaced. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.is_replacement_possible(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The invoice which should be checked if a replacement is possible. (required) :return: bool If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.is_replacement_possible_with_http_info( space_id, id, **kwargs) else: (data) = self.is_replacement_possible_with_http_info( space_id, id, **kwargs) return data def is_replacement_possible_with_http_info(self, space_id, id, **kwargs): """isReplacementPossible Returns whether the transaction invoice with the given id can be replaced. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.is_replacement_possible_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The invoice which should be checked if a replacement is possible. (required) :return: bool If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method is_replacement_possible" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `is_replacement_possible`" ) # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError( "Missing the required parameter `id` when calling `is_replacement_possible`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['*/*']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/transaction-invoice/isReplacementPossible', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='bool', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def mark_as_derecognized(self, space_id, id, **kwargs): """Mark as Derecognized Marks the transaction invoice with the given id as derecognized. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mark_as_derecognized(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the transaction invoice which should be marked as derecognized. (required) :return: TransactionInvoice If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.mark_as_derecognized_with_http_info( space_id, id, **kwargs) else: (data) = self.mark_as_derecognized_with_http_info( space_id, id, **kwargs) return data def mark_as_derecognized_with_http_info(self, space_id, id, **kwargs): """Mark as Derecognized Marks the transaction invoice with the given id as derecognized. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mark_as_derecognized_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the transaction invoice which should be marked as derecognized. (required) :return: TransactionInvoice If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method mark_as_derecognized" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `mark_as_derecognized`" ) # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError( "Missing the required parameter `id` when calling `mark_as_derecognized`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/transaction-invoice/markAsDerecognized', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TransactionInvoice', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def mark_as_paid(self, space_id, id, **kwargs): """Mark as Paid Marks the transaction invoice with the given id as paid. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mark_as_paid(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the transaction invoice which should be marked as paid. (required) :return: TransactionInvoice If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.mark_as_paid_with_http_info(space_id, id, **kwargs) else: (data) = self.mark_as_paid_with_http_info(space_id, id, **kwargs) return data def mark_as_paid_with_http_info(self, space_id, id, **kwargs): """Mark as Paid Marks the transaction invoice with the given id as paid. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mark_as_paid_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the transaction invoice which should be marked as paid. (required) :return: TransactionInvoice If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method mark_as_paid" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `mark_as_paid`" ) # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError( "Missing the required parameter `id` when calling `mark_as_paid`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/transaction-invoice/markAsPaid', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TransactionInvoice', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def read(self, space_id, id, **kwargs): """Read Reads the entity with the given 'id' and returns it. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the transaction invoices which should be returned. (required) :return: TransactionInvoice If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.read_with_http_info(space_id, id, **kwargs) else: (data) = self.read_with_http_info(space_id, id, **kwargs) return data def read_with_http_info(self, space_id, id, **kwargs): """Read Reads the entity with the given 'id' and returns it. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the transaction invoices which should be returned. (required) :return: TransactionInvoice If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method read" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `read`" ) # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError( "Missing the required parameter `id` when calling `read`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['*/*']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/transaction-invoice/read', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TransactionInvoice', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def replace(self, space_id, id, replacement, **kwargs): """replace Replaces the transaction invoice with given id with the replacement and returns the new transaction invoice. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace(space_id, id, replacement, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the transaction invoices which should be replaced. (required) :param TransactionInvoiceReplacement replacement: (required) :return: TransactionInvoice If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.replace_with_http_info(space_id, id, replacement, **kwargs) else: (data) = self.replace_with_http_info(space_id, id, replacement, **kwargs) return data def replace_with_http_info(self, space_id, id, replacement, **kwargs): """replace Replaces the transaction invoice with given id with the replacement and returns the new transaction invoice. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_with_http_info(space_id, id, replacement, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the transaction invoices which should be replaced. (required) :param TransactionInvoiceReplacement replacement: (required) :return: TransactionInvoice If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id', 'replacement'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method replace" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `replace`" ) # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError( "Missing the required parameter `id` when calling `replace`") # verify the required parameter 'replacement' is set if ('replacement' not in params or params['replacement'] is None): raise ValueError( "Missing the required parameter `replacement` when calling `replace`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'replacement' in params: body_params = params['replacement'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/transaction-invoice/replace', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TransactionInvoice', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def search(self, space_id, query, **kwargs): """Search Searches for the entities as specified by the given query. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search(space_id, query, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQuery query: The query restricts the transaction invoices which are returned by the search. (required) :return: list[TransactionInvoice] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.search_with_http_info(space_id, query, **kwargs) else: (data) = self.search_with_http_info(space_id, query, **kwargs) return data def search_with_http_info(self, space_id, query, **kwargs): """Search Searches for the entities as specified by the given query. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_with_http_info(space_id, query, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQuery query: The query restricts the transaction invoices which are returned by the search. (required) :return: list[TransactionInvoice] If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'query'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method search" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `search`" ) # verify the required parameter 'query' is set if ('query' not in params or params['query'] is None): raise ValueError( "Missing the required parameter `query` when calling `search`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'query' in params: body_params = params['query'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/transaction-invoice/search', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[TransactionInvoice]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
class WebAppServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def check_installation(self, space_id, **kwargs): """Check Installation This operation returns true when the app is installed in given space. The web app is implied by the client ID resp. user ID that is been used to invoke this operation. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.check_installation(space_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: This parameter identifies the space which should be checked if the web app is installed. (required) :return: bool If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.check_installation_with_http_info(space_id, **kwargs) else: (data) = self.check_installation_with_http_info(space_id, **kwargs) return data def check_installation_with_http_info(self, space_id, **kwargs): """Check Installation This operation returns true when the app is installed in given space. The web app is implied by the client ID resp. user ID that is been used to invoke this operation. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.check_installation_with_http_info(space_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: This parameter identifies the space which should be checked if the web app is installed. (required) :return: bool If the method is called asynchronously, returns the request thread. """ all_params = ['space_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method check_installation" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `check_installation`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/web-app/check-installation', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='bool', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def confirm(self, request, **kwargs): """Confirm This operation confirms the app installation. This method has to be invoked after the user returns to the web app. The request of the user will contain the code as a request parameter. The web app is implied by the client ID resp. user ID that is been used to invoke this operation. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.confirm(request, async_req=True) >>> result = thread.get() :param async_req bool :param WebAppConfirmationRequest request: (required) :return: WebAppConfirmationResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.confirm_with_http_info(request, **kwargs) else: (data) = self.confirm_with_http_info(request, **kwargs) return data def confirm_with_http_info(self, request, **kwargs): """Confirm This operation confirms the app installation. This method has to be invoked after the user returns to the web app. The request of the user will contain the code as a request parameter. The web app is implied by the client ID resp. user ID that is been used to invoke this operation. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.confirm_with_http_info(request, async_req=True) >>> result = thread.get() :param async_req bool :param WebAppConfirmationRequest request: (required) :return: WebAppConfirmationResponse If the method is called asynchronously, returns the request thread. """ all_params = ['request'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method confirm" % key) params[key] = val del params['kwargs'] # verify the required parameter 'request' is set if ('request' not in params or params['request'] is None): raise ValueError( "Missing the required parameter `request` when calling `confirm`" ) collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'request' in params: body_params = params['request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/web-app/confirm', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='WebAppConfirmationResponse', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def uninstall(self, space_id, **kwargs): """Uninstall This operation uninstalls the web app from the provided space. The web app is implied by the client ID resp. user ID that is been used to invoke this operation. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.uninstall(space_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: This parameter identifies the space within which the web app should be uninstalled. (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.uninstall_with_http_info(space_id, **kwargs) else: (data) = self.uninstall_with_http_info(space_id, **kwargs) return data def uninstall_with_http_info(self, space_id, **kwargs): """Uninstall This operation uninstalls the web app from the provided space. The web app is implied by the client ID resp. user ID that is been used to invoke this operation. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.uninstall_with_http_info(space_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: This parameter identifies the space within which the web app should be uninstalled. (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['space_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method uninstall" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `uninstall`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] return self.api_client.call_api( '/web-app/uninstall', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
class InstallmentPlanCalculationServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def calculate_plans(self, space_id, transaction_id, **kwargs): """Calculate Plans This operation allows to calculate all plans for the given transaction. The transaction will not be changed in any way. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.calculate_plans(space_id, transaction_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int transaction_id: The transaction for which the plans should be calculated for. (required) :return: list[InstallmentCalculatedPlan] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.calculate_plans_with_http_info(space_id, transaction_id, **kwargs) else: (data) = self.calculate_plans_with_http_info( space_id, transaction_id, **kwargs) return data def calculate_plans_with_http_info(self, space_id, transaction_id, **kwargs): """Calculate Plans This operation allows to calculate all plans for the given transaction. The transaction will not be changed in any way. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.calculate_plans_with_http_info(space_id, transaction_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int transaction_id: The transaction for which the plans should be calculated for. (required) :return: list[InstallmentCalculatedPlan] If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'transaction_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method calculate_plans" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `calculate_plans`" ) # verify the required parameter 'transaction_id' is set if ('transaction_id' not in params or params['transaction_id'] is None): raise ValueError( "Missing the required parameter `transaction_id` when calling `calculate_plans`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'transaction_id' in params: query_params.append(('transactionId', params['transaction_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/installment-plan-calculation/calculatePlans', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[InstallmentCalculatedPlan]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
class MerticUsageServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def calculate(self, space_id, start, end, **kwargs): """Calculate Calculates the consumed resources for the given space and time range. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.calculate(space_id, start, end, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param datetime start: The start date from which on the consumed units should be returned from. (required) :param datetime end: The end date to which the consumed units should be returned to. The end date is not included in the result. (required) :return: list[MetricUsage] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.calculate_with_http_info(space_id, start, end, **kwargs) else: (data) = self.calculate_with_http_info(space_id, start, end, **kwargs) return data def calculate_with_http_info(self, space_id, start, end, **kwargs): """Calculate Calculates the consumed resources for the given space and time range. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.calculate_with_http_info(space_id, start, end, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param datetime start: The start date from which on the consumed units should be returned from. (required) :param datetime end: The end date to which the consumed units should be returned to. The end date is not included in the result. (required) :return: list[MetricUsage] If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'start', 'end'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method calculate" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `calculate`" ) # verify the required parameter 'start' is set if ('start' not in params or params['start'] is None): raise ValueError( "Missing the required parameter `start` when calling `calculate`" ) # verify the required parameter 'end' is set if ('end' not in params or params['end'] is None): raise ValueError( "Missing the required parameter `end` when calling `calculate`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'start' in params: query_params.append(('start', params['start'])) if 'end' in params: query_params.append(('end', params['end'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['*/*']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/mertic-usage/calculate', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[MetricUsage]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
class SubscriptionServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def apply_changes(self, space_id, request, **kwargs): """apply changes This operation allows to apply changes on a subscription. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.apply_changes(space_id, request, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param SubscriptionChangeRequest request: (required) :return: SubscriptionVersion If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.apply_changes_with_http_info(space_id, request, **kwargs) else: (data) = self.apply_changes_with_http_info(space_id, request, **kwargs) return data def apply_changes_with_http_info(self, space_id, request, **kwargs): """apply changes This operation allows to apply changes on a subscription. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.apply_changes_with_http_info(space_id, request, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param SubscriptionChangeRequest request: (required) :return: SubscriptionVersion If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'request'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method apply_changes" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `apply_changes`" ) # verify the required parameter 'request' is set if ('request' not in params or params['request'] is None): raise ValueError( "Missing the required parameter `request` when calling `apply_changes`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'request' in params: body_params = params['request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/subscription/applyChanges', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SubscriptionVersion', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def count(self, space_id, **kwargs): """Count Counts the number of items in the database as restricted by the given filter. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.count(space_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQueryFilter filter: The filter which restricts the entities which are used to calculate the count. :return: int If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.count_with_http_info(space_id, **kwargs) else: (data) = self.count_with_http_info(space_id, **kwargs) return data def count_with_http_info(self, space_id, **kwargs): """Count Counts the number of items in the database as restricted by the given filter. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.count_with_http_info(space_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQueryFilter filter: The filter which restricts the entities which are used to calculate the count. :return: int If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'filter'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method count" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `count`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'filter' in params: body_params = params['filter'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/subscription/count', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='int', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def create(self, space_id, create_request, **kwargs): """Create The create operation creates a new subscription and a corresponding subscription version. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create(space_id, create_request, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param SubscriptionCreateRequest create_request: (required) :return: SubscriptionVersion If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_with_http_info(space_id, create_request, **kwargs) else: (data) = self.create_with_http_info(space_id, create_request, **kwargs) return data def create_with_http_info(self, space_id, create_request, **kwargs): """Create The create operation creates a new subscription and a corresponding subscription version. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_with_http_info(space_id, create_request, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param SubscriptionCreateRequest create_request: (required) :return: SubscriptionVersion If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'create_request'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method create" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `create`" ) # verify the required parameter 'create_request' is set if ('create_request' not in params or params['create_request'] is None): raise ValueError( "Missing the required parameter `create_request` when calling `create`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'create_request' in params: body_params = params['create_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/subscription/create', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SubscriptionVersion', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def initialize(self, space_id, subscription_id, **kwargs): """initialize The initialize operation initializes a subscription. This method uses charge flows to carry out the transaction. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.initialize(space_id, subscription_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int subscription_id: The provided subscription id will be used to lookup the subscription which should be initialized. (required) :return: SubscriptionCharge If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.initialize_with_http_info(space_id, subscription_id, **kwargs) else: (data) = self.initialize_with_http_info(space_id, subscription_id, **kwargs) return data def initialize_with_http_info(self, space_id, subscription_id, **kwargs): """initialize The initialize operation initializes a subscription. This method uses charge flows to carry out the transaction. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.initialize_with_http_info(space_id, subscription_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int subscription_id: The provided subscription id will be used to lookup the subscription which should be initialized. (required) :return: SubscriptionCharge If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'subscription_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method initialize" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `initialize`" ) # verify the required parameter 'subscription_id' is set if ('subscription_id' not in params or params['subscription_id'] is None): raise ValueError( "Missing the required parameter `subscription_id` when calling `initialize`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'subscription_id' in params: query_params.append(('subscriptionId', params['subscription_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/subscription/initialize', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SubscriptionCharge', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def initialize_subscriber_present(self, space_id, subscription_id, **kwargs): """initializeSubscriberPresent The initialize operation initializes a subscription when the subscriber is present. The method will initialize a transaction which has to be completed by using the transaction service. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.initialize_subscriber_present(space_id, subscription_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int subscription_id: (required) :param str success_url: The subscriber will be redirected to the success URL when the transaction is successful. :param str failed_url: The subscriber will be redirected to the fail URL when the transaction fails. :return: SubscriptionCharge If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.initialize_subscriber_present_with_http_info( space_id, subscription_id, **kwargs) else: (data) = self.initialize_subscriber_present_with_http_info( space_id, subscription_id, **kwargs) return data def initialize_subscriber_present_with_http_info(self, space_id, subscription_id, **kwargs): """initializeSubscriberPresent The initialize operation initializes a subscription when the subscriber is present. The method will initialize a transaction which has to be completed by using the transaction service. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.initialize_subscriber_present_with_http_info(space_id, subscription_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int subscription_id: (required) :param str success_url: The subscriber will be redirected to the success URL when the transaction is successful. :param str failed_url: The subscriber will be redirected to the fail URL when the transaction fails. :return: SubscriptionCharge If the method is called asynchronously, returns the request thread. """ all_params = [ 'space_id', 'subscription_id', 'success_url', 'failed_url' ] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method initialize_subscriber_present" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `initialize_subscriber_present`" ) # verify the required parameter 'subscription_id' is set if ('subscription_id' not in params or params['subscription_id'] is None): raise ValueError( "Missing the required parameter `subscription_id` when calling `initialize_subscriber_present`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'subscription_id' in params: query_params.append(('subscriptionId', params['subscription_id'])) if 'success_url' in params: query_params.append(('successUrl', params['success_url'])) if 'failed_url' in params: query_params.append(('failedUrl', params['failed_url'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/subscription/initializeSubscriberPresent', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SubscriptionCharge', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def read(self, space_id, id, **kwargs): """Read Reads the entity with the given 'id' and returns it. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the subscription which should be returned. (required) :return: Subscription If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.read_with_http_info(space_id, id, **kwargs) else: (data) = self.read_with_http_info(space_id, id, **kwargs) return data def read_with_http_info(self, space_id, id, **kwargs): """Read Reads the entity with the given 'id' and returns it. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the subscription which should be returned. (required) :return: Subscription If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method read" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `read`" ) # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError( "Missing the required parameter `id` when calling `read`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['*/*']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/subscription/read', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Subscription', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def search(self, space_id, query, **kwargs): """Search Searches for the entities as specified by the given query. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search(space_id, query, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQuery query: The query restricts the subscriptions which are returned by the search. (required) :return: list[Subscription] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.search_with_http_info(space_id, query, **kwargs) else: (data) = self.search_with_http_info(space_id, query, **kwargs) return data def search_with_http_info(self, space_id, query, **kwargs): """Search Searches for the entities as specified by the given query. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_with_http_info(space_id, query, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQuery query: The query restricts the subscriptions which are returned by the search. (required) :return: list[Subscription] If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'query'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method search" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `search`" ) # verify the required parameter 'query' is set if ('query' not in params or params['query'] is None): raise ValueError( "Missing the required parameter `query` when calling `search`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'query' in params: body_params = params['query'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/subscription/search', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Subscription]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def search_subscription_invoices(self, space_id, subscription_id, query, **kwargs): """Search Subscription Invoices This operation allows to search for subscription invoices. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_subscription_invoices(space_id, subscription_id, query, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int subscription_id: The id of the subscription for which the invoices should be searched for. (required) :param EntityQuery query: The query restricts the invoices which are returned by the search. (required) :return: list[TransactionInvoice] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.search_subscription_invoices_with_http_info( space_id, subscription_id, query, **kwargs) else: (data) = self.search_subscription_invoices_with_http_info( space_id, subscription_id, query, **kwargs) return data def search_subscription_invoices_with_http_info(self, space_id, subscription_id, query, **kwargs): """Search Subscription Invoices This operation allows to search for subscription invoices. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_subscription_invoices_with_http_info(space_id, subscription_id, query, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int subscription_id: The id of the subscription for which the invoices should be searched for. (required) :param EntityQuery query: The query restricts the invoices which are returned by the search. (required) :return: list[TransactionInvoice] If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'subscription_id', 'query'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method search_subscription_invoices" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `search_subscription_invoices`" ) # verify the required parameter 'subscription_id' is set if ('subscription_id' not in params or params['subscription_id'] is None): raise ValueError( "Missing the required parameter `subscription_id` when calling `search_subscription_invoices`" ) # verify the required parameter 'query' is set if ('query' not in params or params['query'] is None): raise ValueError( "Missing the required parameter `query` when calling `search_subscription_invoices`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'subscription_id' in params: query_params.append(('subscriptionId', params['subscription_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'query' in params: body_params = params['query'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/subscription/searchSubscriptionInvoices', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[TransactionInvoice]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def terminate(self, space_id, subscription_id, respect_termination_period, **kwargs): """terminate This operation allows to terminate a subscription. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.terminate(space_id, subscription_id, respect_termination_period, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int subscription_id: The subscription id identifies the subscription which should be terminated. (required) :param bool respect_termination_period: The respect termination period controls whether the termination period configured on the product version should be respected or if the operation should take effect immediately. (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.terminate_with_http_info(space_id, subscription_id, respect_termination_period, **kwargs) else: (data) = self.terminate_with_http_info(space_id, subscription_id, respect_termination_period, **kwargs) return data def terminate_with_http_info(self, space_id, subscription_id, respect_termination_period, **kwargs): """terminate This operation allows to terminate a subscription. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.terminate_with_http_info(space_id, subscription_id, respect_termination_period, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int subscription_id: The subscription id identifies the subscription which should be terminated. (required) :param bool respect_termination_period: The respect termination period controls whether the termination period configured on the product version should be respected or if the operation should take effect immediately. (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = [ 'space_id', 'subscription_id', 'respect_termination_period' ] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method terminate" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `terminate`" ) # verify the required parameter 'subscription_id' is set if ('subscription_id' not in params or params['subscription_id'] is None): raise ValueError( "Missing the required parameter `subscription_id` when calling `terminate`" ) # verify the required parameter 'respect_termination_period' is set if ('respect_termination_period' not in params or params['respect_termination_period'] is None): raise ValueError( "Missing the required parameter `respect_termination_period` when calling `terminate`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'subscription_id' in params: query_params.append(('subscriptionId', params['subscription_id'])) if 'respect_termination_period' in params: query_params.append(('respectTerminationPeriod', params['respect_termination_period'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/subscription/terminate', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def update_product_version(self, space_id, subscription_id, respect_termination_period, **kwargs): """update product version The update product version operation updates the product version of the subscription to the latest active product version. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_product_version(space_id, subscription_id, respect_termination_period, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int subscription_id: The subscription id identifies the subscription which should be updated to the latest version. (required) :param bool respect_termination_period: The subscription version may be retired. The respect termination period controls whether the termination period configured on the product version should be respected or if the operation should take effect immediately. (required) :return: SubscriptionVersion If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_product_version_with_http_info( space_id, subscription_id, respect_termination_period, **kwargs) else: (data) = self.update_product_version_with_http_info( space_id, subscription_id, respect_termination_period, **kwargs) return data def update_product_version_with_http_info(self, space_id, subscription_id, respect_termination_period, **kwargs): """update product version The update product version operation updates the product version of the subscription to the latest active product version. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_product_version_with_http_info(space_id, subscription_id, respect_termination_period, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int subscription_id: The subscription id identifies the subscription which should be updated to the latest version. (required) :param bool respect_termination_period: The subscription version may be retired. The respect termination period controls whether the termination period configured on the product version should be respected or if the operation should take effect immediately. (required) :return: SubscriptionVersion If the method is called asynchronously, returns the request thread. """ all_params = [ 'space_id', 'subscription_id', 'respect_termination_period' ] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method update_product_version" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `update_product_version`" ) # verify the required parameter 'subscription_id' is set if ('subscription_id' not in params or params['subscription_id'] is None): raise ValueError( "Missing the required parameter `subscription_id` when calling `update_product_version`" ) # verify the required parameter 'respect_termination_period' is set if ('respect_termination_period' not in params or params['respect_termination_period'] is None): raise ValueError( "Missing the required parameter `respect_termination_period` when calling `update_product_version`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'subscription_id' in params: query_params.append(('subscriptionId', params['subscription_id'])) if 'respect_termination_period' in params: query_params.append(('respectTerminationPeriod', params['respect_termination_period'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/subscription/updateProductVersion', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SubscriptionVersion', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
class UserAccountRoleServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def add_role(self, user_id, account_id, role_id, **kwargs): """Add Role This operation grants the role to the given user with in the given account. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_role(user_id, account_id, role_id, async_req=True) >>> result = thread.get() :param async_req bool :param int user_id: The id of the user to whom the role is assigned. (required) :param int account_id: The account to which the role is mapped. (required) :param int role_id: The role which is mapped to the user and account. (required) :param bool applies_on_subaccount: Whether the role applies only on subaccount. :return: UserAccountRole If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.add_role_with_http_info(user_id, account_id, role_id, **kwargs) else: (data) = self.add_role_with_http_info(user_id, account_id, role_id, **kwargs) return data def add_role_with_http_info(self, user_id, account_id, role_id, **kwargs): """Add Role This operation grants the role to the given user with in the given account. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_role_with_http_info(user_id, account_id, role_id, async_req=True) >>> result = thread.get() :param async_req bool :param int user_id: The id of the user to whom the role is assigned. (required) :param int account_id: The account to which the role is mapped. (required) :param int role_id: The role which is mapped to the user and account. (required) :param bool applies_on_subaccount: Whether the role applies only on subaccount. :return: UserAccountRole If the method is called asynchronously, returns the request thread. """ all_params = [ 'user_id', 'account_id', 'role_id', 'applies_on_subaccount' ] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method add_role" % key) params[key] = val del params['kwargs'] # verify the required parameter 'user_id' is set if ('user_id' not in params or params['user_id'] is None): raise ValueError( "Missing the required parameter `user_id` when calling `add_role`" ) # verify the required parameter 'account_id' is set if ('account_id' not in params or params['account_id'] is None): raise ValueError( "Missing the required parameter `account_id` when calling `add_role`" ) # verify the required parameter 'role_id' is set if ('role_id' not in params or params['role_id'] is None): raise ValueError( "Missing the required parameter `role_id` when calling `add_role`" ) collection_formats = {} path_params = {} query_params = [] if 'user_id' in params: query_params.append(('userId', params['user_id'])) if 'account_id' in params: query_params.append(('accountId', params['account_id'])) if 'role_id' in params: query_params.append(('roleId', params['role_id'])) if 'applies_on_subaccount' in params: query_params.append( ('appliesOnSubaccount', params['applies_on_subaccount'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/user-account-role/addRole', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='UserAccountRole', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def list(self, user_id, account_id, **kwargs): """List Roles List all the roles that are assigned to the given user in the given account. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list(user_id, account_id, async_req=True) >>> result = thread.get() :param async_req bool :param int user_id: The id of the user to whom the role is assigned. (required) :param int account_id: The account to which the role is mapped. (required) :return: list[UserAccountRole] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.list_with_http_info(user_id, account_id, **kwargs) else: (data) = self.list_with_http_info(user_id, account_id, **kwargs) return data def list_with_http_info(self, user_id, account_id, **kwargs): """List Roles List all the roles that are assigned to the given user in the given account. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_with_http_info(user_id, account_id, async_req=True) >>> result = thread.get() :param async_req bool :param int user_id: The id of the user to whom the role is assigned. (required) :param int account_id: The account to which the role is mapped. (required) :return: list[UserAccountRole] If the method is called asynchronously, returns the request thread. """ all_params = ['user_id', 'account_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method list" % key) params[key] = val del params['kwargs'] # verify the required parameter 'user_id' is set if ('user_id' not in params or params['user_id'] is None): raise ValueError( "Missing the required parameter `user_id` when calling `list`") # verify the required parameter 'account_id' is set if ('account_id' not in params or params['account_id'] is None): raise ValueError( "Missing the required parameter `account_id` when calling `list`" ) collection_formats = {} path_params = {} query_params = [] if 'user_id' in params: query_params.append(('userId', params['user_id'])) if 'account_id' in params: query_params.append(('accountId', params['account_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/user-account-role/list', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[UserAccountRole]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def remove_role(self, id, **kwargs): """Remove Role This operation removes the specified user account role. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.remove_role(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: The id of user account role which should be removed (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.remove_role_with_http_info(id, **kwargs) else: (data) = self.remove_role_with_http_info(id, **kwargs) return data def remove_role_with_http_info(self, id, **kwargs): """Remove Role This operation removes the specified user account role. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.remove_role_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: The id of user account role which should be removed (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method remove_role" % key) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError( "Missing the required parameter `id` when calling `remove_role`" ) collection_formats = {} path_params = {} query_params = [] if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/user-account-role/removeRole', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
class RefundServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def count(self, space_id, **kwargs): """Count Counts the number of items in the database as restricted by the given filter. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.count(space_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQueryFilter filter: The filter which restricts the entities which are used to calculate the count. :return: int If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.count_with_http_info(space_id, **kwargs) else: (data) = self.count_with_http_info(space_id, **kwargs) return data def count_with_http_info(self, space_id, **kwargs): """Count Counts the number of items in the database as restricted by the given filter. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.count_with_http_info(space_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQueryFilter filter: The filter which restricts the entities which are used to calculate the count. :return: int If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'filter'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method count" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `count`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'filter' in params: body_params = params['filter'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/refund/count', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='int', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def fail(self, space_id, refund_id, **kwargs): """fail This operation allows to mark a refund as failed which is in state MANUAL_CHECK. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.fail(space_id, refund_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int refund_id: The id of the refund which should be marked as failed. (required) :return: Refund If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.fail_with_http_info(space_id, refund_id, **kwargs) else: (data) = self.fail_with_http_info(space_id, refund_id, **kwargs) return data def fail_with_http_info(self, space_id, refund_id, **kwargs): """fail This operation allows to mark a refund as failed which is in state MANUAL_CHECK. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.fail_with_http_info(space_id, refund_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int refund_id: The id of the refund which should be marked as failed. (required) :return: Refund If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'refund_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method fail" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `fail`" ) # verify the required parameter 'refund_id' is set if ('refund_id' not in params or params['refund_id'] is None): raise ValueError( "Missing the required parameter `refund_id` when calling `fail`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'refund_id' in params: query_params.append(('refundId', params['refund_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/refund/fail', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Refund', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_refund_document(self, space_id, id, **kwargs): """getRefundDocument Returns the PDF document for the refund with given id. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_refund_document(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the refund to get the document for. (required) :return: RenderedDocument If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_refund_document_with_http_info( space_id, id, **kwargs) else: (data) = self.get_refund_document_with_http_info( space_id, id, **kwargs) return data def get_refund_document_with_http_info(self, space_id, id, **kwargs): """getRefundDocument Returns the PDF document for the refund with given id. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_refund_document_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the refund to get the document for. (required) :return: RenderedDocument If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method get_refund_document" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `get_refund_document`" ) # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError( "Missing the required parameter `id` when calling `get_refund_document`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['*/*']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/refund/getRefundDocument', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='RenderedDocument', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_refund_document_with_target_media_type(self, space_id, id, target_media_type_id, **kwargs): """getRefundDocumentWithTargetMediaType Returns the PDF document for the refund with given id and the given target media type. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_refund_document_with_target_media_type(space_id, id, target_media_type_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the refund to get the document for. (required) :param int target_media_type_id: The id of the target media type for which the refund should be generated for. (required) :return: RenderedDocument If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_refund_document_with_target_media_type_with_http_info( space_id, id, target_media_type_id, **kwargs) else: ( data ) = self.get_refund_document_with_target_media_type_with_http_info( space_id, id, target_media_type_id, **kwargs) return data def get_refund_document_with_target_media_type_with_http_info( self, space_id, id, target_media_type_id, **kwargs): """getRefundDocumentWithTargetMediaType Returns the PDF document for the refund with given id and the given target media type. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_refund_document_with_target_media_type_with_http_info(space_id, id, target_media_type_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the refund to get the document for. (required) :param int target_media_type_id: The id of the target media type for which the refund should be generated for. (required) :return: RenderedDocument If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id', 'target_media_type_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_refund_document_with_target_media_type" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `get_refund_document_with_target_media_type`" ) # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError( "Missing the required parameter `id` when calling `get_refund_document_with_target_media_type`" ) # verify the required parameter 'target_media_type_id' is set if ('target_media_type_id' not in params or params['target_media_type_id'] is None): raise ValueError( "Missing the required parameter `target_media_type_id` when calling `get_refund_document_with_target_media_type`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) if 'target_media_type_id' in params: query_params.append( ('targetMediaTypeId', params['target_media_type_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['*/*']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/refund/getRefundDocumentWithTargetMediaType', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='RenderedDocument', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def read(self, space_id, id, **kwargs): """Read Reads the entity with the given 'id' and returns it. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the refund which should be returned. (required) :return: Refund If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.read_with_http_info(space_id, id, **kwargs) else: (data) = self.read_with_http_info(space_id, id, **kwargs) return data def read_with_http_info(self, space_id, id, **kwargs): """Read Reads the entity with the given 'id' and returns it. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the refund which should be returned. (required) :return: Refund If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method read" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `read`" ) # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError( "Missing the required parameter `id` when calling `read`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['*/*']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/refund/read', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Refund', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def refund(self, space_id, refund, **kwargs): """create This operation creates and executes a refund of a particular transaction. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.refund(space_id, refund, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param RefundCreate refund: The refund object which should be created. (required) :return: Refund If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.refund_with_http_info(space_id, refund, **kwargs) else: (data) = self.refund_with_http_info(space_id, refund, **kwargs) return data def refund_with_http_info(self, space_id, refund, **kwargs): """create This operation creates and executes a refund of a particular transaction. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.refund_with_http_info(space_id, refund, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param RefundCreate refund: The refund object which should be created. (required) :return: Refund If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'refund'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method refund" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `refund`" ) # verify the required parameter 'refund' is set if ('refund' not in params or params['refund'] is None): raise ValueError( "Missing the required parameter `refund` when calling `refund`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'refund' in params: body_params = params['refund'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/refund/refund', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Refund', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def search(self, space_id, query, **kwargs): """Search Searches for the entities as specified by the given query. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search(space_id, query, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQuery query: The query restricts the refunds which are returned by the search. (required) :return: list[Refund] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.search_with_http_info(space_id, query, **kwargs) else: (data) = self.search_with_http_info(space_id, query, **kwargs) return data def search_with_http_info(self, space_id, query, **kwargs): """Search Searches for the entities as specified by the given query. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_with_http_info(space_id, query, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQuery query: The query restricts the refunds which are returned by the search. (required) :return: list[Refund] If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'query'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method search" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `search`" ) # verify the required parameter 'query' is set if ('query' not in params or params['query'] is None): raise ValueError( "Missing the required parameter `query` when calling `search`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'query' in params: body_params = params['query'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/refund/search', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Refund]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def succeed(self, space_id, refund_id, **kwargs): """succeed This operation allows to mark a refund as successful which is in state MANUAL_CHECK. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.succeed(space_id, refund_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int refund_id: The id of the refund which should be marked as successful. (required) :return: Refund If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.succeed_with_http_info(space_id, refund_id, **kwargs) else: (data) = self.succeed_with_http_info(space_id, refund_id, **kwargs) return data def succeed_with_http_info(self, space_id, refund_id, **kwargs): """succeed This operation allows to mark a refund as successful which is in state MANUAL_CHECK. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.succeed_with_http_info(space_id, refund_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int refund_id: The id of the refund which should be marked as successful. (required) :return: Refund If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'refund_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method succeed" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `succeed`" ) # verify the required parameter 'refund_id' is set if ('refund_id' not in params or params['refund_id'] is None): raise ValueError( "Missing the required parameter `refund_id` when calling `succeed`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'refund_id' in params: query_params.append(('refundId', params['refund_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/refund/succeed', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Refund', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
class TransactionLightboxServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def javascript_url(self, space_id, id, **kwargs): """Build JavaScript URL This operation creates the URL which can be used to embed the JavaScript for handling the Lightbox checkout flow. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.javascript_url(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the transaction which should be returned. (required) :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.javascript_url_with_http_info(space_id, id, **kwargs) else: (data) = self.javascript_url_with_http_info(space_id, id, **kwargs) return data def javascript_url_with_http_info(self, space_id, id, **kwargs): """Build JavaScript URL This operation creates the URL which can be used to embed the JavaScript for handling the Lightbox checkout flow. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.javascript_url_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the transaction which should be returned. (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method javascript_url" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `javascript_url`" ) # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError( "Missing the required parameter `id` when calling `javascript_url`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'text/plain;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/transaction-lightbox/javascript-url', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
class TransactionMobileSdkServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def payment_form_url(self, credentials, **kwargs): """Build Mobile SDK URL This operation builds the URL which is used to load the payment form within a WebView on a mobile device. This operation is typically called through the mobile SDK. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.payment_form_url(credentials, async_req=True) >>> result = thread.get() :param async_req bool :param str credentials: The credentials identifies the transaction and contains the security details which grants the access this operation. (required) :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.payment_form_url_with_http_info(credentials, **kwargs) else: (data) = self.payment_form_url_with_http_info( credentials, **kwargs) return data def payment_form_url_with_http_info(self, credentials, **kwargs): """Build Mobile SDK URL This operation builds the URL which is used to load the payment form within a WebView on a mobile device. This operation is typically called through the mobile SDK. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.payment_form_url_with_http_info(credentials, async_req=True) >>> result = thread.get() :param async_req bool :param str credentials: The credentials identifies the transaction and contains the security details which grants the access this operation. (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['credentials'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method payment_form_url" % key) params[key] = val del params['kwargs'] # verify the required parameter 'credentials' is set if ('credentials' not in params or params['credentials'] is None): raise ValueError( "Missing the required parameter `credentials` when calling `payment_form_url`" ) collection_formats = {} path_params = {} query_params = [] if 'credentials' in params: query_params.append(('credentials', params['credentials'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'text/plain;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/transaction-mobile-sdk/payment-form-url', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
class RefundBankTransactionServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def count(self, space_id, **kwargs): """Count Counts the number of items in the database as restricted by the given filter. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.count(space_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQueryFilter filter: The filter which restricts the entities which are used to calculate the count. :return: int If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.count_with_http_info(space_id, **kwargs) else: (data) = self.count_with_http_info(space_id, **kwargs) return data def count_with_http_info(self, space_id, **kwargs): """Count Counts the number of items in the database as restricted by the given filter. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.count_with_http_info(space_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQueryFilter filter: The filter which restricts the entities which are used to calculate the count. :return: int If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'filter'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method count" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `count`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'filter' in params: body_params = params['filter'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/refund-bank-transaction/count', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='int', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def read(self, space_id, id, **kwargs): """Read Reads the entity with the given 'id' and returns it. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The ID of the refund bank transaction which should be returned. (required) :return: RefundBankTransaction If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.read_with_http_info(space_id, id, **kwargs) else: (data) = self.read_with_http_info(space_id, id, **kwargs) return data def read_with_http_info(self, space_id, id, **kwargs): """Read Reads the entity with the given 'id' and returns it. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The ID of the refund bank transaction which should be returned. (required) :return: RefundBankTransaction If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method read" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `read`" ) # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError( "Missing the required parameter `id` when calling `read`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['*/*']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/refund-bank-transaction/read', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='RefundBankTransaction', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def search(self, space_id, query, **kwargs): """Search Searches for the entities as specified by the given query. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search(space_id, query, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQuery query: The query restricts the refund bank transactions which are returned by the search. (required) :return: list[RefundBankTransaction] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.search_with_http_info(space_id, query, **kwargs) else: (data) = self.search_with_http_info(space_id, query, **kwargs) return data def search_with_http_info(self, space_id, query, **kwargs): """Search Searches for the entities as specified by the given query. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_with_http_info(space_id, query, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQuery query: The query restricts the refund bank transactions which are returned by the search. (required) :return: list[RefundBankTransaction] If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'query'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method search" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `search`" ) # verify the required parameter 'query' is set if ('query' not in params or params['query'] is None): raise ValueError( "Missing the required parameter `query` when calling `search`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'query' in params: body_params = params['query'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/refund-bank-transaction/search', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[RefundBankTransaction]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
class DebtCollectionCaseServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def add_collected_amount(self, space_id, id, collected_amount, external_id, **kwargs): """Add Collected Amount Adds a new collected amount to the case, creating a new payment receipt. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_collected_amount(space_id, id, collected_amount, external_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the debt collection case for which the amount should be added. (required) :param float collected_amount: The amount that has been collected. (required) :param str external_id: The unique external id of this payment receipt. (required) :return: DebtCollectionReceipt If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.add_collected_amount_with_http_info(space_id, id, collected_amount, external_id, **kwargs) else: (data) = self.add_collected_amount_with_http_info(space_id, id, collected_amount, external_id, **kwargs) return data def add_collected_amount_with_http_info(self, space_id, id, collected_amount, external_id, **kwargs): """Add Collected Amount Adds a new collected amount to the case, creating a new payment receipt. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_collected_amount_with_http_info(space_id, id, collected_amount, external_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the debt collection case for which the amount should be added. (required) :param float collected_amount: The amount that has been collected. (required) :param str external_id: The unique external id of this payment receipt. (required) :return: DebtCollectionReceipt If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id', 'collected_amount', 'external_id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method add_collected_amount" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `add_collected_amount`") # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `add_collected_amount`") # verify the required parameter 'collected_amount' is set if ('collected_amount' not in params or params['collected_amount'] is None): raise ValueError("Missing the required parameter `collected_amount` when calling `add_collected_amount`") # verify the required parameter 'external_id' is set if ('external_id' not in params or params['external_id'] is None): raise ValueError("Missing the required parameter `external_id` when calling `add_collected_amount`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) if 'collected_amount' in params: query_params.append(('collectedAmount', params['collected_amount'])) if 'external_id' in params: query_params.append(('externalId', params['external_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] return self.api_client.call_api( '/debt-collection-case/addCollectedAmount', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DebtCollectionReceipt', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def attach_document(self, space_id, id, file_name, content_base64, **kwargs): """Attach Document Attach an additional supporting document to the case. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.attach_document(space_id, id, file_name, content_base64, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the debt collection case. (required) :param str file_name: The file name of the document that is uploaded. (required) :param str content_base64: The BASE64 encoded contents of the document. (required) :return: DebtCollectionCaseDocument If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.attach_document_with_http_info(space_id, id, file_name, content_base64, **kwargs) else: (data) = self.attach_document_with_http_info(space_id, id, file_name, content_base64, **kwargs) return data def attach_document_with_http_info(self, space_id, id, file_name, content_base64, **kwargs): """Attach Document Attach an additional supporting document to the case. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.attach_document_with_http_info(space_id, id, file_name, content_base64, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the debt collection case. (required) :param str file_name: The file name of the document that is uploaded. (required) :param str content_base64: The BASE64 encoded contents of the document. (required) :return: DebtCollectionCaseDocument If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id', 'file_name', 'content_base64'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method attach_document" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `attach_document`") # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `attach_document`") # verify the required parameter 'file_name' is set if ('file_name' not in params or params['file_name'] is None): raise ValueError("Missing the required parameter `file_name` when calling `attach_document`") # verify the required parameter 'content_base64' is set if ('content_base64' not in params or params['content_base64'] is None): raise ValueError("Missing the required parameter `content_base64` when calling `attach_document`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) if 'file_name' in params: query_params.append(('fileName', params['file_name'])) if 'content_base64' in params: query_params.append(('contentBase64', params['content_base64'])) header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] return self.api_client.call_api( '/debt-collection-case/attachDocument', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DebtCollectionCaseDocument', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def close(self, space_id, id, **kwargs): """Close Closes the debt collection case, meaning no further money can be collected. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.close(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the debt collection case which should be closed. (required) :return: DebtCollectionCase If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.close_with_http_info(space_id, id, **kwargs) else: (data) = self.close_with_http_info(space_id, id, **kwargs) return data def close_with_http_info(self, space_id, id, **kwargs): """Close Closes the debt collection case, meaning no further money can be collected. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.close_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the debt collection case which should be closed. (required) :return: DebtCollectionCase If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method close" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `close`") # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `close`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] return self.api_client.call_api( '/debt-collection-case/close', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DebtCollectionCase', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def count(self, space_id, **kwargs): """Count Counts the number of items in the database as restricted by the given filter. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.count(space_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQueryFilter filter: The filter which restricts the entities which are used to calculate the count. :return: int If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.count_with_http_info(space_id, **kwargs) else: (data) = self.count_with_http_info(space_id, **kwargs) return data def count_with_http_info(self, space_id, **kwargs): """Count Counts the number of items in the database as restricted by the given filter. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.count_with_http_info(space_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQueryFilter filter: The filter which restricts the entities which are used to calculate the count. :return: int If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'filter'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method count" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `count`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'filter' in params: body_params = params['filter'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/debt-collection-case/count', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='int', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def create(self, space_id, entity, **kwargs): """Create Creates the entity with the given properties. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create(space_id, entity, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param DebtCollectionCaseCreate entity: The debt collection case object with the properties which should be created. (required) :return: DebtCollectionCase If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_with_http_info(space_id, entity, **kwargs) else: (data) = self.create_with_http_info(space_id, entity, **kwargs) return data def create_with_http_info(self, space_id, entity, **kwargs): """Create Creates the entity with the given properties. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_with_http_info(space_id, entity, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param DebtCollectionCaseCreate entity: The debt collection case object with the properties which should be created. (required) :return: DebtCollectionCase If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'entity'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `create`") # verify the required parameter 'entity' is set if ('entity' not in params or params['entity'] is None): raise ValueError("Missing the required parameter `entity` when calling `create`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'entity' in params: body_params = params['entity'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/debt-collection-case/create', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DebtCollectionCase', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def delete(self, space_id, id, **kwargs): """Delete Deletes the entity with the given id. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_with_http_info(space_id, id, **kwargs) else: (data) = self.delete_with_http_info(space_id, id, **kwargs) return data def delete_with_http_info(self, space_id, id, **kwargs): """Delete Deletes the entity with the given id. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `delete`") # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `delete`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'id' in params: body_params = params['id'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/debt-collection-case/delete', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def documents(self, space_id, id, **kwargs): """Documents Returns all documents that are attached to a debt collection case. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.documents(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the debt collection case for which the attached documents are returned. (required) :return: list[DebtCollectionCaseDocument] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.documents_with_http_info(space_id, id, **kwargs) else: (data) = self.documents_with_http_info(space_id, id, **kwargs) return data def documents_with_http_info(self, space_id, id, **kwargs): """Documents Returns all documents that are attached to a debt collection case. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.documents_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the debt collection case for which the attached documents are returned. (required) :return: list[DebtCollectionCaseDocument] If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method documents" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `documents`") # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `documents`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] return self.api_client.call_api( '/debt-collection-case/documents', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[DebtCollectionCaseDocument]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def mark_as_prepared(self, space_id, id, **kwargs): """Mark Case As Prepared This operation will mark a debt collection case as prepared and allow the collection process to proceed. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mark_as_prepared(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the debt collection case which should be marked as prepared. (required) :return: DebtCollectionCase If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.mark_as_prepared_with_http_info(space_id, id, **kwargs) else: (data) = self.mark_as_prepared_with_http_info(space_id, id, **kwargs) return data def mark_as_prepared_with_http_info(self, space_id, id, **kwargs): """Mark Case As Prepared This operation will mark a debt collection case as prepared and allow the collection process to proceed. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mark_as_prepared_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the debt collection case which should be marked as prepared. (required) :return: DebtCollectionCase If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method mark_as_prepared" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `mark_as_prepared`") # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `mark_as_prepared`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] return self.api_client.call_api( '/debt-collection-case/markAsPrepared', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DebtCollectionCase', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def mark_as_reviewed(self, space_id, id, **kwargs): """Mark Case As Reviewed This operation will mark a debt collection case as reviewed and allow the collection process to proceed. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mark_as_reviewed(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the debt collection case which should be reviewed. (required) :return: DebtCollectionCase If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.mark_as_reviewed_with_http_info(space_id, id, **kwargs) else: (data) = self.mark_as_reviewed_with_http_info(space_id, id, **kwargs) return data def mark_as_reviewed_with_http_info(self, space_id, id, **kwargs): """Mark Case As Reviewed This operation will mark a debt collection case as reviewed and allow the collection process to proceed. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mark_as_reviewed_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the debt collection case which should be reviewed. (required) :return: DebtCollectionCase If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method mark_as_reviewed" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `mark_as_reviewed`") # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `mark_as_reviewed`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] return self.api_client.call_api( '/debt-collection-case/markAsReviewed', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DebtCollectionCase', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def read(self, space_id, id, **kwargs): """Read Reads the entity with the given 'id' and returns it. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the debt collection case which should be returned. (required) :return: DebtCollectionCase If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.read_with_http_info(space_id, id, **kwargs) else: (data) = self.read_with_http_info(space_id, id, **kwargs) return data def read_with_http_info(self, space_id, id, **kwargs): """Read Reads the entity with the given 'id' and returns it. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_with_http_info(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The id of the debt collection case which should be returned. (required) :return: DebtCollectionCase If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method read" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `read`") # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `read`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['*/*']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/debt-collection-case/read', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DebtCollectionCase', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def search(self, space_id, query, **kwargs): """Search Searches for the entities as specified by the given query. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search(space_id, query, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQuery query: The query restricts the cases which are returned by the search. (required) :return: list[DebtCollectionCase] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.search_with_http_info(space_id, query, **kwargs) else: (data) = self.search_with_http_info(space_id, query, **kwargs) return data def search_with_http_info(self, space_id, query, **kwargs): """Search Searches for the entities as specified by the given query. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_with_http_info(space_id, query, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param EntityQuery query: The query restricts the cases which are returned by the search. (required) :return: list[DebtCollectionCase] If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'query'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method search" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `search`") # verify the required parameter 'query' is set if ('query' not in params or params['query'] is None): raise ValueError("Missing the required parameter `query` when calling `search`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'query' in params: body_params = params['query'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/debt-collection-case/search', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[DebtCollectionCase]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def update(self, space_id, entity, **kwargs): """Update This updates the entity with the given properties. Only those properties which should be updated can be provided. The 'id' and 'version' are required to identify the entity. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update(space_id, entity, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param DebtCollectionCaseUpdate entity: The object with all the properties which should be updated. The id and the version are required properties. (required) :return: DebtCollectionCase If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_with_http_info(space_id, entity, **kwargs) else: (data) = self.update_with_http_info(space_id, entity, **kwargs) return data def update_with_http_info(self, space_id, entity, **kwargs): """Update This updates the entity with the given properties. Only those properties which should be updated can be provided. The 'id' and 'version' are required to identify the entity. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_with_http_info(space_id, entity, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param DebtCollectionCaseUpdate entity: The object with all the properties which should be updated. The id and the version are required properties. (required) :return: DebtCollectionCase If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'entity'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError("Missing the required parameter `space_id` when calling `update`") # verify the required parameter 'entity' is set if ('entity' not in params or params['entity'] is None): raise ValueError("Missing the required parameter `entity` when calling `update`") collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'entity' in params: body_params = params['entity'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/debt-collection-case/update', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DebtCollectionCase', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
class LabelDescriptionServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def all(self, **kwargs): """All This operation returns all entities which are available. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.all(async_req=True) >>> result = thread.get() :param async_req bool :return: list[LabelDescriptor] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.all_with_http_info(**kwargs) else: (data) = self.all_with_http_info(**kwargs) return data def all_with_http_info(self, **kwargs): """All This operation returns all entities which are available. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.all_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: list[LabelDescriptor] If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method all" % key) params[key] = val del 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( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['*/*']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/label-description-service/all', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[LabelDescriptor]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def read(self, id, **kwargs): """Read Reads the entity with the given 'id' and returns it. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: The id of the label descriptor which should be returned. (required) :return: LabelDescriptor If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.read_with_http_info(id, **kwargs) else: (data) = self.read_with_http_info(id, **kwargs) return data def read_with_http_info(self, id, **kwargs): """Read Reads the entity with the given 'id' and returns it. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: The id of the label descriptor which should be returned. (required) :return: LabelDescriptor If the method is called asynchronously, returns the request thread. """ all_params = ['id'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method read" % key) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError( "Missing the required parameter `id` when calling `read`") collection_formats = {} path_params = {} query_params = [] if 'id' in params: query_params.append(('id', params['id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['*/*']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/label-description-service/read', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='LabelDescriptor', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
class TransactionTerminalServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def fetch_receipts(self, space_id, request, **kwargs): """Fetch Receipts Returns all receipts for the requested terminal transaction. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.fetch_receipts(space_id, request, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param TerminalReceiptFetchRequest request: (required) :return: list[RenderedTerminalReceipt] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.fetch_receipts_with_http_info(space_id, request, **kwargs) else: (data) = self.fetch_receipts_with_http_info( space_id, request, **kwargs) return data def fetch_receipts_with_http_info(self, space_id, request, **kwargs): """Fetch Receipts Returns all receipts for the requested terminal transaction. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.fetch_receipts_with_http_info(space_id, request, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param TerminalReceiptFetchRequest request: (required) :return: list[RenderedTerminalReceipt] If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'request'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method fetch_receipts" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `fetch_receipts`" ) # verify the required parameter 'request' is set if ('request' not in params or params['request'] is None): raise ValueError( "Missing the required parameter `request` when calling `fetch_receipts`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'request' in params: body_params = params['request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json;charset=utf-8']) # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( ['application/json;charset=utf-8']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/transaction-terminal/fetch-receipts', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[RenderedTerminalReceipt]', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def till_connection_credentials(self, space_id, transaction_id, terminal_id, **kwargs): """Create Till Connection Credentials This operation creates a set of credentials to use within the WebSocket. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.till_connection_credentials(space_id, transaction_id, terminal_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int transaction_id: The ID of the transaction which is used to process with the terminal. (required) :param int terminal_id: The ID of the terminal which should be used to process the transaction. (required) :param str language: The language in which the messages should be rendered in. :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.till_connection_credentials_with_http_info( space_id, transaction_id, terminal_id, **kwargs) else: (data) = self.till_connection_credentials_with_http_info( space_id, transaction_id, terminal_id, **kwargs) return data def till_connection_credentials_with_http_info(self, space_id, transaction_id, terminal_id, **kwargs): """Create Till Connection Credentials This operation creates a set of credentials to use within the WebSocket. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.till_connection_credentials_with_http_info(space_id, transaction_id, terminal_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int transaction_id: The ID of the transaction which is used to process with the terminal. (required) :param int terminal_id: The ID of the terminal which should be used to process the transaction. (required) :param str language: The language in which the messages should be rendered in. :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'transaction_id', 'terminal_id', 'language'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method till_connection_credentials" % key) params[key] = val del params['kwargs'] # verify the required parameter 'space_id' is set if ('space_id' not in params or params['space_id'] is None): raise ValueError( "Missing the required parameter `space_id` when calling `till_connection_credentials`" ) # verify the required parameter 'transaction_id' is set if ('transaction_id' not in params or params['transaction_id'] is None): raise ValueError( "Missing the required parameter `transaction_id` when calling `till_connection_credentials`" ) # verify the required parameter 'terminal_id' is set if ('terminal_id' not in params or params['terminal_id'] is None): raise ValueError( "Missing the required parameter `terminal_id` when calling `till_connection_credentials`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'transaction_id' in params: query_params.append(('transactionId', params['transaction_id'])) if 'terminal_id' in params: query_params.append(('terminalId', params['terminal_id'])) if 'language' in params: query_params.append(('language', params['language'])) header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] return self.api_client.call_api( '/transaction-terminal/till-connection-credentials', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)