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



21
22
23
24
25
26
27
# File 'lib/twilio-ruby/rest/preview/wireless.rb', line 21

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)

Returns:



33
34
35
36
37
38
39
40
41
42
# File 'lib/twilio-ruby/rest/preview/wireless.rb', line 33

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)

Returns:



47
48
49
50
51
52
53
54
55
56
# File 'lib/twilio-ruby/rest/preview/wireless.rb', line 47

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)

Returns:



61
62
63
64
65
66
67
68
69
70
# File 'lib/twilio-ruby/rest/preview/wireless.rb', line 61

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



73
74
75
# File 'lib/twilio-ruby/rest/preview/wireless.rb', line 73

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