class Twilio::REST::Supersim::V1::FleetInstance

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Public Class Methods

new(version, payload, sid: nil) click to toggle source

Initialize the FleetInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] sid The SID of the Fleet resource to fetch. @return [FleetInstance] FleetInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/supersim/v1/fleet.rb
301 def initialize(version, payload, sid: nil)
302   super(version)
303 
304   # Marshaled Properties
305   @properties = {
306       'account_sid' => payload['account_sid'],
307       'sid' => payload['sid'],
308       'unique_name' => payload['unique_name'],
309       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
310       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
311       'url' => payload['url'],
312       'data_enabled' => payload['data_enabled'],
313       'data_limit' => payload['data_limit'].to_i,
314       'data_metering' => payload['data_metering'],
315       'commands_enabled' => payload['commands_enabled'],
316       'commands_url' => payload['commands_url'],
317       'commands_method' => payload['commands_method'],
318       'sms_commands_enabled' => payload['sms_commands_enabled'],
319       'sms_commands_url' => payload['sms_commands_url'],
320       'sms_commands_method' => payload['sms_commands_method'],
321       'network_access_profile_sid' => payload['network_access_profile_sid'],
322   }
323 
324   # Context
325   @instance_context = nil
326   @params = {'sid' => sid || @properties['sid'], }
327 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/supersim/v1/fleet.rb
342 def account_sid
343   @properties['account_sid']
344 end
commands_enabled() click to toggle source

@return [Boolean] Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands

    # File lib/twilio-ruby/rest/supersim/v1/fleet.rb
396 def commands_enabled
397   @properties['commands_enabled']
398 end
commands_method() click to toggle source

@return [String] A string representing the HTTP method to use when making a request to `commands_url`

    # File lib/twilio-ruby/rest/supersim/v1/fleet.rb
408 def commands_method
409   @properties['commands_method']
410 end
commands_url() click to toggle source

@return [String] The URL that will receive a webhook when a Super SIM in the Fleet is used to send an SMS from your device to the Commands number

    # File lib/twilio-ruby/rest/supersim/v1/fleet.rb
402 def commands_url
403   @properties['commands_url']
404 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [FleetContext] FleetContext for this FleetInstance

    # File lib/twilio-ruby/rest/supersim/v1/fleet.rb
333 def context
334   unless @instance_context
335     @instance_context = FleetContext.new(@version, @params['sid'], )
336   end
337   @instance_context
338 end
data_enabled() click to toggle source

@return [Boolean] Defines whether SIMs in the Fleet are capable of using data connectivity

    # File lib/twilio-ruby/rest/supersim/v1/fleet.rb
378 def data_enabled
379   @properties['data_enabled']
380 end
data_limit() click to toggle source

@return [String] The total data usage (download and upload combined) in Megabytes that each Sim resource assigned to the Fleet resource can consume

    # File lib/twilio-ruby/rest/supersim/v1/fleet.rb
384 def data_limit
385   @properties['data_limit']
386 end
data_metering() click to toggle source

@return [fleet.DataMetering] The model by which a SIM is metered and billed

    # File lib/twilio-ruby/rest/supersim/v1/fleet.rb
390 def data_metering
391   @properties['data_metering']
392 end
date_created() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was created

    # File lib/twilio-ruby/rest/supersim/v1/fleet.rb
360 def date_created
361   @properties['date_created']
362 end
date_updated() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was last updated

    # File lib/twilio-ruby/rest/supersim/v1/fleet.rb
366 def date_updated
367   @properties['date_updated']
368 end
fetch() click to toggle source

Fetch the FleetInstance @return [FleetInstance] Fetched FleetInstance

    # File lib/twilio-ruby/rest/supersim/v1/fleet.rb
439 def fetch
440   context.fetch
441 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/supersim/v1/fleet.rb
486 def inspect
487   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
488   "<Twilio.Supersim.V1.FleetInstance #{values}>"
489 end
network_access_profile_sid() click to toggle source

@return [String] The SID of the Network Access Profile of the Fleet

    # File lib/twilio-ruby/rest/supersim/v1/fleet.rb
432 def network_access_profile_sid
433   @properties['network_access_profile_sid']
434 end
sid() click to toggle source

@return [String] The unique string that identifies the resource

    # File lib/twilio-ruby/rest/supersim/v1/fleet.rb
348 def sid
349   @properties['sid']
350 end
sms_commands_enabled() click to toggle source

@return [Boolean] Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands

    # File lib/twilio-ruby/rest/supersim/v1/fleet.rb
414 def sms_commands_enabled
415   @properties['sms_commands_enabled']
416 end
sms_commands_method() click to toggle source

@return [String] A string representing the HTTP method to use when making a request to `sms_commands_url`

    # File lib/twilio-ruby/rest/supersim/v1/fleet.rb
426 def sms_commands_method
427   @properties['sms_commands_method']
428 end
sms_commands_url() click to toggle source

@return [String] The URL that will receive a webhook when a Super SIM in the Fleet is used to send an SMS from your device to the SMS Commands number

    # File lib/twilio-ruby/rest/supersim/v1/fleet.rb
420 def sms_commands_url
421   @properties['sms_commands_url']
422 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/supersim/v1/fleet.rb
479 def to_s
480   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
481   "<Twilio.Supersim.V1.FleetInstance #{values}>"
482 end
unique_name() click to toggle source

@return [String] An application-defined string that uniquely identifies the resource

    # File lib/twilio-ruby/rest/supersim/v1/fleet.rb
354 def unique_name
355   @properties['unique_name']
356 end
update(unique_name: :unset, network_access_profile: :unset, commands_url: :unset, commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset) click to toggle source

Update the FleetInstance @param [String] unique_name An application-defined string that uniquely

identifies the resource. It can be used in place of the resource's `sid` in the
URL to address the resource.

@param [String] network_access_profile The SID or unique name of the Network

Access Profile that will control which cellular networks the Fleet's SIMs can
connect to.

@param [String] commands_url The URL that will receive a webhook when a Super

SIM in the Fleet is used to send an SMS from your device to the Commands number.
Your server should respond with an HTTP status code in the 200 range; any
response body will be ignored.

@param [String] commands_method A string representing the HTTP method to use

when making a request to `commands_url`. Can be one of `POST` or `GET`. Defaults
to `POST`.

@param [String] sms_commands_url The URL that will receive a webhook when a

Super SIM in the Fleet is used to send an SMS from your device to the SMS
Commands number. Your server should respond with an HTTP status code in the 200
range; any response body will be ignored.

@param [String] sms_commands_method A string representing the HTTP method to use

when making a request to `sms_commands_url`. Can be one of `POST` or `GET`.
Defaults to `POST`.

@return [FleetInstance] Updated FleetInstance

    # File lib/twilio-ruby/rest/supersim/v1/fleet.rb
466 def update(unique_name: :unset, network_access_profile: :unset, commands_url: :unset, commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset)
467   context.update(
468       unique_name: unique_name,
469       network_access_profile: network_access_profile,
470       commands_url: commands_url,
471       commands_method: commands_method,
472       sms_commands_url: sms_commands_url,
473       sms_commands_method: sms_commands_method,
474   )
475 end
url() click to toggle source

@return [String] The absolute URL of the Fleet resource

    # File lib/twilio-ruby/rest/supersim/v1/fleet.rb
372 def url
373   @properties['url']
374 end