Class: Api::V2::PlateConversionResource
- Inherits:
-
BaseResource
- Object
- JSONAPI::Resource
- BaseResource
- Api::V2::PlateConversionResource
- Defined in:
- app/resources/api/v2/plate_conversion_resource.rb
Overview
This resource cannot be modified after creation: its endpoint will not accept PATCH
requests.
Access this resource via the /api/v2/plate_conversions/
endpoint.
Provides a JSON:API representation of PlateConversion for converting a plate to a new purpose. The converted target becomes linked as a child of the specified parent. Creation of this resource via a POST
request will initiate the conversion. The converted plate is returned by this endpoint under the #target relationship.
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
-
#parent ⇒ Api::V2::PlateResource
Setting this relationship alongside the
parent_uuid
attribute will override the attribute value. -
#parent_uuid ⇒ Void
writeonly
deprecated
Deprecated.
Use the
parent
relationship instead. -
#purpose ⇒ Api::V2::PlatePurposeResource
Setting this relationship alongside the
purpose_uuid
attribute will override the attribute value. -
#purpose_uuid ⇒ Void
writeonly
deprecated
Deprecated.
Use the
purpose
relationship instead. -
#target ⇒ Api::V2::PlateResource
Setting this relationship alongside the
target_uuid
attribute will override the attribute value. -
#target_uuid ⇒ Void
writeonly
deprecated
Deprecated.
Use the
target
relationship instead. -
#user ⇒ Api::V2::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 plate conversion.
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
#parent ⇒ Api::V2::PlateResource
Setting this relationship alongside the parent_uuid
attribute will override the attribute value.
128 |
# File 'app/resources/api/v2/plate_conversion_resource.rb', line 128 has_one :parent, class_name: 'Plate' |
#parent_uuid=(value) ⇒ Void (writeonly)
Use the parent
relationship instead.
This is declared for convenience where the parent Plate is not available to set as a relationship. Setting this attribute alongside the parent
relationship will prefer the relationship value.
71 |
# File 'app/resources/api/v2/plate_conversion_resource.rb', line 71 attribute :parent_uuid, writeonly: true |
#purpose ⇒ Api::V2::PlatePurposeResource
This relationship is required.
Setting this relationship alongside the purpose_uuid
attribute will override the attribute value. The purpose which the target plate should be converted to.
135 |
# File 'app/resources/api/v2/plate_conversion_resource.rb', line 135 has_one :purpose, class_name: 'PlatePurpose' |
#purpose_uuid=(value) ⇒ Void (writeonly)
Use the purpose
relationship instead.
This is declared for convenience where the PlatePurpose is not available to set as a relationship. Setting this attribute alongside the purpose
relationship will prefer the relationship value.
84 |
# File 'app/resources/api/v2/plate_conversion_resource.rb', line 84 attribute :purpose_uuid, writeonly: true |
#target ⇒ Api::V2::PlateResource
This relationship is required.
Setting this relationship alongside the target_uuid
attribute will override the attribute value. The target of the plate conversion. This plate will be converted to the given purpose and made a child of the parent plate, if given.
143 |
# File 'app/resources/api/v2/plate_conversion_resource.rb', line 143 has_one :target, class_name: 'Plate' |
#target_uuid=(value) ⇒ Void (writeonly)
Use the target
relationship instead.
This is declared for convenience where the target Plate is not available to set as a relationship. Setting this attribute alongside the target
relationship will prefer the relationship value.
98 |
# File 'app/resources/api/v2/plate_conversion_resource.rb', line 98 attribute :target_uuid, writeonly: true |
#user ⇒ Api::V2::UserResource
This relationship is required.
Setting this relationship alongside the user_uuid
attribute will override the attribute value.
149 |
# File 'app/resources/api/v2/plate_conversion_resource.rb', line 149 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.
111 |
# File 'app/resources/api/v2/plate_conversion_resource.rb', line 111 attribute :user_uuid, writeonly: true |
#uuid ⇒ String (readonly)
Returns The UUID of the plate conversion.
119 |
# File 'app/resources/api/v2/plate_conversion_resource.rb', line 119 attribute :uuid, readonly: true |