Class: Files::Plan

Inherits:
Object
  • Object
show all
Defined in:
lib/files.com/models/plan.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}, options = {}) ⇒ Plan

Returns a new instance of Plan.



7
8
9
10
# File 'lib/files.com/models/plan.rb', line 7

def initialize(attributes = {}, options = {})
  @attributes = attributes || {}
  @options = options || {}
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



5
6
7
# File 'lib/files.com/models/plan.rb', line 5

def attributes
  @attributes
end

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/files.com/models/plan.rb', line 5

def options
  @options
end

Class Method Details

.all(params = {}, options = {}) ⇒ Object



312
313
314
# File 'lib/files.com/models/plan.rb', line 312

def self.all(params = {}, options = {})
  list(params, options)
end

.list(params = {}, options = {}) ⇒ Object

Parameters:

page - integer - Current page number.
per_page - integer - Number of records to show per page.  (Max: 10,000, 1,000 or less is recommended).
action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
currency - string - Currency.


302
303
304
305
306
307
308
309
310
# File 'lib/files.com/models/plan.rb', line 302

def self.list(params = {}, options = {})
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: currency must be an String") if params.dig(:currency) and !params.dig(:currency).is_a?(String)

  response, options = Api.send_request("/plans", :get, params, options)
  response.data.map { |object| Plan.new(object, options) }
end

Instance Method Details

#activation_costObject

string - Activation cost (upfront)



273
274
275
# File 'lib/files.com/models/plan.rb', line 273

def activation_cost
  @attributes[:activation_cost]
end

#advanced_behaviorsObject

boolean - Are advanced behaviors included in plan?



18
19
20
# File 'lib/files.com/models/plan.rb', line 18

def advanced_behaviors
  @attributes[:advanced_behaviors]
end

#annuallyObject

string - Price annually



278
279
280
# File 'lib/files.com/models/plan.rb', line 278

def annually
  @attributes[:annually]
end

#antivirus_advancedObject

boolean - Is advanced antivirus included in plan?



23
24
25
# File 'lib/files.com/models/plan.rb', line 23

def antivirus_advanced
  @attributes[:antivirus_advanced]
end

#antivirus_basicObject

boolean - Is basic antivirus included in plan?



28
29
30
# File 'lib/files.com/models/plan.rb', line 28

def antivirus_basic
  @attributes[:antivirus_basic]
end

#audit_hoursObject

int64 - How many audit hours included in plan?



33
34
35
# File 'lib/files.com/models/plan.rb', line 33

def audit_hours
  @attributes[:audit_hours]
end

#auth_googleObject

boolean - Is google authentication included in plan?



38
39
40
# File 'lib/files.com/models/plan.rb', line 38

def auth_google
  @attributes[:auth_google]
end

#auth_oauthObject

boolean - Is oauth included in plan?



43
44
45
# File 'lib/files.com/models/plan.rb', line 43

def auth_oauth
  @attributes[:auth_oauth]
end

#auth_oauth_customObject

boolean - Is custom oauth included in plan?



48
49
50
# File 'lib/files.com/models/plan.rb', line 48

def auth_oauth_custom
  @attributes[:auth_oauth_custom]
end

#auth_user_countObject

int64 - Number of SSO, 2FA, Desktop users included in plan



53
54
55
# File 'lib/files.com/models/plan.rb', line 53

def auth_user_count
  @attributes[:auth_user_count]
end

#automationsObject

boolean - Are automations included in plan?



58
59
60
# File 'lib/files.com/models/plan.rb', line 58

def automations
  @attributes[:automations]
end

#currencyObject

string - Currency



283
284
285
# File 'lib/files.com/models/plan.rb', line 283

def currency
  @attributes[:currency]
end

#custom_namespaceObject

boolean - If true all usernames can be used, otherwise usernames must be unique



63
64
65
# File 'lib/files.com/models/plan.rb', line 63

def custom_namespace
  @attributes[:custom_namespace]
end

#custom_smtpObject

boolean - Custom SMTP support?



68
69
70
# File 'lib/files.com/models/plan.rb', line 68

def custom_smtp
  @attributes[:custom_smtp]
end

#dedicated_ipObject

boolean - Offers dedicated ip?



73
74
75
# File 'lib/files.com/models/plan.rb', line 73

def dedicated_ip
  @attributes[:dedicated_ip]
end

#dedicated_ipsObject

int64 - Number of dedicated IPs



78
79
80
# File 'lib/files.com/models/plan.rb', line 78

def dedicated_ips
  @attributes[:dedicated_ips]
end

#differencesObject

object - Results of comparing with a different Plan



83
84
85
# File 'lib/files.com/models/plan.rb', line 83

def differences
  @attributes[:differences]
end

#domainObject

boolean - Custom domain(s)?



88
89
90
# File 'lib/files.com/models/plan.rb', line 88

def domain
  @attributes[:domain]
end

#domain_countObject

int64 - Number of custom domains



93
94
95
# File 'lib/files.com/models/plan.rb', line 93

def domain_count
  @attributes[:domain_count]
end

#email_inboxesObject

boolean - Does the plan include E-Mail inboxes?



98
99
100
# File 'lib/files.com/models/plan.rb', line 98

def email_inboxes
  @attributes[:email_inboxes]
end

#extended_folder_permissionsObject

boolean - Supports extended folder permissions like viewing history?



103
104
105
# File 'lib/files.com/models/plan.rb', line 103

def extended_folder_permissions
  @attributes[:extended_folder_permissions]
end

#extended_log_retentionObject

boolean - Can log preservation be extended?



108
109
110
# File 'lib/files.com/models/plan.rb', line 108

def extended_log_retention
  @attributes[:extended_log_retention]
end

#free_developer_accountsObject

int64 - Number of free developer accounts



113
114
115
# File 'lib/files.com/models/plan.rb', line 113

def free_developer_accounts
  @attributes[:free_developer_accounts]
end

#ftp_sftp_webdavObject

boolean - Supports connections via FTP, SFTP, and WebDAV?



118
119
120
# File 'lib/files.com/models/plan.rb', line 118

def ftp_sftp_webdav
  @attributes[:ftp_sftp_webdav]
end

#full_text_searchObject

boolean - Full text search enabled?



123
124
125
# File 'lib/files.com/models/plan.rb', line 123

def full_text_search
  @attributes[:full_text_search]
end

#global_accelerationObject

boolean - Global acceleration enabled?



128
129
130
# File 'lib/files.com/models/plan.rb', line 128

def global_acceleration
  @attributes[:global_acceleration]
end

#gpgObject

boolean - Support for GPG encryption?



133
134
135
# File 'lib/files.com/models/plan.rb', line 133

def gpg
  @attributes[:gpg]
end

#group_admins_enabledObject

boolean - Group admin functionality enabled?



138
139
140
# File 'lib/files.com/models/plan.rb', line 138

def group_admins_enabled
  @attributes[:group_admins_enabled]
end

#group_notificationsObject

boolean - Group notifications functionality enabled?



143
144
145
# File 'lib/files.com/models/plan.rb', line 143

def group_notifications
  @attributes[:group_notifications]
end

#hipaaObject

boolean - Support for HIPAA regulation?



148
149
150
# File 'lib/files.com/models/plan.rb', line 148

def hipaa
  @attributes[:hipaa]
end

#html_brandingObject

boolean - HTML branding available?



153
154
155
# File 'lib/files.com/models/plan.rb', line 153

def html_branding
  @attributes[:html_branding]
end

#idObject

int64 - Plan ID



13
14
15
# File 'lib/files.com/models/plan.rb', line 13

def id
  @attributes[:id]
end

#ldapObject

boolean - LDAP integration enabled?



158
159
160
# File 'lib/files.com/models/plan.rb', line 158

def ldap
  @attributes[:ldap]
end

boolean - Does the plan offer any legal flexibility?



163
164
165
# File 'lib/files.com/models/plan.rb', line 163

def legal_flexibility
  @attributes[:legal_flexibility]
end

#max_folder_sizeObject

int64 - Max number of files in a folder



168
169
170
# File 'lib/files.com/models/plan.rb', line 168

def max_folder_size
  @attributes[:max_folder_size]
end

#max_individual_file_sizeObject

int64 - Maximum individual file size



173
174
175
# File 'lib/files.com/models/plan.rb', line 173

def max_individual_file_size
  @attributes[:max_individual_file_size]
end

#monthlyObject

string - Price monthly



288
289
290
# File 'lib/files.com/models/plan.rb', line 288

def monthly
  @attributes[:monthly]
end

#nameObject

string - Plan name



178
179
180
# File 'lib/files.com/models/plan.rb', line 178

def name
  @attributes[:name]
end

#nested_groupsObject

boolean - Are nested groups enabled?



183
184
185
# File 'lib/files.com/models/plan.rb', line 183

def nested_groups
  @attributes[:nested_groups]
end

#preview_page_limitObject

int64 - Number of previews available



188
189
190
# File 'lib/files.com/models/plan.rb', line 188

def preview_page_limit
  @attributes[:preview_page_limit]
end

#regions_includedObject

int64 - Number of storage regions included



193
194
195
# File 'lib/files.com/models/plan.rb', line 193

def regions_included
  @attributes[:regions_included]
end

#remote_sync_ftpObject

boolean - Remote sync with FTP available?



198
199
200
# File 'lib/files.com/models/plan.rb', line 198

def remote_sync_ftp
  @attributes[:remote_sync_ftp]
end

#remote_sync_intervalObject

int64 - Number of hours between remote sync



203
204
205
# File 'lib/files.com/models/plan.rb', line 203

def remote_sync_interval
  @attributes[:remote_sync_interval]
end

#remote_sync_otherObject

boolean - Are other forms of remote sync available?



208
209
210
# File 'lib/files.com/models/plan.rb', line 208

def remote_sync_other
  @attributes[:remote_sync_other]
end

#remote_sync_s3Object

boolean - Can sync to s3 bucket?



213
214
215
# File 'lib/files.com/models/plan.rb', line 213

def remote_sync_s3
  @attributes[:remote_sync_s3]
end

#require_2faObject

boolean - 2FA support enabled?



218
219
220
# File 'lib/files.com/models/plan.rb', line 218

def require_2fa
  @attributes[:require_2fa]
end

#site_fields_requiring_upgradeObject

array - Site attributes which require upgrade



223
224
225
# File 'lib/files.com/models/plan.rb', line 223

def site_fields_requiring_upgrade
  @attributes[:site_fields_requiring_upgrade]
end

#support_levelObject

string - Priority of customer support



228
229
230
# File 'lib/files.com/models/plan.rb', line 228

def support_level
  @attributes[:support_level]
end

#usage_costObject

string - Usage cost per GB of overage



233
234
235
# File 'lib/files.com/models/plan.rb', line 233

def usage_cost
  @attributes[:usage_cost]
end

#usage_includedObject

string - Usage included per month, in GB



238
239
240
# File 'lib/files.com/models/plan.rb', line 238

def usage_included
  @attributes[:usage_included]
end

#user_costObject

string - Cost per additional user



293
294
295
# File 'lib/files.com/models/plan.rb', line 293

def user_cost
  @attributes[:user_cost]
end

#usersObject

int64 - # of users included. 0 or -1 mean unlimited.



243
244
245
# File 'lib/files.com/models/plan.rb', line 243

def users
  @attributes[:users]
end

#watermark_documentsObject

boolean - Watermark enabled?



248
249
250
# File 'lib/files.com/models/plan.rb', line 248

def watermark_documents
  @attributes[:watermark_documents]
end

#watermark_imagesObject

boolean - Watermark enabled?



253
254
255
# File 'lib/files.com/models/plan.rb', line 253

def watermark_images
  @attributes[:watermark_images]
end

#webhooksObject

boolean - Webhooks enabled?



258
259
260
# File 'lib/files.com/models/plan.rb', line 258

def webhooks
  @attributes[:webhooks]
end

#webhooks_snsObject

boolean - Webhook SNS integration enabled?



263
264
265
# File 'lib/files.com/models/plan.rb', line 263

def webhooks_sns
  @attributes[:webhooks_sns]
end

#whitelabelObject

boolean - Whitelabel site?



268
269
270
# File 'lib/files.com/models/plan.rb', line 268

def whitelabel
  @attributes[:whitelabel]
end