Class: V1::Ont::PoolResource

Inherits:
JSONAPI::Resource
  • Object
show all
Defined in:
app/resources/v1/ont/pool_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/pools/ endpoint.

Provides a JSON:API representation of Ont::Pool.

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 Method Summary collapse

Instance Attribute Details

#concentrationFloat

Returns the concentration of the pool.

Returns:

  • (Float)

    the concentration of the pool



42
43
# File 'app/resources/v1/ont/pool_resource.rb', line 42

attributes :volume, :kit_barcode, :concentration, :insert_size, :created_at, :updated_at,
:library_attributes, :tube_barcode

#created_atString

Returns the creation timestamp of the pool.

Returns:

  • (String)

    the creation timestamp of the pool



42
43
# File 'app/resources/v1/ont/pool_resource.rb', line 42

attributes :volume, :kit_barcode, :concentration, :insert_size, :created_at, :updated_at,
:library_attributes, :tube_barcode

#final_library_amountFloat (readonly)

Returns the final amount of the library in the pool.

Returns:

  • (Float)

    the final amount of the library in the pool



50
# File 'app/resources/v1/ont/pool_resource.rb', line 50

attribute :final_library_amount, readonly: true

#insert_sizeInteger

Returns the insert size of the pool.

Returns:

  • (Integer)

    the insert size of the pool



42
43
# File 'app/resources/v1/ont/pool_resource.rb', line 42

attributes :volume, :kit_barcode, :concentration, :insert_size, :created_at, :updated_at,
:library_attributes, :tube_barcode

#kit_barcodeString

Returns the barcode of the kit used.

Returns:

  • (String)

    the barcode of the kit used



42
43
# File 'app/resources/v1/ont/pool_resource.rb', line 42

attributes :volume, :kit_barcode, :concentration, :insert_size, :created_at, :updated_at,
:library_attributes, :tube_barcode

#library_attributesArray<Hash>

Returns the attributes of the libraries in the pool.

Returns:

  • (Array<Hash>)

    the attributes of the libraries in the pool



42
43
# File 'app/resources/v1/ont/pool_resource.rb', line 42

attributes :volume, :kit_barcode, :concentration, :insert_size, :created_at, :updated_at,
:library_attributes, :tube_barcode

#source_identifierString (readonly)

Returns the source identifier of the pool.

Returns:

  • (String)

    the source identifier of the pool



47
# File 'app/resources/v1/ont/pool_resource.rb', line 47

attribute :source_identifier, readonly: true

#tube_barcodeString

Returns the barcode of the tube.

Returns:

  • (String)

    the barcode of the tube



42
43
# File 'app/resources/v1/ont/pool_resource.rb', line 42

attributes :volume, :kit_barcode, :concentration, :insert_size, :created_at, :updated_at,
:library_attributes, :tube_barcode

#updated_atString

Returns the last update timestamp of the pool.

Returns:

  • (String)

    the last update timestamp of the pool



42
43
# File 'app/resources/v1/ont/pool_resource.rb', line 42

attributes :volume, :kit_barcode, :concentration, :insert_size, :created_at, :updated_at,
:library_attributes, :tube_barcode

#volumeFloat

Returns the volume of the pool.

Returns:

  • (Float)

    the volume of the pool



42
43
# File 'app/resources/v1/ont/pool_resource.rb', line 42

attributes :volume, :kit_barcode, :concentration, :insert_size, :created_at, :updated_at,
:library_attributes, :tube_barcode

Class Method Details

.default_sortObject



64
65
66
# File 'app/resources/v1/ont/pool_resource.rb', line 64

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

.records_for_populate(*_args) ⇒ Object



83
84
85
# File 'app/resources/v1/ont/pool_resource.rb', line 83

def self.records_for_populate(*_args)
  super.preload(source_wells: :plate)
end

Instance Method Details

#fetchable_fieldsObject



79
80
81
# File 'app/resources/v1/ont/pool_resource.rb', line 79

def fetchable_fields
  super - [:library_attributes]
end