Class: Api::V2::TransferRequestResource
- Inherits:
-
BaseResource
- Object
- JSONAPI::Resource
- BaseResource
- Api::V2::TransferRequestResource
- Defined in:
- app/resources/api/v2/transfer_request_resource.rb
Overview
This resource is immutable: its endpoint will not accept POST
, PATCH
, or DELETE
requests.
Access this resource via the /api/v2/transfer_requests/
endpoint.
Provides a JSON:API representation of TransferRequest.
A TransferRequest
represents a request for transferring (“moving”) a resource (asset) from one location to another without really transforming it (chemically) as, cherrypicking, pooling, spreading on the floor etc
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
-
#source_asset ⇒ ReceptacleResource
readonly
The source asset (or receptacle) from which the material is being transferred.
-
#state ⇒ String
readonly
The current state of the transfer request, indicating its processing status (e.g., pending, completed).
-
#submission ⇒ SubmissionResource
readonly
The submission associated with this transfer request, which provides context for the transfer.
-
#target_asset ⇒ ReceptacleResource
readonly
The target asset (or receptacle) to which the material is being transferred.
-
#uuid ⇒ String
readonly
The unique identifier of the transfer request.
-
#volume ⇒ Integer
readonly
The volume associated with the transfer request.
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
#source_asset ⇒ ReceptacleResource (readonly)
The source asset (or receptacle) from which the material is being transferred.
56 |
# File 'app/resources/api/v2/transfer_request_resource.rb', line 56 has_one :source_asset, relation_name: 'asset', foreign_key: :asset_id, class_name: 'Receptacle', readonly: true |
#state ⇒ String (readonly)
The current state of the transfer request, indicating its processing status (e.g., pending, completed).
41 |
# File 'app/resources/api/v2/transfer_request_resource.rb', line 41 attribute :state, readonly: true |
#submission ⇒ SubmissionResource (readonly)
The submission associated with this transfer request, which provides context for the transfer.
61 |
# File 'app/resources/api/v2/transfer_request_resource.rb', line 61 has_one :submission, foreign_key: :submission_id, class_name: 'Submission', readonly: true |
#target_asset ⇒ ReceptacleResource (readonly)
The target asset (or receptacle) to which the material is being transferred.
66 |
# File 'app/resources/api/v2/transfer_request_resource.rb', line 66 has_one :target_asset, foreign_key: :target_asset_id, class_name: 'Receptacle', readonly: true |
#uuid ⇒ String (readonly)
The unique identifier of the transfer request.
36 |
# File 'app/resources/api/v2/transfer_request_resource.rb', line 36 attribute :uuid, readonly: true |
#volume ⇒ Integer (readonly)
The volume associated with the transfer request. This could represent the quantity of material to be transferred.
47 |
# File 'app/resources/api/v2/transfer_request_resource.rb', line 47 attribute :volume, readonly: true |