=begin #DocuSign Admin API #An API for an organization administrator to manage organizations, accounts and users OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git =end require "uri" module DocuSign_Admin class BulkImportsApi attr_accessor :api_client def initialize(api_client = BulkImportsApi.default) @api_client = api_client end # Creates a new account settings import request. # Required scopes: account_write # @param organization_id The organization ID Guid # @param file_csv CSV file. # @return [OrganizationAccountSettingsImportResponse] def add_bulk_account_settings_import(organization_id, file_csv) data, _status_code, _headers = add_bulk_account_settings_import_with_http_info(organization_id, file_csv) return data end # Creates a new account settings import request. # Required scopes: account_write # @param organization_id The organization ID Guid # @param file_csv CSV file. # @return [Array<(OrganizationAccountSettingsImportResponse, Fixnum, Hash)>] OrganizationAccountSettingsImportResponse data, response status code and response headers def add_bulk_account_settings_import_with_http_info(organization_id, file_csv) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkImportsApi.add_bulk_account_settings_import ..." end # verify the required parameter 'organization_id' is set fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkImportsApi.add_bulk_account_settings_import" if organization_id.nil? # verify the required parameter 'file_csv' is set fail ArgumentError, "Missing the required parameter 'file_csv' when calling BulkImportsApi.add_bulk_account_settings_import" if file_csv.nil? # resource path local_var_path = "/v2/organizations/{organizationId}/imports/account_settings".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_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(['multipart/form-data']) # form parameters form_params = {} form_params["file.csv"] = file_csv # http body (model) post_body = nil 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 => 'OrganizationAccountSettingsImportResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkImportsApi#add_bulk_account_settings_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Import request for adding users to accounts within the organization. # Required scopes: user_write # @param organization_id The organization ID Guid # @param file_csv CSV file. # @return [OrganizationImportResponse] def create_bulk_import_add_users_request(organization_id, file_csv) data, _status_code, _headers = create_bulk_import_add_users_request_with_http_info(organization_id, file_csv) return data end # Import request for adding users to accounts within the organization. # Required scopes: user_write # @param organization_id The organization ID Guid # @param file_csv CSV file. # @return [Array<(OrganizationImportResponse, Fixnum, Hash)>] OrganizationImportResponse data, response status code and response headers def create_bulk_import_add_users_request_with_http_info(organization_id, file_csv) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkImportsApi.create_bulk_import_add_users_request ..." end # verify the required parameter 'organization_id' is set fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkImportsApi.create_bulk_import_add_users_request" if organization_id.nil? # verify the required parameter 'file_csv' is set fail ArgumentError, "Missing the required parameter 'file_csv' when calling BulkImportsApi.create_bulk_import_add_users_request" if file_csv.nil? # resource path local_var_path = "/v2/organizations/{organizationId}/imports/bulk_users/add".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_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(['multipart/form-data']) # form parameters form_params = {} form_params["file.csv"] = file_csv # http body (model) post_body = nil 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 => 'OrganizationImportResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkImportsApi#create_bulk_import_add_users_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Closes the Bulk User Import request # Required scopes: user_write # @param organization_id The organization ID Guid # @return [OrganizationImportResponse] def create_bulk_import_close_users_request(organization_id) data, _status_code, _headers = create_bulk_import_close_users_request_with_http_info(organization_id) return data end # Closes the Bulk User Import request # Required scopes: user_write # @param organization_id The organization ID Guid # @return [Array<(OrganizationImportResponse, Fixnum, Hash)>] OrganizationImportResponse data, response status code and response headers def create_bulk_import_close_users_request_with_http_info(organization_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkImportsApi.create_bulk_import_close_users_request ..." end # verify the required parameter 'organization_id' is set fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkImportsApi.create_bulk_import_close_users_request" if organization_id.nil? # resource path local_var_path = "/v2/organizations/{organizationId}/imports/bulk_users/close".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_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(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil 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 => 'OrganizationImportResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkImportsApi#create_bulk_import_close_users_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Closes memberships which are not in an account which is part of the organization, but which do have email addresses which are @ a verified reserved web domain which belongs to the organization # Required scopes: user_write # @param organization_id The organization ID Guid # @return [OrganizationImportResponse] def create_bulk_import_external_close_users_request(organization_id) data, _status_code, _headers = create_bulk_import_external_close_users_request_with_http_info(organization_id) return data end # Closes memberships which are not in an account which is part of the organization, but which do have email addresses which are @ a verified reserved web domain which belongs to the organization # Required scopes: user_write # @param organization_id The organization ID Guid # @return [Array<(OrganizationImportResponse, Fixnum, Hash)>] OrganizationImportResponse data, response status code and response headers def create_bulk_import_external_close_users_request_with_http_info(organization_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkImportsApi.create_bulk_import_external_close_users_request ..." end # verify the required parameter 'organization_id' is set fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkImportsApi.create_bulk_import_external_close_users_request" if organization_id.nil? # resource path local_var_path = "/v2/organizations/{organizationId}/imports/bulk_users/close_external".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_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(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil 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 => 'OrganizationImportResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkImportsApi#create_bulk_import_external_close_users_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Import request for adding user to a single account within the organization. Allows upload of user information without requiring an AccountId column # Required scopes: user_write # @param organization_id The organization ID Guid # @param account_id The account ID Guid # @return [OrganizationImportResponse] def create_bulk_import_single_account_add_users_request(organization_id, account_id) data, _status_code, _headers = create_bulk_import_single_account_add_users_request_with_http_info(organization_id, account_id) return data end # Import request for adding user to a single account within the organization. Allows upload of user information without requiring an AccountId column # Required scopes: user_write # @param organization_id The organization ID Guid # @param account_id The account ID Guid # @return [Array<(OrganizationImportResponse, Fixnum, Hash)>] OrganizationImportResponse data, response status code and response headers def create_bulk_import_single_account_add_users_request_with_http_info(organization_id, account_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkImportsApi.create_bulk_import_single_account_add_users_request ..." end # verify the required parameter 'organization_id' is set fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkImportsApi.create_bulk_import_single_account_add_users_request" if organization_id.nil? # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling BulkImportsApi.create_bulk_import_single_account_add_users_request" if account_id.nil? # verify the required parameter 'file_csv' is set fail ArgumentError, "Missing the required parameter 'file_csv' when calling BulkImportsApi.create_bulk_import_single_account_add_users_request" if file_csv.nil? # resource path local_var_path = "/v2/organizations/{organizationId}/accounts/{accountId}/imports/bulk_users/add".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params["file.csv"] = file_csv # http body (model) post_body = nil 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 => 'OrganizationImportResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkImportsApi#create_bulk_import_single_account_add_users_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Import request for updating users for a single account within the organization. Allows upload of user information without requiring an AccountId column # Required scopes: user_write # @param organization_id The organization ID Guid # @param account_id The account ID Guid # @return [OrganizationImportResponse] def create_bulk_import_single_account_update_users_request(organization_id, account_id) data, _status_code, _headers = create_bulk_import_single_account_update_users_request_with_http_info(organization_id, account_id) return data end # Import request for updating users for a single account within the organization. Allows upload of user information without requiring an AccountId column # Required scopes: user_write # @param organization_id The organization ID Guid # @param account_id The account ID Guid # @return [Array<(OrganizationImportResponse, Fixnum, Hash)>] OrganizationImportResponse data, response status code and response headers def create_bulk_import_single_account_update_users_request_with_http_info(organization_id, account_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkImportsApi.create_bulk_import_single_account_update_users_request ..." end # verify the required parameter 'organization_id' is set fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkImportsApi.create_bulk_import_single_account_update_users_request" if organization_id.nil? # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling BulkImportsApi.create_bulk_import_single_account_update_users_request" if account_id.nil? # verify the required parameter 'file_csv' is set fail ArgumentError, "Missing the required parameter 'file_csv' when calling BulkImportsApi.create_bulk_import_single_account_update_users_request" if file_csv.nil? # resource path local_var_path = "/v2/organizations/{organizationId}/accounts/{accountId}/imports/bulk_users/update".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params["file.csv"] = file_csv # http body (model) post_body = nil 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 => 'OrganizationImportResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkImportsApi#create_bulk_import_single_account_update_users_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Import request for updating users to accounts within the organization. # Required scopes: user_write # @param organization_id The organization ID Guid # @return [OrganizationImportResponse] def create_bulk_import_update_users_request(organization_id) data, _status_code, _headers = create_bulk_import_update_users_request_with_http_info(organization_id) return data end # Import request for updating users to accounts within the organization. # Required scopes: user_write # @param organization_id The organization ID Guid # @return [Array<(OrganizationImportResponse, Fixnum, Hash)>] OrganizationImportResponse data, response status code and response headers def create_bulk_import_update_users_request_with_http_info(organization_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkImportsApi.create_bulk_import_update_users_request ..." end # verify the required parameter 'organization_id' is set fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkImportsApi.create_bulk_import_update_users_request" if organization_id.nil? # verify the required parameter 'file_csv' is set fail ArgumentError, "Missing the required parameter 'file_csv' when calling BulkImportsApi.create_bulk_import_update_users_request" if file_csv.nil? # resource path local_var_path = "/v2/organizations/{organizationId}/imports/bulk_users/update".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_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(['multipart/form-data']) # form parameters form_params = {} form_params["file.csv"] = file_csv # http body (model) post_body = nil 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 => 'OrganizationImportResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkImportsApi#create_bulk_import_update_users_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Deletes a Bulk Account Settings Import request # Required scopes: account_write # @param organization_id The organization ID Guid # @param import_id The import ID Guid for the request # @return [Object] def delete_bulk_account_settings_import(organization_id, import_id) data, _status_code, _headers = delete_bulk_account_settings_import_with_http_info(organization_id, import_id) return data end # Deletes a Bulk Account Settings Import request # Required scopes: account_write # @param organization_id The organization ID Guid # @param import_id The import ID Guid for the request # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers def delete_bulk_account_settings_import_with_http_info(organization_id, import_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkImportsApi.delete_bulk_account_settings_import ..." end # verify the required parameter 'organization_id' is set fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkImportsApi.delete_bulk_account_settings_import" if organization_id.nil? # verify the required parameter 'import_id' is set fail ArgumentError, "Missing the required parameter 'import_id' when calling BulkImportsApi.delete_bulk_account_settings_import" if import_id.nil? # resource path local_var_path = "/v2/organizations/{organizationId}/imports/account_settings/{importId}".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'importId' + '}', import_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(['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 => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkImportsApi#delete_bulk_account_settings_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Deletes a User Import request # Required scopes: user_write # @param organization_id The organization ID Guid # @param import_id The import ID Guid for the request # @return [Object] def delete_bulk_user_import(organization_id, import_id) data, _status_code, _headers = delete_bulk_user_import_with_http_info(organization_id, import_id) return data end # Deletes a User Import request # Required scopes: user_write # @param organization_id The organization ID Guid # @param import_id The import ID Guid for the request # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers def delete_bulk_user_import_with_http_info(organization_id, import_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkImportsApi.delete_bulk_user_import ..." end # verify the required parameter 'organization_id' is set fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkImportsApi.delete_bulk_user_import" if organization_id.nil? # verify the required parameter 'import_id' is set fail ArgumentError, "Missing the required parameter 'import_id' when calling BulkImportsApi.delete_bulk_user_import" if import_id.nil? # resource path local_var_path = "/v2/organizations/{organizationId}/imports/bulk_users/{importId}".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'importId' + '}', import_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(['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 => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkImportsApi#delete_bulk_user_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Returns the details/metadata for a Bulk Account Settings Import request # Required scopes: account_read # @param organization_id The organization ID Guid # @param import_id The import ID Guid for the request # @return [OrganizationAccountSettingsImportResponse] def get_bulk_account_settings_import(organization_id, import_id) data, _status_code, _headers = get_bulk_account_settings_import_with_http_info(organization_id, import_id) return data end # Returns the details/metadata for a Bulk Account Settings Import request # Required scopes: account_read # @param organization_id The organization ID Guid # @param import_id The import ID Guid for the request # @return [Array<(OrganizationAccountSettingsImportResponse, Fixnum, Hash)>] OrganizationAccountSettingsImportResponse data, response status code and response headers def get_bulk_account_settings_import_with_http_info(organization_id, import_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkImportsApi.get_bulk_account_settings_import ..." end # verify the required parameter 'organization_id' is set fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkImportsApi.get_bulk_account_settings_import" if organization_id.nil? # verify the required parameter 'import_id' is set fail ArgumentError, "Missing the required parameter 'import_id' when calling BulkImportsApi.get_bulk_account_settings_import" if import_id.nil? # resource path local_var_path = "/v2/organizations/{organizationId}/imports/account_settings/{importId}".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'importId' + '}', import_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(['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 => 'OrganizationAccountSettingsImportResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkImportsApi#get_bulk_account_settings_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Returns the details/metadata for Bulk Account Settings Import requests in the organization # Required scopes: account_read # @param organization_id The organization ID Guid # @return [Array] def get_bulk_account_settings_imports(organization_id) data, _status_code, _headers = get_bulk_account_settings_imports_with_http_info(organization_id) return data end # Returns the details/metadata for Bulk Account Settings Import requests in the organization # Required scopes: account_read # @param organization_id The organization ID Guid # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def get_bulk_account_settings_imports_with_http_info(organization_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkImportsApi.get_bulk_account_settings_imports ..." end # verify the required parameter 'organization_id' is set fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkImportsApi.get_bulk_account_settings_imports" if organization_id.nil? # resource path local_var_path = "/v2/organizations/{organizationId}/imports/account_settings".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_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(['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 => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkImportsApi#get_bulk_account_settings_imports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Returns a text/csv file with user details for a User Import request # Required scopes: user_read # @param organization_id The organization ID Guid # @param import_id The import ID Guid for the request # @return [Object] def get_bulk_user_import_csv(organization_id, import_id) data, _status_code, _headers = get_bulk_user_import_csv_with_http_info(organization_id, import_id) return data end # Returns a text/csv file with user details for a User Import request # Required scopes: user_read # @param organization_id The organization ID Guid # @param import_id The import ID Guid for the request # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers def get_bulk_user_import_csv_with_http_info(organization_id, import_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkImportsApi.get_bulk_user_import_csv ..." end # verify the required parameter 'organization_id' is set fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkImportsApi.get_bulk_user_import_csv" if organization_id.nil? # verify the required parameter 'import_id' is set fail ArgumentError, "Missing the required parameter 'import_id' when calling BulkImportsApi.get_bulk_user_import_csv" if import_id.nil? # resource path local_var_path = "/v2/organizations/{organizationId}/imports/bulk_users/{importId}/results_csv".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'importId' + '}', import_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/csv']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['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 => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkImportsApi#get_bulk_user_import_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Returns the details/metadata for a User Import request # Required scopes: user_read # @param organization_id The organization ID Guid # @param import_id The import ID Guid for the request # @return [OrganizationImportResponse] def get_bulk_user_import_request(organization_id, import_id) data, _status_code, _headers = get_bulk_user_import_request_with_http_info(organization_id, import_id) return data end # Returns the details/metadata for a User Import request # Required scopes: user_read # @param organization_id The organization ID Guid # @param import_id The import ID Guid for the request # @return [Array<(OrganizationImportResponse, Fixnum, Hash)>] OrganizationImportResponse data, response status code and response headers def get_bulk_user_import_request_with_http_info(organization_id, import_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkImportsApi.get_bulk_user_import_request ..." end # verify the required parameter 'organization_id' is set fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkImportsApi.get_bulk_user_import_request" if organization_id.nil? # verify the required parameter 'import_id' is set fail ArgumentError, "Missing the required parameter 'import_id' when calling BulkImportsApi.get_bulk_user_import_request" if import_id.nil? # resource path local_var_path = "/v2/organizations/{organizationId}/imports/bulk_users/{importId}".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'importId' + '}', import_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(['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 => 'OrganizationImportResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkImportsApi#get_bulk_user_import_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Returns the details/metadata for Bulk User Import requests in the organization # Required scopes: user_read # @param organization_id The organization ID Guid # @return [OrganizationImportsResponse] def get_bulk_user_import_requests(organization_id) data, _status_code, _headers = get_bulk_user_import_requests_with_http_info(organization_id) return data end # Returns the details/metadata for Bulk User Import requests in the organization # Required scopes: user_read # @param organization_id The organization ID Guid # @return [Array<(OrganizationImportsResponse, Fixnum, Hash)>] OrganizationImportsResponse data, response status code and response headers def get_bulk_user_import_requests_with_http_info(organization_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkImportsApi.get_bulk_user_import_requests ..." end # verify the required parameter 'organization_id' is set fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkImportsApi.get_bulk_user_import_requests" if organization_id.nil? # resource path local_var_path = "/v2/organizations/{organizationId}/imports/bulk_users".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_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(['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 => 'OrganizationImportsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkImportsApi#get_bulk_user_import_requests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end