Class: Twilio::REST::Preview::Wireless

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/preview/wireless.rb,
lib/twilio-ruby/rest/preview/wireless/sim.rb,
lib/twilio-ruby/rest/preview/wireless/command.rb,
lib/twilio-ruby/rest/preview/wireless/rate_plan.rb,
lib/twilio-ruby/rest/preview/wireless/sim/usage.rb

Defined Under Namespace

Classes: CommandContext, CommandInstance, CommandList, CommandPage, RatePlanContext, RatePlanInstance, RatePlanList, RatePlanPage, SimContext, SimInstance, SimList, SimPage

Instance Attribute Summary

Attributes inherited from Version

#domain

Instance Method Summary collapse

Methods inherited from Version

#absolute_url, #create, #delete, #exception, #fetch, #page, #read_limits, #relative_uri, #request, #stream, #update

Constructor Details

#initialize(domain) ⇒ Wireless

Initialize the Wireless version of Preview


15
16
17
18
19
20
21
# File 'lib/twilio-ruby/rest/preview/wireless.rb', line 15

def initialize(domain)
  super
  @version = 'wireless'
  @commands = nil
  @rate_plans = nil
  @sims = nil
end

Instance Method Details

#commands(sid = :unset) ⇒ Twilio::REST::Preview::Wireless::CommandContext, Twilio::REST::Preview::Wireless::CommandList

Parameters:

  • sid (String) (defaults to: :unset)

    The sid

Returns:


27
28
29
30
31
32
33
34
35
36
# File 'lib/twilio-ruby/rest/preview/wireless.rb', line 27

def commands(sid=:unset)
  if sid.nil?
      raise ArgumentError, 'sid cannot be nil'
  end
  if sid == :unset
      @commands ||= CommandList.new self
  else
      CommandContext.new(self, sid)
  end
end

#rate_plans(sid = :unset) ⇒ Twilio::REST::Preview::Wireless::RatePlanContext, Twilio::REST::Preview::Wireless::RatePlanList

Parameters:

  • sid (String) (defaults to: :unset)

    The sid

Returns:


42
43
44
45
46
47
48
49
50
51
# File 'lib/twilio-ruby/rest/preview/wireless.rb', line 42

def rate_plans(sid=:unset)
  if sid.nil?
      raise ArgumentError, 'sid cannot be nil'
  end
  if sid == :unset
      @rate_plans ||= RatePlanList.new self
  else
      RatePlanContext.new(self, sid)
  end
end

#sims(sid = :unset) ⇒ Twilio::REST::Preview::Wireless::SimContext, Twilio::REST::Preview::Wireless::SimList

Parameters:

  • sid (String) (defaults to: :unset)

    The sid

Returns:


57
58
59
60
61
62
63
64
65
66
# File 'lib/twilio-ruby/rest/preview/wireless.rb', line 57

def sims(sid=:unset)
  if sid.nil?
      raise ArgumentError, 'sid cannot be nil'
  end
  if sid == :unset
      @sims ||= SimList.new self
  else
      SimContext.new(self, sid)
  end
end

#to_sObject

Provide a user friendly representation


70
71
72
# File 'lib/twilio-ruby/rest/preview/wireless.rb', line 70

def to_s
  '<Twilio::REST::Preview::Wireless>'
end