Class: V1::ReceptionResource

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

Provides a JSON:API representation of Reception and handles the import of resources into traction

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

#labwareArray<Hash>

Returns the labware associated with the reception.

Returns:

  • (Array<Hash>)

    the labware associated with the reception



27
# File 'app/resources/v1/reception_resource.rb', line 27

attributes :source, :labware, :plates_attributes, :tubes_attributes, :pool_attributes

#plates_attributesArray<Hash>

Returns the attributes of the plates.

Returns:

  • (Array<Hash>)

    the attributes of the plates

Raises:

  • (ArgumentError)


27
# File 'app/resources/v1/reception_resource.rb', line 27

attributes :source, :labware, :plates_attributes, :tubes_attributes, :pool_attributes

#pool_attributesHash

Returns the attributes of the pool.

Returns:

  • (Hash)

    the attributes of the pool

Raises:

  • (ArgumentError)


27
# File 'app/resources/v1/reception_resource.rb', line 27

attributes :source, :labware, :plates_attributes, :tubes_attributes, :pool_attributes

#sourceString

Returns the source of the reception.

Returns:

  • (String)

    the source of the reception



27
# File 'app/resources/v1/reception_resource.rb', line 27

attributes :source, :labware, :plates_attributes, :tubes_attributes, :pool_attributes

#tubes_attributesArray<Hash>

Returns the attributes of the tubes.

Returns:

  • (Array<Hash>)

    the attributes of the tubes

Raises:

  • (ArgumentError)


27
# File 'app/resources/v1/reception_resource.rb', line 27

attributes :source, :labware, :plates_attributes, :tubes_attributes, :pool_attributes

Class Method Details

.creatable_fields(context) ⇒ Object



35
36
37
# File 'app/resources/v1/reception_resource.rb', line 35

def self.creatable_fields(context)
  super - [:labware]
end

Instance Method Details

#fetchable_fieldsObject



31
32
33
# File 'app/resources/v1/reception_resource.rb', line 31

def fetchable_fields
  %i[source labware]
end