Class: Api::V2::VolumeUpdateResource
- Inherits:
-
BaseResource
- Object
- JSONAPI::Resource
- BaseResource
- Api::V2::VolumeUpdateResource
- Defined in:
- app/resources/api/v2/volume_update_resource.rb
Overview
This documentation does not yet include a detailed description of what this resource represents.
This documentation does not yet include detailed descriptions for relationships, attributes and filters.
This documentation does not yet include any example usage of the API via cURL or similar.
Access this resource via the /api/v2/volume_updates/
endpoint.
Provides a JSON:API representation of VolumeUpdate.
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
-
#asset_uuid ⇒ String
The uuid of the target labware associated with the volume update.
-
#created_by ⇒ String
The user who created the volume update.
-
#witnessed_by ⇒ Float
The volume change that occured on the target labware.
Class Method Summary collapse
-
.updatable_fields(_context) ⇒ Array<Symbol>
Gets the list of fields which are updatable on an existing VolumeUpdate.
Instance Method Summary collapse
-
#target_uuid ⇒ String
Transforms the target Labware into its UUID when generating an API query response.
-
#target_uuid=(uuid) ⇒ void
Sets the target Labware on the model using the UUID provided in the API create/update request.
Methods inherited from BaseResource
apply_includes, creatable_fields, default_includes, #fetchable_fields, inclusions, resolve_relationship_names_to_relations
Instance Attribute Details
#asset_uuid ⇒ String
Returns the uuid of the target labware associated with the volume update.
25 |
# File 'app/resources/api/v2/volume_update_resource.rb', line 25 attribute :target_uuid |
#created_by ⇒ String
Returns the user who created the volume update.
21 |
# File 'app/resources/api/v2/volume_update_resource.rb', line 21 attribute :created_by |
#witnessed_by ⇒ Float
Returns the volume change that occured on the target labware.
29 |
# File 'app/resources/api/v2/volume_update_resource.rb', line 29 attribute :volume_change |
Class Method Details
.updatable_fields(_context) ⇒ Array<Symbol>
Gets the list of fields which are updatable on an existing VolumeUpdate.
50 51 52 |
# File 'app/resources/api/v2/volume_update_resource.rb', line 50 def self.updatable_fields(_context) [] # Do not allow updating any fields. end |
Instance Method Details
#target_uuid ⇒ String
Transforms the target Labware into its UUID when generating an API query response.
42 43 44 |
# File 'app/resources/api/v2/volume_update_resource.rb', line 42 def target_uuid @model.target.uuid end |
#target_uuid=(uuid) ⇒ void
This method returns an undefined value.
Sets the target Labware on the model using the UUID provided in the API create/update request.
35 36 37 |
# File 'app/resources/api/v2/volume_update_resource.rb', line 35 def target_uuid=(uuid) @model.target = Uuid.with_external_id(uuid).include_resource.map(&:resource).first end |