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 preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the resource.
-
#commands_enabled ⇒ Boolean
Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands.
-
#commands_method ⇒ String
A string representing the HTTP method to use when making a request to ‘commands_url`.
-
#commands_url ⇒ String
The URL that will receive a webhook when a SIM in the Fleet originates a machine-to-machine SMS via Commands.
-
#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.
-
#network_access_profile_sid ⇒ String
The SID of the Network Access Profile of the Fleet.
-
#sid ⇒ String
The unique string that identifies the resource.
-
#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) ⇒ FleetInstance
Update the FleetInstance.
-
#url ⇒ String
The absolute URL of the Fleet resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ FleetInstance
Initialize the FleetInstance
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 270 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'], 'commands_enabled' => payload['commands_enabled'], 'commands_url' => payload['commands_url'], 'commands_method' => payload['commands_method'], 'network_access_profile_sid' => payload['network_access_profile_sid'], } # 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.
308 309 310 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 308 def account_sid @properties['account_sid'] end |
#commands_enabled ⇒ Boolean
Returns Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands.
362 363 364 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 362 def commands_enabled @properties['commands_enabled'] end |
#commands_method ⇒ String
Returns A string representing the HTTP method to use when making a request to ‘commands_url`.
374 375 376 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 374 def commands_method @properties['commands_method'] end |
#commands_url ⇒ String
Returns The URL that will receive a webhook when a SIM in the Fleet originates a machine-to-machine SMS via Commands.
368 369 370 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 368 def commands_url @properties['commands_url'] 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
299 300 301 302 303 304 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 299 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.
344 345 346 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 344 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.
350 351 352 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 350 def data_limit @properties['data_limit'] end |
#data_metering ⇒ fleet.DataMetering
Returns The model by which a SIM is metered and billed.
356 357 358 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 356 def data_metering @properties['data_metering'] end |
#date_created ⇒ Time
Returns The ISO 8601 date and time in GMT when the resource was created.
326 327 328 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 326 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.
332 333 334 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 332 def date_updated @properties['date_updated'] end |
#fetch ⇒ FleetInstance
Fetch the FleetInstance
387 388 389 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 387 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
413 414 415 416 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 413 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Supersim.V1.FleetInstance #{values}>" end |
#network_access_profile_sid ⇒ String
Returns The SID of the Network Access Profile of the Fleet.
380 381 382 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 380 def network_access_profile_sid @properties['network_access_profile_sid'] end |
#sid ⇒ String
Returns The unique string that identifies the resource.
314 315 316 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 314 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
406 407 408 409 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 406 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.
320 321 322 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 320 def unique_name @properties['unique_name'] end |
#update(unique_name: :unset, network_access_profile: :unset) ⇒ FleetInstance
Update the FleetInstance
400 401 402 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 400 def update(unique_name: :unset, network_access_profile: :unset) context.update(unique_name: unique_name, network_access_profile: network_access_profile, ) end |
#url ⇒ String
Returns The absolute URL of the Fleet resource.
338 339 340 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 338 def url @properties['url'] end |