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 Method

Files::Clickwrap.list

Return Object

List<Clickwrap>

Authorization Requirement

Available to all authenticated keys or sessions.

Additional Arguments

Example Request

begin
  clickwraps = Files::Clickwrap.list
  clickwraps.auto_paging_each do |clickwrap|
    # Operate on clickwrap
  end
rescue Files::NotAuthenticatedError => e
  puts "Authentication Error Occurred (#{e.class.to_s}): " + e.message
rescue Files::Error => e
  puts "Unknown Error Occurred (#{e.class.to_s}): " + e.message
end

Show Clickwrap

SDK Method

Files::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.

Method Arguments

ArgumentDescription
id
int64
Required
Clickwrap ID.

Example Request

begin
  clickwrap = Files::Clickwrap.find(id)
  # Operate on clickwrap
rescue Files::NotAuthenticatedError => e
  puts "Authentication Error Occurred (#{e.class.to_s}): " + e.message
rescue Files::Error => e
  puts "Unknown Error Occurred (#{e.class.to_s}): " + e.message
end

Create Clickwrap

SDK Method

Files::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.

Method 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

begin
  clickwrap = Files::Clickwrap.create(
    name: "Example Site NDA for Files.com Use"
  )
  # Operate on clickwrap
rescue Files::NotAuthenticatedError => e
  puts "Authentication Error Occurred (#{e.class.to_s}): " + e.message
rescue Files::Error => e
  puts "Unknown Error Occurred (#{e.class.to_s}): " + e.message
end

Update Clickwrap

SDK Method

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.

Method Arguments

ArgumentDescription
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
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
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

Example Request

begin
  # Find the clickwrap object by its id.
  clickwrap = Files::Clickwrap.find(id)
  clickwrap.update(
    name: "Example Site NDA for Files.com Use"
  )
rescue Files::NotAuthenticatedError => e
  puts "Authentication Error Occurred (#{e.class.to_s}): " + e.message
rescue Files::Error => e
  puts "Unknown Error Occurred (#{e.class.to_s}): " + e.message
end

Delete Clickwrap

SDK Method

clickwrap.delete

Return Object

nil

Authorization Requirement

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

Example Request

begin
  # Find the clickwrap object by its id.
  clickwrap = Files::Clickwrap.find(id)
  clickwrap.delete
rescue Files::NotAuthenticatedError => e
  puts "Authentication Error Occurred (#{e.class.to_s}): " + e.message
rescue Files::Error => e
  puts "Unknown Error Occurred (#{e.class.to_s}): " + e.message
end

The Clickwrap Object

Some of the methods 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