class Twilio::REST::Sync::V1::ServiceContext::SyncListInstance

Public Class Methods

new(version, payload, service_sid: nil, sid: nil) click to toggle source

Initialize the SyncListInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] service_sid The SID of the {Sync

Service}[https://www.twilio.com/docs/sync/api/service] the resource is
associated with.

@param [String] sid The SID of the Sync List resource to fetch. Can be the Sync

List resource's `sid` or its `unique_name`.

@return [SyncListInstance] SyncListInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/sync/v1/service/sync_list.rb
294 def initialize(version, payload, service_sid: nil, sid: nil)
295   super(version)
296 
297   # Marshaled Properties
298   @properties = {
299       'sid' => payload['sid'],
300       'unique_name' => payload['unique_name'],
301       'account_sid' => payload['account_sid'],
302       'service_sid' => payload['service_sid'],
303       'url' => payload['url'],
304       'links' => payload['links'],
305       'revision' => payload['revision'],
306       'date_expires' => Twilio.deserialize_iso8601_datetime(payload['date_expires']),
307       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
308       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
309       'created_by' => payload['created_by'],
310   }
311 
312   # Context
313   @instance_context = nil
314   @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'], }
315 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/sync/v1/service/sync_list.rb
342 def account_sid
343   @properties['account_sid']
344 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [SyncListContext] SyncListContext for this SyncListInstance

    # File lib/twilio-ruby/rest/sync/v1/service/sync_list.rb
321 def context
322   unless @instance_context
323     @instance_context = SyncListContext.new(@version, @params['service_sid'], @params['sid'], )
324   end
325   @instance_context
326 end
created_by() click to toggle source

@return [String] The identity of the Sync List's creator

    # File lib/twilio-ruby/rest/sync/v1/service/sync_list.rb
390 def created_by
391   @properties['created_by']
392 end
date_created() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was created

    # File lib/twilio-ruby/rest/sync/v1/service/sync_list.rb
378 def date_created
379   @properties['date_created']
380 end
date_expires() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the Sync List expires

    # File lib/twilio-ruby/rest/sync/v1/service/sync_list.rb
372 def date_expires
373   @properties['date_expires']
374 end
date_updated() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was last updated

    # File lib/twilio-ruby/rest/sync/v1/service/sync_list.rb
384 def date_updated
385   @properties['date_updated']
386 end
delete() click to toggle source

Delete the SyncListInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/sync/v1/service/sync_list.rb
404 def delete
405   context.delete
406 end
fetch() click to toggle source

Fetch the SyncListInstance @return [SyncListInstance] Fetched SyncListInstance

    # File lib/twilio-ruby/rest/sync/v1/service/sync_list.rb
397 def fetch
398   context.fetch
399 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/sync/v1/service/sync_list.rb
443 def inspect
444   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
445   "<Twilio.Sync.V1.SyncListInstance #{values}>"
446 end
revision() click to toggle source

@return [String] The current revision of the Sync List, represented as a string

    # File lib/twilio-ruby/rest/sync/v1/service/sync_list.rb
366 def revision
367   @properties['revision']
368 end
service_sid() click to toggle source

@return [String] The SID of the Sync Service that the resource is associated with

    # File lib/twilio-ruby/rest/sync/v1/service/sync_list.rb
348 def service_sid
349   @properties['service_sid']
350 end
sid() click to toggle source

@return [String] The unique string that identifies the resource

    # File lib/twilio-ruby/rest/sync/v1/service/sync_list.rb
330 def sid
331   @properties['sid']
332 end
sync_list_items() click to toggle source

Access the sync_list_items @return [sync_list_items] sync_list_items

    # File lib/twilio-ruby/rest/sync/v1/service/sync_list.rb
423 def sync_list_items
424   context.sync_list_items
425 end
sync_list_permissions() click to toggle source

Access the sync_list_permissions @return [sync_list_permissions] sync_list_permissions

    # File lib/twilio-ruby/rest/sync/v1/service/sync_list.rb
430 def sync_list_permissions
431   context.sync_list_permissions
432 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/sync/v1/service/sync_list.rb
436 def to_s
437   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
438   "<Twilio.Sync.V1.SyncListInstance #{values}>"
439 end
unique_name() click to toggle source

@return [String] An application-defined string that uniquely identifies the resource

    # File lib/twilio-ruby/rest/sync/v1/service/sync_list.rb
336 def unique_name
337   @properties['unique_name']
338 end
update(ttl: :unset, collection_ttl: :unset) click to toggle source

Update the SyncListInstance @param [String] ttl An alias for `collection_ttl`. If both are provided, this

value is ignored.

@param [String] collection_ttl How long, {in

seconds}[https://www.twilio.com/docs/sync/limits#sync-payload-limits], before
the Sync List expires (time-to-live) and is deleted.

@return [SyncListInstance] Updated SyncListInstance

    # File lib/twilio-ruby/rest/sync/v1/service/sync_list.rb
416 def update(ttl: :unset, collection_ttl: :unset)
417   context.update(ttl: ttl, collection_ttl: collection_ttl, )
418 end
url() click to toggle source

@return [String] The absolute URL of the Sync List resource

    # File lib/twilio-ruby/rest/sync/v1/service/sync_list.rb
354 def url
355   @properties['url']
356 end