NAME
Twilio::Rest::Wireless::V1::UsageRecord - The UsageRecord resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
for my $usage_record ($client->wireless->v1->usage_records->read({}, 20)) {
...
}
DESCRIPTION
Aggregated Usage information for all SIMs on an Account
This file holds UsageRecordList, UsageRecordPage and UsageRecordInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
UsageRecordList
Returned by $client->wireless->v1->usage_records. See also Twilio::ListResource.
read
my @records = $client->wireless->v1->usage_records->read(\%options, $limit, $page_size);
Returns the records as a list, fetching as many pages as it needs.
The options are:
end-
Only include usage that has occurred on or before this date. Format is ISO 8601. A string, or an object with an
epochmethod. See "iso8601_date_time" in Twilio::Serialize. granularity-
How to summarize the usage by time. Can be:
daily,hourly, orall. A value ofallreturns one Usage Record that describes the usage for the entire period. One ofhourly,dailyorall. start-
Only include usage that has occurred on or after this date. Format is ISO 8601. A string, or an object with an
epochmethod. See "iso8601_date_time" in Twilio::Serialize.
stream
my $stream = $client->wireless->v1->usage_records->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->wireless->v1->usage_records->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->wireless->v1->usage_records->get_page($url);
Fetches the page at a URL given by Twilio.
UsageRecordPage
A Twilio::Page of UsageRecordInstance objects.
records_key
build_instance
Used by Twilio::Page.
UsageRecordInstance
See also Twilio::InstanceResource.
Its fields are:
- account_sid
-
The SID of the Account that created the AccountUsageRecord resource.
- commands
-
An object that describes the aggregated Commands usage for all SIMs during the specified period. See Commands Usage Object.
- data
-
An object that describes the aggregated Data usage for all SIMs over the period. See Data Usage Object.
- period
-
The time period for which usage is reported. Contains
startandendproperties that describe the period using GMT date-time values specified in ISO 8601 format.
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.