@@ -1878,6 +1878,111 @@ def create_envelope_transfer_rules_with_http_info(self, account_id, **kwargs):
18781878 _request_timeout=params.get('_request_timeout'),
18791879 collection_formats=collection_formats)
18801880
1881+ def create_historical_envelope_publish_transaction(self, account_id, **kwargs):
1882+ """
1883+ Submits a batch of historical envelopes for republish to an adhoc config.
1884+ This method makes a synchronous HTTP request by default. To make an
1885+ asynchronous HTTP request, please define a `callback` function
1886+ to be invoked when receiving the response.
1887+ >>> def callback_function(response):
1888+ >>> pprint(response)
1889+ >>>
1890+ >>> thread = api.create_historical_envelope_publish_transaction(account_id, callback=callback_function)
1891+
1892+ :param callback function: The callback function
1893+ for asynchronous request. (optional)
1894+ :param str account_id: The external account number (int) or account ID Guid. (required)
1895+ :param ConnectHistoricalEnvelopeRepublish connect_historical_envelope_republish:
1896+ :return: EnvelopePublishTransaction
1897+ If the method is called asynchronously,
1898+ returns the request thread.
1899+ """
1900+ kwargs['_return_http_data_only'] = True
1901+ if kwargs.get('callback'):
1902+ return self.create_historical_envelope_publish_transaction_with_http_info(account_id, **kwargs)
1903+ else:
1904+ (data) = self.create_historical_envelope_publish_transaction_with_http_info(account_id, **kwargs)
1905+ return data
1906+
1907+ def create_historical_envelope_publish_transaction_with_http_info(self, account_id, **kwargs):
1908+ """
1909+ Submits a batch of historical envelopes for republish to an adhoc config.
1910+ This method makes a synchronous HTTP request by default. To make an
1911+ asynchronous HTTP request, please define a `callback` function
1912+ to be invoked when receiving the response.
1913+ >>> def callback_function(response):
1914+ >>> pprint(response)
1915+ >>>
1916+ >>> thread = api.create_historical_envelope_publish_transaction_with_http_info(account_id, callback=callback_function)
1917+
1918+ :param callback function: The callback function
1919+ for asynchronous request. (optional)
1920+ :param str account_id: The external account number (int) or account ID Guid. (required)
1921+ :param ConnectHistoricalEnvelopeRepublish connect_historical_envelope_republish:
1922+ :return: EnvelopePublishTransaction
1923+ If the method is called asynchronously,
1924+ returns the request thread.
1925+ """
1926+
1927+ all_params = ['account_id', 'connect_historical_envelope_republish']
1928+ all_params.append('callback')
1929+ all_params.append('_return_http_data_only')
1930+ all_params.append('_preload_content')
1931+ all_params.append('_request_timeout')
1932+
1933+ params = locals()
1934+ for key, val in iteritems(params['kwargs']):
1935+ if key not in all_params:
1936+ raise TypeError(
1937+ "Got an unexpected keyword argument '%s'"
1938+ " to method create_historical_envelope_publish_transaction" % key
1939+ )
1940+ params[key] = val
1941+ del params['kwargs']
1942+ # verify the required parameter 'account_id' is set
1943+ if ('account_id' not in params) or (params['account_id'] is None):
1944+ raise ValueError("Missing the required parameter `account_id` when calling `create_historical_envelope_publish_transaction`")
1945+
1946+
1947+ collection_formats = {}
1948+
1949+ resource_path = '/v2.1/accounts/{accountId}/connect/envelopes/publish/historical'.replace('{format}', 'json')
1950+ path_params = {}
1951+ if 'account_id' in params:
1952+ path_params['accountId'] = params['account_id']
1953+
1954+ query_params = {}
1955+
1956+ header_params = {}
1957+
1958+ form_params = []
1959+ local_var_files = {}
1960+
1961+ body_params = None
1962+ if 'connect_historical_envelope_republish' in params:
1963+ body_params = params['connect_historical_envelope_republish']
1964+ # HTTP header `Accept`
1965+ header_params['Accept'] = self.api_client.\
1966+ select_header_accept(['application/json'])
1967+
1968+ # Authentication setting
1969+ auth_settings = []
1970+
1971+ return self.api_client.call_api(resource_path, 'POST',
1972+ path_params,
1973+ query_params,
1974+ header_params,
1975+ body=body_params,
1976+ post_params=form_params,
1977+ files=local_var_files,
1978+ response_type='EnvelopePublishTransaction',
1979+ auth_settings=auth_settings,
1980+ callback=params.get('callback'),
1981+ _return_http_data_only=params.get('_return_http_data_only'),
1982+ _preload_content=params.get('_preload_content', True),
1983+ _request_timeout=params.get('_request_timeout'),
1984+ collection_formats=collection_formats)
1985+
18811986 def create_lock(self, account_id, envelope_id, **kwargs):
18821987 """
18831988 Lock an envelope.
0 commit comments