Class: DocuSign_eSign::BulkEnvelopesApi

Inherits:
Object
  • Object
show all
Defined in:
lib/docusign_esign/api/bulk_envelopes_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = BulkEnvelopesApi.default) ⇒ BulkEnvelopesApi

Returns a new instance of BulkEnvelopesApi.



62
63
64
# File 'lib/docusign_esign/api/bulk_envelopes_api.rb', line 62

def initialize(api_client = BulkEnvelopesApi.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



60
61
62
# File 'lib/docusign_esign/api/bulk_envelopes_api.rb', line 60

def api_client
  @api_client
end

Instance Method Details

#delete_recipients(account_id, envelope_id, recipient_id) ⇒ BulkRecipientsUpdateResponse

Deletes the bulk recipient file from an envelope. Deletes the bulk recipient file from an envelope. This cannot be used if the envelope has been sent. After using this, the ‘bulkRecipientsUri` property is not returned in subsequent GET calls for the envelope, but the recipient will remain as a bulk recipient.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • envelope_id

    The envelopeId Guid of the envelope being accessed.

  • recipient_id

    The ID of the recipient being accessed.

Returns:



72
73
74
75
# File 'lib/docusign_esign/api/bulk_envelopes_api.rb', line 72

def delete_recipients(, envelope_id, recipient_id)
  data, _status_code, _headers = delete_recipients_with_http_info(, envelope_id, recipient_id)
  return data
end

#delete_recipients_with_http_info(account_id, envelope_id, recipient_id) ⇒ Array<(BulkRecipientsUpdateResponse, Fixnum, Hash)>

Deletes the bulk recipient file from an envelope. Deletes the bulk recipient file from an envelope. This cannot be used if the envelope has been sent. After using this, the &#x60;bulkRecipientsUri&#x60; property is not returned in subsequent GET calls for the envelope, but the recipient will remain as a bulk recipient.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • envelope_id

    The envelopeId Guid of the envelope being accessed.

  • recipient_id

    The ID of the recipient being accessed.

Returns:



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/docusign_esign/api/bulk_envelopes_api.rb', line 83

def delete_recipients_with_http_info(, envelope_id, recipient_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BulkEnvelopesApi.delete_recipients ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling BulkEnvelopesApi.delete_recipients" if .nil?
  # verify the required parameter 'envelope_id' is set
  fail ArgumentError, "Missing the required parameter 'envelope_id' when calling BulkEnvelopesApi.delete_recipients" if envelope_id.nil?
  # verify the required parameter 'recipient_id' is set
  fail ArgumentError, "Missing the required parameter 'recipient_id' when calling BulkEnvelopesApi.delete_recipients" if recipient_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/bulk_recipients".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'envelopeId' + '}', envelope_id.to_s).sub('{' + 'recipientId' + '}', recipient_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'BulkRecipientsUpdateResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BulkEnvelopesApi#delete_recipients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get(account_id, batch_id, options = DocuSign_eSign::GetOptions.default) ⇒ BulkEnvelopeStatus

Gets the status of a specified bulk send operation. Retrieves the status information of a single bulk recipient batch. A bulk recipient batch is the set of envelopes sent from a single bulk recipient file.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • batch_id
  • DocuSign_eSign::GetOptions

    Options for modifying the behavior of the function.

Returns:



129
130
131
132
# File 'lib/docusign_esign/api/bulk_envelopes_api.rb', line 129

def get(, batch_id, options = DocuSign_eSign::GetOptions.default)
  data, _status_code, _headers = get_with_http_info(, batch_id, options)
  return data
end

#get_recipients(account_id, envelope_id, recipient_id, options = DocuSign_eSign::GetRecipientsOptions.default) ⇒ BulkRecipientsResponse

Gets the bulk recipient file from an envelope. Retrieves the bulk recipient file information from an envelope that has a bulk recipient.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • envelope_id

    The envelopeId Guid of the envelope being accessed.

  • recipient_id

    The ID of the recipient being accessed.

  • DocuSign_eSign::GetRecipientsOptions

    Options for modifying the behavior of the function.

Returns:



188
189
190
191
# File 'lib/docusign_esign/api/bulk_envelopes_api.rb', line 188

def get_recipients(, envelope_id, recipient_id, options = DocuSign_eSign::GetRecipientsOptions.default)
  data, _status_code, _headers = get_recipients_with_http_info(, envelope_id, recipient_id, options)
  return data
end

#get_recipients_with_http_info(account_id, envelope_id, recipient_id, options = DocuSign_eSign::GetRecipientsOptions.default) ⇒ Array<(BulkRecipientsResponse, Fixnum, Hash)>

Gets the bulk recipient file from an envelope. Retrieves the bulk recipient file information from an envelope that has a bulk recipient.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • envelope_id

    The envelopeId Guid of the envelope being accessed.

  • recipient_id

    The ID of the recipient being accessed.

  • DocuSign_eSign::GetRecipientsOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(BulkRecipientsResponse, Fixnum, Hash)>)

    BulkRecipientsResponse data, response status code and response headers



200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/docusign_esign/api/bulk_envelopes_api.rb', line 200

def get_recipients_with_http_info(, envelope_id, recipient_id, options = DocuSign_eSign::GetRecipientsOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BulkEnvelopesApi.get_recipients ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling BulkEnvelopesApi.get_recipients" if .nil?
  # verify the required parameter 'envelope_id' is set
  fail ArgumentError, "Missing the required parameter 'envelope_id' when calling BulkEnvelopesApi.get_recipients" if envelope_id.nil?
  # verify the required parameter 'recipient_id' is set
  fail ArgumentError, "Missing the required parameter 'recipient_id' when calling BulkEnvelopesApi.get_recipients" if recipient_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/bulk_recipients".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'envelopeId' + '}', envelope_id.to_s).sub('{' + 'recipientId' + '}', recipient_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'include_tabs'] = options.include_tabs if !options.include_tabs.nil?
  query_params[:'start_position'] = options.start_position if !options.start_position.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'BulkRecipientsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BulkEnvelopesApi#get_recipients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_with_http_info(account_id, batch_id, options = DocuSign_eSign::GetOptions.default) ⇒ Array<(BulkEnvelopeStatus, Fixnum, Hash)>

Gets the status of a specified bulk send operation. Retrieves the status information of a single bulk recipient batch. A bulk recipient batch is the set of envelopes sent from a single bulk recipient file.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • batch_id
  • DocuSign_eSign::GetOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(BulkEnvelopeStatus, Fixnum, Hash)>)

    BulkEnvelopeStatus data, response status code and response headers



140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# File 'lib/docusign_esign/api/bulk_envelopes_api.rb', line 140

def get_with_http_info(, batch_id, options = DocuSign_eSign::GetOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BulkEnvelopesApi.get ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling BulkEnvelopesApi.get" if .nil?
  # verify the required parameter 'batch_id' is set
  fail ArgumentError, "Missing the required parameter 'batch_id' when calling BulkEnvelopesApi.get" if batch_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/bulk_envelopes/{batchId}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'batchId' + '}', batch_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'count'] = options.count if !options.count.nil?
  query_params[:'include'] = options.include if !options.include.nil?
  query_params[:'start_position'] = options.start_position if !options.start_position.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'BulkEnvelopeStatus')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BulkEnvelopesApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list(account_id, options = DocuSign_eSign::ListOptions.default) ⇒ BulkEnvelopesResponse

Gets status information about bulk recipient batches. Retrieves status information about all the bulk recipient batches. A bulk recipient batch is the set of envelopes sent from a single bulk recipient file. The response includes general information about each bulk recipient batch. The response returns information about the envelopes sent with bulk recipient batches, including the ‘batchId` property, which can be used to retrieve a more detailed status of individual bulk recipient batches.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • DocuSign_eSign::ListOptions

    Options for modifying the behavior of the function.

Returns:



247
248
249
250
# File 'lib/docusign_esign/api/bulk_envelopes_api.rb', line 247

def list(, options = DocuSign_eSign::ListOptions.default)
  data, _status_code, _headers = list_with_http_info(, options)
  return data
end

#list_with_http_info(account_id, options = DocuSign_eSign::ListOptions.default) ⇒ Array<(BulkEnvelopesResponse, Fixnum, Hash)>

Gets status information about bulk recipient batches. Retrieves status information about all the bulk recipient batches. A bulk recipient batch is the set of envelopes sent from a single bulk recipient file. The response includes general information about each bulk recipient batch. The response returns information about the envelopes sent with bulk recipient batches, including the &#x60;batchId&#x60; property, which can be used to retrieve a more detailed status of individual bulk recipient batches.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • DocuSign_eSign::ListOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(BulkEnvelopesResponse, Fixnum, Hash)>)

    BulkEnvelopesResponse data, response status code and response headers



257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
# File 'lib/docusign_esign/api/bulk_envelopes_api.rb', line 257

def list_with_http_info(, options = DocuSign_eSign::ListOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BulkEnvelopesApi.list ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling BulkEnvelopesApi.list" if .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/bulk_envelopes".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s)

  # query parameters
  query_params = {}
  query_params[:'count'] = options.count if !options.count.nil?
  query_params[:'include'] = options.include if !options.include.nil?
  query_params[:'start_position'] = options.start_position if !options.start_position.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'BulkEnvelopesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BulkEnvelopesApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_recipients(account_id, envelope_id, recipient_id, bulk_recipients_request) ⇒ BulkRecipientsSummaryResponse

Adds or replaces envelope bulk recipients. Updates the bulk recipients in a draft envelope using a file upload. The Content-Type supported for uploading a bulk recipient file is CSV (text/csv). The REST API does not support modifying individual rows or values in the bulk recipients file. It only allows the entire file to be added or replaced with a new file.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • envelope_id

    The envelopeId Guid of the envelope being accessed.

  • recipient_id

    The ID of the recipient being accessed.

  • bulk_recipients_request (optional parameter)

Returns:



303
304
305
306
# File 'lib/docusign_esign/api/bulk_envelopes_api.rb', line 303

def update_recipients(, envelope_id, recipient_id, bulk_recipients_request)
  data, _status_code, _headers = update_recipients_with_http_info(, envelope_id, recipient_id,  bulk_recipients_request)
  return data
end

#update_recipients_with_http_info(account_id, envelope_id, recipient_id, bulk_recipients_request) ⇒ Array<(BulkRecipientsSummaryResponse, Fixnum, Hash)>

Adds or replaces envelope bulk recipients. Updates the bulk recipients in a draft envelope using a file upload. The Content-Type supported for uploading a bulk recipient file is CSV (text/csv). The REST API does not support modifying individual rows or values in the bulk recipients file. It only allows the entire file to be added or replaced with a new file.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • envelope_id

    The envelopeId Guid of the envelope being accessed.

  • recipient_id

    The ID of the recipient being accessed.

  • bulk_recipients_request (optional parameter)

Returns:



315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
# File 'lib/docusign_esign/api/bulk_envelopes_api.rb', line 315

def update_recipients_with_http_info(, envelope_id, recipient_id, bulk_recipients_request)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BulkEnvelopesApi.update_recipients ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling BulkEnvelopesApi.update_recipients" if .nil?
  # verify the required parameter 'envelope_id' is set
  fail ArgumentError, "Missing the required parameter 'envelope_id' when calling BulkEnvelopesApi.update_recipients" if envelope_id.nil?
  # verify the required parameter 'recipient_id' is set
  fail ArgumentError, "Missing the required parameter 'recipient_id' when calling BulkEnvelopesApi.update_recipients" if recipient_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/bulk_recipients".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'envelopeId' + '}', envelope_id.to_s).sub('{' + 'recipientId' + '}', recipient_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(bulk_recipients_request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'BulkRecipientsSummaryResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BulkEnvelopesApi#update_recipients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end