files.com 1.0.228 → 1.0.232

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/_VERSION +1 -1
  3. data/docs/action_notification_export_result.md +1 -1
  4. data/docs/api_key.md +1 -1
  5. data/docs/app.md +7 -7
  6. data/docs/as2_incoming_message.md +55 -0
  7. data/docs/as2_outgoing_message.md +49 -0
  8. data/docs/as2_partner.md +136 -0
  9. data/docs/as2_station.md +148 -0
  10. data/docs/automation.md +1 -1
  11. data/docs/automation_run.md +1 -1
  12. data/docs/bandwidth_snapshot.md +1 -1
  13. data/docs/behavior.md +2 -2
  14. data/docs/bundle.md +1 -1
  15. data/docs/bundle_download.md +1 -1
  16. data/docs/bundle_recipient.md +1 -1
  17. data/docs/bundle_registration.md +1 -1
  18. data/docs/clickwrap.md +1 -1
  19. data/docs/dns_record.md +1 -1
  20. data/docs/external_event.md +7 -7
  21. data/docs/file_comment.md +1 -1
  22. data/docs/folder.md +1 -1
  23. data/docs/form_field_set.md +1 -1
  24. data/docs/group.md +1 -1
  25. data/docs/group_user.md +1 -1
  26. data/docs/history.md +5 -5
  27. data/docs/history_export.md +2 -2
  28. data/docs/history_export_result.md +2 -2
  29. data/docs/inbox_recipient.md +1 -1
  30. data/docs/inbox_registration.md +1 -1
  31. data/docs/inbox_upload.md +1 -1
  32. data/docs/invoice.md +1 -1
  33. data/docs/ip_address.md +2 -2
  34. data/docs/lock.md +1 -1
  35. data/docs/message.md +1 -1
  36. data/docs/message_comment.md +1 -1
  37. data/docs/message_comment_reaction.md +1 -1
  38. data/docs/message_reaction.md +1 -1
  39. data/docs/notification.md +1 -1
  40. data/docs/payment.md +1 -1
  41. data/docs/permission.md +7 -7
  42. data/docs/priority.md +1 -1
  43. data/docs/project.md +1 -1
  44. data/docs/public_key.md +1 -1
  45. data/docs/remote_server.md +1 -1
  46. data/docs/request.md +2 -2
  47. data/docs/settings_change.md +1 -1
  48. data/docs/sso_strategy.md +1 -1
  49. data/docs/sync_job.md +1 -1
  50. data/docs/usage_daily_snapshot.md +7 -7
  51. data/docs/usage_snapshot.md +1 -1
  52. data/docs/user.md +7 -7
  53. data/docs/user_cipher_use.md +1 -1
  54. data/docs/user_request.md +1 -1
  55. data/lib/files.com/errors.rb +1 -0
  56. data/lib/files.com/models/action_notification_export_result.rb +1 -1
  57. data/lib/files.com/models/api_key.rb +1 -1
  58. data/lib/files.com/models/app.rb +7 -7
  59. data/lib/files.com/models/as2_incoming_message.rb +100 -0
  60. data/lib/files.com/models/as2_outgoing_message.rb +85 -0
  61. data/lib/files.com/models/as2_partner.rb +188 -0
  62. data/lib/files.com/models/as2_station.rb +217 -0
  63. data/lib/files.com/models/automation.rb +1 -1
  64. data/lib/files.com/models/automation_run.rb +1 -1
  65. data/lib/files.com/models/bandwidth_snapshot.rb +1 -1
  66. data/lib/files.com/models/behavior.rb +2 -2
  67. data/lib/files.com/models/bundle.rb +1 -1
  68. data/lib/files.com/models/bundle_download.rb +1 -1
  69. data/lib/files.com/models/bundle_recipient.rb +1 -1
  70. data/lib/files.com/models/bundle_registration.rb +1 -1
  71. data/lib/files.com/models/clickwrap.rb +1 -1
  72. data/lib/files.com/models/dns_record.rb +1 -1
  73. data/lib/files.com/models/external_event.rb +7 -7
  74. data/lib/files.com/models/file_comment.rb +1 -1
  75. data/lib/files.com/models/folder.rb +1 -1
  76. data/lib/files.com/models/form_field_set.rb +1 -1
  77. data/lib/files.com/models/group.rb +1 -1
  78. data/lib/files.com/models/group_user.rb +1 -1
  79. data/lib/files.com/models/history.rb +5 -5
  80. data/lib/files.com/models/history_export.rb +2 -2
  81. data/lib/files.com/models/history_export_result.rb +2 -2
  82. data/lib/files.com/models/inbox_recipient.rb +1 -1
  83. data/lib/files.com/models/inbox_registration.rb +1 -1
  84. data/lib/files.com/models/inbox_upload.rb +1 -1
  85. data/lib/files.com/models/invoice.rb +1 -1
  86. data/lib/files.com/models/ip_address.rb +2 -2
  87. data/lib/files.com/models/lock.rb +1 -1
  88. data/lib/files.com/models/message.rb +1 -1
  89. data/lib/files.com/models/message_comment.rb +1 -1
  90. data/lib/files.com/models/message_comment_reaction.rb +1 -1
  91. data/lib/files.com/models/message_reaction.rb +1 -1
  92. data/lib/files.com/models/notification.rb +1 -1
  93. data/lib/files.com/models/payment.rb +1 -1
  94. data/lib/files.com/models/permission.rb +7 -7
  95. data/lib/files.com/models/priority.rb +1 -1
  96. data/lib/files.com/models/project.rb +1 -1
  97. data/lib/files.com/models/public_key.rb +1 -1
  98. data/lib/files.com/models/remote_server.rb +1 -1
  99. data/lib/files.com/models/request.rb +2 -2
  100. data/lib/files.com/models/settings_change.rb +1 -1
  101. data/lib/files.com/models/sso_strategy.rb +1 -1
  102. data/lib/files.com/models/sync_job.rb +1 -1
  103. data/lib/files.com/models/usage_daily_snapshot.rb +7 -7
  104. data/lib/files.com/models/usage_snapshot.rb +1 -1
  105. data/lib/files.com/models/user.rb +7 -7
  106. data/lib/files.com/models/user_cipher_use.rb +1 -1
  107. data/lib/files.com/models/user_request.rb +1 -1
  108. data/lib/files.com.rb +4 -1
  109. metadata +11 -5
  110. data/docs/as2_key.md +0 -131
  111. data/lib/files.com/models/as2_key.rb +0 -176
@@ -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
@@ -257,7 +257,7 @@ module Files
257
257
  end
258
258
 
259
259
  # Parameters:
260
- # 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.
260
+ # 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.
261
261
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
262
262
  # 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 `automation`.
263
263
  # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `automation`.
@@ -41,7 +41,7 @@ module Files
41
41
 
42
42
  # Parameters:
43
43
  # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
44
- # 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.
44
+ # 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.
45
45
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
46
46
  # 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 `created_at` and `status`.
47
47
  # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `status`.
@@ -65,7 +65,7 @@ module Files
65
65
  end
66
66
 
67
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 the X-Files-Cursor-Next header.
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
69
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
70
70
  # 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 `logged_at`.
71
71
  # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `logged_at`.
@@ -137,7 +137,7 @@ module Files
137
137
  end
138
138
 
139
139
  # Parameters:
140
- # 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.
140
+ # 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.
141
141
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
142
142
  # 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 `behavior`.
143
143
  # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `behavior`.
@@ -185,7 +185,7 @@ module Files
185
185
  end
186
186
 
187
187
  # Parameters:
188
- # 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.
188
+ # 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.
189
189
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
190
190
  # 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 `behavior`.
191
191
  # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `behavior`.
@@ -319,7 +319,7 @@ module Files
319
319
 
320
320
  # Parameters:
321
321
  # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
322
- # 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.
322
+ # 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.
323
323
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
324
324
  # 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 `created_at` and `code`.
325
325
  # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`.
@@ -29,7 +29,7 @@ module Files
29
29
  end
30
30
 
31
31
  # Parameters:
32
- # 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.
32
+ # 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.
33
33
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
34
34
  # 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 `created_at`.
35
35
  # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`.
@@ -92,7 +92,7 @@ module Files
92
92
 
93
93
  # Parameters:
94
94
  # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
95
- # 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.
95
+ # 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.
96
96
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
97
97
  # 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 `has_registrations`.
98
98
  # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `has_registrations`.
@@ -71,7 +71,7 @@ module Files
71
71
 
72
72
  # Parameters:
73
73
  # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
74
- # 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.
74
+ # 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.
75
75
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
76
76
  # bundle_id - int64 - ID of the associated Bundle
77
77
  def self.list(params = {}, options = {})
@@ -108,7 +108,7 @@ module Files
108
108
  end
109
109
 
110
110
  # Parameters:
111
- # 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.
111
+ # 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.
112
112
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
113
113
  def self.list(params = {}, options = {})
114
114
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
@@ -30,7 +30,7 @@ module Files
30
30
  end
31
31
 
32
32
  # Parameters:
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.
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
  def self.list(params = {}, options = {})
36
36
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
@@ -114,15 +114,15 @@ module Files
114
114
  end
115
115
 
116
116
  # Parameters:
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 the X-Files-Cursor-Next header.
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)
@@ -83,7 +83,7 @@ module Files
83
83
  end
84
84
 
85
85
  # Parameters:
86
- # 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.
86
+ # 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.
87
87
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
88
88
  # path (required) - string - Path to operate on.
89
89
  def self.list_for(path, params = {}, options = {})
@@ -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.