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
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Sync Map Permission resource.
-
#context ⇒ SyncMapPermissionContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#delete ⇒ Boolean
Delete the SyncMapPermissionInstance.
-
#fetch ⇒ SyncMapPermissionInstance
Fetch the SyncMapPermissionInstance.
-
#identity ⇒ String
The application-defined string that uniquely identifies the resource’s User within the Service to an FPA token.
-
#initialize(version, payload, service_sid: nil, map_sid: nil, identity: nil) ⇒ SyncMapPermissionInstance
constructor
Initialize the SyncMapPermissionInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#manage ⇒ Boolean
Whether the identity can delete the Sync Map.
-
#map_sid ⇒ String
The SID of the Sync Map to which the Permission applies.
-
#read ⇒ Boolean
Whether the identity can read the Sync Map and its Items.
-
#service_sid ⇒ String
The SID of the [Sync Service](www.twilio.com/docs/sync/api/service) the resource is associated with.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(read: nil, write: nil, manage: nil) ⇒ SyncMapPermissionInstance
Update the SyncMapPermissionInstance.
-
#url ⇒ String
The absolute URL of the Sync Map Permission resource.
-
#write ⇒ Boolean
Whether the identity can create, update, and delete Items in the Sync Map.
Constructor Details
#initialize(version, payload, service_sid: nil, map_sid: nil, identity: nil) ⇒ SyncMapPermissionInstance
Initialize the SyncMapPermissionInstance
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 271 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 || @properties['service_sid'] ,'map_sid' => map_sid || @properties['map_sid'] ,'identity' => identity || @properties['identity'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Sync Map Permission resource.
304 305 306 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 304 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
295 296 297 298 299 300 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 295 def context unless @instance_context @instance_context = SyncMapPermissionContext.new(@version , @params['service_sid'], @params['map_sid'], @params['identity']) end @instance_context end |
#delete ⇒ Boolean
Delete the SyncMapPermissionInstance
353 354 355 356 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 353 def delete context.delete end |
#fetch ⇒ SyncMapPermissionInstance
Fetch the SyncMapPermissionInstance
361 362 363 364 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 361 def fetch context.fetch end |
#identity ⇒ String
Returns The application-defined string that uniquely identifies the resource’s User within the Service to an FPA token.
322 323 324 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 322 def identity @properties['identity'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
394 395 396 397 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 394 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Sync.V1.SyncMapPermissionInstance #{values}>" end |
#manage ⇒ Boolean
Returns Whether the identity can delete the Sync Map.
340 341 342 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 340 def manage @properties['manage'] end |
#map_sid ⇒ String
Returns The SID of the Sync Map to which the Permission applies.
316 317 318 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 316 def map_sid @properties['map_sid'] end |
#read ⇒ Boolean
Returns Whether the identity can read the Sync Map and its Items.
328 329 330 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 328 def read @properties['read'] end |
#service_sid ⇒ String
Returns The SID of the [Sync Service](www.twilio.com/docs/sync/api/service) the resource is associated with.
310 311 312 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 310 def service_sid @properties['service_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
387 388 389 390 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 387 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
372 373 374 375 376 377 378 379 380 381 382 383 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 372 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 Map Permission resource.
346 347 348 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 346 def url @properties['url'] end |
#write ⇒ Boolean
Returns Whether the identity can create, update, and delete Items in the Sync Map.
334 335 336 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 334 def write @properties['write'] end |