Class: Api::V2::SpecificTubeCreationResource
- Inherits:
-
BaseResource
- Object
- JSONAPI::Resource
- BaseResource
- Api::V2::SpecificTubeCreationResource
- Defined in:
- app/resources/api/v2/specific_tube_creation_resource.rb
Overview
the below example does not include the children as relationships, but via the child_purpose_uuids attribute. This is to be deprecated and should be replaced with the a relevant relationship.
For more information about JSON:API, see the JSON:API Specifications or refer to the JSONAPI::Resources package for Sequencescape’s implementation of the JSON:API standard.
Instance Attribute Summary collapse
-
#child_purpose_uuids ⇒ Void
writeonly
This is currently declared for convenience as child purposes do not appear to be set as a relationship.
-
#children ⇒ Array<TubeResource>
readonly
An array of tubes that were created.
-
#parent_uuids ⇒ Void
writeonly
deprecated
Deprecated.
Use the
parentsrelationship instead. See Y25-236. -
#parents ⇒ Array<LabwareResource>
Setting this relationship alongside the
parent_uuidsattribute will override the attribute value. - #tube_attributes ⇒ Void writeonly
-
#user ⇒ UserResource
Setting this relationship alongside the
user_uuidattribute will override the attribute value. -
#user_uuid ⇒ Void
writeonly
deprecated
Deprecated.
Use the
userrelationship instead. -
#uuid ⇒ String
readonly
The UUID of the specific tube creation event.
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
#child_purpose_uuids=(value) ⇒ Void (writeonly)
Update writeone to be write_once as resource is not updatable
Deprecate - Create the child_purposes (or children) relationship instead. See Y25-236.
This is currently declared for convenience as child purposes do not appear to be set as a relationship. Setting this attribute alongside the relevant relationship shold prefer the relationship value.
84 |
# File 'app/resources/api/v2/specific_tube_creation_resource.rb', line 84 attribute :child_purpose_uuids, writeonly: true |
#children ⇒ Array<TubeResource> (readonly)
fix this relationship as it currently appears to be broken See Y25-236.
Returns An array of tubes that were created.
142 |
# File 'app/resources/api/v2/specific_tube_creation_resource.rb', line 142 has_many :children, class_name: 'Tube', readonly: true |
#parent_uuids=(value) ⇒ Void (writeonly)
Use the parents relationship instead. See Y25-236.
Update writeone to be write_once as resource is not updatable
This is declared for convenience where the parent tubes are not available to set as a relationship. Setting this attribute alongside the parents relationship will prefer the relationship value.
99 |
# File 'app/resources/api/v2/specific_tube_creation_resource.rb', line 99 attribute :parent_uuids, writeonly: true |
#parents ⇒ Array<LabwareResource>
This relationship is required.
Setting this relationship alongside the parent_uuids attribute will override the attribute value.
148 |
# File 'app/resources/api/v2/specific_tube_creation_resource.rb', line 148 has_many :parents, class_name: 'Labware' |
#tube_attributes=(value) ⇒ Void (writeonly)
Update writeone to be write_once as resource is not updatable See Y25-236.
111 |
# File 'app/resources/api/v2/specific_tube_creation_resource.rb', line 111 attribute :tube_attributes, writeonly: true |
#user ⇒ UserResource
This relationship is required.
Setting this relationship alongside the user_uuid attribute will override the attribute value.
154 |
# File 'app/resources/api/v2/specific_tube_creation_resource.rb', line 154 has_one :user |
#user_uuid=(value) ⇒ Void (writeonly)
Use the user relationship instead.
See Y25-236. 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.
128 |
# File 'app/resources/api/v2/specific_tube_creation_resource.rb', line 128 attribute :user_uuid, writeonly: true |
#uuid ⇒ String (readonly)
This identifier is automatically assigned upon creation and cannot be modified.
Returns The UUID of the specific tube creation event.
74 |
# File 'app/resources/api/v2/specific_tube_creation_resource.rb', line 74 attribute :uuid, readonly: true |