Class: Api::V2::QcableCreatorResource
- Inherits:
-
BaseResource
- Object
- JSONAPI::Resource
- BaseResource
- Api::V2::QcableCreatorResource
- Defined in:
- app/resources/api/v2/qcable_creator_resource.rb
Overview
This resource cannot be modified after creation: its endpoint will not accept PATCH
requests.
Access this resource via the /api/v2/qcable_creators/
endpoint.
Provides a JSON:API representation of QcableCreator which is a factory for creating Qcables (tag plates).
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
-
#barcodes ⇒ String
Either this or 'count' is passed in when creating a QcableCreator.
-
#count ⇒ Integer
Either this or 'barcodes' is passed in when creating a QcableCreator.
-
#lot ⇒ LotResource
The Lot resource associated with this QcableCreator.
-
#qcables ⇒ Array<QcableResource>
readonly
The Qcable resources created by this QcableCreator.
-
#user ⇒ UserResource
The User resource associated with this QcableCreator.
-
#uuid ⇒ String
readonly
The UUID of this QcableCreator.
Instance Method Summary collapse
-
#filter_uuid ⇒ Object
Apply a filter across all QcableCreator resources, matching by UUID.
Methods inherited from BaseResource
apply_includes, creatable_fields, default_includes, #fetchable_fields, inclusions, resolve_relationship_names_to_relations, updatable_fields
Instance Attribute Details
#barcodes ⇒ String
Either this or 'count' is passed in when creating a QcableCreator.
84 |
# File 'app/resources/api/v2/qcable_creator_resource.rb', line 84 attribute :barcodes |
#count ⇒ Integer
Either this or 'barcodes' is passed in when creating a QcableCreator.
89 |
# File 'app/resources/api/v2/qcable_creator_resource.rb', line 89 attribute :count |
#lot ⇒ LotResource
Returns the Lot resource associated with this QcableCreator.
97 |
# File 'app/resources/api/v2/qcable_creator_resource.rb', line 97 has_one :lot |
#qcables ⇒ Array<QcableResource> (readonly)
Returns the Qcable resources created by this QcableCreator.
105 |
# File 'app/resources/api/v2/qcable_creator_resource.rb', line 105 has_many :qcables, readonly: true |
#user ⇒ UserResource
Returns the User resource associated with this QcableCreator.
101 |
# File 'app/resources/api/v2/qcable_creator_resource.rb', line 101 has_one :user |
#uuid ⇒ String (readonly)
Returns the UUID of this QcableCreator.
78 |
# File 'app/resources/api/v2/qcable_creator_resource.rb', line 78 attribute :uuid, readonly: true |
Instance Method Details
#filter_uuid ⇒ Object
Apply a filter across all QcableCreator resources, matching by UUID.
115 |
# File 'app/resources/api/v2/qcable_creator_resource.rb', line 115 filter :uuid, apply: ->(records, value, ) { records.with_uuid(value) } |