class Twilio::REST::Wireless::V1::RatePlanInstance

Public Class Methods

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

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

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
268 def initialize(version, payload, sid: nil)
269   super(version)
270 
271   # Marshaled Properties
272   @properties = {
273       'sid' => payload['sid'],
274       'unique_name' => payload['unique_name'],
275       'account_sid' => payload['account_sid'],
276       'friendly_name' => payload['friendly_name'],
277       'data_enabled' => payload['data_enabled'],
278       'data_metering' => payload['data_metering'],
279       'data_limit' => payload['data_limit'].to_i,
280       'messaging_enabled' => payload['messaging_enabled'],
281       'voice_enabled' => payload['voice_enabled'],
282       'national_roaming_enabled' => payload['national_roaming_enabled'],
283       'national_roaming_data_limit' => payload['national_roaming_data_limit'].to_i,
284       'international_roaming' => payload['international_roaming'],
285       'international_roaming_data_limit' => payload['international_roaming_data_limit'].to_i,
286       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
287       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
288       'url' => payload['url'],
289   }
290 
291   # Context
292   @instance_context = nil
293   @params = {'sid' => sid || @properties['sid'], }
294 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/wireless/v1/rate_plan.rb
321 def account_sid
322   @properties['account_sid']
323 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 [RatePlanContext] RatePlanContext for this RatePlanInstance

    # File lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
300 def context
301   unless @instance_context
302     @instance_context = RatePlanContext.new(@version, @params['sid'], )
303   end
304   @instance_context
305 end
data_enabled() click to toggle source

@return [Boolean] Whether SIMs can use GPRS/3G/4G/LTE data connectivity

    # File lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
333 def data_enabled
334   @properties['data_enabled']
335 end
data_limit() click to toggle source

@return [String] The total data usage in Megabytes that the Network allows during one month on the home network

    # File lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
345 def data_limit
346   @properties['data_limit']
347 end
data_metering() click to toggle source

@return [String] The model used to meter data usage

    # File lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
339 def data_metering
340   @properties['data_metering']
341 end
date_created() click to toggle source

@return [Time] The date when the resource was created, given as GMT in ISO 8601 format

    # File lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
387 def date_created
388   @properties['date_created']
389 end
date_updated() click to toggle source

@return [Time] The date when the resource was last updated, given as GMT in ISO 8601 format

    # File lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
393 def date_updated
394   @properties['date_updated']
395 end
delete() click to toggle source

Delete the RatePlanInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
425 def delete
426   context.delete
427 end
fetch() click to toggle source

Fetch the RatePlanInstance @return [RatePlanInstance] Fetched RatePlanInstance

    # File lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
406 def fetch
407   context.fetch
408 end
friendly_name() click to toggle source

@return [String] The string that you assigned to describe the resource

    # File lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
327 def friendly_name
328   @properties['friendly_name']
329 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
438 def inspect
439   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
440   "<Twilio.Wireless.V1.RatePlanInstance #{values}>"
441 end
international_roaming() click to toggle source

@return [Array] The services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States

    # File lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
375 def international_roaming
376   @properties['international_roaming']
377 end
international_roaming_data_limit() click to toggle source

@return [String] The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States

    # File lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
381 def international_roaming_data_limit
382   @properties['international_roaming_data_limit']
383 end
messaging_enabled() click to toggle source

@return [Boolean] Whether SIMs can make, send, and receive SMS using Commands

    # File lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
351 def messaging_enabled
352   @properties['messaging_enabled']
353 end
national_roaming_data_limit() click to toggle source

@return [String] The total data usage in Megabytes that the Network allows during one month on non-home networks in the United States

    # File lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
369 def national_roaming_data_limit
370   @properties['national_roaming_data_limit']
371 end
national_roaming_enabled() click to toggle source

@return [Boolean] Whether SIMs can roam on networks other than the home network in the United States

    # File lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
363 def national_roaming_enabled
364   @properties['national_roaming_enabled']
365 end
sid() click to toggle source

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

    # File lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
309 def sid
310   @properties['sid']
311 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
431 def to_s
432   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
433   "<Twilio.Wireless.V1.RatePlanInstance #{values}>"
434 end
unique_name() click to toggle source

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

    # File lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
315 def unique_name
316   @properties['unique_name']
317 end
update(unique_name: :unset, friendly_name: :unset) click to toggle source

Update the RatePlanInstance @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] friendly_name A descriptive string that you create to describe

the resource. It does not have to be unique.

@return [RatePlanInstance] Updated RatePlanInstance

    # File lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
418 def update(unique_name: :unset, friendly_name: :unset)
419   context.update(unique_name: unique_name, friendly_name: friendly_name, )
420 end
url() click to toggle source

@return [String] The absolute URL of the resource

    # File lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
399 def url
400   @properties['url']
401 end
voice_enabled() click to toggle source

@return [Boolean] Whether SIMs can make and receive voice calls

    # File lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
357 def voice_enabled
358   @properties['voice_enabled']
359 end