Class: Twilio::REST::Preview::Sync::ServiceContext::SyncListInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Preview::Sync::ServiceContext::SyncListInstance
- Defined in:
- lib/twilio-ruby/rest/preview/sync/service/sync_list.rb
Instance Method Summary collapse
- #account_sid ⇒ String
-
#context ⇒ SyncListContext
Generate an instance context for the instance, the context is capable of performing various actions.
- #created_by ⇒ String
- #date_created ⇒ Time
- #date_updated ⇒ Time
-
#delete ⇒ Boolean
Delete the SyncListInstance.
-
#fetch ⇒ SyncListInstance
Fetch the SyncListInstance.
-
#initialize(version, payload, service_sid: nil, sid: nil) ⇒ SyncListInstance
constructor
Initialize the SyncListInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
- #links ⇒ Hash
- #revision ⇒ String
- #service_sid ⇒ String
- #sid ⇒ String
-
#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
- #url ⇒ String
Constructor Details
#initialize(version, payload, service_sid: nil, sid: nil) ⇒ SyncListInstance
Initialize the SyncListInstance
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list.rb', line 286 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_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 || @properties['service_sid'] ,'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
333 334 335 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list.rb', line 333 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
312 313 314 315 316 317 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list.rb', line 312 def context unless @instance_context @instance_context = SyncListContext.new(@version , @params['service_sid'], @params['sid']) end @instance_context end |
#created_by ⇒ String
375 376 377 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list.rb', line 375 def created_by @properties['created_by'] end |
#date_created ⇒ Time
363 364 365 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list.rb', line 363 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
369 370 371 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list.rb', line 369 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the SyncListInstance
382 383 384 385 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list.rb', line 382 def delete context.delete end |
#fetch ⇒ SyncListInstance
Fetch the SyncListInstance
390 391 392 393 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list.rb', line 390 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
418 419 420 421 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list.rb', line 418 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Sync.SyncListInstance #{values}>" end |
#links ⇒ Hash
351 352 353 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list.rb', line 351 def links @properties['links'] end |
#revision ⇒ String
357 358 359 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list.rb', line 357 def revision @properties['revision'] end |
#service_sid ⇒ String
339 340 341 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list.rb', line 339 def service_sid @properties['service_sid'] end |
#sid ⇒ String
321 322 323 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list.rb', line 321 def sid @properties['sid'] end |
#sync_list_items ⇒ sync_list_items
Access the sync_list_items
405 406 407 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list.rb', line 405 def sync_list_items context.sync_list_items end |
#sync_list_permissions ⇒ sync_list_permissions
Access the sync_list_permissions
398 399 400 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list.rb', line 398 def context. end |
#to_s ⇒ Object
Provide a user friendly representation
411 412 413 414 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list.rb', line 411 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Sync.SyncListInstance #{values}>" end |
#unique_name ⇒ String
327 328 329 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list.rb', line 327 def unique_name @properties['unique_name'] end |
#url ⇒ String
345 346 347 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list.rb', line 345 def url @properties['url'] end |