NAME

Twilio::Rest::Memory::V1::Trait - The Trait resource

SYNOPSIS

my $client = Twilio::Rest::Client->new($account_sid, $auth_token);

for my $trait ($client->memory->v1->traits($store_id, $profile_id)->read({}, 20)) {
  ...
}

DESCRIPTION

This file holds TraitList, TraitPage and TraitInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

TraitList

Returned by $client->memory->v1->traits($store_id, $profile_id). See also Twilio::ListResource.

read

my @records = $client->memory->v1->traits($store_id, $profile_id)->read(\%options, $limit, $page_size);

Return a paginated, optionally filtered list of individual traits for a profile (flattened view). This is useful for UIs or tools that need to browse trait metadata (names, groups, timestamps). Use the optional traitGroups filter to scope results and the paging parameters to iterate through larger sets. Returns the records as a list, fetching as many pages as it needs.

The options are:

order_by

Either 'ASC' or 'DESC' to sort results ascending or descending respectively. One of ASC or DESC.

trait_groups

Comma separated list of trait group names to include.

stream

my $stream = $client->memory->v1->traits($store_id, $profile_id)->stream(\%options, $limit, $page_size);

Takes the same arguments as "read", and returns a Twilio::Stream.

page

my $page = $client->memory->v1->traits($store_id, $profile_id)->page(\%options, $page_size, $page_token);

Fetches one page, and returns a Twilio::TokenPaginationPage. This API pages by token, so there is no page number.

get_page

my $page = $client->memory->v1->traits($store_id, $profile_id)->get_page($url);

Fetches the page at a URL given by Twilio.

TraitPage

A Twilio::Page of TraitInstance objects.

records_key

build_instance

Used by Twilio::Page.

TraitInstance

See also Twilio::InstanceResource.

Its fields are:

name

The name of the trait.

timestamp

The time the trait was created or last updated. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

trait_group

The trait group name to which this trait belongs.

value

No description in the specification.

CONSTRUCTORS

new

Objects here come from the methods above, so there is no need to call new directly.

LICENSE

Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.