Class: Api::V2::AssetAuditResource

Inherits:
BaseResource
  • Object
show all
Defined in:
app/resources/api/v2/asset_audit_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:

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

Provides a JSON:API representation of AssetAudit.

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

Class Method Summary collapse

Methods inherited from BaseResource

apply_includes, creatable_fields, default_includes, #fetchable_fields, inclusions, resolve_relationship_names_to_relations

Instance Attribute Details

#asset_uuidString

Transforms the Asset into its UUID when generating an API query response.

Returns:

  • (String)

    the uuid of the associated asset.



33
# File 'app/resources/api/v2/asset_audit_resource.rb', line 33

attribute :asset_uuid

#created_byString

Returns the user who created the asset audit.

Returns:

  • (String)

    the user who created the asset audit.



29
# File 'app/resources/api/v2/asset_audit_resource.rb', line 29

attribute :created_by

#keyString

Returns the key of the asset audit.

Returns:

  • (String)

    the key of the asset audit.



21
# File 'app/resources/api/v2/asset_audit_resource.rb', line 21

attribute :key

#messageString

Returns the message of the asset audit.

Returns:

  • (String)

    the message of the asset audit.



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

attribute :message

#metadataHash

Returns the metadata of the asset audit.

Returns:

  • (Hash)

    the metadata of the asset audit.



41
# File 'app/resources/api/v2/asset_audit_resource.rb', line 41

attribute :metadata

#witnessed_byString

Returns the user who witnessed the asset audit.

Returns:

  • (String)

    the user who witnessed the asset audit.



37
# File 'app/resources/api/v2/asset_audit_resource.rb', line 37

attribute :witnessed_by

Class Method Details

.updatable_fields(_context) ⇒ Array<Symbol>

Gets the list of fields which are updatable on an existing AssetAudit.

Parameters:

  • _context (JSONAPI::Resource::Context)

    not used.

Returns:

  • (Array<Symbol>)

    the list of updatable fields.



62
63
64
# File 'app/resources/api/v2/asset_audit_resource.rb', line 62

def self.updatable_fields(_context)
  [] # Do not allow updating any fields.
end