lib/purecloud/api/content_management_api.rb in purecloud-0.44.1 vs lib/purecloud/api/content_management_api.rb in purecloud-0.45.1

- old
+ new

@@ -1774,34 +1774,37 @@ return data, status_code, headers end # Add a document. # + # @param body Document # @param [Hash] opts the optional parameters - # @option opts [DocumentUpload] :body Document # @option opts [String] :copy_source Copy a document within a workspace or to a new workspace. Provide a document ID as the copy source. # @option opts [String] :move_source Move a document to a new workspace. Provide a document ID as the move source. # @option opts [BOOLEAN] :override Override any lock on the source document # @return [Document] - def post_documents(opts = {}) - data, status_code, headers = post_documents_with_http_info(opts) + def post_documents(body, opts = {}) + data, status_code, headers = post_documents_with_http_info(body, opts) return data end # Add a document. # + # @param body Document # @param [Hash] opts the optional parameters - # @option opts [DocumentUpload] :body Document # @option opts [String] :copy_source Copy a document within a workspace or to a new workspace. Provide a document ID as the copy source. # @option opts [String] :move_source Move a document to a new workspace. Provide a document ID as the move source. # @option opts [BOOLEAN] :override Override any lock on the source document # @return [Array<(Document, Fixnum, Hash)>] Document data, response status code and response headers - def post_documents_with_http_info(opts = {}) + def post_documents_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi#post_documents ..." end + # verify the required parameter 'body' is set + fail "Missing the required parameter 'body' when calling post_documents" if body.nil? + # resource path local_var_path = "/api/v2/contentmanagement/documents".sub('{format}','json') # query parameters query_params = {} @@ -1822,11 +1825,11 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, @@ -1841,36 +1844,39 @@ end # Update a document. # # @param document_id Document ID + # @param body Document # @param [Hash] opts the optional parameters - # @option opts [DocumentUpdate] :body Document # @option opts [String] :expand Expand some document fields # @option opts [BOOLEAN] :override Override any lock on the document # @return [Document] - def post_documents_document_id(document_id, opts = {}) - data, status_code, headers = post_documents_document_id_with_http_info(document_id, opts) + def post_documents_document_id(document_id, body, opts = {}) + data, status_code, headers = post_documents_document_id_with_http_info(document_id, body, opts) return data end # Update a document. # # @param document_id Document ID + # @param body Document # @param [Hash] opts the optional parameters - # @option opts [DocumentUpdate] :body Document # @option opts [String] :expand Expand some document fields # @option opts [BOOLEAN] :override Override any lock on the document # @return [Array<(Document, Fixnum, Hash)>] Document data, response status code and response headers - def post_documents_document_id_with_http_info(document_id, opts = {}) + def post_documents_document_id_with_http_info(document_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi#post_documents_document_id ..." end # verify the required parameter 'document_id' is set fail "Missing the required parameter 'document_id' when calling post_documents_document_id" if document_id.nil? + # verify the required parameter 'body' is set + fail "Missing the required parameter 'body' when calling post_documents_document_id" if body.nil? + if opts[:'expand'] && !['acl'].include?(opts[:'expand']) fail 'invalid value for "expand", must be one of acl' end # resource path @@ -1894,11 +1900,11 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, @@ -1913,34 +1919,37 @@ end # Replace the contents of a document. # # @param document_id Document ID + # @param body Replace Request # @param [Hash] opts the optional parameters - # @option opts [ReplaceRequest] :body Replace Request # @option opts [BOOLEAN] :override Override any lock on the document # @return [ReplaceResponse] - def post_documents_document_id_content(document_id, opts = {}) - data, status_code, headers = post_documents_document_id_content_with_http_info(document_id, opts) + def post_documents_document_id_content(document_id, body, opts = {}) + data, status_code, headers = post_documents_document_id_content_with_http_info(document_id, body, opts) return data end # Replace the contents of a document. # # @param document_id Document ID + # @param body Replace Request # @param [Hash] opts the optional parameters - # @option opts [ReplaceRequest] :body Replace Request # @option opts [BOOLEAN] :override Override any lock on the document # @return [Array<(ReplaceResponse, Fixnum, Hash)>] ReplaceResponse data, response status code and response headers - def post_documents_document_id_content_with_http_info(document_id, opts = {}) + def post_documents_document_id_content_with_http_info(document_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi#post_documents_document_id_content ..." end # verify the required parameter 'document_id' is set fail "Missing the required parameter 'document_id' when calling post_documents_document_id_content" if document_id.nil? + # verify the required parameter 'body' is set + fail "Missing the required parameter 'body' when calling post_documents_document_id_content" if body.nil? + # resource path local_var_path = "/api/v2/contentmanagement/documents/{documentId}/content".sub('{format}','json').sub('{' + 'documentId' + '}', document_id.to_s) # query parameters query_params = {} @@ -1959,11 +1968,11 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, @@ -2044,28 +2053,31 @@ return data, status_code, headers end # Creates a new share or updates an existing share if the entity has already been shared # + # @param body CreateShareRequest - entity id and type and a single member or list of members are required # @param [Hash] opts the optional parameters - # @option opts [CreateShareRequest] :body CreateShareRequest - entity id and type and a single member or list of members are required # @return [CreateShareResponse] - def post_shares(opts = {}) - data, status_code, headers = post_shares_with_http_info(opts) + def post_shares(body, opts = {}) + data, status_code, headers = post_shares_with_http_info(body, opts) return data end # Creates a new share or updates an existing share if the entity has already been shared # + # @param body CreateShareRequest - entity id and type and a single member or list of members are required # @param [Hash] opts the optional parameters - # @option opts [CreateShareRequest] :body CreateShareRequest - entity id and type and a single member or list of members are required # @return [Array<(CreateShareResponse, Fixnum, Hash)>] CreateShareResponse data, response status code and response headers - def post_shares_with_http_info(opts = {}) + def post_shares_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi#post_shares ..." end + # verify the required parameter 'body' is set + fail "Missing the required parameter 'body' when calling post_shares" if body.nil? + # resource path local_var_path = "/api/v2/contentmanagement/shares".sub('{format}','json') # query parameters query_params = {} @@ -2083,11 +2095,11 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, @@ -2101,28 +2113,31 @@ return data, status_code, headers end # Create a group workspace # + # @param body Workspace # @param [Hash] opts the optional parameters - # @option opts [WorkspaceCreate] :body Workspace # @return [Workspace] - def post_workspaces(opts = {}) - data, status_code, headers = post_workspaces_with_http_info(opts) + def post_workspaces(body, opts = {}) + data, status_code, headers = post_workspaces_with_http_info(body, opts) return data end # Create a group workspace # + # @param body Workspace # @param [Hash] opts the optional parameters - # @option opts [WorkspaceCreate] :body Workspace # @return [Array<(Workspace, Fixnum, Hash)>] Workspace data, response status code and response headers - def post_workspaces_with_http_info(opts = {}) + def post_workspaces_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi#post_workspaces ..." end + # verify the required parameter 'body' is set + fail "Missing the required parameter 'body' when calling post_workspaces" if body.nil? + # resource path local_var_path = "/api/v2/contentmanagement/workspaces".sub('{format}','json') # query parameters query_params = {} @@ -2140,11 +2155,11 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, @@ -2159,32 +2174,35 @@ end # Create a workspace tag # # @param workspace_id Workspace ID + # @param body tag # @param [Hash] opts the optional parameters - # @option opts [TagValue] :body tag # @return [TagValue] - def post_workspaces_workspace_id_tagvalues(workspace_id, opts = {}) - data, status_code, headers = post_workspaces_workspace_id_tagvalues_with_http_info(workspace_id, opts) + def post_workspaces_workspace_id_tagvalues(workspace_id, body, opts = {}) + data, status_code, headers = post_workspaces_workspace_id_tagvalues_with_http_info(workspace_id, body, opts) return data end # Create a workspace tag # # @param workspace_id Workspace ID + # @param body tag # @param [Hash] opts the optional parameters - # @option opts [TagValue] :body tag # @return [Array<(TagValue, Fixnum, Hash)>] TagValue data, response status code and response headers - def post_workspaces_workspace_id_tagvalues_with_http_info(workspace_id, opts = {}) + def post_workspaces_workspace_id_tagvalues_with_http_info(workspace_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi#post_workspaces_workspace_id_tagvalues ..." end # verify the required parameter 'workspace_id' is set fail "Missing the required parameter 'workspace_id' when calling post_workspaces_workspace_id_tagvalues" if workspace_id.nil? + # verify the required parameter 'body' is set + fail "Missing the required parameter 'body' when calling post_workspaces_workspace_id_tagvalues" if body.nil? + # resource path local_var_path = "/api/v2/contentmanagement/workspaces/{workspaceId}/tagvalues".sub('{format}','json').sub('{' + 'workspaceId' + '}', workspace_id.to_s) # query parameters query_params = {} @@ -2202,11 +2220,11 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, @@ -2221,34 +2239,37 @@ end # Perform a prefix query on tags in the workspace # # @param workspace_id Workspace ID + # @param body query # @param [Hash] opts the optional parameters - # @option opts [TagQueryRequest] :body query # @option opts [String] :expand Expand some document fields # @return [TagValueEntityListing] - def post_workspaces_workspace_id_tagvalues_query(workspace_id, opts = {}) - data, status_code, headers = post_workspaces_workspace_id_tagvalues_query_with_http_info(workspace_id, opts) + def post_workspaces_workspace_id_tagvalues_query(workspace_id, body, opts = {}) + data, status_code, headers = post_workspaces_workspace_id_tagvalues_query_with_http_info(workspace_id, body, opts) return data end # Perform a prefix query on tags in the workspace # # @param workspace_id Workspace ID + # @param body query # @param [Hash] opts the optional parameters - # @option opts [TagQueryRequest] :body query # @option opts [String] :expand Expand some document fields # @return [Array<(TagValueEntityListing, Fixnum, Hash)>] TagValueEntityListing data, response status code and response headers - def post_workspaces_workspace_id_tagvalues_query_with_http_info(workspace_id, opts = {}) + def post_workspaces_workspace_id_tagvalues_query_with_http_info(workspace_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi#post_workspaces_workspace_id_tagvalues_query ..." end # verify the required parameter 'workspace_id' is set fail "Missing the required parameter 'workspace_id' when calling post_workspaces_workspace_id_tagvalues_query" if workspace_id.nil? + # verify the required parameter 'body' is set + fail "Missing the required parameter 'body' when calling post_workspaces_workspace_id_tagvalues_query" if body.nil? + if opts[:'expand'] && !['acl'].include?(opts[:'expand']) fail 'invalid value for "expand", must be one of acl' end # resource path @@ -2271,11 +2292,11 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, @@ -2290,32 +2311,35 @@ end # Update a workspace # # @param workspace_id Workspace ID + # @param body Workspace # @param [Hash] opts the optional parameters - # @option opts [Workspace] :body Workspace # @return [Workspace] - def put_workspaces_workspace_id(workspace_id, opts = {}) - data, status_code, headers = put_workspaces_workspace_id_with_http_info(workspace_id, opts) + def put_workspaces_workspace_id(workspace_id, body, opts = {}) + data, status_code, headers = put_workspaces_workspace_id_with_http_info(workspace_id, body, opts) return data end # Update a workspace # # @param workspace_id Workspace ID + # @param body Workspace # @param [Hash] opts the optional parameters - # @option opts [Workspace] :body Workspace # @return [Array<(Workspace, Fixnum, Hash)>] Workspace data, response status code and response headers - def put_workspaces_workspace_id_with_http_info(workspace_id, opts = {}) + def put_workspaces_workspace_id_with_http_info(workspace_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi#put_workspaces_workspace_id ..." end # verify the required parameter 'workspace_id' is set fail "Missing the required parameter 'workspace_id' when calling put_workspaces_workspace_id" if workspace_id.nil? + # verify the required parameter 'body' is set + fail "Missing the required parameter 'body' when calling put_workspaces_workspace_id" if body.nil? + # resource path local_var_path = "/api/v2/contentmanagement/workspaces/{workspaceId}".sub('{format}','json').sub('{' + 'workspaceId' + '}', workspace_id.to_s) # query parameters query_params = {} @@ -2333,11 +2357,11 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, @@ -2353,36 +2377,39 @@ # Add a member to a workspace # # @param workspace_id Workspace ID # @param member_id Member ID + # @param body Workspace # @param [Hash] opts the optional parameters - # @option opts [WorkspaceMember] :body Workspace # @return [WorkspaceMember] - def put_workspaces_workspace_id_members_member_id(workspace_id, member_id, opts = {}) - data, status_code, headers = put_workspaces_workspace_id_members_member_id_with_http_info(workspace_id, member_id, opts) + def put_workspaces_workspace_id_members_member_id(workspace_id, member_id, body, opts = {}) + data, status_code, headers = put_workspaces_workspace_id_members_member_id_with_http_info(workspace_id, member_id, body, opts) return data end # Add a member to a workspace # # @param workspace_id Workspace ID # @param member_id Member ID + # @param body Workspace # @param [Hash] opts the optional parameters - # @option opts [WorkspaceMember] :body Workspace # @return [Array<(WorkspaceMember, Fixnum, Hash)>] WorkspaceMember data, response status code and response headers - def put_workspaces_workspace_id_members_member_id_with_http_info(workspace_id, member_id, opts = {}) + def put_workspaces_workspace_id_members_member_id_with_http_info(workspace_id, member_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi#put_workspaces_workspace_id_members_member_id ..." end # verify the required parameter 'workspace_id' is set fail "Missing the required parameter 'workspace_id' when calling put_workspaces_workspace_id_members_member_id" if workspace_id.nil? # verify the required parameter 'member_id' is set fail "Missing the required parameter 'member_id' when calling put_workspaces_workspace_id_members_member_id" if member_id.nil? + # verify the required parameter 'body' is set + fail "Missing the required parameter 'body' when calling put_workspaces_workspace_id_members_member_id" if body.nil? + # resource path local_var_path = "/api/v2/contentmanagement/workspaces/{workspaceId}/members/{memberId}".sub('{format}','json').sub('{' + 'workspaceId' + '}', workspace_id.to_s).sub('{' + 'memberId' + '}', member_id.to_s) # query parameters query_params = {} @@ -2400,11 +2427,11 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, @@ -2420,36 +2447,39 @@ # Update a workspace tag. Will update all documents with the new tag value. # # @param workspace_id Workspace ID # @param tag_id Tag ID + # @param body Workspace # @param [Hash] opts the optional parameters - # @option opts [TagValue] :body Workspace # @return [TagValue] - def put_workspaces_workspace_id_tagvalues_tag_id(workspace_id, tag_id, opts = {}) - data, status_code, headers = put_workspaces_workspace_id_tagvalues_tag_id_with_http_info(workspace_id, tag_id, opts) + def put_workspaces_workspace_id_tagvalues_tag_id(workspace_id, tag_id, body, opts = {}) + data, status_code, headers = put_workspaces_workspace_id_tagvalues_tag_id_with_http_info(workspace_id, tag_id, body, opts) return data end # Update a workspace tag. Will update all documents with the new tag value. # # @param workspace_id Workspace ID # @param tag_id Tag ID + # @param body Workspace # @param [Hash] opts the optional parameters - # @option opts [TagValue] :body Workspace # @return [Array<(TagValue, Fixnum, Hash)>] TagValue data, response status code and response headers - def put_workspaces_workspace_id_tagvalues_tag_id_with_http_info(workspace_id, tag_id, opts = {}) + def put_workspaces_workspace_id_tagvalues_tag_id_with_http_info(workspace_id, tag_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi#put_workspaces_workspace_id_tagvalues_tag_id ..." end # verify the required parameter 'workspace_id' is set fail "Missing the required parameter 'workspace_id' when calling put_workspaces_workspace_id_tagvalues_tag_id" if workspace_id.nil? # verify the required parameter 'tag_id' is set fail "Missing the required parameter 'tag_id' when calling put_workspaces_workspace_id_tagvalues_tag_id" if tag_id.nil? + # verify the required parameter 'body' is set + fail "Missing the required parameter 'body' when calling put_workspaces_workspace_id_tagvalues_tag_id" if body.nil? + # resource path local_var_path = "/api/v2/contentmanagement/workspaces/{workspaceId}/tagvalues/{tagId}".sub('{format}','json').sub('{' + 'workspaceId' + '}', workspace_id.to_s).sub('{' + 'tagId' + '}', tag_id.to_s) # query parameters query_params = {} @@ -2467,10 +2497,10 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params,