Class: Api::V2::TubeResource

Inherits:
BaseResource
  • Object
show all
Includes:
SharedBehaviour::Labware
Defined in:
app/resources/api/v2/tube_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:

This resource is immutable: its endpoint will not accept POST, PATCH, or DELETE requests.

Note:

Access this resource via the /api/v2/tubes/ endpoint.

Provides a JSON:API representation of Tube.

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

Method Summary

Methods included from SharedBehaviour::Labware

#labware_barcode

Methods inherited from BaseResource

apply_includes, creatable_fields, default_includes, #fetchable_fields, inclusions, resolve_relationship_names_to_relations, updatable_fields

Instance Attribute Details

#aliquotsArray<Api::V2::AliquotResource> (readonly)

Returns An array of aliquots contained by this tube.

Returns:



42
# File 'app/resources/api/v2/tube_resource.rb', line 42

has_many :aliquots, readonly: true

#receptacleApi::V2::ReceptacleResource (readonly)

Returns The receptacle of aliquots associated with this tube.

Returns:



46
# File 'app/resources/api/v2/tube_resource.rb', line 46

has_one :receptacle, readonly: true, foreign_key_on: :related

#sibling_tubesArray<Hash> (readonly)

Returns An array of hashes containing the metadata for sibling tubes.

Returns:

  • (Array<Hash>)

    An array of hashes containing the metadata for sibling tubes.



30
# File 'app/resources/api/v2/tube_resource.rb', line 30

attribute :sibling_tubes, readonly: true

#transfer_requests_as_targetArray<Api::V2::TransferRequestResource> (readonly)

Returns An array of transfer requests into this tube.

Returns:



50
# File 'app/resources/api/v2/tube_resource.rb', line 50

has_many :transfer_requests_as_target, readonly: true