CollaborationWhitelistModule
public class CollaborationWhitelistModule
Provides Collaborations management.
-
Initializer
Declaration
Swift
public init(boxClient: BoxClient)
Parameters
boxClient
Required for communicating with Box APIs.
-
Get Collaboration Whitelist Entry by ID.
Declaration
Swift
public func get( id: String, fields: [String]? = nil, completion: @escaping Callback<CollaborationWhitelistEntry> )
Parameters
id
The ID of the collaboration whitelist entry to get details
fields
Comma-separated list of fields to include in the response.
completion
The collaboration whitelist entry object is returned or an error
-
Create Collaboration Whitelist Entry.
Declaration
Swift
public func create( domain: String, direction: CollaborationDirection, fields: [String]? = nil, completion: @escaping Callback<CollaborationWhitelistEntry> )
Parameters
domain
Domain to add to whitelist (e.g. box.com).
direction
inbound, outbound, or both.
fields
Comma-separated list of fields to include in the response.
completion
The collaboration whitelist entry object is returned or an error
-
Remove a single item from the Enterprise’s Collaboration Whitelist by id. If there are no longer any entries in the whitelist table, the Collaboration Whitelist feature will be turned off.
Declaration
Swift
public func delete( id: String, completion: @escaping Callback<Void> )
Parameters
id
The ID of the collaboration whitelist entry to remove.
completion
An empty response will be returned upon successful deletion. An error is thrown if the collaboration whitelist cannot be deleted.
-
Returns a specific exempt target for the passed in ID.
Declaration
Swift
public func getExemptTarget( id: String, fields: [String]? = nil, completion: @escaping Callback<CollaborationWhitelistExemptTarget> )
Parameters
id
The ID of the collaboration whitelist entry to get details
fields
Comma-separated list of fields to include in the response.
completion
The exempt target entry, object is returned or an error
-
Creates the Exempt Target entry.
Declaration
Swift
public func exemptUser( userId: String, fields: [String]? = nil, completion: @escaping Callback<CollaborationWhitelistExemptTarget> )
Parameters
userId
The ID of user to add to exempt target list.
fields
Comma-separated list of fields to include in the response.
completion
The collaboration whitelist entry object is returned or an error
-
Remove a single user from the exempt target list.
Declaration
Swift
public func deleteExemptTarget( id: String, completion: @escaping Callback<Void> )
Parameters
id
The ID of the collaboration whitelist exempt target to remove.
completion
An empty response will be returned upon successful deletion. An error is thrown if the exempt target cannot be deleted.