Class: Twilio::REST::Preview::Sync

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/preview/sync.rb,
lib/twilio-ruby/rest/preview/sync/service.rb,
lib/twilio-ruby/rest/preview/sync/service/document.rb,
lib/twilio-ruby/rest/preview/sync/service/sync_map.rb,
lib/twilio-ruby/rest/preview/sync/service/sync_list.rb,
lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb,
lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb,
lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb,
lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb,
lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb

Defined Under Namespace

Classes: ServiceContext, ServiceInstance, ServiceList, ServicePage

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) ⇒ Sync

Initialize the Sync version of Preview



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

def initialize(domain)
    super
    @version = 'Sync'
    @services = nil
end

Instance Method Details

#services(sid = :unset) ⇒ Twilio::REST::Preview::Sync::ServiceContext, Twilio::REST::Preview::Sync::ServiceList

Parameters:

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

Returns:



31
32
33
34
35
36
37
38
39
40
# File 'lib/twilio-ruby/rest/preview/sync.rb', line 31

def services(sid=:unset)
    if sid.nil?
        raise ArgumentError, 'sid cannot be nil'
    end
    if sid == :unset
        @services ||= ServiceList.new self
    else
        ServiceContext.new(self, sid)
    end
end

#to_sObject

Provide a user friendly representation



43
44
45
# File 'lib/twilio-ruby/rest/preview/sync.rb', line 43

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