Class: V1::Ont::RequestResource

Inherits:
JSONAPI::Resource
  • Object
show all
Includes:
Shared::SourceIdentifierFilterable
Defined in:
app/resources/v1/ont/request_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/ont/requests/ endpoint.

Provides a JSON:API representation of Ont::Request.

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

Class Method Summary collapse

Instance Attribute Details

#cost_codeString

Returns the cost code associated with the request.

Returns:

  • (String)

    the cost code associated with the request


30
# File 'app/resources/v1/ont/request_resource.rb', line 30

attributes(*::Ont.request_attributes)

#created_atString (readonly)

Returns the creation timestamp of the request.

Returns:

  • (String)

    the creation timestamp of the request


40
41
# File 'app/resources/v1/ont/request_resource.rb', line 40

attributes :sample_name, :sample_retention_instruction, :source_identifier, :created_at,
readonly: true

#data_typeString

Returns the type of the data.

Returns:

  • (String)

    the type of the data


30
# File 'app/resources/v1/ont/request_resource.rb', line 30

attributes(*::Ont.request_attributes)

#external_study_idString

Returns the external study identifier.

Returns:

  • (String)

    the external study identifier


30
# File 'app/resources/v1/ont/request_resource.rb', line 30

attributes(*::Ont.request_attributes)

#library_typeString

Returns the type of the library.

Returns:

  • (String)

    the type of the library


30
# File 'app/resources/v1/ont/request_resource.rb', line 30

attributes(*::Ont.request_attributes)

#number_of_flowcellsInteger

Returns the number of flowcells requested.

Returns:

  • (Integer)

    the number of flowcells requested


30
# File 'app/resources/v1/ont/request_resource.rb', line 30

attributes(*::Ont.request_attributes)

#sample_nameString (readonly)

Returns the name of the sample.

Returns:

  • (String)

    the name of the sample


40
41
# File 'app/resources/v1/ont/request_resource.rb', line 40

attributes :sample_name, :sample_retention_instruction, :source_identifier, :created_at,
readonly: true

#sample_retention_instructionString (readonly)

Returns the retention instruction for the sample.

Returns:

  • (String)

    the retention instruction for the sample


40
41
# File 'app/resources/v1/ont/request_resource.rb', line 40

attributes :sample_name, :sample_retention_instruction, :source_identifier, :created_at,
readonly: true

#source_identifierString (readonly)

Returns the source identifier of the request.

Returns:

  • (String)

    the source identifier of the request


40
41
# File 'app/resources/v1/ont/request_resource.rb', line 40

attributes :sample_name, :sample_retention_instruction, :source_identifier, :created_at,
readonly: true

Class Method Details

.default_sortObject

[View source]

53
54
55
# File 'app/resources/v1/ont/request_resource.rb', line 53

def self.default_sort
  [{ field: 'created_at', direction: :desc }]
end

.records_for_populate(*_args) ⇒ Object

[View source]

77
78
79
# File 'app/resources/v1/ont/request_resource.rb', line 77

def self.records_for_populate(*_args)
  super.preload(:library_type, :data_type)
end