files.com 1.1.334 → 1.1.335

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9488cfb5b22f57a1844d34b93def327e31405e10072458227754a4282ccd7bb
4
- data.tar.gz: ad460ec7456e52ae77ab04bfb2ba4f3ac6d4acad893f9c6e5e8db19efe87148d
3
+ metadata.gz: '069ce0338ba864f9b384c60459108b58f30319121283d230d73258e8845cbd4a'
4
+ data.tar.gz: 0d3638dbf344e7471f8ea4a35a5b5ef9f4bc06011784a532bb15089fbd0372f7
5
5
  SHA512:
6
- metadata.gz: 6b39d39032a8d48a88a8cef3c897e4ba0be8af21a526dc7783a86ab69eb493d18518d2f1bcfc186009ae700d16c61202e8dcd4f156617f2b0da06b7c68929004
7
- data.tar.gz: 111dc8e5298f71d990bd7923cb67680880872ce4dc94423935abadce07fa4df127d21ad68a4c73b2ae25feff86c5f76d3f02fef341f4e1561a6149beee8f5a3d
6
+ metadata.gz: 2425013e7e2a06c03e7bfb339fa0560a556ed4a24b8df6e9db634027e800921c0afb6716ac02a84d9d0645e8e6287689cab601ba233e1927697427586ea0a7c7
7
+ data.tar.gz: 17e33d86ab1726138963e01b3a3bde214faf4874d0d0321b142790c53b0277924a2dda230a36430b41dc2496a1050203406bbee8c949420c43253a324e8aec3f
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.334
1
+ 1.1.335
data/docs/partner.md ADDED
@@ -0,0 +1,158 @@
1
+ # Partner
2
+
3
+ ## Example Partner Object
4
+
5
+ ```
6
+ {
7
+ "allow_bypassing_2fa_policies": true,
8
+ "allow_credential_changes": true,
9
+ "allow_user_creation": true,
10
+ "id": 1,
11
+ "name": "Acme Corp",
12
+ "notes": "This is a note about the partner.",
13
+ "root_folder": "/AcmeCorp"
14
+ }
15
+ ```
16
+
17
+ * `allow_bypassing_2fa_policies` (boolean): Allow users created under this Partner to bypass Two-Factor Authentication policies.
18
+ * `allow_credential_changes` (boolean): Allow Partner Admins to change or reset credentials for users belonging to this Partner.
19
+ * `allow_user_creation` (boolean): Allow Partner Admins to create users.
20
+ * `id` (int64): The unique ID of the Partner.
21
+ * `name` (string): The name of the Partner.
22
+ * `notes` (string): Notes about this Partner.
23
+ * `root_folder` (string): The root folder path for this Partner.
24
+
25
+
26
+ ---
27
+
28
+ ## List Partners
29
+
30
+ ```
31
+ Files::Partner.list
32
+ ```
33
+
34
+ ### Parameters
35
+
36
+ * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
37
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
38
+ * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `name`.
39
+
40
+
41
+ ---
42
+
43
+ ## Show Partner
44
+
45
+ ```
46
+ Files::Partner.find(id)
47
+ ```
48
+
49
+ ### Parameters
50
+
51
+ * `id` (int64): Required - Partner ID.
52
+
53
+
54
+ ---
55
+
56
+ ## Create Partner
57
+
58
+ ```
59
+ Files::Partner.create(
60
+ allow_bypassing_2fa_policies: false,
61
+ allow_credential_changes: false,
62
+ allow_user_creation: false,
63
+ name: "Acme Corp",
64
+ notes: "This is a note about the partner.",
65
+ root_folder: "/AcmeCorp"
66
+ )
67
+ ```
68
+
69
+ ### Parameters
70
+
71
+ * `allow_bypassing_2fa_policies` (boolean): Allow users created under this Partner to bypass Two-Factor Authentication policies.
72
+ * `allow_credential_changes` (boolean): Allow Partner Admins to change or reset credentials for users belonging to this Partner.
73
+ * `allow_user_creation` (boolean): Allow Partner Admins to create users.
74
+ * `name` (string): The name of the Partner.
75
+ * `notes` (string): Notes about this Partner.
76
+ * `root_folder` (string): The root folder path for this Partner.
77
+
78
+
79
+ ---
80
+
81
+ ## Update Partner
82
+
83
+ ```
84
+ Files::Partner.update(id,
85
+ allow_bypassing_2fa_policies: false,
86
+ allow_credential_changes: false,
87
+ allow_user_creation: false,
88
+ name: "Acme Corp",
89
+ notes: "This is a note about the partner.",
90
+ root_folder: "/AcmeCorp"
91
+ )
92
+ ```
93
+
94
+ ### Parameters
95
+
96
+ * `id` (int64): Required - Partner ID.
97
+ * `allow_bypassing_2fa_policies` (boolean): Allow users created under this Partner to bypass Two-Factor Authentication policies.
98
+ * `allow_credential_changes` (boolean): Allow Partner Admins to change or reset credentials for users belonging to this Partner.
99
+ * `allow_user_creation` (boolean): Allow Partner Admins to create users.
100
+ * `name` (string): The name of the Partner.
101
+ * `notes` (string): Notes about this Partner.
102
+ * `root_folder` (string): The root folder path for this Partner.
103
+
104
+
105
+ ---
106
+
107
+ ## Delete Partner
108
+
109
+ ```
110
+ Files::Partner.delete(id)
111
+ ```
112
+
113
+ ### Parameters
114
+
115
+ * `id` (int64): Required - Partner ID.
116
+
117
+
118
+ ---
119
+
120
+ ## Update Partner
121
+
122
+ ```
123
+ partner = Files::Partner.find(id)
124
+
125
+ partner.update(
126
+ allow_bypassing_2fa_policies: false,
127
+ allow_credential_changes: false,
128
+ allow_user_creation: false,
129
+ name: "Acme Corp",
130
+ notes: "This is a note about the partner.",
131
+ root_folder: "/AcmeCorp"
132
+ )
133
+ ```
134
+
135
+ ### Parameters
136
+
137
+ * `id` (int64): Required - Partner ID.
138
+ * `allow_bypassing_2fa_policies` (boolean): Allow users created under this Partner to bypass Two-Factor Authentication policies.
139
+ * `allow_credential_changes` (boolean): Allow Partner Admins to change or reset credentials for users belonging to this Partner.
140
+ * `allow_user_creation` (boolean): Allow Partner Admins to create users.
141
+ * `name` (string): The name of the Partner.
142
+ * `notes` (string): Notes about this Partner.
143
+ * `root_folder` (string): The root folder path for this Partner.
144
+
145
+
146
+ ---
147
+
148
+ ## Delete Partner
149
+
150
+ ```
151
+ partner = Files::Partner.find(id)
152
+
153
+ partner.delete
154
+ ```
155
+
156
+ ### Parameters
157
+
158
+ * `id` (int64): Required - Partner ID.
data/docs/permission.md CHANGED
@@ -10,6 +10,7 @@
10
10
  "username": "user",
11
11
  "group_id": 1,
12
12
  "group_name": "example",
13
+ "partner_id": 1,
13
14
  "permission": "full",
14
15
  "recursive": true,
15
16
  "site_id": 1
@@ -22,6 +23,7 @@
22
23
  * `username` (string): Username (if applicable)
23
24
  * `group_id` (int64): Group ID
24
25
  * `group_name` (string): Group name (if applicable)
26
+ * `partner_id` (int64): Partner ID (if applicable)
25
27
  * `permission` (string): Permission type. See the table referenced in the documentation for an explanation of each permission.
26
28
  * `recursive` (boolean): Recursive: does this permission apply to subfolders?
27
29
  * `site_id` (int64): Site ID
@@ -36,6 +38,7 @@ Files::Permission.list(
36
38
  path: "example",
37
39
  include_groups: false,
38
40
  group_id: 1,
41
+ partner_id: 1,
39
42
  user_id: 1
40
43
  )
41
44
  ```
@@ -44,12 +47,13 @@ Files::Permission.list(
44
47
 
45
48
  * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
46
49
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
47
- * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `group_id`, `path`, `user_id` or `id`.
48
- * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `group_id` or `user_id`. Valid field combinations are `[ group_id, path ]`, `[ user_id, path ]`, `[ user_id, group_id ]` or `[ user_id, group_id, path ]`.
50
+ * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `group_id`, `path`, `user_id`, `partner_id` or `id`.
51
+ * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `group_id`, `partner_id` or `user_id`. Valid field combinations are `[ group_id, path ]`, `[ partner_id, path ]`, `[ user_id, path ]`, `[ user_id, group_id ]`, `[ user_id, group_id, path ]`, `[ user_id, group_id, partner_id ]` or `[ user_id, group_id, partner_id, path ]`.
49
52
  * `filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `path`.
50
53
  * `path` (string): Permission path. If provided, will scope all permissions(including upward) to this path.
51
54
  * `include_groups` (boolean): If searching by user or group, also include user's permissions that are inherited from its groups?
52
55
  * `group_id` (string):
56
+ * `partner_id` (string):
53
57
  * `user_id` (string):
54
58
 
55
59
 
@@ -63,6 +67,7 @@ Files::Permission.create(
63
67
  group_id: 1,
64
68
  permission: "full",
65
69
  recursive: false,
70
+ partner_id: 1,
66
71
  user_id: 1,
67
72
  username: "user",
68
73
  group_name: "example",
@@ -76,6 +81,7 @@ Files::Permission.create(
76
81
  * `group_id` (int64): Group ID. Provide `group_name` or `group_id`
77
82
  * `permission` (string): Permission type. Can be `admin`, `full`, `readonly`, `writeonly`, `list`, or `history`
78
83
  * `recursive` (boolean): Apply to subfolders recursively?
84
+ * `partner_id` (int64): Partner ID if this Permission belongs to a partner.
79
85
  * `user_id` (int64): User ID. Provide `username` or `user_id`
80
86
  * `username` (string): User username. Provide `username` or `user_id`
81
87
  * `group_name` (string): Group name. Provide `group_name` or `group_id`
data/docs/site.md CHANGED
@@ -259,6 +259,7 @@
259
259
  "notes": "Internal notes on this user.",
260
260
  "notification_daily_send_time": 18,
261
261
  "office_integration_enabled": true,
262
+ "partner_id": 1,
262
263
  "password_set_at": "2000-01-01T01:00:00Z",
263
264
  "password_validity_days": 1,
264
265
  "public_keys_count": 1,
data/docs/user.md CHANGED
@@ -46,6 +46,7 @@
46
46
  "notes": "Internal notes on this user.",
47
47
  "notification_daily_send_time": 18,
48
48
  "office_integration_enabled": true,
49
+ "partner_id": 1,
49
50
  "password_set_at": "2000-01-01T01:00:00Z",
50
51
  "password_validity_days": 1,
51
52
  "public_keys_count": 1,
@@ -116,6 +117,7 @@
116
117
  * `notes` (string): Any internal notes on the user
117
118
  * `notification_daily_send_time` (int64): Hour of the day at which daily notifications should be sent. Can be in range 0 to 23
118
119
  * `office_integration_enabled` (boolean): Enable integration with Office for the web?
120
+ * `partner_id` (int64): Partner ID if this user belongs to a Partner
119
121
  * `password_set_at` (date-time): Last time the user's password was set
120
122
  * `password_validity_days` (int64): Number of days to allow user to use the same password
121
123
  * `public_keys_count` (int64): Number of public keys associated with this user
@@ -224,6 +226,7 @@ Files::User.create(
224
226
  company: "ACME Corp.",
225
227
  notes: "Internal notes on this user.",
226
228
  office_integration_enabled: true,
229
+ partner_id: 1,
227
230
  password_validity_days: 1,
228
231
  readonly_site_admin: true,
229
232
  receive_admin_alerts: true,
@@ -277,6 +280,7 @@ Files::User.create(
277
280
  * `company` (string): User's company
278
281
  * `notes` (string): Any internal notes on the user
279
282
  * `office_integration_enabled` (boolean): Enable integration with Office for the web?
283
+ * `partner_id` (int64): Partner ID if this user belongs to a Partner
280
284
  * `password_validity_days` (int64): Number of days to allow user to use the same password
281
285
  * `readonly_site_admin` (boolean): Is the user an allowed to view all (non-billing) site configuration for this site?
282
286
  * `receive_admin_alerts` (boolean): Should the user receive admin alerts such a certificate expiration notifications and overages?
@@ -365,6 +369,7 @@ Files::User.update(id,
365
369
  company: "ACME Corp.",
366
370
  notes: "Internal notes on this user.",
367
371
  office_integration_enabled: true,
372
+ partner_id: 1,
368
373
  password_validity_days: 1,
369
374
  readonly_site_admin: true,
370
375
  receive_admin_alerts: true,
@@ -420,6 +425,7 @@ Files::User.update(id,
420
425
  * `company` (string): User's company
421
426
  * `notes` (string): Any internal notes on the user
422
427
  * `office_integration_enabled` (boolean): Enable integration with Office for the web?
428
+ * `partner_id` (int64): Partner ID if this user belongs to a Partner
423
429
  * `password_validity_days` (int64): Number of days to allow user to use the same password
424
430
  * `readonly_site_admin` (boolean): Is the user an allowed to view all (non-billing) site configuration for this site?
425
431
  * `receive_admin_alerts` (boolean): Should the user receive admin alerts such a certificate expiration notifications and overages?
@@ -533,6 +539,7 @@ user.update(
533
539
  company: "ACME Corp.",
534
540
  notes: "Internal notes on this user.",
535
541
  office_integration_enabled: true,
542
+ partner_id: 1,
536
543
  password_validity_days: 1,
537
544
  readonly_site_admin: true,
538
545
  receive_admin_alerts: true,
@@ -588,6 +595,7 @@ user.update(
588
595
  * `company` (string): User's company
589
596
  * `notes` (string): Any internal notes on the user
590
597
  * `office_integration_enabled` (boolean): Enable integration with Office for the web?
598
+ * `partner_id` (int64): Partner ID if this user belongs to a Partner
591
599
  * `password_validity_days` (int64): Number of days to allow user to use the same password
592
600
  * `readonly_site_admin` (boolean): Is the user an allowed to view all (non-billing) site configuration for this site?
593
601
  * `receive_admin_alerts` (boolean): Should the user receive admin alerts such a certificate expiration notifications and overages?
@@ -0,0 +1,206 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class Partner
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # boolean - Allow users created under this Partner to bypass Two-Factor Authentication policies.
13
+ def allow_bypassing_2fa_policies
14
+ @attributes[:allow_bypassing_2fa_policies]
15
+ end
16
+
17
+ def allow_bypassing_2fa_policies=(value)
18
+ @attributes[:allow_bypassing_2fa_policies] = value
19
+ end
20
+
21
+ # boolean - Allow Partner Admins to change or reset credentials for users belonging to this Partner.
22
+ def allow_credential_changes
23
+ @attributes[:allow_credential_changes]
24
+ end
25
+
26
+ def allow_credential_changes=(value)
27
+ @attributes[:allow_credential_changes] = value
28
+ end
29
+
30
+ # boolean - Allow Partner Admins to create users.
31
+ def allow_user_creation
32
+ @attributes[:allow_user_creation]
33
+ end
34
+
35
+ def allow_user_creation=(value)
36
+ @attributes[:allow_user_creation] = value
37
+ end
38
+
39
+ # int64 - The unique ID of the Partner.
40
+ def id
41
+ @attributes[:id]
42
+ end
43
+
44
+ def id=(value)
45
+ @attributes[:id] = value
46
+ end
47
+
48
+ # string - The name of the Partner.
49
+ def name
50
+ @attributes[:name]
51
+ end
52
+
53
+ def name=(value)
54
+ @attributes[:name] = value
55
+ end
56
+
57
+ # string - Notes about this Partner.
58
+ def notes
59
+ @attributes[:notes]
60
+ end
61
+
62
+ def notes=(value)
63
+ @attributes[:notes] = value
64
+ end
65
+
66
+ # string - The root folder path for this Partner.
67
+ def root_folder
68
+ @attributes[:root_folder]
69
+ end
70
+
71
+ def root_folder=(value)
72
+ @attributes[:root_folder] = value
73
+ end
74
+
75
+ # Parameters:
76
+ # allow_bypassing_2fa_policies - boolean - Allow users created under this Partner to bypass Two-Factor Authentication policies.
77
+ # allow_credential_changes - boolean - Allow Partner Admins to change or reset credentials for users belonging to this Partner.
78
+ # allow_user_creation - boolean - Allow Partner Admins to create users.
79
+ # name - string - The name of the Partner.
80
+ # notes - string - Notes about this Partner.
81
+ # root_folder - string - The root folder path for this Partner.
82
+ def update(params = {})
83
+ params ||= {}
84
+ params[:id] = @attributes[:id]
85
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
86
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
87
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
88
+ raise InvalidParameterError.new("Bad parameter: notes must be an String") if params[:notes] and !params[:notes].is_a?(String)
89
+ raise InvalidParameterError.new("Bad parameter: root_folder must be an String") if params[:root_folder] and !params[:root_folder].is_a?(String)
90
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
91
+
92
+ Api.send_request("/partners/#{@attributes[:id]}", :patch, params, @options)
93
+ end
94
+
95
+ def delete(params = {})
96
+ params ||= {}
97
+ params[:id] = @attributes[:id]
98
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
99
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
100
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
101
+
102
+ Api.send_request("/partners/#{@attributes[:id]}", :delete, params, @options)
103
+ end
104
+
105
+ def destroy(params = {})
106
+ delete(params)
107
+ nil
108
+ end
109
+
110
+ def save
111
+ if @attributes[:id]
112
+ new_obj = update(@attributes)
113
+ else
114
+ new_obj = Partner.create(@attributes, @options)
115
+ end
116
+
117
+ @attributes = new_obj.attributes
118
+ true
119
+ end
120
+
121
+ # Parameters:
122
+ # cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
123
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
124
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `name`.
125
+ def self.list(params = {}, options = {})
126
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
127
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
128
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
129
+
130
+ List.new(Partner, params) do
131
+ Api.send_request("/partners", :get, params, options)
132
+ end
133
+ end
134
+
135
+ def self.all(params = {}, options = {})
136
+ list(params, options)
137
+ end
138
+
139
+ # Parameters:
140
+ # id (required) - int64 - Partner ID.
141
+ def self.find(id, params = {}, options = {})
142
+ params ||= {}
143
+ params[:id] = id
144
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
145
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
146
+
147
+ response, options = Api.send_request("/partners/#{params[:id]}", :get, params, options)
148
+ Partner.new(response.data, options)
149
+ end
150
+
151
+ def self.get(id, params = {}, options = {})
152
+ find(id, params, options)
153
+ end
154
+
155
+ # Parameters:
156
+ # allow_bypassing_2fa_policies - boolean - Allow users created under this Partner to bypass Two-Factor Authentication policies.
157
+ # allow_credential_changes - boolean - Allow Partner Admins to change or reset credentials for users belonging to this Partner.
158
+ # allow_user_creation - boolean - Allow Partner Admins to create users.
159
+ # name - string - The name of the Partner.
160
+ # notes - string - Notes about this Partner.
161
+ # root_folder - string - The root folder path for this Partner.
162
+ def self.create(params = {}, options = {})
163
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
164
+ raise InvalidParameterError.new("Bad parameter: notes must be an String") if params[:notes] and !params[:notes].is_a?(String)
165
+ raise InvalidParameterError.new("Bad parameter: root_folder must be an String") if params[:root_folder] and !params[:root_folder].is_a?(String)
166
+
167
+ response, options = Api.send_request("/partners", :post, params, options)
168
+ Partner.new(response.data, options)
169
+ end
170
+
171
+ # Parameters:
172
+ # allow_bypassing_2fa_policies - boolean - Allow users created under this Partner to bypass Two-Factor Authentication policies.
173
+ # allow_credential_changes - boolean - Allow Partner Admins to change or reset credentials for users belonging to this Partner.
174
+ # allow_user_creation - boolean - Allow Partner Admins to create users.
175
+ # name - string - The name of the Partner.
176
+ # notes - string - Notes about this Partner.
177
+ # root_folder - string - The root folder path for this Partner.
178
+ def self.update(id, params = {}, options = {})
179
+ params ||= {}
180
+ params[:id] = id
181
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
182
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
183
+ raise InvalidParameterError.new("Bad parameter: notes must be an String") if params[:notes] and !params[:notes].is_a?(String)
184
+ raise InvalidParameterError.new("Bad parameter: root_folder must be an String") if params[:root_folder] and !params[:root_folder].is_a?(String)
185
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
186
+
187
+ response, options = Api.send_request("/partners/#{params[:id]}", :patch, params, options)
188
+ Partner.new(response.data, options)
189
+ end
190
+
191
+ def self.delete(id, params = {}, options = {})
192
+ params ||= {}
193
+ params[:id] = id
194
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
195
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
196
+
197
+ Api.send_request("/partners/#{params[:id]}", :delete, params, options)
198
+ nil
199
+ end
200
+
201
+ def self.destroy(id, params = {}, options = {})
202
+ delete(id, params, options)
203
+ nil
204
+ end
205
+ end
206
+ end
@@ -63,6 +63,15 @@ module Files
63
63
  @attributes[:group_name] = value
64
64
  end
65
65
 
66
+ # int64 - Partner ID (if applicable)
67
+ def partner_id
68
+ @attributes[:partner_id]
69
+ end
70
+
71
+ def partner_id=(value)
72
+ @attributes[:partner_id] = value
73
+ end
74
+
66
75
  # string - Permission type. See the table referenced in the documentation for an explanation of each permission.
67
76
  def permission
68
77
  @attributes[:permission]
@@ -119,12 +128,13 @@ module Files
119
128
  # Parameters:
120
129
  # cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
121
130
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
122
- # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `group_id`, `path`, `user_id` or `id`.
123
- # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `group_id` or `user_id`. Valid field combinations are `[ group_id, path ]`, `[ user_id, path ]`, `[ user_id, group_id ]` or `[ user_id, group_id, path ]`.
131
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `group_id`, `path`, `user_id`, `partner_id` or `id`.
132
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `group_id`, `partner_id` or `user_id`. Valid field combinations are `[ group_id, path ]`, `[ partner_id, path ]`, `[ user_id, path ]`, `[ user_id, group_id ]`, `[ user_id, group_id, path ]`, `[ user_id, group_id, partner_id ]` or `[ user_id, group_id, partner_id, path ]`.
124
133
  # filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `path`.
125
134
  # path - string - Permission path. If provided, will scope all permissions(including upward) to this path.
126
135
  # include_groups - boolean - If searching by user or group, also include user's permissions that are inherited from its groups?
127
136
  # group_id - string
137
+ # partner_id - string
128
138
  # user_id - string
129
139
  def self.list(params = {}, options = {})
130
140
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
@@ -134,6 +144,7 @@ module Files
134
144
  raise InvalidParameterError.new("Bad parameter: filter_prefix must be an Hash") if params[:filter_prefix] and !params[:filter_prefix].is_a?(Hash)
135
145
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
136
146
  raise InvalidParameterError.new("Bad parameter: group_id must be an String") if params[:group_id] and !params[:group_id].is_a?(String)
147
+ raise InvalidParameterError.new("Bad parameter: partner_id must be an String") if params[:partner_id] and !params[:partner_id].is_a?(String)
137
148
  raise InvalidParameterError.new("Bad parameter: user_id must be an String") if params[:user_id] and !params[:user_id].is_a?(String)
138
149
 
139
150
  List.new(Permission, params) do
@@ -150,6 +161,7 @@ module Files
150
161
  # group_id - int64 - Group ID. Provide `group_name` or `group_id`
151
162
  # permission - string - Permission type. Can be `admin`, `full`, `readonly`, `writeonly`, `list`, or `history`
152
163
  # recursive - boolean - Apply to subfolders recursively?
164
+ # partner_id - int64 - Partner ID if this Permission belongs to a partner.
153
165
  # user_id - int64 - User ID. Provide `username` or `user_id`
154
166
  # username - string - User username. Provide `username` or `user_id`
155
167
  # group_name - string - Group name. Provide `group_name` or `group_id`
@@ -158,6 +170,7 @@ module Files
158
170
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
159
171
  raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if params[:group_id] and !params[:group_id].is_a?(Integer)
160
172
  raise InvalidParameterError.new("Bad parameter: permission must be an String") if params[:permission] and !params[:permission].is_a?(String)
173
+ raise InvalidParameterError.new("Bad parameter: partner_id must be an Integer") if params[:partner_id] and !params[:partner_id].is_a?(Integer)
161
174
  raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
162
175
  raise InvalidParameterError.new("Bad parameter: username must be an String") if params[:username] and !params[:username].is_a?(String)
163
176
  raise InvalidParameterError.new("Bad parameter: group_name must be an String") if params[:group_name] and !params[:group_name].is_a?(String)
@@ -365,6 +365,15 @@ module Files
365
365
  @attributes[:office_integration_enabled] = value
366
366
  end
367
367
 
368
+ # int64 - Partner ID if this user belongs to a Partner
369
+ def partner_id
370
+ @attributes[:partner_id]
371
+ end
372
+
373
+ def partner_id=(value)
374
+ @attributes[:partner_id] = value
375
+ end
376
+
368
377
  # date-time - Last time the user's password was set
369
378
  def password_set_at
370
379
  @attributes[:password_set_at]
@@ -771,6 +780,7 @@ module Files
771
780
  # company - string - User's company
772
781
  # notes - string - Any internal notes on the user
773
782
  # office_integration_enabled - boolean - Enable integration with Office for the web?
783
+ # partner_id - int64 - Partner ID if this user belongs to a Partner
774
784
  # password_validity_days - int64 - Number of days to allow user to use the same password
775
785
  # readonly_site_admin - boolean - Is the user an allowed to view all (non-billing) site configuration for this site?
776
786
  # receive_admin_alerts - boolean - Should the user receive admin alerts such a certificate expiration notifications and overages?
@@ -814,6 +824,7 @@ module Files
814
824
  raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
815
825
  raise InvalidParameterError.new("Bad parameter: company must be an String") if params[:company] and !params[:company].is_a?(String)
816
826
  raise InvalidParameterError.new("Bad parameter: notes must be an String") if params[:notes] and !params[:notes].is_a?(String)
827
+ raise InvalidParameterError.new("Bad parameter: partner_id must be an Integer") if params[:partner_id] and !params[:partner_id].is_a?(Integer)
817
828
  raise InvalidParameterError.new("Bad parameter: password_validity_days must be an Integer") if params[:password_validity_days] and !params[:password_validity_days].is_a?(Integer)
818
829
  raise InvalidParameterError.new("Bad parameter: require_login_by must be an String") if params[:require_login_by] and !params[:require_login_by].is_a?(String)
819
830
  raise InvalidParameterError.new("Bad parameter: ssl_required must be an String") if params[:ssl_required] and !params[:ssl_required].is_a?(String)
@@ -939,6 +950,7 @@ module Files
939
950
  # company - string - User's company
940
951
  # notes - string - Any internal notes on the user
941
952
  # office_integration_enabled - boolean - Enable integration with Office for the web?
953
+ # partner_id - int64 - Partner ID if this user belongs to a Partner
942
954
  # password_validity_days - int64 - Number of days to allow user to use the same password
943
955
  # readonly_site_admin - boolean - Is the user an allowed to view all (non-billing) site configuration for this site?
944
956
  # receive_admin_alerts - boolean - Should the user receive admin alerts such a certificate expiration notifications and overages?
@@ -977,6 +989,7 @@ module Files
977
989
  raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
978
990
  raise InvalidParameterError.new("Bad parameter: company must be an String") if params[:company] and !params[:company].is_a?(String)
979
991
  raise InvalidParameterError.new("Bad parameter: notes must be an String") if params[:notes] and !params[:notes].is_a?(String)
992
+ raise InvalidParameterError.new("Bad parameter: partner_id must be an Integer") if params[:partner_id] and !params[:partner_id].is_a?(Integer)
980
993
  raise InvalidParameterError.new("Bad parameter: password_validity_days must be an Integer") if params[:password_validity_days] and !params[:password_validity_days].is_a?(Integer)
981
994
  raise InvalidParameterError.new("Bad parameter: require_login_by must be an String") if params[:require_login_by] and !params[:require_login_by].is_a?(String)
982
995
  raise InvalidParameterError.new("Bad parameter: ssl_required must be an String") if params[:ssl_required] and !params[:ssl_required].is_a?(String)
@@ -1056,6 +1069,7 @@ module Files
1056
1069
  # company - string - User's company
1057
1070
  # notes - string - Any internal notes on the user
1058
1071
  # office_integration_enabled - boolean - Enable integration with Office for the web?
1072
+ # partner_id - int64 - Partner ID if this user belongs to a Partner
1059
1073
  # password_validity_days - int64 - Number of days to allow user to use the same password
1060
1074
  # readonly_site_admin - boolean - Is the user an allowed to view all (non-billing) site configuration for this site?
1061
1075
  # receive_admin_alerts - boolean - Should the user receive admin alerts such a certificate expiration notifications and overages?
@@ -1098,6 +1112,7 @@ module Files
1098
1112
  raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
1099
1113
  raise InvalidParameterError.new("Bad parameter: company must be an String") if params[:company] and !params[:company].is_a?(String)
1100
1114
  raise InvalidParameterError.new("Bad parameter: notes must be an String") if params[:notes] and !params[:notes].is_a?(String)
1115
+ raise InvalidParameterError.new("Bad parameter: partner_id must be an Integer") if params[:partner_id] and !params[:partner_id].is_a?(Integer)
1101
1116
  raise InvalidParameterError.new("Bad parameter: password_validity_days must be an Integer") if params[:password_validity_days] and !params[:password_validity_days].is_a?(Integer)
1102
1117
  raise InvalidParameterError.new("Bad parameter: require_login_by must be an String") if params[:require_login_by] and !params[:require_login_by].is_a?(String)
1103
1118
  raise InvalidParameterError.new("Bad parameter: ssl_required must be an String") if params[:ssl_required] and !params[:ssl_required].is_a?(String)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
- VERSION = "1.1.334"
4
+ VERSION = "1.1.335"
5
5
  end
data/lib/files.com.rb CHANGED
@@ -96,6 +96,7 @@ require "files.com/models/message_comment_reaction"
96
96
  require "files.com/models/message_reaction"
97
97
  require "files.com/models/notification"
98
98
  require "files.com/models/outbound_connection_log"
99
+ require "files.com/models/partner"
99
100
  require "files.com/models/payment"
100
101
  require "files.com/models/payment_line_item"
101
102
  require "files.com/models/permission"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files.com
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.334
4
+ version: 1.1.335
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
@@ -221,6 +221,7 @@ files:
221
221
  - docs/message_reaction.md
222
222
  - docs/notification.md
223
223
  - docs/outbound_connection_log.md
224
+ - docs/partner.md
224
225
  - docs/payment.md
225
226
  - docs/payment_line_item.md
226
227
  - docs/permission.md
@@ -334,6 +335,7 @@ files:
334
335
  - lib/files.com/models/message_reaction.rb
335
336
  - lib/files.com/models/notification.rb
336
337
  - lib/files.com/models/outbound_connection_log.rb
338
+ - lib/files.com/models/partner.rb
337
339
  - lib/files.com/models/payment.rb
338
340
  - lib/files.com/models/payment_line_item.rb
339
341
  - lib/files.com/models/permission.rb