Class: Api::V2::PickListResource
- Inherits:
-
BaseResource
- Object
- JSONAPI::Resource
- BaseResource
- Api::V2::PickListResource
- Defined in:
- app/resources/api/v2/pick_list_resource.rb
Overview
Access this resource via the /api/v2/pick_lists/
endpoint.
Provides a JSON:API representation of PickList.
A PickList is a lightweight wrapper to provide a simplified interface for automatically generating batches for the CherrypickPipeline. It is intended to isolate external applications from the implementation and to provide an interface for eventually building a simplified means for generating cherrypicks
For more information about JSON:API, see the JSON:API Specifications or the JSONAPI::Resources package for Sequencescape's implementation of the JSON:API standard.
Constant Summary collapse
- PERMITTED_PICK_ATTRIBUTES =
List of permitted attributes for pick creation based on receptacles.
%i[source_receptacle_id study_id project_id].freeze
- PERMITTED_LABWARE_PICK_ATTRIBUTES =
List of permitted attributes for pick creation based on labware.
%i[source_labware_id source_labware_barcode study_id project_id].freeze
Instance Attribute Summary collapse
-
#asynchronous ⇒ Boolean
Indicates whether the pick list should be processed asynchronously.
-
#created_at ⇒ String
readonly
The timestamp indicating when the pick list was created.
-
#labware_pick_attributes ⇒ Object
writeonly
This provides an alternative API for passing in a list of labware, either by ids or barcodes.
-
#links ⇒ Hash
A collection of related links for navigation or reference.
-
#pick_attributes ⇒ Array<Hash>
Retrieves the formatted pick attributes for API response.
-
#state ⇒ String
The current state of the pick list, indicating its processing status.
-
#updated_at ⇒ String
readonly
The timestamp indicating when the pick list was last updated.
Method Summary
Methods inherited from BaseResource
apply_includes, creatable_fields, default_includes, #fetchable_fields, inclusions, resolve_relationship_names_to_relations, updatable_fields
Instance Attribute Details
#asynchronous ⇒ Boolean
this attribute defaults to true
if not provided.
Indicates whether the pick list should be processed asynchronously.
105 |
# File 'app/resources/api/v2/pick_list_resource.rb', line 105 attribute :asynchronous |
#created_at ⇒ String (readonly)
This timestamp is automatically assigned upon creation.
Returns The timestamp indicating when the pick list was created.
68 |
# File 'app/resources/api/v2/pick_list_resource.rb', line 68 attribute :created_at, readonly: true |
#labware_pick_attributes=(labware_picks) ⇒ Object (writeonly)
This provides an alternative API for passing in a list of labware, either by ids or barcodes. This avoids the need to make additional requests for the receptacle ids. We keep this as a separate accessor to avoid the confusion of passing in a list of 12 picks, and receiving more back.
99 |
# File 'app/resources/api/v2/pick_list_resource.rb', line 99 attribute :labware_pick_attributes, writeonly: true |
#links ⇒ Hash
this attribute should be read-only.
A collection of related links for navigation or reference.
84 |
# File 'app/resources/api/v2/pick_list_resource.rb', line 84 attribute :links, write_once: true |
#pick_attributes ⇒ Array<Hash>
Retrieves the formatted pick attributes for API response.
90 |
# File 'app/resources/api/v2/pick_list_resource.rb', line 90 attribute :pick_attributes |
#state ⇒ String
The current state of the pick list, indicating its processing status.
78 |
# File 'app/resources/api/v2/pick_list_resource.rb', line 78 attribute :state, write_once: true |
#updated_at ⇒ String (readonly)
This timestamp is automatically updated upon modification.
Returns The timestamp indicating when the pick list was last updated.
73 |
# File 'app/resources/api/v2/pick_list_resource.rb', line 73 attribute :updated_at, readonly: true |