class Twilio::REST::Preview::Sync::ServiceContext::SyncListInstance
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
Public Class Methods
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 service_sid
@param [String] sid The sid @return [SyncListInstance] SyncListInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/preview/sync/service/sync_list.rb 266 def initialize(version, payload, service_sid: nil, sid: nil) 267 super(version) 268 269 # Marshaled Properties 270 @properties = { 271 'sid' => payload['sid'], 272 'unique_name' => payload['unique_name'], 273 'account_sid' => payload['account_sid'], 274 'service_sid' => payload['service_sid'], 275 'url' => payload['url'], 276 'links' => payload['links'], 277 'revision' => payload['revision'], 278 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 279 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 280 'created_by' => payload['created_by'], 281 } 282 283 # Context 284 @instance_context = nil 285 @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'], } 286 end
Public Instance Methods
@return [String] The account_sid
# File lib/twilio-ruby/rest/preview/sync/service/sync_list.rb 313 def account_sid 314 @properties['account_sid'] 315 end
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/preview/sync/service/sync_list.rb 292 def context 293 unless @instance_context 294 @instance_context = SyncListContext.new(@version, @params['service_sid'], @params['sid'], ) 295 end 296 @instance_context 297 end
@return [String] The created_by
# File lib/twilio-ruby/rest/preview/sync/service/sync_list.rb 355 def created_by 356 @properties['created_by'] 357 end
@return [Time] The date_created
# File lib/twilio-ruby/rest/preview/sync/service/sync_list.rb 343 def date_created 344 @properties['date_created'] 345 end
@return [Time] The date_updated
# File lib/twilio-ruby/rest/preview/sync/service/sync_list.rb 349 def date_updated 350 @properties['date_updated'] 351 end
Delete the SyncListInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/preview/sync/service/sync_list.rb 369 def delete 370 context.delete 371 end
Fetch the SyncListInstance
@return [SyncListInstance] Fetched SyncListInstance
# File lib/twilio-ruby/rest/preview/sync/service/sync_list.rb 362 def fetch 363 context.fetch 364 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/preview/sync/service/sync_list.rb 396 def inspect 397 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 398 "<Twilio.Preview.Sync.SyncListInstance #{values}>" 399 end
@return [String] The links
# File lib/twilio-ruby/rest/preview/sync/service/sync_list.rb 331 def links 332 @properties['links'] 333 end
@return [String] The revision
# File lib/twilio-ruby/rest/preview/sync/service/sync_list.rb 337 def revision 338 @properties['revision'] 339 end
@return [String] The service_sid
# File lib/twilio-ruby/rest/preview/sync/service/sync_list.rb 319 def service_sid 320 @properties['service_sid'] 321 end
@return [String] The sid
# File lib/twilio-ruby/rest/preview/sync/service/sync_list.rb 301 def sid 302 @properties['sid'] 303 end
Access the sync_list_items
@return [sync_list_items] sync_list_items
# File lib/twilio-ruby/rest/preview/sync/service/sync_list.rb 376 def sync_list_items 377 context.sync_list_items 378 end
Access the sync_list_permissions
@return [sync_list_permissions] sync_list_permissions
# File lib/twilio-ruby/rest/preview/sync/service/sync_list.rb 383 def sync_list_permissions 384 context.sync_list_permissions 385 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/preview/sync/service/sync_list.rb 389 def to_s 390 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 391 "<Twilio.Preview.Sync.SyncListInstance #{values}>" 392 end
@return [String] The unique_name
# File lib/twilio-ruby/rest/preview/sync/service/sync_list.rb 307 def unique_name 308 @properties['unique_name'] 309 end
@return [String] The url
# File lib/twilio-ruby/rest/preview/sync/service/sync_list.rb 325 def url 326 @properties['url'] 327 end