files.com 1.0.83 → 1.0.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +19 -1
  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/remote_server.md +24 -4
  17. data/docs/request.md +6 -25
  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/remote_server.rb +45 -0
  41. data/lib/files.com/models/request.rb +15 -28
  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
@@ -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.83
4
+ version: 1.0.88
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-16 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