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



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

attributes(*::Ont.request_attributes, :sample_name, :source_identifier, :created_at)

#created_atString

Returns the creation timestamp of the request.

Returns:

  • (String)

    the creation timestamp of the request



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

attributes(*::Ont.request_attributes, :sample_name, :source_identifier, :created_at)

#data_typeString

Returns the type of the data.

Returns:

  • (String)

    the type of the data



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

attributes(*::Ont.request_attributes, :sample_name, :source_identifier, :created_at)

#external_study_idString

Returns the external study identifier.

Returns:

  • (String)

    the external study identifier



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

attributes(*::Ont.request_attributes, :sample_name, :source_identifier, :created_at)

#library_typeString

Returns the type of the library.

Returns:

  • (String)

    the type of the library



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

attributes(*::Ont.request_attributes, :sample_name, :source_identifier, :created_at)

#number_of_flowcellsInteger

Returns the number of flowcells requested.

Returns:

  • (Integer)

    the number of flowcells requested



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

attributes(*::Ont.request_attributes, :sample_name, :source_identifier, :created_at)

#sample_nameString

Returns the name of the sample.

Returns:

  • (String)

    the name of the sample



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

attributes(*::Ont.request_attributes, :sample_name, :source_identifier, :created_at)

#source_identifierString

Returns the source identifier of the request.

Returns:

  • (String)

    the source identifier of the request



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

attributes(*::Ont.request_attributes, :sample_name, :source_identifier, :created_at)

Class Method Details

.default_sortObject



48
49
50
# File 'app/resources/v1/ont/request_resource.rb', line 48

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

.records_for_populate(*_args) ⇒ Object



72
73
74
# File 'app/resources/v1/ont/request_resource.rb', line 72

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