NAME
Twilio::Rest::Wireless::V1::Sim::UsageRecord - The UsageRecord resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
for my $usage_record ($client->wireless->v1->sims($sim_sid)->usage_records->read({}, 20)) {
...
}
DESCRIPTION
Usage information for SIMs
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->sims($sim_sid)->usage_records. See also Twilio::ListResource.
read
my @records = $client->wireless->v1->sims($sim_sid)->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 occurred on or before this date, specified in ISO 8601. The default is the current time. 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. The default isall. 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, specified in ISO 8601. The default is one month before the
endparameter value. A string, or an object with anepochmethod. See "iso8601_date_time" in Twilio::Serialize.
stream
my $stream = $client->wireless->v1->sims($sim_sid)->usage_records->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->wireless->v1->sims($sim_sid)->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->sims($sim_sid)->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 UsageRecord resource.
- commands
-
An object that describes the SIM's usage of Commands during the specified period. See Commands Usage Object.
- data
-
An object that describes the SIM's data usage during the specified period. See Data Usage Object.
- period
-
The time period for which the usage is reported. Contains
startandenddatetime values given as GMT in ISO 8601 format. - sim_sid
-
The SID of the Sim resource that this Usage Record is for.
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.