mailslurp_client 15.9.0 → 15.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mailslurp_client/api/api_user_controller_api.rb +74 -0
- data/lib/mailslurp_client/api/attachment_controller_api.rb +4 -4
- data/lib/mailslurp_client/api/email_controller_api.rb +68 -3
- data/lib/mailslurp_client/api/inbox_controller_api.rb +138 -0
- data/lib/mailslurp_client/api/missed_email_controller_api.rb +56 -0
- data/lib/mailslurp_client/api/phone_controller_api.rb +487 -0
- data/lib/mailslurp_client/api/sent_emails_controller_api.rb +73 -0
- data/lib/mailslurp_client/api/sms_controller_api.rb +286 -0
- data/lib/mailslurp_client/api/template_controller_api.rb +124 -0
- data/lib/mailslurp_client/api/wait_for_controller_api.rb +64 -0
- data/lib/mailslurp_client/api/webhook_controller_api.rb +2 -2
- data/lib/mailslurp_client/models/abstract_webhook_payload.rb +2 -2
- data/lib/mailslurp_client/models/alias_projection.rb +31 -31
- data/lib/mailslurp_client/models/attachment_entity.rb +10 -1
- data/lib/mailslurp_client/models/attachment_projection.rb +14 -14
- data/lib/mailslurp_client/models/bounce_projection.rb +31 -4
- data/lib/mailslurp_client/models/{bounce_recipient.rb → bounce_recipient_projection.rb} +35 -36
- data/lib/mailslurp_client/models/bounced_email_dto.rb +19 -1
- data/lib/mailslurp_client/models/bounced_recipient_dto.rb +37 -1
- data/lib/mailslurp_client/models/contact_projection.rb +18 -13
- data/lib/mailslurp_client/models/create_emergency_address_options.rb +324 -0
- data/lib/mailslurp_client/models/create_webhook_options.rb +2 -2
- data/lib/mailslurp_client/models/email_html_dto.rb +215 -0
- data/lib/mailslurp_client/models/email_preview.rb +5 -0
- data/lib/mailslurp_client/models/email_projection.rb +29 -19
- data/lib/mailslurp_client/models/emergency_address.rb +408 -0
- data/lib/mailslurp_client/models/emergency_address_dto.rb +273 -0
- data/lib/mailslurp_client/models/empty_response_dto.rb +206 -0
- data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +15 -15
- data/lib/mailslurp_client/models/inbox_by_name_result.rb +221 -0
- data/lib/mailslurp_client/models/inbox_dto.rb +11 -1
- data/lib/mailslurp_client/models/inbox_preview.rb +5 -0
- data/lib/mailslurp_client/models/missed_email.rb +37 -1
- data/lib/mailslurp_client/models/organization_inbox_projection.rb +5 -0
- data/lib/mailslurp_client/models/page_alias.rb +22 -22
- data/lib/mailslurp_client/models/page_attachment_entity.rb +22 -22
- data/lib/mailslurp_client/models/page_bounced_email.rb +22 -22
- data/lib/mailslurp_client/models/page_bounced_recipients.rb +23 -23
- data/lib/mailslurp_client/models/page_contact_projection.rb +22 -22
- data/lib/mailslurp_client/models/page_email_preview.rb +22 -22
- data/lib/mailslurp_client/models/page_email_projection.rb +22 -22
- data/lib/mailslurp_client/models/page_email_validation_request.rb +22 -22
- data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +22 -22
- data/lib/mailslurp_client/models/page_group_projection.rb +22 -22
- data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +22 -22
- data/lib/mailslurp_client/models/page_inbox_projection.rb +22 -22
- data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +22 -22
- data/lib/mailslurp_client/models/page_missed_email_projection.rb +22 -22
- data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +22 -22
- data/lib/mailslurp_client/models/page_phone_number_projection.rb +308 -0
- data/lib/mailslurp_client/models/page_sent_email_projection.rb +16 -16
- data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +344 -0
- data/lib/mailslurp_client/models/page_sms_projection.rb +308 -0
- data/lib/mailslurp_client/models/page_template_projection.rb +22 -22
- data/lib/mailslurp_client/models/page_thread_projection.rb +22 -22
- data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +22 -22
- data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +22 -22
- data/lib/mailslurp_client/models/page_webhook_projection.rb +22 -22
- data/lib/mailslurp_client/models/page_webhook_result.rb +22 -22
- data/lib/mailslurp_client/models/phone_number_dto.rb +347 -0
- data/lib/mailslurp_client/models/phone_number_projection.rb +302 -0
- data/lib/mailslurp_client/models/phone_plan_dto.rb +287 -0
- data/lib/mailslurp_client/models/send_with_queue_result.rb +318 -0
- data/lib/mailslurp_client/models/sent_email_projection.rb +18 -13
- data/lib/mailslurp_client/models/sms_match_option.rb +289 -0
- data/lib/mailslurp_client/models/sms_message.rb +318 -0
- data/lib/mailslurp_client/models/sms_preview.rb +267 -0
- data/lib/mailslurp_client/models/sms_projection.rb +282 -0
- data/lib/mailslurp_client/models/template_preview.rb +211 -0
- data/lib/mailslurp_client/models/template_projection.rb +18 -18
- data/lib/mailslurp_client/models/thread_projection.rb +36 -36
- data/lib/mailslurp_client/models/tracking_pixel_projection.rb +19 -19
- data/lib/mailslurp_client/models/user_info_dto.rb +334 -0
- data/lib/mailslurp_client/models/wait_for_sms_conditions.rb +371 -0
- data/lib/mailslurp_client/models/webhook_bounce_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_bounce_recipient_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_dto.rb +2 -2
- data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_email_read_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +7 -2
- data/lib/mailslurp_client/models/webhook_new_email_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_projection.rb +2 -2
- data/lib/mailslurp_client/models/webhook_result_dto.rb +7 -2
- data/lib/mailslurp_client/version.rb +1 -1
- data/lib/mailslurp_client.rb +24 -1
- metadata +26 -3
@@ -0,0 +1,487 @@
|
|
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://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 6.5.2
|
7
|
+
Contact: contact@mailslurp.dev
|
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 PhoneControllerApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# @param create_emergency_address_options [CreateEmergencyAddressOptions]
|
23
|
+
# @param [Hash] opts the optional parameters
|
24
|
+
# @return [EmergencyAddress]
|
25
|
+
def create_emergency_address(create_emergency_address_options, opts = {})
|
26
|
+
data, _status_code, _headers = create_emergency_address_with_http_info(create_emergency_address_options, opts)
|
27
|
+
data
|
28
|
+
end
|
29
|
+
|
30
|
+
# @param create_emergency_address_options [CreateEmergencyAddressOptions]
|
31
|
+
# @param [Hash] opts the optional parameters
|
32
|
+
# @return [Array<(EmergencyAddress, Integer, Hash)>] EmergencyAddress data, response status code and response headers
|
33
|
+
def create_emergency_address_with_http_info(create_emergency_address_options, opts = {})
|
34
|
+
if @api_client.config.debugging
|
35
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.create_emergency_address ...'
|
36
|
+
end
|
37
|
+
# verify the required parameter 'create_emergency_address_options' is set
|
38
|
+
if @api_client.config.client_side_validation && create_emergency_address_options.nil?
|
39
|
+
fail ArgumentError, "Missing the required parameter 'create_emergency_address_options' when calling PhoneControllerApi.create_emergency_address"
|
40
|
+
end
|
41
|
+
# resource path
|
42
|
+
local_var_path = '/phone/emergency-addresses'
|
43
|
+
|
44
|
+
# query parameters
|
45
|
+
query_params = opts[:query_params] || {}
|
46
|
+
|
47
|
+
# header parameters
|
48
|
+
header_params = opts[:header_params] || {}
|
49
|
+
# HTTP header 'Accept' (if needed)
|
50
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
51
|
+
# HTTP header 'Content-Type'
|
52
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
53
|
+
|
54
|
+
# form parameters
|
55
|
+
form_params = opts[:form_params] || {}
|
56
|
+
|
57
|
+
# http body (model)
|
58
|
+
post_body = opts[:body] || @api_client.object_to_http_body(create_emergency_address_options)
|
59
|
+
|
60
|
+
# return_type
|
61
|
+
return_type = opts[:return_type] || 'EmergencyAddress'
|
62
|
+
|
63
|
+
# auth_names
|
64
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
65
|
+
|
66
|
+
new_options = opts.merge(
|
67
|
+
:header_params => header_params,
|
68
|
+
:query_params => query_params,
|
69
|
+
:form_params => form_params,
|
70
|
+
:body => post_body,
|
71
|
+
:auth_names => auth_names,
|
72
|
+
:return_type => return_type
|
73
|
+
)
|
74
|
+
|
75
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
76
|
+
if @api_client.config.debugging
|
77
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#create_emergency_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
78
|
+
end
|
79
|
+
return data, status_code, headers
|
80
|
+
end
|
81
|
+
|
82
|
+
# @param address_id [String]
|
83
|
+
# @param [Hash] opts the optional parameters
|
84
|
+
# @return [EmptyResponseDto]
|
85
|
+
def delete_emergency_address(address_id, opts = {})
|
86
|
+
data, _status_code, _headers = delete_emergency_address_with_http_info(address_id, opts)
|
87
|
+
data
|
88
|
+
end
|
89
|
+
|
90
|
+
# @param address_id [String]
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @return [Array<(EmptyResponseDto, Integer, Hash)>] EmptyResponseDto data, response status code and response headers
|
93
|
+
def delete_emergency_address_with_http_info(address_id, opts = {})
|
94
|
+
if @api_client.config.debugging
|
95
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.delete_emergency_address ...'
|
96
|
+
end
|
97
|
+
# verify the required parameter 'address_id' is set
|
98
|
+
if @api_client.config.client_side_validation && address_id.nil?
|
99
|
+
fail ArgumentError, "Missing the required parameter 'address_id' when calling PhoneControllerApi.delete_emergency_address"
|
100
|
+
end
|
101
|
+
# resource path
|
102
|
+
local_var_path = '/phone/emergency-addresses/{addressId}'.sub('{' + 'addressId' + '}', CGI.escape(address_id.to_s))
|
103
|
+
|
104
|
+
# query parameters
|
105
|
+
query_params = opts[:query_params] || {}
|
106
|
+
|
107
|
+
# header parameters
|
108
|
+
header_params = opts[:header_params] || {}
|
109
|
+
# HTTP header 'Accept' (if needed)
|
110
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
111
|
+
|
112
|
+
# form parameters
|
113
|
+
form_params = opts[:form_params] || {}
|
114
|
+
|
115
|
+
# http body (model)
|
116
|
+
post_body = opts[:body]
|
117
|
+
|
118
|
+
# return_type
|
119
|
+
return_type = opts[:return_type] || 'EmptyResponseDto'
|
120
|
+
|
121
|
+
# auth_names
|
122
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
123
|
+
|
124
|
+
new_options = opts.merge(
|
125
|
+
:header_params => header_params,
|
126
|
+
:query_params => query_params,
|
127
|
+
:form_params => form_params,
|
128
|
+
:body => post_body,
|
129
|
+
:auth_names => auth_names,
|
130
|
+
:return_type => return_type
|
131
|
+
)
|
132
|
+
|
133
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
134
|
+
if @api_client.config.debugging
|
135
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#delete_emergency_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
136
|
+
end
|
137
|
+
return data, status_code, headers
|
138
|
+
end
|
139
|
+
|
140
|
+
# @param phone_number_id [String]
|
141
|
+
# @param [Hash] opts the optional parameters
|
142
|
+
# @return [nil]
|
143
|
+
def delete_phone_number(phone_number_id, opts = {})
|
144
|
+
delete_phone_number_with_http_info(phone_number_id, opts)
|
145
|
+
nil
|
146
|
+
end
|
147
|
+
|
148
|
+
# @param phone_number_id [String]
|
149
|
+
# @param [Hash] opts the optional parameters
|
150
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
151
|
+
def delete_phone_number_with_http_info(phone_number_id, opts = {})
|
152
|
+
if @api_client.config.debugging
|
153
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.delete_phone_number ...'
|
154
|
+
end
|
155
|
+
# verify the required parameter 'phone_number_id' is set
|
156
|
+
if @api_client.config.client_side_validation && phone_number_id.nil?
|
157
|
+
fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.delete_phone_number"
|
158
|
+
end
|
159
|
+
# resource path
|
160
|
+
local_var_path = '/phone/numbers/{phoneNumberId}'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s))
|
161
|
+
|
162
|
+
# query parameters
|
163
|
+
query_params = opts[:query_params] || {}
|
164
|
+
|
165
|
+
# header parameters
|
166
|
+
header_params = opts[:header_params] || {}
|
167
|
+
|
168
|
+
# form parameters
|
169
|
+
form_params = opts[:form_params] || {}
|
170
|
+
|
171
|
+
# http body (model)
|
172
|
+
post_body = opts[:body]
|
173
|
+
|
174
|
+
# return_type
|
175
|
+
return_type = opts[:return_type]
|
176
|
+
|
177
|
+
# auth_names
|
178
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
179
|
+
|
180
|
+
new_options = opts.merge(
|
181
|
+
:header_params => header_params,
|
182
|
+
:query_params => query_params,
|
183
|
+
:form_params => form_params,
|
184
|
+
:body => post_body,
|
185
|
+
:auth_names => auth_names,
|
186
|
+
:return_type => return_type
|
187
|
+
)
|
188
|
+
|
189
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
190
|
+
if @api_client.config.debugging
|
191
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#delete_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
192
|
+
end
|
193
|
+
return data, status_code, headers
|
194
|
+
end
|
195
|
+
|
196
|
+
# @param address_id [String]
|
197
|
+
# @param [Hash] opts the optional parameters
|
198
|
+
# @return [EmergencyAddress]
|
199
|
+
def get_emergency_address(address_id, opts = {})
|
200
|
+
data, _status_code, _headers = get_emergency_address_with_http_info(address_id, opts)
|
201
|
+
data
|
202
|
+
end
|
203
|
+
|
204
|
+
# @param address_id [String]
|
205
|
+
# @param [Hash] opts the optional parameters
|
206
|
+
# @return [Array<(EmergencyAddress, Integer, Hash)>] EmergencyAddress data, response status code and response headers
|
207
|
+
def get_emergency_address_with_http_info(address_id, opts = {})
|
208
|
+
if @api_client.config.debugging
|
209
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_emergency_address ...'
|
210
|
+
end
|
211
|
+
# verify the required parameter 'address_id' is set
|
212
|
+
if @api_client.config.client_side_validation && address_id.nil?
|
213
|
+
fail ArgumentError, "Missing the required parameter 'address_id' when calling PhoneControllerApi.get_emergency_address"
|
214
|
+
end
|
215
|
+
# resource path
|
216
|
+
local_var_path = '/phone/emergency-addresses/{addressId}'.sub('{' + 'addressId' + '}', CGI.escape(address_id.to_s))
|
217
|
+
|
218
|
+
# query parameters
|
219
|
+
query_params = opts[:query_params] || {}
|
220
|
+
|
221
|
+
# header parameters
|
222
|
+
header_params = opts[:header_params] || {}
|
223
|
+
# HTTP header 'Accept' (if needed)
|
224
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
225
|
+
|
226
|
+
# form parameters
|
227
|
+
form_params = opts[:form_params] || {}
|
228
|
+
|
229
|
+
# http body (model)
|
230
|
+
post_body = opts[:body]
|
231
|
+
|
232
|
+
# return_type
|
233
|
+
return_type = opts[:return_type] || 'EmergencyAddress'
|
234
|
+
|
235
|
+
# auth_names
|
236
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
237
|
+
|
238
|
+
new_options = opts.merge(
|
239
|
+
:header_params => header_params,
|
240
|
+
:query_params => query_params,
|
241
|
+
:form_params => form_params,
|
242
|
+
:body => post_body,
|
243
|
+
:auth_names => auth_names,
|
244
|
+
:return_type => return_type
|
245
|
+
)
|
246
|
+
|
247
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
248
|
+
if @api_client.config.debugging
|
249
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#get_emergency_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
250
|
+
end
|
251
|
+
return data, status_code, headers
|
252
|
+
end
|
253
|
+
|
254
|
+
# @param [Hash] opts the optional parameters
|
255
|
+
# @return [Array<EmergencyAddressDto>]
|
256
|
+
def get_emergency_addresses(opts = {})
|
257
|
+
data, _status_code, _headers = get_emergency_addresses_with_http_info(opts)
|
258
|
+
data
|
259
|
+
end
|
260
|
+
|
261
|
+
# @param [Hash] opts the optional parameters
|
262
|
+
# @return [Array<(Array<EmergencyAddressDto>, Integer, Hash)>] Array<EmergencyAddressDto> data, response status code and response headers
|
263
|
+
def get_emergency_addresses_with_http_info(opts = {})
|
264
|
+
if @api_client.config.debugging
|
265
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_emergency_addresses ...'
|
266
|
+
end
|
267
|
+
# resource path
|
268
|
+
local_var_path = '/phone/emergency-addresses'
|
269
|
+
|
270
|
+
# query parameters
|
271
|
+
query_params = opts[:query_params] || {}
|
272
|
+
|
273
|
+
# header parameters
|
274
|
+
header_params = opts[:header_params] || {}
|
275
|
+
# HTTP header 'Accept' (if needed)
|
276
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
277
|
+
|
278
|
+
# form parameters
|
279
|
+
form_params = opts[:form_params] || {}
|
280
|
+
|
281
|
+
# http body (model)
|
282
|
+
post_body = opts[:body]
|
283
|
+
|
284
|
+
# return_type
|
285
|
+
return_type = opts[:return_type] || 'Array<EmergencyAddressDto>'
|
286
|
+
|
287
|
+
# auth_names
|
288
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
289
|
+
|
290
|
+
new_options = opts.merge(
|
291
|
+
:header_params => header_params,
|
292
|
+
:query_params => query_params,
|
293
|
+
:form_params => form_params,
|
294
|
+
:body => post_body,
|
295
|
+
:auth_names => auth_names,
|
296
|
+
:return_type => return_type
|
297
|
+
)
|
298
|
+
|
299
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
300
|
+
if @api_client.config.debugging
|
301
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#get_emergency_addresses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
302
|
+
end
|
303
|
+
return data, status_code, headers
|
304
|
+
end
|
305
|
+
|
306
|
+
# @param phone_number_id [String]
|
307
|
+
# @param [Hash] opts the optional parameters
|
308
|
+
# @return [PhoneNumberDto]
|
309
|
+
def get_phone_number(phone_number_id, opts = {})
|
310
|
+
data, _status_code, _headers = get_phone_number_with_http_info(phone_number_id, opts)
|
311
|
+
data
|
312
|
+
end
|
313
|
+
|
314
|
+
# @param phone_number_id [String]
|
315
|
+
# @param [Hash] opts the optional parameters
|
316
|
+
# @return [Array<(PhoneNumberDto, Integer, Hash)>] PhoneNumberDto data, response status code and response headers
|
317
|
+
def get_phone_number_with_http_info(phone_number_id, opts = {})
|
318
|
+
if @api_client.config.debugging
|
319
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_number ...'
|
320
|
+
end
|
321
|
+
# verify the required parameter 'phone_number_id' is set
|
322
|
+
if @api_client.config.client_side_validation && phone_number_id.nil?
|
323
|
+
fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.get_phone_number"
|
324
|
+
end
|
325
|
+
# resource path
|
326
|
+
local_var_path = '/phone/numbers/{phoneNumberId}'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s))
|
327
|
+
|
328
|
+
# query parameters
|
329
|
+
query_params = opts[:query_params] || {}
|
330
|
+
|
331
|
+
# header parameters
|
332
|
+
header_params = opts[:header_params] || {}
|
333
|
+
# HTTP header 'Accept' (if needed)
|
334
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
335
|
+
|
336
|
+
# form parameters
|
337
|
+
form_params = opts[:form_params] || {}
|
338
|
+
|
339
|
+
# http body (model)
|
340
|
+
post_body = opts[:body]
|
341
|
+
|
342
|
+
# return_type
|
343
|
+
return_type = opts[:return_type] || 'PhoneNumberDto'
|
344
|
+
|
345
|
+
# auth_names
|
346
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
347
|
+
|
348
|
+
new_options = opts.merge(
|
349
|
+
:header_params => header_params,
|
350
|
+
:query_params => query_params,
|
351
|
+
:form_params => form_params,
|
352
|
+
:body => post_body,
|
353
|
+
:auth_names => auth_names,
|
354
|
+
:return_type => return_type
|
355
|
+
)
|
356
|
+
|
357
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
358
|
+
if @api_client.config.debugging
|
359
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
360
|
+
end
|
361
|
+
return data, status_code, headers
|
362
|
+
end
|
363
|
+
|
364
|
+
# @param [Hash] opts the optional parameters
|
365
|
+
# @option opts [Integer] :page Optional page index for list pagination (default to 0)
|
366
|
+
# @option opts [Integer] :size Optional page size for list pagination (default to 20)
|
367
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
368
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
369
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
370
|
+
# @return [PagePhoneNumberProjection]
|
371
|
+
def get_phone_numbers(opts = {})
|
372
|
+
data, _status_code, _headers = get_phone_numbers_with_http_info(opts)
|
373
|
+
data
|
374
|
+
end
|
375
|
+
|
376
|
+
# @param [Hash] opts the optional parameters
|
377
|
+
# @option opts [Integer] :page Optional page index for list pagination
|
378
|
+
# @option opts [Integer] :size Optional page size for list pagination
|
379
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
380
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
381
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
382
|
+
# @return [Array<(PagePhoneNumberProjection, Integer, Hash)>] PagePhoneNumberProjection data, response status code and response headers
|
383
|
+
def get_phone_numbers_with_http_info(opts = {})
|
384
|
+
if @api_client.config.debugging
|
385
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_numbers ...'
|
386
|
+
end
|
387
|
+
allowable_values = ["ASC", "DESC"]
|
388
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
389
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
390
|
+
end
|
391
|
+
# resource path
|
392
|
+
local_var_path = '/phone/numbers'
|
393
|
+
|
394
|
+
# query parameters
|
395
|
+
query_params = opts[:query_params] || {}
|
396
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
397
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
398
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
399
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
400
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
401
|
+
|
402
|
+
# header parameters
|
403
|
+
header_params = opts[:header_params] || {}
|
404
|
+
# HTTP header 'Accept' (if needed)
|
405
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
406
|
+
|
407
|
+
# form parameters
|
408
|
+
form_params = opts[:form_params] || {}
|
409
|
+
|
410
|
+
# http body (model)
|
411
|
+
post_body = opts[:body]
|
412
|
+
|
413
|
+
# return_type
|
414
|
+
return_type = opts[:return_type] || 'PagePhoneNumberProjection'
|
415
|
+
|
416
|
+
# auth_names
|
417
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
418
|
+
|
419
|
+
new_options = opts.merge(
|
420
|
+
:header_params => header_params,
|
421
|
+
:query_params => query_params,
|
422
|
+
:form_params => form_params,
|
423
|
+
:body => post_body,
|
424
|
+
:auth_names => auth_names,
|
425
|
+
:return_type => return_type
|
426
|
+
)
|
427
|
+
|
428
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
429
|
+
if @api_client.config.debugging
|
430
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_numbers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
431
|
+
end
|
432
|
+
return data, status_code, headers
|
433
|
+
end
|
434
|
+
|
435
|
+
# @param [Hash] opts the optional parameters
|
436
|
+
# @return [Array<PhonePlanDto>]
|
437
|
+
def get_phone_plans(opts = {})
|
438
|
+
data, _status_code, _headers = get_phone_plans_with_http_info(opts)
|
439
|
+
data
|
440
|
+
end
|
441
|
+
|
442
|
+
# @param [Hash] opts the optional parameters
|
443
|
+
# @return [Array<(Array<PhonePlanDto>, Integer, Hash)>] Array<PhonePlanDto> data, response status code and response headers
|
444
|
+
def get_phone_plans_with_http_info(opts = {})
|
445
|
+
if @api_client.config.debugging
|
446
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_plans ...'
|
447
|
+
end
|
448
|
+
# resource path
|
449
|
+
local_var_path = '/phone/plans'
|
450
|
+
|
451
|
+
# query parameters
|
452
|
+
query_params = opts[:query_params] || {}
|
453
|
+
|
454
|
+
# header parameters
|
455
|
+
header_params = opts[:header_params] || {}
|
456
|
+
# HTTP header 'Accept' (if needed)
|
457
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
458
|
+
|
459
|
+
# form parameters
|
460
|
+
form_params = opts[:form_params] || {}
|
461
|
+
|
462
|
+
# http body (model)
|
463
|
+
post_body = opts[:body]
|
464
|
+
|
465
|
+
# return_type
|
466
|
+
return_type = opts[:return_type] || 'Array<PhonePlanDto>'
|
467
|
+
|
468
|
+
# auth_names
|
469
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
470
|
+
|
471
|
+
new_options = opts.merge(
|
472
|
+
:header_params => header_params,
|
473
|
+
:query_params => query_params,
|
474
|
+
:form_params => form_params,
|
475
|
+
:body => post_body,
|
476
|
+
:auth_names => auth_names,
|
477
|
+
:return_type => return_type
|
478
|
+
)
|
479
|
+
|
480
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
481
|
+
if @api_client.config.debugging
|
482
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_plans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
483
|
+
end
|
484
|
+
return data, status_code, headers
|
485
|
+
end
|
486
|
+
end
|
487
|
+
end
|
@@ -672,6 +672,79 @@ module MailSlurpClient
|
|
672
672
|
return data, status_code, headers
|
673
673
|
end
|
674
674
|
|
675
|
+
# Get results of email sent with queues in paginated form
|
676
|
+
# @param [Hash] opts the optional parameters
|
677
|
+
# @option opts [Integer] :page Optional page index in inbox sent email list pagination (default to 0)
|
678
|
+
# @option opts [Integer] :size Optional page size in inbox sent email list pagination (default to 20)
|
679
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
680
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
681
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
682
|
+
# @return [PageSentEmailWithQueueProjection]
|
683
|
+
def get_sent_emails_with_queue_results(opts = {})
|
684
|
+
data, _status_code, _headers = get_sent_emails_with_queue_results_with_http_info(opts)
|
685
|
+
data
|
686
|
+
end
|
687
|
+
|
688
|
+
# Get results of email sent with queues in paginated form
|
689
|
+
# @param [Hash] opts the optional parameters
|
690
|
+
# @option opts [Integer] :page Optional page index in inbox sent email list pagination
|
691
|
+
# @option opts [Integer] :size Optional page size in inbox sent email list pagination
|
692
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
693
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
694
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
695
|
+
# @return [Array<(PageSentEmailWithQueueProjection, Integer, Hash)>] PageSentEmailWithQueueProjection data, response status code and response headers
|
696
|
+
def get_sent_emails_with_queue_results_with_http_info(opts = {})
|
697
|
+
if @api_client.config.debugging
|
698
|
+
@api_client.config.logger.debug 'Calling API: SentEmailsControllerApi.get_sent_emails_with_queue_results ...'
|
699
|
+
end
|
700
|
+
allowable_values = ["ASC", "DESC"]
|
701
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
702
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
703
|
+
end
|
704
|
+
# resource path
|
705
|
+
local_var_path = '/sent/queue-results'
|
706
|
+
|
707
|
+
# query parameters
|
708
|
+
query_params = opts[:query_params] || {}
|
709
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
710
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
711
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
712
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
713
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
714
|
+
|
715
|
+
# header parameters
|
716
|
+
header_params = opts[:header_params] || {}
|
717
|
+
# HTTP header 'Accept' (if needed)
|
718
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
719
|
+
|
720
|
+
# form parameters
|
721
|
+
form_params = opts[:form_params] || {}
|
722
|
+
|
723
|
+
# http body (model)
|
724
|
+
post_body = opts[:body]
|
725
|
+
|
726
|
+
# return_type
|
727
|
+
return_type = opts[:return_type] || 'PageSentEmailWithQueueProjection'
|
728
|
+
|
729
|
+
# auth_names
|
730
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
731
|
+
|
732
|
+
new_options = opts.merge(
|
733
|
+
:header_params => header_params,
|
734
|
+
:query_params => query_params,
|
735
|
+
:form_params => form_params,
|
736
|
+
:body => post_body,
|
737
|
+
:auth_names => auth_names,
|
738
|
+
:return_type => return_type
|
739
|
+
)
|
740
|
+
|
741
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
742
|
+
if @api_client.config.debugging
|
743
|
+
@api_client.config.logger.debug "API called: SentEmailsControllerApi#get_sent_emails_with_queue_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
744
|
+
end
|
745
|
+
return data, status_code, headers
|
746
|
+
end
|
747
|
+
|
675
748
|
# Get all sent organization emails in paginated form
|
676
749
|
# @param [Hash] opts the optional parameters
|
677
750
|
# @option opts [String] :inbox_id Optional inboxId to filter sender of sent emails by
|