=begin #DocuSign REST API #The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.4.13-SNAPSHOT =end require "uri" module DocuSign_eSign class GetOptions # Specifies the number of entries to return. attr_accessor :count # Specifies which entries are included in the response. Multiple entries can be included by using commas in the query string (example: ?include=\"failed,queued\") Valid values are: * all - Returns all entries. If present, overrides all other query settings. This is the default if no query string is provided. * failed - This only returns entries with a failed status. * queued - This only returns entries with a queued status. * sent - This only returns entries with a sent status. attr_accessor :include # Specifies the location in the list of envelopes from which to start. attr_accessor :start_position def self.default @@default ||= GetOptions.new end end class GetRecipientsOptions # attr_accessor :include_tabs # attr_accessor :start_position def self.default @@default ||= GetRecipientsOptions.new end end class ListOptions # The number of results to return. This can be 1 to 20. attr_accessor :count # attr_accessor :include # The position of the bulk envelope items in the response. This is used for repeated calls, when the number of bulk envelopes returned is too large for one return. The default value is 0. attr_accessor :start_position def self.default @@default ||= ListOptions.new end end class BulkEnvelopesApi attr_accessor :api_client def initialize(api_client = BulkEnvelopesApi.default) @api_client = api_client end # Creates a new bulk send list # # @param account_id The external account number (int) or account ID Guid. # @param bulk_sending_list (optional parameter) # @return [BulkSendingList] def create_bulk_send_list(account_id, bulk_sending_list) data, _status_code, _headers = create_bulk_send_list_with_http_info(account_id, bulk_sending_list) return data end # Creates a new bulk send list # # @param account_id The external account number (int) or account ID Guid. # @param bulk_sending_list (optional parameter) # @return [Array<(BulkSendingList, Fixnum, Hash)>] BulkSendingList data, response status code and response headers def create_bulk_send_list_with_http_info(account_id, bulk_sending_list) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkEnvelopesApi.create_bulk_send_list ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling BulkEnvelopesApi.create_bulk_send_list" if account_id.nil? # resource path local_var_path = "/v2.1/accounts/{accountId}/bulk_send_lists".sub('{format}','json').sub('{' + 'accountId' + '}', account_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_sending_list) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'BulkSendingList') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkEnvelopesApi#create_bulk_send_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Uses the specified bulk send list to send the envelope specified in the payload # # @param account_id The external account number (int) or account ID Guid. # @param bulk_send_list_id # @param bulk_send_request (optional parameter) # @return [BulkSendResponse] def create_bulk_send_request(account_id, bulk_send_list_id, bulk_send_request) data, _status_code, _headers = create_bulk_send_request_with_http_info(account_id, bulk_send_list_id, bulk_send_request) return data end # Uses the specified bulk send list to send the envelope specified in the payload # # @param account_id The external account number (int) or account ID Guid. # @param bulk_send_list_id # @param bulk_send_request (optional parameter) # @return [Array<(BulkSendResponse, Fixnum, Hash)>] BulkSendResponse data, response status code and response headers def create_bulk_send_request_with_http_info(account_id, bulk_send_list_id, bulk_send_request) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkEnvelopesApi.create_bulk_send_request ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling BulkEnvelopesApi.create_bulk_send_request" if account_id.nil? # verify the required parameter 'bulk_send_list_id' is set fail ArgumentError, "Missing the required parameter 'bulk_send_list_id' when calling BulkEnvelopesApi.create_bulk_send_request" if bulk_send_list_id.nil? # resource path local_var_path = "/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}/send".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'bulkSendListId' + '}', bulk_send_list_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_send_request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'BulkSendResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkEnvelopesApi#create_bulk_send_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Tests whether the specified bulk sending list can be used to send an envelope # # @param account_id The external account number (int) or account ID Guid. # @param bulk_send_list_id # @param bulk_send_request (optional parameter) # @return [BulkSendTestResponse] def create_bulk_send_test_request(account_id, bulk_send_list_id, bulk_send_request) data, _status_code, _headers = create_bulk_send_test_request_with_http_info(account_id, bulk_send_list_id, bulk_send_request) return data end # Tests whether the specified bulk sending list can be used to send an envelope # # @param account_id The external account number (int) or account ID Guid. # @param bulk_send_list_id # @param bulk_send_request (optional parameter) # @return [Array<(BulkSendTestResponse, Fixnum, Hash)>] BulkSendTestResponse data, response status code and response headers def create_bulk_send_test_request_with_http_info(account_id, bulk_send_list_id, bulk_send_request) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkEnvelopesApi.create_bulk_send_test_request ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling BulkEnvelopesApi.create_bulk_send_test_request" if account_id.nil? # verify the required parameter 'bulk_send_list_id' is set fail ArgumentError, "Missing the required parameter 'bulk_send_list_id' when calling BulkEnvelopesApi.create_bulk_send_test_request" if bulk_send_list_id.nil? # resource path local_var_path = "/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}/test".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'bulkSendListId' + '}', bulk_send_list_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_send_request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'BulkSendTestResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkEnvelopesApi#create_bulk_send_test_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Deletes an existing bulk send list # # @param account_id The external account number (int) or account ID Guid. # @param bulk_send_list_id # @return [BulkSendingListSummaries] def delete_bulk_send_list(account_id, bulk_send_list_id) data, _status_code, _headers = delete_bulk_send_list_with_http_info(account_id, bulk_send_list_id) return data end # Deletes an existing bulk send list # # @param account_id The external account number (int) or account ID Guid. # @param bulk_send_list_id # @return [Array<(BulkSendingListSummaries, Fixnum, Hash)>] BulkSendingListSummaries data, response status code and response headers def delete_bulk_send_list_with_http_info(account_id, bulk_send_list_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkEnvelopesApi.delete_bulk_send_list ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling BulkEnvelopesApi.delete_bulk_send_list" if account_id.nil? # verify the required parameter 'bulk_send_list_id' is set fail ArgumentError, "Missing the required parameter 'bulk_send_list_id' when calling BulkEnvelopesApi.delete_bulk_send_list" if bulk_send_list_id.nil? # resource path local_var_path = "/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'bulkSendListId' + '}', bulk_send_list_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 => 'BulkSendingListSummaries') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkEnvelopesApi#delete_bulk_send_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # 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. # @param account_id The external account number (int) or account ID Guid. # @param envelope_id The envelopeId Guid of the envelope being accessed. # @param recipient_id The ID of the recipient being accessed. # @return [BulkRecipientsUpdateResponse] def delete_recipients(account_id, envelope_id, recipient_id) data, _status_code, _headers = delete_recipients_with_http_info(account_id, envelope_id, recipient_id) return data end # 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. # @param account_id The external account number (int) or account ID Guid. # @param envelope_id The envelopeId Guid of the envelope being accessed. # @param recipient_id The ID of the recipient being accessed. # @return [Array<(BulkRecipientsUpdateResponse, Fixnum, Hash)>] BulkRecipientsUpdateResponse data, response status code and response headers def delete_recipients_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/bulk_recipients".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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 # 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. # @param account_id The external account number (int) or account ID Guid. # @param batch_id # @param DocuSign_eSign::GetOptions Options for modifying the behavior of the function. # @return [BulkEnvelopeStatus] def get(account_id, batch_id, options = DocuSign_eSign::GetOptions.default) data, _status_code, _headers = get_with_http_info(account_id, batch_id, options) return data end # 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. # @param account_id The external account number (int) or account ID Guid. # @param batch_id # @param DocuSign_eSign::GetOptions Options for modifying the behavior of the function. # @return [Array<(BulkEnvelopeStatus, Fixnum, Hash)>] BulkEnvelopeStatus data, response status code and response headers def get_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/bulk_envelopes/{batchId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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 # Gets a specific bulk send list # # @param account_id The external account number (int) or account ID Guid. # @param bulk_send_list_id # @return [BulkSendingList] def get_bulk_send_list(account_id, bulk_send_list_id) data, _status_code, _headers = get_bulk_send_list_with_http_info(account_id, bulk_send_list_id) return data end # Gets a specific bulk send list # # @param account_id The external account number (int) or account ID Guid. # @param bulk_send_list_id # @return [Array<(BulkSendingList, Fixnum, Hash)>] BulkSendingList data, response status code and response headers def get_bulk_send_list_with_http_info(account_id, bulk_send_list_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkEnvelopesApi.get_bulk_send_list ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling BulkEnvelopesApi.get_bulk_send_list" if account_id.nil? # verify the required parameter 'bulk_send_list_id' is set fail ArgumentError, "Missing the required parameter 'bulk_send_list_id' when calling BulkEnvelopesApi.get_bulk_send_list" if bulk_send_list_id.nil? # resource path local_var_path = "/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'bulkSendListId' + '}', bulk_send_list_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(: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 => 'BulkSendingList') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkEnvelopesApi#get_bulk_send_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Lists top-level details for all bulk send lists visible to the current user # # @param account_id The external account number (int) or account ID Guid. # @return [BulkSendingListSummaries] def get_bulk_send_lists(account_id) data, _status_code, _headers = get_bulk_send_lists_with_http_info(account_id) return data end # Lists top-level details for all bulk send lists visible to the current user # # @param account_id The external account number (int) or account ID Guid. # @return [Array<(BulkSendingListSummaries, Fixnum, Hash)>] BulkSendingListSummaries data, response status code and response headers def get_bulk_send_lists_with_http_info(account_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkEnvelopesApi.get_bulk_send_lists ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling BulkEnvelopesApi.get_bulk_send_lists" if account_id.nil? # resource path local_var_path = "/v2.1/accounts/{accountId}/bulk_send_lists".sub('{format}','json').sub('{' + 'accountId' + '}', account_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(: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 => 'BulkSendingListSummaries') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkEnvelopesApi#get_bulk_send_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Gets the bulk recipient file from an envelope. # Retrieves the bulk recipient file information from an envelope that has a bulk recipient. # @param account_id The external account number (int) or account ID Guid. # @param envelope_id The envelopeId Guid of the envelope being accessed. # @param recipient_id The ID of the recipient being accessed. # @param DocuSign_eSign::GetRecipientsOptions Options for modifying the behavior of the function. # @return [BulkRecipientsResponse] def get_recipients(account_id, envelope_id, recipient_id, options = DocuSign_eSign::GetRecipientsOptions.default) data, _status_code, _headers = get_recipients_with_http_info(account_id, envelope_id, recipient_id, options) return data end # Gets the bulk recipient file from an envelope. # Retrieves the bulk recipient file information from an envelope that has a bulk recipient. # @param account_id The external account number (int) or account ID Guid. # @param envelope_id The envelopeId Guid of the envelope being accessed. # @param recipient_id The ID of the recipient being accessed. # @param DocuSign_eSign::GetRecipientsOptions Options for modifying the behavior of the function. # @return [Array<(BulkRecipientsResponse, Fixnum, Hash)>] BulkRecipientsResponse data, response status code and response headers def get_recipients_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/bulk_recipients".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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 # 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. # @param account_id The external account number (int) or account ID Guid. # @param DocuSign_eSign::ListOptions Options for modifying the behavior of the function. # @return [BulkEnvelopesResponse] def list(account_id, options = DocuSign_eSign::ListOptions.default) data, _status_code, _headers = list_with_http_info(account_id, options) return data end # 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. # @param account_id The external account number (int) or account ID Guid. # @param DocuSign_eSign::ListOptions Options for modifying the behavior of the function. # @return [Array<(BulkEnvelopesResponse, Fixnum, Hash)>] BulkEnvelopesResponse data, response status code and response headers def list_with_http_info(account_id, 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 account_id.nil? # resource path local_var_path = "/v2.1/accounts/{accountId}/bulk_envelopes".sub('{format}','json').sub('{' + 'accountId' + '}', account_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 => '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 # Updates an existing bulk send list. If send_envelope query string value is provided, will accept an empty payload and try to send the specified envelope # # @param account_id The external account number (int) or account ID Guid. # @param bulk_send_list_id # @param bulk_sending_list (optional parameter) # @return [BulkSendingList] def update_bulk_send_list(account_id, bulk_send_list_id, bulk_sending_list) data, _status_code, _headers = update_bulk_send_list_with_http_info(account_id, bulk_send_list_id, bulk_sending_list) return data end # Updates an existing bulk send list. If send_envelope query string value is provided, will accept an empty payload and try to send the specified envelope # # @param account_id The external account number (int) or account ID Guid. # @param bulk_send_list_id # @param bulk_sending_list (optional parameter) # @return [Array<(BulkSendingList, Fixnum, Hash)>] BulkSendingList data, response status code and response headers def update_bulk_send_list_with_http_info(account_id, bulk_send_list_id, bulk_sending_list) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkEnvelopesApi.update_bulk_send_list ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling BulkEnvelopesApi.update_bulk_send_list" if account_id.nil? # verify the required parameter 'bulk_send_list_id' is set fail ArgumentError, "Missing the required parameter 'bulk_send_list_id' when calling BulkEnvelopesApi.update_bulk_send_list" if bulk_send_list_id.nil? # resource path local_var_path = "/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'bulkSendListId' + '}', bulk_send_list_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_sending_list) 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 => 'BulkSendingList') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkEnvelopesApi#update_bulk_send_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # 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. # @param account_id The external account number (int) or account ID GUID. # @param envelope_id The envelope's GUID. Example: `93be49ab-xxxx-xxxx-xxxx-f752070d71ec` # @param recipient_id A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`. # @param bulk_recipients_request # @return [BulkRecipientsSummaryResponse] def update_recipients(account_id, envelope_id, recipient_id, bulk_recipients_request) data, _status_code, _headers = update_recipients_with_http_info(account_id, envelope_id, recipient_id, bulk_recipients_request) return data end # 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. # @param account_id The external account number (int) or account ID GUID. # @param envelope_id The envelope's GUID. Example: `93be49ab-xxxx-xxxx-xxxx-f752070d71ec` # @param recipient_id A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`. # @param bulk_recipients_request # @return [Array<(BulkRecipientsSummaryResponse, Fixnum, Hash)>] BulkRecipientsSummaryResponse data, response status code and response headers def update_recipients_with_http_info(account_id, 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 account_id.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? # verify the required parameter 'bulk_recipients_request' is set fail ArgumentError, "Missing the required parameter 'bulk_recipients_request' when calling BulkEnvelopesApi.update_recipients" if bulk_recipients_request.nil? # resource path local_var_path = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/bulk_recipients".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/csv']) # 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 end end