FileRequestsModule

public class FileRequestsModule

Provides management of FileRequests

  • Retrieves the information about a file request by ID.

    Declaration

    Swift

    public func get(
        fileRequestId: String,
        completion: @escaping Callback<FileRequest>
    )

    Parameters

    fileRequestId

    The unique identifier that represent a file request.

    completion

    Returns a FileRequest response object if successful otherwise a BoxSDKError.

  • Updates a file request. This can be used to activate or deactivate a file request.

    Declaration

    Swift

    public func update(
        fileRequestId: String,
        ifMatch: String? = nil,
        updateRequest: FileRequestUpdateRequest,
        completion: @escaping Callback<FileRequest>
    )

    Parameters

    fileRequestId

    The unique identifier that represent a file request.

    ifMatch

    Ensures this item hasn’t recently changed before making changes. Pass in the item’s last observed etag value into this header and the endpoint will fail with a 412 Precondition Failed if it has changed since. (optional)

    updateRequest

    The FileRequestUpdateRequest object which provides the fields that can be updated.

    completion

    Returns a FileRequest response object if successful otherwise a BoxSDKError.

  • Copies an existing file request that is already present on one folder, and applies it to another folder.

    Declaration

    Swift

    public func copy(
        fileRequestId: String,
        copyRequest: FileRequestCopyRequest,
        completion: @escaping Callback<FileRequest>
    )

    Parameters

    fileRequestId

    The unique identifier that represent a file request.

    copyRequest

    The FileRequestCopyRequest object which provides required and optional fields used when copying, like: folder(required), title(optional), etc.

    completion

    Returns a FileRequest response object if successful otherwise a BoxSDKError.

  • Deletes a file request permanently.

    Declaration

    Swift

    public func delete(
        fileRequestId: String,
        completion: @escaping Callback<Void>
    )

    Parameters

    fileRequestId

    The unique identifier that represent a file request.

    completion

    Returns response object if successful otherwise a BoxSDKError.