@@ -2004,6 +2004,118 @@ def create_envelope_workflow_step_definition_with_http_info(self, account_id, en
20042004 _request_timeout=params.get('_request_timeout'),
20052005 collection_formats=collection_formats)
20062006
2007+ def create_envelopes_shares(self, account_id, envelope_id, **kwargs):
2008+ """
2009+ Creates new envelopes shares
2010+ This method makes a synchronous HTTP request by default. To make an
2011+ asynchronous HTTP request, please define a `callback` function
2012+ to be invoked when receiving the response.
2013+ >>> def callback_function(response):
2014+ >>> pprint(response)
2015+ >>>
2016+ >>> thread = api.create_envelopes_shares(account_id, envelope_id, callback=callback_function)
2017+
2018+ :param callback function: The callback function
2019+ for asynchronous request. (optional)
2020+ :param str account_id: The external account number (int) or account ID Guid. (required)
2021+ :param str envelope_id: The envelopeId Guid of the envelope being accessed. (required)
2022+ :param EnvelopesSharesRequest envelopes_shares_request:
2023+ :return: EnvelopesSharesResponse
2024+ If the method is called asynchronously,
2025+ returns the request thread.
2026+ """
2027+ kwargs['_return_http_data_only'] = True
2028+ if kwargs.get('callback'):
2029+ return self.create_envelopes_shares_with_http_info(account_id, envelope_id, **kwargs)
2030+ else:
2031+ (data) = self.create_envelopes_shares_with_http_info(account_id, envelope_id, **kwargs)
2032+ return data
2033+
2034+ def create_envelopes_shares_with_http_info(self, account_id, envelope_id, **kwargs):
2035+ """
2036+ Creates new envelopes shares
2037+ This method makes a synchronous HTTP request by default. To make an
2038+ asynchronous HTTP request, please define a `callback` function
2039+ to be invoked when receiving the response.
2040+ >>> def callback_function(response):
2041+ >>> pprint(response)
2042+ >>>
2043+ >>> thread = api.create_envelopes_shares_with_http_info(account_id, envelope_id, callback=callback_function)
2044+
2045+ :param callback function: The callback function
2046+ for asynchronous request. (optional)
2047+ :param str account_id: The external account number (int) or account ID Guid. (required)
2048+ :param str envelope_id: The envelopeId Guid of the envelope being accessed. (required)
2049+ :param EnvelopesSharesRequest envelopes_shares_request:
2050+ :return: EnvelopesSharesResponse
2051+ If the method is called asynchronously,
2052+ returns the request thread.
2053+ """
2054+
2055+ all_params = ['account_id', 'envelope_id', 'envelopes_shares_request']
2056+ all_params.append('callback')
2057+ all_params.append('_return_http_data_only')
2058+ all_params.append('_preload_content')
2059+ all_params.append('_request_timeout')
2060+
2061+ params = locals()
2062+ for key, val in iteritems(params['kwargs']):
2063+ if key not in all_params:
2064+ raise TypeError(
2065+ "Got an unexpected keyword argument '%s'"
2066+ " to method create_envelopes_shares" % key
2067+ )
2068+ params[key] = val
2069+ del params['kwargs']
2070+ # verify the required parameter 'account_id' is set
2071+ if ('account_id' not in params) or (params['account_id'] is None):
2072+ raise ValueError("Missing the required parameter `account_id` when calling `create_envelopes_shares`")
2073+ # verify the required parameter 'envelope_id' is set
2074+ if ('envelope_id' not in params) or (params['envelope_id'] is None):
2075+ raise ValueError("Missing the required parameter `envelope_id` when calling `create_envelopes_shares`")
2076+
2077+
2078+ collection_formats = {}
2079+
2080+ resource_path = '/v2.1/accounts/{accountId}/envelopes/{envelopeId}/shares'.replace('{format}', 'json')
2081+ path_params = {}
2082+ if 'account_id' in params:
2083+ path_params['accountId'] = params['account_id']
2084+ if 'envelope_id' in params:
2085+ path_params['envelopeId'] = params['envelope_id']
2086+
2087+ query_params = {}
2088+
2089+ header_params = {}
2090+
2091+ form_params = []
2092+ local_var_files = {}
2093+
2094+ body_params = None
2095+ if 'envelopes_shares_request' in params:
2096+ body_params = params['envelopes_shares_request']
2097+ # HTTP header `Accept`
2098+ header_params['Accept'] = self.api_client.\
2099+ select_header_accept(['application/json'])
2100+
2101+ # Authentication setting
2102+ auth_settings = []
2103+
2104+ return self.api_client.call_api(resource_path, 'POST',
2105+ path_params,
2106+ query_params,
2107+ header_params,
2108+ body=body_params,
2109+ post_params=form_params,
2110+ files=local_var_files,
2111+ response_type='EnvelopesSharesResponse',
2112+ auth_settings=auth_settings,
2113+ callback=params.get('callback'),
2114+ _return_http_data_only=params.get('_return_http_data_only'),
2115+ _preload_content=params.get('_preload_content', True),
2116+ _request_timeout=params.get('_request_timeout'),
2117+ collection_formats=collection_formats)
2118+
20072119 def create_historical_envelope_publish_transaction(self, account_id, **kwargs):
20082120 """
20092121 Submits a batch of historical envelopes for republish to an adhoc config.
0 commit comments