=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 BulkExportsApi attr_accessor :api_client def initialize(api_client = BulkExportsApi.default) @api_client = api_client end # Creates a new Account Setting Export request. # Required scopes: account_read # @param organization_id The organization ID Guid # @param request Request body containing details about the accounts be compared # @return [OrganizationExportResponse] def create_account_settings_export(organization_id, request) data, _status_code, _headers = create_account_settings_export_with_http_info(organization_id, request) return data end # Creates a new Account Setting Export request. # Required scopes: account_read # @param organization_id The organization ID Guid # @param request Request body containing details about the accounts be compared # @return [Array<(OrganizationExportResponse, Fixnum, Hash)>] OrganizationExportResponse data, response status code and response headers def create_account_settings_export_with_http_info(organization_id, request) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkExportsApi.create_account_settings_export ..." end # verify the required parameter 'organization_id' is set fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkExportsApi.create_account_settings_export" if organization_id.nil? # verify the required parameter 'request' is set fail ArgumentError, "Missing the required parameter 'request' when calling BulkExportsApi.create_account_settings_export" if request.nil? # resource path local_var_path = "/v2/organizations/{organizationId}/exports/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 = @api_client.object_to_http_body(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 => 'OrganizationExportResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkExportsApi#create_account_settings_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Creates a new User List Export request. # Required scopes: user_read # @param organization_id The organization ID Guid # @param request Request body containing details about what is to be exported # @return [OrganizationExportResponse] def create_user_list_export(organization_id, request) data, _status_code, _headers = create_user_list_export_with_http_info(organization_id, request) return data end # Creates a new User List Export request. # Required scopes: user_read # @param organization_id The organization ID Guid # @param request Request body containing details about what is to be exported # @return [Array<(OrganizationExportResponse, Fixnum, Hash)>] OrganizationExportResponse data, response status code and response headers def create_user_list_export_with_http_info(organization_id, request) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkExportsApi.create_user_list_export ..." end # verify the required parameter 'organization_id' is set fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkExportsApi.create_user_list_export" if organization_id.nil? # verify the required parameter 'request' is set fail ArgumentError, "Missing the required parameter 'request' when calling BulkExportsApi.create_user_list_export" if request.nil? # resource path local_var_path = "/v2/organizations/{organizationId}/exports/user_list".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 = @api_client.object_to_http_body(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 => 'OrganizationExportResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkExportsApi#create_user_list_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Deletes a single Account Settings Export request # Required scopes: account_read # @param organization_id The organization ID Guid # @param export_id The export ID Guid for the request # @return [Object] def delete_account_settings_export(organization_id, export_id) data, _status_code, _headers = delete_account_settings_export_with_http_info(organization_id, export_id) return data end # Deletes a single Account Settings Export request # Required scopes: account_read # @param organization_id The organization ID Guid # @param export_id The export ID Guid for the request # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers def delete_account_settings_export_with_http_info(organization_id, export_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkExportsApi.delete_account_settings_export ..." end # verify the required parameter 'organization_id' is set fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkExportsApi.delete_account_settings_export" if organization_id.nil? # verify the required parameter 'export_id' is set fail ArgumentError, "Missing the required parameter 'export_id' when calling BulkExportsApi.delete_account_settings_export" if export_id.nil? # resource path local_var_path = "/v2/organizations/{organizationId}/exports/account_settings/{exportId}".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'exportId' + '}', export_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: BulkExportsApi#delete_account_settings_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Deletes a single User List Export request # Required scopes: user_read # @param organization_id The organization ID Guid # @param export_id The export ID Guid for the request # @return [Object] def delete_user_list_export(organization_id, export_id) data, _status_code, _headers = delete_user_list_export_with_http_info(organization_id, export_id) return data end # Deletes a single User List Export request # Required scopes: user_read # @param organization_id The organization ID Guid # @param export_id The export ID Guid for the request # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers def delete_user_list_export_with_http_info(organization_id, export_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkExportsApi.delete_user_list_export ..." end # verify the required parameter 'organization_id' is set fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkExportsApi.delete_user_list_export" if organization_id.nil? # verify the required parameter 'export_id' is set fail ArgumentError, "Missing the required parameter 'export_id' when calling BulkExportsApi.delete_user_list_export" if export_id.nil? # resource path local_var_path = "/v2/organizations/{organizationId}/exports/user_list/{exportId}".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'exportId' + '}', export_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: BulkExportsApi#delete_user_list_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Returns the details/metadata for a single Account Setting Export request # Required scopes: account_read # @param organization_id The organization ID Guid # @param export_id The export ID Guid for the request # @return [OrganizationExportResponse] def get_account_settings_export(organization_id, export_id) data, _status_code, _headers = get_account_settings_export_with_http_info(organization_id, export_id) return data end # Returns the details/metadata for a single Account Setting Export request # Required scopes: account_read # @param organization_id The organization ID Guid # @param export_id The export ID Guid for the request # @return [Array<(OrganizationExportResponse, Fixnum, Hash)>] OrganizationExportResponse data, response status code and response headers def get_account_settings_export_with_http_info(organization_id, export_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkExportsApi.get_account_settings_export ..." end # verify the required parameter 'organization_id' is set fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkExportsApi.get_account_settings_export" if organization_id.nil? # verify the required parameter 'export_id' is set fail ArgumentError, "Missing the required parameter 'export_id' when calling BulkExportsApi.get_account_settings_export" if export_id.nil? # resource path local_var_path = "/v2/organizations/{organizationId}/exports/account_settings/{exportId}".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'exportId' + '}', export_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 => 'OrganizationExportResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkExportsApi#get_account_settings_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Returns the details/metadata for Account Setting Export requests # Required scopes: account_read # @param organization_id The organization ID Guid # @return [OrganizationExportsResponse] def get_account_settings_exports(organization_id) data, _status_code, _headers = get_account_settings_exports_with_http_info(organization_id) return data end # Returns the details/metadata for Account Setting Export requests # Required scopes: account_read # @param organization_id The organization ID Guid # @return [Array<(OrganizationExportsResponse, Fixnum, Hash)>] OrganizationExportsResponse data, response status code and response headers def get_account_settings_exports_with_http_info(organization_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkExportsApi.get_account_settings_exports ..." end # verify the required parameter 'organization_id' is set fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkExportsApi.get_account_settings_exports" if organization_id.nil? # resource path local_var_path = "/v2/organizations/{organizationId}/exports/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 => 'OrganizationExportsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkExportsApi#get_account_settings_exports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Returns the details/metadata for a single User List Export request # Required scopes: user_read # @param organization_id The organization ID Guid # @param export_id The export ID Guid for the request # @return [OrganizationExportResponse] def get_user_list_export(organization_id, export_id) data, _status_code, _headers = get_user_list_export_with_http_info(organization_id, export_id) return data end # Returns the details/metadata for a single User List Export request # Required scopes: user_read # @param organization_id The organization ID Guid # @param export_id The export ID Guid for the request # @return [Array<(OrganizationExportResponse, Fixnum, Hash)>] OrganizationExportResponse data, response status code and response headers def get_user_list_export_with_http_info(organization_id, export_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkExportsApi.get_user_list_export ..." end # verify the required parameter 'organization_id' is set fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkExportsApi.get_user_list_export" if organization_id.nil? # verify the required parameter 'export_id' is set fail ArgumentError, "Missing the required parameter 'export_id' when calling BulkExportsApi.get_user_list_export" if export_id.nil? # resource path local_var_path = "/v2/organizations/{organizationId}/exports/user_list/{exportId}".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'exportId' + '}', export_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 => 'OrganizationExportResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkExportsApi#get_user_list_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Returns a list of existing User List Exports (requests and completed exports) and their details/metadata # Required scopes: user_read # @param organization_id The organization ID Guid # @return [OrganizationExportsResponse] def get_user_list_exports(organization_id) data, _status_code, _headers = get_user_list_exports_with_http_info(organization_id) return data end # Returns a list of existing User List Exports (requests and completed exports) and their details/metadata # Required scopes: user_read # @param organization_id The organization ID Guid # @return [Array<(OrganizationExportsResponse, Fixnum, Hash)>] OrganizationExportsResponse data, response status code and response headers def get_user_list_exports_with_http_info(organization_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BulkExportsApi.get_user_list_exports ..." end # verify the required parameter 'organization_id' is set fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkExportsApi.get_user_list_exports" if organization_id.nil? # resource path local_var_path = "/v2/organizations/{organizationId}/exports/user_list".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 => 'OrganizationExportsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: BulkExportsApi#get_user_list_exports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end