Class: Files::Site
- Inherits:
-
Object
- Object
- Files::Site
- Defined in:
- lib/files.com/models/site.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
- .get(params = {}, options = {}) ⇒ Object
-
.get_paypal_express(params = {}, options = {}) ⇒ Object
Parameters: return_to_url (required) - string - URL that paypal express forwards the user to.
-
.get_paypal_express_info(params = {}, options = {}) ⇒ Object
Parameters: paypal_token (required) - string - Billing token for use with paypal.
-
.get_plan(params = {}, options = {}) ⇒ Object
Parameters: currency - string - Currency.
- .get_switch_to_plan(params = {}, options = {}) ⇒ Object
- .get_usage(params = {}, options = {}) ⇒ Object
-
.update(params = {}, options = {}) ⇒ Object
Parameters: name - string - Site name subdomain - string - Site subdomain domain - string - Custom domain email - string - Main email for this site bundle_expiration - integer - Site-wide Bundle expiration in days overage_notify - boolean - Notify site email of overages? welcome_email_enabled - boolean - Will the welcome email be sent to new users? ask_about_overwrites - boolean - If false, rename conflicting files instead of asking for overwrite confirmation.
-
.update_plan(id, params = {}, options = {}) ⇒ Object
Change the current billing plan for the site.
Instance Method Summary collapse
-
#admin_user_id ⇒ Object
int64 - User ID for the main site administrator.
-
#allowed_2fa_method_sms ⇒ Object
boolean - Is SMS two factor authentication allowed?.
-
#allowed_2fa_method_totp ⇒ Object
boolean - Is TOTP two factor authentication allowed?.
-
#allowed_2fa_method_u2f ⇒ Object
boolean - Is U2F two factor authentication allowed?.
-
#allowed_2fa_method_yubi ⇒ Object
boolean - Is yubikey two factor authentication allowed?.
-
#allowed_file_types ⇒ Object
string - List of allowed file types.
-
#allowed_ips ⇒ Object
string - List of allowed IP addresses.
-
#ask_about_overwrites ⇒ Object
boolean - If false, rename conflicting files instead of asking for overwrite confirmation.
-
#bundle_expiration ⇒ Object
int64 - Site-wide Bundle expiration in days.
-
#bundle_password_required ⇒ Object
boolean - Do Bundles require password protection?.
-
#color2_left ⇒ Object
string - Page link and button color.
-
#color2_link ⇒ Object
string - Top bar link color.
-
#color2_text ⇒ Object
string - Page link and button color.
-
#color2_top ⇒ Object
string - Top bar background color.
-
#color2_top_text ⇒ Object
string - Top bar text color.
-
#created_at ⇒ Object
date-time - Time this site was created.
-
#currency ⇒ Object
string - Preferred currency.
-
#custom_namespace ⇒ Object
boolean - Is this site using a custom namespace for users?.
-
#days_to_retain_backups ⇒ Object
int64 - Number of days to keep deleted files.
-
#default_time_zone ⇒ Object
string - Site default time zone.
-
#desktop_app ⇒ Object
boolean - Is the desktop app enabled?.
-
#desktop_app_session_ip_pinning ⇒ Object
boolean - Is desktop app session IP pinning enabled?.
-
#desktop_app_session_lifetime ⇒ Object
int64 - Desktop app session lifetime (in hours).
-
#disable_notifications ⇒ Object
boolean - Are notifications disabled?.
-
#disable_password_reset ⇒ Object
boolean - Is password reset disabled?.
-
#disable_users_from_inactivity_period_days ⇒ Object
int64 - If greater than zero, users will unable to login if they do not show activity within this number of days.
-
#domain ⇒ Object
string - Custom domain.
-
#email ⇒ Object
email - Main email for this site.
-
#folder_permissions_groups_only ⇒ Object
boolean - If true, permissions for this site must be bound to a group (not a user).
-
#hipaa ⇒ Object
boolean - Is there a signed HIPAA BAA between Files.com and this site?.
-
#icon128 ⇒ Object
Branded icon 128x128.
-
#icon16 ⇒ Object
Branded icon 16x16.
-
#icon32 ⇒ Object
Branded icon 32x32.
-
#icon48 ⇒ Object
Branded icon 48x48.
-
#immutable_files_set_at ⇒ Object
date-time - Can files be modified?.
-
#include_password_in_welcome_email ⇒ Object
boolean - Include password in emails to new users?.
-
#initialize(attributes = {}, options = {}) ⇒ Site
constructor
A new instance of Site.
-
#language ⇒ Object
string - Site default language.
-
#ldap_base_dn ⇒ Object
string - Base DN for looking up users in LDAP server.
-
#ldap_domain ⇒ Object
string - Domain name that will be appended to usernames.
-
#ldap_enabled ⇒ Object
boolean - Main LDAP setting: is LDAP enabled?.
-
#ldap_group_action ⇒ Object
string - Should we sync groups from LDAP server?.
-
#ldap_group_exclusion ⇒ Object
string - Comma or newline separated list of group names (with optional wildcards) to exclude when syncing.
-
#ldap_group_inclusion ⇒ Object
string - Comma or newline separated list of group names (with optional wildcards) to include when syncing.
-
#ldap_host ⇒ Object
string - LDAP host.
-
#ldap_host_2 ⇒ Object
string - LDAP backup host.
-
#ldap_host_3 ⇒ Object
string - LDAP backup host.
-
#ldap_port ⇒ Object
int64 - LDAP port.
-
#ldap_secure ⇒ Object
boolean - Use secure LDAP?.
-
#ldap_type ⇒ Object
string - LDAP type.
-
#ldap_user_action ⇒ Object
string - Should we sync users from LDAP server?.
-
#ldap_user_include_groups ⇒ Object
string - Comma or newline separated list of group names (with optional wildcards) - if provided, only users in these groups will be added or synced.
-
#ldap_username ⇒ Object
string - Username for signing in to LDAP server.
-
#ldap_username_field ⇒ Object
string - LDAP username field.
-
#login_help_text ⇒ Object
string - Login help text.
-
#logo ⇒ Object
Branded logo.
-
#max_prior_passwords ⇒ Object
int64 - Number of prior passwords to disallow.
-
#name ⇒ Object
string - Site name.
-
#next_billing_amount ⇒ Object
float - Next billing amount.
-
#next_billing_date ⇒ Object
string - Next billing date.
-
#opt_out_global ⇒ Object
boolean - Use servers in the USA only?.
-
#overage_notified_at ⇒ Object
date-time - Last time the site was notified about an overage.
-
#overage_notify ⇒ Object
boolean - Notify site email of overages?.
-
#overdue ⇒ Object
boolean - Is this site’s billing overdue?.
-
#password_min_length ⇒ Object
int64 - Shortest password length for users.
-
#password_require_letter ⇒ Object
boolean - Require a letter in passwords?.
-
#password_require_mixed ⇒ Object
boolean - Require lower and upper case letters in passwords?.
-
#password_require_number ⇒ Object
boolean - Require a number in passwords?.
-
#password_require_special ⇒ Object
boolean - Require special characters in password?.
-
#password_requirements_apply_to_bundles ⇒ Object
boolean - Require bundles’ passwords to conform to the same requirements as users’ passwords?.
-
#password_validity_days ⇒ Object
int64 - Number of days password is valid.
-
#phone ⇒ Object
string - Site phone number.
-
#require_2fa ⇒ Object
boolean - Require two-factor authentication for all users?.
-
#require_2fa_stop_time ⇒ Object
date-time - If set, requirement for two-factor authentication has been scheduled to end on this date-time.
-
#require_2fa_user_type ⇒ Object
string - What type of user is required to use two-factor authentication (when require_2fa is set to ‘true` for this site)?.
-
#session ⇒ Object
Current session.
-
#session_expiry ⇒ Object
int64 - Session expiry in hours.
-
#session_pinned_by_ip ⇒ Object
boolean - Are sessions locked to the same IP? (i.e. do users need to log in again if they change IPs?).
-
#sftp_user_root_enabled ⇒ Object
boolean - Use user FTP roots also for SFTP?.
-
#show_request_access_link ⇒ Object
boolean - Show request access link for users without access? Currently unused.
-
#site_footer ⇒ Object
string - Custom site footer text.
-
#site_header ⇒ Object
string - Custom site header text.
-
#smtp_address ⇒ Object
string - SMTP server hostname or IP.
-
#smtp_authentication ⇒ Object
string - SMTP server authentication type.
-
#smtp_from ⇒ Object
string - From address to use when mailing through custom SMTP.
-
#smtp_port ⇒ Object
int64 - SMTP server port.
-
#smtp_username ⇒ Object
string - SMTP server username.
-
#ssl_required ⇒ Object
boolean - Is SSL required? Disabling this is insecure.
-
#subdomain ⇒ Object
string - Site subdomain.
-
#switch_to_plan_date ⇒ Object
date-time - If switching plans, when does the new plan take effect?.
-
#tls_disabled ⇒ Object
boolean - Is TLS disabled(site setting)?.
-
#trial_days_left ⇒ Object
int64 - Number of days left in trial.
-
#trial_until ⇒ Object
date-time - When does this Site trial expire?.
-
#update_plan(params = {}) ⇒ Object
Change the current billing plan for the site.
-
#updated_at ⇒ Object
date-time - Last time this Site was updated.
-
#use_provided_modified_at ⇒ Object
boolean - Allow uploaders to set ‘provided_modified_at` for uploaded files?.
-
#user ⇒ Object
User of current session.
-
#user_lockout ⇒ Object
boolean - Will users be locked out after incorrect login attempts?.
-
#user_lockout_lock_period ⇒ Object
int64 - How many hours to lock user out for failed password?.
-
#user_lockout_tries ⇒ Object
int64 - Number of login tries within ‘user_lockout_within` hours before users are locked out.
-
#user_lockout_within ⇒ Object
int64 - Number of hours for user lockout window.
-
#welcome_custom_text ⇒ Object
string - Custom text send in user welcome email.
-
#welcome_email_cc ⇒ Object
email - Include this email in welcome emails if enabled.
-
#welcome_email_enabled ⇒ Object
boolean - Will the welcome email be sent to new users?.
-
#welcome_screen ⇒ Object
string - Does the welcome screen appear?.
-
#windows_mode_ftp ⇒ Object
boolean - Does FTP user Windows emulation mode?.
Constructor Details
#initialize(attributes = {}, options = {}) ⇒ Site
Returns a new instance of Site.
7 8 9 10 |
# File 'lib/files.com/models/site.rb', line 7 def initialize(attributes = {}, = {}) @attributes = attributes || {} @options = || {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/files.com/models/site.rb', line 5 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/site.rb', line 5 def @options end |
Class Method Details
.get(params = {}, options = {}) ⇒ Object
547 548 549 550 |
# File 'lib/files.com/models/site.rb', line 547 def self.get(params = {}, = {}) response, = Api.send_request("/site", :get, params, ) Site.new(response.data, ) end |
.get_paypal_express(params = {}, options = {}) ⇒ Object
Parameters:
return_to_url (required) - string - URL that paypal express forwards the user to.
plan_id (required) - integer - Plan ID to switch to.
584 585 586 587 588 589 590 591 592 |
# File 'lib/files.com/models/site.rb', line 584 def self.get_paypal_express(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: return_to_url must be an String") if params.dig(:return_to_url) and !params.dig(:return_to_url).is_a?(String) raise InvalidParameterError.new("Bad parameter: plan_id must be an Integer") if params.dig(:plan_id) and !params.dig(:plan_id).is_a?(Integer) raise MissingParameterError.new("Parameter missing: return_to_url") unless params.dig(:return_to_url) raise MissingParameterError.new("Parameter missing: plan_id") unless params.dig(:plan_id) response, = Api.send_request("/site/paypal_express", :get, params, ) PaypalExpressUrl.new(response.data, ) end |
.get_paypal_express_info(params = {}, options = {}) ⇒ Object
Parameters:
paypal_token (required) - string - Billing token for use with paypal.
573 574 575 576 577 578 579 |
# File 'lib/files.com/models/site.rb', line 573 def self.get_paypal_express_info(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: paypal_token must be an String") if params.dig(:paypal_token) and !params.dig(:paypal_token).is_a?(String) raise MissingParameterError.new("Parameter missing: paypal_token") unless params.dig(:paypal_token) response, = Api.send_request("/site/paypal_express_info", :get, params, ) PaypalExpressInfo.new(response.data, ) end |
.get_plan(params = {}, options = {}) ⇒ Object
Parameters:
currency - string - Currency.
564 565 566 567 568 569 |
# File 'lib/files.com/models/site.rb', line 564 def self.get_plan(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: currency must be an String") if params.dig(:currency) and !params.dig(:currency).is_a?(String) response, = Api.send_request("/site/plan", :get, params, ) Plan.new(response.data, ) end |
.get_switch_to_plan(params = {}, options = {}) ⇒ Object
557 558 559 560 |
# File 'lib/files.com/models/site.rb', line 557 def self.get_switch_to_plan(params = {}, = {}) response, = Api.send_request("/site/switch_to_plan", :get, params, ) Plan.new(response.data, ) end |
.get_usage(params = {}, options = {}) ⇒ Object
552 553 554 555 |
# File 'lib/files.com/models/site.rb', line 552 def self.get_usage(params = {}, = {}) response, = Api.send_request("/site/usage", :get, params, ) UsageSnapshot.new(response.data, ) end |
.update(params = {}, options = {}) ⇒ Object
Parameters:
name - string - Site name
subdomain - string - Site subdomain
domain - string - Custom domain
email - string - Main email for this site
bundle_expiration - integer - Site-wide Bundle expiration in days
overage_notify - boolean - Notify site email of overages?
welcome_email_enabled - boolean - Will the welcome email be sent to new users?
ask_about_overwrites - boolean - If false, rename conflicting files instead of asking for overwrite confirmation. Only applies to web interface.
show_request_access_link - boolean - Show request access link for users without access? Currently unused.
welcome_email_cc - string - Include this email in welcome emails if enabled
welcome_custom_text - string - Custom text send in user welcome email
language - string - Site default language
windows_mode_ftp - boolean - Does FTP user Windows emulation mode?
default_time_zone - string - Site default time zone
desktop_app - boolean - Is the desktop app enabled?
desktop_app_session_ip_pinning - boolean - Is desktop app session IP pinning enabled?
desktop_app_session_lifetime - integer - Desktop app session lifetime (in hours)
folder_permissions_groups_only - boolean - If true, permissions for this site must be bound to a group (not a user). Otherwise, permissions must be bound to a user.
welcome_screen - string - Does the welcome screen appear?
session_expiry - integer - Session expiry in hours
ssl_required - boolean - Is SSL required? Disabling this is insecure.
tls_disabled - boolean - Is TLS disabled(site setting)?
user_lockout - boolean - Will users be locked out after incorrect login attempts?
user_lockout_tries - integer - Number of login tries within `user_lockout_within` hours before users are locked out
user_lockout_within - integer - Number of hours for user lockout window
user_lockout_lock_period - integer - How many hours to lock user out for failed password?
include_password_in_welcome_email - boolean - Include password in emails to new users?
allowed_file_types - string - List of allowed file types
allowed_ips - string - List of allowed IP addresses
days_to_retain_backups - integer - Number of days to keep deleted files
max_prior_passwords - integer - Number of prior passwords to disallow
password_validity_days - integer - Number of days password is valid
password_min_length - integer - Shortest password length for users
password_require_letter - boolean - Require a letter in passwords?
password_require_mixed - boolean - Require lower and upper case letters in passwords?
password_require_special - boolean - Require special characters in password?
password_require_number - boolean - Require a number in passwords?
sftp_user_root_enabled - boolean - Use user FTP roots also for SFTP?
disable_password_reset - boolean - Is password reset disabled?
immutable_files - boolean - Are files protected from modification?
session_pinned_by_ip - boolean - Are sessions locked to the same IP? (i.e. do users need to log in again if they change IPs?)
bundle_password_required - boolean - Do Bundles require password protection?
password_requirements_apply_to_bundles - boolean - Require bundles' passwords to conform to the same requirements as users' passwords?
opt_out_global - boolean - Use servers in the USA only?
use_provided_modified_at - boolean - Allow uploaders to set `provided_modified_at` for uploaded files?
custom_namespace - boolean - Is this site using a custom namespace for users?
disable_users_from_inactivity_period_days - integer - If greater than zero, users will unable to login if they do not show activity within this number of days.
allowed_2fa_method_sms - boolean - Is SMS two factor authentication allowed?
allowed_2fa_method_u2f - boolean - Is U2F two factor authentication allowed?
allowed_2fa_method_totp - boolean - Is TOTP two factor authentication allowed?
allowed_2fa_method_yubi - boolean - Is yubikey two factor authentication allowed?
require_2fa - boolean - Require two-factor authentication for all users?
require_2fa_user_type - string - What type of user is required to use two-factor authentication (when require_2fa is set to `true` for this site)?
color2_top - string - Top bar background color
color2_left - string - Page link and button color
color2_link - string - Top bar link color
color2_text - string - Page link and button color
color2_top_text - string - Top bar text color
site_header - string - Custom site header text
site_footer - string - Custom site footer text
login_help_text - string - Login help text
icon16 - object - Branded icon 16x16
icon32 - object - Branded icon 32x32
icon48 - object - Branded icon 48x48
icon128 - object - Branded icon 128x128
logo - object - Branded logo
smtp_address - string - SMTP server hostname or IP
smtp_authentication - string - SMTP server authentication type
smtp_from - string - From address to use when mailing through custom SMTP
smtp_username - string - SMTP server username
smtp_port - integer - SMTP server port
ldap_enabled - boolean - Main LDAP setting: is LDAP enabled?
ldap_type - string - LDAP type
ldap_host - string - LDAP host
ldap_host_2 - string - LDAP backup host
ldap_host_3 - string - LDAP backup host
ldap_port - integer - LDAP port
ldap_secure - boolean - Use secure LDAP?
ldap_username - string - Username for signing in to LDAP server.
ldap_username_field - string - LDAP username field
ldap_domain - string - Domain name that will be appended to usernames
ldap_user_action - string - Should we sync users from LDAP server?
ldap_group_action - string - Should we sync groups from LDAP server?
ldap_user_include_groups - string - Comma or newline separated list of group names (with optional wildcards) - if provided, only users in these groups will be added or synced.
ldap_group_exclusion - string - Comma or newline separated list of group names (with optional wildcards) to exclude when syncing.
ldap_group_inclusion - string - Comma or newline separated list of group names (with optional wildcards) to include when syncing.
ldap_base_dn - string - Base DN for looking up users in LDAP server
days_until_2fa_required - integer - When enabling 2FA, set this to a delay period in days.
disable_2fa_with_delay - boolean - If set to true, we will begin the process of disabling 2FA on this site.
ldap_password_change - string - New LDAP password.
ldap_password_change_confirmation - string - Confirm new LDAP password.
remove_icons - boolean - If set to true, icons will be removed.
smtp_password - string - Password for SMTP server.
688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 |
# File 'lib/files.com/models/site.rb', line 688 def self.update(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String) raise InvalidParameterError.new("Bad parameter: subdomain must be an String") if params.dig(:subdomain) and !params.dig(:subdomain).is_a?(String) raise InvalidParameterError.new("Bad parameter: domain must be an String") if params.dig(:domain) and !params.dig(:domain).is_a?(String) raise InvalidParameterError.new("Bad parameter: email must be an String") if params.dig(:email) and !params.dig(:email).is_a?(String) raise InvalidParameterError.new("Bad parameter: bundle_expiration must be an Integer") if params.dig(:bundle_expiration) and !params.dig(:bundle_expiration).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: welcome_email_cc must be an String") if params.dig(:welcome_email_cc) and !params.dig(:welcome_email_cc).is_a?(String) raise InvalidParameterError.new("Bad parameter: welcome_custom_text must be an String") if params.dig(:welcome_custom_text) and !params.dig(:welcome_custom_text).is_a?(String) raise InvalidParameterError.new("Bad parameter: language must be an String") if params.dig(:language) and !params.dig(:language).is_a?(String) raise InvalidParameterError.new("Bad parameter: default_time_zone must be an String") if params.dig(:default_time_zone) and !params.dig(:default_time_zone).is_a?(String) raise InvalidParameterError.new("Bad parameter: desktop_app_session_lifetime must be an Integer") if params.dig(:desktop_app_session_lifetime) and !params.dig(:desktop_app_session_lifetime).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: welcome_screen must be an String") if params.dig(:welcome_screen) and !params.dig(:welcome_screen).is_a?(String) raise InvalidParameterError.new("Bad parameter: session_expiry must be an Integer") if params.dig(:session_expiry) and !params.dig(:session_expiry).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: user_lockout_tries must be an Integer") if params.dig(:user_lockout_tries) and !params.dig(:user_lockout_tries).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: user_lockout_within must be an Integer") if params.dig(:user_lockout_within) and !params.dig(:user_lockout_within).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: user_lockout_lock_period must be an Integer") if params.dig(:user_lockout_lock_period) and !params.dig(:user_lockout_lock_period).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: allowed_file_types must be an String") if params.dig(:allowed_file_types) and !params.dig(:allowed_file_types).is_a?(String) raise InvalidParameterError.new("Bad parameter: allowed_ips must be an String") if params.dig(:allowed_ips) and !params.dig(:allowed_ips).is_a?(String) raise InvalidParameterError.new("Bad parameter: days_to_retain_backups must be an Integer") if params.dig(:days_to_retain_backups) and !params.dig(:days_to_retain_backups).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: max_prior_passwords must be an Integer") if params.dig(:max_prior_passwords) and !params.dig(:max_prior_passwords).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: password_validity_days must be an Integer") if params.dig(:password_validity_days) and !params.dig(:password_validity_days).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: password_min_length must be an Integer") if params.dig(:password_min_length) and !params.dig(:password_min_length).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: disable_users_from_inactivity_period_days must be an Integer") if params.dig(:disable_users_from_inactivity_period_days) and !params.dig(:disable_users_from_inactivity_period_days).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: require_2fa_user_type must be an String") if params.dig(:require_2fa_user_type) and !params.dig(:require_2fa_user_type).is_a?(String) raise InvalidParameterError.new("Bad parameter: color2_top must be an String") if params.dig(:color2_top) and !params.dig(:color2_top).is_a?(String) raise InvalidParameterError.new("Bad parameter: color2_left must be an String") if params.dig(:color2_left) and !params.dig(:color2_left).is_a?(String) raise InvalidParameterError.new("Bad parameter: color2_link must be an String") if params.dig(:color2_link) and !params.dig(:color2_link).is_a?(String) raise InvalidParameterError.new("Bad parameter: color2_text must be an String") if params.dig(:color2_text) and !params.dig(:color2_text).is_a?(String) raise InvalidParameterError.new("Bad parameter: color2_top_text must be an String") if params.dig(:color2_top_text) and !params.dig(:color2_top_text).is_a?(String) raise InvalidParameterError.new("Bad parameter: site_header must be an String") if params.dig(:site_header) and !params.dig(:site_header).is_a?(String) raise InvalidParameterError.new("Bad parameter: site_footer must be an String") if params.dig(:site_footer) and !params.dig(:site_footer).is_a?(String) raise InvalidParameterError.new("Bad parameter: login_help_text must be an String") if params.dig(:login_help_text) and !params.dig(:login_help_text).is_a?(String) raise InvalidParameterError.new("Bad parameter: smtp_address must be an String") if params.dig(:smtp_address) and !params.dig(:smtp_address).is_a?(String) raise InvalidParameterError.new("Bad parameter: smtp_authentication must be an String") if params.dig(:smtp_authentication) and !params.dig(:smtp_authentication).is_a?(String) raise InvalidParameterError.new("Bad parameter: smtp_from must be an String") if params.dig(:smtp_from) and !params.dig(:smtp_from).is_a?(String) raise InvalidParameterError.new("Bad parameter: smtp_username must be an String") if params.dig(:smtp_username) and !params.dig(:smtp_username).is_a?(String) raise InvalidParameterError.new("Bad parameter: smtp_port must be an Integer") if params.dig(:smtp_port) and !params.dig(:smtp_port).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: ldap_type must be an String") if params.dig(:ldap_type) and !params.dig(:ldap_type).is_a?(String) raise InvalidParameterError.new("Bad parameter: ldap_host must be an String") if params.dig(:ldap_host) and !params.dig(:ldap_host).is_a?(String) raise InvalidParameterError.new("Bad parameter: ldap_host_2 must be an String") if params.dig(:ldap_host_2) and !params.dig(:ldap_host_2).is_a?(String) raise InvalidParameterError.new("Bad parameter: ldap_host_3 must be an String") if params.dig(:ldap_host_3) and !params.dig(:ldap_host_3).is_a?(String) raise InvalidParameterError.new("Bad parameter: ldap_port must be an Integer") if params.dig(:ldap_port) and !params.dig(:ldap_port).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: ldap_username must be an String") if params.dig(:ldap_username) and !params.dig(:ldap_username).is_a?(String) raise InvalidParameterError.new("Bad parameter: ldap_username_field must be an String") if params.dig(:ldap_username_field) and !params.dig(:ldap_username_field).is_a?(String) raise InvalidParameterError.new("Bad parameter: ldap_domain must be an String") if params.dig(:ldap_domain) and !params.dig(:ldap_domain).is_a?(String) raise InvalidParameterError.new("Bad parameter: ldap_user_action must be an String") if params.dig(:ldap_user_action) and !params.dig(:ldap_user_action).is_a?(String) raise InvalidParameterError.new("Bad parameter: ldap_group_action must be an String") if params.dig(:ldap_group_action) and !params.dig(:ldap_group_action).is_a?(String) raise InvalidParameterError.new("Bad parameter: ldap_user_include_groups must be an String") if params.dig(:ldap_user_include_groups) and !params.dig(:ldap_user_include_groups).is_a?(String) raise InvalidParameterError.new("Bad parameter: ldap_group_exclusion must be an String") if params.dig(:ldap_group_exclusion) and !params.dig(:ldap_group_exclusion).is_a?(String) raise InvalidParameterError.new("Bad parameter: ldap_group_inclusion must be an String") if params.dig(:ldap_group_inclusion) and !params.dig(:ldap_group_inclusion).is_a?(String) raise InvalidParameterError.new("Bad parameter: ldap_base_dn must be an String") if params.dig(:ldap_base_dn) and !params.dig(:ldap_base_dn).is_a?(String) raise InvalidParameterError.new("Bad parameter: days_until_2fa_required must be an Integer") if params.dig(:days_until_2fa_required) and !params.dig(:days_until_2fa_required).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: ldap_password_change must be an String") if params.dig(:ldap_password_change) and !params.dig(:ldap_password_change).is_a?(String) raise InvalidParameterError.new("Bad parameter: ldap_password_change_confirmation must be an String") if params.dig(:ldap_password_change_confirmation) and !params.dig(:ldap_password_change_confirmation).is_a?(String) raise InvalidParameterError.new("Bad parameter: smtp_password must be an String") if params.dig(:smtp_password) and !params.dig(:smtp_password).is_a?(String) response, = Api.send_request("/site", :patch, params, ) Site.new(response.data, ) end |
.update_plan(id, params = {}, options = {}) ⇒ Object
Change the current billing plan for the site
Parameters:
billing_frequency - integer - The billing frequency for the site. Must be 1(monthly) or 12(annual).
752 753 754 755 756 757 758 759 760 761 |
# File 'lib/files.com/models/site.rb', line 752 def self.update_plan(id, params = {}, = {}) params ||= {} params[:id] = id raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: billing_frequency must be an Integer") if params.dig(:billing_frequency) and !params.dig(:billing_frequency).is_a?(Integer) raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id) response, = Api.send_request("/site/plan", :patch, params, ) Plan.new(response.data, ) end |
Instance Method Details
#admin_user_id ⇒ Object
int64 - User ID for the main site administrator
33 34 35 |
# File 'lib/files.com/models/site.rb', line 33 def admin_user_id @attributes[:admin_user_id] end |
#allowed_2fa_method_sms ⇒ Object
boolean - Is SMS two factor authentication allowed?
13 14 15 |
# File 'lib/files.com/models/site.rb', line 13 def allowed_2fa_method_sms @attributes[:allowed_2fa_method_sms] end |
#allowed_2fa_method_totp ⇒ Object
boolean - Is TOTP two factor authentication allowed?
18 19 20 |
# File 'lib/files.com/models/site.rb', line 18 def allowed_2fa_method_totp @attributes[:allowed_2fa_method_totp] end |
#allowed_2fa_method_u2f ⇒ Object
boolean - Is U2F two factor authentication allowed?
23 24 25 |
# File 'lib/files.com/models/site.rb', line 23 def allowed_2fa_method_u2f @attributes[:allowed_2fa_method_u2f] end |
#allowed_2fa_method_yubi ⇒ Object
boolean - Is yubikey two factor authentication allowed?
28 29 30 |
# File 'lib/files.com/models/site.rb', line 28 def allowed_2fa_method_yubi @attributes[:allowed_2fa_method_yubi] end |
#allowed_file_types ⇒ Object
string - List of allowed file types
38 39 40 |
# File 'lib/files.com/models/site.rb', line 38 def allowed_file_types @attributes[:allowed_file_types] end |
#allowed_ips ⇒ Object
string - List of allowed IP addresses
43 44 45 |
# File 'lib/files.com/models/site.rb', line 43 def allowed_ips @attributes[:allowed_ips] end |
#ask_about_overwrites ⇒ Object
boolean - If false, rename conflicting files instead of asking for overwrite confirmation. Only applies to web interface.
48 49 50 |
# File 'lib/files.com/models/site.rb', line 48 def ask_about_overwrites @attributes[:ask_about_overwrites] end |
#bundle_expiration ⇒ Object
int64 - Site-wide Bundle expiration in days
53 54 55 |
# File 'lib/files.com/models/site.rb', line 53 def bundle_expiration @attributes[:bundle_expiration] end |
#bundle_password_required ⇒ Object
boolean - Do Bundles require password protection?
58 59 60 |
# File 'lib/files.com/models/site.rb', line 58 def bundle_password_required @attributes[:bundle_password_required] end |
#color2_left ⇒ Object
string - Page link and button color
63 64 65 |
# File 'lib/files.com/models/site.rb', line 63 def color2_left @attributes[:color2_left] end |
#color2_link ⇒ Object
string - Top bar link color
68 69 70 |
# File 'lib/files.com/models/site.rb', line 68 def color2_link @attributes[:color2_link] end |
#color2_text ⇒ Object
string - Page link and button color
73 74 75 |
# File 'lib/files.com/models/site.rb', line 73 def color2_text @attributes[:color2_text] end |
#color2_top ⇒ Object
string - Top bar background color
78 79 80 |
# File 'lib/files.com/models/site.rb', line 78 def color2_top @attributes[:color2_top] end |
#color2_top_text ⇒ Object
string - Top bar text color
83 84 85 |
# File 'lib/files.com/models/site.rb', line 83 def color2_top_text @attributes[:color2_top_text] end |
#created_at ⇒ Object
date-time - Time this site was created
88 89 90 |
# File 'lib/files.com/models/site.rb', line 88 def created_at @attributes[:created_at] end |
#currency ⇒ Object
string - Preferred currency
93 94 95 |
# File 'lib/files.com/models/site.rb', line 93 def currency @attributes[:currency] end |
#custom_namespace ⇒ Object
boolean - Is this site using a custom namespace for users?
98 99 100 |
# File 'lib/files.com/models/site.rb', line 98 def custom_namespace @attributes[:custom_namespace] end |
#days_to_retain_backups ⇒ Object
int64 - Number of days to keep deleted files
103 104 105 |
# File 'lib/files.com/models/site.rb', line 103 def days_to_retain_backups @attributes[:days_to_retain_backups] end |
#default_time_zone ⇒ Object
string - Site default time zone
108 109 110 |
# File 'lib/files.com/models/site.rb', line 108 def default_time_zone @attributes[:default_time_zone] end |
#desktop_app ⇒ Object
boolean - Is the desktop app enabled?
113 114 115 |
# File 'lib/files.com/models/site.rb', line 113 def desktop_app @attributes[:desktop_app] end |
#desktop_app_session_ip_pinning ⇒ Object
boolean - Is desktop app session IP pinning enabled?
118 119 120 |
# File 'lib/files.com/models/site.rb', line 118 def desktop_app_session_ip_pinning @attributes[:desktop_app_session_ip_pinning] end |
#desktop_app_session_lifetime ⇒ Object
int64 - Desktop app session lifetime (in hours)
123 124 125 |
# File 'lib/files.com/models/site.rb', line 123 def desktop_app_session_lifetime @attributes[:desktop_app_session_lifetime] end |
#disable_notifications ⇒ Object
boolean - Are notifications disabled?
128 129 130 |
# File 'lib/files.com/models/site.rb', line 128 def disable_notifications @attributes[:disable_notifications] end |
#disable_password_reset ⇒ Object
boolean - Is password reset disabled?
133 134 135 |
# File 'lib/files.com/models/site.rb', line 133 def disable_password_reset @attributes[:disable_password_reset] end |
#disable_users_from_inactivity_period_days ⇒ Object
int64 - If greater than zero, users will unable to login if they do not show activity within this number of days.
528 529 530 |
# File 'lib/files.com/models/site.rb', line 528 def disable_users_from_inactivity_period_days @attributes[:disable_users_from_inactivity_period_days] end |
#domain ⇒ Object
string - Custom domain
138 139 140 |
# File 'lib/files.com/models/site.rb', line 138 def domain @attributes[:domain] end |
#email ⇒ Object
email - Main email for this site
143 144 145 |
# File 'lib/files.com/models/site.rb', line 143 def email @attributes[:email] end |
#folder_permissions_groups_only ⇒ Object
boolean - If true, permissions for this site must be bound to a group (not a user). Otherwise, permissions must be bound to a user.
148 149 150 |
# File 'lib/files.com/models/site.rb', line 148 def @attributes[:folder_permissions_groups_only] end |
#hipaa ⇒ Object
boolean - Is there a signed HIPAA BAA between Files.com and this site?
153 154 155 |
# File 'lib/files.com/models/site.rb', line 153 def hipaa @attributes[:hipaa] end |
#icon128 ⇒ Object
Branded icon 128x128
158 159 160 |
# File 'lib/files.com/models/site.rb', line 158 def icon128 @attributes[:icon128] end |
#icon16 ⇒ Object
Branded icon 16x16
163 164 165 |
# File 'lib/files.com/models/site.rb', line 163 def icon16 @attributes[:icon16] end |
#icon32 ⇒ Object
Branded icon 32x32
168 169 170 |
# File 'lib/files.com/models/site.rb', line 168 def icon32 @attributes[:icon32] end |
#icon48 ⇒ Object
Branded icon 48x48
173 174 175 |
# File 'lib/files.com/models/site.rb', line 173 def icon48 @attributes[:icon48] end |
#immutable_files_set_at ⇒ Object
date-time - Can files be modified?
178 179 180 |
# File 'lib/files.com/models/site.rb', line 178 def immutable_files_set_at @attributes[:immutable_files_set_at] end |
#include_password_in_welcome_email ⇒ Object
boolean - Include password in emails to new users?
183 184 185 |
# File 'lib/files.com/models/site.rb', line 183 def include_password_in_welcome_email @attributes[:include_password_in_welcome_email] end |
#language ⇒ Object
string - Site default language
188 189 190 |
# File 'lib/files.com/models/site.rb', line 188 def language @attributes[:language] end |
#ldap_base_dn ⇒ Object
string - Base DN for looking up users in LDAP server
193 194 195 |
# File 'lib/files.com/models/site.rb', line 193 def ldap_base_dn @attributes[:ldap_base_dn] end |
#ldap_domain ⇒ Object
string - Domain name that will be appended to usernames
198 199 200 |
# File 'lib/files.com/models/site.rb', line 198 def ldap_domain @attributes[:ldap_domain] end |
#ldap_enabled ⇒ Object
boolean - Main LDAP setting: is LDAP enabled?
203 204 205 |
# File 'lib/files.com/models/site.rb', line 203 def ldap_enabled @attributes[:ldap_enabled] end |
#ldap_group_action ⇒ Object
string - Should we sync groups from LDAP server?
208 209 210 |
# File 'lib/files.com/models/site.rb', line 208 def ldap_group_action @attributes[:ldap_group_action] end |
#ldap_group_exclusion ⇒ Object
string - Comma or newline separated list of group names (with optional wildcards) to exclude when syncing.
213 214 215 |
# File 'lib/files.com/models/site.rb', line 213 def ldap_group_exclusion @attributes[:ldap_group_exclusion] end |
#ldap_group_inclusion ⇒ Object
string - Comma or newline separated list of group names (with optional wildcards) to include when syncing.
218 219 220 |
# File 'lib/files.com/models/site.rb', line 218 def ldap_group_inclusion @attributes[:ldap_group_inclusion] end |
#ldap_host ⇒ Object
string - LDAP host
223 224 225 |
# File 'lib/files.com/models/site.rb', line 223 def ldap_host @attributes[:ldap_host] end |
#ldap_host_2 ⇒ Object
string - LDAP backup host
228 229 230 |
# File 'lib/files.com/models/site.rb', line 228 def ldap_host_2 @attributes[:ldap_host_2] end |
#ldap_host_3 ⇒ Object
string - LDAP backup host
233 234 235 |
# File 'lib/files.com/models/site.rb', line 233 def ldap_host_3 @attributes[:ldap_host_3] end |
#ldap_port ⇒ Object
int64 - LDAP port
238 239 240 |
# File 'lib/files.com/models/site.rb', line 238 def ldap_port @attributes[:ldap_port] end |
#ldap_secure ⇒ Object
boolean - Use secure LDAP?
243 244 245 |
# File 'lib/files.com/models/site.rb', line 243 def ldap_secure @attributes[:ldap_secure] end |
#ldap_type ⇒ Object
string - LDAP type
248 249 250 |
# File 'lib/files.com/models/site.rb', line 248 def ldap_type @attributes[:ldap_type] end |
#ldap_user_action ⇒ Object
string - Should we sync users from LDAP server?
253 254 255 |
# File 'lib/files.com/models/site.rb', line 253 def ldap_user_action @attributes[:ldap_user_action] end |
#ldap_user_include_groups ⇒ Object
string - Comma or newline separated list of group names (with optional wildcards) - if provided, only users in these groups will be added or synced.
258 259 260 |
# File 'lib/files.com/models/site.rb', line 258 def ldap_user_include_groups @attributes[:ldap_user_include_groups] end |
#ldap_username ⇒ Object
string - Username for signing in to LDAP server.
263 264 265 |
# File 'lib/files.com/models/site.rb', line 263 def ldap_username @attributes[:ldap_username] end |
#ldap_username_field ⇒ Object
string - LDAP username field
268 269 270 |
# File 'lib/files.com/models/site.rb', line 268 def ldap_username_field @attributes[:ldap_username_field] end |
#login_help_text ⇒ Object
string - Login help text
273 274 275 |
# File 'lib/files.com/models/site.rb', line 273 def login_help_text @attributes[:login_help_text] end |
#logo ⇒ Object
Branded logo
278 279 280 |
# File 'lib/files.com/models/site.rb', line 278 def logo @attributes[:logo] end |
#max_prior_passwords ⇒ Object
int64 - Number of prior passwords to disallow
283 284 285 |
# File 'lib/files.com/models/site.rb', line 283 def max_prior_passwords @attributes[:max_prior_passwords] end |
#name ⇒ Object
string - Site name
288 289 290 |
# File 'lib/files.com/models/site.rb', line 288 def name @attributes[:name] end |
#next_billing_amount ⇒ Object
float - Next billing amount
293 294 295 |
# File 'lib/files.com/models/site.rb', line 293 def next_billing_amount @attributes[:next_billing_amount] end |
#next_billing_date ⇒ Object
string - Next billing date
298 299 300 |
# File 'lib/files.com/models/site.rb', line 298 def next_billing_date @attributes[:next_billing_date] end |
#opt_out_global ⇒ Object
boolean - Use servers in the USA only?
303 304 305 |
# File 'lib/files.com/models/site.rb', line 303 def opt_out_global @attributes[:opt_out_global] end |
#overage_notified_at ⇒ Object
date-time - Last time the site was notified about an overage
308 309 310 |
# File 'lib/files.com/models/site.rb', line 308 def overage_notified_at @attributes[:overage_notified_at] end |
#overage_notify ⇒ Object
boolean - Notify site email of overages?
313 314 315 |
# File 'lib/files.com/models/site.rb', line 313 def overage_notify @attributes[:overage_notify] end |
#overdue ⇒ Object
boolean - Is this site’s billing overdue?
318 319 320 |
# File 'lib/files.com/models/site.rb', line 318 def overdue @attributes[:overdue] end |
#password_min_length ⇒ Object
int64 - Shortest password length for users
323 324 325 |
# File 'lib/files.com/models/site.rb', line 323 def password_min_length @attributes[:password_min_length] end |
#password_require_letter ⇒ Object
boolean - Require a letter in passwords?
328 329 330 |
# File 'lib/files.com/models/site.rb', line 328 def password_require_letter @attributes[:password_require_letter] end |
#password_require_mixed ⇒ Object
boolean - Require lower and upper case letters in passwords?
333 334 335 |
# File 'lib/files.com/models/site.rb', line 333 def password_require_mixed @attributes[:password_require_mixed] end |
#password_require_number ⇒ Object
boolean - Require a number in passwords?
338 339 340 |
# File 'lib/files.com/models/site.rb', line 338 def password_require_number @attributes[:password_require_number] end |
#password_require_special ⇒ Object
boolean - Require special characters in password?
343 344 345 |
# File 'lib/files.com/models/site.rb', line 343 def password_require_special @attributes[:password_require_special] end |
#password_requirements_apply_to_bundles ⇒ Object
boolean - Require bundles’ passwords to conform to the same requirements as users’ passwords?
348 349 350 |
# File 'lib/files.com/models/site.rb', line 348 def password_requirements_apply_to_bundles @attributes[:password_requirements_apply_to_bundles] end |
#password_validity_days ⇒ Object
int64 - Number of days password is valid
353 354 355 |
# File 'lib/files.com/models/site.rb', line 353 def password_validity_days @attributes[:password_validity_days] end |
#phone ⇒ Object
string - Site phone number
358 359 360 |
# File 'lib/files.com/models/site.rb', line 358 def phone @attributes[:phone] end |
#require_2fa ⇒ Object
boolean - Require two-factor authentication for all users?
363 364 365 |
# File 'lib/files.com/models/site.rb', line 363 def require_2fa @attributes[:require_2fa] end |
#require_2fa_stop_time ⇒ Object
date-time - If set, requirement for two-factor authentication has been scheduled to end on this date-time.
368 369 370 |
# File 'lib/files.com/models/site.rb', line 368 def require_2fa_stop_time @attributes[:require_2fa_stop_time] end |
#require_2fa_user_type ⇒ Object
string - What type of user is required to use two-factor authentication (when require_2fa is set to ‘true` for this site)?
373 374 375 |
# File 'lib/files.com/models/site.rb', line 373 def require_2fa_user_type @attributes[:require_2fa_user_type] end |
#session ⇒ Object
Current session
378 379 380 |
# File 'lib/files.com/models/site.rb', line 378 def session @attributes[:session] end |
#session_expiry ⇒ Object
int64 - Session expiry in hours
433 434 435 |
# File 'lib/files.com/models/site.rb', line 433 def session_expiry @attributes[:session_expiry] end |
#session_pinned_by_ip ⇒ Object
boolean - Are sessions locked to the same IP? (i.e. do users need to log in again if they change IPs?)
383 384 385 |
# File 'lib/files.com/models/site.rb', line 383 def session_pinned_by_ip @attributes[:session_pinned_by_ip] end |
#sftp_user_root_enabled ⇒ Object
boolean - Use user FTP roots also for SFTP?
388 389 390 |
# File 'lib/files.com/models/site.rb', line 388 def sftp_user_root_enabled @attributes[:sftp_user_root_enabled] end |
#show_request_access_link ⇒ Object
boolean - Show request access link for users without access? Currently unused.
393 394 395 |
# File 'lib/files.com/models/site.rb', line 393 def show_request_access_link @attributes[:show_request_access_link] end |
#site_footer ⇒ Object
string - Custom site footer text
398 399 400 |
# File 'lib/files.com/models/site.rb', line 398 def @attributes[:site_footer] end |
#site_header ⇒ Object
string - Custom site header text
403 404 405 |
# File 'lib/files.com/models/site.rb', line 403 def site_header @attributes[:site_header] end |
#smtp_address ⇒ Object
string - SMTP server hostname or IP
408 409 410 |
# File 'lib/files.com/models/site.rb', line 408 def smtp_address @attributes[:smtp_address] end |
#smtp_authentication ⇒ Object
string - SMTP server authentication type
413 414 415 |
# File 'lib/files.com/models/site.rb', line 413 def smtp_authentication @attributes[:smtp_authentication] end |
#smtp_from ⇒ Object
string - From address to use when mailing through custom SMTP
418 419 420 |
# File 'lib/files.com/models/site.rb', line 418 def smtp_from @attributes[:smtp_from] end |
#smtp_port ⇒ Object
int64 - SMTP server port
423 424 425 |
# File 'lib/files.com/models/site.rb', line 423 def smtp_port @attributes[:smtp_port] end |
#smtp_username ⇒ Object
string - SMTP server username
428 429 430 |
# File 'lib/files.com/models/site.rb', line 428 def smtp_username @attributes[:smtp_username] end |
#ssl_required ⇒ Object
boolean - Is SSL required? Disabling this is insecure.
438 439 440 |
# File 'lib/files.com/models/site.rb', line 438 def ssl_required @attributes[:ssl_required] end |
#subdomain ⇒ Object
string - Site subdomain
443 444 445 |
# File 'lib/files.com/models/site.rb', line 443 def subdomain @attributes[:subdomain] end |
#switch_to_plan_date ⇒ Object
date-time - If switching plans, when does the new plan take effect?
448 449 450 |
# File 'lib/files.com/models/site.rb', line 448 def switch_to_plan_date @attributes[:switch_to_plan_date] end |
#tls_disabled ⇒ Object
boolean - Is TLS disabled(site setting)?
453 454 455 |
# File 'lib/files.com/models/site.rb', line 453 def tls_disabled @attributes[:tls_disabled] end |
#trial_days_left ⇒ Object
int64 - Number of days left in trial
458 459 460 |
# File 'lib/files.com/models/site.rb', line 458 def trial_days_left @attributes[:trial_days_left] end |
#trial_until ⇒ Object
date-time - When does this Site trial expire?
463 464 465 |
# File 'lib/files.com/models/site.rb', line 463 def trial_until @attributes[:trial_until] end |
#update_plan(params = {}) ⇒ Object
Change the current billing plan for the site
Parameters:
billing_frequency - integer - The billing frequency for the site. Must be 1(monthly) or 12(annual).
536 537 538 539 540 541 542 543 544 545 |
# File 'lib/files.com/models/site.rb', line 536 def update_plan(params = {}) params ||= {} params[:id] = @attributes[:id] raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id] raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: billing_frequency must be an Integer") if params.dig(:billing_frequency) and !params.dig(:billing_frequency).is_a?(Integer) raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id) Api.send_request("/site/plan", :patch, params, @options) end |
#updated_at ⇒ Object
date-time - Last time this Site was updated
468 469 470 |
# File 'lib/files.com/models/site.rb', line 468 def updated_at @attributes[:updated_at] end |
#use_provided_modified_at ⇒ Object
boolean - Allow uploaders to set ‘provided_modified_at` for uploaded files?
473 474 475 |
# File 'lib/files.com/models/site.rb', line 473 def use_provided_modified_at @attributes[:use_provided_modified_at] end |
#user ⇒ Object
User of current session
478 479 480 |
# File 'lib/files.com/models/site.rb', line 478 def user @attributes[:user] end |
#user_lockout ⇒ Object
boolean - Will users be locked out after incorrect login attempts?
483 484 485 |
# File 'lib/files.com/models/site.rb', line 483 def user_lockout @attributes[:user_lockout] end |
#user_lockout_lock_period ⇒ Object
int64 - How many hours to lock user out for failed password?
488 489 490 |
# File 'lib/files.com/models/site.rb', line 488 def user_lockout_lock_period @attributes[:user_lockout_lock_period] end |
#user_lockout_tries ⇒ Object
int64 - Number of login tries within ‘user_lockout_within` hours before users are locked out
493 494 495 |
# File 'lib/files.com/models/site.rb', line 493 def user_lockout_tries @attributes[:user_lockout_tries] end |
#user_lockout_within ⇒ Object
int64 - Number of hours for user lockout window
498 499 500 |
# File 'lib/files.com/models/site.rb', line 498 def user_lockout_within @attributes[:user_lockout_within] end |
#welcome_custom_text ⇒ Object
string - Custom text send in user welcome email
503 504 505 |
# File 'lib/files.com/models/site.rb', line 503 def welcome_custom_text @attributes[:welcome_custom_text] end |
#welcome_email_cc ⇒ Object
email - Include this email in welcome emails if enabled
508 509 510 |
# File 'lib/files.com/models/site.rb', line 508 def welcome_email_cc @attributes[:welcome_email_cc] end |
#welcome_email_enabled ⇒ Object
boolean - Will the welcome email be sent to new users?
513 514 515 |
# File 'lib/files.com/models/site.rb', line 513 def welcome_email_enabled @attributes[:welcome_email_enabled] end |
#welcome_screen ⇒ Object
string - Does the welcome screen appear?
518 519 520 |
# File 'lib/files.com/models/site.rb', line 518 def welcome_screen @attributes[:welcome_screen] end |
#windows_mode_ftp ⇒ Object
boolean - Does FTP user Windows emulation mode?
523 524 525 |
# File 'lib/files.com/models/site.rb', line 523 def windows_mode_ftp @attributes[:windows_mode_ftp] end |