Class: V1::Ont::RequestResource
- Inherits:
-
JSONAPI::Resource
- Object
- JSONAPI::Resource
- V1::Ont::RequestResource
- Includes:
- Shared::SourceIdentifierFilterable
- Defined in:
- app/resources/v1/ont/request_resource.rb
Overview
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. This resource represents an ONT Request and can return all requests, a single request or multiple requests along with their relationships.
Filters:
-
sample_name
-
source_identifier
Instance Attribute Summary collapse
-
#cost_code ⇒ String
The cost code associated with the request.
-
#created_at ⇒ String
readonly
The creation timestamp of the request.
-
#data_type ⇒ String
The type of the data.
-
#external_study_id ⇒ String
The external study identifier.
-
#library_type ⇒ String
The type of the library.
-
#number_of_flowcells ⇒ Integer
The number of flowcells requested.
-
#sample_name ⇒ String
readonly
The name of the sample.
-
#sample_retention_instruction ⇒ String
readonly
The retention instruction for the sample.
-
#source_identifier ⇒ String
readonly
The source identifier of the request.
Class Method Summary collapse
Instance Attribute Details
#cost_code ⇒ String
Returns the cost code associated with the request.
77 |
# File 'app/resources/v1/ont/request_resource.rb', line 77 attributes(*::Ont.request_attributes) |
#created_at ⇒ String (readonly)
Returns the creation timestamp of the request.
87 88 |
# File 'app/resources/v1/ont/request_resource.rb', line 87 attributes :sample_name, :sample_retention_instruction, :source_identifier, :created_at, readonly: true |
#data_type ⇒ String
Returns the type of the data.
77 |
# File 'app/resources/v1/ont/request_resource.rb', line 77 attributes(*::Ont.request_attributes) |
#external_study_id ⇒ String
Returns the external study identifier.
77 |
# File 'app/resources/v1/ont/request_resource.rb', line 77 attributes(*::Ont.request_attributes) |
#library_type ⇒ String
Returns the type of the library.
77 |
# File 'app/resources/v1/ont/request_resource.rb', line 77 attributes(*::Ont.request_attributes) |
#number_of_flowcells ⇒ Integer
Returns the number of flowcells requested.
77 |
# File 'app/resources/v1/ont/request_resource.rb', line 77 attributes(*::Ont.request_attributes) |
#sample_name ⇒ String (readonly)
Returns the name of the sample.
87 88 |
# File 'app/resources/v1/ont/request_resource.rb', line 87 attributes :sample_name, :sample_retention_instruction, :source_identifier, :created_at, readonly: true |
#sample_retention_instruction ⇒ String (readonly)
Returns the retention instruction for the sample.
87 88 |
# File 'app/resources/v1/ont/request_resource.rb', line 87 attributes :sample_name, :sample_retention_instruction, :source_identifier, :created_at, readonly: true |
#source_identifier ⇒ String (readonly)
Returns the source identifier of the request.
87 88 |
# File 'app/resources/v1/ont/request_resource.rb', line 87 attributes :sample_name, :sample_retention_instruction, :source_identifier, :created_at, readonly: true |
Class Method Details
.default_sort ⇒ Object
100 101 102 |
# File 'app/resources/v1/ont/request_resource.rb', line 100 def self.default_sort [{ field: 'created_at', direction: :desc }] end |
.records_for_populate(*_args) ⇒ Object
124 125 126 |
# File 'app/resources/v1/ont/request_resource.rb', line 124 def self.records_for_populate(*_args) super.preload(:library_type, :data_type) end |