Class: Api::V2::TransferRequestCollectionResource
- Inherits:
-
BaseResource
- Object
- JSONAPI::Resource
- BaseResource
- Api::V2::TransferRequestCollectionResource
- Defined in:
- app/resources/api/v2/transfer_request_collection_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.
This resource cannot be modified after creation: its endpoint will not accept PATCH
requests.
Access this resource via the /api/v2/transfer_request_collections/
endpoint.
Provides a JSON:API representation of TransferRequestCollection.
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
-
#target_tubes ⇒ Array<TubeResource>
readonly
An array of tubes targeted by the transfer requests in this collection.
-
#transfer_requests ⇒ Array<TransferRequestResource>
readonly
An array of transfer requests in this collection.
-
#transfer_requests_attributes ⇒ Void
writeonly
To enable the creation of TransferRequest records server side in a single transaction, the attributes for transfer requests to be included in the collection can be passed as an array of hashes.
-
#user ⇒ UserResource
Setting this relationship alongside the
user_uuid
attribute will override the attribute value. -
#user_uuid ⇒ Void
writeonly
deprecated
Deprecated.
Use the
user
relationship instead. -
#uuid ⇒ String
readonly
The UUID of the state change.
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
#target_tubes ⇒ Array<TubeResource> (readonly)
Returns An array of tubes targeted by the transfer requests in this collection.
71 |
# File 'app/resources/api/v2/transfer_request_collection_resource.rb', line 71 has_many :target_tubes, class_name: 'Tube', readonly: true |
#transfer_requests ⇒ Array<TransferRequestResource> (readonly)
Returns An array of transfer requests in this collection.
75 |
# File 'app/resources/api/v2/transfer_request_collection_resource.rb', line 75 has_many :transfer_requests, readonly: true |
#transfer_requests_attributes=(value) ⇒ Void (writeonly)
To enable the creation of TransferRequest records server side in a single transaction, the attributes for transfer requests to be included in the collection can be passed as an array of hashes. These will be created at the same time as the TransferRequestCollection to avoid making multiple server calls.
39 |
# File 'app/resources/api/v2/transfer_request_collection_resource.rb', line 39 attribute :transfer_requests_attributes, writeonly: true |
#user ⇒ UserResource
This relationship is required.
Setting this relationship alongside the user_uuid
attribute will override the attribute value.
81 |
# File 'app/resources/api/v2/transfer_request_collection_resource.rb', line 81 has_one :user |
#user_uuid=(value) ⇒ Void (writeonly)
Use the user
relationship instead.
This is declared for convenience where the user is not available to set as a relationship. Setting this attribute alongside the user
relationship will prefer the relationship value.
55 |
# File 'app/resources/api/v2/transfer_request_collection_resource.rb', line 55 attribute :user_uuid, writeonly: true |
#uuid ⇒ String (readonly)
Returns The UUID of the state change.
63 |
# File 'app/resources/api/v2/transfer_request_collection_resource.rb', line 63 attribute :uuid, readonly: true |