Class: Api::V2::StateChangeResource
- Inherits:
-
BaseResource
- Object
- JSONAPI::Resource
- BaseResource
- Api::V2::StateChangeResource
- Defined in:
- app/resources/api/v2/state_change_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/state_changes/
endpoint.
Provides a JSON:API representation of StateChange.
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
-
#contents ⇒ Array
Array of “contents” to fail, deciphered by the target.
- #customer_accepts_responsibility ⇒ Void writeonly
-
#previous_state ⇒ String
readonly
The previous state of the target before this state change.
-
#reason ⇒ String
The previous state of the target before this state change.
-
#target ⇒ LabwareResource
Setting this relationship alongside the
target_uuid
attribute will override the attribute value. -
#target_state ⇒ String
The state of the target after this state change.
-
#target_uuid ⇒ Void
writeonly
deprecated
Deprecated.
Use the
target
relationship instead. -
#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
#contents ⇒ Array
Returns Array of “contents” to fail, deciphered by the target.
24 |
# File 'app/resources/api/v2/state_change_resource.rb', line 24 attribute :contents |
#customer_accepts_responsibility=(value) ⇒ Void (writeonly)
30 |
# File 'app/resources/api/v2/state_change_resource.rb', line 30 attribute :customer_accepts_responsibility, writeonly: true |
#previous_state ⇒ String (readonly)
Returns The previous state of the target before this state change.
34 |
# File 'app/resources/api/v2/state_change_resource.rb', line 34 attribute :previous_state, readonly: true |
#reason ⇒ String
Returns The previous state of the target before this state change.
38 |
# File 'app/resources/api/v2/state_change_resource.rb', line 38 attribute :reason |
#target ⇒ LabwareResource
This relationship is required.
Setting this relationship alongside the target_uuid
attribute will override the attribute value.
89 |
# File 'app/resources/api/v2/state_change_resource.rb', line 89 has_one :target, class_name: 'Labware' |
#target_state ⇒ String
This attribute is required.
Returns The state of the target after this state change.
43 |
# File 'app/resources/api/v2/state_change_resource.rb', line 43 attribute :target_state |
#target_uuid=(value) ⇒ Void (writeonly)
Use the target
relationship instead.
This is declared for convenience where the target is not available to set as a relationship. Setting this attribute alongside the target
relationship will prefer the relationship value.
52 |
# File 'app/resources/api/v2/state_change_resource.rb', line 52 attribute :target_uuid, writeonly: true |
#user ⇒ UserResource
This relationship is required.
Setting this relationship alongside the user_uuid
attribute will override the attribute value.
83 |
# File 'app/resources/api/v2/state_change_resource.rb', line 83 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.
65 |
# File 'app/resources/api/v2/state_change_resource.rb', line 65 attribute :user_uuid, writeonly: true |
#uuid ⇒ String (readonly)
Returns The UUID of the state change.
73 |
# File 'app/resources/api/v2/state_change_resource.rb', line 73 attribute :uuid, readonly: true |