|
| 1 | +# coding: utf-8 |
| 2 | + |
| 3 | +""" |
| 4 | + DocuSign REST API |
| 5 | +
|
| 6 | + The DocuSign 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 | + |
| 10 | + Generated by: https://github.com/swagger-api/swagger-codegen.git |
| 11 | +""" |
| 12 | + |
| 13 | + |
| 14 | +from __future__ import absolute_import |
| 15 | + |
| 16 | +import sys |
| 17 | +import os |
| 18 | +import re |
| 19 | + |
| 20 | +# python 2 and python 3 compatibility library |
| 21 | +from six import iteritems |
| 22 | + |
| 23 | +from ..client.configuration import Configuration |
| 24 | +from ..client.api_client import ApiClient |
| 25 | + |
| 26 | + |
| 27 | +class TrustServiceProvidersApi(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 get_seal_providers(self, account_id, **kwargs): |
| 44 | + """ |
| 45 | + Returns Account available seals for specified account. |
| 46 | + This method makes a synchronous HTTP request by default. To make an |
| 47 | + asynchronous HTTP request, please define a `callback` function |
| 48 | + to be invoked when receiving the response. |
| 49 | + >>> def callback_function(response): |
| 50 | + >>> pprint(response) |
| 51 | + >>> |
| 52 | + >>> thread = api.get_seal_providers(account_id, callback=callback_function) |
| 53 | +
|
| 54 | + :param callback function: The callback function |
| 55 | + for asynchronous request. (optional) |
| 56 | + :param str account_id: The external account number (int) or account ID Guid. (required) |
| 57 | + :return: AccountSeals |
| 58 | + If the method is called asynchronously, |
| 59 | + returns the request thread. |
| 60 | + """ |
| 61 | + kwargs['_return_http_data_only'] = True |
| 62 | + if kwargs.get('callback'): |
| 63 | + return self.get_seal_providers_with_http_info(account_id, **kwargs) |
| 64 | + else: |
| 65 | + (data) = self.get_seal_providers_with_http_info(account_id, **kwargs) |
| 66 | + return data |
| 67 | + |
| 68 | + def get_seal_providers_with_http_info(self, account_id, **kwargs): |
| 69 | + """ |
| 70 | + Returns Account available seals for specified account. |
| 71 | + This method makes a synchronous HTTP request by default. To make an |
| 72 | + asynchronous HTTP request, please define a `callback` function |
| 73 | + to be invoked when receiving the response. |
| 74 | + >>> def callback_function(response): |
| 75 | + >>> pprint(response) |
| 76 | + >>> |
| 77 | + >>> thread = api.get_seal_providers_with_http_info(account_id, callback=callback_function) |
| 78 | +
|
| 79 | + :param callback function: The callback function |
| 80 | + for asynchronous request. (optional) |
| 81 | + :param str account_id: The external account number (int) or account ID Guid. (required) |
| 82 | + :return: AccountSeals |
| 83 | + If the method is called asynchronously, |
| 84 | + returns the request thread. |
| 85 | + """ |
| 86 | + |
| 87 | + all_params = ['account_id'] |
| 88 | + all_params.append('callback') |
| 89 | + all_params.append('_return_http_data_only') |
| 90 | + all_params.append('_preload_content') |
| 91 | + all_params.append('_request_timeout') |
| 92 | + |
| 93 | + params = locals() |
| 94 | + for key, val in iteritems(params['kwargs']): |
| 95 | + if key not in all_params: |
| 96 | + raise TypeError( |
| 97 | + "Got an unexpected keyword argument '%s'" |
| 98 | + " to method get_seal_providers" % key |
| 99 | + ) |
| 100 | + params[key] = val |
| 101 | + del params['kwargs'] |
| 102 | + # verify the required parameter 'account_id' is set |
| 103 | + if ('account_id' not in params) or (params['account_id'] is None): |
| 104 | + raise ValueError("Missing the required parameter `account_id` when calling `get_seal_providers`") |
| 105 | + |
| 106 | + |
| 107 | + collection_formats = {} |
| 108 | + |
| 109 | + resource_path = '/v2.1/accounts/{accountId}/seals'.replace('{format}', 'json') |
| 110 | + path_params = {} |
| 111 | + if 'account_id' in params: |
| 112 | + path_params['accountId'] = params['account_id'] |
| 113 | + |
| 114 | + query_params = {} |
| 115 | + |
| 116 | + header_params = {} |
| 117 | + |
| 118 | + form_params = [] |
| 119 | + local_var_files = {} |
| 120 | + |
| 121 | + body_params = None |
| 122 | + # HTTP header `Accept` |
| 123 | + header_params['Accept'] = self.api_client.\ |
| 124 | + select_header_accept(['application/json']) |
| 125 | + |
| 126 | + # Authentication setting |
| 127 | + auth_settings = [] |
| 128 | + |
| 129 | + return self.api_client.call_api(resource_path, 'GET', |
| 130 | + path_params, |
| 131 | + query_params, |
| 132 | + header_params, |
| 133 | + body=body_params, |
| 134 | + post_params=form_params, |
| 135 | + files=local_var_files, |
| 136 | + response_type='AccountSeals', |
| 137 | + auth_settings=auth_settings, |
| 138 | + callback=params.get('callback'), |
| 139 | + _return_http_data_only=params.get('_return_http_data_only'), |
| 140 | + _preload_content=params.get('_preload_content', True), |
| 141 | + _request_timeout=params.get('_request_timeout'), |
| 142 | + collection_formats=collection_formats) |
0 commit comments