Class: Api::V2::LotTypeResource
- Inherits:
-
BaseResource
- Object
- JSONAPI::Resource
- BaseResource
- Api::V2::LotTypeResource
- Defined in:
- app/resources/api/v2/lot_type_resource.rb
Overview
This resource is immutable: its endpoint will not accept POST
, PATCH
, or DELETE
requests.
Access this resource via the /api/v2/lot_types/
endpoint.
Provides a JSON:API representation of LotType.
A LotType governs the behaviour of a Lot
For more information about JSON:API, see the JSON:API Specifications or the JSONAPI::Resources package for Sequencescape's implementation of the JSON:API standard.
Instance Attribute Summary collapse
-
#name ⇒ String
The name of this lot type.
-
#target_purpose ⇒ PurposeResource
The Purpose that this lot type is associated with.
-
#template_type ⇒ String
Retrieves the template type based on the internal class name.
-
#uuid ⇒ String
readonly
The universally unique identifier (UUID) of the lot type.
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
#name ⇒ String
This resource is immutable; Update attribute to be read-only.
This attribute must be unique.
The name of this lot type
41 |
# File 'app/resources/api/v2/lot_type_resource.rb', line 41 attribute :name, write_once: true |
#target_purpose ⇒ PurposeResource
This resource is immutable; Update relationship to be read-only.
The Purpose that this lot type is associated with
58 |
# File 'app/resources/api/v2/lot_type_resource.rb', line 58 has_one :target_purpose, write_once: true, class_name: 'Purpose' |
#template_type ⇒ String
Retrieves the template type based on the internal class name.
48 |
# File 'app/resources/api/v2/lot_type_resource.rb', line 48 attribute :template_type, write_once: true |
#uuid ⇒ String (readonly)
This identifier is automatically assigned upon creation and cannot be modified.
Returns The universally unique identifier (UUID) of the lot type.
34 |
# File 'app/resources/api/v2/lot_type_resource.rb', line 34 attribute :uuid, readonly: true |