class PaymentLinkServiceApi: 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( '/payment-link/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 PaymentLinkCreate entity: The payment link object with the properties which should be created. (required) :return: PaymentLink 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 PaymentLinkCreate entity: The payment link object with the properties which should be created. (required) :return: PaymentLink 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( '/payment-link/create', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PaymentLink', 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( '/payment-link/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 payment links which should be returned. (required) :return: PaymentLink 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 payment links which should be returned. (required) :return: PaymentLink 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( '/payment-link/read', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PaymentLink', 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 payment links which are returned by the search. (required) :return: list[PaymentLink] 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 payment links which are returned by the search. (required) :return: list[PaymentLink] 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( '/payment-link/search', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[PaymentLink]', 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 PaymentLinkUpdate entity: The object with all the properties which should be updated. The id and the version are required properties. (required) :return: PaymentLink 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 PaymentLinkUpdate entity: The object with all the properties which should be updated. The id and the version are required properties. (required) :return: PaymentLink 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( '/payment-link/update', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PaymentLink', 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)
def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration)
class DeliveryIndicationServiceApi: 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( '/delivery-indication/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 mark_as_not_suitable(self, space_id, delivery_indication_id, **kwargs): """markAsNotSuitable This operation marks the delivery indication as not suitable. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mark_as_not_suitable(space_id, delivery_indication_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int delivery_indication_id: The delivery indication id which should be marked as not suitable. (required) :return: DeliveryIndication 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_not_suitable_with_http_info( space_id, delivery_indication_id, **kwargs) else: (data) = self.mark_as_not_suitable_with_http_info( space_id, delivery_indication_id, **kwargs) return data def mark_as_not_suitable_with_http_info(self, space_id, delivery_indication_id, **kwargs): """markAsNotSuitable This operation marks the delivery indication as not suitable. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mark_as_not_suitable_with_http_info(space_id, delivery_indication_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int delivery_indication_id: The delivery indication id which should be marked as not suitable. (required) :return: DeliveryIndication If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'delivery_indication_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_not_suitable" % 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_not_suitable`" ) # verify the required parameter 'delivery_indication_id' is set if ('delivery_indication_id' not in params or params['delivery_indication_id'] is None): raise ValueError( "Missing the required parameter `delivery_indication_id` when calling `mark_as_not_suitable`" ) 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 'delivery_indication_id' in params: body_params = params['delivery_indication_id'] # 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( '/delivery-indication/markAsNotSuitable', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeliveryIndication', 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_suitable(self, space_id, delivery_indication_id, **kwargs): """markAsSuitable This operation marks the delivery indication as suitable. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mark_as_suitable(space_id, delivery_indication_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int delivery_indication_id: The delivery indication id which should be marked as suitable. (required) :return: DeliveryIndication 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_suitable_with_http_info( space_id, delivery_indication_id, **kwargs) else: (data) = self.mark_as_suitable_with_http_info( space_id, delivery_indication_id, **kwargs) return data def mark_as_suitable_with_http_info(self, space_id, delivery_indication_id, **kwargs): """markAsSuitable This operation marks the delivery indication as suitable. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mark_as_suitable_with_http_info(space_id, delivery_indication_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int delivery_indication_id: The delivery indication id which should be marked as suitable. (required) :return: DeliveryIndication If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'delivery_indication_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_suitable" % 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_suitable`" ) # verify the required parameter 'delivery_indication_id' is set if ('delivery_indication_id' not in params or params['delivery_indication_id'] is None): raise ValueError( "Missing the required parameter `delivery_indication_id` when calling `mark_as_suitable`" ) 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 'delivery_indication_id' in params: body_params = params['delivery_indication_id'] # 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( '/delivery-indication/markAsSuitable', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeliveryIndication', 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 delivery indication which should be returned. (required) :return: DeliveryIndication 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 delivery indication which should be returned. (required) :return: DeliveryIndication 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( '/delivery-indication/read', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeliveryIndication', 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 delivery indications which are returned by the search. (required) :return: list[DeliveryIndication] 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 delivery indications which are returned by the search. (required) :return: list[DeliveryIndication] 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( '/delivery-indication/search', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[DeliveryIndication]', 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 StaticValueServiceApi: 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[StaticValue] 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[StaticValue] 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( '/static-value-service/all', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[StaticValue]', 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 static value which should be returned. (required) :return: StaticValue 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 static value which should be returned. (required) :return: StaticValue 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( '/static-value-service/read', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='StaticValue', 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 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 RefundCommentServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def all(self, space_id, refund_id, **kwargs): """Find by refund Returns all comments of the given refund. 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, refund_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int refund_id: (required) :return: list[RefundComment] 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, refund_id, **kwargs) else: (data) = self.all_with_http_info(space_id, refund_id, **kwargs) return data def all_with_http_info(self, space_id, refund_id, **kwargs): """Find by refund Returns all comments of the given refund. 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, refund_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int refund_id: (required) :return: list[RefundComment] 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 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 '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 `all`") 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']) # 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-comment/all', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[RefundComment]', 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 RefundCommentCreate entity: (required) :return: RefundComment 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 RefundCommentCreate entity: (required) :return: RefundComment 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( '/refund-comment/create', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='RefundComment', 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( '/refund-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( '/refund-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: RefundComment 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: RefundComment 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-comment/read', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='RefundComment', 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( '/refund-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 RefundCommentActive entity: (required) :return: RefundComment 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 RefundCommentActive entity: (required) :return: RefundComment 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( '/refund-comment/update', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='RefundComment', 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 ChargeFlowServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def apply_flow(self, space_id, id, **kwargs): """applyFlow This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.apply_flow(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The transaction id of the transaction which should be process asynchronously. (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.apply_flow_with_http_info(space_id, id, **kwargs) else: (data) = self.apply_flow_with_http_info(space_id, id, **kwargs) return data def apply_flow_with_http_info(self, space_id, id, **kwargs): """applyFlow This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.apply_flow_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 transaction id of the transaction which should be process asynchronously. (required) :return: Transaction 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 apply_flow" % 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_flow`") # 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 `apply_flow`") 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']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/charge-flow/applyFlow', '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 cancel_charge_flow(self, space_id, id, **kwargs): """Cancel Charge Flow This operation cancels the charge flow that is linked with the transaction indicated by 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.cancel_charge_flow(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 for which the charge flow should be canceled. (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.cancel_charge_flow_with_http_info(space_id, id, **kwargs) else: (data) = self.cancel_charge_flow_with_http_info(space_id, id, **kwargs) return data def cancel_charge_flow_with_http_info(self, space_id, id, **kwargs): """Cancel Charge Flow This operation cancels the charge flow that is linked with the transaction indicated by 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.cancel_charge_flow_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 for which the charge flow should be canceled. (required) :return: Transaction 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 cancel_charge_flow" % 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 `cancel_charge_flow`") # 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 `cancel_charge_flow`") 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']) # Authentication setting auth_settings = [] return self.api_client.call_api( '/charge-flow/cancel-charge-flow', '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 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( '/charge-flow/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 fetch_charge_flow_payment_page_url(self, space_id, id, **kwargs): """Fetch Charge Flow Payment Page URL This operation allows to fetch the payment page URL that is been applied on the charge flow linked with the provided transaction. The operation might return an empty result when no payment page is needed or can be invoked. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.fetch_charge_flow_payment_page_url(space_id, id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int id: The transaction id of the transaction for which the URL of the charge flow should be fetched. (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.fetch_charge_flow_payment_page_url_with_http_info(space_id, id, **kwargs) else: (data) = self.fetch_charge_flow_payment_page_url_with_http_info(space_id, id, **kwargs) return data def fetch_charge_flow_payment_page_url_with_http_info(self, space_id, id, **kwargs): """Fetch Charge Flow Payment Page URL This operation allows to fetch the payment page URL that is been applied on the charge flow linked with the provided transaction. The operation might return an empty result when no payment page is needed or can be invoked. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.fetch_charge_flow_payment_page_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 transaction id of the transaction for which the URL of the charge flow should be fetched. (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 fetch_charge_flow_payment_page_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 `fetch_charge_flow_payment_page_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 `fetch_charge_flow_payment_page_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( '/charge-flow/fetch-charge-flow-payment-page-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) 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 charge flow which should be returned. (required) :return: ChargeFlow 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 charge flow which should be returned. (required) :return: ChargeFlow 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( '/charge-flow/read', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ChargeFlow', 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 charge flows which are returned by the search. (required) :return: list[ChargeFlow] 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 charge flows which are returned by the search. (required) :return: list[ChargeFlow] 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( '/charge-flow/search', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[ChargeFlow]', 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_recipient(self, space_id, transaction_id, type, recipient, **kwargs): """updateRecipient This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_recipient(space_id, transaction_id, type, recipient, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int transaction_id: The transaction id of the transaction whose recipient should be updated. (required) :param int type: The id of the charge flow configuration type to recipient should be updated for. (required) :param str recipient: The recipient address that should be used to send the payment URL. (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.update_recipient_with_http_info(space_id, transaction_id, type, recipient, **kwargs) else: (data) = self.update_recipient_with_http_info(space_id, transaction_id, type, recipient, **kwargs) return data def update_recipient_with_http_info(self, space_id, transaction_id, type, recipient, **kwargs): """updateRecipient This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_recipient_with_http_info(space_id, transaction_id, type, recipient, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int transaction_id: The transaction id of the transaction whose recipient should be updated. (required) :param int type: The id of the charge flow configuration type to recipient should be updated for. (required) :param str recipient: The recipient address that should be used to send the payment URL. (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'transaction_id', 'type', 'recipient'] 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_recipient" % 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_recipient`") # 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 `update_recipient`") # verify the required parameter 'type' is set if ('type' not in params or params['type'] is None): raise ValueError("Missing the required parameter `type` when calling `update_recipient`") # verify the required parameter 'recipient' is set if ('recipient' not in params or params['recipient'] is None): raise ValueError("Missing the required parameter `recipient` when calling `update_recipient`") 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 'type' in params: query_params.append(('type', params['type'])) if 'recipient' in params: query_params.append(('recipient', params['recipient'])) 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( '/charge-flow/updateRecipient', '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 CountryServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def all(self, **kwargs): """All This operation returns 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[RestCountry] 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 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[RestCountry] 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/all', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[RestCountry]', 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 PaymentTerminalServiceApi: 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( '/payment-terminal/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 link(self, space_id, terminal_id, serial_number, **kwargs): """Link Device With Terminal Links the device with given serial number with terminal. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.link(space_id, terminal_id, serial_number, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int terminal_id: (required) :param str serial_number: (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.link_with_http_info(space_id, terminal_id, serial_number, **kwargs) else: (data) = self.link_with_http_info(space_id, terminal_id, serial_number, **kwargs) return data def link_with_http_info(self, space_id, terminal_id, serial_number, **kwargs): """Link Device With Terminal Links the device with given serial number with terminal. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.link_with_http_info(space_id, terminal_id, serial_number, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int terminal_id: (required) :param str serial_number: (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'terminal_id', 'serial_number'] 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 link" % 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 `link`" ) # 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 `link`" ) # verify the required parameter 'serial_number' is set if ('serial_number' not in params or params['serial_number'] is None): raise ValueError( "Missing the required parameter `serial_number` when calling `link`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'terminal_id' in params: query_params.append(('terminalId', params['terminal_id'])) if 'serial_number' in params: query_params.append(('serialNumber', params['serial_number'])) header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] return self.api_client.call_api( '/payment-terminal/link', '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 payment terminal which should be returned. (required) :return: PaymentTerminal 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 payment terminal which should be returned. (required) :return: PaymentTerminal 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( '/payment-terminal/read', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PaymentTerminal', 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 payment terminals which are returned by the search. (required) :return: list[PaymentTerminal] 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 payment terminals which are returned by the search. (required) :return: list[PaymentTerminal] 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( '/payment-terminal/search', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[PaymentTerminal]', 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 unlink(self, space_id, terminal_id, **kwargs): """Unlink Device With Terminal Unlinks the device from terminal. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.unlink(space_id, terminal_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int terminal_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.unlink_with_http_info(space_id, terminal_id, **kwargs) else: (data) = self.unlink_with_http_info(space_id, terminal_id, **kwargs) return data def unlink_with_http_info(self, space_id, terminal_id, **kwargs): """Unlink Device With Terminal Unlinks the device from terminal. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.unlink_with_http_info(space_id, terminal_id, async_req=True) >>> result = thread.get() :param async_req bool :param int space_id: (required) :param int terminal_id: (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['space_id', 'terminal_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 unlink" % 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 `unlink`" ) # 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 `unlink`" ) collection_formats = {} path_params = {} query_params = [] if 'space_id' in params: query_params.append(('spaceId', params['space_id'])) if 'terminal_id' in params: query_params.append(('terminalId', params['terminal_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # Authentication setting auth_settings = [] return self.api_client.call_api( '/payment-terminal/unlink', '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 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)
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 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)