Class: Api::V2::TubeResource
- Inherits:
- 
      BaseResource
      
        - Object
- JSONAPI::Resource
- BaseResource
- Api::V2::TubeResource
 
- Includes:
- SharedBehaviour::Labware
- Defined in:
- app/resources/api/v2/tube_resource.rb
Overview
This resource is immutable: its endpoint will not accept POST, PATCH, or DELETE requests.
Access this resource via the /api/v2/tubes/ endpoint.
Provides a JSON:API representation of a Tube.
A Tube is a piece of Labware, which is a container that can hold samples, aliquots, or other entities in a laboratory setting.
For more information about JSON:API see the JSON:API Specifications or look at the JSONAPI::Resources package for Sequencescape's implementation of the JSON:API standard.
Instance Attribute Summary collapse
- 
  
    
      #aliquots  ⇒ Array<Api::V2::AliquotResource> 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    The aliquots contained within this tube. 
- 
  
    
      #racked_tube  ⇒ Api::V2::RackedTubeResource 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    The racked tube association. 
- 
  
    
      #receptacle  ⇒ Api::V2::ReceptacleResource 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    The receptacle associated with aliquots contained by this tube. 
- 
  
    
      #sibling_tubes  ⇒ Array<Hash> 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    An array of hashes containing metadata for sibling tubes. 
- 
  
    
      #transfer_requests_as_target  ⇒ Array<Api::V2::TransferRequestResource> 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    The transfer requests that target this tube. 
Method Summary
Methods included from SharedBehaviour::Labware
Methods inherited from BaseResource
apply_includes, creatable_fields, default_includes, #fetchable_fields, inclusions, resolve_relationship_names_to_relations, updatable_fields
Instance Attribute Details
#aliquots ⇒ Array<Api::V2::AliquotResource> (readonly)
This relationship is read-only and represents the aliquots that are physically stored within the tube.
The aliquots contained within this tube. An aliquot is a portion of the contents from a larger sample, typically for further analysis or experimentation.
| 55 | # File 'app/resources/api/v2/tube_resource.rb', line 55 has_many :aliquots, readonly: true | 
#racked_tube ⇒ Api::V2::RackedTubeResource (readonly)
Returns The racked tube association.
| 74 | # File 'app/resources/api/v2/tube_resource.rb', line 74 has_one :racked_tube, readonly: true, foreign_key_on: :related | 
#receptacle ⇒ Api::V2::ReceptacleResource (readonly)
This relationship is read-only and is primarily used for retrieving information about the receptacle,
The receptacle associated with aliquots contained by this tube. A receptacle can refer to a container that holds multiple aliquots. not for modifying it.
| 63 | # File 'app/resources/api/v2/tube_resource.rb', line 63 has_one :receptacle, readonly: true, foreign_key_on: :related | 
#sibling_tubes ⇒ Array<Hash> (readonly)
This attribute is read-only and may not be present for all tubes, as it depends on the context (e.g., tubes that are part of a group or series).
An array of hashes containing metadata for sibling tubes. Sibling tubes are tubes that share a common ancestor, often used in a grouping of tubes.
| 40 | # File 'app/resources/api/v2/tube_resource.rb', line 40 attribute :sibling_tubes, readonly: true | 
#transfer_requests_as_target ⇒ Array<Api::V2::TransferRequestResource> (readonly)
This relationship is read-only and provides insights into the transfer requests targeting this tube.
The transfer requests that target this tube. A transfer request represents an instruction to move aliquots or samples into the tube.
| 70 | # File 'app/resources/api/v2/tube_resource.rb', line 70 has_many :transfer_requests_as_target, readonly: true |