Class: Twilio::REST::PreviewBase

Inherits:
Domain
  • Object
show all
Defined in:
lib/twilio-ruby/rest/preview_base.rb

Direct Known Subclasses

Preview

Instance Attribute Summary

Attributes inherited from Domain

#client

Instance Method Summary collapse

Methods inherited from Domain

#absolute_url, #request

Constructor Details

#initialize(twilio) ⇒ PreviewBase

Initialize preview domain

Parameters:

  • twilio
    • The twilio client



19
20
21
22
23
24
25
26
27
28
# File 'lib/twilio-ruby/rest/preview_base.rb', line 19

def initialize(twilio)
  super(twilio)
  @base_url =  "https://preview.twilio.com"
  @host = "preview.twilio.com"
  @port = 443
  @hosted_numbers = nil
  @sync = nil
  @marketplace = nil
  @wireless = nil
end

Instance Method Details

#hosted_numbersObject



30
31
32
# File 'lib/twilio-ruby/rest/preview_base.rb', line 30

def hosted_numbers
  @hosted_numbers ||= Preview::HostedNumbers.new self
end

#marketplaceObject



38
39
40
# File 'lib/twilio-ruby/rest/preview_base.rb', line 38

def marketplace
  @marketplace ||= Preview::Marketplace.new self
end

#syncObject



34
35
36
# File 'lib/twilio-ruby/rest/preview_base.rb', line 34

def sync
  @sync ||= Preview::Sync.new self
end

#to_sObject

Provide a user friendly representation



48
49
50
# File 'lib/twilio-ruby/rest/preview_base.rb', line 48

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

#wirelessObject



42
43
44
# File 'lib/twilio-ruby/rest/preview_base.rb', line 42

def wireless
  @wireless ||= Preview::Wireless.new self
end