files.com 1.0.229 → 1.0.233
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_VERSION +1 -1
- data/docs/app.md +6 -6
- data/docs/as2_incoming_message.md +55 -0
- data/docs/as2_outgoing_message.md +49 -0
- data/docs/as2_partner.md +136 -0
- data/docs/as2_station.md +148 -0
- data/docs/automation.md +0 -8
- data/docs/external_event.md +6 -6
- data/docs/folder.md +1 -1
- data/docs/history_export.md +2 -2
- data/docs/history_export_result.md +1 -1
- data/docs/permission.md +6 -6
- data/docs/usage_daily_snapshot.md +6 -6
- data/docs/user.md +6 -6
- data/lib/files.com/errors.rb +1 -0
- data/lib/files.com/models/app.rb +6 -6
- data/lib/files.com/models/as2_incoming_message.rb +100 -0
- data/lib/files.com/models/as2_outgoing_message.rb +85 -0
- data/lib/files.com/models/as2_partner.rb +188 -0
- data/lib/files.com/models/as2_station.rb +217 -0
- data/lib/files.com/models/automation.rb +0 -15
- data/lib/files.com/models/external_event.rb +6 -6
- data/lib/files.com/models/folder.rb +1 -1
- data/lib/files.com/models/history_export.rb +2 -2
- data/lib/files.com/models/history_export_result.rb +1 -1
- data/lib/files.com/models/permission.rb +6 -6
- data/lib/files.com/models/usage_daily_snapshot.rb +6 -6
- data/lib/files.com/models/user.rb +6 -6
- data/lib/files.com.rb +4 -1
- metadata +11 -5
- data/docs/as2_key.md +0 -131
- data/lib/files.com/models/as2_key.rb +0 -176
@@ -300,7 +300,7 @@ module Files
|
|
300
300
|
end
|
301
301
|
|
302
302
|
# Parameters:
|
303
|
-
# 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 header.
|
303
|
+
# 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 or the X-Files-Cursor-Prev header.
|
304
304
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
305
305
|
# path (required) - string - Path to operate on.
|
306
306
|
# filter - string - If specified, will filter folders/files list by this string. Wildcards of `*` and `?` are acceptable here.
|
@@ -63,7 +63,7 @@ module Files
|
|
63
63
|
@attributes[:query_action] = value
|
64
64
|
end
|
65
65
|
|
66
|
-
# string - Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`, `mobile`
|
66
|
+
# string - Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`, `mobile`, `as2`
|
67
67
|
def query_interface
|
68
68
|
@attributes[:query_interface]
|
69
69
|
end
|
@@ -273,7 +273,7 @@ module Files
|
|
273
273
|
# start_at - string - Start date/time of export range.
|
274
274
|
# end_at - string - End date/time of export range.
|
275
275
|
# query_action - string - Filter results by this this action type. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`
|
276
|
-
# query_interface - string - Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`, `mobile`
|
276
|
+
# query_interface - string - Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`, `mobile`, `as2`
|
277
277
|
# query_user_id - string - Return results that are actions performed by the user indiciated by this User ID
|
278
278
|
# query_file_id - string - Return results that are file actions related to the file indicated by this File ID
|
279
279
|
# query_parent_id - string - Return results that are file actions inside the parent folder specified by this folder ID
|
@@ -74,7 +74,7 @@ module Files
|
|
74
74
|
@attributes[:failure_type]
|
75
75
|
end
|
76
76
|
|
77
|
-
# string - Inteface through which the action was taken. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`, `mobile`
|
77
|
+
# string - Inteface through which the action was taken. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`, `mobile`, `as2`
|
78
78
|
def interface
|
79
79
|
@attributes[:interface]
|
80
80
|
end
|
@@ -108,12 +108,12 @@ module Files
|
|
108
108
|
# 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 either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
|
109
109
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
110
110
|
# 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 `group_id`, `path`, `user_id` or `permission`.
|
111
|
-
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`.
|
112
|
-
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `group_id`, `user_id` or `path`.
|
113
|
-
# filter_gteq - object - If set, return records where the specified field is greater than or equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`.
|
114
|
-
# filter_like - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`.
|
115
|
-
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `group_id`, `user_id` or `path`.
|
116
|
-
# filter_lteq - object - If set, return records where the specified field is less than or equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`.
|
111
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`. Valid field combinations are `[ group_id, path ]` and `[ user_id, path ]`.
|
112
|
+
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `group_id`, `user_id` or `path`. Valid field combinations are `[ group_id, path ]` and `[ user_id, path ]`.
|
113
|
+
# filter_gteq - object - If set, return records where the specified field is greater than or equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`. Valid field combinations are `[ group_id, path ]` and `[ user_id, path ]`.
|
114
|
+
# filter_like - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`. Valid field combinations are `[ group_id, path ]` and `[ user_id, path ]`.
|
115
|
+
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `group_id`, `user_id` or `path`. Valid field combinations are `[ group_id, path ]` and `[ user_id, path ]`.
|
116
|
+
# filter_lteq - object - If set, return records where the specified field is less than or equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`. Valid field combinations are `[ group_id, path ]` and `[ user_id, path ]`.
|
117
117
|
# path - string - DEPRECATED: Permission path. If provided, will scope permissions to this path. Use `filter[path]` instead.
|
118
118
|
# group_id - string - DEPRECATED: Group ID. If provided, will scope permissions to this group. Use `filter[group_id]` instead.`
|
119
119
|
# user_id - string - DEPRECATED: User ID. If provided, will scope permissions to this user. Use `filter[user_id]` instead.`
|
@@ -33,12 +33,12 @@ module Files
|
|
33
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 either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
|
34
34
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
35
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 `date` and `usage_snapshot_id`.
|
36
|
-
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
37
|
-
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
38
|
-
# filter_gteq - object - If set, return records where the specified field is greater than or equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
39
|
-
# filter_like - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
40
|
-
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
41
|
-
# filter_lteq - object - If set, return records where the specified field is less than or equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
36
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`. Valid field combinations are `[ usage_snapshot_id, date ]`.
|
37
|
+
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `date` and `usage_snapshot_id`. Valid field combinations are `[ usage_snapshot_id, date ]`.
|
38
|
+
# filter_gteq - object - If set, return records where the specified field is greater than or equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`. Valid field combinations are `[ usage_snapshot_id, date ]`.
|
39
|
+
# filter_like - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`. Valid field combinations are `[ usage_snapshot_id, date ]`.
|
40
|
+
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `date` and `usage_snapshot_id`. Valid field combinations are `[ usage_snapshot_id, date ]`.
|
41
|
+
# filter_lteq - object - If set, return records where the specified field is less than or equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`. Valid field combinations are `[ usage_snapshot_id, date ]`.
|
42
42
|
def self.list(params = {}, options = {})
|
43
43
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
44
44
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
@@ -667,12 +667,12 @@ module Files
|
|
667
667
|
# 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 either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
|
668
668
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
669
669
|
# 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 `authenticate_until`, `email`, `last_desktop_login_at`, `last_login_at`, `username`, `company`, `name`, `site_admin`, `receive_admin_alerts`, `password_validity_days`, `ssl_required` or `not_site_admin`.
|
670
|
-
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
671
|
-
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
672
|
-
# filter_gteq - object - If set, return records where the specified field is greater than or equal to the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
673
|
-
# filter_like - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
674
|
-
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
675
|
-
# filter_lteq - object - If set, return records where the specified field is less than or equal to the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
670
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`. Valid field combinations are `[ not_site_admin, username ]`.
|
671
|
+
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`. Valid field combinations are `[ not_site_admin, username ]`.
|
672
|
+
# filter_gteq - object - If set, return records where the specified field is greater than or equal to the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`. Valid field combinations are `[ not_site_admin, username ]`.
|
673
|
+
# filter_like - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`. Valid field combinations are `[ not_site_admin, username ]`.
|
674
|
+
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`. Valid field combinations are `[ not_site_admin, username ]`.
|
675
|
+
# filter_lteq - object - If set, return records where the specified field is less than or equal to the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`. Valid field combinations are `[ not_site_admin, username ]`.
|
676
676
|
# ids - string - comma-separated list of User IDs
|
677
677
|
# q[username] - string - List users matching username.
|
678
678
|
# q[email] - string - List users matching email.
|
data/lib/files.com.rb
CHANGED
@@ -34,7 +34,10 @@ require "files.com/models/action_notification_export_result"
|
|
34
34
|
require "files.com/models/action_webhook_failure"
|
35
35
|
require "files.com/models/api_key"
|
36
36
|
require "files.com/models/app"
|
37
|
-
require "files.com/models/
|
37
|
+
require "files.com/models/as2_incoming_message"
|
38
|
+
require "files.com/models/as2_outgoing_message"
|
39
|
+
require "files.com/models/as2_partner"
|
40
|
+
require "files.com/models/as2_station"
|
38
41
|
require "files.com/models/auto"
|
39
42
|
require "files.com/models/automation"
|
40
43
|
require "files.com/models/automation_run"
|
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.
|
4
|
+
version: 1.0.233
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -93,7 +93,10 @@ files:
|
|
93
93
|
- docs/action_webhook_failure.md
|
94
94
|
- docs/api_key.md
|
95
95
|
- docs/app.md
|
96
|
-
- docs/
|
96
|
+
- docs/as2_incoming_message.md
|
97
|
+
- docs/as2_outgoing_message.md
|
98
|
+
- docs/as2_partner.md
|
99
|
+
- docs/as2_station.md
|
97
100
|
- docs/auto.md
|
98
101
|
- docs/automation.md
|
99
102
|
- docs/automation_run.md
|
@@ -171,7 +174,10 @@ files:
|
|
171
174
|
- lib/files.com/models/action_webhook_failure.rb
|
172
175
|
- lib/files.com/models/api_key.rb
|
173
176
|
- lib/files.com/models/app.rb
|
174
|
-
- lib/files.com/models/
|
177
|
+
- lib/files.com/models/as2_incoming_message.rb
|
178
|
+
- lib/files.com/models/as2_outgoing_message.rb
|
179
|
+
- lib/files.com/models/as2_partner.rb
|
180
|
+
- lib/files.com/models/as2_station.rb
|
175
181
|
- lib/files.com/models/auto.rb
|
176
182
|
- lib/files.com/models/automation.rb
|
177
183
|
- lib/files.com/models/automation_run.rb
|
@@ -269,7 +275,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
269
275
|
- !ruby/object:Gem::Version
|
270
276
|
version: '0'
|
271
277
|
requirements: []
|
272
|
-
rubygems_version: 3.
|
278
|
+
rubygems_version: 3.1.4
|
273
279
|
signing_key:
|
274
280
|
specification_version: 4
|
275
281
|
summary: Files.com Ruby client.
|
data/docs/as2_key.md
DELETED
@@ -1,131 +0,0 @@
|
|
1
|
-
# As2Key
|
2
|
-
|
3
|
-
## Example As2Key Object
|
4
|
-
|
5
|
-
```
|
6
|
-
{
|
7
|
-
"id": 1,
|
8
|
-
"as2_partnership_name": "Test",
|
9
|
-
"created_at": "2000-01-01T01:00:00Z",
|
10
|
-
"fingerprint": "cf:cb:d3:26:52:6c:55:88:83:17:13:cf:e7:70:eb:1b:32:37:38:c0"
|
11
|
-
}
|
12
|
-
```
|
13
|
-
|
14
|
-
* `id` (int64): AS2 Key ID
|
15
|
-
* `as2_partnership_name` (string): AS2 Partnership Name
|
16
|
-
* `created_at` (date-time): AS2 Key created at date/time
|
17
|
-
* `fingerprint` (string): Public key fingerprint
|
18
|
-
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
19
|
-
* `public_key` (string): Actual contents of Public key.
|
20
|
-
|
21
|
-
|
22
|
-
---
|
23
|
-
|
24
|
-
## List As2 Keys
|
25
|
-
|
26
|
-
```
|
27
|
-
Files::As2Key.list(
|
28
|
-
user_id: 1,
|
29
|
-
per_page: 1
|
30
|
-
)
|
31
|
-
```
|
32
|
-
|
33
|
-
### Parameters
|
34
|
-
|
35
|
-
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
36
|
-
* `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 either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
|
37
|
-
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
38
|
-
|
39
|
-
|
40
|
-
---
|
41
|
-
|
42
|
-
## Show As2 Key
|
43
|
-
|
44
|
-
```
|
45
|
-
Files::As2Key.find(id)
|
46
|
-
```
|
47
|
-
|
48
|
-
### Parameters
|
49
|
-
|
50
|
-
* `id` (int64): Required - As2 Key ID.
|
51
|
-
|
52
|
-
|
53
|
-
---
|
54
|
-
|
55
|
-
## Create As2 Key
|
56
|
-
|
57
|
-
```
|
58
|
-
Files::As2Key.create(
|
59
|
-
user_id: 1,
|
60
|
-
as2_partnership_name: "Test",
|
61
|
-
public_key: "public_key"
|
62
|
-
)
|
63
|
-
```
|
64
|
-
|
65
|
-
### Parameters
|
66
|
-
|
67
|
-
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
68
|
-
* `as2_partnership_name` (string): Required - AS2 Partnership Name
|
69
|
-
* `public_key` (string): Required - Actual contents of Public key.
|
70
|
-
|
71
|
-
|
72
|
-
---
|
73
|
-
|
74
|
-
## Update As2 Key
|
75
|
-
|
76
|
-
```
|
77
|
-
Files::As2Key.update(id,
|
78
|
-
as2_partnership_name: "Test"
|
79
|
-
)
|
80
|
-
```
|
81
|
-
|
82
|
-
### Parameters
|
83
|
-
|
84
|
-
* `id` (int64): Required - As2 Key ID.
|
85
|
-
* `as2_partnership_name` (string): Required - AS2 Partnership Name
|
86
|
-
|
87
|
-
|
88
|
-
---
|
89
|
-
|
90
|
-
## Delete As2 Key
|
91
|
-
|
92
|
-
```
|
93
|
-
Files::As2Key.delete(id)
|
94
|
-
```
|
95
|
-
|
96
|
-
### Parameters
|
97
|
-
|
98
|
-
* `id` (int64): Required - As2 Key ID.
|
99
|
-
|
100
|
-
|
101
|
-
---
|
102
|
-
|
103
|
-
## Update As2 Key
|
104
|
-
|
105
|
-
```
|
106
|
-
as2_key = Files::As2Key.list.first
|
107
|
-
|
108
|
-
as2_key.update(
|
109
|
-
as2_partnership_name: "Test"
|
110
|
-
)
|
111
|
-
```
|
112
|
-
|
113
|
-
### Parameters
|
114
|
-
|
115
|
-
* `id` (int64): Required - As2 Key ID.
|
116
|
-
* `as2_partnership_name` (string): Required - AS2 Partnership Name
|
117
|
-
|
118
|
-
|
119
|
-
---
|
120
|
-
|
121
|
-
## Delete As2 Key
|
122
|
-
|
123
|
-
```
|
124
|
-
as2_key = Files::As2Key.list.first
|
125
|
-
|
126
|
-
as2_key.delete
|
127
|
-
```
|
128
|
-
|
129
|
-
### Parameters
|
130
|
-
|
131
|
-
* `id` (int64): Required - As2 Key ID.
|
@@ -1,176 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Files
|
4
|
-
class As2Key
|
5
|
-
attr_reader :options, :attributes
|
6
|
-
|
7
|
-
def initialize(attributes = {}, options = {})
|
8
|
-
@attributes = attributes || {}
|
9
|
-
@options = options || {}
|
10
|
-
end
|
11
|
-
|
12
|
-
# int64 - AS2 Key ID
|
13
|
-
def id
|
14
|
-
@attributes[:id]
|
15
|
-
end
|
16
|
-
|
17
|
-
def id=(value)
|
18
|
-
@attributes[:id] = value
|
19
|
-
end
|
20
|
-
|
21
|
-
# string - AS2 Partnership Name
|
22
|
-
def as2_partnership_name
|
23
|
-
@attributes[:as2_partnership_name]
|
24
|
-
end
|
25
|
-
|
26
|
-
def as2_partnership_name=(value)
|
27
|
-
@attributes[:as2_partnership_name] = value
|
28
|
-
end
|
29
|
-
|
30
|
-
# date-time - AS2 Key created at date/time
|
31
|
-
def created_at
|
32
|
-
@attributes[:created_at]
|
33
|
-
end
|
34
|
-
|
35
|
-
# string - Public key fingerprint
|
36
|
-
def fingerprint
|
37
|
-
@attributes[:fingerprint]
|
38
|
-
end
|
39
|
-
|
40
|
-
def fingerprint=(value)
|
41
|
-
@attributes[:fingerprint] = value
|
42
|
-
end
|
43
|
-
|
44
|
-
# int64 - User ID. Provide a value of `0` to operate the current session's user.
|
45
|
-
def user_id
|
46
|
-
@attributes[:user_id]
|
47
|
-
end
|
48
|
-
|
49
|
-
def user_id=(value)
|
50
|
-
@attributes[:user_id] = value
|
51
|
-
end
|
52
|
-
|
53
|
-
# string - Actual contents of Public key.
|
54
|
-
def public_key
|
55
|
-
@attributes[:public_key]
|
56
|
-
end
|
57
|
-
|
58
|
-
def public_key=(value)
|
59
|
-
@attributes[:public_key] = value
|
60
|
-
end
|
61
|
-
|
62
|
-
# Parameters:
|
63
|
-
# as2_partnership_name (required) - string - AS2 Partnership Name
|
64
|
-
def update(params = {})
|
65
|
-
params ||= {}
|
66
|
-
params[:id] = @attributes[:id]
|
67
|
-
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
68
|
-
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
69
|
-
raise InvalidParameterError.new("Bad parameter: as2_partnership_name must be an String") if params.dig(:as2_partnership_name) and !params.dig(:as2_partnership_name).is_a?(String)
|
70
|
-
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
71
|
-
raise MissingParameterError.new("Parameter missing: as2_partnership_name") unless params.dig(:as2_partnership_name)
|
72
|
-
|
73
|
-
Api.send_request("/as2_keys/#{@attributes[:id]}", :patch, params, @options)
|
74
|
-
end
|
75
|
-
|
76
|
-
def delete(params = {})
|
77
|
-
params ||= {}
|
78
|
-
params[:id] = @attributes[:id]
|
79
|
-
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
80
|
-
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
81
|
-
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
82
|
-
|
83
|
-
Api.send_request("/as2_keys/#{@attributes[:id]}", :delete, params, @options)
|
84
|
-
end
|
85
|
-
|
86
|
-
def destroy(params = {})
|
87
|
-
delete(params)
|
88
|
-
end
|
89
|
-
|
90
|
-
def save
|
91
|
-
if @attributes[:id]
|
92
|
-
update(@attributes)
|
93
|
-
else
|
94
|
-
new_obj = As2Key.create(@attributes, @options)
|
95
|
-
@attributes = new_obj.attributes
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
|
-
# Parameters:
|
100
|
-
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
101
|
-
# 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 either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
|
102
|
-
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
103
|
-
def self.list(params = {}, options = {})
|
104
|
-
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
|
105
|
-
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
106
|
-
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
107
|
-
|
108
|
-
List.new(As2Key, params) do
|
109
|
-
Api.send_request("/as2_keys", :get, params, options)
|
110
|
-
end
|
111
|
-
end
|
112
|
-
|
113
|
-
def self.all(params = {}, options = {})
|
114
|
-
list(params, options)
|
115
|
-
end
|
116
|
-
|
117
|
-
# Parameters:
|
118
|
-
# id (required) - int64 - As2 Key ID.
|
119
|
-
def self.find(id, params = {}, options = {})
|
120
|
-
params ||= {}
|
121
|
-
params[:id] = id
|
122
|
-
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
123
|
-
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
124
|
-
|
125
|
-
response, options = Api.send_request("/as2_keys/#{params[:id]}", :get, params, options)
|
126
|
-
As2Key.new(response.data, options)
|
127
|
-
end
|
128
|
-
|
129
|
-
def self.get(id, params = {}, options = {})
|
130
|
-
find(id, params, options)
|
131
|
-
end
|
132
|
-
|
133
|
-
# Parameters:
|
134
|
-
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
135
|
-
# as2_partnership_name (required) - string - AS2 Partnership Name
|
136
|
-
# public_key (required) - string - Actual contents of Public key.
|
137
|
-
def self.create(params = {}, options = {})
|
138
|
-
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
|
139
|
-
raise InvalidParameterError.new("Bad parameter: as2_partnership_name must be an String") if params.dig(:as2_partnership_name) and !params.dig(:as2_partnership_name).is_a?(String)
|
140
|
-
raise InvalidParameterError.new("Bad parameter: public_key must be an String") if params.dig(:public_key) and !params.dig(:public_key).is_a?(String)
|
141
|
-
raise MissingParameterError.new("Parameter missing: as2_partnership_name") unless params.dig(:as2_partnership_name)
|
142
|
-
raise MissingParameterError.new("Parameter missing: public_key") unless params.dig(:public_key)
|
143
|
-
|
144
|
-
response, options = Api.send_request("/as2_keys", :post, params, options)
|
145
|
-
As2Key.new(response.data, options)
|
146
|
-
end
|
147
|
-
|
148
|
-
# Parameters:
|
149
|
-
# as2_partnership_name (required) - string - AS2 Partnership Name
|
150
|
-
def self.update(id, params = {}, options = {})
|
151
|
-
params ||= {}
|
152
|
-
params[:id] = id
|
153
|
-
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
154
|
-
raise InvalidParameterError.new("Bad parameter: as2_partnership_name must be an String") if params.dig(:as2_partnership_name) and !params.dig(:as2_partnership_name).is_a?(String)
|
155
|
-
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
156
|
-
raise MissingParameterError.new("Parameter missing: as2_partnership_name") unless params.dig(:as2_partnership_name)
|
157
|
-
|
158
|
-
response, options = Api.send_request("/as2_keys/#{params[:id]}", :patch, params, options)
|
159
|
-
As2Key.new(response.data, options)
|
160
|
-
end
|
161
|
-
|
162
|
-
def self.delete(id, params = {}, options = {})
|
163
|
-
params ||= {}
|
164
|
-
params[:id] = id
|
165
|
-
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
166
|
-
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
167
|
-
|
168
|
-
response, _options = Api.send_request("/as2_keys/#{params[:id]}", :delete, params, options)
|
169
|
-
response.data
|
170
|
-
end
|
171
|
-
|
172
|
-
def self.destroy(id, params = {}, options = {})
|
173
|
-
delete(id, params, options)
|
174
|
-
end
|
175
|
-
end
|
176
|
-
end
|