Class: V1::QcResultsUploadResource

Inherits:
JSONAPI::Resource
  • Object
show all
Defined in:
app/resources/v1/qc_results_upload_resource.rb

Overview

TODO:

This documentation does not yet include a detailed description of what this resource represents.

TODO:

This documentation does not yet include detailed descriptions for relationships, attributes and filters.

TODO:

This documentation does not yet include any example usage of the API via cURL or similar.

Note:

Access this resource via the /v1/qc_results endpoint.

Steps:

  1. Validate QcResultsUpload data (via QcResultsUploadFactory validation)

  2. Create QcResultsUpload entity

  3. Create QcDecisions, QcResults, QcDecisionResult entities

  4. Build QcResultMessages

  5. Publish QcResultMessages

For more information about JSON:API see the JSON:API Specifications or look at the JSONAPI::Resources package for the service implementation of the JSON:API standard.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#csv_dataString

Returns the CSV data for the QC results upload.

Returns:

  • (String)

    the CSV data for the QC results upload



28
# File 'app/resources/v1/qc_results_upload_resource.rb', line 28

attributes :csv_data, :used_by

#used_byString

Returns the user who uploaded the QC results.

Returns:

  • (String)

    the user who uploaded the QC results



28
# File 'app/resources/v1/qc_results_upload_resource.rb', line 28

attributes :csv_data, :used_by

Instance Method Details

#publish_messagesObject



36
37
38
# File 'app/resources/v1/qc_results_upload_resource.rb', line 36

def publish_messages
  Messages.publish(@model.messages, Pipelines.qc_result.message)
end