NAME

Twilio::Rest::Api::V2010::Account::Usage::Record::AllTime - The AllTime resource

SYNOPSIS

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

for my $all_time ($client->usage->records->all_time->read({}, 20)) {
  ...
}

DESCRIPTION

Usage records for all time

This file holds AllTimeList, AllTimePage and AllTimeInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

AllTimeList

Returned by $client->usage->records->all_time. See also Twilio::ListResource.

read

my @records = $client->usage->records->all_time->read(\%options, $limit, $page_size);

Returns the records as a list, fetching as many pages as it needs.

The options are:

category

The usage category of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.

end_date

Only include usage that occurred on or before this date. Specify the date in GMT and format as YYYY-MM-DD. You can also specify offsets from the current date, such as: +30days, which will set the end date to 30 days from the current date. A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

include_subaccounts

Whether to include usage from the master account and all its subaccounts. Can be: true (the default) to include usage from the master account and all subaccounts or false to retrieve usage from only the specified account.

start_date

Only include usage that has occurred on or after this date. Specify the date in GMT and format as YYYY-MM-DD. You can also specify offsets from the current date, such as: -30days, which will set the start date to be 30 days before the current date. A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

stream

my $stream = $client->usage->records->all_time->stream(\%options, $limit, $page_size);

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

page

my $page = $client->usage->records->all_time->page(\%options, $page_size, $page_token, $page_number);

Fetches one page, and returns a Twilio::Page.

get_page

my $page = $client->usage->records->all_time->get_page($url);

Fetches the page at a URL given by Twilio.

AllTimePage

A Twilio::Page of AllTimeInstance objects.

records_key

build_instance

Used by Twilio::Page.

AllTimeInstance

See also Twilio::InstanceResource.

Its fields are:

account_sid

The SID of the Account that accrued the usage.

api_version

The API version used to create the resource.

as_of

Usage records up to date as of this timestamp, formatted as YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT

category

The category of usage. For more information, see Usage Categories.

count

The number of usage events, such as the number of calls.

count_unit

The units in which count is measured, such as calls for calls or messages for SMS.

description

A plain-language description of the usage category.

end_date

The last date for which usage is included in the UsageRecord. The date is specified in GMT and formatted as YYYY-MM-DD. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

price

The total price of the usage in the currency specified in price_unit and associated with the account.

price_unit

The currency in which price is measured, in ISO 4127 format, such as usd, eur, and jpy.

start_date

The first date for which usage is included in this UsageRecord. The date is specified in GMT and formatted as YYYY-MM-DD. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

subresource_uris

A list of related resources identified by their URIs. For more information, see List Subresources.

uri

The URI of the resource, relative to https://api.twilio.com.

usage

The amount used to bill usage and measured in units described in usage_unit.

usage_unit

The units in which usage is measured, such as minutes for calls or messages for SMS.

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.