Class: Twilio::REST::Sync::V1::ServiceContext::SyncListInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Sync::V1::ServiceContext::SyncListInstance
- Defined in:
- lib/twilio-ruby/rest/sync/v1/service/sync_list.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#account_sid ⇒ String
The account_sid.
-
#context ⇒ SyncListContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#created_by ⇒ String
The created_by.
-
#date_created ⇒ Time
The date_created.
-
#date_expires ⇒ Time
The date_expires.
-
#date_updated ⇒ Time
The date_updated.
-
#delete ⇒ Boolean
Deletes the SyncListInstance.
-
#fetch ⇒ SyncListInstance
Fetch a SyncListInstance.
-
#initialize(version, payload, service_sid: nil, sid: nil) ⇒ SyncListInstance
constructor
Initialize the SyncListInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ String
The links.
-
#revision ⇒ String
The revision.
-
#service_sid ⇒ String
The service_sid.
-
#sid ⇒ String
The sid.
-
#sync_list_items ⇒ sync_list_items
Access the sync_list_items.
-
#sync_list_permissions ⇒ sync_list_permissions
Access the sync_list_permissions.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#unique_name ⇒ String
The unique_name.
-
#update(ttl: :unset) ⇒ SyncListInstance
Update the SyncListInstance.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload, service_sid: nil, sid: nil) ⇒ SyncListInstance
Initialize the SyncListInstance
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list.rb', line 287 def initialize(version, payload, service_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'unique_name' => payload['unique_name'], 'account_sid' => payload['account_sid'], 'service_sid' => payload['service_sid'], 'url' => payload['url'], 'links' => payload['links'], 'revision' => payload['revision'], 'date_expires' => Twilio.deserialize_iso8601_datetime(payload['date_expires']), 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'created_by' => payload['created_by'], } # Context @instance_context = nil @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The account_sid.
335 336 337 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list.rb', line 335 def account_sid @properties['account_sid'] end |
#context ⇒ SyncListContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
314 315 316 317 318 319 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list.rb', line 314 def context unless @instance_context @instance_context = SyncListContext.new(@version, @params['service_sid'], @params['sid'], ) end @instance_context end |
#created_by ⇒ String
Returns The created_by.
383 384 385 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list.rb', line 383 def created_by @properties['created_by'] end |
#date_created ⇒ Time
Returns The date_created.
371 372 373 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list.rb', line 371 def date_created @properties['date_created'] end |
#date_expires ⇒ Time
Returns The date_expires.
365 366 367 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list.rb', line 365 def date_expires @properties['date_expires'] end |
#date_updated ⇒ Time
Returns The date_updated.
377 378 379 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list.rb', line 377 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the SyncListInstance
397 398 399 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list.rb', line 397 def delete context.delete end |
#fetch ⇒ SyncListInstance
Fetch a SyncListInstance
390 391 392 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list.rb', line 390 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
432 433 434 435 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list.rb', line 432 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Sync.V1.SyncListInstance #{values}>" end |
#links ⇒ String
Returns The links.
353 354 355 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list.rb', line 353 def links @properties['links'] end |
#revision ⇒ String
Returns The revision.
359 360 361 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list.rb', line 359 def revision @properties['revision'] end |
#service_sid ⇒ String
Returns The service_sid.
341 342 343 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list.rb', line 341 def service_sid @properties['service_sid'] end |
#sid ⇒ String
Returns The sid.
323 324 325 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list.rb', line 323 def sid @properties['sid'] end |
#sync_list_items ⇒ sync_list_items
Access the sync_list_items
412 413 414 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list.rb', line 412 def sync_list_items context.sync_list_items end |
#sync_list_permissions ⇒ sync_list_permissions
Access the sync_list_permissions
419 420 421 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list.rb', line 419 def context. end |
#to_s ⇒ Object
Provide a user friendly representation
425 426 427 428 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list.rb', line 425 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Sync.V1.SyncListInstance #{values}>" end |
#unique_name ⇒ String
Returns The unique_name.
329 330 331 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list.rb', line 329 def unique_name @properties['unique_name'] end |
#update(ttl: :unset) ⇒ SyncListInstance
Update the SyncListInstance
405 406 407 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list.rb', line 405 def update(ttl: :unset) context.update(ttl: ttl, ) end |
#url ⇒ String
Returns The url.
347 348 349 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list.rb', line 347 def url @properties['url'] end |