NAME

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

SYNOPSIS

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

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

DESCRIPTION

Machine-to-machine IP Commands sent to/from Super SIMs

This file holds IpCommandList, IpCommandPage, IpCommandContext and IpCommandInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

IpCommandList

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

create

my $ip_command = $client->supersim->v1->ip_commands->create($sim, $payload, $device_port, \%options);

Send an IP Command to a Super SIM. Returns a IpCommandInstance.

The required values are:

$sim

The sid or unique_name of the Super SIM to send the IP Command to.

$payload

The data that will be sent to the device. The payload cannot exceed 1300 bytes. If the PayloadType is set to text, the payload is encoded in UTF-8. If PayloadType is set to binary, the payload is encoded in Base64.

$device_port

The device port to which the IP Command will be sent.

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 IP Command.

payload_type

One of text or binary.

read

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

Retrieve a list of IP 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 IP 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 IP Command was sent to or from.

sim_iccid

The ICCID of the Sim resource that IP Command was sent to or from.

status

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

stream

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

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

page

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

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

get_page

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

Fetches the page at a URL given by Twilio.

get_context

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

Returns a IpCommandContext, and makes no request.

IpCommandPage

A Twilio::Page of IpCommandInstance objects.

records_key

build_instance

Used by Twilio::Page.

IpCommandContext

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

fetch

my $ip_command = $client->supersim->v1->ip_commands($sid)->fetch;

Fetch IP Command instance from your account. Returns a IpCommandInstance.

IpCommandInstance

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 IP 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.

device_ip

The IP address of the device that the IP Command was sent to or received from. For an IP Command sent to a Super SIM, device_ip starts out as null, and once the IP Command is “sent”, the device_ip will be filled out. An IP Command sent from a Super SIM have its device_ip always set.

device_port

For an IP Command sent to a Super SIM, it would be the destination port of the IP message. For an IP Command sent from a Super SIM, it would be the source port of the IP message.

direction

One of to_sim or from_sim.

payload

The payload that is carried in the IP/UDP message. The payload can be encoded in either text or binary format. For text payload, UTF-8 encoding must be used. For an IP Command sent to a Super SIM, the payload is appended to the IP/UDP message “as is”. The payload should not exceed 1300 bytes. For an IP Command sent from a Super SIM, the payload from the received IP/UDP message is extracted and sent in binary encoding. For an IP Command sent from a Super SIM, the payload should not exceed 1300 bytes. If it is larger than 1300 bytes, there might be fragmentation on the upstream and the message may appear truncated.

payload_type

One of text or binary.

sid

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

sim_iccid

The ICCID of the Super SIM that this IP Command was sent to or from.

sim_sid

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

status

One of queued, sent, received or failed.

url

The absolute URL of the IP 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.