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 unique id of the Account that this Rate Plan belongs to.
-
#context ⇒ RatePlanContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#data_enabled ⇒ Boolean
Defines whether SIMs are capable of using GPRS/3G/4G/LTE data connectivity.
-
#data_limit ⇒ String
Network-enforced limit specifying the total Megabytes of data usage allowed during one month on the home network.
-
#data_metering ⇒ String
The model by which to meter data usage, in accordance with the two available data metering models.
-
#date_created ⇒ Time
The date that this resource was created, given as GMT in ISO 8601 format.
-
#date_updated ⇒ Time
The date that this resource was last updated, given as GMT in ISO 8601 format.
-
#delete ⇒ Boolean
Deletes the RatePlanInstance.
-
#fetch ⇒ RatePlanInstance
Fetch a RatePlanInstance.
-
#friendly_name ⇒ String
A user-provided string that identifies this resource.
-
#initialize(version, payload, sid: nil) ⇒ RatePlanInstance
constructor
Initialize the RatePlanInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#international_roaming ⇒ String
The international_roaming.
-
#international_roaming_data_limit ⇒ String
The international_roaming_data_limit.
-
#messaging_enabled ⇒ Boolean
Defines whether SIMs are capable of making and sending and receiving SMS via Commands.
-
#national_roaming_data_limit ⇒ String
Network-enforced limit specifying the total Megabytes of national roaming data usage allowed during one month.
-
#national_roaming_enabled ⇒ Boolean
Defines whether SIMs can roam onto other networks in the SIM’s home country.
-
#sid ⇒ String
A 34 character string that uniquely identifies this resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#unique_name ⇒ String
A user-provided string that uniquely identifies this resource as an alternative to the sid.
-
#update(unique_name: :unset, friendly_name: :unset) ⇒ RatePlanInstance
Update the RatePlanInstance.
-
#url ⇒ String
The URL for this resource.
-
#voice_enabled ⇒ Boolean
Defines whether SIMs are capable of making and receiving voice calls.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ RatePlanInstance
Initialize the RatePlanInstance
278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 278 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 unique id of the Account that this Rate Plan belongs to.
331 332 333 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 331 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
310 311 312 313 314 315 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 310 def context unless @instance_context @instance_context = RatePlanContext.new(@version, @params['sid'], ) end @instance_context end |
#data_enabled ⇒ Boolean
Returns Defines whether SIMs are capable of using GPRS/3G/4G/LTE data connectivity.
343 344 345 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 343 def data_enabled @properties['data_enabled'] end |
#data_limit ⇒ String
Returns Network-enforced limit specifying the total Megabytes of data usage allowed during one month on the home network.
355 356 357 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 355 def data_limit @properties['data_limit'] end |
#data_metering ⇒ String
Returns The model by which to meter data usage, in accordance with the two available data metering models.
349 350 351 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 349 def data_metering @properties['data_metering'] end |
#date_created ⇒ Time
Returns The date that this resource was created, given as GMT in ISO 8601 format.
397 398 399 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 397 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date that this resource was last updated, given as GMT in ISO 8601 format.
403 404 405 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 403 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the RatePlanInstance
434 435 436 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 434 def delete context.delete end |
#fetch ⇒ RatePlanInstance
Fetch a RatePlanInstance
416 417 418 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 416 def fetch context.fetch end |
#friendly_name ⇒ String
Returns A user-provided string that identifies this resource.
337 338 339 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 337 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
447 448 449 450 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 447 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Wireless.V1.RatePlanInstance #{values}>" end |
#international_roaming ⇒ String
Returns The international_roaming.
385 386 387 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 385 def international_roaming @properties['international_roaming'] end |
#international_roaming_data_limit ⇒ String
Returns The international_roaming_data_limit.
391 392 393 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 391 def international_roaming_data_limit @properties['international_roaming_data_limit'] end |
#messaging_enabled ⇒ Boolean
Returns Defines whether SIMs are capable of making and sending and receiving SMS via Commands.
361 362 363 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 361 def messaging_enabled @properties['messaging_enabled'] end |
#national_roaming_data_limit ⇒ String
Returns Network-enforced limit specifying the total Megabytes of national roaming data usage allowed during one month.
379 380 381 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 379 def national_roaming_data_limit @properties['national_roaming_data_limit'] end |
#national_roaming_enabled ⇒ Boolean
Returns Defines whether SIMs can roam onto other networks in the SIM’s home country.
373 374 375 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 373 def national_roaming_enabled @properties['national_roaming_enabled'] end |
#sid ⇒ String
Returns A 34 character string that uniquely identifies this resource.
319 320 321 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 319 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
440 441 442 443 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 440 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Wireless.V1.RatePlanInstance #{values}>" end |
#unique_name ⇒ String
Returns A user-provided string that uniquely identifies this resource as an alternative to the sid.
325 326 327 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 325 def unique_name @properties['unique_name'] end |
#update(unique_name: :unset, friendly_name: :unset) ⇒ RatePlanInstance
Update the RatePlanInstance
427 428 429 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 427 def update(unique_name: :unset, friendly_name: :unset) context.update(unique_name: unique_name, friendly_name: friendly_name, ) end |
#url ⇒ String
Returns The URL for this resource.
409 410 411 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 409 def url @properties['url'] end |
#voice_enabled ⇒ Boolean
Returns Defines whether SIMs are capable of making and receiving voice calls.
367 368 369 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 367 def voice_enabled @properties['voice_enabled'] end |