Class: V1::Ont::TubeResource

Inherits:
JSONAPI::Resource
  • Object
show all
Defined in:
app/resources/v1/ont/tube_resource.rb

Overview

Note:

Access this resource via the /v1/ont/tubes/ endpoint.

Examples:

curl -X GET http://localhost:3100/v1/ont/tubes
curl -X GET "http://localhost:3100/v1/ont/tubes?filter[barcode]=TRAC-2-40,TRAC-2-41"

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#barcode ⇒ String

Returns the barcode of the tube.

Returns:

  • (String) —

    the barcode of the tube



29
# File 'app/resources/v1/ont/tube_resource.rb', line 29

attributes :barcode

#pools ⇒ Array<Pool>

Returns the pools associated with the tube.

Returns:

  • (Array<Pool>) —

    the pools associated with the tube



29
# File 'app/resources/v1/ont/tube_resource.rb', line 29

attributes :barcode

#requests ⇒ Array<Request>

Returns the requests associated with the tube.

Returns:

  • (Array<Request>) —

    the requests associated with the tube



29
# File 'app/resources/v1/ont/tube_resource.rb', line 29

attributes :barcode

Class Method Details

.records(_options = {}) ⇒ Object



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

def self.records(_options = {})
  ::Tube.by_pipeline(:ont)
end