Class: Twilio::REST::Wireless::V1::RatePlanInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Wireless::V1::RatePlanInstance
- Defined in:
- lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the resource.
-
#context ⇒ RatePlanContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#data_enabled ⇒ Boolean
Whether SIMs can use GPRS/3G/4G/LTE data connectivity.
-
#data_limit ⇒ String
The total data usage in Megabytes that the Network allows during one month on the home network.
-
#data_metering ⇒ String
The model used to meter data usage.
-
#date_created ⇒ Time
The date when the resource was created, given as GMT in ISO 8601 format.
-
#date_updated ⇒ Time
The date when the resource was last updated, given as GMT in ISO 8601 format.
-
#delete ⇒ Boolean
Deletes the RatePlanInstance.
-
#fetch ⇒ RatePlanInstance
Fetch a RatePlanInstance.
-
#friendly_name ⇒ String
The string that you assigned to describe the resource.
-
#initialize(version, payload, sid: nil) ⇒ RatePlanInstance
constructor
Initialize the RatePlanInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#international_roaming ⇒ String
The services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States.
-
#international_roaming_data_limit ⇒ String
The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States.
-
#messaging_enabled ⇒ Boolean
Whether SIMs can make, send, and receive SMS using Commands.
-
#national_roaming_data_limit ⇒ String
The total data usage in Megabytes that the Network allows during one month on non-home networks in the United States.
-
#national_roaming_enabled ⇒ Boolean
Whether SIMs can roam on networks other than the home network in the United States.
-
#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, friendly_name: :unset) ⇒ RatePlanInstance
Update the RatePlanInstance.
-
#url ⇒ String
The absolute URL of the resource.
-
#voice_enabled ⇒ Boolean
Whether SIMs can make and receive voice calls.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ RatePlanInstance
Initialize the RatePlanInstance
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 285 def initialize(version, payload, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'unique_name' => payload['unique_name'], 'account_sid' => payload['account_sid'], 'friendly_name' => payload['friendly_name'], 'data_enabled' => payload['data_enabled'], 'data_metering' => payload['data_metering'], 'data_limit' => payload['data_limit'].to_i, 'messaging_enabled' => payload['messaging_enabled'], 'voice_enabled' => payload['voice_enabled'], 'national_roaming_enabled' => payload['national_roaming_enabled'], 'national_roaming_data_limit' => payload['national_roaming_data_limit'].to_i, 'international_roaming' => payload['international_roaming'], 'international_roaming_data_limit' => payload['international_roaming_data_limit'].to_i, 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'url' => payload['url'], } # 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.
338 339 340 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 338 def account_sid @properties['account_sid'] end |
#context ⇒ RatePlanContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
317 318 319 320 321 322 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 317 def context unless @instance_context @instance_context = RatePlanContext.new(@version, @params['sid'], ) end @instance_context end |
#data_enabled ⇒ Boolean
Returns Whether SIMs can use GPRS/3G/4G/LTE data connectivity.
350 351 352 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 350 def data_enabled @properties['data_enabled'] end |
#data_limit ⇒ String
Returns The total data usage in Megabytes that the Network allows during one month on the home network.
362 363 364 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 362 def data_limit @properties['data_limit'] end |
#data_metering ⇒ String
Returns The model used to meter data usage.
356 357 358 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 356 def data_metering @properties['data_metering'] end |
#date_created ⇒ Time
Returns The date when the resource was created, given as GMT in ISO 8601 format.
404 405 406 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 404 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date when the resource was last updated, given as GMT in ISO 8601 format.
410 411 412 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 410 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the RatePlanInstance
442 443 444 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 442 def delete context.delete end |
#fetch ⇒ RatePlanInstance
Fetch a RatePlanInstance
423 424 425 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 423 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the resource.
344 345 346 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 344 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
455 456 457 458 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 455 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Wireless.V1.RatePlanInstance #{values}>" end |
#international_roaming ⇒ String
Returns The services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States.
392 393 394 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 392 def international_roaming @properties['international_roaming'] end |
#international_roaming_data_limit ⇒ String
Returns The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States.
398 399 400 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 398 def international_roaming_data_limit @properties['international_roaming_data_limit'] end |
#messaging_enabled ⇒ Boolean
Returns Whether SIMs can make, send, and receive SMS using Commands.
368 369 370 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 368 def messaging_enabled @properties['messaging_enabled'] end |
#national_roaming_data_limit ⇒ String
Returns The total data usage in Megabytes that the Network allows during one month on non-home networks in the United States.
386 387 388 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 386 def national_roaming_data_limit @properties['national_roaming_data_limit'] end |
#national_roaming_enabled ⇒ Boolean
Returns Whether SIMs can roam on networks other than the home network in the United States.
380 381 382 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 380 def national_roaming_enabled @properties['national_roaming_enabled'] end |
#sid ⇒ String
Returns The unique string that identifies the resource.
326 327 328 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 326 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
448 449 450 451 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 448 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Wireless.V1.RatePlanInstance #{values}>" end |
#unique_name ⇒ String
Returns An application-defined string that uniquely identifies the resource.
332 333 334 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 332 def unique_name @properties['unique_name'] end |
#update(unique_name: :unset, friendly_name: :unset) ⇒ RatePlanInstance
Update the RatePlanInstance
435 436 437 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 435 def update(unique_name: :unset, friendly_name: :unset) context.update(unique_name: unique_name, friendly_name: friendly_name, ) end |
#url ⇒ String
Returns The absolute URL of the resource.
416 417 418 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 416 def url @properties['url'] end |
#voice_enabled ⇒ Boolean
Returns Whether SIMs can make and receive voice calls.
374 375 376 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 374 def voice_enabled @properties['voice_enabled'] end |