class Twilio::REST::Wireless::V1

Public Class Methods

new(domain) click to toggle source

Initialize the V1 version of Wireless

Calls superclass method Twilio::REST::Version::new
   # File lib/twilio-ruby/rest/wireless/v1.rb
15 def initialize(domain)
16   super
17   @version = 'v1'
18   @usage_records = nil
19   @commands = nil
20   @rate_plans = nil
21   @sims = nil
22 end

Public Instance Methods

commands(sid=:unset) click to toggle source

@param [String] sid The SID of the Command resource to fetch. @return [Twilio::REST::Wireless::V1::CommandContext] if sid was passed. @return [Twilio::REST::Wireless::V1::CommandList]

   # File lib/twilio-ruby/rest/wireless/v1.rb
34 def commands(sid=:unset)
35   if sid.nil?
36       raise ArgumentError, 'sid cannot be nil'
37   end
38   if sid == :unset
39       @commands ||= CommandList.new self
40   else
41       CommandContext.new(self, sid)
42   end
43 end
rate_plans(sid=:unset) click to toggle source

@param [String] sid The SID of the RatePlan resource to fetch. @return [Twilio::REST::Wireless::V1::RatePlanContext] if sid was passed. @return [Twilio::REST::Wireless::V1::RatePlanList]

   # File lib/twilio-ruby/rest/wireless/v1.rb
49 def rate_plans(sid=:unset)
50   if sid.nil?
51       raise ArgumentError, 'sid cannot be nil'
52   end
53   if sid == :unset
54       @rate_plans ||= RatePlanList.new self
55   else
56       RatePlanContext.new(self, sid)
57   end
58 end
sims(sid=:unset) click to toggle source

@param [String] sid The SID or the `unique_name` of the Sim resource to fetch. @return [Twilio::REST::Wireless::V1::SimContext] if sid was passed. @return [Twilio::REST::Wireless::V1::SimList]

   # File lib/twilio-ruby/rest/wireless/v1.rb
64 def sims(sid=:unset)
65   if sid.nil?
66       raise ArgumentError, 'sid cannot be nil'
67   end
68   if sid == :unset
69       @sims ||= SimList.new self
70   else
71       SimContext.new(self, sid)
72   end
73 end
to_s() click to toggle source

Provide a user friendly representation

   # File lib/twilio-ruby/rest/wireless/v1.rb
77 def to_s
78   '<Twilio::REST::Wireless::V1>'
79 end
usage_records() click to toggle source

@return [Twilio::REST::Wireless::V1::UsageRecordContext]

   # File lib/twilio-ruby/rest/wireless/v1.rb
26 def usage_records
27   @usage_records ||= UsageRecordList.new self
28 end