docusign_esign.apis.organizations_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 OrganizationsApi(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_report_v2(self, organization_id, report_correlation_id, **kwargs): 44 """ 45 Retrieves org level report by correlation id and site. 46 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.get_report_v2(organization_id, report_correlation_id, callback=callback_function) 54 55 :param callback function: The callback function 56 for asynchronous request. (optional) 57 :param str organization_id: (required) 58 :param str report_correlation_id: (required) 59 :return: None 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.get_report_v2_with_http_info(organization_id, report_correlation_id, **kwargs) 66 else: 67 (data) = self.get_report_v2_with_http_info(organization_id, report_correlation_id, **kwargs) 68 return data 69 70 def get_report_v2_with_http_info(self, organization_id, report_correlation_id, **kwargs): 71 """ 72 Retrieves org level report by correlation id and site. 73 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.get_report_v2_with_http_info(organization_id, report_correlation_id, callback=callback_function) 81 82 :param callback function: The callback function 83 for asynchronous request. (optional) 84 :param str organization_id: (required) 85 :param str report_correlation_id: (required) 86 :return: None 87 If the method is called asynchronously, 88 returns the request thread. 89 """ 90 91 all_params = ['organization_id', 'report_correlation_id'] 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 get_report_v2" % key 103 ) 104 params[key] = val 105 del params['kwargs'] 106 # verify the required parameter 'organization_id' is set 107 if ('organization_id' not in params) or (params['organization_id'] is None): 108 raise ValueError("Missing the required parameter `organization_id` when calling `get_report_v2`") 109 # verify the required parameter 'report_correlation_id' is set 110 if ('report_correlation_id' not in params) or (params['report_correlation_id'] is None): 111 raise ValueError("Missing the required parameter `report_correlation_id` when calling `get_report_v2`") 112 113 114 collection_formats = {} 115 116 resource_path = '/v2.1/organization_reporting/{organizationId}/reportsv2/{reportCorrelationId}'.replace('{format}', 'json') 117 path_params = {} 118 if 'organization_id' in params: 119 path_params['organizationId'] = params['organization_id'] 120 if 'report_correlation_id' in params: 121 path_params['reportCorrelationId'] = params['report_correlation_id'] 122 123 query_params = {} 124 125 header_params = {} 126 127 form_params = [] 128 local_var_files = {} 129 130 body_params = None 131 # HTTP header `Accept` 132 header_params['Accept'] = self.api_client.\ 133 select_header_accept(['application/json']) 134 135 # Authentication setting 136 auth_settings = [] 137 138 return self.api_client.call_api(resource_path, 'GET', 139 path_params, 140 query_params, 141 header_params, 142 body=body_params, 143 post_params=form_params, 144 files=local_var_files, 145 response_type=None, 146 auth_settings=auth_settings, 147 callback=params.get('callback'), 148 _return_http_data_only=params.get('_return_http_data_only'), 149 _preload_content=params.get('_preload_content', True), 150 _request_timeout=params.get('_request_timeout'), 151 collection_formats=collection_formats)
28class OrganizationsApi(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 get_report_v2(self, organization_id, report_correlation_id, **kwargs): 45 """ 46 Retrieves org level report by correlation id and site. 47 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.get_report_v2(organization_id, report_correlation_id, callback=callback_function) 55 56 :param callback function: The callback function 57 for asynchronous request. (optional) 58 :param str organization_id: (required) 59 :param str report_correlation_id: (required) 60 :return: None 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.get_report_v2_with_http_info(organization_id, report_correlation_id, **kwargs) 67 else: 68 (data) = self.get_report_v2_with_http_info(organization_id, report_correlation_id, **kwargs) 69 return data 70 71 def get_report_v2_with_http_info(self, organization_id, report_correlation_id, **kwargs): 72 """ 73 Retrieves org level report by correlation id and site. 74 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.get_report_v2_with_http_info(organization_id, report_correlation_id, callback=callback_function) 82 83 :param callback function: The callback function 84 for asynchronous request. (optional) 85 :param str organization_id: (required) 86 :param str report_correlation_id: (required) 87 :return: None 88 If the method is called asynchronously, 89 returns the request thread. 90 """ 91 92 all_params = ['organization_id', 'report_correlation_id'] 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 get_report_v2" % key 104 ) 105 params[key] = val 106 del params['kwargs'] 107 # verify the required parameter 'organization_id' is set 108 if ('organization_id' not in params) or (params['organization_id'] is None): 109 raise ValueError("Missing the required parameter `organization_id` when calling `get_report_v2`") 110 # verify the required parameter 'report_correlation_id' is set 111 if ('report_correlation_id' not in params) or (params['report_correlation_id'] is None): 112 raise ValueError("Missing the required parameter `report_correlation_id` when calling `get_report_v2`") 113 114 115 collection_formats = {} 116 117 resource_path = '/v2.1/organization_reporting/{organizationId}/reportsv2/{reportCorrelationId}'.replace('{format}', 'json') 118 path_params = {} 119 if 'organization_id' in params: 120 path_params['organizationId'] = params['organization_id'] 121 if 'report_correlation_id' in params: 122 path_params['reportCorrelationId'] = params['report_correlation_id'] 123 124 query_params = {} 125 126 header_params = {} 127 128 form_params = [] 129 local_var_files = {} 130 131 body_params = None 132 # HTTP header `Accept` 133 header_params['Accept'] = self.api_client.\ 134 select_header_accept(['application/json']) 135 136 # Authentication setting 137 auth_settings = [] 138 139 return self.api_client.call_api(resource_path, 'GET', 140 path_params, 141 query_params, 142 header_params, 143 body=body_params, 144 post_params=form_params, 145 files=local_var_files, 146 response_type=None, 147 auth_settings=auth_settings, 148 callback=params.get('callback'), 149 _return_http_data_only=params.get('_return_http_data_only'), 150 _preload_content=params.get('_preload_content', True), 151 _request_timeout=params.get('_request_timeout'), 152 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
44 def get_report_v2(self, organization_id, report_correlation_id, **kwargs): 45 """ 46 Retrieves org level report by correlation id and site. 47 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.get_report_v2(organization_id, report_correlation_id, callback=callback_function) 55 56 :param callback function: The callback function 57 for asynchronous request. (optional) 58 :param str organization_id: (required) 59 :param str report_correlation_id: (required) 60 :return: None 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.get_report_v2_with_http_info(organization_id, report_correlation_id, **kwargs) 67 else: 68 (data) = self.get_report_v2_with_http_info(organization_id, report_correlation_id, **kwargs) 69 return data
Retrieves org level report by correlation id and site.
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_report_v2(organization_id, report_correlation_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str organization_id: (required)
- str report_correlation_id: (required)
Returns
None If the method is called asynchronously, returns the request thread.
71 def get_report_v2_with_http_info(self, organization_id, report_correlation_id, **kwargs): 72 """ 73 Retrieves org level report by correlation id and site. 74 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.get_report_v2_with_http_info(organization_id, report_correlation_id, callback=callback_function) 82 83 :param callback function: The callback function 84 for asynchronous request. (optional) 85 :param str organization_id: (required) 86 :param str report_correlation_id: (required) 87 :return: None 88 If the method is called asynchronously, 89 returns the request thread. 90 """ 91 92 all_params = ['organization_id', 'report_correlation_id'] 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 get_report_v2" % key 104 ) 105 params[key] = val 106 del params['kwargs'] 107 # verify the required parameter 'organization_id' is set 108 if ('organization_id' not in params) or (params['organization_id'] is None): 109 raise ValueError("Missing the required parameter `organization_id` when calling `get_report_v2`") 110 # verify the required parameter 'report_correlation_id' is set 111 if ('report_correlation_id' not in params) or (params['report_correlation_id'] is None): 112 raise ValueError("Missing the required parameter `report_correlation_id` when calling `get_report_v2`") 113 114 115 collection_formats = {} 116 117 resource_path = '/v2.1/organization_reporting/{organizationId}/reportsv2/{reportCorrelationId}'.replace('{format}', 'json') 118 path_params = {} 119 if 'organization_id' in params: 120 path_params['organizationId'] = params['organization_id'] 121 if 'report_correlation_id' in params: 122 path_params['reportCorrelationId'] = params['report_correlation_id'] 123 124 query_params = {} 125 126 header_params = {} 127 128 form_params = [] 129 local_var_files = {} 130 131 body_params = None 132 # HTTP header `Accept` 133 header_params['Accept'] = self.api_client.\ 134 select_header_accept(['application/json']) 135 136 # Authentication setting 137 auth_settings = [] 138 139 return self.api_client.call_api(resource_path, 'GET', 140 path_params, 141 query_params, 142 header_params, 143 body=body_params, 144 post_params=form_params, 145 files=local_var_files, 146 response_type=None, 147 auth_settings=auth_settings, 148 callback=params.get('callback'), 149 _return_http_data_only=params.get('_return_http_data_only'), 150 _preload_content=params.get('_preload_content', True), 151 _request_timeout=params.get('_request_timeout'), 152 collection_formats=collection_formats)
Retrieves org level report by correlation id and site.
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_report_v2_with_http_info(organization_id, report_correlation_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str organization_id: (required)
- str report_correlation_id: (required)
Returns
None If the method is called asynchronously, returns the request thread.