files.com 1.0.95 → 1.0.96

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc5f76212030802af876083085e7dbf117080280c28defd1ccb0eb256cc22ebb
4
- data.tar.gz: d542420f40b41fea8cb18d1d7e0b3cc1390134702c190d46a299a535542c21ac
3
+ metadata.gz: 485dc4c0f9287f1c84e8a1191309a20e544d8b12288a1ffb7976ede59b3f1dc2
4
+ data.tar.gz: 85edd613267d4a44d1da0649fce06d6f0df8eede638da01141a90a37b7886329
5
5
  SHA512:
6
- metadata.gz: d8936aa2ae6ed35bee4ebab6486653c92ddf4bc6afdd00784a2d81c19809120a72853f085c087e4aeace4309c2d4cbb80069522755352a1819b0d740d60be9a4
7
- data.tar.gz: 4764cac725ab63104b7eb866d2a1aa4933a02c5591908c45ba480f172647b49b516a670a7f2ed8107fe33eecbd17150cf534c9042db5e5abaf5879e84bfa4e40
6
+ metadata.gz: 72bd5d7f069551773584f482ac73de300d16025764e08d6f80a9e4a9584bbaf2cddb33e8a952a28b1909c2d333c23b2bedfc8f863e2b5e6f228fb796532e2dab
7
+ data.tar.gz: 11d4d37f6cf87b7e2335e323fc4c2e18de2f463e2b3056efcae22b20ac7fb1935cb53e6f708b61b9dd2a8f38a56512855171ed63b162ab26146b65ad408dc9f9
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.95
1
+ 1.0.96
@@ -0,0 +1,41 @@
1
+ # BundleRecipient
2
+
3
+ ## Example BundleRecipient Object
4
+
5
+ ```
6
+ {
7
+ "company": "Acme Inc.",
8
+ "name": "John Doe",
9
+ "note": "Some note.",
10
+ "recipient": "john.doe@example.com",
11
+ "sent_at": "2000-01-01T01:00:00Z"
12
+ }
13
+ ```
14
+
15
+ * `company` (string): The recipient's company.
16
+ * `name` (string): The recipient's name.
17
+ * `note` (string): A note sent to the recipient with the bundle.
18
+ * `recipient` (string): The recipient's email address.
19
+ * `sent_at` (date-time): When the Bundle was shared with this recipient.
20
+
21
+
22
+ ---
23
+
24
+ ## List Bundle Recipients
25
+
26
+ ```
27
+ Files::BundleRecipient.list(
28
+ user_id: 1,
29
+ page: 1,
30
+ per_page: 1,
31
+ bundle_id: 1
32
+ )
33
+ ```
34
+
35
+ ### Parameters
36
+
37
+ * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
38
+ * `page` (int64): Current page number.
39
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
40
+ * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
41
+ * `bundle_id` (int64): Required - List recipients for the bundle with this ID.
@@ -0,0 +1,41 @@
1
+ # SettingsChange
2
+
3
+ ## Example SettingsChange Object
4
+
5
+ ```
6
+ {
7
+ "change_details": "{ domain: [\"olddomain.com', \"newdomain.com\"] }",
8
+ "created_at": "2000-01-01T01:00:00Z",
9
+ "user_id": 1
10
+ }
11
+ ```
12
+
13
+ * `change_details` (object): Specifics on what changed.
14
+ * `created_at` (date-time): The time this change was made
15
+ * `user_id` (int64): The user id responsible for this change
16
+
17
+
18
+ ---
19
+
20
+ ## List Settings Changes
21
+
22
+ ```
23
+ Files::SettingsChange.list(
24
+ page: 1,
25
+ per_page: 1
26
+ )
27
+ ```
28
+
29
+ ### Parameters
30
+
31
+ * `page` (int64): Current page number.
32
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
33
+ * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
34
+ * `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.
35
+ * `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`, `api_key_id`, `created_at` or `user_id`.
36
+ * `filter` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `api_key_id` and `user_id`.
37
+ * `filter_gt` (object): If set, return records where the specifiied field is greater than the supplied value. Valid fields are `api_key_id` and `user_id`.
38
+ * `filter_gteq` (object): If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `api_key_id` and `user_id`.
39
+ * `filter_like` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `api_key_id` and `user_id`.
40
+ * `filter_lt` (object): If set, return records where the specifiied field is less than the supplied value. Valid fields are `api_key_id` and `user_id`.
41
+ * `filter_lteq` (object): If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `api_key_id` and `user_id`.
@@ -36,6 +36,7 @@ require "files.com/models/automation"
36
36
  require "files.com/models/behavior"
37
37
  require "files.com/models/bundle"
38
38
  require "files.com/models/bundle_download"
39
+ require "files.com/models/bundle_recipient"
39
40
  require "files.com/models/clickwrap"
40
41
  require "files.com/models/dns_record"
41
42
  require "files.com/models/errors"
@@ -69,6 +70,7 @@ require "files.com/models/public_key"
69
70
  require "files.com/models/remote_server"
70
71
  require "files.com/models/request"
71
72
  require "files.com/models/session"
73
+ require "files.com/models/settings_change"
72
74
  require "files.com/models/site"
73
75
  require "files.com/models/sso_strategy"
74
76
  require "files.com/models/status"
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class BundleRecipient
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # string - The recipient's company.
13
+ def company
14
+ @attributes[:company]
15
+ end
16
+
17
+ # string - The recipient's name.
18
+ def name
19
+ @attributes[:name]
20
+ end
21
+
22
+ # string - A note sent to the recipient with the bundle.
23
+ def note
24
+ @attributes[:note]
25
+ end
26
+
27
+ # string - The recipient's email address.
28
+ def recipient
29
+ @attributes[:recipient]
30
+ end
31
+
32
+ # date-time - When the Bundle was shared with this recipient.
33
+ def sent_at
34
+ @attributes[:sent_at]
35
+ end
36
+
37
+ # Parameters:
38
+ # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
39
+ # page - int64 - Current page number.
40
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
41
+ # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
42
+ # bundle_id (required) - int64 - List recipients for the bundle with this ID.
43
+ def self.list(params = {}, options = {})
44
+ raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
45
+ raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
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)
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: bundle_id must be an Integer") if params.dig(:bundle_id) and !params.dig(:bundle_id).is_a?(Integer)
49
+ raise MissingParameterError.new("Parameter missing: bundle_id") unless params.dig(:bundle_id)
50
+
51
+ response, options = Api.send_request("/bundle_recipients", :get, params, options)
52
+ response.data.map do |entity_data|
53
+ BundleRecipient.new(entity_data, options)
54
+ end
55
+ end
56
+
57
+ def self.all(params = {}, options = {})
58
+ list(params, options)
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class SettingsChange
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # object - Specifics on what changed.
13
+ def change_details
14
+ @attributes[:change_details]
15
+ end
16
+
17
+ # date-time - The time this change was made
18
+ def created_at
19
+ @attributes[:created_at]
20
+ end
21
+
22
+ # int64 - The user id responsible for this change
23
+ def user_id
24
+ @attributes[:user_id]
25
+ end
26
+
27
+ # Parameters:
28
+ # page - int64 - Current page number.
29
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
30
+ # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
31
+ # 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.
32
+ # 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`, `api_key_id`, `created_at` or `user_id`.
33
+ # filter - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `api_key_id` and `user_id`.
34
+ # filter_gt - object - If set, return records where the specifiied field is greater than the supplied value. Valid fields are `api_key_id` and `user_id`.
35
+ # filter_gteq - object - If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `api_key_id` and `user_id`.
36
+ # filter_like - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `api_key_id` and `user_id`.
37
+ # filter_lt - object - If set, return records where the specifiied field is less than the supplied value. Valid fields are `api_key_id` and `user_id`.
38
+ # filter_lteq - object - If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `api_key_id` and `user_id`.
39
+ def self.list(params = {}, options = {})
40
+ raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
41
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
42
+ raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
43
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
44
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
45
+ raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params.dig(:filter) and !params.dig(:filter).is_a?(Hash)
46
+ raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params.dig(:filter_gt) and !params.dig(:filter_gt).is_a?(Hash)
47
+ raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params.dig(:filter_gteq) and !params.dig(:filter_gteq).is_a?(Hash)
48
+ raise InvalidParameterError.new("Bad parameter: filter_like must be an Hash") if params.dig(:filter_like) and !params.dig(:filter_like).is_a?(Hash)
49
+ raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params.dig(:filter_lt) and !params.dig(:filter_lt).is_a?(Hash)
50
+ raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params.dig(:filter_lteq) and !params.dig(:filter_lteq).is_a?(Hash)
51
+
52
+ List.new(SettingsChange, params) do
53
+ Api.send_request("/settings_changes", :get, params, options)
54
+ end
55
+ end
56
+
57
+ def self.all(params = {}, options = {})
58
+ list(params, options)
59
+ end
60
+ end
61
+ end
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.95
4
+ version: 1.0.96
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-25 00:00:00.000000000 Z
11
+ date: 2020-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -95,6 +95,7 @@ files:
95
95
  - docs/behavior.md
96
96
  - docs/bundle.md
97
97
  - docs/bundle_download.md
98
+ - docs/bundle_recipient.md
98
99
  - docs/clickwrap.md
99
100
  - docs/dns_record.md
100
101
  - docs/errors.md
@@ -129,6 +130,7 @@ files:
129
130
  - docs/remote_server.md
130
131
  - docs/request.md
131
132
  - docs/session.md
133
+ - docs/settings_change.md
132
134
  - docs/site.md
133
135
  - docs/sso_strategy.md
134
136
  - docs/status.md
@@ -154,6 +156,7 @@ files:
154
156
  - lib/files.com/models/behavior.rb
155
157
  - lib/files.com/models/bundle.rb
156
158
  - lib/files.com/models/bundle_download.rb
159
+ - lib/files.com/models/bundle_recipient.rb
157
160
  - lib/files.com/models/clickwrap.rb
158
161
  - lib/files.com/models/dir.rb
159
162
  - lib/files.com/models/dns_record.rb
@@ -189,6 +192,7 @@ files:
189
192
  - lib/files.com/models/remote_server.rb
190
193
  - lib/files.com/models/request.rb
191
194
  - lib/files.com/models/session.rb
195
+ - lib/files.com/models/settings_change.rb
192
196
  - lib/files.com/models/site.rb
193
197
  - lib/files.com/models/sso_strategy.rb
194
198
  - lib/files.com/models/status.rb