Class: Twilio::REST::Sync::V1::ServiceContext::SyncListContext::SyncListPermissionInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Sync::V1::ServiceContext::SyncListContext::SyncListPermissionInstance
- Defined in:
- lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.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
Twilio Account SID.
-
#context ⇒ SyncListPermissionContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#delete ⇒ Boolean
Deletes the SyncListPermissionInstance.
-
#fetch ⇒ SyncListPermissionInstance
Fetch a SyncListPermissionInstance.
-
#identity ⇒ String
Identity of the user to whom the Sync List Permission applies.
-
#initialize(version, payload, service_sid: nil, list_sid: nil, identity: nil) ⇒ SyncListPermissionInstance
constructor
Initialize the SyncListPermissionInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#list_sid ⇒ String
Sync List SID.
-
#manage ⇒ Boolean
Manage access.
-
#read ⇒ Boolean
Read access.
-
#service_sid ⇒ String
Sync Service Instance SID.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(read: nil, write: nil, manage: nil) ⇒ SyncListPermissionInstance
Update the SyncListPermissionInstance.
-
#url ⇒ String
URL of this Sync List Permission.
-
#write ⇒ Boolean
Write access.
Constructor Details
#initialize(version, payload, service_sid: nil, list_sid: nil, identity: nil) ⇒ SyncListPermissionInstance
Initialize the SyncListPermissionInstance
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 257 def initialize(version, payload, service_sid: nil, list_sid: nil, identity: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'service_sid' => payload['service_sid'], 'list_sid' => payload['list_sid'], 'identity' => payload['identity'], 'read' => payload['read'], 'write' => payload['write'], 'manage' => payload['manage'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'service_sid' => service_sid, 'list_sid' => list_sid, 'identity' => identity || @properties['identity'], } end |
Instance Method Details
#account_sid ⇒ String
Returns Twilio Account SID.
299 300 301 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 299 def account_sid @properties['account_sid'] end |
#context ⇒ SyncListPermissionContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
285 286 287 288 289 290 291 292 293 294 295 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 285 def context unless @instance_context @instance_context = SyncListPermissionContext.new( @version, @params['service_sid'], @params['list_sid'], @params['identity'], ) end @instance_context end |
#delete ⇒ Boolean
Deletes the SyncListPermissionInstance
355 356 357 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 355 def delete context.delete end |
#fetch ⇒ SyncListPermissionInstance
Fetch a SyncListPermissionInstance
348 349 350 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 348 def fetch context.fetch end |
#identity ⇒ String
Returns Identity of the user to whom the Sync List Permission applies.
317 318 319 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 317 def identity @properties['identity'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
381 382 383 384 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 381 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Sync.V1.SyncListPermissionInstance #{values}>" end |
#list_sid ⇒ String
Returns Sync List SID.
311 312 313 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 311 def list_sid @properties['list_sid'] end |
#manage ⇒ Boolean
Returns Manage access.
335 336 337 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 335 def manage @properties['manage'] end |
#read ⇒ Boolean
Returns Read access.
323 324 325 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 323 def read @properties['read'] end |
#service_sid ⇒ String
Returns Sync Service Instance SID.
305 306 307 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 305 def service_sid @properties['service_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
374 375 376 377 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 374 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Sync.V1.SyncListPermissionInstance #{values}>" end |
#update(read: nil, write: nil, manage: nil) ⇒ SyncListPermissionInstance
Update the SyncListPermissionInstance
368 369 370 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 368 def update(read: nil, write: nil, manage: nil) context.update(read: read, write: write, manage: manage, ) end |
#url ⇒ String
Returns URL of this Sync List Permission.
341 342 343 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 341 def url @properties['url'] end |
#write ⇒ Boolean
Returns Write access.
329 330 331 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 329 def write @properties['write'] end |