files.com 1.0.183 → 1.0.184

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: ff4d0d6063f70dcebe0716be9be58576674d1dd9557a6fa361d6b3f0379f102a
4
- data.tar.gz: e7b4ab3e3c558ed2c39de94a3af1abcd13003c56dcd9bc8d7464a360a2e51a61
3
+ metadata.gz: d93d686016bd4a533ab76dd1ae95415e6e3c0afcec4b65d651b698a01d4f0c9b
4
+ data.tar.gz: 97ce617042e8a47f4b75bff5e4209462b3c85af5ee0f44e970c1379c1a63ccc9
5
5
  SHA512:
6
- metadata.gz: 8769075d23e196ac9bf65bbf57a3a0254591c6ffebd3f05aaaeeafc1630762beebcfdb25858b82d8f765d0d2071c9d2e32410e545fd3decfc7fdae45dac472a3
7
- data.tar.gz: 7fe7e57189cf669a367b1d4e63d8a2a3cabd56369afe601717cf454969947205417c94bb9ca3a13b6478d2357559d253f6e22a59d851fe7d4f52582bad238be1
6
+ metadata.gz: 4090101741ab308d32900b57ced9e50f30a8e9af68ff36c1de63ee5663f3166da8bbea51a48156853152908172cee76fcd8279be57e61ecd92376826ee3aefc4
7
+ data.tar.gz: 89623ab716d856ba2e2bc5655716a454fc3b9ee39cd465662825e7f6575702ff8c49aaf6bc22c8e3c771727f99353c2412978a671ce129462aa8e486442ebaf7
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.183
1
+ 1.0.184
@@ -0,0 +1,38 @@
1
+ # FileMigration
2
+
3
+ ## Example FileMigration Object
4
+
5
+ ```
6
+ {
7
+ "id": 1,
8
+ "path": "MyFolder",
9
+ "dest_path": "MyFolder",
10
+ "files_moved": 1,
11
+ "files_total": 1,
12
+ "operation": "move",
13
+ "region": "USA",
14
+ "status": "complete"
15
+ }
16
+ ```
17
+
18
+ * `id` (int64): File migration ID
19
+ * `path` (string): Source path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
20
+ * `dest_path` (string): Destination path
21
+ * `files_moved` (int64): Number of files processed
22
+ * `files_total` (int64): Total number of files to process
23
+ * `operation` (string): The type of operation
24
+ * `region` (string): Region
25
+ * `status` (string): Status
26
+
27
+
28
+ ---
29
+
30
+ ## Show File Migration
31
+
32
+ ```
33
+ Files::FileMigration.find(id)
34
+ ```
35
+
36
+ ### Parameters
37
+
38
+ * `id` (int64): Required - File Migration ID.
data/lib/files.com.rb CHANGED
@@ -51,6 +51,7 @@ require "files.com/models/file"
51
51
  require "files.com/models/file_action"
52
52
  require "files.com/models/file_comment"
53
53
  require "files.com/models/file_comment_reaction"
54
+ require "files.com/models/file_migration"
54
55
  require "files.com/models/file_upload_part"
55
56
  require "files.com/models/folder"
56
57
  require "files.com/models/form_field"
@@ -0,0 +1,68 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class FileMigration
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # int64 - File migration ID
13
+ def id
14
+ @attributes[:id]
15
+ end
16
+
17
+ # string - Source path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
18
+ def path
19
+ @attributes[:path]
20
+ end
21
+
22
+ # string - Destination path
23
+ def dest_path
24
+ @attributes[:dest_path]
25
+ end
26
+
27
+ # int64 - Number of files processed
28
+ def files_moved
29
+ @attributes[:files_moved]
30
+ end
31
+
32
+ # int64 - Total number of files to process
33
+ def files_total
34
+ @attributes[:files_total]
35
+ end
36
+
37
+ # string - The type of operation
38
+ def operation
39
+ @attributes[:operation]
40
+ end
41
+
42
+ # string - Region
43
+ def region
44
+ @attributes[:region]
45
+ end
46
+
47
+ # string - Status
48
+ def status
49
+ @attributes[:status]
50
+ end
51
+
52
+ # Parameters:
53
+ # id (required) - int64 - File Migration ID.
54
+ def self.find(id, params = {}, options = {})
55
+ params ||= {}
56
+ params[:id] = id
57
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
58
+ raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
59
+
60
+ response, options = Api.send_request("/file_migrations/#{params[:id]}", :get, params, options)
61
+ FileMigration.new(response.data, options)
62
+ end
63
+
64
+ def self.get(id, params = {}, options = {})
65
+ find(id, params, options)
66
+ end
67
+ end
68
+ 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.183
4
+ version: 1.0.184
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-19 00:00:00.000000000 Z
11
+ date: 2021-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -110,6 +110,7 @@ files:
110
110
  - docs/file_action.md
111
111
  - docs/file_comment.md
112
112
  - docs/file_comment_reaction.md
113
+ - docs/file_migration.md
113
114
  - docs/file_upload_part.md
114
115
  - docs/file_utils.md
115
116
  - docs/folder.md
@@ -186,6 +187,7 @@ files:
186
187
  - lib/files.com/models/file_action.rb
187
188
  - lib/files.com/models/file_comment.rb
188
189
  - lib/files.com/models/file_comment_reaction.rb
190
+ - lib/files.com/models/file_migration.rb
189
191
  - lib/files.com/models/file_upload_part.rb
190
192
  - lib/files.com/models/file_utils.rb
191
193
  - lib/files.com/models/folder.rb