NAME
Twilio::Rest::Supersim::V1::UsageRecord - The UsageRecord resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
for my $usage_record ($client->supersim->v1->usage_records->read({}, 20)) {
...
}
DESCRIPTION
Usage information for Sim resources
This file holds UsageRecordList, UsageRecordPage and UsageRecordInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
UsageRecordList
Returned by $client->supersim->v1->usage_records. See also Twilio::ListResource.
read
my @records = $client->supersim->v1->usage_records->read(\%options, $limit, $page_size);
List UsageRecords. Returns the records as a list, fetching as many pages as it needs.
The options are:
end_time-
Only include usage that occurred before this time (exclusive), specified in ISO 8601 format. Default is the current time. A string, or an object with an
epochmethod. See "iso8601_date_time" in Twilio::Serialize. fleet-
SID or unique name of a Fleet resource. Only show UsageRecords representing usage for Super SIMs belonging to this Fleet resource at the time the usage occurred.
granularity-
Time-based grouping that UsageRecords should be aggregated by. Can be:
hour,day, orall. Default isall.allreturns one UsageRecord that describes the usage for the entire period. One ofhour,dayorall. group-
Dimension over which to aggregate usage records. Can be:
sim,fleet,network,isoCountry. Default is to not aggregate across any of these dimensions, UsageRecords will be aggregated into the time buckets described by theGranularityparameter. One ofsim,fleet,networkorisoCountry. iso_country-
Alpha-2 ISO Country Code. Only show UsageRecords representing usage in this country.
network-
SID of a Network resource. Only show UsageRecords representing usage on this network.
sim-
SID or unique name of a Sim resource. Only show UsageRecords representing usage incurred by this Super SIM.
start_time-
Only include usage that occurred at or after this time, specified in ISO 8601 format. Default is one month before the
end_time. A string, or an object with anepochmethod. See "iso8601_date_time" in Twilio::Serialize.
stream
my $stream = $client->supersim->v1->usage_records->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->supersim->v1->usage_records->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->supersim->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 incurred the usage.
- billed_unit
-
The currency in which the billed amounts are measured, specified in the 3 letter ISO 4127 format (e.g.
USD,EUR,JPY). This can be null when data_toal_billed is 0 and we do not yet have billing information for the corresponding data usage. Refer to Data Usage Processing for more details. - data_download
-
Total data downloaded in bytes, aggregated by the query parameters.
- data_total
-
Total of data_upload and data_download.
- data_total_billed
-
Total amount in the
billed_unitthat was charged for the data uploaded or downloaded. Will return 0 for usage prior to February 1, 2022. Value may be 0 despitedata_totalbeing greater than 0 if the data usage is still being processed by Twilio's billing system. Refer to Data Usage Processing for more details. - data_upload
-
Total data uploaded in bytes, aggregated by the query parameters.
- fleet_sid
-
SID of the Fleet resource the usage occurred on. Value will only be present when either a value for the
Fleetquery parameter is provided or when UsageRecords are grouped byfleet. Otherwise, the value will benull. - iso_country
-
Alpha-2 ISO Country Code that the usage occurred in. Value will only be present when either a value for the
IsoCountryquery parameter is provided or when UsageRecords are grouped byisoCountry. Otherwise, the value will benull. - network_sid
-
SID of the Network resource the usage occurred on. Value will only be present when either a value for the
Networkquery parameter is provided or when UsageRecords are grouped bynetwork. Otherwise, the value will benull. - period
-
The time period for which the usage is reported. The period is represented as a pair of
start_timeandend_timetimestamps specified in ISO 8601 format. - sim_sid
-
SID of a Sim resource to which the UsageRecord belongs. Value will only be present when either a value for the
Simquery parameter is provided or when UsageRecords are grouped bysim. Otherwise, the value will benull.
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.