NAME

JSONAPI::Document::Builder::Role::Attributes - Utility role for JSON API attributes

VERSION

version 2.4

DESCRIPTION

Provides methods to retrieve and manipulate a resource documents attributes.

get_attributes(DBIx::Class::Row $row?) : HashRef

Retrieves the attributes for a given row.

Does all of the field manipulation according to the relevant attributes of the consuming class, such as returning a subset of fields, casing, etc.

kebab_case(Hash $row) : Hash

Takes the keys of the given row and dash cases them.

Will not kebab case columns whose names start with an underscore, this is to allow private properties to be included.