Class: Twilio::REST::Sync::V1::ServiceContext::SyncMapContext::SyncMapPermissionInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Sync::V1::ServiceContext::SyncMapContext::SyncMapPermissionInstance
- Defined in:
- lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_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 ⇒ SyncMapPermissionContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#delete ⇒ Boolean
Deletes the SyncMapPermissionInstance.
-
#fetch ⇒ SyncMapPermissionInstance
Fetch a SyncMapPermissionInstance.
-
#identity ⇒ String
Identity of the user to whom the Sync Map Permission applies.
-
#initialize(version, payload, service_sid: nil, map_sid: nil, identity: nil) ⇒ SyncMapPermissionInstance
constructor
Initialize the SyncMapPermissionInstance.
-
#manage ⇒ Boolean
Manage access.
-
#map_sid ⇒ String
Sync Map SID.
-
#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) ⇒ SyncMapPermissionInstance
Update the SyncMapPermissionInstance.
-
#url ⇒ String
URL of this Sync Map Permission.
-
#write ⇒ Boolean
Write access.
Constructor Details
#initialize(version, payload, service_sid: nil, map_sid: nil, identity: nil) ⇒ SyncMapPermissionInstance
Initialize the SyncMapPermissionInstance
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 272 def initialize(version, payload, service_sid: nil, map_sid: nil, identity: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'service_sid' => payload['service_sid'], 'map_sid' => payload['map_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, 'map_sid' => map_sid, 'identity' => identity || @properties['identity'], } end |
Instance Method Details
#account_sid ⇒ String
Returns Twilio Account SID.
314 315 316 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 314 def account_sid @properties['account_sid'] end |
#context ⇒ SyncMapPermissionContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
300 301 302 303 304 305 306 307 308 309 310 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 300 def context unless @instance_context @instance_context = SyncMapPermissionContext.new( @version, @params['service_sid'], @params['map_sid'], @params['identity'], ) end @instance_context end |
#delete ⇒ Boolean
Deletes the SyncMapPermissionInstance
370 371 372 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 370 def delete context.delete end |
#fetch ⇒ SyncMapPermissionInstance
Fetch a SyncMapPermissionInstance
363 364 365 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 363 def fetch context.fetch end |
#identity ⇒ String
Returns Identity of the user to whom the Sync Map Permission applies.
332 333 334 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 332 def identity @properties['identity'] end |
#manage ⇒ Boolean
Returns Manage access.
350 351 352 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 350 def manage @properties['manage'] end |
#map_sid ⇒ String
Returns Sync Map SID.
326 327 328 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 326 def map_sid @properties['map_sid'] end |
#read ⇒ Boolean
Returns Read access.
338 339 340 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 338 def read @properties['read'] end |
#service_sid ⇒ String
Returns Sync Service Instance SID.
320 321 322 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 320 def service_sid @properties['service_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
393 394 395 396 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 393 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Sync.V1.SyncMapPermissionInstance #{values}>" end |
#update(read: nil, write: nil, manage: nil) ⇒ SyncMapPermissionInstance
Update the SyncMapPermissionInstance
383 384 385 386 387 388 389 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 383 def update(read: nil, write: nil, manage: nil) context.update( read: read, write: write, manage: manage, ) end |
#url ⇒ String
Returns URL of this Sync Map Permission.
356 357 358 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 356 def url @properties['url'] end |
#write ⇒ Boolean
Returns Write access.
344 345 346 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 344 def write @properties['write'] end |