mailslurp_client 12.8.0 → 12.8.4

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: 76c2b51b52d7f63580e4bc83b871eb60321b422deafab4d32f480050825affed
4
- data.tar.gz: b2193b5d4554b6fdbaade20bb9f791ca1eac9d163d24fd47faea01aa6e2bec1a
3
+ metadata.gz: 6e66418af21ea38d636e4f0339aa6223b4a06409121307510fb8fc928cb8f567
4
+ data.tar.gz: 9b6a7fbc9563cef6b38f14cc7fac285f83ef0a6294d99219cda74572c2a17322
5
5
  SHA512:
6
- metadata.gz: 7771fa21777885c9cc0003f17188e518af59d5317ef9ddb811c9a93ff13919dd4467469cb9d66934da5c25a52320462835e9abf8780313a370126740a98f9ec7
7
- data.tar.gz: 2d873c50edcdedfbe3d787d8ad31023bdd923e6ae154d4262be6571bcee52f671b2a64d51cf9d04ceb1a36a01a96081fdc72d8e070324a3106cb0ff07cde9913
6
+ metadata.gz: f84f377f995cd5428596c5369c704eb3cc3b45fc3ef2fe717389274ca7ddd2f6f3c5a733651f46a4d38c44673666b45112dfeb84b0c114a8c0628d1010a73de1
7
+ data.tar.gz: c981e0d4d76e6a44c918ed126643b277f485355296a88630f2c4d31ab7923fd16c61fb2d301704292b0b70ea7f76e551cc947f3408f2e9cdc38a337a3747f8f7
@@ -20,12 +20,14 @@ require 'mailslurp_client/configuration'
20
20
  require 'mailslurp_client/models/abstract_webhook_payload'
21
21
  require 'mailslurp_client/models/alias_dto'
22
22
  require 'mailslurp_client/models/alias_projection'
23
+ require 'mailslurp_client/models/attachment_entity'
23
24
  require 'mailslurp_client/models/attachment_meta_data'
24
25
  require 'mailslurp_client/models/attachment_projection'
25
26
  require 'mailslurp_client/models/basic_auth_options'
26
- require 'mailslurp_client/models/bounce'
27
27
  require 'mailslurp_client/models/bounce_projection'
28
28
  require 'mailslurp_client/models/bounce_recipient'
29
+ require 'mailslurp_client/models/bounced_email_dto'
30
+ require 'mailslurp_client/models/bounced_recipient_dto'
29
31
  require 'mailslurp_client/models/bulk_send_email_options'
30
32
  require 'mailslurp_client/models/condition_option'
31
33
  require 'mailslurp_client/models/contact_dto'
@@ -53,6 +55,7 @@ require 'mailslurp_client/models/download_attachment_dto'
53
55
  require 'mailslurp_client/models/email'
54
56
  require 'mailslurp_client/models/email_analysis'
55
57
  require 'mailslurp_client/models/email_content_match_result'
58
+ require 'mailslurp_client/models/email_links_result'
56
59
  require 'mailslurp_client/models/email_preview'
57
60
  require 'mailslurp_client/models/email_projection'
58
61
  require 'mailslurp_client/models/email_text_lines_result'
@@ -63,6 +66,7 @@ require 'mailslurp_client/models/expired_inbox_record_projection'
63
66
  require 'mailslurp_client/models/export_link'
64
67
  require 'mailslurp_client/models/export_options'
65
68
  require 'mailslurp_client/models/forward_email_options'
69
+ require 'mailslurp_client/models/gravatar_url'
66
70
  require 'mailslurp_client/models/group_contacts_dto'
67
71
  require 'mailslurp_client/models/group_dto'
68
72
  require 'mailslurp_client/models/group_projection'
@@ -19,6 +19,58 @@ module MailSlurpClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Delete all attachments
23
+ # @param [Hash] opts the optional parameters
24
+ # @return [nil]
25
+ def delete_all_attachments(opts = {})
26
+ delete_all_attachments_with_http_info(opts)
27
+ nil
28
+ end
29
+
30
+ # Delete all attachments
31
+ # @param [Hash] opts the optional parameters
32
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
33
+ def delete_all_attachments_with_http_info(opts = {})
34
+ if @api_client.config.debugging
35
+ @api_client.config.logger.debug 'Calling API: AttachmentControllerApi.delete_all_attachments ...'
36
+ end
37
+ # resource path
38
+ local_var_path = '/attachments'
39
+
40
+ # query parameters
41
+ query_params = opts[:query_params] || {}
42
+
43
+ # header parameters
44
+ header_params = opts[:header_params] || {}
45
+
46
+ # form parameters
47
+ form_params = opts[:form_params] || {}
48
+
49
+ # http body (model)
50
+ post_body = opts[:body]
51
+
52
+ # return_type
53
+ return_type = opts[:return_type]
54
+
55
+ # auth_names
56
+ auth_names = opts[:auth_names] || ['API_KEY']
57
+
58
+ new_options = opts.merge(
59
+ :header_params => header_params,
60
+ :query_params => query_params,
61
+ :form_params => form_params,
62
+ :body => post_body,
63
+ :auth_names => auth_names,
64
+ :return_type => return_type
65
+ )
66
+
67
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
68
+ if @api_client.config.debugging
69
+ @api_client.config.logger.debug "API called: AttachmentControllerApi#delete_all_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
70
+ end
71
+ return data, status_code, headers
72
+ end
73
+
22
74
  # Delete an attachment
23
75
  # Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with `SendEmailOptions` when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.
24
76
  # @param attachment_id [String] ID of attachment
@@ -203,6 +255,68 @@ module MailSlurpClient
203
255
  return data, status_code, headers
204
256
  end
205
257
 
258
+ # Get an attachment entity
259
+ # Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with `SendEmailOptions` when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.
260
+ # @param attachment_id [String] ID of attachment
261
+ # @param [Hash] opts the optional parameters
262
+ # @return [AttachmentEntity]
263
+ def get_attachment(attachment_id, opts = {})
264
+ data, _status_code, _headers = get_attachment_with_http_info(attachment_id, opts)
265
+ data
266
+ end
267
+
268
+ # Get an attachment entity
269
+ # Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with &#x60;SendEmailOptions&#x60; when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.
270
+ # @param attachment_id [String] ID of attachment
271
+ # @param [Hash] opts the optional parameters
272
+ # @return [Array<(AttachmentEntity, Integer, Hash)>] AttachmentEntity data, response status code and response headers
273
+ def get_attachment_with_http_info(attachment_id, opts = {})
274
+ if @api_client.config.debugging
275
+ @api_client.config.logger.debug 'Calling API: AttachmentControllerApi.get_attachment ...'
276
+ end
277
+ # verify the required parameter 'attachment_id' is set
278
+ if @api_client.config.client_side_validation && attachment_id.nil?
279
+ fail ArgumentError, "Missing the required parameter 'attachment_id' when calling AttachmentControllerApi.get_attachment"
280
+ end
281
+ # resource path
282
+ local_var_path = '/attachments/{attachmentId}'.sub('{' + 'attachmentId' + '}', CGI.escape(attachment_id.to_s))
283
+
284
+ # query parameters
285
+ query_params = opts[:query_params] || {}
286
+
287
+ # header parameters
288
+ header_params = opts[:header_params] || {}
289
+ # HTTP header 'Accept' (if needed)
290
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
291
+
292
+ # form parameters
293
+ form_params = opts[:form_params] || {}
294
+
295
+ # http body (model)
296
+ post_body = opts[:body]
297
+
298
+ # return_type
299
+ return_type = opts[:return_type] || 'AttachmentEntity'
300
+
301
+ # auth_names
302
+ auth_names = opts[:auth_names] || ['API_KEY']
303
+
304
+ new_options = opts.merge(
305
+ :header_params => header_params,
306
+ :query_params => query_params,
307
+ :form_params => form_params,
308
+ :body => post_body,
309
+ :auth_names => auth_names,
310
+ :return_type => return_type
311
+ )
312
+
313
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
314
+ if @api_client.config.debugging
315
+ @api_client.config.logger.debug "API called: AttachmentControllerApi#get_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
316
+ end
317
+ return data, status_code, headers
318
+ end
319
+
206
320
  # Get email attachment metadata information
207
321
  # Returns the metadata for an attachment. It is saved separately to the content of the attachment. Contains properties `name` and `content-type` and `content-length` in bytes for a given attachment.
208
322
  # @param attachment_id [String] ID of attachment
@@ -404,7 +518,7 @@ module MailSlurpClient
404
518
  # Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment.
405
519
  # Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with `SendEmailOptions` when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.
406
520
  # @param [Hash] opts the optional parameters
407
- # @option opts [String] :string Optional contentType for file. For instance &#x60;application/pdf&#x60;
521
+ # @option opts [String] :content_type Optional contentType for file. For instance &#x60;application/pdf&#x60;
408
522
  # @option opts [String] :filename Optional filename to save upload with
409
523
  # @option opts [String] :byte_array Byte array request body
410
524
  # @return [Array<String>]
@@ -416,7 +530,7 @@ module MailSlurpClient
416
530
  # Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment.
417
531
  # Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with &#x60;SendEmailOptions&#x60; when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.
418
532
  # @param [Hash] opts the optional parameters
419
- # @option opts [String] :string Optional contentType for file. For instance &#x60;application/pdf&#x60;
533
+ # @option opts [String] :content_type Optional contentType for file. For instance &#x60;application/pdf&#x60;
420
534
  # @option opts [String] :filename Optional filename to save upload with
421
535
  # @option opts [String] :byte_array Byte array request body
422
536
  # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
@@ -429,7 +543,7 @@ module MailSlurpClient
429
543
 
430
544
  # query parameters
431
545
  query_params = opts[:query_params] || {}
432
- query_params[:'String'] = opts[:'string'] if !opts[:'string'].nil?
546
+ query_params[:'contentType'] = opts[:'content_type'] if !opts[:'content_type'].nil?
433
547
  query_params[:'filename'] = opts[:'filename'] if !opts[:'filename'].nil?
434
548
 
435
549
  # header parameters
@@ -23,17 +23,17 @@ module MailSlurpClient
23
23
  # Bounced emails are email you have sent that were rejected by a recipient
24
24
  # @param id [String] ID of the bounced email to fetch
25
25
  # @param [Hash] opts the optional parameters
26
- # @return [nil]
26
+ # @return [BouncedEmailDto]
27
27
  def get_bounced_email(id, opts = {})
28
- get_bounced_email_with_http_info(id, opts)
29
- nil
28
+ data, _status_code, _headers = get_bounced_email_with_http_info(id, opts)
29
+ data
30
30
  end
31
31
 
32
32
  # Get a bounced email.
33
33
  # Bounced emails are email you have sent that were rejected by a recipient
34
34
  # @param id [String] ID of the bounced email to fetch
35
35
  # @param [Hash] opts the optional parameters
36
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
36
+ # @return [Array<(BouncedEmailDto, Integer, Hash)>] BouncedEmailDto data, response status code and response headers
37
37
  def get_bounced_email_with_http_info(id, opts = {})
38
38
  if @api_client.config.debugging
39
39
  @api_client.config.logger.debug 'Calling API: BounceControllerApi.get_bounced_email ...'
@@ -60,7 +60,7 @@ module MailSlurpClient
60
60
  post_body = opts[:body]
61
61
 
62
62
  # return_type
63
- return_type = opts[:return_type]
63
+ return_type = opts[:return_type] || 'BouncedEmailDto'
64
64
 
65
65
  # auth_names
66
66
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -81,34 +81,41 @@ module MailSlurpClient
81
81
  return data, status_code, headers
82
82
  end
83
83
 
84
- # Get a bounced email.
84
+ # Get paginated list of bounced emails.
85
85
  # Bounced emails are email you have sent that were rejected by a recipient
86
- # @param id [String] ID of the bounced recipient
87
86
  # @param [Hash] opts the optional parameters
88
- # @return [nil]
89
- def get_bounced_email1(id, opts = {})
90
- get_bounced_email1_with_http_info(id, opts)
91
- nil
87
+ # @option opts [Integer] :page Optional page index (default to 0)
88
+ # @option opts [Integer] :size Optional page size (default to 20)
89
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
90
+ # @return [PageBouncedEmail]
91
+ def get_bounced_emails(opts = {})
92
+ data, _status_code, _headers = get_bounced_emails_with_http_info(opts)
93
+ data
92
94
  end
93
95
 
94
- # Get a bounced email.
96
+ # Get paginated list of bounced emails.
95
97
  # Bounced emails are email you have sent that were rejected by a recipient
96
- # @param id [String] ID of the bounced recipient
97
98
  # @param [Hash] opts the optional parameters
98
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
99
- def get_bounced_email1_with_http_info(id, opts = {})
99
+ # @option opts [Integer] :page Optional page index
100
+ # @option opts [Integer] :size Optional page size
101
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
102
+ # @return [Array<(PageBouncedEmail, Integer, Hash)>] PageBouncedEmail data, response status code and response headers
103
+ def get_bounced_emails_with_http_info(opts = {})
100
104
  if @api_client.config.debugging
101
- @api_client.config.logger.debug 'Calling API: BounceControllerApi.get_bounced_email1 ...'
105
+ @api_client.config.logger.debug 'Calling API: BounceControllerApi.get_bounced_emails ...'
102
106
  end
103
- # verify the required parameter 'id' is set
104
- if @api_client.config.client_side_validation && id.nil?
105
- fail ArgumentError, "Missing the required parameter 'id' when calling BounceControllerApi.get_bounced_email1"
107
+ allowable_values = ["ASC", "DESC"]
108
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
109
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
106
110
  end
107
111
  # resource path
108
- local_var_path = '/bounce/recipients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
112
+ local_var_path = '/bounce/emails'
109
113
 
110
114
  # query parameters
111
115
  query_params = opts[:query_params] || {}
116
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
117
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
118
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
112
119
 
113
120
  # header parameters
114
121
  header_params = opts[:header_params] || {}
@@ -122,7 +129,7 @@ module MailSlurpClient
122
129
  post_body = opts[:body]
123
130
 
124
131
  # return_type
125
- return_type = opts[:return_type]
132
+ return_type = opts[:return_type] || 'PageBouncedEmail'
126
133
 
127
134
  # auth_names
128
135
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -138,46 +145,39 @@ module MailSlurpClient
138
145
 
139
146
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
140
147
  if @api_client.config.debugging
141
- @api_client.config.logger.debug "API called: BounceControllerApi#get_bounced_email1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
148
+ @api_client.config.logger.debug "API called: BounceControllerApi#get_bounced_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
149
  end
143
150
  return data, status_code, headers
144
151
  end
145
152
 
146
- # Get paginated list of bounced emails.
153
+ # Get a bounced email.
147
154
  # Bounced emails are email you have sent that were rejected by a recipient
155
+ # @param id [String] ID of the bounced recipient
148
156
  # @param [Hash] opts the optional parameters
149
- # @option opts [Integer] :page Optional page index (default to 0)
150
- # @option opts [Integer] :size Optional page size (default to 20)
151
- # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
152
- # @return [nil]
153
- def get_bounced_emails(opts = {})
154
- get_bounced_emails_with_http_info(opts)
155
- nil
157
+ # @return [BouncedRecipientDto]
158
+ def get_bounced_recipient(id, opts = {})
159
+ data, _status_code, _headers = get_bounced_recipient_with_http_info(id, opts)
160
+ data
156
161
  end
157
162
 
158
- # Get paginated list of bounced emails.
163
+ # Get a bounced email.
159
164
  # Bounced emails are email you have sent that were rejected by a recipient
165
+ # @param id [String] ID of the bounced recipient
160
166
  # @param [Hash] opts the optional parameters
161
- # @option opts [Integer] :page Optional page index
162
- # @option opts [Integer] :size Optional page size
163
- # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
164
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
165
- def get_bounced_emails_with_http_info(opts = {})
167
+ # @return [Array<(BouncedRecipientDto, Integer, Hash)>] BouncedRecipientDto data, response status code and response headers
168
+ def get_bounced_recipient_with_http_info(id, opts = {})
166
169
  if @api_client.config.debugging
167
- @api_client.config.logger.debug 'Calling API: BounceControllerApi.get_bounced_emails ...'
170
+ @api_client.config.logger.debug 'Calling API: BounceControllerApi.get_bounced_recipient ...'
168
171
  end
169
- allowable_values = ["ASC", "DESC"]
170
- if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
171
- fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
172
+ # verify the required parameter 'id' is set
173
+ if @api_client.config.client_side_validation && id.nil?
174
+ fail ArgumentError, "Missing the required parameter 'id' when calling BounceControllerApi.get_bounced_recipient"
172
175
  end
173
176
  # resource path
174
- local_var_path = '/bounce/emails'
177
+ local_var_path = '/bounce/recipients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
175
178
 
176
179
  # query parameters
177
180
  query_params = opts[:query_params] || {}
178
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
179
- query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
180
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
181
181
 
182
182
  # header parameters
183
183
  header_params = opts[:header_params] || {}
@@ -191,7 +191,7 @@ module MailSlurpClient
191
191
  post_body = opts[:body]
192
192
 
193
193
  # return_type
194
- return_type = opts[:return_type]
194
+ return_type = opts[:return_type] || 'BouncedRecipientDto'
195
195
 
196
196
  # auth_names
197
197
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -207,7 +207,7 @@ module MailSlurpClient
207
207
 
208
208
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
209
209
  if @api_client.config.debugging
210
- @api_client.config.logger.debug "API called: BounceControllerApi#get_bounced_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
210
+ @api_client.config.logger.debug "API called: BounceControllerApi#get_bounced_recipient\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
211
211
  end
212
212
  return data, status_code, headers
213
213
  end
@@ -218,10 +218,10 @@ module MailSlurpClient
218
218
  # @option opts [Integer] :page Optional page index (default to 0)
219
219
  # @option opts [Integer] :size Optional page size (default to 20)
220
220
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
221
- # @return [nil]
221
+ # @return [PageBouncedRecipients]
222
222
  def get_bounced_recipients(opts = {})
223
- get_bounced_recipients_with_http_info(opts)
224
- nil
223
+ data, _status_code, _headers = get_bounced_recipients_with_http_info(opts)
224
+ data
225
225
  end
226
226
 
227
227
  # Get paginated list of bounced recipients.
@@ -230,7 +230,7 @@ module MailSlurpClient
230
230
  # @option opts [Integer] :page Optional page index
231
231
  # @option opts [Integer] :size Optional page size
232
232
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
233
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
233
+ # @return [Array<(PageBouncedRecipients, Integer, Hash)>] PageBouncedRecipients data, response status code and response headers
234
234
  def get_bounced_recipients_with_http_info(opts = {})
235
235
  if @api_client.config.debugging
236
236
  @api_client.config.logger.debug 'Calling API: BounceControllerApi.get_bounced_recipients ...'
@@ -260,7 +260,7 @@ module MailSlurpClient
260
260
  post_body = opts[:body]
261
261
 
262
262
  # return_type
263
- return_type = opts[:return_type]
263
+ return_type = opts[:return_type] || 'PageBouncedRecipients'
264
264
 
265
265
  # auth_names
266
266
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -861,6 +861,68 @@ module MailSlurpClient
861
861
  return data, status_code, headers
862
862
  end
863
863
 
864
+ # Parse and return list of links found in an email (only works for HTML content)
865
+ # HTML parsing uses JSoup and UNIX line separators. Searches content for href attributes
866
+ # @param email_id [String] ID of email to fetch text for
867
+ # @param [Hash] opts the optional parameters
868
+ # @return [EmailLinksResult]
869
+ def get_email_links(email_id, opts = {})
870
+ data, _status_code, _headers = get_email_links_with_http_info(email_id, opts)
871
+ data
872
+ end
873
+
874
+ # Parse and return list of links found in an email (only works for HTML content)
875
+ # HTML parsing uses JSoup and UNIX line separators. Searches content for href attributes
876
+ # @param email_id [String] ID of email to fetch text for
877
+ # @param [Hash] opts the optional parameters
878
+ # @return [Array<(EmailLinksResult, Integer, Hash)>] EmailLinksResult data, response status code and response headers
879
+ def get_email_links_with_http_info(email_id, opts = {})
880
+ if @api_client.config.debugging
881
+ @api_client.config.logger.debug 'Calling API: EmailControllerApi.get_email_links ...'
882
+ end
883
+ # verify the required parameter 'email_id' is set
884
+ if @api_client.config.client_side_validation && email_id.nil?
885
+ fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.get_email_links"
886
+ end
887
+ # resource path
888
+ local_var_path = '/emails/{emailId}/links'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
889
+
890
+ # query parameters
891
+ query_params = opts[:query_params] || {}
892
+
893
+ # header parameters
894
+ header_params = opts[:header_params] || {}
895
+ # HTTP header 'Accept' (if needed)
896
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
897
+
898
+ # form parameters
899
+ form_params = opts[:form_params] || {}
900
+
901
+ # http body (model)
902
+ post_body = opts[:body]
903
+
904
+ # return_type
905
+ return_type = opts[:return_type] || 'EmailLinksResult'
906
+
907
+ # auth_names
908
+ auth_names = opts[:auth_names] || ['API_KEY']
909
+
910
+ new_options = opts.merge(
911
+ :header_params => header_params,
912
+ :query_params => query_params,
913
+ :form_params => form_params,
914
+ :body => post_body,
915
+ :auth_names => auth_names,
916
+ :return_type => return_type
917
+ )
918
+
919
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
920
+ if @api_client.config.debugging
921
+ @api_client.config.logger.debug "API called: EmailControllerApi#get_email_links\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
922
+ end
923
+ return data, status_code, headers
924
+ end
925
+
864
926
  # Parse and return text from an email, stripping HTML and decoding encoded characters
865
927
  # Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators.
866
928
  # @param email_id [String] ID of email to fetch text for
@@ -1007,6 +1069,70 @@ module MailSlurpClient
1007
1069
  return data, status_code, headers
1008
1070
  end
1009
1071
 
1072
+ # Get gravatar url for email address
1073
+ # @param email_address [String] emailAddress
1074
+ # @param [Hash] opts the optional parameters
1075
+ # @option opts [String] :size size
1076
+ # @return [GravatarUrl]
1077
+ def get_gravatar_url_for_email_address(email_address, opts = {})
1078
+ data, _status_code, _headers = get_gravatar_url_for_email_address_with_http_info(email_address, opts)
1079
+ data
1080
+ end
1081
+
1082
+ # Get gravatar url for email address
1083
+ # @param email_address [String] emailAddress
1084
+ # @param [Hash] opts the optional parameters
1085
+ # @option opts [String] :size size
1086
+ # @return [Array<(GravatarUrl, Integer, Hash)>] GravatarUrl data, response status code and response headers
1087
+ def get_gravatar_url_for_email_address_with_http_info(email_address, opts = {})
1088
+ if @api_client.config.debugging
1089
+ @api_client.config.logger.debug 'Calling API: EmailControllerApi.get_gravatar_url_for_email_address ...'
1090
+ end
1091
+ # verify the required parameter 'email_address' is set
1092
+ if @api_client.config.client_side_validation && email_address.nil?
1093
+ fail ArgumentError, "Missing the required parameter 'email_address' when calling EmailControllerApi.get_gravatar_url_for_email_address"
1094
+ end
1095
+ # resource path
1096
+ local_var_path = '/emails/gravatarFor'
1097
+
1098
+ # query parameters
1099
+ query_params = opts[:query_params] || {}
1100
+ query_params[:'emailAddress'] = email_address
1101
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
1102
+
1103
+ # header parameters
1104
+ header_params = opts[:header_params] || {}
1105
+ # HTTP header 'Accept' (if needed)
1106
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1107
+
1108
+ # form parameters
1109
+ form_params = opts[:form_params] || {}
1110
+
1111
+ # http body (model)
1112
+ post_body = opts[:body]
1113
+
1114
+ # return_type
1115
+ return_type = opts[:return_type] || 'GravatarUrl'
1116
+
1117
+ # auth_names
1118
+ auth_names = opts[:auth_names] || ['API_KEY']
1119
+
1120
+ new_options = opts.merge(
1121
+ :header_params => header_params,
1122
+ :query_params => query_params,
1123
+ :form_params => form_params,
1124
+ :body => post_body,
1125
+ :auth_names => auth_names,
1126
+ :return_type => return_type
1127
+ )
1128
+
1129
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1130
+ if @api_client.config.debugging
1131
+ @api_client.config.logger.debug "API called: EmailControllerApi#get_gravatar_url_for_email_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1132
+ end
1133
+ return data, status_code, headers
1134
+ end
1135
+
1010
1136
  # Get latest email in all inboxes. Most recently received.
1011
1137
  # Get the newest email in all inboxes or in a passed set of inbox IDs
1012
1138
  # @param [Hash] opts the optional parameters