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
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the resource.
-
#context ⇒ SyncListPermissionContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#delete ⇒ Boolean
Delete the SyncListPermissionInstance.
-
#fetch ⇒ SyncListPermissionInstance
Fetch the SyncListPermissionInstance.
-
#identity ⇒ String
The 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
The SID of the Sync List to which the Permission applies.
-
#manage ⇒ Boolean
Manage access.
-
#read ⇒ Boolean
Read access.
-
#service_sid ⇒ String
The SID of the Sync Service that the resource is associated with.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(read: nil, write: nil, manage: nil) ⇒ SyncListPermissionInstance
Update the SyncListPermissionInstance.
-
#url ⇒ String
The absolute URL of the Sync List Permission resource.
-
#write ⇒ Boolean
Write access.
Constructor Details
#initialize(version, payload, service_sid: nil, list_sid: nil, identity: nil) ⇒ SyncListPermissionInstance
Initialize the SyncListPermissionInstance
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 247 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 The SID of the Account that created the resource.
289 290 291 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 289 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
275 276 277 278 279 280 281 282 283 284 285 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 275 def context unless @instance_context @instance_context = SyncListPermissionContext.new( @version, @params['service_sid'], @params['list_sid'], @params['identity'], ) end @instance_context end |
#delete ⇒ Boolean
Delete the SyncListPermissionInstance
345 346 347 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 345 def delete context.delete end |
#fetch ⇒ SyncListPermissionInstance
Fetch the SyncListPermissionInstance
338 339 340 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 338 def fetch context.fetch end |
#identity ⇒ String
Returns The identity of the user to whom the Sync List Permission applies.
307 308 309 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 307 def identity @properties['identity'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
371 372 373 374 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 371 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Sync.V1.SyncListPermissionInstance #{values}>" end |
#list_sid ⇒ String
Returns The SID of the Sync List to which the Permission applies.
301 302 303 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 301 def list_sid @properties['list_sid'] end |
#manage ⇒ Boolean
Returns Manage access.
325 326 327 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 325 def manage @properties['manage'] end |
#read ⇒ Boolean
Returns Read access.
313 314 315 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 313 def read @properties['read'] end |
#service_sid ⇒ String
Returns The SID of the Sync Service that the resource is associated with.
295 296 297 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 295 def service_sid @properties['service_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
364 365 366 367 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 364 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
358 359 360 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 358 def update(read: nil, write: nil, manage: nil) context.update(read: read, write: write, manage: manage, ) end |
#url ⇒ String
Returns The absolute URL of the Sync List Permission resource.
331 332 333 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 331 def url @properties['url'] end |
#write ⇒ Boolean
Returns Write access.
319 320 321 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb', line 319 def write @properties['write'] end |