files.com 1.1.424 → 1.1.426

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: ff9d0dbdb2cc77f3938548947015dc1a0820ace5e1fd64ed942ef92d596fced0
4
- data.tar.gz: 000fd90843fdc3851939b7f7d94045a63de5d344b0a4bafbaacac32486ac4f73
3
+ metadata.gz: deb5cfa450dd6091f1cac32fa2968ee1496e3e9c9a633b3ded728b2fb08106c2
4
+ data.tar.gz: 79afabe81f376f94b69c6f8ed7f04ecd5aa10f89558a98aebe9392e2b61df413
5
5
  SHA512:
6
- metadata.gz: 8a43f0f3835317077b3e46c45e9b382419cfc36360f5a45e75775549f412b02251266a9abdd9f0ba5ee6e67c1131268b9ba8505162ae7e6e57ee5c78dc756955
7
- data.tar.gz: 95b20aecdb8d5a2f052487383fe344baca255f6e3fc760d1155f8b0b57327d0a92544bbf444624da49f85f08ab07ef1d02f9405e4928881303bdbe7c03a55d86
6
+ metadata.gz: 32fe5f53e92790f7d38f102e83d531212c8b4cfd783767300f0a1b96daa1a44f8c13f57fe671df79b91a1d6fe128f4c64d4818cea48f020a1d5a90d457ee4868
7
+ data.tar.gz: f7ab73d8e7c20b68e948b5c6dea8e264585c8e232a8b6fa034f6e694fc54094b84f6e6ecd27f88ea95018e9e3eef5268d190b0d5fe22211cf906a7aaddde9517
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.424
1
+ 1.1.426
data/docs/bundle.md CHANGED
@@ -286,6 +286,7 @@ Files::Bundle.update(id,
286
286
  start_access_on_date: "2000-01-01T01:00:00Z",
287
287
  skip_email: true,
288
288
  skip_name: true,
289
+ user_id: 1,
289
290
  watermark_attachment_delete: false
290
291
  )
291
292
  ```
@@ -316,6 +317,7 @@ Files::Bundle.update(id,
316
317
  * `start_access_on_date` (string): Date when share will start to be accessible. If `nil` access granted right after create.
317
318
  * `skip_email` (boolean): BundleRegistrations can be saved without providing email?
318
319
  * `skip_name` (boolean): BundleRegistrations can be saved without providing name?
320
+ * `user_id` (int64): The owning user id. Only site admins can set this.
319
321
  * `watermark_attachment_delete` (boolean): If true, will delete the file stored in watermark_attachment
320
322
  * `watermark_attachment_file` (file): Preview watermark image applied to all bundle items.
321
323
 
@@ -386,6 +388,7 @@ bundle.update(
386
388
  start_access_on_date: "2000-01-01T01:00:00Z",
387
389
  skip_email: true,
388
390
  skip_name: true,
391
+ user_id: 1,
389
392
  watermark_attachment_delete: false
390
393
  )
391
394
  ```
@@ -416,6 +419,7 @@ bundle.update(
416
419
  * `start_access_on_date` (string): Date when share will start to be accessible. If `nil` access granted right after create.
417
420
  * `skip_email` (boolean): BundleRegistrations can be saved without providing email?
418
421
  * `skip_name` (boolean): BundleRegistrations can be saved without providing name?
422
+ * `user_id` (int64): The owning user id. Only site admins can set this.
419
423
  * `watermark_attachment_delete` (boolean): If true, will delete the file stored in watermark_attachment
420
424
  * `watermark_attachment_file` (file): Preview watermark image applied to all bundle items.
421
425
 
@@ -0,0 +1,134 @@
1
+ # KeyLifecycleRule
2
+
3
+ ## Example KeyLifecycleRule Object
4
+
5
+ ```
6
+ {
7
+ "id": 1,
8
+ "key_type": "gpg",
9
+ "inactivity_days": 12,
10
+ "name": "inactive gpg keys"
11
+ }
12
+ ```
13
+
14
+ * `id` (int64): Key Lifecycle Rule ID
15
+ * `key_type` (string): Key type for which the rule will apply (gpg or ssh).
16
+ * `inactivity_days` (int64): Number of days of inactivity before the rule applies.
17
+ * `name` (string): Key Lifecycle Rule name
18
+
19
+
20
+ ---
21
+
22
+ ## List Key Lifecycle Rules
23
+
24
+ ```
25
+ Files::KeyLifecycleRule.list
26
+ ```
27
+
28
+ ### Parameters
29
+
30
+ * `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.
31
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
32
+ * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
33
+
34
+
35
+ ---
36
+
37
+ ## Show Key Lifecycle Rule
38
+
39
+ ```
40
+ Files::KeyLifecycleRule.find(id)
41
+ ```
42
+
43
+ ### Parameters
44
+
45
+ * `id` (int64): Required - Key Lifecycle Rule ID.
46
+
47
+
48
+ ---
49
+
50
+ ## Create Key Lifecycle Rule
51
+
52
+ ```
53
+ Files::KeyLifecycleRule.create(
54
+ key_type: "gpg",
55
+ inactivity_days: 12,
56
+ name: "inactive gpg keys"
57
+ )
58
+ ```
59
+
60
+ ### Parameters
61
+
62
+ * `key_type` (string): Key type for which the rule will apply (gpg or ssh).
63
+ * `inactivity_days` (int64): Number of days of inactivity before the rule applies.
64
+ * `name` (string): Key Lifecycle Rule name
65
+
66
+
67
+ ---
68
+
69
+ ## Update Key Lifecycle Rule
70
+
71
+ ```
72
+ Files::KeyLifecycleRule.update(id,
73
+ key_type: "gpg",
74
+ inactivity_days: 12,
75
+ name: "inactive gpg keys"
76
+ )
77
+ ```
78
+
79
+ ### Parameters
80
+
81
+ * `id` (int64): Required - Key Lifecycle Rule ID.
82
+ * `key_type` (string): Key type for which the rule will apply (gpg or ssh).
83
+ * `inactivity_days` (int64): Number of days of inactivity before the rule applies.
84
+ * `name` (string): Key Lifecycle Rule name
85
+
86
+
87
+ ---
88
+
89
+ ## Delete Key Lifecycle Rule
90
+
91
+ ```
92
+ Files::KeyLifecycleRule.delete(id)
93
+ ```
94
+
95
+ ### Parameters
96
+
97
+ * `id` (int64): Required - Key Lifecycle Rule ID.
98
+
99
+
100
+ ---
101
+
102
+ ## Update Key Lifecycle Rule
103
+
104
+ ```
105
+ key_lifecycle_rule = Files::KeyLifecycleRule.find(id)
106
+
107
+ key_lifecycle_rule.update(
108
+ key_type: "gpg",
109
+ inactivity_days: 12,
110
+ name: "inactive gpg keys"
111
+ )
112
+ ```
113
+
114
+ ### Parameters
115
+
116
+ * `id` (int64): Required - Key Lifecycle Rule ID.
117
+ * `key_type` (string): Key type for which the rule will apply (gpg or ssh).
118
+ * `inactivity_days` (int64): Number of days of inactivity before the rule applies.
119
+ * `name` (string): Key Lifecycle Rule name
120
+
121
+
122
+ ---
123
+
124
+ ## Delete Key Lifecycle Rule
125
+
126
+ ```
127
+ key_lifecycle_rule = Files::KeyLifecycleRule.find(id)
128
+
129
+ key_lifecycle_rule.delete
130
+ ```
131
+
132
+ ### Parameters
133
+
134
+ * `id` (int64): Required - Key Lifecycle Rule ID.
@@ -462,6 +462,7 @@ module Files
462
462
  # start_access_on_date - string - Date when share will start to be accessible. If `nil` access granted right after create.
463
463
  # skip_email - boolean - BundleRegistrations can be saved without providing email?
464
464
  # skip_name - boolean - BundleRegistrations can be saved without providing name?
465
+ # user_id - int64 - The owning user id. Only site admins can set this.
465
466
  # watermark_attachment_delete - boolean - If true, will delete the file stored in watermark_attachment
466
467
  # watermark_attachment_file - file - Preview watermark image applied to all bundle items.
467
468
  def update(params = {})
@@ -483,6 +484,7 @@ module Files
483
484
  raise InvalidParameterError.new("Bad parameter: path_template_time_zone must be an String") if params[:path_template_time_zone] and !params[:path_template_time_zone].is_a?(String)
484
485
  raise InvalidParameterError.new("Bad parameter: permissions must be an String") if params[:permissions] and !params[:permissions].is_a?(String)
485
486
  raise InvalidParameterError.new("Bad parameter: start_access_on_date must be an String") if params[:start_access_on_date] and !params[:start_access_on_date].is_a?(String)
487
+ raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
486
488
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]
487
489
 
488
490
  Api.send_request("/bundles/#{@attributes[:id]}", :patch, params, @options)
@@ -655,6 +657,7 @@ module Files
655
657
  # start_access_on_date - string - Date when share will start to be accessible. If `nil` access granted right after create.
656
658
  # skip_email - boolean - BundleRegistrations can be saved without providing email?
657
659
  # skip_name - boolean - BundleRegistrations can be saved without providing name?
660
+ # user_id - int64 - The owning user id. Only site admins can set this.
658
661
  # watermark_attachment_delete - boolean - If true, will delete the file stored in watermark_attachment
659
662
  # watermark_attachment_file - file - Preview watermark image applied to all bundle items.
660
663
  def self.update(id, params = {}, options = {})
@@ -675,6 +678,7 @@ module Files
675
678
  raise InvalidParameterError.new("Bad parameter: path_template_time_zone must be an String") if params[:path_template_time_zone] and !params[:path_template_time_zone].is_a?(String)
676
679
  raise InvalidParameterError.new("Bad parameter: permissions must be an String") if params[:permissions] and !params[:permissions].is_a?(String)
677
680
  raise InvalidParameterError.new("Bad parameter: start_access_on_date must be an String") if params[:start_access_on_date] and !params[:start_access_on_date].is_a?(String)
681
+ raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
678
682
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]
679
683
 
680
684
  response, options = Api.send_request("/bundles/#{params[:id]}", :patch, params, options)
@@ -0,0 +1,170 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class KeyLifecycleRule
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # int64 - Key Lifecycle Rule ID
13
+ def id
14
+ @attributes[:id]
15
+ end
16
+
17
+ def id=(value)
18
+ @attributes[:id] = value
19
+ end
20
+
21
+ # string - Key type for which the rule will apply (gpg or ssh).
22
+ def key_type
23
+ @attributes[:key_type]
24
+ end
25
+
26
+ def key_type=(value)
27
+ @attributes[:key_type] = value
28
+ end
29
+
30
+ # int64 - Number of days of inactivity before the rule applies.
31
+ def inactivity_days
32
+ @attributes[:inactivity_days]
33
+ end
34
+
35
+ def inactivity_days=(value)
36
+ @attributes[:inactivity_days] = value
37
+ end
38
+
39
+ # string - Key Lifecycle Rule name
40
+ def name
41
+ @attributes[:name]
42
+ end
43
+
44
+ def name=(value)
45
+ @attributes[:name] = value
46
+ end
47
+
48
+ # Parameters:
49
+ # key_type - string - Key type for which the rule will apply (gpg or ssh).
50
+ # inactivity_days - int64 - Number of days of inactivity before the rule applies.
51
+ # name - string - Key Lifecycle Rule name
52
+ def update(params = {})
53
+ params ||= {}
54
+ params[:id] = @attributes[:id]
55
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
56
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
57
+ raise InvalidParameterError.new("Bad parameter: key_type must be an String") if params[:key_type] and !params[:key_type].is_a?(String)
58
+ raise InvalidParameterError.new("Bad parameter: inactivity_days must be an Integer") if params[:inactivity_days] and !params[:inactivity_days].is_a?(Integer)
59
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
60
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
61
+
62
+ Api.send_request("/key_lifecycle_rules/#{@attributes[:id]}", :patch, params, @options)
63
+ end
64
+
65
+ def delete(params = {})
66
+ params ||= {}
67
+ params[:id] = @attributes[:id]
68
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
69
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
70
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
71
+
72
+ Api.send_request("/key_lifecycle_rules/#{@attributes[:id]}", :delete, params, @options)
73
+ end
74
+
75
+ def destroy(params = {})
76
+ delete(params)
77
+ nil
78
+ end
79
+
80
+ def save
81
+ if @attributes[:id]
82
+ new_obj = update(@attributes)
83
+ else
84
+ new_obj = KeyLifecycleRule.create(@attributes, @options)
85
+ end
86
+
87
+ @attributes = new_obj.attributes
88
+ true
89
+ end
90
+
91
+ # Parameters:
92
+ # 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.
93
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
94
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
95
+ def self.list(params = {}, options = {})
96
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
97
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
98
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
99
+
100
+ List.new(KeyLifecycleRule, params) do
101
+ Api.send_request("/key_lifecycle_rules", :get, params, options)
102
+ end
103
+ end
104
+
105
+ def self.all(params = {}, options = {})
106
+ list(params, options)
107
+ end
108
+
109
+ # Parameters:
110
+ # id (required) - int64 - Key Lifecycle Rule ID.
111
+ def self.find(id, params = {}, options = {})
112
+ params ||= {}
113
+ params[:id] = id
114
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
115
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
116
+
117
+ response, options = Api.send_request("/key_lifecycle_rules/#{params[:id]}", :get, params, options)
118
+ KeyLifecycleRule.new(response.data, options)
119
+ end
120
+
121
+ def self.get(id, params = {}, options = {})
122
+ find(id, params, options)
123
+ end
124
+
125
+ # Parameters:
126
+ # key_type - string - Key type for which the rule will apply (gpg or ssh).
127
+ # inactivity_days - int64 - Number of days of inactivity before the rule applies.
128
+ # name - string - Key Lifecycle Rule name
129
+ def self.create(params = {}, options = {})
130
+ raise InvalidParameterError.new("Bad parameter: key_type must be an String") if params[:key_type] and !params[:key_type].is_a?(String)
131
+ raise InvalidParameterError.new("Bad parameter: inactivity_days must be an Integer") if params[:inactivity_days] and !params[:inactivity_days].is_a?(Integer)
132
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
133
+
134
+ response, options = Api.send_request("/key_lifecycle_rules", :post, params, options)
135
+ KeyLifecycleRule.new(response.data, options)
136
+ end
137
+
138
+ # Parameters:
139
+ # key_type - string - Key type for which the rule will apply (gpg or ssh).
140
+ # inactivity_days - int64 - Number of days of inactivity before the rule applies.
141
+ # name - string - Key Lifecycle Rule name
142
+ def self.update(id, params = {}, options = {})
143
+ params ||= {}
144
+ params[:id] = id
145
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
146
+ raise InvalidParameterError.new("Bad parameter: key_type must be an String") if params[:key_type] and !params[:key_type].is_a?(String)
147
+ raise InvalidParameterError.new("Bad parameter: inactivity_days must be an Integer") if params[:inactivity_days] and !params[:inactivity_days].is_a?(Integer)
148
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
149
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
150
+
151
+ response, options = Api.send_request("/key_lifecycle_rules/#{params[:id]}", :patch, params, options)
152
+ KeyLifecycleRule.new(response.data, options)
153
+ end
154
+
155
+ def self.delete(id, params = {}, options = {})
156
+ params ||= {}
157
+ params[:id] = id
158
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
159
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
160
+
161
+ Api.send_request("/key_lifecycle_rules/#{params[:id]}", :delete, params, options)
162
+ nil
163
+ end
164
+
165
+ def self.destroy(id, params = {}, options = {})
166
+ delete(id, params, options)
167
+ nil
168
+ end
169
+ end
170
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
- VERSION = "1.1.424"
4
+ VERSION = "1.1.426"
5
5
  end
data/lib/files.com.rb CHANGED
@@ -91,6 +91,7 @@ require "files.com/models/inbox_upload"
91
91
  require "files.com/models/invoice"
92
92
  require "files.com/models/invoice_line_item"
93
93
  require "files.com/models/ip_address"
94
+ require "files.com/models/key_lifecycle_rule"
94
95
  require "files.com/models/lock"
95
96
  require "files.com/models/message"
96
97
  require "files.com/models/message_comment"
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.424
4
+ version: 1.1.426
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
@@ -216,6 +216,7 @@ files:
216
216
  - docs/invoice.md
217
217
  - docs/invoice_line_item.md
218
218
  - docs/ip_address.md
219
+ - docs/key_lifecycle_rule.md
219
220
  - docs/lock.md
220
221
  - docs/message.md
221
222
  - docs/message_comment.md
@@ -333,6 +334,7 @@ files:
333
334
  - lib/files.com/models/invoice.rb
334
335
  - lib/files.com/models/invoice_line_item.rb
335
336
  - lib/files.com/models/ip_address.rb
337
+ - lib/files.com/models/key_lifecycle_rule.rb
336
338
  - lib/files.com/models/lock.rb
337
339
  - lib/files.com/models/message.rb
338
340
  - lib/files.com/models/message_comment.rb