files.com 1.0.84 → 1.0.89

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/_VERSION +1 -1
  3. data/docs/api_key.md +13 -1
  4. data/docs/app.md +57 -0
  5. data/docs/automation.md +9 -1
  6. data/docs/behavior.md +30 -14
  7. data/docs/bundle.md +8 -0
  8. data/docs/file.md +0 -4
  9. data/docs/group.md +8 -0
  10. data/docs/history.md +16 -0
  11. data/docs/ip_address.md +18 -0
  12. data/docs/message.md +11 -11
  13. data/docs/notification.md +10 -2
  14. data/docs/permission.md +11 -3
  15. data/docs/public_ip_address.md +13 -0
  16. data/docs/request.md +6 -25
  17. data/docs/session.md +2 -2
  18. data/docs/site.md +4 -0
  19. data/docs/style.md +1 -1
  20. data/docs/usage_daily_snapshot.md +8 -0
  21. data/docs/user.md +16 -2
  22. data/lib/files.com.rb +2 -0
  23. data/lib/files.com/models/api_key.rb +30 -4
  24. data/lib/files.com/models/app.rb +101 -0
  25. data/lib/files.com/models/automation.rb +19 -4
  26. data/lib/files.com/models/behavior.rb +53 -23
  27. data/lib/files.com/models/bundle.rb +19 -4
  28. data/lib/files.com/models/file.rb +7 -11
  29. data/lib/files.com/models/file_action.rb +6 -6
  30. data/lib/files.com/models/file_comment.rb +1 -1
  31. data/lib/files.com/models/folder.rb +2 -2
  32. data/lib/files.com/models/group.rb +18 -3
  33. data/lib/files.com/models/history.rb +43 -16
  34. data/lib/files.com/models/ip_address.rb +15 -0
  35. data/lib/files.com/models/lock.rb +4 -4
  36. data/lib/files.com/models/message.rb +5 -5
  37. data/lib/files.com/models/notification.rb +20 -5
  38. data/lib/files.com/models/permission.rb +21 -6
  39. data/lib/files.com/models/public_ip_address.rb +22 -0
  40. data/lib/files.com/models/request.rb +15 -28
  41. data/lib/files.com/models/session.rb +1 -1
  42. data/lib/files.com/models/site.rb +6 -0
  43. data/lib/files.com/models/style.rb +8 -8
  44. data/lib/files.com/models/usage_daily_snapshot.rb +18 -3
  45. data/lib/files.com/models/user.rb +30 -5
  46. metadata +6 -2
@@ -156,11 +156,19 @@ module Files
156
156
  end
157
157
 
158
158
  # Parameters:
159
- # user_id - int64 - Show notifications for this User ID.
159
+ # user_id - int64 - DEPRECATED: Show notifications for this User ID. Use `filter[user_id]` instead.
160
160
  # page - int64 - Current page number.
161
161
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
162
162
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
163
- # group_id - int64 - Show notifications for this Group ID.
163
+ # cursor - string - Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
164
+ # sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `site_id`, `path`, `user_id` or `group_id`.
165
+ # filter - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `user_id`, `group_id` or `path`.
166
+ # filter_gt - object - If set, return records where the specifiied field is greater than the supplied value. Valid fields are `user_id`, `group_id` or `path`.
167
+ # filter_gteq - object - If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `user_id`, `group_id` or `path`.
168
+ # filter_like - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `user_id`, `group_id` or `path`.
169
+ # filter_lt - object - If set, return records where the specifiied field is less than the supplied value. Valid fields are `user_id`, `group_id` or `path`.
170
+ # filter_lteq - object - If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `user_id`, `group_id` or `path`.
171
+ # group_id - int64 - DEPRECATED: Show notifications for this Group ID. Use `filter[group_id]` instead.
164
172
  # path - string - Show notifications for this Path.
165
173
  # include_ancestors - boolean - If `include_ancestors` is `true` and `path` is specified, include notifications for any parent paths. Ignored if `path` is not specified.
166
174
  def self.list(params = {}, options = {})
@@ -168,12 +176,19 @@ module Files
168
176
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
169
177
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
170
178
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
179
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
180
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
181
+ raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params.dig(:filter) and !params.dig(:filter).is_a?(Hash)
182
+ raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params.dig(:filter_gt) and !params.dig(:filter_gt).is_a?(Hash)
183
+ raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params.dig(:filter_gteq) and !params.dig(:filter_gteq).is_a?(Hash)
184
+ raise InvalidParameterError.new("Bad parameter: filter_like must be an Hash") if params.dig(:filter_like) and !params.dig(:filter_like).is_a?(Hash)
185
+ raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params.dig(:filter_lt) and !params.dig(:filter_lt).is_a?(Hash)
186
+ raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params.dig(:filter_lteq) and !params.dig(:filter_lteq).is_a?(Hash)
171
187
  raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if params.dig(:group_id) and !params.dig(:group_id).is_a?(Integer)
172
188
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
173
189
 
174
- response, options = Api.send_request("/notifications", :get, params, options)
175
- response.data.map do |entity_data|
176
- Notification.new(entity_data, options)
190
+ List.new(Notification, params) do
191
+ Api.send_request("/notifications", :get, params, options)
177
192
  end
178
193
  end
179
194
 
@@ -94,9 +94,17 @@ module Files
94
94
  # page - int64 - Current page number.
95
95
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
96
96
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
97
- # path - string - Permission path. If provided, will scope permissions to this path.
98
- # group_id - string - Group ID. If provided, will scope permissions to this group.
99
- # user_id - string - User ID. If provided, will scope permissions to this user.
97
+ # cursor - string - Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
98
+ # sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `deleted_at`, `group_id`, `path`, `user_id` or `permission`.
99
+ # filter - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`.
100
+ # filter_gt - object - If set, return records where the specifiied field is greater than the supplied value. Valid fields are `group_id`, `user_id` or `path`.
101
+ # filter_gteq - object - If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`.
102
+ # filter_like - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`.
103
+ # filter_lt - object - If set, return records where the specifiied field is less than the supplied value. Valid fields are `group_id`, `user_id` or `path`.
104
+ # filter_lteq - object - If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`.
105
+ # path - string - DEPRECATED: Permission path. If provided, will scope permissions to this path. Use `filter[path]` instead.
106
+ # group_id - string - DEPRECATED: Group ID. If provided, will scope permissions to this group. Use `filter[group_id]` instead.`
107
+ # user_id - string - DEPRECATED: User ID. If provided, will scope permissions to this user. Use `filter[user_id]` instead.`
100
108
  # include_groups - boolean - If searching by user or group, also include user's permissions that are inherited from its groups?
101
109
  def self.list(path, params = {}, options = {})
102
110
  params ||= {}
@@ -104,13 +112,20 @@ module Files
104
112
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
105
113
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
106
114
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
115
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
116
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
117
+ raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params.dig(:filter) and !params.dig(:filter).is_a?(Hash)
118
+ raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params.dig(:filter_gt) and !params.dig(:filter_gt).is_a?(Hash)
119
+ raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params.dig(:filter_gteq) and !params.dig(:filter_gteq).is_a?(Hash)
120
+ raise InvalidParameterError.new("Bad parameter: filter_like must be an Hash") if params.dig(:filter_like) and !params.dig(:filter_like).is_a?(Hash)
121
+ raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params.dig(:filter_lt) and !params.dig(:filter_lt).is_a?(Hash)
122
+ raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params.dig(:filter_lteq) and !params.dig(:filter_lteq).is_a?(Hash)
107
123
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
108
124
  raise InvalidParameterError.new("Bad parameter: group_id must be an String") if params.dig(:group_id) and !params.dig(:group_id).is_a?(String)
109
125
  raise InvalidParameterError.new("Bad parameter: user_id must be an String") if params.dig(:user_id) and !params.dig(:user_id).is_a?(String)
110
126
 
111
- response, options = Api.send_request("/permissions", :get, params, options)
112
- response.data.map do |entity_data|
113
- Permission.new(entity_data, options)
127
+ List.new(Permission, params) do
128
+ Api.send_request("/permissions", :get, params, options)
114
129
  end
115
130
  end
116
131
 
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class PublicIpAddress
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # string - The public IP address.
13
+ def ip_address
14
+ @attributes[:ip_address]
15
+ end
16
+
17
+ # string - The name of the frontend server.
18
+ def server_name
19
+ @attributes[:server_name]
20
+ end
21
+ end
22
+ end
@@ -81,25 +81,6 @@ module Files
81
81
  @attributes[:group_ids] = value
82
82
  end
83
83
 
84
- # List Requests
85
- #
86
- # Parameters:
87
- # page - int64 - Current page number.
88
- # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
89
- # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
90
- # mine - boolean - Only show requests of the current user? (Defaults to true if current user is not a site admin.)
91
- def folders(params = {})
92
- params ||= {}
93
- params[:path] = @attributes[:path]
94
- raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
95
- raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
96
- raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
97
- raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
98
- raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
99
-
100
- Api.send_request("/requests/folders/#{Addressable::URI.encode_component(params[:path])}", :get, params, @options)
101
- end
102
-
103
84
  def save
104
85
  if @attributes[:path]
105
86
  raise NotImplementedError.new("The Request object doesn't support updates.")
@@ -113,6 +94,8 @@ module Files
113
94
  # page - int64 - Current page number.
114
95
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
115
96
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
97
+ # cursor - string - Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
98
+ # sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `site_id`, `folder_id` or `destination`.
116
99
  # mine - boolean - Only show requests of the current user? (Defaults to true if current user is not a site admin.)
117
100
  # path - string - Path to show requests for. If omitted, shows all paths. Send `/` to represent the root directory.
118
101
  def self.list(path, params = {}, options = {})
@@ -121,11 +104,12 @@ module Files
121
104
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
122
105
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
123
106
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
107
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
108
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
124
109
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
125
110
 
126
- response, options = Api.send_request("/requests", :get, params, options)
127
- response.data.map do |entity_data|
128
- Request.new(entity_data, options)
111
+ List.new(Request, params) do
112
+ Api.send_request("/requests", :get, params, options)
129
113
  end
130
114
  end
131
115
 
@@ -133,24 +117,27 @@ module Files
133
117
  list(path, params, options)
134
118
  end
135
119
 
136
- # List Requests
137
- #
138
120
  # Parameters:
139
121
  # page - int64 - Current page number.
140
122
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
141
123
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
124
+ # cursor - string - Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
125
+ # sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `site_id`, `folder_id` or `destination`.
142
126
  # mine - boolean - Only show requests of the current user? (Defaults to true if current user is not a site admin.)
143
- def self.folders(path, params = {}, options = {})
127
+ # path (required) - string - Path to show requests for. If omitted, shows all paths. Send `/` to represent the root directory.
128
+ def self.find_folder(path, params = {}, options = {})
144
129
  params ||= {}
145
130
  params[:path] = path
146
131
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
147
132
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
148
133
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
134
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
135
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
149
136
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
137
+ raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
150
138
 
151
- response, options = Api.send_request("/requests/folders/#{Addressable::URI.encode_component(params[:path])}", :get, params, options)
152
- response.data.map do |entity_data|
153
- Request.new(entity_data, options)
139
+ List.new(Request, params) do
140
+ Api.send_request("/requests/folders/#{params[:path]}", :get, params, options)
154
141
  end
155
142
  end
156
143
 
@@ -13,7 +13,7 @@ module Files
13
13
  @options = options || {}
14
14
  end
15
15
 
16
- # int64 - Session ID
16
+ # string - Session ID
17
17
  def id
18
18
  @attributes[:id]
19
19
  end
@@ -309,6 +309,11 @@ module Files
309
309
  @attributes[:next_billing_date]
310
310
  end
311
311
 
312
+ # boolean - Allow users to use Office for the web?
313
+ def office_integration_available
314
+ @attributes[:office_integration_available]
315
+ end
316
+
312
317
  # boolean - Use servers in the USA only?
313
318
  def opt_out_global
314
319
  @attributes[:opt_out_global]
@@ -585,6 +590,7 @@ module Files
585
590
  # desktop_app_session_lifetime - int64 - Desktop app session lifetime (in hours)
586
591
  # 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.
587
592
  # welcome_screen - string - Does the welcome screen appear?
593
+ # office_integration_available - boolean - Allow users to use Office for the web?
588
594
  # session_expiry - double - Session expiry in hours
589
595
  # ssl_required - boolean - Is SSL required? Disabling this is insecure.
590
596
  # tls_disabled - boolean - Is TLS disabled(site setting)?
@@ -64,7 +64,7 @@ module Files
64
64
  raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
65
65
  raise MissingParameterError.new("Parameter missing: file") unless params.dig(:file)
66
66
 
67
- Api.send_request("/styles/#{Addressable::URI.encode_component(params[:path])}", :patch, params, @options)
67
+ Api.send_request("/styles/#{@attributes[:path]}", :patch, params, @options)
68
68
  end
69
69
 
70
70
  def delete(params = {})
@@ -74,7 +74,7 @@ module Files
74
74
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
75
75
  raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
76
76
 
77
- Api.send_request("/styles/#{Addressable::URI.encode_component(params[:path])}", :delete, params, @options)
77
+ Api.send_request("/styles/#{@attributes[:path]}", :delete, params, @options)
78
78
  end
79
79
 
80
80
  def destroy(params = {})
@@ -87,18 +87,18 @@ module Files
87
87
 
88
88
  # Parameters:
89
89
  # path (required) - string - Style path.
90
- def self.list(path, params = {}, options = {})
90
+ def self.find(path, params = {}, options = {})
91
91
  params ||= {}
92
92
  params[:path] = path
93
93
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
94
94
  raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
95
95
 
96
- response, options = Api.send_request("/styles/#{Addressable::URI.encode_component(params[:path])}", :get, params, options)
96
+ response, options = Api.send_request("/styles/#{params[:path]}", :get, params, options)
97
97
  Style.new(response.data, options)
98
98
  end
99
99
 
100
- def self.all(path, params = {}, options = {})
101
- list(path, params, options)
100
+ def self.get(path, params = {}, options = {})
101
+ find(path, params, options)
102
102
  end
103
103
 
104
104
  # Parameters:
@@ -110,7 +110,7 @@ module Files
110
110
  raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
111
111
  raise MissingParameterError.new("Parameter missing: file") unless params.dig(:file)
112
112
 
113
- response, options = Api.send_request("/styles/#{Addressable::URI.encode_component(params[:path])}", :patch, params, options)
113
+ response, options = Api.send_request("/styles/#{params[:path]}", :patch, params, options)
114
114
  Style.new(response.data, options)
115
115
  end
116
116
 
@@ -120,7 +120,7 @@ module Files
120
120
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
121
121
  raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
122
122
 
123
- response, _options = Api.send_request("/styles/#{Addressable::URI.encode_component(params[:path])}", :delete, params, options)
123
+ response, _options = Api.send_request("/styles/#{params[:path]}", :delete, params, options)
124
124
  response.data
125
125
  end
126
126
 
@@ -33,14 +33,29 @@ module Files
33
33
  # page - int64 - Current page number.
34
34
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
35
35
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
36
+ # cursor - string - Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
37
+ # sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `site_id`, `date` or `usage_snapshot_id`.
38
+ # filter - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`.
39
+ # filter_gt - object - If set, return records where the specifiied field is greater than the supplied value. Valid fields are `date` and `usage_snapshot_id`.
40
+ # filter_gteq - object - If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`.
41
+ # filter_like - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`.
42
+ # filter_lt - object - If set, return records where the specifiied field is less than the supplied value. Valid fields are `date` and `usage_snapshot_id`.
43
+ # filter_lteq - object - If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`.
36
44
  def self.list(params = {}, options = {})
37
45
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
38
46
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
39
47
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
48
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
49
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
50
+ raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params.dig(:filter) and !params.dig(:filter).is_a?(Hash)
51
+ raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params.dig(:filter_gt) and !params.dig(:filter_gt).is_a?(Hash)
52
+ raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params.dig(:filter_gteq) and !params.dig(:filter_gteq).is_a?(Hash)
53
+ raise InvalidParameterError.new("Bad parameter: filter_like must be an Hash") if params.dig(:filter_like) and !params.dig(:filter_like).is_a?(Hash)
54
+ raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params.dig(:filter_lt) and !params.dig(:filter_lt).is_a?(Hash)
55
+ raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params.dig(:filter_lteq) and !params.dig(:filter_lteq).is_a?(Hash)
40
56
 
41
- response, options = Api.send_request("/usage_daily_snapshots", :get, params, options)
42
- response.data.map do |entity_data|
43
- UsageDailySnapshot.new(entity_data, options)
57
+ List.new(UsageDailySnapshot, params) do
58
+ Api.send_request("/usage_daily_snapshots", :get, params, options)
44
59
  end
45
60
  end
46
61
 
@@ -239,6 +239,15 @@ module Files
239
239
  @attributes[:notification_daily_send_time] = value
240
240
  end
241
241
 
242
+ # boolean - Enable integration with Office for the web?
243
+ def office_integration_enabled
244
+ @attributes[:office_integration_enabled]
245
+ end
246
+
247
+ def office_integration_enabled=(value)
248
+ @attributes[:office_integration_enabled] = value
249
+ end
250
+
242
251
  # date-time - Last time the user's password was set
243
252
  def password_set_at
244
253
  @attributes[:password_set_at]
@@ -542,6 +551,7 @@ module Files
542
551
  # notification_daily_send_time - int64 - Hour of the day at which daily notifications should be sent. Can be in range 0 to 23
543
552
  # name - string - User's full name
544
553
  # notes - string - Any internal notes on the user
554
+ # office_integration_enabled - boolean - Enable integration with Office for the web?
545
555
  # password_validity_days - int64 - Number of days to allow user to use the same password
546
556
  # receive_admin_alerts - boolean - Should the user receive admin alerts such a certificate expiration notifications and overages?
547
557
  # require_password_change - boolean - Is a password change required upon next user login?
@@ -615,6 +625,14 @@ module Files
615
625
  # page - int64 - Current page number.
616
626
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
617
627
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
628
+ # cursor - string - Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
629
+ # sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `active`, `master_admin`, `site_id`, `authenticate_until`, `email`, `last_desktop_login_at`, `last_login_at`, `username`, `notes`, `site_admin`, `receive_admin_alerts`, `allowed_ips`, `password_validity_days`, `ssl_required` or `not_site_admin`.
630
+ # filter - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `username`, `email`, `notes`, `site_admin`, `allowed_ips`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
631
+ # filter_gt - object - If set, return records where the specifiied field is greater than the supplied value. Valid fields are `username`, `email`, `notes`, `site_admin`, `allowed_ips`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
632
+ # filter_gteq - object - If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `username`, `email`, `notes`, `site_admin`, `allowed_ips`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
633
+ # filter_like - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `username`, `email`, `notes`, `site_admin`, `allowed_ips`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
634
+ # filter_lt - object - If set, return records where the specifiied field is less than the supplied value. Valid fields are `username`, `email`, `notes`, `site_admin`, `allowed_ips`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
635
+ # filter_lteq - object - If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `username`, `email`, `notes`, `site_admin`, `allowed_ips`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
618
636
  # ids - string - comma-separated list of User IDs
619
637
  # q[username] - string - List users matching username.
620
638
  # q[email] - string - List users matching email.
@@ -624,18 +642,23 @@ module Files
624
642
  # q[password_validity_days] - string - If set, list only users with overridden password validity days setting.
625
643
  # q[ssl_required] - string - If set, list only users with overridden SSL required setting.
626
644
  # search - string - Searches for partial matches of name, username, or email.
627
- # sort_by[last_login_at] - string - If set, sort users by 'last_login_at' in either 'asc' or 'desc' direction
628
- # sort_by[authenticate_until] - string - If set, sort users by 'authenticate_until' in either 'asc' or 'desc' direction
629
645
  def self.list(params = {}, options = {})
630
646
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
631
647
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
632
648
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
649
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
650
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
651
+ raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params.dig(:filter) and !params.dig(:filter).is_a?(Hash)
652
+ raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params.dig(:filter_gt) and !params.dig(:filter_gt).is_a?(Hash)
653
+ raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params.dig(:filter_gteq) and !params.dig(:filter_gteq).is_a?(Hash)
654
+ raise InvalidParameterError.new("Bad parameter: filter_like must be an Hash") if params.dig(:filter_like) and !params.dig(:filter_like).is_a?(Hash)
655
+ raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params.dig(:filter_lt) and !params.dig(:filter_lt).is_a?(Hash)
656
+ raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params.dig(:filter_lteq) and !params.dig(:filter_lteq).is_a?(Hash)
633
657
  raise InvalidParameterError.new("Bad parameter: ids must be an String") if params.dig(:ids) and !params.dig(:ids).is_a?(String)
634
658
  raise InvalidParameterError.new("Bad parameter: search must be an String") if params.dig(:search) and !params.dig(:search).is_a?(String)
635
659
 
636
- response, options = Api.send_request("/users", :get, params, options)
637
- response.data.map do |entity_data|
638
- User.new(entity_data, options)
660
+ List.new(User, params) do
661
+ Api.send_request("/users", :get, params, options)
639
662
  end
640
663
  end
641
664
 
@@ -686,6 +709,7 @@ module Files
686
709
  # notification_daily_send_time - int64 - Hour of the day at which daily notifications should be sent. Can be in range 0 to 23
687
710
  # name - string - User's full name
688
711
  # notes - string - Any internal notes on the user
712
+ # office_integration_enabled - boolean - Enable integration with Office for the web?
689
713
  # password_validity_days - int64 - Number of days to allow user to use the same password
690
714
  # receive_admin_alerts - boolean - Should the user receive admin alerts such a certificate expiration notifications and overages?
691
715
  # require_password_change - boolean - Is a password change required upon next user login?
@@ -788,6 +812,7 @@ module Files
788
812
  # notification_daily_send_time - int64 - Hour of the day at which daily notifications should be sent. Can be in range 0 to 23
789
813
  # name - string - User's full name
790
814
  # notes - string - Any internal notes on the user
815
+ # office_integration_enabled - boolean - Enable integration with Office for the web?
791
816
  # password_validity_days - int64 - Number of days to allow user to use the same password
792
817
  # receive_admin_alerts - boolean - Should the user receive admin alerts such a certificate expiration notifications and overages?
793
818
  # require_password_change - boolean - Is a password change required upon next user login?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files.com
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.84
4
+ version: 1.0.89
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-09 00:00:00.000000000 Z
11
+ date: 2020-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -87,6 +87,7 @@ files:
87
87
  - docs/account_line_item.md
88
88
  - docs/action.md
89
89
  - docs/api_key.md
90
+ - docs/app.md
90
91
  - docs/as2_key.md
91
92
  - docs/auto.md
92
93
  - docs/automation.md
@@ -122,6 +123,7 @@ files:
122
123
  - docs/permission.md
123
124
  - docs/preview.md
124
125
  - docs/project.md
126
+ - docs/public_ip_address.md
125
127
  - docs/public_key.md
126
128
  - docs/remote_server.md
127
129
  - docs/request.md
@@ -144,6 +146,7 @@ files:
144
146
  - lib/files.com/models/account_line_item.rb
145
147
  - lib/files.com/models/action.rb
146
148
  - lib/files.com/models/api_key.rb
149
+ - lib/files.com/models/app.rb
147
150
  - lib/files.com/models/as2_key.rb
148
151
  - lib/files.com/models/auto.rb
149
152
  - lib/files.com/models/automation.rb
@@ -180,6 +183,7 @@ files:
180
183
  - lib/files.com/models/permission.rb
181
184
  - lib/files.com/models/preview.rb
182
185
  - lib/files.com/models/project.rb
186
+ - lib/files.com/models/public_ip_address.rb
183
187
  - lib/files.com/models/public_key.rb
184
188
  - lib/files.com/models/remote_server.rb
185
189
  - lib/files.com/models/request.rb