class Twilio::REST::Preview::Sync::ServiceContext::SyncListContext::SyncListPermissionInstance
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
Public Class Methods
Initialize the SyncListPermissionInstance
@param [Version] version Version
that contains the resource @param [Hash] payload payload that contains response from Twilio
@param [String] service_sid
The unique SID identifier of the Sync
Service
Instance.
@param [String] list_sid
The unique SID identifier of the Sync
List to which the
Permission applies.
@param [String] identity Arbitrary string identifier representing a user
associated with an FPA token, assigned by the developer.
@return [SyncListPermissionInstance] SyncListPermissionInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb 251 def initialize(version, payload, service_sid: nil, list_sid: nil, identity: nil) 252 super(version) 253 254 # Marshaled Properties 255 @properties = { 256 'account_sid' => payload['account_sid'], 257 'service_sid' => payload['service_sid'], 258 'list_sid' => payload['list_sid'], 259 'identity' => payload['identity'], 260 'read' => payload['read'], 261 'write' => payload['write'], 262 'manage' => payload['manage'], 263 'url' => payload['url'], 264 } 265 266 # Context 267 @instance_context = nil 268 @params = { 269 'service_sid' => service_sid, 270 'list_sid' => list_sid, 271 'identity' => identity || @properties['identity'], 272 } 273 end
Public Instance Methods
@return [String] Twilio
Account SID.
# File lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb 293 def account_sid 294 @properties['account_sid'] 295 end
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [SyncListPermissionContext] SyncListPermissionContext
for this SyncListPermissionInstance
# File lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb 279 def context 280 unless @instance_context 281 @instance_context = SyncListPermissionContext.new( 282 @version, 283 @params['service_sid'], 284 @params['list_sid'], 285 @params['identity'], 286 ) 287 end 288 @instance_context 289 end
Delete the SyncListPermissionInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb 349 def delete 350 context.delete 351 end
Fetch the SyncListPermissionInstance
@return [SyncListPermissionInstance] Fetched SyncListPermissionInstance
# File lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb 342 def fetch 343 context.fetch 344 end
@return [String] Identity of the user to whom the Sync
List Permission applies.
# File lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb 311 def identity 312 @properties['identity'] 313 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb 375 def inspect 376 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 377 "<Twilio.Preview.Sync.SyncListPermissionInstance #{values}>" 378 end
@return [String] Sync
List SID.
# File lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb 305 def list_sid 306 @properties['list_sid'] 307 end
@return [Boolean] Manage access.
# File lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb 329 def manage 330 @properties['manage'] 331 end
@return [Boolean] Read access.
# File lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb 317 def read 318 @properties['read'] 319 end
@return [String] Sync
Service Instance SID.
# File lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb 299 def service_sid 300 @properties['service_sid'] 301 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb 368 def to_s 369 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 370 "<Twilio.Preview.Sync.SyncListPermissionInstance #{values}>" 371 end
Update the SyncListPermissionInstance
@param [Boolean] read Boolean flag specifying whether the identity can read the
Sync List.
@param [Boolean] write Boolean flag specifying whether the identity can create,
update and delete Items of the Sync List.
@param [Boolean] manage Boolean flag specifying whether the identity can delete
the Sync List.
@return [SyncListPermissionInstance] Updated SyncListPermissionInstance
# File lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb 362 def update(read: nil, write: nil, manage: nil) 363 context.update(read: read, write: write, manage: manage, ) 364 end
@return [String] URL of this Sync
List Permission.
# File lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb 335 def url 336 @properties['url'] 337 end
@return [Boolean] Write access.
# File lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb 323 def write 324 @properties['write'] 325 end