Class: Api::V2::SpecificTubeCreationResource

Inherits:
BaseResource
  • Object
show all
Defined in:
app/resources/api/v2/specific_tube_creation_resource.rb

Overview

TODO:

This documentation does not yet include a detailed description of what this resource represents.

TODO:

This documentation does not yet include detailed descriptions for relationships, attributes and filters.

TODO:

This documentation does not yet include any example usage of the API via cURL or similar.

Note:

This resource cannot be modified after creation: its endpoint will not accept PATCH requests.

Note:

Access this resource via the /api/v2/specific_tube_creations/ endpoint.

Provides a JSON:API representation of SpecificTubeCreation.

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

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)

Parameters:

  • value (Array<String>)

    Array of UUIDs for child purposes to use in the creation of tubes.

Returns:

  • (Void)


25
# File 'app/resources/api/v2/specific_tube_creation_resource.rb', line 25

attribute :child_purpose_uuids, writeonly: true

#childrenArray<TubeResource> (readonly)

Returns An array of tubes that were created.

Returns:

  • (Array<TubeResource>)

    An array of tubes that were created.



82
# File 'app/resources/api/v2/specific_tube_creation_resource.rb', line 82

has_many :children, class_name: 'Tube', readonly: true

#parent_uuids=(value) ⇒ Void (writeonly)

Deprecated.

Use the parents relationship instead.

This is declared for convenience where the parent is not available to set as a relationship. Setting this attribute alongside the parents relationship will prefer the relationship value.

Parameters:

  • value (Array<String>)

    The UUIDs of labware that will be the parents for all tubes created.

Returns:

  • (Void)

See Also:



38
# File 'app/resources/api/v2/specific_tube_creation_resource.rb', line 38

attribute :parent_uuids, writeonly: true

#parentsArray<LabwareResource>

Note:

This relationship is required.

Setting this relationship alongside the parent_uuids attribute will override the attribute value.

Returns:

  • (Array<LabwareResource>)

    An array of the parents of the tubes being created.



88
# File 'app/resources/api/v2/specific_tube_creation_resource.rb', line 88

has_many :parents, class_name: 'Labware'

#tube_attributes=(value) ⇒ Void (writeonly)

Examples:

Setting the name of the tubes being created.

[{ name: 'Tube one' }, { name: 'Tube two' }]

Parameters:

  • value (Array<Hash>)

    Hashes defining the attributes to apply to each tube being created. This might be used to set custom attributes on the tubes, such as name.

Returns:

  • (Void)


50
# File 'app/resources/api/v2/specific_tube_creation_resource.rb', line 50

attribute :tube_attributes, writeonly: true

#userUserResource

Note:

This relationship is required.

Setting this relationship alongside the user_uuid attribute will override the attribute value.

Returns:

  • (UserResource)

    The user who initiated the creation of tubes.



94
# File 'app/resources/api/v2/specific_tube_creation_resource.rb', line 94

has_one :user

#user_uuid=(value) ⇒ Void (writeonly)

Deprecated.

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.

Parameters:

  • value (String)

    The UUID of the user who initiated the creation of tubes.

Returns:

  • (Void)

See Also:



66
# File 'app/resources/api/v2/specific_tube_creation_resource.rb', line 66

attribute :user_uuid, writeonly: true

#uuidString (readonly)

Returns The UUID of the state change.

Returns:

  • (String)

    The UUID of the state change.



74
# File 'app/resources/api/v2/specific_tube_creation_resource.rb', line 74

attribute :uuid, readonly: true