Class: Twilio::REST::Preview::Sync::ServiceContext::SyncListContext::SyncListPermissionInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Preview::Sync::ServiceContext::SyncListContext::SyncListPermissionInstance
- Defined in:
- lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique SID identifier of the Twilio Account.
-
#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
Arbitrary string identifier representing a human user associated with an FPA token, assigned by the developer.
-
#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 unique SID identifier of the Sync List to which the Permission applies.
-
#manage ⇒ Boolean
Boolean flag specifying whether the identity can delete the Sync List.
-
#read ⇒ Boolean
Boolean flag specifying whether the identity can read the Sync List and its Items.
-
#service_sid ⇒ String
The unique SID identifier of the Sync Service Instance.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(read: nil, write: nil, manage: nil) ⇒ SyncListPermissionInstance
Update the SyncListPermissionInstance.
-
#url ⇒ String
Contains an absolute URL for this Sync List Permission.
-
#write ⇒ Boolean
Boolean flag specifying whether the identity can create, update and delete Items of the Sync List.
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 |
# File 'lib/twilio-ruby/rest/preview/sync/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 || @properties['service_sid'] ,'list_sid' => list_sid || @properties['list_sid'] ,'identity' => identity || @properties['identity'] , } end |
Instance Method Details
#account_sid ⇒ String
290 291 292 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb', line 290 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
281 282 283 284 285 286 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb', line 281 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
339 340 341 342 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb', line 339 def delete context.delete end |
#fetch ⇒ SyncListPermissionInstance
Fetch the SyncListPermissionInstance
347 348 349 350 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb', line 347 def fetch context.fetch end |
#identity ⇒ String
308 309 310 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb', line 308 def identity @properties['identity'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
380 381 382 383 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb', line 380 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Sync.SyncListPermissionInstance #{values}>" end |
#list_sid ⇒ String
302 303 304 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb', line 302 def list_sid @properties['list_sid'] end |
#manage ⇒ Boolean
326 327 328 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb', line 326 def manage @properties['manage'] end |
#read ⇒ Boolean
314 315 316 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb', line 314 def read @properties['read'] end |
#service_sid ⇒ String
296 297 298 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb', line 296 def service_sid @properties['service_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
373 374 375 376 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb', line 373 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Sync.SyncListPermissionInstance #{values}>" end |
#update(read: nil, write: nil, manage: nil) ⇒ SyncListPermissionInstance
Update the SyncListPermissionInstance
358 359 360 361 362 363 364 365 366 367 368 369 |
# File 'lib/twilio-ruby/rest/preview/sync/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
332 333 334 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb', line 332 def url @properties['url'] end |
#write ⇒ Boolean
320 321 322 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb', line 320 def write @properties['write'] end |