mailslurp_client 12.4.8 → 12.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6fb662cb980ab4a78dee0f1d4579088d6f262d2180d033a870060fcb95a2f589
4
- data.tar.gz: 25f7bf765b1f9438d683247acaca453b0179e3eab713145625b2665f45270056
3
+ metadata.gz: 1f4c251e8d9770dcc756b6ba7a0c71e767d13f060d9b33b9da598dde860c082c
4
+ data.tar.gz: 3ba897df96fa42b4e9877fd4a6f74e5106254ebb66d60cc736f086b8e7bb5852
5
5
  SHA512:
6
- metadata.gz: 57b68b1b203734f9ad210f486520f956e1853408e353c257cb9af7ca26ae44e07f58781c9b8edccb3789d51f4ed374732160ae18340b09f2cdfa0cfdb40a7784
7
- data.tar.gz: 38129fccd2eac6cf467a1bdca3e673bfc194e1cf994c9390b69eb644bbdf33ca34ee7c40aa1cc5150f03b32a98acc5aa01329e3617efd1f8097678f6cfbc3991
6
+ metadata.gz: 138024d869681d4363dbd60dc6228e6a684bafb453403fe3523808e19d767e96536fdad8cd7658b044c137225a659b9a19ce0770434da49a8e920593ddfacca7
7
+ data.tar.gz: 4477af048095c3904d33a62f724b8dc4c94e6c7a4a8757e56d0585f6de12cd23e9c7750e9c6094732c493743069a3602dfdef8c7b96594fff70f5179b6eb7adf
@@ -33,6 +33,7 @@ require 'mailslurp_client/models/create_contact_options'
33
33
  require 'mailslurp_client/models/create_domain_options'
34
34
  require 'mailslurp_client/models/create_group_options'
35
35
  require 'mailslurp_client/models/create_inbox_dto'
36
+ require 'mailslurp_client/models/create_inbox_ruleset_options'
36
37
  require 'mailslurp_client/models/create_template_options'
37
38
  require 'mailslurp_client/models/create_webhook_options'
38
39
  require 'mailslurp_client/models/dns_lookup_options'
@@ -64,6 +65,8 @@ require 'mailslurp_client/models/html_validation_result'
64
65
  require 'mailslurp_client/models/ip_address_result'
65
66
  require 'mailslurp_client/models/inbox'
66
67
  require 'mailslurp_client/models/inbox_projection'
68
+ require 'mailslurp_client/models/inbox_ruleset_dto'
69
+ require 'mailslurp_client/models/inbox_ruleset_projection'
67
70
  require 'mailslurp_client/models/match_option'
68
71
  require 'mailslurp_client/models/match_options'
69
72
  require 'mailslurp_client/models/missed_email'
@@ -79,6 +82,7 @@ require 'mailslurp_client/models/page_email_projection'
79
82
  require 'mailslurp_client/models/page_expired_inbox_record_projection'
80
83
  require 'mailslurp_client/models/page_group_projection'
81
84
  require 'mailslurp_client/models/page_inbox_projection'
85
+ require 'mailslurp_client/models/page_inbox_ruleset_projection'
82
86
  require 'mailslurp_client/models/page_missed_email_projection'
83
87
  require 'mailslurp_client/models/page_organization_inbox_projection'
84
88
  require 'mailslurp_client/models/page_sent_email_projection'
@@ -133,6 +137,7 @@ require 'mailslurp_client/api/export_controller_api'
133
137
  require 'mailslurp_client/api/form_controller_api'
134
138
  require 'mailslurp_client/api/group_controller_api'
135
139
  require 'mailslurp_client/api/inbox_controller_api'
140
+ require 'mailslurp_client/api/inbox_ruleset_controller_api'
136
141
  require 'mailslurp_client/api/mail_server_controller_api'
137
142
  require 'mailslurp_client/api/missed_email_controller_api'
138
143
  require 'mailslurp_client/api/sent_emails_controller_api'
@@ -109,6 +109,74 @@ module MailSlurpClient
109
109
  return data, status_code, headers
110
110
  end
111
111
 
112
+ # Create an inbox ruleset
113
+ # Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
114
+ # @param inbox_id [String] inboxId
115
+ # @param create_inbox_ruleset_options [CreateInboxRulesetOptions] createInboxRulesetOptions
116
+ # @param [Hash] opts the optional parameters
117
+ # @return [nil]
118
+ def create_inbox_ruleset(inbox_id, create_inbox_ruleset_options, opts = {})
119
+ create_inbox_ruleset_with_http_info(inbox_id, create_inbox_ruleset_options, opts)
120
+ nil
121
+ end
122
+
123
+ # Create an inbox ruleset
124
+ # Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
125
+ # @param inbox_id [String] inboxId
126
+ # @param create_inbox_ruleset_options [CreateInboxRulesetOptions] createInboxRulesetOptions
127
+ # @param [Hash] opts the optional parameters
128
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
129
+ def create_inbox_ruleset_with_http_info(inbox_id, create_inbox_ruleset_options, opts = {})
130
+ if @api_client.config.debugging
131
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.create_inbox_ruleset ...'
132
+ end
133
+ # verify the required parameter 'inbox_id' is set
134
+ if @api_client.config.client_side_validation && inbox_id.nil?
135
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.create_inbox_ruleset"
136
+ end
137
+ # verify the required parameter 'create_inbox_ruleset_options' is set
138
+ if @api_client.config.client_side_validation && create_inbox_ruleset_options.nil?
139
+ fail ArgumentError, "Missing the required parameter 'create_inbox_ruleset_options' when calling InboxControllerApi.create_inbox_ruleset"
140
+ end
141
+ # resource path
142
+ local_var_path = '/inboxes/{inboxId}/rulesets'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
143
+
144
+ # query parameters
145
+ query_params = opts[:query_params] || {}
146
+
147
+ # header parameters
148
+ header_params = opts[:header_params] || {}
149
+ # HTTP header 'Content-Type'
150
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
151
+
152
+ # form parameters
153
+ form_params = opts[:form_params] || {}
154
+
155
+ # http body (model)
156
+ post_body = opts[:body] || @api_client.object_to_http_body(create_inbox_ruleset_options)
157
+
158
+ # return_type
159
+ return_type = opts[:return_type]
160
+
161
+ # auth_names
162
+ auth_names = opts[:auth_names] || ['API_KEY']
163
+
164
+ new_options = opts.merge(
165
+ :header_params => header_params,
166
+ :query_params => query_params,
167
+ :form_params => form_params,
168
+ :body => post_body,
169
+ :auth_names => auth_names,
170
+ :return_type => return_type
171
+ )
172
+
173
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug "API called: InboxControllerApi#create_inbox_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
176
+ end
177
+ return data, status_code, headers
178
+ end
179
+
112
180
  # Create an inbox with default options. Uses MailSlurp domain pool address and is private.
113
181
  # @param [Hash] opts the optional parameters
114
182
  # @return [Inbox]
@@ -915,6 +983,79 @@ module MailSlurpClient
915
983
  return data, status_code, headers
916
984
  end
917
985
 
986
+ # List inbox rulesets
987
+ # List all rulesets attached to an inbox
988
+ # @param inbox_id [String] inboxId
989
+ # @param [Hash] opts the optional parameters
990
+ # @option opts [Integer] :page Optional page index in inbox ruleset list pagination (default to 0)
991
+ # @option opts [Integer] :size Optional page size in inbox ruleset list pagination (default to 20)
992
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
993
+ # @return [nil]
994
+ def list_inbox_rulesets(inbox_id, opts = {})
995
+ list_inbox_rulesets_with_http_info(inbox_id, opts)
996
+ nil
997
+ end
998
+
999
+ # List inbox rulesets
1000
+ # List all rulesets attached to an inbox
1001
+ # @param inbox_id [String] inboxId
1002
+ # @param [Hash] opts the optional parameters
1003
+ # @option opts [Integer] :page Optional page index in inbox ruleset list pagination
1004
+ # @option opts [Integer] :size Optional page size in inbox ruleset list pagination
1005
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
1006
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1007
+ def list_inbox_rulesets_with_http_info(inbox_id, opts = {})
1008
+ if @api_client.config.debugging
1009
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.list_inbox_rulesets ...'
1010
+ end
1011
+ # verify the required parameter 'inbox_id' is set
1012
+ if @api_client.config.client_side_validation && inbox_id.nil?
1013
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.list_inbox_rulesets"
1014
+ end
1015
+ allowable_values = ["ASC", "DESC"]
1016
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1017
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1018
+ end
1019
+ # resource path
1020
+ local_var_path = '/inboxes/{inboxId}/rulesets'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
1021
+
1022
+ # query parameters
1023
+ query_params = opts[:query_params] || {}
1024
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1025
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
1026
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1027
+
1028
+ # header parameters
1029
+ header_params = opts[:header_params] || {}
1030
+
1031
+ # form parameters
1032
+ form_params = opts[:form_params] || {}
1033
+
1034
+ # http body (model)
1035
+ post_body = opts[:body]
1036
+
1037
+ # return_type
1038
+ return_type = opts[:return_type]
1039
+
1040
+ # auth_names
1041
+ auth_names = opts[:auth_names] || ['API_KEY']
1042
+
1043
+ new_options = opts.merge(
1044
+ :header_params => header_params,
1045
+ :query_params => query_params,
1046
+ :form_params => form_params,
1047
+ :body => post_body,
1048
+ :auth_names => auth_names,
1049
+ :return_type => return_type
1050
+ )
1051
+
1052
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1053
+ if @api_client.config.debugging
1054
+ @api_client.config.logger.debug "API called: InboxControllerApi#list_inbox_rulesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1055
+ end
1056
+ return data, status_code, headers
1057
+ end
1058
+
918
1059
  # Send Email
919
1060
  # Send an email from an inbox's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`.
920
1061
  # @param inbox_id [String] ID of the inbox you want to send the email from
@@ -0,0 +1,340 @@
1
+ =begin
2
+ #MailSlurp API
3
+
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
+
6
+ The version of the OpenAPI document: 6.5.2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module MailSlurpClient
16
+ class InboxRulesetControllerApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create an inbox ruleset
23
+ # Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
24
+ # @param create_inbox_ruleset_options [CreateInboxRulesetOptions] createInboxRulesetOptions
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :inbox_id Inbox id to attach ruleset to
27
+ # @return [InboxRulesetDto]
28
+ def create_new_inbox_ruleset(create_inbox_ruleset_options, opts = {})
29
+ data, _status_code, _headers = create_new_inbox_ruleset_with_http_info(create_inbox_ruleset_options, opts)
30
+ data
31
+ end
32
+
33
+ # Create an inbox ruleset
34
+ # Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
35
+ # @param create_inbox_ruleset_options [CreateInboxRulesetOptions] createInboxRulesetOptions
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :inbox_id Inbox id to attach ruleset to
38
+ # @return [Array<(InboxRulesetDto, Integer, Hash)>] InboxRulesetDto data, response status code and response headers
39
+ def create_new_inbox_ruleset_with_http_info(create_inbox_ruleset_options, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: InboxRulesetControllerApi.create_new_inbox_ruleset ...'
42
+ end
43
+ # verify the required parameter 'create_inbox_ruleset_options' is set
44
+ if @api_client.config.client_side_validation && create_inbox_ruleset_options.nil?
45
+ fail ArgumentError, "Missing the required parameter 'create_inbox_ruleset_options' when calling InboxRulesetControllerApi.create_new_inbox_ruleset"
46
+ end
47
+ # resource path
48
+ local_var_path = '/rulesets'
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+ query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
53
+
54
+ # header parameters
55
+ header_params = opts[:header_params] || {}
56
+ # HTTP header 'Accept' (if needed)
57
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
58
+ # HTTP header 'Content-Type'
59
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:body] || @api_client.object_to_http_body(create_inbox_ruleset_options)
66
+
67
+ # return_type
68
+ return_type = opts[:return_type] || 'InboxRulesetDto'
69
+
70
+ # auth_names
71
+ auth_names = opts[:auth_names] || ['API_KEY']
72
+
73
+ new_options = opts.merge(
74
+ :header_params => header_params,
75
+ :query_params => query_params,
76
+ :form_params => form_params,
77
+ :body => post_body,
78
+ :auth_names => auth_names,
79
+ :return_type => return_type
80
+ )
81
+
82
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "API called: InboxRulesetControllerApi#create_new_inbox_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ return data, status_code, headers
87
+ end
88
+
89
+ # Delete an inbox ruleset
90
+ # Delete inbox ruleset
91
+ # @param id [String] ID of inbox ruleset
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [nil]
94
+ def delete_inbox_ruleset(id, opts = {})
95
+ delete_inbox_ruleset_with_http_info(id, opts)
96
+ nil
97
+ end
98
+
99
+ # Delete an inbox ruleset
100
+ # Delete inbox ruleset
101
+ # @param id [String] ID of inbox ruleset
102
+ # @param [Hash] opts the optional parameters
103
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
104
+ def delete_inbox_ruleset_with_http_info(id, opts = {})
105
+ if @api_client.config.debugging
106
+ @api_client.config.logger.debug 'Calling API: InboxRulesetControllerApi.delete_inbox_ruleset ...'
107
+ end
108
+ # verify the required parameter 'id' is set
109
+ if @api_client.config.client_side_validation && id.nil?
110
+ fail ArgumentError, "Missing the required parameter 'id' when calling InboxRulesetControllerApi.delete_inbox_ruleset"
111
+ end
112
+ # resource path
113
+ local_var_path = '/rulesets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
114
+
115
+ # query parameters
116
+ query_params = opts[:query_params] || {}
117
+
118
+ # header parameters
119
+ header_params = opts[:header_params] || {}
120
+
121
+ # form parameters
122
+ form_params = opts[:form_params] || {}
123
+
124
+ # http body (model)
125
+ post_body = opts[:body]
126
+
127
+ # return_type
128
+ return_type = opts[:return_type]
129
+
130
+ # auth_names
131
+ auth_names = opts[:auth_names] || ['API_KEY']
132
+
133
+ new_options = opts.merge(
134
+ :header_params => header_params,
135
+ :query_params => query_params,
136
+ :form_params => form_params,
137
+ :body => post_body,
138
+ :auth_names => auth_names,
139
+ :return_type => return_type
140
+ )
141
+
142
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
143
+ if @api_client.config.debugging
144
+ @api_client.config.logger.debug "API called: InboxRulesetControllerApi#delete_inbox_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
145
+ end
146
+ return data, status_code, headers
147
+ end
148
+
149
+ # Delete inbox rulesets
150
+ # Delete inbox rulesets. Accepts optional inboxId filter.
151
+ # @param [Hash] opts the optional parameters
152
+ # @option opts [String] :inbox_id Optional inbox id to attach ruleset to
153
+ # @return [nil]
154
+ def delete_inbox_rulesets(opts = {})
155
+ delete_inbox_rulesets_with_http_info(opts)
156
+ nil
157
+ end
158
+
159
+ # Delete inbox rulesets
160
+ # Delete inbox rulesets. Accepts optional inboxId filter.
161
+ # @param [Hash] opts the optional parameters
162
+ # @option opts [String] :inbox_id Optional inbox id to attach ruleset to
163
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
164
+ def delete_inbox_rulesets_with_http_info(opts = {})
165
+ if @api_client.config.debugging
166
+ @api_client.config.logger.debug 'Calling API: InboxRulesetControllerApi.delete_inbox_rulesets ...'
167
+ end
168
+ # resource path
169
+ local_var_path = '/rulesets'
170
+
171
+ # query parameters
172
+ query_params = opts[:query_params] || {}
173
+ query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
174
+
175
+ # header parameters
176
+ header_params = opts[:header_params] || {}
177
+
178
+ # form parameters
179
+ form_params = opts[:form_params] || {}
180
+
181
+ # http body (model)
182
+ post_body = opts[:body]
183
+
184
+ # return_type
185
+ return_type = opts[:return_type]
186
+
187
+ # auth_names
188
+ auth_names = opts[:auth_names] || ['API_KEY']
189
+
190
+ new_options = opts.merge(
191
+ :header_params => header_params,
192
+ :query_params => query_params,
193
+ :form_params => form_params,
194
+ :body => post_body,
195
+ :auth_names => auth_names,
196
+ :return_type => return_type
197
+ )
198
+
199
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
200
+ if @api_client.config.debugging
201
+ @api_client.config.logger.debug "API called: InboxRulesetControllerApi#delete_inbox_rulesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
202
+ end
203
+ return data, status_code, headers
204
+ end
205
+
206
+ # Get an inbox ruleset
207
+ # Get inbox ruleset
208
+ # @param id [String] ID of inbox ruleset
209
+ # @param [Hash] opts the optional parameters
210
+ # @return [InboxRulesetDto]
211
+ def get_inbox_ruleset(id, opts = {})
212
+ data, _status_code, _headers = get_inbox_ruleset_with_http_info(id, opts)
213
+ data
214
+ end
215
+
216
+ # Get an inbox ruleset
217
+ # Get inbox ruleset
218
+ # @param id [String] ID of inbox ruleset
219
+ # @param [Hash] opts the optional parameters
220
+ # @return [Array<(InboxRulesetDto, Integer, Hash)>] InboxRulesetDto data, response status code and response headers
221
+ def get_inbox_ruleset_with_http_info(id, opts = {})
222
+ if @api_client.config.debugging
223
+ @api_client.config.logger.debug 'Calling API: InboxRulesetControllerApi.get_inbox_ruleset ...'
224
+ end
225
+ # verify the required parameter 'id' is set
226
+ if @api_client.config.client_side_validation && id.nil?
227
+ fail ArgumentError, "Missing the required parameter 'id' when calling InboxRulesetControllerApi.get_inbox_ruleset"
228
+ end
229
+ # resource path
230
+ local_var_path = '/rulesets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
231
+
232
+ # query parameters
233
+ query_params = opts[:query_params] || {}
234
+
235
+ # header parameters
236
+ header_params = opts[:header_params] || {}
237
+ # HTTP header 'Accept' (if needed)
238
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
239
+
240
+ # form parameters
241
+ form_params = opts[:form_params] || {}
242
+
243
+ # http body (model)
244
+ post_body = opts[:body]
245
+
246
+ # return_type
247
+ return_type = opts[:return_type] || 'InboxRulesetDto'
248
+
249
+ # auth_names
250
+ auth_names = opts[:auth_names] || ['API_KEY']
251
+
252
+ new_options = opts.merge(
253
+ :header_params => header_params,
254
+ :query_params => query_params,
255
+ :form_params => form_params,
256
+ :body => post_body,
257
+ :auth_names => auth_names,
258
+ :return_type => return_type
259
+ )
260
+
261
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
262
+ if @api_client.config.debugging
263
+ @api_client.config.logger.debug "API called: InboxRulesetControllerApi#get_inbox_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
264
+ end
265
+ return data, status_code, headers
266
+ end
267
+
268
+ # List inbox rulesets
269
+ # List all rulesets attached to an inbox
270
+ # @param [Hash] opts the optional parameters
271
+ # @option opts [String] :inbox_id Optional inbox id to get rulesets from
272
+ # @option opts [Integer] :page Optional page index in inbox ruleset list pagination (default to 0)
273
+ # @option opts [Integer] :size Optional page size in inbox ruleset list pagination (default to 20)
274
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
275
+ # @return [PageInboxRulesetProjection]
276
+ def get_inbox_rulesets(opts = {})
277
+ data, _status_code, _headers = get_inbox_rulesets_with_http_info(opts)
278
+ data
279
+ end
280
+
281
+ # List inbox rulesets
282
+ # List all rulesets attached to an inbox
283
+ # @param [Hash] opts the optional parameters
284
+ # @option opts [String] :inbox_id Optional inbox id to get rulesets from
285
+ # @option opts [Integer] :page Optional page index in inbox ruleset list pagination
286
+ # @option opts [Integer] :size Optional page size in inbox ruleset list pagination
287
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
288
+ # @return [Array<(PageInboxRulesetProjection, Integer, Hash)>] PageInboxRulesetProjection data, response status code and response headers
289
+ def get_inbox_rulesets_with_http_info(opts = {})
290
+ if @api_client.config.debugging
291
+ @api_client.config.logger.debug 'Calling API: InboxRulesetControllerApi.get_inbox_rulesets ...'
292
+ end
293
+ allowable_values = ["ASC", "DESC"]
294
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
295
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
296
+ end
297
+ # resource path
298
+ local_var_path = '/rulesets'
299
+
300
+ # query parameters
301
+ query_params = opts[:query_params] || {}
302
+ query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
303
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
304
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
305
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
306
+
307
+ # header parameters
308
+ header_params = opts[:header_params] || {}
309
+ # HTTP header 'Accept' (if needed)
310
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
311
+
312
+ # form parameters
313
+ form_params = opts[:form_params] || {}
314
+
315
+ # http body (model)
316
+ post_body = opts[:body]
317
+
318
+ # return_type
319
+ return_type = opts[:return_type] || 'PageInboxRulesetProjection'
320
+
321
+ # auth_names
322
+ auth_names = opts[:auth_names] || ['API_KEY']
323
+
324
+ new_options = opts.merge(
325
+ :header_params => header_params,
326
+ :query_params => query_params,
327
+ :form_params => form_params,
328
+ :body => post_body,
329
+ :auth_names => auth_names,
330
+ :return_type => return_type
331
+ )
332
+
333
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
334
+ if @api_client.config.debugging
335
+ @api_client.config.logger.debug "API called: InboxRulesetControllerApi#get_inbox_rulesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
336
+ end
337
+ return data, status_code, headers
338
+ end
339
+ end
340
+ end