Class: Api::V2::BarcodePrinterResource

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

Overview

Note:

This resource is immutable: its endpoint will not accept POST, PATCH, or DELETE requests.

Note:

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

Provides a JSON:API representation of BarcodePrinter.

This resource represents a barcode printer and its capabilities. It allows retrieving information about registered barcode printers, including their names, types, and supported services.

For more information about JSON:API, see the JSON:API Specifications or refer to the JSONAPI::Resources package for Sequencescape's implementation of the JSON:API standard.

Examples:

GET request for all BarcodePrinter resources

GET /api/v2/barcode_printers/

GET request for a specific BarcodePrinter by ID

GET /api/v2/barcode_printers/1

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

#barcode_typeString (readonly)

Note:

This attribute is read-only;

Retrieves the barcode type from the associated barcode printer type.

Returns:

  • (String)

    The name of the barcode type.



48
# File 'app/resources/api/v2/barcode_printer_resource.rb', line 48

attribute :barcode_type, readonly: true

#nameString (readonly)

Returns The name of the barcode printer.

Returns:

  • (String)

    The name of the barcode printer.



35
# File 'app/resources/api/v2/barcode_printer_resource.rb', line 35

attribute :name, readonly: true

Returns The service this printer can be instructed to print from. e.g “PMB”.

Returns:

  • (String)

    The service this printer can be instructed to print from. e.g “PMB”



44
# File 'app/resources/api/v2/barcode_printer_resource.rb', line 44

attribute :print_service, readonly: true

#uuidString (readonly)

Note:

This identifier is automatically assigned upon creation and cannot be modified.

Returns The UUID of the barcode printer.

Returns:

  • (String)

    The UUID of the barcode printer.



40
# File 'app/resources/api/v2/barcode_printer_resource.rb', line 40

attribute :uuid, readonly: true