files.com 1.0.231 → 1.0.235
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/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/history_export.md +2 -2
- data/docs/history_export_result.md +1 -1
- data/lib/files.com/errors.rb +1 -0
- 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/history_export.rb +2 -2
- data/lib/files.com/models/history_export_result.rb +1 -1
- 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
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
|