Clickwraps

A Clickwrap is a legal agreement (such as an NDA or Terms of Use) that your Users and/or Bundle/Inbox participants will need to agree to via a "Clickwrap" UI before accessing the site, bundle, or inbox.

The values for use_with_users, use_with_bundles, use_with_inboxes are explained as follows:

  • none - This Clickwrap may not be used in this context.
  • available_to_all_users - This Clickwrap may be assigned in this context by any user.
  • available - This Clickwrap may be assigned in this context, but only by Site Admins. We recognize that the name of this setting is somewhat ambiguous, but we maintain it for legacy reasons.
  • required - This Clickwrap will always be used in this context, and may not be overridden.

List Clickwraps

SDK Function

Clickwrap.list()

Return Object

ListIterator<Clickwrap>

Authorization Requirement

Available to all authenticated keys or sessions.

Additional Arguments

Example Request

import com.files.ListIterator;
import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.Clickwrap;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  ListIterator<Clickwrap> clickwraps = Clickwrap.list(parameters);
  for (Clickwrap clickwrap : clickwraps.listAutoPaging()) {
    // Operate on clickwrap
  }
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Show Clickwrap

SDK Function

Clickwrap.find()

Return Object

Clickwrap

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Function Arguments

ArgumentDescription
id
int64
Required
Clickwrap ID.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.Clickwrap;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  Clickwrap clickwrap = Clickwrap.find(id, parameters);
  // Operate on clickwrap
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Create Clickwrap

SDK Function

Clickwrap.create()

Return Object

Clickwrap

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Function Arguments

ArgumentDefaultDescription
name
string
Name of the Clickwrap agreement (used when selecting from multiple Clickwrap agreements.)
body
string
Body text of Clickwrap (supports Markdown formatting).
use_with_bundles
string
"none"Use this Clickwrap for Bundles?
Possible values: none, available, require, available_to_all_users
use_with_inboxes
string
"none"Use this Clickwrap for Inboxes?
Possible values: none, available, require, available_to_all_users
use_with_users
string
"none"Use this Clickwrap for Users? Values: none, require (new user signup via email invitation only), require_all_users_once (show to all users at their next web login; once accepted, not shown again), require_all_users_always (show to all users on every web login).
Possible values: none, require, require_all_users_once, require_all_users_always

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.Clickwrap;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  parameters.put("name", "Example Site NDA for Files.com Use");
  
  Clickwrap clickwrap = Clickwrap.create(parameters);
  // Operate on clickwrap
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Update Clickwrap

SDK Function

clickwrap.update();

Return Object

Clickwrap

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Attribute Setters

SetterDescription
setName
string
Name of the Clickwrap agreement (used when selecting from multiple Clickwrap agreements.)
setBody
string
Body text of Clickwrap (supports Markdown formatting).
setUseWithBundles
string
Use this Clickwrap for Bundles?
Possible values: none, available, require, available_to_all_users
setUseWithInboxes
string
Use this Clickwrap for Inboxes?
Possible values: none, available, require, available_to_all_users
setUseWithUsers
string
Use this Clickwrap for Users? Values: none, require (new user signup via email invitation only), require_all_users_once (show to all users at their next web login; once accepted, not shown again), require_all_users_always (show to all users on every web login).
Possible values: none, require, require_all_users_once, require_all_users_always

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.Clickwrap;

try {
  // Find the clickwrap object by its id.
  Clickwrap clickwrap = Clickwrap.find(id, null);
  HashMap<String, Object> parameters = new HashMap<>();
  parameters.put("name", "Example Site NDA for Files.com Use");
  clickwrap.update(parameters);
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Delete Clickwrap

SDK Function

clickwrap.delete();

Return Object

No return value.

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.Clickwrap;

try {
  // Find the clickwrap object by its id.
  Clickwrap clickwrap = Clickwrap.find(id, null);
  clickwrap.delete(null);
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

The Clickwrap Object

Some of the functions above return a Clickwrap object. The attributes of this object are listed below.

AttributeDescription
id
int64
Clickwrap ID
name
string
Name of the Clickwrap agreement (used when selecting from multiple Clickwrap agreements.)
body
string
Body text of Clickwrap (supports Markdown formatting).
use_with_users
string
Use this Clickwrap for Users? Values: none, require (new user signup via email invitation only), require_all_users_once (show to all users at their next web login; once accepted, not shown again), require_all_users_always (show to all users on every web login).
Possible values: none, require, require_all_users_once, require_all_users_always
use_with_bundles
string
Use this Clickwrap for Bundles?
Possible values: none, available, require, available_to_all_users
use_with_inboxes
string
Use this Clickwrap for Inboxes?
Possible values: none, available, require, available_to_all_users