lib/oci/announcements_service/announcement_client.rb
# Updates the status of the specified announcement with regard to whether it has been marked as read.
#
# @param [String] announcement_id The OCID of the announcement.
# @param [OCI::AnnouncementsService::Models::AnnouncementUserStatusDetails] status_details The information to use to update the announcement's read status.
# @param [Hash] opts the optional parameters
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
#   retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
# @option opts [String] :if_match The locking version, used for optimistic concurrency control.
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about
#   a particular request, please provide the complete request ID.
#
# @return [Response] A Response object with data of type nil
Updates the status of the specified announcement with regard to whether it has been marked as read.
Updates the status of the specified announcement with regard to whether it has been marked as read .
def update_announcement_user_status(announcement_id, status_details, opts = {})
      logger.debug 'Calling operation AnnouncementClient#update_announcement_user_status.' if logger
      raise "Missing the required parameter 'announcement_id' when calling update_announcement_user_status." if announcement_id.nil?
      raise "Missing the required parameter 'status_details' when calling update_announcement_user_status." if status_details.nil?
      raise "Parameter value for 'announcement_id' must not be blank" if OCI::Internal::Util.blank_string?(announcement_id)
      path = '/announcements/{announcementId}/userStatus'.sub('{announcementId}', announcement_id.to_s)
      operation_signing_strategy = :standard
      query_params = {}
      header_params = {}
      header_params[:accept] = 'application/json'
      header_params[:'content-type'] = 'application/json'
      header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
      header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
      post_body = @api_client.object_to_http_body(status_details)
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'AnnouncementClient#update_announcement_user_status') do
        @api_client.call_api(
          :PUT,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body
        )
      end
    end
def update_announcement_user_status ( announcement_id , status_details , opts = { } ) logger . debug 'Calling operation AnnouncementClient#update_announcement_user_status.' if logger raise "Missing the required parameter 'announcement_id' when calling update_announcement_user_status." if announcement_id . nil? raise "Missing the required parameter 'status_details' when calling update_announcement_user_status." if status_details . nil? raise "Parameter value for 'announcement_id' must not be blank" if OCI :: Internal :: Util . blank_string? ( announcement_id ) path = '/announcements/{announcementId}/userStatus' . sub ( '{announcementId}' , announcement_id . to_s ) operation_signing_strategy = :standard query_params = { } header_params = { } header_params [ :accept ] = 'application/json' header_params [ :' content-type ' ] = 'application/json' header_params [ :' if-match ' ] = opts [ :if_match ] if opts [ :if_match ] header_params [ :' opc-request-id ' ] = opts [ :opc_request_id ] if opts [ :opc_request_id ] post_body = @api_client . object_to_http_body ( status_details ) OCI :: Retry . make_retrying_call ( applicable_retry_config ( opts ) , call_name : 'AnnouncementClient#update_announcement_user_status' ) do @api_client . call_api ( :PUT , path , endpoint , header_params : header_params , query_params : query_params , operation_signing_strategy : operation_signing_strategy , body : post_body ) end end
Updates the status of the specified announcement with regard to whether it has been marked as read.
Updates the status of the specified announcement with regard to whether it has been marked as read .
# rubocop:disable Style/NegatedIf # Query Params # Header Params # rubocop:enable Style/NegatedIf # rubocop:disable Metrics/BlockLength # rubocop:enable Metrics/BlockLength
A Response object with data of type nil
A Response object with data of type nil
Response
announcement_id
status_details
opts
:opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the complete request ID.
: opc_request_id The unique Oracle - assigned identifier for the request . If you need to contact Oracle about a particular request please provide the complete request ID .
opts the optional parameters
opts the optional parameters