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
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 252 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.
285 286 287 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 285 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
276 277 278 279 280 281 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 276 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
334 335 336 337 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 334 def delete context.delete end |
#fetch ⇒ SyncMapPermissionInstance
Fetch the SyncMapPermissionInstance
342 343 344 345 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 342 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.
303 304 305 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 303 def identity @properties['identity'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
375 376 377 378 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 375 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.
321 322 323 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 321 def manage @properties['manage'] end |
#map_sid ⇒ String
Returns The SID of the Sync Map to which the Permission applies.
297 298 299 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 297 def map_sid @properties['map_sid'] end |
#read ⇒ Boolean
Returns Whether the identity can read the Sync Map and its Items.
309 310 311 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 309 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.
291 292 293 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 291 def service_sid @properties['service_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
368 369 370 371 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 368 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
353 354 355 356 357 358 359 360 361 362 363 364 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 353 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.
327 328 329 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 327 def url @properties['url'] end |
#write ⇒ Boolean
Returns Whether the identity can create, update, and delete Items in the Sync Map.
315 316 317 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb', line 315 def write @properties['write'] end |