docusign_esign.apis.custom_tabs_api

Docusign eSignature REST API

The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. # noqa: E501

OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git

  1# coding: utf-8
  2
  3"""
  4    Docusign eSignature REST API
  5
  6    The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign.  # noqa: E501
  7
  8    OpenAPI spec version: v2.1
  9    Contact: devcenter@docusign.com
 10    Generated by: https://github.com/swagger-api/swagger-codegen.git
 11"""
 12
 13
 14from __future__ import absolute_import
 15
 16import sys
 17import os
 18import re
 19
 20# python 2 and python 3 compatibility library
 21from six import iteritems
 22
 23from ..client.configuration import Configuration
 24from ..client.api_client import ApiClient
 25
 26
 27class CustomTabsApi(object):
 28    """
 29    NOTE: This class is auto generated by the swagger code generator program.
 30    Do not edit the class manually.
 31    Ref: https://github.com/swagger-api/swagger-codegen
 32    """
 33
 34    def __init__(self, api_client=None):
 35        config = Configuration()
 36        if api_client:
 37            self.api_client = api_client
 38        else:
 39            if not config.api_client:
 40                config.api_client = ApiClient()
 41            self.api_client = config.api_client
 42
 43    def create(self, account_id, **kwargs):
 44        """
 45        Creates a custom tab.
 46        Creates a tab with pre-defined properties, such as a text tab with a certain font type and validation pattern. Users can access the custom tabs when sending documents through the DocuSign web application.  Custom tabs can be created for approve, checkbox, company, date, date signed, decline, email, email address, envelope ID, first name, formula, full name, initial here, last name, list, note, number, radio, sign here, signer attachment, SSN, text, title, and zip tabs.
 47        This method makes a synchronous HTTP request by default. To make an
 48        asynchronous HTTP request, please define a `callback` function
 49        to be invoked when receiving the response.
 50        >>> def callback_function(response):
 51        >>>     pprint(response)
 52        >>>
 53        >>> thread = api.create(account_id, callback=callback_function)
 54
 55        :param callback function: The callback function
 56            for asynchronous request. (optional)
 57        :param str account_id: The external account number (int) or account ID Guid. (required)
 58        :param TabMetadata tab_metadata:
 59        :return: TabMetadata
 60                 If the method is called asynchronously,
 61                 returns the request thread.
 62        """
 63        kwargs['_return_http_data_only'] = True
 64        if kwargs.get('callback'):
 65            return self.create_with_http_info(account_id, **kwargs)
 66        else:
 67            (data) = self.create_with_http_info(account_id, **kwargs)
 68            return data
 69
 70    def create_with_http_info(self, account_id, **kwargs):
 71        """
 72        Creates a custom tab.
 73        Creates a tab with pre-defined properties, such as a text tab with a certain font type and validation pattern. Users can access the custom tabs when sending documents through the DocuSign web application.  Custom tabs can be created for approve, checkbox, company, date, date signed, decline, email, email address, envelope ID, first name, formula, full name, initial here, last name, list, note, number, radio, sign here, signer attachment, SSN, text, title, and zip tabs.
 74        This method makes a synchronous HTTP request by default. To make an
 75        asynchronous HTTP request, please define a `callback` function
 76        to be invoked when receiving the response.
 77        >>> def callback_function(response):
 78        >>>     pprint(response)
 79        >>>
 80        >>> thread = api.create_with_http_info(account_id, callback=callback_function)
 81
 82        :param callback function: The callback function
 83            for asynchronous request. (optional)
 84        :param str account_id: The external account number (int) or account ID Guid. (required)
 85        :param TabMetadata tab_metadata:
 86        :return: TabMetadata
 87                 If the method is called asynchronously,
 88                 returns the request thread.
 89        """
 90
 91        all_params = ['account_id', 'tab_metadata']
 92        all_params.append('callback')
 93        all_params.append('_return_http_data_only')
 94        all_params.append('_preload_content')
 95        all_params.append('_request_timeout')
 96
 97        params = locals()
 98        for key, val in iteritems(params['kwargs']):
 99            if key not in all_params:
100                raise TypeError(
101                    "Got an unexpected keyword argument '%s'"
102                    " to method create" % key
103                )
104            params[key] = val
105        del params['kwargs']
106        # verify the required parameter 'account_id' is set
107        if ('account_id' not in params) or (params['account_id'] is None):
108            raise ValueError("Missing the required parameter `account_id` when calling `create`")
109
110
111        collection_formats = {}
112
113        resource_path = '/v2.1/accounts/{accountId}/tab_definitions'.replace('{format}', 'json')
114        path_params = {}
115        if 'account_id' in params:
116            path_params['accountId'] = params['account_id']
117
118        query_params = {}
119
120        header_params = {}
121
122        form_params = []
123        local_var_files = {}
124
125        body_params = None
126        if 'tab_metadata' in params:
127            body_params = params['tab_metadata']
128        # HTTP header `Accept`
129        header_params['Accept'] = self.api_client.\
130            select_header_accept(['application/json'])
131
132        # Authentication setting
133        auth_settings = []
134
135        return self.api_client.call_api(resource_path, 'POST',
136                                        path_params,
137                                        query_params,
138                                        header_params,
139                                        body=body_params,
140                                        post_params=form_params,
141                                        files=local_var_files,
142                                        response_type='TabMetadata',
143                                        auth_settings=auth_settings,
144                                        callback=params.get('callback'),
145                                        _return_http_data_only=params.get('_return_http_data_only'),
146                                        _preload_content=params.get('_preload_content', True),
147                                        _request_timeout=params.get('_request_timeout'),
148                                        collection_formats=collection_formats)
149
150    def delete(self, account_id, custom_tab_id, **kwargs):
151        """
152        Deletes custom tab information.
153        Deletes the custom from the specified account.
154        This method makes a synchronous HTTP request by default. To make an
155        asynchronous HTTP request, please define a `callback` function
156        to be invoked when receiving the response.
157        >>> def callback_function(response):
158        >>>     pprint(response)
159        >>>
160        >>> thread = api.delete(account_id, custom_tab_id, callback=callback_function)
161
162        :param callback function: The callback function
163            for asynchronous request. (optional)
164        :param str account_id: The external account number (int) or account ID Guid. (required)
165        :param str custom_tab_id: (required)
166        :return: None
167                 If the method is called asynchronously,
168                 returns the request thread.
169        """
170        kwargs['_return_http_data_only'] = True
171        if kwargs.get('callback'):
172            return self.delete_with_http_info(account_id, custom_tab_id, **kwargs)
173        else:
174            (data) = self.delete_with_http_info(account_id, custom_tab_id, **kwargs)
175            return data
176
177    def delete_with_http_info(self, account_id, custom_tab_id, **kwargs):
178        """
179        Deletes custom tab information.
180        Deletes the custom from the specified account.
181        This method makes a synchronous HTTP request by default. To make an
182        asynchronous HTTP request, please define a `callback` function
183        to be invoked when receiving the response.
184        >>> def callback_function(response):
185        >>>     pprint(response)
186        >>>
187        >>> thread = api.delete_with_http_info(account_id, custom_tab_id, callback=callback_function)
188
189        :param callback function: The callback function
190            for asynchronous request. (optional)
191        :param str account_id: The external account number (int) or account ID Guid. (required)
192        :param str custom_tab_id: (required)
193        :return: None
194                 If the method is called asynchronously,
195                 returns the request thread.
196        """
197
198        all_params = ['account_id', 'custom_tab_id']
199        all_params.append('callback')
200        all_params.append('_return_http_data_only')
201        all_params.append('_preload_content')
202        all_params.append('_request_timeout')
203
204        params = locals()
205        for key, val in iteritems(params['kwargs']):
206            if key not in all_params:
207                raise TypeError(
208                    "Got an unexpected keyword argument '%s'"
209                    " to method delete" % key
210                )
211            params[key] = val
212        del params['kwargs']
213        # verify the required parameter 'account_id' is set
214        if ('account_id' not in params) or (params['account_id'] is None):
215            raise ValueError("Missing the required parameter `account_id` when calling `delete`")
216        # verify the required parameter 'custom_tab_id' is set
217        if ('custom_tab_id' not in params) or (params['custom_tab_id'] is None):
218            raise ValueError("Missing the required parameter `custom_tab_id` when calling `delete`")
219
220
221        collection_formats = {}
222
223        resource_path = '/v2.1/accounts/{accountId}/tab_definitions/{customTabId}'.replace('{format}', 'json')
224        path_params = {}
225        if 'account_id' in params:
226            path_params['accountId'] = params['account_id']
227        if 'custom_tab_id' in params:
228            path_params['customTabId'] = params['custom_tab_id']
229
230        query_params = {}
231
232        header_params = {}
233
234        form_params = []
235        local_var_files = {}
236
237        body_params = None
238        # HTTP header `Accept`
239        header_params['Accept'] = self.api_client.\
240            select_header_accept(['application/json'])
241
242        # Authentication setting
243        auth_settings = []
244
245        return self.api_client.call_api(resource_path, 'DELETE',
246                                        path_params,
247                                        query_params,
248                                        header_params,
249                                        body=body_params,
250                                        post_params=form_params,
251                                        files=local_var_files,
252                                        response_type=None,
253                                        auth_settings=auth_settings,
254                                        callback=params.get('callback'),
255                                        _return_http_data_only=params.get('_return_http_data_only'),
256                                        _preload_content=params.get('_preload_content', True),
257                                        _request_timeout=params.get('_request_timeout'),
258                                        collection_formats=collection_formats)
259
260    def get(self, account_id, custom_tab_id, **kwargs):
261        """
262        Gets custom tab information.
263        Retrieves information about the requested custom tab on the specified account.
264        This method makes a synchronous HTTP request by default. To make an
265        asynchronous HTTP request, please define a `callback` function
266        to be invoked when receiving the response.
267        >>> def callback_function(response):
268        >>>     pprint(response)
269        >>>
270        >>> thread = api.get(account_id, custom_tab_id, callback=callback_function)
271
272        :param callback function: The callback function
273            for asynchronous request. (optional)
274        :param str account_id: The external account number (int) or account ID Guid. (required)
275        :param str custom_tab_id: (required)
276        :return: TabMetadata
277                 If the method is called asynchronously,
278                 returns the request thread.
279        """
280        kwargs['_return_http_data_only'] = True
281        if kwargs.get('callback'):
282            return self.get_with_http_info(account_id, custom_tab_id, **kwargs)
283        else:
284            (data) = self.get_with_http_info(account_id, custom_tab_id, **kwargs)
285            return data
286
287    def get_with_http_info(self, account_id, custom_tab_id, **kwargs):
288        """
289        Gets custom tab information.
290        Retrieves information about the requested custom tab on the specified account.
291        This method makes a synchronous HTTP request by default. To make an
292        asynchronous HTTP request, please define a `callback` function
293        to be invoked when receiving the response.
294        >>> def callback_function(response):
295        >>>     pprint(response)
296        >>>
297        >>> thread = api.get_with_http_info(account_id, custom_tab_id, callback=callback_function)
298
299        :param callback function: The callback function
300            for asynchronous request. (optional)
301        :param str account_id: The external account number (int) or account ID Guid. (required)
302        :param str custom_tab_id: (required)
303        :return: TabMetadata
304                 If the method is called asynchronously,
305                 returns the request thread.
306        """
307
308        all_params = ['account_id', 'custom_tab_id']
309        all_params.append('callback')
310        all_params.append('_return_http_data_only')
311        all_params.append('_preload_content')
312        all_params.append('_request_timeout')
313
314        params = locals()
315        for key, val in iteritems(params['kwargs']):
316            if key not in all_params:
317                raise TypeError(
318                    "Got an unexpected keyword argument '%s'"
319                    " to method get" % key
320                )
321            params[key] = val
322        del params['kwargs']
323        # verify the required parameter 'account_id' is set
324        if ('account_id' not in params) or (params['account_id'] is None):
325            raise ValueError("Missing the required parameter `account_id` when calling `get`")
326        # verify the required parameter 'custom_tab_id' is set
327        if ('custom_tab_id' not in params) or (params['custom_tab_id'] is None):
328            raise ValueError("Missing the required parameter `custom_tab_id` when calling `get`")
329
330
331        collection_formats = {}
332
333        resource_path = '/v2.1/accounts/{accountId}/tab_definitions/{customTabId}'.replace('{format}', 'json')
334        path_params = {}
335        if 'account_id' in params:
336            path_params['accountId'] = params['account_id']
337        if 'custom_tab_id' in params:
338            path_params['customTabId'] = params['custom_tab_id']
339
340        query_params = {}
341
342        header_params = {}
343
344        form_params = []
345        local_var_files = {}
346
347        body_params = None
348        # HTTP header `Accept`
349        header_params['Accept'] = self.api_client.\
350            select_header_accept(['application/json'])
351
352        # Authentication setting
353        auth_settings = []
354
355        return self.api_client.call_api(resource_path, 'GET',
356                                        path_params,
357                                        query_params,
358                                        header_params,
359                                        body=body_params,
360                                        post_params=form_params,
361                                        files=local_var_files,
362                                        response_type='TabMetadata',
363                                        auth_settings=auth_settings,
364                                        callback=params.get('callback'),
365                                        _return_http_data_only=params.get('_return_http_data_only'),
366                                        _preload_content=params.get('_preload_content', True),
367                                        _request_timeout=params.get('_request_timeout'),
368                                        collection_formats=collection_formats)
369
370    def list(self, account_id, **kwargs):
371        """
372        Gets a list of all account tabs.
373        Retrieves a list of all tabs associated with the account.
374        This method makes a synchronous HTTP request by default. To make an
375        asynchronous HTTP request, please define a `callback` function
376        to be invoked when receiving the response.
377        >>> def callback_function(response):
378        >>>     pprint(response)
379        >>>
380        >>> thread = api.list(account_id, callback=callback_function)
381
382        :param callback function: The callback function
383            for asynchronous request. (optional)
384        :param str account_id: The external account number (int) or account ID Guid. (required)
385        :param str custom_tab_only: When set to **true**, only custom tabs are returned in the response. 
386        :return: TabMetadataList
387                 If the method is called asynchronously,
388                 returns the request thread.
389        """
390        kwargs['_return_http_data_only'] = True
391        if kwargs.get('callback'):
392            return self.list_with_http_info(account_id, **kwargs)
393        else:
394            (data) = self.list_with_http_info(account_id, **kwargs)
395            return data
396
397    def list_with_http_info(self, account_id, **kwargs):
398        """
399        Gets a list of all account tabs.
400        Retrieves a list of all tabs associated with the account.
401        This method makes a synchronous HTTP request by default. To make an
402        asynchronous HTTP request, please define a `callback` function
403        to be invoked when receiving the response.
404        >>> def callback_function(response):
405        >>>     pprint(response)
406        >>>
407        >>> thread = api.list_with_http_info(account_id, callback=callback_function)
408
409        :param callback function: The callback function
410            for asynchronous request. (optional)
411        :param str account_id: The external account number (int) or account ID Guid. (required)
412        :param str custom_tab_only: When set to **true**, only custom tabs are returned in the response. 
413        :return: TabMetadataList
414                 If the method is called asynchronously,
415                 returns the request thread.
416        """
417
418        all_params = ['account_id', 'custom_tab_only']
419        all_params.append('callback')
420        all_params.append('_return_http_data_only')
421        all_params.append('_preload_content')
422        all_params.append('_request_timeout')
423
424        params = locals()
425        for key, val in iteritems(params['kwargs']):
426            if key not in all_params:
427                raise TypeError(
428                    "Got an unexpected keyword argument '%s'"
429                    " to method list" % key
430                )
431            params[key] = val
432        del params['kwargs']
433        # verify the required parameter 'account_id' is set
434        if ('account_id' not in params) or (params['account_id'] is None):
435            raise ValueError("Missing the required parameter `account_id` when calling `list`")
436
437
438        collection_formats = {}
439
440        resource_path = '/v2.1/accounts/{accountId}/tab_definitions'.replace('{format}', 'json')
441        path_params = {}
442        if 'account_id' in params:
443            path_params['accountId'] = params['account_id']
444
445        query_params = {}
446        if 'custom_tab_only' in params:
447            query_params['custom_tab_only'] = params['custom_tab_only']
448
449        header_params = {}
450
451        form_params = []
452        local_var_files = {}
453
454        body_params = None
455        # HTTP header `Accept`
456        header_params['Accept'] = self.api_client.\
457            select_header_accept(['application/json'])
458
459        # Authentication setting
460        auth_settings = []
461
462        return self.api_client.call_api(resource_path, 'GET',
463                                        path_params,
464                                        query_params,
465                                        header_params,
466                                        body=body_params,
467                                        post_params=form_params,
468                                        files=local_var_files,
469                                        response_type='TabMetadataList',
470                                        auth_settings=auth_settings,
471                                        callback=params.get('callback'),
472                                        _return_http_data_only=params.get('_return_http_data_only'),
473                                        _preload_content=params.get('_preload_content', True),
474                                        _request_timeout=params.get('_request_timeout'),
475                                        collection_formats=collection_formats)
476
477    def update(self, account_id, custom_tab_id, **kwargs):
478        """
479        Updates custom tab information.  
480        Updates the information in a custom tab for the specified account.
481        This method makes a synchronous HTTP request by default. To make an
482        asynchronous HTTP request, please define a `callback` function
483        to be invoked when receiving the response.
484        >>> def callback_function(response):
485        >>>     pprint(response)
486        >>>
487        >>> thread = api.update(account_id, custom_tab_id, callback=callback_function)
488
489        :param callback function: The callback function
490            for asynchronous request. (optional)
491        :param str account_id: The external account number (int) or account ID Guid. (required)
492        :param str custom_tab_id: (required)
493        :param TabMetadata tab_metadata:
494        :return: TabMetadata
495                 If the method is called asynchronously,
496                 returns the request thread.
497        """
498        kwargs['_return_http_data_only'] = True
499        if kwargs.get('callback'):
500            return self.update_with_http_info(account_id, custom_tab_id, **kwargs)
501        else:
502            (data) = self.update_with_http_info(account_id, custom_tab_id, **kwargs)
503            return data
504
505    def update_with_http_info(self, account_id, custom_tab_id, **kwargs):
506        """
507        Updates custom tab information.  
508        Updates the information in a custom tab for the specified account.
509        This method makes a synchronous HTTP request by default. To make an
510        asynchronous HTTP request, please define a `callback` function
511        to be invoked when receiving the response.
512        >>> def callback_function(response):
513        >>>     pprint(response)
514        >>>
515        >>> thread = api.update_with_http_info(account_id, custom_tab_id, callback=callback_function)
516
517        :param callback function: The callback function
518            for asynchronous request. (optional)
519        :param str account_id: The external account number (int) or account ID Guid. (required)
520        :param str custom_tab_id: (required)
521        :param TabMetadata tab_metadata:
522        :return: TabMetadata
523                 If the method is called asynchronously,
524                 returns the request thread.
525        """
526
527        all_params = ['account_id', 'custom_tab_id', 'tab_metadata']
528        all_params.append('callback')
529        all_params.append('_return_http_data_only')
530        all_params.append('_preload_content')
531        all_params.append('_request_timeout')
532
533        params = locals()
534        for key, val in iteritems(params['kwargs']):
535            if key not in all_params:
536                raise TypeError(
537                    "Got an unexpected keyword argument '%s'"
538                    " to method update" % key
539                )
540            params[key] = val
541        del params['kwargs']
542        # verify the required parameter 'account_id' is set
543        if ('account_id' not in params) or (params['account_id'] is None):
544            raise ValueError("Missing the required parameter `account_id` when calling `update`")
545        # verify the required parameter 'custom_tab_id' is set
546        if ('custom_tab_id' not in params) or (params['custom_tab_id'] is None):
547            raise ValueError("Missing the required parameter `custom_tab_id` when calling `update`")
548
549
550        collection_formats = {}
551
552        resource_path = '/v2.1/accounts/{accountId}/tab_definitions/{customTabId}'.replace('{format}', 'json')
553        path_params = {}
554        if 'account_id' in params:
555            path_params['accountId'] = params['account_id']
556        if 'custom_tab_id' in params:
557            path_params['customTabId'] = params['custom_tab_id']
558
559        query_params = {}
560
561        header_params = {}
562
563        form_params = []
564        local_var_files = {}
565
566        body_params = None
567        if 'tab_metadata' in params:
568            body_params = params['tab_metadata']
569        # HTTP header `Accept`
570        header_params['Accept'] = self.api_client.\
571            select_header_accept(['application/json'])
572
573        # Authentication setting
574        auth_settings = []
575
576        return self.api_client.call_api(resource_path, 'PUT',
577                                        path_params,
578                                        query_params,
579                                        header_params,
580                                        body=body_params,
581                                        post_params=form_params,
582                                        files=local_var_files,
583                                        response_type='TabMetadata',
584                                        auth_settings=auth_settings,
585                                        callback=params.get('callback'),
586                                        _return_http_data_only=params.get('_return_http_data_only'),
587                                        _preload_content=params.get('_preload_content', True),
588                                        _request_timeout=params.get('_request_timeout'),
589                                        collection_formats=collection_formats)
class CustomTabsApi:
 28class CustomTabsApi(object):
 29    """
 30    NOTE: This class is auto generated by the swagger code generator program.
 31    Do not edit the class manually.
 32    Ref: https://github.com/swagger-api/swagger-codegen
 33    """
 34
 35    def __init__(self, api_client=None):
 36        config = Configuration()
 37        if api_client:
 38            self.api_client = api_client
 39        else:
 40            if not config.api_client:
 41                config.api_client = ApiClient()
 42            self.api_client = config.api_client
 43
 44    def create(self, account_id, **kwargs):
 45        """
 46        Creates a custom tab.
 47        Creates a tab with pre-defined properties, such as a text tab with a certain font type and validation pattern. Users can access the custom tabs when sending documents through the DocuSign web application.  Custom tabs can be created for approve, checkbox, company, date, date signed, decline, email, email address, envelope ID, first name, formula, full name, initial here, last name, list, note, number, radio, sign here, signer attachment, SSN, text, title, and zip tabs.
 48        This method makes a synchronous HTTP request by default. To make an
 49        asynchronous HTTP request, please define a `callback` function
 50        to be invoked when receiving the response.
 51        >>> def callback_function(response):
 52        >>>     pprint(response)
 53        >>>
 54        >>> thread = api.create(account_id, callback=callback_function)
 55
 56        :param callback function: The callback function
 57            for asynchronous request. (optional)
 58        :param str account_id: The external account number (int) or account ID Guid. (required)
 59        :param TabMetadata tab_metadata:
 60        :return: TabMetadata
 61                 If the method is called asynchronously,
 62                 returns the request thread.
 63        """
 64        kwargs['_return_http_data_only'] = True
 65        if kwargs.get('callback'):
 66            return self.create_with_http_info(account_id, **kwargs)
 67        else:
 68            (data) = self.create_with_http_info(account_id, **kwargs)
 69            return data
 70
 71    def create_with_http_info(self, account_id, **kwargs):
 72        """
 73        Creates a custom tab.
 74        Creates a tab with pre-defined properties, such as a text tab with a certain font type and validation pattern. Users can access the custom tabs when sending documents through the DocuSign web application.  Custom tabs can be created for approve, checkbox, company, date, date signed, decline, email, email address, envelope ID, first name, formula, full name, initial here, last name, list, note, number, radio, sign here, signer attachment, SSN, text, title, and zip tabs.
 75        This method makes a synchronous HTTP request by default. To make an
 76        asynchronous HTTP request, please define a `callback` function
 77        to be invoked when receiving the response.
 78        >>> def callback_function(response):
 79        >>>     pprint(response)
 80        >>>
 81        >>> thread = api.create_with_http_info(account_id, callback=callback_function)
 82
 83        :param callback function: The callback function
 84            for asynchronous request. (optional)
 85        :param str account_id: The external account number (int) or account ID Guid. (required)
 86        :param TabMetadata tab_metadata:
 87        :return: TabMetadata
 88                 If the method is called asynchronously,
 89                 returns the request thread.
 90        """
 91
 92        all_params = ['account_id', 'tab_metadata']
 93        all_params.append('callback')
 94        all_params.append('_return_http_data_only')
 95        all_params.append('_preload_content')
 96        all_params.append('_request_timeout')
 97
 98        params = locals()
 99        for key, val in iteritems(params['kwargs']):
100            if key not in all_params:
101                raise TypeError(
102                    "Got an unexpected keyword argument '%s'"
103                    " to method create" % key
104                )
105            params[key] = val
106        del params['kwargs']
107        # verify the required parameter 'account_id' is set
108        if ('account_id' not in params) or (params['account_id'] is None):
109            raise ValueError("Missing the required parameter `account_id` when calling `create`")
110
111
112        collection_formats = {}
113
114        resource_path = '/v2.1/accounts/{accountId}/tab_definitions'.replace('{format}', 'json')
115        path_params = {}
116        if 'account_id' in params:
117            path_params['accountId'] = params['account_id']
118
119        query_params = {}
120
121        header_params = {}
122
123        form_params = []
124        local_var_files = {}
125
126        body_params = None
127        if 'tab_metadata' in params:
128            body_params = params['tab_metadata']
129        # HTTP header `Accept`
130        header_params['Accept'] = self.api_client.\
131            select_header_accept(['application/json'])
132
133        # Authentication setting
134        auth_settings = []
135
136        return self.api_client.call_api(resource_path, 'POST',
137                                        path_params,
138                                        query_params,
139                                        header_params,
140                                        body=body_params,
141                                        post_params=form_params,
142                                        files=local_var_files,
143                                        response_type='TabMetadata',
144                                        auth_settings=auth_settings,
145                                        callback=params.get('callback'),
146                                        _return_http_data_only=params.get('_return_http_data_only'),
147                                        _preload_content=params.get('_preload_content', True),
148                                        _request_timeout=params.get('_request_timeout'),
149                                        collection_formats=collection_formats)
150
151    def delete(self, account_id, custom_tab_id, **kwargs):
152        """
153        Deletes custom tab information.
154        Deletes the custom from the specified account.
155        This method makes a synchronous HTTP request by default. To make an
156        asynchronous HTTP request, please define a `callback` function
157        to be invoked when receiving the response.
158        >>> def callback_function(response):
159        >>>     pprint(response)
160        >>>
161        >>> thread = api.delete(account_id, custom_tab_id, callback=callback_function)
162
163        :param callback function: The callback function
164            for asynchronous request. (optional)
165        :param str account_id: The external account number (int) or account ID Guid. (required)
166        :param str custom_tab_id: (required)
167        :return: None
168                 If the method is called asynchronously,
169                 returns the request thread.
170        """
171        kwargs['_return_http_data_only'] = True
172        if kwargs.get('callback'):
173            return self.delete_with_http_info(account_id, custom_tab_id, **kwargs)
174        else:
175            (data) = self.delete_with_http_info(account_id, custom_tab_id, **kwargs)
176            return data
177
178    def delete_with_http_info(self, account_id, custom_tab_id, **kwargs):
179        """
180        Deletes custom tab information.
181        Deletes the custom from the specified account.
182        This method makes a synchronous HTTP request by default. To make an
183        asynchronous HTTP request, please define a `callback` function
184        to be invoked when receiving the response.
185        >>> def callback_function(response):
186        >>>     pprint(response)
187        >>>
188        >>> thread = api.delete_with_http_info(account_id, custom_tab_id, callback=callback_function)
189
190        :param callback function: The callback function
191            for asynchronous request. (optional)
192        :param str account_id: The external account number (int) or account ID Guid. (required)
193        :param str custom_tab_id: (required)
194        :return: None
195                 If the method is called asynchronously,
196                 returns the request thread.
197        """
198
199        all_params = ['account_id', 'custom_tab_id']
200        all_params.append('callback')
201        all_params.append('_return_http_data_only')
202        all_params.append('_preload_content')
203        all_params.append('_request_timeout')
204
205        params = locals()
206        for key, val in iteritems(params['kwargs']):
207            if key not in all_params:
208                raise TypeError(
209                    "Got an unexpected keyword argument '%s'"
210                    " to method delete" % key
211                )
212            params[key] = val
213        del params['kwargs']
214        # verify the required parameter 'account_id' is set
215        if ('account_id' not in params) or (params['account_id'] is None):
216            raise ValueError("Missing the required parameter `account_id` when calling `delete`")
217        # verify the required parameter 'custom_tab_id' is set
218        if ('custom_tab_id' not in params) or (params['custom_tab_id'] is None):
219            raise ValueError("Missing the required parameter `custom_tab_id` when calling `delete`")
220
221
222        collection_formats = {}
223
224        resource_path = '/v2.1/accounts/{accountId}/tab_definitions/{customTabId}'.replace('{format}', 'json')
225        path_params = {}
226        if 'account_id' in params:
227            path_params['accountId'] = params['account_id']
228        if 'custom_tab_id' in params:
229            path_params['customTabId'] = params['custom_tab_id']
230
231        query_params = {}
232
233        header_params = {}
234
235        form_params = []
236        local_var_files = {}
237
238        body_params = None
239        # HTTP header `Accept`
240        header_params['Accept'] = self.api_client.\
241            select_header_accept(['application/json'])
242
243        # Authentication setting
244        auth_settings = []
245
246        return self.api_client.call_api(resource_path, 'DELETE',
247                                        path_params,
248                                        query_params,
249                                        header_params,
250                                        body=body_params,
251                                        post_params=form_params,
252                                        files=local_var_files,
253                                        response_type=None,
254                                        auth_settings=auth_settings,
255                                        callback=params.get('callback'),
256                                        _return_http_data_only=params.get('_return_http_data_only'),
257                                        _preload_content=params.get('_preload_content', True),
258                                        _request_timeout=params.get('_request_timeout'),
259                                        collection_formats=collection_formats)
260
261    def get(self, account_id, custom_tab_id, **kwargs):
262        """
263        Gets custom tab information.
264        Retrieves information about the requested custom tab on the specified account.
265        This method makes a synchronous HTTP request by default. To make an
266        asynchronous HTTP request, please define a `callback` function
267        to be invoked when receiving the response.
268        >>> def callback_function(response):
269        >>>     pprint(response)
270        >>>
271        >>> thread = api.get(account_id, custom_tab_id, callback=callback_function)
272
273        :param callback function: The callback function
274            for asynchronous request. (optional)
275        :param str account_id: The external account number (int) or account ID Guid. (required)
276        :param str custom_tab_id: (required)
277        :return: TabMetadata
278                 If the method is called asynchronously,
279                 returns the request thread.
280        """
281        kwargs['_return_http_data_only'] = True
282        if kwargs.get('callback'):
283            return self.get_with_http_info(account_id, custom_tab_id, **kwargs)
284        else:
285            (data) = self.get_with_http_info(account_id, custom_tab_id, **kwargs)
286            return data
287
288    def get_with_http_info(self, account_id, custom_tab_id, **kwargs):
289        """
290        Gets custom tab information.
291        Retrieves information about the requested custom tab on the specified account.
292        This method makes a synchronous HTTP request by default. To make an
293        asynchronous HTTP request, please define a `callback` function
294        to be invoked when receiving the response.
295        >>> def callback_function(response):
296        >>>     pprint(response)
297        >>>
298        >>> thread = api.get_with_http_info(account_id, custom_tab_id, callback=callback_function)
299
300        :param callback function: The callback function
301            for asynchronous request. (optional)
302        :param str account_id: The external account number (int) or account ID Guid. (required)
303        :param str custom_tab_id: (required)
304        :return: TabMetadata
305                 If the method is called asynchronously,
306                 returns the request thread.
307        """
308
309        all_params = ['account_id', 'custom_tab_id']
310        all_params.append('callback')
311        all_params.append('_return_http_data_only')
312        all_params.append('_preload_content')
313        all_params.append('_request_timeout')
314
315        params = locals()
316        for key, val in iteritems(params['kwargs']):
317            if key not in all_params:
318                raise TypeError(
319                    "Got an unexpected keyword argument '%s'"
320                    " to method get" % key
321                )
322            params[key] = val
323        del params['kwargs']
324        # verify the required parameter 'account_id' is set
325        if ('account_id' not in params) or (params['account_id'] is None):
326            raise ValueError("Missing the required parameter `account_id` when calling `get`")
327        # verify the required parameter 'custom_tab_id' is set
328        if ('custom_tab_id' not in params) or (params['custom_tab_id'] is None):
329            raise ValueError("Missing the required parameter `custom_tab_id` when calling `get`")
330
331
332        collection_formats = {}
333
334        resource_path = '/v2.1/accounts/{accountId}/tab_definitions/{customTabId}'.replace('{format}', 'json')
335        path_params = {}
336        if 'account_id' in params:
337            path_params['accountId'] = params['account_id']
338        if 'custom_tab_id' in params:
339            path_params['customTabId'] = params['custom_tab_id']
340
341        query_params = {}
342
343        header_params = {}
344
345        form_params = []
346        local_var_files = {}
347
348        body_params = None
349        # HTTP header `Accept`
350        header_params['Accept'] = self.api_client.\
351            select_header_accept(['application/json'])
352
353        # Authentication setting
354        auth_settings = []
355
356        return self.api_client.call_api(resource_path, 'GET',
357                                        path_params,
358                                        query_params,
359                                        header_params,
360                                        body=body_params,
361                                        post_params=form_params,
362                                        files=local_var_files,
363                                        response_type='TabMetadata',
364                                        auth_settings=auth_settings,
365                                        callback=params.get('callback'),
366                                        _return_http_data_only=params.get('_return_http_data_only'),
367                                        _preload_content=params.get('_preload_content', True),
368                                        _request_timeout=params.get('_request_timeout'),
369                                        collection_formats=collection_formats)
370
371    def list(self, account_id, **kwargs):
372        """
373        Gets a list of all account tabs.
374        Retrieves a list of all tabs associated with the account.
375        This method makes a synchronous HTTP request by default. To make an
376        asynchronous HTTP request, please define a `callback` function
377        to be invoked when receiving the response.
378        >>> def callback_function(response):
379        >>>     pprint(response)
380        >>>
381        >>> thread = api.list(account_id, callback=callback_function)
382
383        :param callback function: The callback function
384            for asynchronous request. (optional)
385        :param str account_id: The external account number (int) or account ID Guid. (required)
386        :param str custom_tab_only: When set to **true**, only custom tabs are returned in the response. 
387        :return: TabMetadataList
388                 If the method is called asynchronously,
389                 returns the request thread.
390        """
391        kwargs['_return_http_data_only'] = True
392        if kwargs.get('callback'):
393            return self.list_with_http_info(account_id, **kwargs)
394        else:
395            (data) = self.list_with_http_info(account_id, **kwargs)
396            return data
397
398    def list_with_http_info(self, account_id, **kwargs):
399        """
400        Gets a list of all account tabs.
401        Retrieves a list of all tabs associated with the account.
402        This method makes a synchronous HTTP request by default. To make an
403        asynchronous HTTP request, please define a `callback` function
404        to be invoked when receiving the response.
405        >>> def callback_function(response):
406        >>>     pprint(response)
407        >>>
408        >>> thread = api.list_with_http_info(account_id, callback=callback_function)
409
410        :param callback function: The callback function
411            for asynchronous request. (optional)
412        :param str account_id: The external account number (int) or account ID Guid. (required)
413        :param str custom_tab_only: When set to **true**, only custom tabs are returned in the response. 
414        :return: TabMetadataList
415                 If the method is called asynchronously,
416                 returns the request thread.
417        """
418
419        all_params = ['account_id', 'custom_tab_only']
420        all_params.append('callback')
421        all_params.append('_return_http_data_only')
422        all_params.append('_preload_content')
423        all_params.append('_request_timeout')
424
425        params = locals()
426        for key, val in iteritems(params['kwargs']):
427            if key not in all_params:
428                raise TypeError(
429                    "Got an unexpected keyword argument '%s'"
430                    " to method list" % key
431                )
432            params[key] = val
433        del params['kwargs']
434        # verify the required parameter 'account_id' is set
435        if ('account_id' not in params) or (params['account_id'] is None):
436            raise ValueError("Missing the required parameter `account_id` when calling `list`")
437
438
439        collection_formats = {}
440
441        resource_path = '/v2.1/accounts/{accountId}/tab_definitions'.replace('{format}', 'json')
442        path_params = {}
443        if 'account_id' in params:
444            path_params['accountId'] = params['account_id']
445
446        query_params = {}
447        if 'custom_tab_only' in params:
448            query_params['custom_tab_only'] = params['custom_tab_only']
449
450        header_params = {}
451
452        form_params = []
453        local_var_files = {}
454
455        body_params = None
456        # HTTP header `Accept`
457        header_params['Accept'] = self.api_client.\
458            select_header_accept(['application/json'])
459
460        # Authentication setting
461        auth_settings = []
462
463        return self.api_client.call_api(resource_path, 'GET',
464                                        path_params,
465                                        query_params,
466                                        header_params,
467                                        body=body_params,
468                                        post_params=form_params,
469                                        files=local_var_files,
470                                        response_type='TabMetadataList',
471                                        auth_settings=auth_settings,
472                                        callback=params.get('callback'),
473                                        _return_http_data_only=params.get('_return_http_data_only'),
474                                        _preload_content=params.get('_preload_content', True),
475                                        _request_timeout=params.get('_request_timeout'),
476                                        collection_formats=collection_formats)
477
478    def update(self, account_id, custom_tab_id, **kwargs):
479        """
480        Updates custom tab information.  
481        Updates the information in a custom tab for the specified account.
482        This method makes a synchronous HTTP request by default. To make an
483        asynchronous HTTP request, please define a `callback` function
484        to be invoked when receiving the response.
485        >>> def callback_function(response):
486        >>>     pprint(response)
487        >>>
488        >>> thread = api.update(account_id, custom_tab_id, callback=callback_function)
489
490        :param callback function: The callback function
491            for asynchronous request. (optional)
492        :param str account_id: The external account number (int) or account ID Guid. (required)
493        :param str custom_tab_id: (required)
494        :param TabMetadata tab_metadata:
495        :return: TabMetadata
496                 If the method is called asynchronously,
497                 returns the request thread.
498        """
499        kwargs['_return_http_data_only'] = True
500        if kwargs.get('callback'):
501            return self.update_with_http_info(account_id, custom_tab_id, **kwargs)
502        else:
503            (data) = self.update_with_http_info(account_id, custom_tab_id, **kwargs)
504            return data
505
506    def update_with_http_info(self, account_id, custom_tab_id, **kwargs):
507        """
508        Updates custom tab information.  
509        Updates the information in a custom tab for the specified account.
510        This method makes a synchronous HTTP request by default. To make an
511        asynchronous HTTP request, please define a `callback` function
512        to be invoked when receiving the response.
513        >>> def callback_function(response):
514        >>>     pprint(response)
515        >>>
516        >>> thread = api.update_with_http_info(account_id, custom_tab_id, callback=callback_function)
517
518        :param callback function: The callback function
519            for asynchronous request. (optional)
520        :param str account_id: The external account number (int) or account ID Guid. (required)
521        :param str custom_tab_id: (required)
522        :param TabMetadata tab_metadata:
523        :return: TabMetadata
524                 If the method is called asynchronously,
525                 returns the request thread.
526        """
527
528        all_params = ['account_id', 'custom_tab_id', 'tab_metadata']
529        all_params.append('callback')
530        all_params.append('_return_http_data_only')
531        all_params.append('_preload_content')
532        all_params.append('_request_timeout')
533
534        params = locals()
535        for key, val in iteritems(params['kwargs']):
536            if key not in all_params:
537                raise TypeError(
538                    "Got an unexpected keyword argument '%s'"
539                    " to method update" % key
540                )
541            params[key] = val
542        del params['kwargs']
543        # verify the required parameter 'account_id' is set
544        if ('account_id' not in params) or (params['account_id'] is None):
545            raise ValueError("Missing the required parameter `account_id` when calling `update`")
546        # verify the required parameter 'custom_tab_id' is set
547        if ('custom_tab_id' not in params) or (params['custom_tab_id'] is None):
548            raise ValueError("Missing the required parameter `custom_tab_id` when calling `update`")
549
550
551        collection_formats = {}
552
553        resource_path = '/v2.1/accounts/{accountId}/tab_definitions/{customTabId}'.replace('{format}', 'json')
554        path_params = {}
555        if 'account_id' in params:
556            path_params['accountId'] = params['account_id']
557        if 'custom_tab_id' in params:
558            path_params['customTabId'] = params['custom_tab_id']
559
560        query_params = {}
561
562        header_params = {}
563
564        form_params = []
565        local_var_files = {}
566
567        body_params = None
568        if 'tab_metadata' in params:
569            body_params = params['tab_metadata']
570        # HTTP header `Accept`
571        header_params['Accept'] = self.api_client.\
572            select_header_accept(['application/json'])
573
574        # Authentication setting
575        auth_settings = []
576
577        return self.api_client.call_api(resource_path, 'PUT',
578                                        path_params,
579                                        query_params,
580                                        header_params,
581                                        body=body_params,
582                                        post_params=form_params,
583                                        files=local_var_files,
584                                        response_type='TabMetadata',
585                                        auth_settings=auth_settings,
586                                        callback=params.get('callback'),
587                                        _return_http_data_only=params.get('_return_http_data_only'),
588                                        _preload_content=params.get('_preload_content', True),
589                                        _request_timeout=params.get('_request_timeout'),
590                                        collection_formats=collection_formats)

NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen

CustomTabsApi(api_client=None)
35    def __init__(self, api_client=None):
36        config = Configuration()
37        if api_client:
38            self.api_client = api_client
39        else:
40            if not config.api_client:
41                config.api_client = ApiClient()
42            self.api_client = config.api_client
def create(self, account_id, **kwargs)
44    def create(self, account_id, **kwargs):
45        """
46        Creates a custom tab.
47        Creates a tab with pre-defined properties, such as a text tab with a certain font type and validation pattern. Users can access the custom tabs when sending documents through the DocuSign web application.  Custom tabs can be created for approve, checkbox, company, date, date signed, decline, email, email address, envelope ID, first name, formula, full name, initial here, last name, list, note, number, radio, sign here, signer attachment, SSN, text, title, and zip tabs.
48        This method makes a synchronous HTTP request by default. To make an
49        asynchronous HTTP request, please define a `callback` function
50        to be invoked when receiving the response.
51        >>> def callback_function(response):
52        >>>     pprint(response)
53        >>>
54        >>> thread = api.create(account_id, callback=callback_function)
55
56        :param callback function: The callback function
57            for asynchronous request. (optional)
58        :param str account_id: The external account number (int) or account ID Guid. (required)
59        :param TabMetadata tab_metadata:
60        :return: TabMetadata
61                 If the method is called asynchronously,
62                 returns the request thread.
63        """
64        kwargs['_return_http_data_only'] = True
65        if kwargs.get('callback'):
66            return self.create_with_http_info(account_id, **kwargs)
67        else:
68            (data) = self.create_with_http_info(account_id, **kwargs)
69            return data

Creates a custom tab. Creates a tab with pre-defined properties, such as a text tab with a certain font type and validation pattern. Users can access the custom tabs when sending documents through the DocuSign web application. Custom tabs can be created for approve, checkbox, company, date, date signed, decline, email, email address, envelope ID, first name, formula, full name, initial here, last name, list, note, number, radio, sign here, signer attachment, SSN, text, title, and zip tabs. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create(account_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • TabMetadata tab_metadata:
Returns

TabMetadata If the method is called asynchronously, returns the request thread.

def create_with_http_info(self, account_id, **kwargs)
 71    def create_with_http_info(self, account_id, **kwargs):
 72        """
 73        Creates a custom tab.
 74        Creates a tab with pre-defined properties, such as a text tab with a certain font type and validation pattern. Users can access the custom tabs when sending documents through the DocuSign web application.  Custom tabs can be created for approve, checkbox, company, date, date signed, decline, email, email address, envelope ID, first name, formula, full name, initial here, last name, list, note, number, radio, sign here, signer attachment, SSN, text, title, and zip tabs.
 75        This method makes a synchronous HTTP request by default. To make an
 76        asynchronous HTTP request, please define a `callback` function
 77        to be invoked when receiving the response.
 78        >>> def callback_function(response):
 79        >>>     pprint(response)
 80        >>>
 81        >>> thread = api.create_with_http_info(account_id, callback=callback_function)
 82
 83        :param callback function: The callback function
 84            for asynchronous request. (optional)
 85        :param str account_id: The external account number (int) or account ID Guid. (required)
 86        :param TabMetadata tab_metadata:
 87        :return: TabMetadata
 88                 If the method is called asynchronously,
 89                 returns the request thread.
 90        """
 91
 92        all_params = ['account_id', 'tab_metadata']
 93        all_params.append('callback')
 94        all_params.append('_return_http_data_only')
 95        all_params.append('_preload_content')
 96        all_params.append('_request_timeout')
 97
 98        params = locals()
 99        for key, val in iteritems(params['kwargs']):
100            if key not in all_params:
101                raise TypeError(
102                    "Got an unexpected keyword argument '%s'"
103                    " to method create" % key
104                )
105            params[key] = val
106        del params['kwargs']
107        # verify the required parameter 'account_id' is set
108        if ('account_id' not in params) or (params['account_id'] is None):
109            raise ValueError("Missing the required parameter `account_id` when calling `create`")
110
111
112        collection_formats = {}
113
114        resource_path = '/v2.1/accounts/{accountId}/tab_definitions'.replace('{format}', 'json')
115        path_params = {}
116        if 'account_id' in params:
117            path_params['accountId'] = params['account_id']
118
119        query_params = {}
120
121        header_params = {}
122
123        form_params = []
124        local_var_files = {}
125
126        body_params = None
127        if 'tab_metadata' in params:
128            body_params = params['tab_metadata']
129        # HTTP header `Accept`
130        header_params['Accept'] = self.api_client.\
131            select_header_accept(['application/json'])
132
133        # Authentication setting
134        auth_settings = []
135
136        return self.api_client.call_api(resource_path, 'POST',
137                                        path_params,
138                                        query_params,
139                                        header_params,
140                                        body=body_params,
141                                        post_params=form_params,
142                                        files=local_var_files,
143                                        response_type='TabMetadata',
144                                        auth_settings=auth_settings,
145                                        callback=params.get('callback'),
146                                        _return_http_data_only=params.get('_return_http_data_only'),
147                                        _preload_content=params.get('_preload_content', True),
148                                        _request_timeout=params.get('_request_timeout'),
149                                        collection_formats=collection_formats)

Creates a custom tab. Creates a tab with pre-defined properties, such as a text tab with a certain font type and validation pattern. Users can access the custom tabs when sending documents through the DocuSign web application. Custom tabs can be created for approve, checkbox, company, date, date signed, decline, email, email address, envelope ID, first name, formula, full name, initial here, last name, list, note, number, radio, sign here, signer attachment, SSN, text, title, and zip tabs. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_with_http_info(account_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • TabMetadata tab_metadata:
Returns

TabMetadata If the method is called asynchronously, returns the request thread.

def delete(self, account_id, custom_tab_id, **kwargs)
151    def delete(self, account_id, custom_tab_id, **kwargs):
152        """
153        Deletes custom tab information.
154        Deletes the custom from the specified account.
155        This method makes a synchronous HTTP request by default. To make an
156        asynchronous HTTP request, please define a `callback` function
157        to be invoked when receiving the response.
158        >>> def callback_function(response):
159        >>>     pprint(response)
160        >>>
161        >>> thread = api.delete(account_id, custom_tab_id, callback=callback_function)
162
163        :param callback function: The callback function
164            for asynchronous request. (optional)
165        :param str account_id: The external account number (int) or account ID Guid. (required)
166        :param str custom_tab_id: (required)
167        :return: None
168                 If the method is called asynchronously,
169                 returns the request thread.
170        """
171        kwargs['_return_http_data_only'] = True
172        if kwargs.get('callback'):
173            return self.delete_with_http_info(account_id, custom_tab_id, **kwargs)
174        else:
175            (data) = self.delete_with_http_info(account_id, custom_tab_id, **kwargs)
176            return data

Deletes custom tab information. Deletes the custom from the specified account. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete(account_id, custom_tab_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str custom_tab_id: (required)
Returns

None If the method is called asynchronously, returns the request thread.

def delete_with_http_info(self, account_id, custom_tab_id, **kwargs)
178    def delete_with_http_info(self, account_id, custom_tab_id, **kwargs):
179        """
180        Deletes custom tab information.
181        Deletes the custom from the specified account.
182        This method makes a synchronous HTTP request by default. To make an
183        asynchronous HTTP request, please define a `callback` function
184        to be invoked when receiving the response.
185        >>> def callback_function(response):
186        >>>     pprint(response)
187        >>>
188        >>> thread = api.delete_with_http_info(account_id, custom_tab_id, callback=callback_function)
189
190        :param callback function: The callback function
191            for asynchronous request. (optional)
192        :param str account_id: The external account number (int) or account ID Guid. (required)
193        :param str custom_tab_id: (required)
194        :return: None
195                 If the method is called asynchronously,
196                 returns the request thread.
197        """
198
199        all_params = ['account_id', 'custom_tab_id']
200        all_params.append('callback')
201        all_params.append('_return_http_data_only')
202        all_params.append('_preload_content')
203        all_params.append('_request_timeout')
204
205        params = locals()
206        for key, val in iteritems(params['kwargs']):
207            if key not in all_params:
208                raise TypeError(
209                    "Got an unexpected keyword argument '%s'"
210                    " to method delete" % key
211                )
212            params[key] = val
213        del params['kwargs']
214        # verify the required parameter 'account_id' is set
215        if ('account_id' not in params) or (params['account_id'] is None):
216            raise ValueError("Missing the required parameter `account_id` when calling `delete`")
217        # verify the required parameter 'custom_tab_id' is set
218        if ('custom_tab_id' not in params) or (params['custom_tab_id'] is None):
219            raise ValueError("Missing the required parameter `custom_tab_id` when calling `delete`")
220
221
222        collection_formats = {}
223
224        resource_path = '/v2.1/accounts/{accountId}/tab_definitions/{customTabId}'.replace('{format}', 'json')
225        path_params = {}
226        if 'account_id' in params:
227            path_params['accountId'] = params['account_id']
228        if 'custom_tab_id' in params:
229            path_params['customTabId'] = params['custom_tab_id']
230
231        query_params = {}
232
233        header_params = {}
234
235        form_params = []
236        local_var_files = {}
237
238        body_params = None
239        # HTTP header `Accept`
240        header_params['Accept'] = self.api_client.\
241            select_header_accept(['application/json'])
242
243        # Authentication setting
244        auth_settings = []
245
246        return self.api_client.call_api(resource_path, 'DELETE',
247                                        path_params,
248                                        query_params,
249                                        header_params,
250                                        body=body_params,
251                                        post_params=form_params,
252                                        files=local_var_files,
253                                        response_type=None,
254                                        auth_settings=auth_settings,
255                                        callback=params.get('callback'),
256                                        _return_http_data_only=params.get('_return_http_data_only'),
257                                        _preload_content=params.get('_preload_content', True),
258                                        _request_timeout=params.get('_request_timeout'),
259                                        collection_formats=collection_formats)

Deletes custom tab information. Deletes the custom from the specified account. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_with_http_info(account_id, custom_tab_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str custom_tab_id: (required)
Returns

None If the method is called asynchronously, returns the request thread.

def get(self, account_id, custom_tab_id, **kwargs)
261    def get(self, account_id, custom_tab_id, **kwargs):
262        """
263        Gets custom tab information.
264        Retrieves information about the requested custom tab on the specified account.
265        This method makes a synchronous HTTP request by default. To make an
266        asynchronous HTTP request, please define a `callback` function
267        to be invoked when receiving the response.
268        >>> def callback_function(response):
269        >>>     pprint(response)
270        >>>
271        >>> thread = api.get(account_id, custom_tab_id, callback=callback_function)
272
273        :param callback function: The callback function
274            for asynchronous request. (optional)
275        :param str account_id: The external account number (int) or account ID Guid. (required)
276        :param str custom_tab_id: (required)
277        :return: TabMetadata
278                 If the method is called asynchronously,
279                 returns the request thread.
280        """
281        kwargs['_return_http_data_only'] = True
282        if kwargs.get('callback'):
283            return self.get_with_http_info(account_id, custom_tab_id, **kwargs)
284        else:
285            (data) = self.get_with_http_info(account_id, custom_tab_id, **kwargs)
286            return data

Gets custom tab information. Retrieves information about the requested custom tab on the specified account. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get(account_id, custom_tab_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str custom_tab_id: (required)
Returns

TabMetadata If the method is called asynchronously, returns the request thread.

def get_with_http_info(self, account_id, custom_tab_id, **kwargs)
288    def get_with_http_info(self, account_id, custom_tab_id, **kwargs):
289        """
290        Gets custom tab information.
291        Retrieves information about the requested custom tab on the specified account.
292        This method makes a synchronous HTTP request by default. To make an
293        asynchronous HTTP request, please define a `callback` function
294        to be invoked when receiving the response.
295        >>> def callback_function(response):
296        >>>     pprint(response)
297        >>>
298        >>> thread = api.get_with_http_info(account_id, custom_tab_id, callback=callback_function)
299
300        :param callback function: The callback function
301            for asynchronous request. (optional)
302        :param str account_id: The external account number (int) or account ID Guid. (required)
303        :param str custom_tab_id: (required)
304        :return: TabMetadata
305                 If the method is called asynchronously,
306                 returns the request thread.
307        """
308
309        all_params = ['account_id', 'custom_tab_id']
310        all_params.append('callback')
311        all_params.append('_return_http_data_only')
312        all_params.append('_preload_content')
313        all_params.append('_request_timeout')
314
315        params = locals()
316        for key, val in iteritems(params['kwargs']):
317            if key not in all_params:
318                raise TypeError(
319                    "Got an unexpected keyword argument '%s'"
320                    " to method get" % key
321                )
322            params[key] = val
323        del params['kwargs']
324        # verify the required parameter 'account_id' is set
325        if ('account_id' not in params) or (params['account_id'] is None):
326            raise ValueError("Missing the required parameter `account_id` when calling `get`")
327        # verify the required parameter 'custom_tab_id' is set
328        if ('custom_tab_id' not in params) or (params['custom_tab_id'] is None):
329            raise ValueError("Missing the required parameter `custom_tab_id` when calling `get`")
330
331
332        collection_formats = {}
333
334        resource_path = '/v2.1/accounts/{accountId}/tab_definitions/{customTabId}'.replace('{format}', 'json')
335        path_params = {}
336        if 'account_id' in params:
337            path_params['accountId'] = params['account_id']
338        if 'custom_tab_id' in params:
339            path_params['customTabId'] = params['custom_tab_id']
340
341        query_params = {}
342
343        header_params = {}
344
345        form_params = []
346        local_var_files = {}
347
348        body_params = None
349        # HTTP header `Accept`
350        header_params['Accept'] = self.api_client.\
351            select_header_accept(['application/json'])
352
353        # Authentication setting
354        auth_settings = []
355
356        return self.api_client.call_api(resource_path, 'GET',
357                                        path_params,
358                                        query_params,
359                                        header_params,
360                                        body=body_params,
361                                        post_params=form_params,
362                                        files=local_var_files,
363                                        response_type='TabMetadata',
364                                        auth_settings=auth_settings,
365                                        callback=params.get('callback'),
366                                        _return_http_data_only=params.get('_return_http_data_only'),
367                                        _preload_content=params.get('_preload_content', True),
368                                        _request_timeout=params.get('_request_timeout'),
369                                        collection_formats=collection_formats)

Gets custom tab information. Retrieves information about the requested custom tab on the specified account. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_with_http_info(account_id, custom_tab_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str custom_tab_id: (required)
Returns

TabMetadata If the method is called asynchronously, returns the request thread.

def list(self, account_id, **kwargs)
371    def list(self, account_id, **kwargs):
372        """
373        Gets a list of all account tabs.
374        Retrieves a list of all tabs associated with the account.
375        This method makes a synchronous HTTP request by default. To make an
376        asynchronous HTTP request, please define a `callback` function
377        to be invoked when receiving the response.
378        >>> def callback_function(response):
379        >>>     pprint(response)
380        >>>
381        >>> thread = api.list(account_id, callback=callback_function)
382
383        :param callback function: The callback function
384            for asynchronous request. (optional)
385        :param str account_id: The external account number (int) or account ID Guid. (required)
386        :param str custom_tab_only: When set to **true**, only custom tabs are returned in the response. 
387        :return: TabMetadataList
388                 If the method is called asynchronously,
389                 returns the request thread.
390        """
391        kwargs['_return_http_data_only'] = True
392        if kwargs.get('callback'):
393            return self.list_with_http_info(account_id, **kwargs)
394        else:
395            (data) = self.list_with_http_info(account_id, **kwargs)
396            return data

Gets a list of all account tabs. Retrieves a list of all tabs associated with the account. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.list(account_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str custom_tab_only: When set to true, only custom tabs are returned in the response.
Returns

TabMetadataList If the method is called asynchronously, returns the request thread.

def list_with_http_info(self, account_id, **kwargs)
398    def list_with_http_info(self, account_id, **kwargs):
399        """
400        Gets a list of all account tabs.
401        Retrieves a list of all tabs associated with the account.
402        This method makes a synchronous HTTP request by default. To make an
403        asynchronous HTTP request, please define a `callback` function
404        to be invoked when receiving the response.
405        >>> def callback_function(response):
406        >>>     pprint(response)
407        >>>
408        >>> thread = api.list_with_http_info(account_id, callback=callback_function)
409
410        :param callback function: The callback function
411            for asynchronous request. (optional)
412        :param str account_id: The external account number (int) or account ID Guid. (required)
413        :param str custom_tab_only: When set to **true**, only custom tabs are returned in the response. 
414        :return: TabMetadataList
415                 If the method is called asynchronously,
416                 returns the request thread.
417        """
418
419        all_params = ['account_id', 'custom_tab_only']
420        all_params.append('callback')
421        all_params.append('_return_http_data_only')
422        all_params.append('_preload_content')
423        all_params.append('_request_timeout')
424
425        params = locals()
426        for key, val in iteritems(params['kwargs']):
427            if key not in all_params:
428                raise TypeError(
429                    "Got an unexpected keyword argument '%s'"
430                    " to method list" % key
431                )
432            params[key] = val
433        del params['kwargs']
434        # verify the required parameter 'account_id' is set
435        if ('account_id' not in params) or (params['account_id'] is None):
436            raise ValueError("Missing the required parameter `account_id` when calling `list`")
437
438
439        collection_formats = {}
440
441        resource_path = '/v2.1/accounts/{accountId}/tab_definitions'.replace('{format}', 'json')
442        path_params = {}
443        if 'account_id' in params:
444            path_params['accountId'] = params['account_id']
445
446        query_params = {}
447        if 'custom_tab_only' in params:
448            query_params['custom_tab_only'] = params['custom_tab_only']
449
450        header_params = {}
451
452        form_params = []
453        local_var_files = {}
454
455        body_params = None
456        # HTTP header `Accept`
457        header_params['Accept'] = self.api_client.\
458            select_header_accept(['application/json'])
459
460        # Authentication setting
461        auth_settings = []
462
463        return self.api_client.call_api(resource_path, 'GET',
464                                        path_params,
465                                        query_params,
466                                        header_params,
467                                        body=body_params,
468                                        post_params=form_params,
469                                        files=local_var_files,
470                                        response_type='TabMetadataList',
471                                        auth_settings=auth_settings,
472                                        callback=params.get('callback'),
473                                        _return_http_data_only=params.get('_return_http_data_only'),
474                                        _preload_content=params.get('_preload_content', True),
475                                        _request_timeout=params.get('_request_timeout'),
476                                        collection_formats=collection_formats)

Gets a list of all account tabs. Retrieves a list of all tabs associated with the account. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.list_with_http_info(account_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str custom_tab_only: When set to true, only custom tabs are returned in the response.
Returns

TabMetadataList If the method is called asynchronously, returns the request thread.

def update(self, account_id, custom_tab_id, **kwargs)
478    def update(self, account_id, custom_tab_id, **kwargs):
479        """
480        Updates custom tab information.  
481        Updates the information in a custom tab for the specified account.
482        This method makes a synchronous HTTP request by default. To make an
483        asynchronous HTTP request, please define a `callback` function
484        to be invoked when receiving the response.
485        >>> def callback_function(response):
486        >>>     pprint(response)
487        >>>
488        >>> thread = api.update(account_id, custom_tab_id, callback=callback_function)
489
490        :param callback function: The callback function
491            for asynchronous request. (optional)
492        :param str account_id: The external account number (int) or account ID Guid. (required)
493        :param str custom_tab_id: (required)
494        :param TabMetadata tab_metadata:
495        :return: TabMetadata
496                 If the method is called asynchronously,
497                 returns the request thread.
498        """
499        kwargs['_return_http_data_only'] = True
500        if kwargs.get('callback'):
501            return self.update_with_http_info(account_id, custom_tab_id, **kwargs)
502        else:
503            (data) = self.update_with_http_info(account_id, custom_tab_id, **kwargs)
504            return data

Updates custom tab information.
Updates the information in a custom tab for the specified account. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update(account_id, custom_tab_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str custom_tab_id: (required)
  • TabMetadata tab_metadata:
Returns

TabMetadata If the method is called asynchronously, returns the request thread.

def update_with_http_info(self, account_id, custom_tab_id, **kwargs)
506    def update_with_http_info(self, account_id, custom_tab_id, **kwargs):
507        """
508        Updates custom tab information.  
509        Updates the information in a custom tab for the specified account.
510        This method makes a synchronous HTTP request by default. To make an
511        asynchronous HTTP request, please define a `callback` function
512        to be invoked when receiving the response.
513        >>> def callback_function(response):
514        >>>     pprint(response)
515        >>>
516        >>> thread = api.update_with_http_info(account_id, custom_tab_id, callback=callback_function)
517
518        :param callback function: The callback function
519            for asynchronous request. (optional)
520        :param str account_id: The external account number (int) or account ID Guid. (required)
521        :param str custom_tab_id: (required)
522        :param TabMetadata tab_metadata:
523        :return: TabMetadata
524                 If the method is called asynchronously,
525                 returns the request thread.
526        """
527
528        all_params = ['account_id', 'custom_tab_id', 'tab_metadata']
529        all_params.append('callback')
530        all_params.append('_return_http_data_only')
531        all_params.append('_preload_content')
532        all_params.append('_request_timeout')
533
534        params = locals()
535        for key, val in iteritems(params['kwargs']):
536            if key not in all_params:
537                raise TypeError(
538                    "Got an unexpected keyword argument '%s'"
539                    " to method update" % key
540                )
541            params[key] = val
542        del params['kwargs']
543        # verify the required parameter 'account_id' is set
544        if ('account_id' not in params) or (params['account_id'] is None):
545            raise ValueError("Missing the required parameter `account_id` when calling `update`")
546        # verify the required parameter 'custom_tab_id' is set
547        if ('custom_tab_id' not in params) or (params['custom_tab_id'] is None):
548            raise ValueError("Missing the required parameter `custom_tab_id` when calling `update`")
549
550
551        collection_formats = {}
552
553        resource_path = '/v2.1/accounts/{accountId}/tab_definitions/{customTabId}'.replace('{format}', 'json')
554        path_params = {}
555        if 'account_id' in params:
556            path_params['accountId'] = params['account_id']
557        if 'custom_tab_id' in params:
558            path_params['customTabId'] = params['custom_tab_id']
559
560        query_params = {}
561
562        header_params = {}
563
564        form_params = []
565        local_var_files = {}
566
567        body_params = None
568        if 'tab_metadata' in params:
569            body_params = params['tab_metadata']
570        # HTTP header `Accept`
571        header_params['Accept'] = self.api_client.\
572            select_header_accept(['application/json'])
573
574        # Authentication setting
575        auth_settings = []
576
577        return self.api_client.call_api(resource_path, 'PUT',
578                                        path_params,
579                                        query_params,
580                                        header_params,
581                                        body=body_params,
582                                        post_params=form_params,
583                                        files=local_var_files,
584                                        response_type='TabMetadata',
585                                        auth_settings=auth_settings,
586                                        callback=params.get('callback'),
587                                        _return_http_data_only=params.get('_return_http_data_only'),
588                                        _preload_content=params.get('_preload_content', True),
589                                        _request_timeout=params.get('_request_timeout'),
590                                        collection_formats=collection_formats)

Updates custom tab information.
Updates the information in a custom tab for the specified account. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update_with_http_info(account_id, custom_tab_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str custom_tab_id: (required)
  • TabMetadata tab_metadata:
Returns

TabMetadata If the method is called asynchronously, returns the request thread.