Class: Twilio::REST::Supersim::V1::FleetInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Supersim::V1::FleetInstance
- Defined in:
- lib/twilio-ruby/rest/supersim/v1/fleet.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the resource.
-
#context ⇒ FleetContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#data_enabled ⇒ Boolean
Defines whether SIMs in the Fleet are capable of using data connectivity.
-
#data_limit ⇒ String
The total data usage (download and upload combined) in Megabytes that each Sim resource assigned to the Fleet resource can consume.
-
#data_metering ⇒ fleet.DataMetering
The model by which a SIM is metered and billed.
-
#date_created ⇒ Time
The ISO 8601 date and time in GMT when the resource was created.
-
#date_updated ⇒ Time
The ISO 8601 date and time in GMT when the resource was last updated.
-
#fetch ⇒ FleetInstance
Fetch the FleetInstance.
-
#initialize(version, payload, sid: nil) ⇒ FleetInstance
constructor
Initialize the FleetInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#ip_commands_method ⇒ String
A string representing the HTTP method to use when making a request to `ip_commands_url`.
-
#ip_commands_url ⇒ String
The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device.
-
#network_access_profile_sid ⇒ String
The SID of the Network Access Profile of the Fleet.
-
#sid ⇒ String
The unique string that identifies the resource.
-
#sms_commands_enabled ⇒ Boolean
Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands.
-
#sms_commands_method ⇒ String
A string representing the HTTP method to use when making a request to `sms_commands_url`.
-
#sms_commands_url ⇒ 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.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#unique_name ⇒ String
An application-defined string that uniquely identifies the resource.
-
#update(unique_name: :unset, network_access_profile: :unset, ip_commands_url: :unset, ip_commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset) ⇒ FleetInstance
Update the FleetInstance.
-
#url ⇒ String
The absolute URL of the Fleet resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ FleetInstance
Initialize the FleetInstance
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 297 def initialize(version, payload, sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'sid' => payload['sid'], 'unique_name' => payload['unique_name'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'url' => payload['url'], 'data_enabled' => payload['data_enabled'], 'data_limit' => payload['data_limit'].to_i, 'data_metering' => payload['data_metering'], 'sms_commands_enabled' => payload['sms_commands_enabled'], 'sms_commands_url' => payload['sms_commands_url'], 'sms_commands_method' => payload['sms_commands_method'], 'network_access_profile_sid' => payload['network_access_profile_sid'], 'ip_commands_url' => payload['ip_commands_url'], 'ip_commands_method' => payload['ip_commands_method'], } # Context @instance_context = nil @params = {'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the resource.
337 338 339 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 337 def account_sid @properties['account_sid'] end |
#context ⇒ FleetContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
328 329 330 331 332 333 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 328 def context unless @instance_context @instance_context = FleetContext.new(@version, @params['sid'], ) end @instance_context end |
#data_enabled ⇒ Boolean
Returns Defines whether SIMs in the Fleet are capable of using data connectivity.
373 374 375 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 373 def data_enabled @properties['data_enabled'] end |
#data_limit ⇒ String
Returns The total data usage (download and upload combined) in Megabytes that each Sim resource assigned to the Fleet resource can consume.
379 380 381 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 379 def data_limit @properties['data_limit'] end |
#data_metering ⇒ fleet.DataMetering
Returns The model by which a SIM is metered and billed.
385 386 387 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 385 def data_metering @properties['data_metering'] end |
#date_created ⇒ Time
Returns The ISO 8601 date and time in GMT when the resource was created.
355 356 357 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 355 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The ISO 8601 date and time in GMT when the resource was last updated.
361 362 363 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 361 def date_updated @properties['date_updated'] end |
#fetch ⇒ FleetInstance
Fetch the FleetInstance
428 429 430 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 428 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
475 476 477 478 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 475 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Supersim.V1.FleetInstance #{values}>" end |
#ip_commands_method ⇒ String
Returns A string representing the HTTP method to use when making a request to `ip_commands_url`.
421 422 423 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 421 def ip_commands_method @properties['ip_commands_method'] end |
#ip_commands_url ⇒ String
Returns The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device.
415 416 417 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 415 def ip_commands_url @properties['ip_commands_url'] end |
#network_access_profile_sid ⇒ String
Returns The SID of the Network Access Profile of the Fleet.
409 410 411 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 409 def network_access_profile_sid @properties['network_access_profile_sid'] end |
#sid ⇒ String
Returns The unique string that identifies the resource.
343 344 345 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 343 def sid @properties['sid'] end |
#sms_commands_enabled ⇒ Boolean
Returns Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands.
391 392 393 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 391 def sms_commands_enabled @properties['sms_commands_enabled'] end |
#sms_commands_method ⇒ String
Returns A string representing the HTTP method to use when making a request to `sms_commands_url`.
403 404 405 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 403 def sms_commands_method @properties['sms_commands_method'] end |
#sms_commands_url ⇒ String
Returns 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.
397 398 399 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 397 def sms_commands_url @properties['sms_commands_url'] end |
#to_s ⇒ Object
Provide a user friendly representation
468 469 470 471 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 468 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Supersim.V1.FleetInstance #{values}>" end |
#unique_name ⇒ String
Returns An application-defined string that uniquely identifies the resource.
349 350 351 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 349 def unique_name @properties['unique_name'] end |
#update(unique_name: :unset, network_access_profile: :unset, ip_commands_url: :unset, ip_commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset) ⇒ FleetInstance
Update the FleetInstance
455 456 457 458 459 460 461 462 463 464 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 455 def update(unique_name: :unset, network_access_profile: :unset, ip_commands_url: :unset, ip_commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset) context.update( unique_name: unique_name, network_access_profile: network_access_profile, ip_commands_url: ip_commands_url, ip_commands_method: ip_commands_method, sms_commands_url: sms_commands_url, sms_commands_method: sms_commands_method, ) end |
#url ⇒ String
Returns The absolute URL of the Fleet resource.
367 368 369 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 367 def url @properties['url'] end |