files.com 1.0.209 → 1.0.210

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: 9d06c82fb0e225793e20bec0bdd39f2c8d559de5632bbcbecf1e99c24859e04a
4
- data.tar.gz: 02b730b1f1f91e8b666da4f4412631bc5cc7210c1518467a5b5bc8be977a3307
3
+ metadata.gz: ef010cc65726af297ea4db4cb97bd769edcd2e1feed8a7ad3760cff71e81b39f
4
+ data.tar.gz: fd8e7e408134ebfa64d087abf69d3dd46a67e503f1ded6250928598e6fc4c413
5
5
  SHA512:
6
- metadata.gz: 06046ae286bd6c45662b3a1101023e06253a34a538bc32a21cb5406052869142cd01bd461ed20f11361e3047dc6550a6de1060cee6cc161c02e07e7953ab23dd
7
- data.tar.gz: 279632e14066db502162050640eeb79bbc6581b9f95b53981ac75b9ee7d80276cb111123941014105d2986ee15ca5aecbfb5e1b755757d3f43579b60b4d1e9d6
6
+ metadata.gz: caef4d5f3d8b1c4ade8edae39f5f3f7ed8f3bea9ad02b010d1972ff00cc3fb5c247823201f1189ba910e5463f5efa16c87e77aa9dae8e7c6b89258e044acabcf
7
+ data.tar.gz: 3d09b9f451e72d2f6a1d6e6c3f075c90ba3bb16cc5313921e80144fce66e6bcb548d75c13ff95702391f75169900f8ae96372831c3100d3eed1798481345bde5
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.209
1
+ 1.0.210
@@ -0,0 +1,35 @@
1
+ # AutomationRun
2
+
3
+ ## Example AutomationRun Object
4
+
5
+ ```
6
+ {
7
+ "automation_id": 1,
8
+ "status": "success",
9
+ "status_messages_url": "https://www.example.com/log_file.txt"
10
+ }
11
+ ```
12
+
13
+ * `automation_id` (int64): ID of the associated Automation.
14
+ * `status` (string): The success status of the AutomationRun. One of `running`, `success`, `partial_failure`, or `failure`.
15
+ * `status_messages_url` (string): Link to status messages log file.
16
+
17
+
18
+ ---
19
+
20
+ ## List Automation Runs
21
+
22
+ ```
23
+ Files::AutomationRun.list(
24
+ user_id: 1,
25
+ per_page: 1,
26
+ automation_id: 1
27
+ )
28
+ ```
29
+
30
+ ### Parameters
31
+
32
+ * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
33
+ * `cursor` (string): Used for pagination. Send a cursor value 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.
34
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
35
+ * `automation_id` (int64): Required - ID of the associated Automation.
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class AutomationRun
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # int64 - ID of the associated Automation.
13
+ def automation_id
14
+ @attributes[:automation_id]
15
+ end
16
+
17
+ # string - The success status of the AutomationRun. One of `running`, `success`, `partial_failure`, or `failure`.
18
+ def status
19
+ @attributes[:status]
20
+ end
21
+
22
+ # string - Link to status messages log file.
23
+ def status_messages_url
24
+ @attributes[:status_messages_url]
25
+ end
26
+
27
+ # Parameters:
28
+ # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
29
+ # cursor - string - Used for pagination. Send a cursor value 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.
30
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
31
+ # automation_id (required) - int64 - ID of the associated Automation.
32
+ def self.list(params = {}, options = {})
33
+ raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
34
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
35
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
36
+ raise InvalidParameterError.new("Bad parameter: automation_id must be an Integer") if params.dig(:automation_id) and !params.dig(:automation_id).is_a?(Integer)
37
+ raise MissingParameterError.new("Parameter missing: automation_id") unless params.dig(:automation_id)
38
+
39
+ List.new(AutomationRun, params) do
40
+ Api.send_request("/automation_runs", :get, params, options)
41
+ end
42
+ end
43
+
44
+ def self.all(params = {}, options = {})
45
+ list(params, options)
46
+ end
47
+ end
48
+ end
data/lib/files.com.rb CHANGED
@@ -37,6 +37,7 @@ require "files.com/models/app"
37
37
  require "files.com/models/as2_key"
38
38
  require "files.com/models/auto"
39
39
  require "files.com/models/automation"
40
+ require "files.com/models/automation_run"
40
41
  require "files.com/models/bandwidth_snapshot"
41
42
  require "files.com/models/behavior"
42
43
  require "files.com/models/bundle"
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.209
4
+ version: 1.0.210
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-09-14 00:00:00.000000000 Z
11
+ date: 2021-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -96,6 +96,7 @@ files:
96
96
  - docs/as2_key.md
97
97
  - docs/auto.md
98
98
  - docs/automation.md
99
+ - docs/automation_run.md
99
100
  - docs/bandwidth_snapshot.md
100
101
  - docs/behavior.md
101
102
  - docs/bundle.md
@@ -173,6 +174,7 @@ files:
173
174
  - lib/files.com/models/as2_key.rb
174
175
  - lib/files.com/models/auto.rb
175
176
  - lib/files.com/models/automation.rb
177
+ - lib/files.com/models/automation_run.rb
176
178
  - lib/files.com/models/bandwidth_snapshot.rb
177
179
  - lib/files.com/models/behavior.rb
178
180
  - lib/files.com/models/bundle.rb