files.com 1.0.230 → 1.0.234
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 +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/external_event.md +6 -6
- 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/external_event.rb +6 -6
- 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
@@ -0,0 +1,100 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Files
|
4
|
+
class As2IncomingMessage
|
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 AS2 Partner.
|
13
|
+
def id
|
14
|
+
@attributes[:id]
|
15
|
+
end
|
16
|
+
|
17
|
+
# int64 - Id of the AS2 Partner associated with this message.
|
18
|
+
def as2_partner_id
|
19
|
+
@attributes[:as2_partner_id]
|
20
|
+
end
|
21
|
+
|
22
|
+
# string - UUID assigned to this message.
|
23
|
+
def uuid
|
24
|
+
@attributes[:uuid]
|
25
|
+
end
|
26
|
+
|
27
|
+
# string - Content Type header of the incoming message.
|
28
|
+
def content_type
|
29
|
+
@attributes[:content_type]
|
30
|
+
end
|
31
|
+
|
32
|
+
# object - HTTP Headers sent with this message.
|
33
|
+
def http_headers
|
34
|
+
@attributes[:http_headers]
|
35
|
+
end
|
36
|
+
|
37
|
+
# string - JSON Structure of the activity log.
|
38
|
+
def activity_log
|
39
|
+
@attributes[:activity_log]
|
40
|
+
end
|
41
|
+
|
42
|
+
# string - Result of processing. Valid values: `unable_to_find_station`, `unable_to_find_partner`, `unable_to_validate_signature`, `decrypt_fail`, `file_save_fail`, `success`
|
43
|
+
def processing_result
|
44
|
+
@attributes[:processing_result]
|
45
|
+
end
|
46
|
+
|
47
|
+
# string - AS2 TO header of message
|
48
|
+
def as2_to
|
49
|
+
@attributes[:as2_to]
|
50
|
+
end
|
51
|
+
|
52
|
+
# string - AS2 FROM header of message
|
53
|
+
def as2_from
|
54
|
+
@attributes[:as2_from]
|
55
|
+
end
|
56
|
+
|
57
|
+
# string - AS2 Message Id
|
58
|
+
def message_id
|
59
|
+
@attributes[:message_id]
|
60
|
+
end
|
61
|
+
|
62
|
+
# string - AS2 Subject Header
|
63
|
+
def subject
|
64
|
+
@attributes[:subject]
|
65
|
+
end
|
66
|
+
|
67
|
+
# string - Encrypted Payload Body Size
|
68
|
+
def body_size
|
69
|
+
@attributes[:body_size]
|
70
|
+
end
|
71
|
+
|
72
|
+
# string - Filename of the file being received.
|
73
|
+
def attachment_filename
|
74
|
+
@attributes[:attachment_filename]
|
75
|
+
end
|
76
|
+
|
77
|
+
# date-time - Message creation date/time
|
78
|
+
def created_at
|
79
|
+
@attributes[:created_at]
|
80
|
+
end
|
81
|
+
|
82
|
+
# Parameters:
|
83
|
+
# 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.
|
84
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
85
|
+
# as2_partner_id - int64 - As2 Partner ID. If provided, will return message specific to that partner.
|
86
|
+
def self.list(params = {}, options = {})
|
87
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
88
|
+
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
89
|
+
raise InvalidParameterError.new("Bad parameter: as2_partner_id must be an Integer") if params.dig(:as2_partner_id) and !params.dig(:as2_partner_id).is_a?(Integer)
|
90
|
+
|
91
|
+
List.new(As2IncomingMessage, params) do
|
92
|
+
Api.send_request("/as2_incoming_messages", :get, params, options)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
def self.all(params = {}, options = {})
|
97
|
+
list(params, options)
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Files
|
4
|
+
class As2OutgoingMessage
|
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 AS2 Partner.
|
13
|
+
def id
|
14
|
+
@attributes[:id]
|
15
|
+
end
|
16
|
+
|
17
|
+
# int64 - Id of the AS2 Partner associated with this message.
|
18
|
+
def as2_partner_id
|
19
|
+
@attributes[:as2_partner_id]
|
20
|
+
end
|
21
|
+
|
22
|
+
# string - UUID assigned to this message.
|
23
|
+
def uuid
|
24
|
+
@attributes[:uuid]
|
25
|
+
end
|
26
|
+
|
27
|
+
# object - HTTP Headers sent with this message.
|
28
|
+
def http_headers
|
29
|
+
@attributes[:http_headers]
|
30
|
+
end
|
31
|
+
|
32
|
+
# string - JSON Structure of the activity log.
|
33
|
+
def activity_log
|
34
|
+
@attributes[:activity_log]
|
35
|
+
end
|
36
|
+
|
37
|
+
# string - Result of processing. Valid values: `send_failed`, `send_success`
|
38
|
+
def processing_result
|
39
|
+
@attributes[:processing_result]
|
40
|
+
end
|
41
|
+
|
42
|
+
# string - AS2 Message Integrity Check
|
43
|
+
def mic
|
44
|
+
@attributes[:mic]
|
45
|
+
end
|
46
|
+
|
47
|
+
# string - AS2 Message Id
|
48
|
+
def message_id
|
49
|
+
@attributes[:message_id]
|
50
|
+
end
|
51
|
+
|
52
|
+
# string - Encrypted Payload Body Size
|
53
|
+
def body_size
|
54
|
+
@attributes[:body_size]
|
55
|
+
end
|
56
|
+
|
57
|
+
# string - Filename of the file being sent.
|
58
|
+
def attachment_filename
|
59
|
+
@attributes[:attachment_filename]
|
60
|
+
end
|
61
|
+
|
62
|
+
# date-time - Message creation date/time
|
63
|
+
def created_at
|
64
|
+
@attributes[:created_at]
|
65
|
+
end
|
66
|
+
|
67
|
+
# Parameters:
|
68
|
+
# 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.
|
69
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
70
|
+
# as2_partner_id - int64 - As2 Partner ID. If provided, will return message specific to that partner.
|
71
|
+
def self.list(params = {}, options = {})
|
72
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
73
|
+
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
74
|
+
raise InvalidParameterError.new("Bad parameter: as2_partner_id must be an Integer") if params.dig(:as2_partner_id) and !params.dig(:as2_partner_id).is_a?(Integer)
|
75
|
+
|
76
|
+
List.new(As2OutgoingMessage, params) do
|
77
|
+
Api.send_request("/as2_outgoing_messages", :get, params, options)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
def self.all(params = {}, options = {})
|
82
|
+
list(params, options)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,188 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Files
|
4
|
+
class As2Partner
|
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 AS2 Partner.
|
13
|
+
def id
|
14
|
+
@attributes[:id]
|
15
|
+
end
|
16
|
+
|
17
|
+
def id=(value)
|
18
|
+
@attributes[:id] = value
|
19
|
+
end
|
20
|
+
|
21
|
+
# int64 - Id of the AS2 Station associated with this partner.
|
22
|
+
def as2_station_id
|
23
|
+
@attributes[:as2_station_id]
|
24
|
+
end
|
25
|
+
|
26
|
+
def as2_station_id=(value)
|
27
|
+
@attributes[:as2_station_id] = value
|
28
|
+
end
|
29
|
+
|
30
|
+
# string - The partner's formal AS2 name.
|
31
|
+
def name
|
32
|
+
@attributes[:name]
|
33
|
+
end
|
34
|
+
|
35
|
+
def name=(value)
|
36
|
+
@attributes[:name] = value
|
37
|
+
end
|
38
|
+
|
39
|
+
# string - Public URI for sending AS2 message to.
|
40
|
+
def uri
|
41
|
+
@attributes[:uri]
|
42
|
+
end
|
43
|
+
|
44
|
+
def uri=(value)
|
45
|
+
@attributes[:uri] = value
|
46
|
+
end
|
47
|
+
|
48
|
+
# string - MD5 hash of public certificate used for message security.
|
49
|
+
def public_certificate_md5
|
50
|
+
@attributes[:public_certificate_md5]
|
51
|
+
end
|
52
|
+
|
53
|
+
def public_certificate_md5=(value)
|
54
|
+
@attributes[:public_certificate_md5] = value
|
55
|
+
end
|
56
|
+
|
57
|
+
# string
|
58
|
+
def public_certificate
|
59
|
+
@attributes[:public_certificate]
|
60
|
+
end
|
61
|
+
|
62
|
+
def public_certificate=(value)
|
63
|
+
@attributes[:public_certificate] = value
|
64
|
+
end
|
65
|
+
|
66
|
+
# Parameters:
|
67
|
+
# name - string - AS2 Name
|
68
|
+
# uri - string - URL base for AS2 responses
|
69
|
+
# public_certificate - string
|
70
|
+
def update(params = {})
|
71
|
+
params ||= {}
|
72
|
+
params[:id] = @attributes[:id]
|
73
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
74
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
75
|
+
raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
|
76
|
+
raise InvalidParameterError.new("Bad parameter: uri must be an String") if params.dig(:uri) and !params.dig(:uri).is_a?(String)
|
77
|
+
raise InvalidParameterError.new("Bad parameter: public_certificate must be an String") if params.dig(:public_certificate) and !params.dig(:public_certificate).is_a?(String)
|
78
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
79
|
+
|
80
|
+
Api.send_request("/as2_partners/#{@attributes[:id]}", :patch, params, @options)
|
81
|
+
end
|
82
|
+
|
83
|
+
def delete(params = {})
|
84
|
+
params ||= {}
|
85
|
+
params[:id] = @attributes[:id]
|
86
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
87
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
88
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
89
|
+
|
90
|
+
Api.send_request("/as2_partners/#{@attributes[:id]}", :delete, params, @options)
|
91
|
+
end
|
92
|
+
|
93
|
+
def destroy(params = {})
|
94
|
+
delete(params)
|
95
|
+
end
|
96
|
+
|
97
|
+
def save
|
98
|
+
if @attributes[:id]
|
99
|
+
update(@attributes)
|
100
|
+
else
|
101
|
+
new_obj = As2Partner.create(@attributes, @options)
|
102
|
+
@attributes = new_obj.attributes
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
# Parameters:
|
107
|
+
# 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.
|
108
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
109
|
+
def self.list(params = {}, options = {})
|
110
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
111
|
+
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
112
|
+
|
113
|
+
List.new(As2Partner, params) do
|
114
|
+
Api.send_request("/as2_partners", :get, params, options)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
def self.all(params = {}, options = {})
|
119
|
+
list(params, options)
|
120
|
+
end
|
121
|
+
|
122
|
+
# Parameters:
|
123
|
+
# id (required) - int64 - As2 Partner ID.
|
124
|
+
def self.find(id, params = {}, options = {})
|
125
|
+
params ||= {}
|
126
|
+
params[:id] = id
|
127
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
128
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
129
|
+
|
130
|
+
response, options = Api.send_request("/as2_partners/#{params[:id]}", :get, params, options)
|
131
|
+
As2Partner.new(response.data, options)
|
132
|
+
end
|
133
|
+
|
134
|
+
def self.get(id, params = {}, options = {})
|
135
|
+
find(id, params, options)
|
136
|
+
end
|
137
|
+
|
138
|
+
# Parameters:
|
139
|
+
# name (required) - string - AS2 Name
|
140
|
+
# uri (required) - string - URL base for AS2 responses
|
141
|
+
# public_certificate (required) - string
|
142
|
+
# as2_station_id (required) - int64 - Id of As2Station for this partner
|
143
|
+
def self.create(params = {}, options = {})
|
144
|
+
raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
|
145
|
+
raise InvalidParameterError.new("Bad parameter: uri must be an String") if params.dig(:uri) and !params.dig(:uri).is_a?(String)
|
146
|
+
raise InvalidParameterError.new("Bad parameter: public_certificate must be an String") if params.dig(:public_certificate) and !params.dig(:public_certificate).is_a?(String)
|
147
|
+
raise InvalidParameterError.new("Bad parameter: as2_station_id must be an Integer") if params.dig(:as2_station_id) and !params.dig(:as2_station_id).is_a?(Integer)
|
148
|
+
raise MissingParameterError.new("Parameter missing: name") unless params.dig(:name)
|
149
|
+
raise MissingParameterError.new("Parameter missing: uri") unless params.dig(:uri)
|
150
|
+
raise MissingParameterError.new("Parameter missing: public_certificate") unless params.dig(:public_certificate)
|
151
|
+
raise MissingParameterError.new("Parameter missing: as2_station_id") unless params.dig(:as2_station_id)
|
152
|
+
|
153
|
+
response, options = Api.send_request("/as2_partners", :post, params, options)
|
154
|
+
As2Partner.new(response.data, options)
|
155
|
+
end
|
156
|
+
|
157
|
+
# Parameters:
|
158
|
+
# name - string - AS2 Name
|
159
|
+
# uri - string - URL base for AS2 responses
|
160
|
+
# public_certificate - string
|
161
|
+
def self.update(id, params = {}, options = {})
|
162
|
+
params ||= {}
|
163
|
+
params[:id] = id
|
164
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
165
|
+
raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
|
166
|
+
raise InvalidParameterError.new("Bad parameter: uri must be an String") if params.dig(:uri) and !params.dig(:uri).is_a?(String)
|
167
|
+
raise InvalidParameterError.new("Bad parameter: public_certificate must be an String") if params.dig(:public_certificate) and !params.dig(:public_certificate).is_a?(String)
|
168
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
169
|
+
|
170
|
+
response, options = Api.send_request("/as2_partners/#{params[:id]}", :patch, params, options)
|
171
|
+
As2Partner.new(response.data, options)
|
172
|
+
end
|
173
|
+
|
174
|
+
def self.delete(id, params = {}, options = {})
|
175
|
+
params ||= {}
|
176
|
+
params[:id] = id
|
177
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
178
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
179
|
+
|
180
|
+
response, _options = Api.send_request("/as2_partners/#{params[:id]}", :delete, params, options)
|
181
|
+
response.data
|
182
|
+
end
|
183
|
+
|
184
|
+
def self.destroy(id, params = {}, options = {})
|
185
|
+
delete(id, params, options)
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
@@ -0,0 +1,217 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Files
|
4
|
+
class As2Station
|
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 AS2 Station.
|
13
|
+
def id
|
14
|
+
@attributes[:id]
|
15
|
+
end
|
16
|
+
|
17
|
+
def id=(value)
|
18
|
+
@attributes[:id] = value
|
19
|
+
end
|
20
|
+
|
21
|
+
# string - The station's formal AS2 name.
|
22
|
+
def name
|
23
|
+
@attributes[:name]
|
24
|
+
end
|
25
|
+
|
26
|
+
def name=(value)
|
27
|
+
@attributes[:name] = value
|
28
|
+
end
|
29
|
+
|
30
|
+
# string - Public URI for sending AS2 message to.
|
31
|
+
def uri
|
32
|
+
@attributes[:uri]
|
33
|
+
end
|
34
|
+
|
35
|
+
def uri=(value)
|
36
|
+
@attributes[:uri] = value
|
37
|
+
end
|
38
|
+
|
39
|
+
# string - The station's AS2 domain name.
|
40
|
+
def domain
|
41
|
+
@attributes[:domain]
|
42
|
+
end
|
43
|
+
|
44
|
+
def domain=(value)
|
45
|
+
@attributes[:domain] = value
|
46
|
+
end
|
47
|
+
|
48
|
+
# string - Public certificate used for message security.
|
49
|
+
def public_certificate
|
50
|
+
@attributes[:public_certificate]
|
51
|
+
end
|
52
|
+
|
53
|
+
def public_certificate=(value)
|
54
|
+
@attributes[:public_certificate] = value
|
55
|
+
end
|
56
|
+
|
57
|
+
# string - MD5 hash of public certificate used for message security.
|
58
|
+
def public_certificate_md5
|
59
|
+
@attributes[:public_certificate_md5]
|
60
|
+
end
|
61
|
+
|
62
|
+
def public_certificate_md5=(value)
|
63
|
+
@attributes[:public_certificate_md5] = value
|
64
|
+
end
|
65
|
+
|
66
|
+
# string - MD5 hash of private key used for message security.
|
67
|
+
def private_key_md5
|
68
|
+
@attributes[:private_key_md5]
|
69
|
+
end
|
70
|
+
|
71
|
+
def private_key_md5=(value)
|
72
|
+
@attributes[:private_key_md5] = value
|
73
|
+
end
|
74
|
+
|
75
|
+
# string
|
76
|
+
def private_key
|
77
|
+
@attributes[:private_key]
|
78
|
+
end
|
79
|
+
|
80
|
+
def private_key=(value)
|
81
|
+
@attributes[:private_key] = value
|
82
|
+
end
|
83
|
+
|
84
|
+
# Parameters:
|
85
|
+
# name - string - AS2 Name
|
86
|
+
# domain - string - AS2 Domain
|
87
|
+
# uri - string - URL base for AS2 responses
|
88
|
+
# public_certificate - string
|
89
|
+
# private_key - string
|
90
|
+
def update(params = {})
|
91
|
+
params ||= {}
|
92
|
+
params[:id] = @attributes[:id]
|
93
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
94
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
95
|
+
raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
|
96
|
+
raise InvalidParameterError.new("Bad parameter: domain must be an String") if params.dig(:domain) and !params.dig(:domain).is_a?(String)
|
97
|
+
raise InvalidParameterError.new("Bad parameter: uri must be an String") if params.dig(:uri) and !params.dig(:uri).is_a?(String)
|
98
|
+
raise InvalidParameterError.new("Bad parameter: public_certificate must be an String") if params.dig(:public_certificate) and !params.dig(:public_certificate).is_a?(String)
|
99
|
+
raise InvalidParameterError.new("Bad parameter: private_key must be an String") if params.dig(:private_key) and !params.dig(:private_key).is_a?(String)
|
100
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
101
|
+
|
102
|
+
Api.send_request("/as2_stations/#{@attributes[:id]}", :patch, params, @options)
|
103
|
+
end
|
104
|
+
|
105
|
+
def delete(params = {})
|
106
|
+
params ||= {}
|
107
|
+
params[:id] = @attributes[:id]
|
108
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
109
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
110
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
111
|
+
|
112
|
+
Api.send_request("/as2_stations/#{@attributes[:id]}", :delete, params, @options)
|
113
|
+
end
|
114
|
+
|
115
|
+
def destroy(params = {})
|
116
|
+
delete(params)
|
117
|
+
end
|
118
|
+
|
119
|
+
def save
|
120
|
+
if @attributes[:id]
|
121
|
+
update(@attributes)
|
122
|
+
else
|
123
|
+
new_obj = As2Station.create(@attributes, @options)
|
124
|
+
@attributes = new_obj.attributes
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
# Parameters:
|
129
|
+
# 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.
|
130
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
131
|
+
def self.list(params = {}, options = {})
|
132
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
133
|
+
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
134
|
+
|
135
|
+
List.new(As2Station, params) do
|
136
|
+
Api.send_request("/as2_stations", :get, params, options)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
def self.all(params = {}, options = {})
|
141
|
+
list(params, options)
|
142
|
+
end
|
143
|
+
|
144
|
+
# Parameters:
|
145
|
+
# id (required) - int64 - As2 Station ID.
|
146
|
+
def self.find(id, params = {}, options = {})
|
147
|
+
params ||= {}
|
148
|
+
params[:id] = id
|
149
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
150
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
151
|
+
|
152
|
+
response, options = Api.send_request("/as2_stations/#{params[:id]}", :get, params, options)
|
153
|
+
As2Station.new(response.data, options)
|
154
|
+
end
|
155
|
+
|
156
|
+
def self.get(id, params = {}, options = {})
|
157
|
+
find(id, params, options)
|
158
|
+
end
|
159
|
+
|
160
|
+
# Parameters:
|
161
|
+
# name (required) - string - AS2 Name
|
162
|
+
# domain (required) - string - AS2 Domain
|
163
|
+
# uri (required) - string - URL base for AS2 responses
|
164
|
+
# public_certificate (required) - string
|
165
|
+
# private_key (required) - string
|
166
|
+
def self.create(params = {}, options = {})
|
167
|
+
raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
|
168
|
+
raise InvalidParameterError.new("Bad parameter: domain must be an String") if params.dig(:domain) and !params.dig(:domain).is_a?(String)
|
169
|
+
raise InvalidParameterError.new("Bad parameter: uri must be an String") if params.dig(:uri) and !params.dig(:uri).is_a?(String)
|
170
|
+
raise InvalidParameterError.new("Bad parameter: public_certificate must be an String") if params.dig(:public_certificate) and !params.dig(:public_certificate).is_a?(String)
|
171
|
+
raise InvalidParameterError.new("Bad parameter: private_key must be an String") if params.dig(:private_key) and !params.dig(:private_key).is_a?(String)
|
172
|
+
raise MissingParameterError.new("Parameter missing: name") unless params.dig(:name)
|
173
|
+
raise MissingParameterError.new("Parameter missing: domain") unless params.dig(:domain)
|
174
|
+
raise MissingParameterError.new("Parameter missing: uri") unless params.dig(:uri)
|
175
|
+
raise MissingParameterError.new("Parameter missing: public_certificate") unless params.dig(:public_certificate)
|
176
|
+
raise MissingParameterError.new("Parameter missing: private_key") unless params.dig(:private_key)
|
177
|
+
|
178
|
+
response, options = Api.send_request("/as2_stations", :post, params, options)
|
179
|
+
As2Station.new(response.data, options)
|
180
|
+
end
|
181
|
+
|
182
|
+
# Parameters:
|
183
|
+
# name - string - AS2 Name
|
184
|
+
# domain - string - AS2 Domain
|
185
|
+
# uri - string - URL base for AS2 responses
|
186
|
+
# public_certificate - string
|
187
|
+
# private_key - string
|
188
|
+
def self.update(id, params = {}, options = {})
|
189
|
+
params ||= {}
|
190
|
+
params[:id] = id
|
191
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
192
|
+
raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
|
193
|
+
raise InvalidParameterError.new("Bad parameter: domain must be an String") if params.dig(:domain) and !params.dig(:domain).is_a?(String)
|
194
|
+
raise InvalidParameterError.new("Bad parameter: uri must be an String") if params.dig(:uri) and !params.dig(:uri).is_a?(String)
|
195
|
+
raise InvalidParameterError.new("Bad parameter: public_certificate must be an String") if params.dig(:public_certificate) and !params.dig(:public_certificate).is_a?(String)
|
196
|
+
raise InvalidParameterError.new("Bad parameter: private_key must be an String") if params.dig(:private_key) and !params.dig(:private_key).is_a?(String)
|
197
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
198
|
+
|
199
|
+
response, options = Api.send_request("/as2_stations/#{params[:id]}", :patch, params, options)
|
200
|
+
As2Station.new(response.data, options)
|
201
|
+
end
|
202
|
+
|
203
|
+
def self.delete(id, params = {}, options = {})
|
204
|
+
params ||= {}
|
205
|
+
params[:id] = id
|
206
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
207
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
208
|
+
|
209
|
+
response, _options = Api.send_request("/as2_stations/#{params[:id]}", :delete, params, options)
|
210
|
+
response.data
|
211
|
+
end
|
212
|
+
|
213
|
+
def self.destroy(id, params = {}, options = {})
|
214
|
+
delete(id, params, options)
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
@@ -117,12 +117,12 @@ module Files
|
|
117
117
|
# 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.
|
118
118
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
119
119
|
# 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 `remote_server_type`, `site_id`, `folder_behavior_id`, `event_type`, `created_at` or `status`.
|
120
|
-
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`.
|
121
|
-
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`.
|
122
|
-
# filter_gteq - object - If set, return records where the specified field is greater than or equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`.
|
123
|
-
# filter_like - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`.
|
124
|
-
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`.
|
125
|
-
# filter_lteq - object - If set, return records where the specified field is less than or equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`.
|
120
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`. Valid field combinations are `[ event_type, status, created_at ]`, `[ event_type, created_at ]` or `[ status, created_at ]`.
|
121
|
+
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`. Valid field combinations are `[ event_type, status, created_at ]`, `[ event_type, created_at ]` or `[ status, created_at ]`.
|
122
|
+
# filter_gteq - object - If set, return records where the specified field is greater than or equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`. Valid field combinations are `[ event_type, status, created_at ]`, `[ event_type, created_at ]` or `[ status, created_at ]`.
|
123
|
+
# filter_like - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`. Valid field combinations are `[ event_type, status, created_at ]`, `[ event_type, created_at ]` or `[ status, created_at ]`.
|
124
|
+
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`. Valid field combinations are `[ event_type, status, created_at ]`, `[ event_type, created_at ]` or `[ status, created_at ]`.
|
125
|
+
# filter_lteq - object - If set, return records where the specified field is less than or equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`. Valid field combinations are `[ event_type, status, created_at ]`, `[ event_type, created_at ]` or `[ status, created_at ]`.
|
126
126
|
def self.list(params = {}, options = {})
|
127
127
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
128
128
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
@@ -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.`
|