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 epoch method. 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, or all. Default is all. all returns one UsageRecord that describes the usage for the entire period. One of hour, day or all.

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 the Granularity parameter. One of sim, fleet, network or isoCountry.

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 an epoch method. 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_unit that was charged for the data uploaded or downloaded. Will return 0 for usage prior to February 1, 2022. Value may be 0 despite data_total being 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 Fleet query parameter is provided or when UsageRecords are grouped by fleet. Otherwise, the value will be null.

iso_country

Alpha-2 ISO Country Code that the usage occurred in. Value will only be present when either a value for the IsoCountry query parameter is provided or when UsageRecords are grouped by isoCountry. Otherwise, the value will be null.

network_sid

SID of the Network resource the usage occurred on. Value will only be present when either a value for the Network query parameter is provided or when UsageRecords are grouped by network. Otherwise, the value will be null.

period

The time period for which the usage is reported. The period is represented as a pair of start_time and end_time timestamps 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 Sim query parameter is provided or when UsageRecords are grouped by sim. Otherwise, the value will be null.

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.