NAME

Twilio::Rest::Supersim::V1::SmsCommand - The SmsCommand resource

SYNOPSIS

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

my $sms_command = $client->supersim->v1->sms_commands->create($sim, $payload, \%options);
for my $sms_command ($client->supersim->v1->sms_commands->read({}, 20)) {
  ...
}
my $sms_command = $client->supersim->v1->sms_commands($sid)->fetch;

DESCRIPTION

Machine-to-machine SMS Commands sent to/from SIMs

This file holds SmsCommandList, SmsCommandPage, SmsCommandContext and SmsCommandInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

SmsCommandList

Returned by $client->supersim->v1->sms_commands. See also Twilio::ListResource.

create

my $sms_command = $client->supersim->v1->sms_commands->create($sim, $payload, \%options);

Send SMS Command to a Sim. Returns a SmsCommandInstance.

The required values are:

$sim

The sid or unique_name of the SIM to send the SMS Command to.

$payload

The message body of the SMS Command.

The options are:

callback_method

The HTTP method we should use to call callback_url. Can be: GET or POST and the default is POST. One of GET or POST.

callback_url

The URL we should call using the callback_method after we have sent the command.

read

my @records = $client->supersim->v1->sms_commands->read(\%options, $limit, $page_size);

Retrieve a list of SMS Commands from your account. Returns the records as a list, fetching as many pages as it needs.

The options are:

direction

The direction of the SMS Command. Can be to_sim or from_sim. The value of to_sim is synonymous with the term mobile terminated, and from_sim is synonymous with the term mobile originated. One of to_sim or from_sim.

sim

The SID or unique name of the Sim resource that SMS Command was sent to or from.

status

The status of the SMS Command. Can be: queued, sent, delivered, received or failed. See the SMS Command Status Values for a description of each. One of queued, sent, delivered, received or failed.

stream

my $stream = $client->supersim->v1->sms_commands->stream(\%options, $limit, $page_size);

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

page

my $page = $client->supersim->v1->sms_commands->page(\%options, $page_size, $page_token, $page_number);

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

get_page

my $page = $client->supersim->v1->sms_commands->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->supersim->v1->sms_commands->get_context($sid);

Returns a SmsCommandContext, and makes no request.

SmsCommandPage

A Twilio::Page of SmsCommandInstance objects.

records_key

build_instance

Used by Twilio::Page.

SmsCommandContext

Returned by $client->supersim->v1->sms_commands($sid). It makes no request until one of these methods is called.

fetch

my $sms_command = $client->supersim->v1->sms_commands($sid)->fetch;

Fetch SMS Command instance from your account. Returns a SmsCommandInstance.

SmsCommandInstance

See also Twilio::InstanceResource.

It has fetch, which work as they do on the context.

Its fields are:

account_sid

The SID of the Account that created the SMS Command resource.

date_created

The date and time in GMT when the resource was created specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

date_updated

The date and time in GMT when the resource was last updated specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

direction

One of to_sim or from_sim.

payload

The message body of the SMS Command sent to or from the SIM. For text mode messages, this can be up to 160 characters.

sid

The unique string that we created to identify the SMS Command resource.

sim_sid

The SID of the SIM that this SMS Command was sent to or from.

status

One of queued, sent, delivered, received or failed.

url

The absolute URL of the SMS Command resource.

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.