mailslurp_client 15.8.1 → 15.11.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/attachment_controller_api.rb +4 -4
  3. data/lib/mailslurp_client/api/email_controller_api.rb +68 -3
  4. data/lib/mailslurp_client/api/form_controller_api.rb +2 -2
  5. data/lib/mailslurp_client/api/inbox_controller_api.rb +75 -0
  6. data/lib/mailslurp_client/api/missed_email_controller_api.rb +56 -0
  7. data/lib/mailslurp_client/api/phone_controller_api.rb +487 -0
  8. data/lib/mailslurp_client/api/sent_emails_controller_api.rb +73 -0
  9. data/lib/mailslurp_client/api/sms_controller_api.rb +286 -0
  10. data/lib/mailslurp_client/api/wait_for_controller_api.rb +64 -0
  11. data/lib/mailslurp_client/api/webhook_controller_api.rb +2 -2
  12. data/lib/mailslurp_client/configuration.rb +2 -2
  13. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +2 -2
  14. data/lib/mailslurp_client/models/alias_projection.rb +31 -31
  15. data/lib/mailslurp_client/models/attachment_entity.rb +10 -1
  16. data/lib/mailslurp_client/models/attachment_projection.rb +14 -14
  17. data/lib/mailslurp_client/models/contact_projection.rb +18 -13
  18. data/lib/mailslurp_client/models/create_emergency_address_options.rb +324 -0
  19. data/lib/mailslurp_client/models/create_webhook_options.rb +3 -3
  20. data/lib/mailslurp_client/models/email_html_dto.rb +215 -0
  21. data/lib/mailslurp_client/models/email_preview.rb +5 -0
  22. data/lib/mailslurp_client/models/email_projection.rb +20 -10
  23. data/lib/mailslurp_client/models/emergency_address.rb +408 -0
  24. data/lib/mailslurp_client/models/emergency_address_dto.rb +273 -0
  25. data/lib/mailslurp_client/models/empty_response_dto.rb +206 -0
  26. data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +15 -15
  27. data/lib/mailslurp_client/models/inbox_preview.rb +5 -0
  28. data/lib/mailslurp_client/models/missed_email.rb +37 -1
  29. data/lib/mailslurp_client/models/organization_inbox_projection.rb +5 -0
  30. data/lib/mailslurp_client/models/page_alias.rb +19 -19
  31. data/lib/mailslurp_client/models/page_attachment_entity.rb +19 -19
  32. data/lib/mailslurp_client/models/page_bounced_email.rb +19 -19
  33. data/lib/mailslurp_client/models/page_bounced_recipients.rb +19 -19
  34. data/lib/mailslurp_client/models/page_contact_projection.rb +19 -19
  35. data/lib/mailslurp_client/models/page_email_preview.rb +19 -19
  36. data/lib/mailslurp_client/models/page_email_projection.rb +19 -19
  37. data/lib/mailslurp_client/models/page_email_validation_request.rb +19 -19
  38. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +19 -19
  39. data/lib/mailslurp_client/models/page_group_projection.rb +19 -19
  40. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +19 -19
  41. data/lib/mailslurp_client/models/page_inbox_projection.rb +19 -19
  42. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +19 -19
  43. data/lib/mailslurp_client/models/page_missed_email_projection.rb +19 -19
  44. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +19 -19
  45. data/lib/mailslurp_client/models/page_phone_number_projection.rb +308 -0
  46. data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +344 -0
  47. data/lib/mailslurp_client/models/page_sms_projection.rb +308 -0
  48. data/lib/mailslurp_client/models/page_template_projection.rb +19 -19
  49. data/lib/mailslurp_client/models/page_thread_projection.rb +19 -19
  50. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +19 -19
  51. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +19 -19
  52. data/lib/mailslurp_client/models/page_webhook_projection.rb +19 -19
  53. data/lib/mailslurp_client/models/page_webhook_result.rb +19 -19
  54. data/lib/mailslurp_client/models/phone_number_dto.rb +347 -0
  55. data/lib/mailslurp_client/models/phone_number_projection.rb +302 -0
  56. data/lib/mailslurp_client/models/phone_plan_dto.rb +287 -0
  57. data/lib/mailslurp_client/models/send_with_queue_result.rb +318 -0
  58. data/lib/mailslurp_client/models/sent_email_projection.rb +32 -27
  59. data/lib/mailslurp_client/models/sms_match_option.rb +289 -0
  60. data/lib/mailslurp_client/models/sms_message.rb +318 -0
  61. data/lib/mailslurp_client/models/sms_preview.rb +267 -0
  62. data/lib/mailslurp_client/models/sms_projection.rb +282 -0
  63. data/lib/mailslurp_client/models/template_projection.rb +18 -18
  64. data/lib/mailslurp_client/models/thread_projection.rb +36 -36
  65. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +10 -10
  66. data/lib/mailslurp_client/models/wait_for_sms_conditions.rb +371 -0
  67. data/lib/mailslurp_client/models/webhook_bounce_payload.rb +2 -2
  68. data/lib/mailslurp_client/models/webhook_bounce_recipient_payload.rb +2 -2
  69. data/lib/mailslurp_client/models/webhook_dto.rb +3 -3
  70. data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +2 -2
  71. data/lib/mailslurp_client/models/webhook_email_read_payload.rb +2 -2
  72. data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +2 -2
  73. data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +7 -2
  74. data/lib/mailslurp_client/models/webhook_new_email_payload.rb +2 -2
  75. data/lib/mailslurp_client/models/webhook_projection.rb +2 -2
  76. data/lib/mailslurp_client/models/webhook_result_dto.rb +7 -2
  77. data/lib/mailslurp_client/version.rb +1 -1
  78. data/lib/mailslurp_client.rb +19 -0
  79. metadata +21 -2
@@ -0,0 +1,286 @@
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 SmsControllerApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete SMS message.
23
+ # Delete an SMS message
24
+ # @param sms_id [String]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [nil]
27
+ def delete_sms_message(sms_id, opts = {})
28
+ delete_sms_message_with_http_info(sms_id, opts)
29
+ nil
30
+ end
31
+
32
+ # Delete SMS message.
33
+ # Delete an SMS message
34
+ # @param sms_id [String]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
+ def delete_sms_message_with_http_info(sms_id, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: SmsControllerApi.delete_sms_message ...'
40
+ end
41
+ # verify the required parameter 'sms_id' is set
42
+ if @api_client.config.client_side_validation && sms_id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'sms_id' when calling SmsControllerApi.delete_sms_message"
44
+ end
45
+ # resource path
46
+ local_var_path = '/sms/{smsId}'.sub('{' + 'smsId' + '}', CGI.escape(sms_id.to_s))
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+
54
+ # form parameters
55
+ form_params = opts[:form_params] || {}
56
+
57
+ # http body (model)
58
+ post_body = opts[:body]
59
+
60
+ # return_type
61
+ return_type = opts[:return_type]
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(:DELETE, local_var_path, new_options)
76
+ if @api_client.config.debugging
77
+ @api_client.config.logger.debug "API called: SmsControllerApi#delete_sms_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
78
+ end
79
+ return data, status_code, headers
80
+ end
81
+
82
+ # Delete all SMS messages
83
+ # Delete all SMS messages or all messages for a given phone number
84
+ # @param [Hash] opts the optional parameters
85
+ # @option opts [String] :phone_number_id
86
+ # @return [nil]
87
+ def delete_sms_messages(opts = {})
88
+ delete_sms_messages_with_http_info(opts)
89
+ nil
90
+ end
91
+
92
+ # Delete all SMS messages
93
+ # Delete all SMS messages or all messages for a given phone number
94
+ # @param [Hash] opts the optional parameters
95
+ # @option opts [String] :phone_number_id
96
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
97
+ def delete_sms_messages_with_http_info(opts = {})
98
+ if @api_client.config.debugging
99
+ @api_client.config.logger.debug 'Calling API: SmsControllerApi.delete_sms_messages ...'
100
+ end
101
+ # resource path
102
+ local_var_path = '/sms'
103
+
104
+ # query parameters
105
+ query_params = opts[:query_params] || {}
106
+ query_params[:'phoneNumberId'] = opts[:'phone_number_id'] if !opts[:'phone_number_id'].nil?
107
+
108
+ # header parameters
109
+ header_params = opts[:header_params] || {}
110
+
111
+ # form parameters
112
+ form_params = opts[:form_params] || {}
113
+
114
+ # http body (model)
115
+ post_body = opts[:body]
116
+
117
+ # return_type
118
+ return_type = opts[:return_type]
119
+
120
+ # auth_names
121
+ auth_names = opts[:auth_names] || ['API_KEY']
122
+
123
+ new_options = opts.merge(
124
+ :header_params => header_params,
125
+ :query_params => query_params,
126
+ :form_params => form_params,
127
+ :body => post_body,
128
+ :auth_names => auth_names,
129
+ :return_type => return_type
130
+ )
131
+
132
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
133
+ if @api_client.config.debugging
134
+ @api_client.config.logger.debug "API called: SmsControllerApi#delete_sms_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
135
+ end
136
+ return data, status_code, headers
137
+ end
138
+
139
+ # Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController.
140
+ # Returns a SMS summary object with content.
141
+ # @param sms_id [String]
142
+ # @param [Hash] opts the optional parameters
143
+ # @return [SmsMessage]
144
+ def get_sms_message(sms_id, opts = {})
145
+ data, _status_code, _headers = get_sms_message_with_http_info(sms_id, opts)
146
+ data
147
+ end
148
+
149
+ # Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController.
150
+ # Returns a SMS summary object with content.
151
+ # @param sms_id [String]
152
+ # @param [Hash] opts the optional parameters
153
+ # @return [Array<(SmsMessage, Integer, Hash)>] SmsMessage data, response status code and response headers
154
+ def get_sms_message_with_http_info(sms_id, opts = {})
155
+ if @api_client.config.debugging
156
+ @api_client.config.logger.debug 'Calling API: SmsControllerApi.get_sms_message ...'
157
+ end
158
+ # verify the required parameter 'sms_id' is set
159
+ if @api_client.config.client_side_validation && sms_id.nil?
160
+ fail ArgumentError, "Missing the required parameter 'sms_id' when calling SmsControllerApi.get_sms_message"
161
+ end
162
+ # resource path
163
+ local_var_path = '/sms/{smsId}'.sub('{' + 'smsId' + '}', CGI.escape(sms_id.to_s))
164
+
165
+ # query parameters
166
+ query_params = opts[:query_params] || {}
167
+
168
+ # header parameters
169
+ header_params = opts[:header_params] || {}
170
+ # HTTP header 'Accept' (if needed)
171
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
172
+
173
+ # form parameters
174
+ form_params = opts[:form_params] || {}
175
+
176
+ # http body (model)
177
+ post_body = opts[:body]
178
+
179
+ # return_type
180
+ return_type = opts[:return_type] || 'SmsMessage'
181
+
182
+ # auth_names
183
+ auth_names = opts[:auth_names] || ['API_KEY']
184
+
185
+ new_options = opts.merge(
186
+ :header_params => header_params,
187
+ :query_params => query_params,
188
+ :form_params => form_params,
189
+ :body => post_body,
190
+ :auth_names => auth_names,
191
+ :return_type => return_type
192
+ )
193
+
194
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
195
+ if @api_client.config.debugging
196
+ @api_client.config.logger.debug "API called: SmsControllerApi#get_sms_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
197
+ end
198
+ return data, status_code, headers
199
+ end
200
+
201
+ # Get all SMS messages in all phone numbers in paginated form. .
202
+ # By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages
203
+ # @param [Hash] opts the optional parameters
204
+ # @option opts [String] :phone_number Optional receiving phone number to filter SMS messages for
205
+ # @option opts [Integer] :page Optional page index in SMS list pagination (default to 0)
206
+ # @option opts [Integer] :size Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results (default to 20)
207
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
208
+ # @option opts [Boolean] :unread_only Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly (default to false)
209
+ # @option opts [DateTime] :since Optional filter SMSs received after given date time
210
+ # @option opts [DateTime] :before Optional filter SMSs received before given date time
211
+ # @return [PageSmsProjection]
212
+ def get_sms_messages_paginated(opts = {})
213
+ data, _status_code, _headers = get_sms_messages_paginated_with_http_info(opts)
214
+ data
215
+ end
216
+
217
+ # Get all SMS messages in all phone numbers in paginated form. .
218
+ # By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages
219
+ # @param [Hash] opts the optional parameters
220
+ # @option opts [String] :phone_number Optional receiving phone number to filter SMS messages for
221
+ # @option opts [Integer] :page Optional page index in SMS list pagination
222
+ # @option opts [Integer] :size Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results
223
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
224
+ # @option opts [Boolean] :unread_only Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly
225
+ # @option opts [DateTime] :since Optional filter SMSs received after given date time
226
+ # @option opts [DateTime] :before Optional filter SMSs received before given date time
227
+ # @return [Array<(PageSmsProjection, Integer, Hash)>] PageSmsProjection data, response status code and response headers
228
+ def get_sms_messages_paginated_with_http_info(opts = {})
229
+ if @api_client.config.debugging
230
+ @api_client.config.logger.debug 'Calling API: SmsControllerApi.get_sms_messages_paginated ...'
231
+ end
232
+ if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
233
+ fail ArgumentError, 'invalid value for "opts[:"size"]" when calling SmsControllerApi.get_sms_messages_paginated, must be smaller than or equal to 100.'
234
+ end
235
+
236
+ allowable_values = ["ASC", "DESC"]
237
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
238
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
239
+ end
240
+ # resource path
241
+ local_var_path = '/sms'
242
+
243
+ # query parameters
244
+ query_params = opts[:query_params] || {}
245
+ query_params[:'phoneNumber'] = opts[:'phone_number'] if !opts[:'phone_number'].nil?
246
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
247
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
248
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
249
+ query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
250
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
251
+ query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
252
+
253
+ # header parameters
254
+ header_params = opts[:header_params] || {}
255
+ # HTTP header 'Accept' (if needed)
256
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
257
+
258
+ # form parameters
259
+ form_params = opts[:form_params] || {}
260
+
261
+ # http body (model)
262
+ post_body = opts[:body]
263
+
264
+ # return_type
265
+ return_type = opts[:return_type] || 'PageSmsProjection'
266
+
267
+ # auth_names
268
+ auth_names = opts[:auth_names] || ['API_KEY']
269
+
270
+ new_options = opts.merge(
271
+ :header_params => header_params,
272
+ :query_params => query_params,
273
+ :form_params => form_params,
274
+ :body => post_body,
275
+ :auth_names => auth_names,
276
+ :return_type => return_type
277
+ )
278
+
279
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
280
+ if @api_client.config.debugging
281
+ @api_client.config.logger.debug "API called: SmsControllerApi#get_sms_messages_paginated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
282
+ end
283
+ return data, status_code, headers
284
+ end
285
+ end
286
+ end
@@ -548,5 +548,69 @@ module MailSlurpClient
548
548
  end
549
549
  return data, status_code, headers
550
550
  end
551
+
552
+ # Wait for an SMS message to match the provided filter conditions such as body contains keyword.
553
+ # Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met
554
+ # @param wait_for_sms_conditions [WaitForSmsConditions]
555
+ # @param [Hash] opts the optional parameters
556
+ # @return [Array<SmsPreview>]
557
+ def wait_for_sms(wait_for_sms_conditions, opts = {})
558
+ data, _status_code, _headers = wait_for_sms_with_http_info(wait_for_sms_conditions, opts)
559
+ data
560
+ end
561
+
562
+ # Wait for an SMS message to match the provided filter conditions such as body contains keyword.
563
+ # Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met
564
+ # @param wait_for_sms_conditions [WaitForSmsConditions]
565
+ # @param [Hash] opts the optional parameters
566
+ # @return [Array<(Array<SmsPreview>, Integer, Hash)>] Array<SmsPreview> data, response status code and response headers
567
+ def wait_for_sms_with_http_info(wait_for_sms_conditions, opts = {})
568
+ if @api_client.config.debugging
569
+ @api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for_sms ...'
570
+ end
571
+ # verify the required parameter 'wait_for_sms_conditions' is set
572
+ if @api_client.config.client_side_validation && wait_for_sms_conditions.nil?
573
+ fail ArgumentError, "Missing the required parameter 'wait_for_sms_conditions' when calling WaitForControllerApi.wait_for_sms"
574
+ end
575
+ # resource path
576
+ local_var_path = '/waitForSms'
577
+
578
+ # query parameters
579
+ query_params = opts[:query_params] || {}
580
+
581
+ # header parameters
582
+ header_params = opts[:header_params] || {}
583
+ # HTTP header 'Accept' (if needed)
584
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
585
+ # HTTP header 'Content-Type'
586
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
587
+
588
+ # form parameters
589
+ form_params = opts[:form_params] || {}
590
+
591
+ # http body (model)
592
+ post_body = opts[:body] || @api_client.object_to_http_body(wait_for_sms_conditions)
593
+
594
+ # return_type
595
+ return_type = opts[:return_type] || 'Array<SmsPreview>'
596
+
597
+ # auth_names
598
+ auth_names = opts[:auth_names] || ['API_KEY']
599
+
600
+ new_options = opts.merge(
601
+ :header_params => header_params,
602
+ :query_params => query_params,
603
+ :form_params => form_params,
604
+ :body => post_body,
605
+ :auth_names => auth_names,
606
+ :return_type => return_type
607
+ )
608
+
609
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
610
+ if @api_client.config.debugging
611
+ @api_client.config.logger.debug "API called: WaitForControllerApi#wait_for_sms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
612
+ end
613
+ return data, status_code, headers
614
+ end
551
615
  end
552
616
  end
@@ -604,7 +604,7 @@ module MailSlurpClient
604
604
  fail ArgumentError, "Missing the required parameter 'event' when calling WebhookControllerApi.get_json_schema_for_webhook_event"
605
605
  end
606
606
  # verify enum value
607
- allowable_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"]
607
+ allowable_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"]
608
608
  if @api_client.config.client_side_validation && !allowable_values.include?(event)
609
609
  fail ArgumentError, "invalid value for \"event\", must be one of #{allowable_values}"
610
610
  end
@@ -725,7 +725,7 @@ module MailSlurpClient
725
725
  if @api_client.config.debugging
726
726
  @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload ...'
727
727
  end
728
- allowable_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"]
728
+ allowable_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"]
729
729
  if @api_client.config.client_side_validation && opts[:'event_name'] && !allowable_values.include?(opts[:'event_name'])
730
730
  fail ArgumentError, "invalid value for \"event_name\", must be one of #{allowable_values}"
731
731
  end
@@ -127,7 +127,7 @@ module MailSlurpClient
127
127
 
128
128
  def initialize
129
129
  @scheme = 'https'
130
- @host = 'api.mailslurp.com'
130
+ @host = 'ruby.api.mailslurp.com'
131
131
  @base_path = ''
132
132
  @api_key = {}
133
133
  @api_key_prefix = {}
@@ -207,7 +207,7 @@ module MailSlurpClient
207
207
  def server_settings
208
208
  [
209
209
  {
210
- url: "https://api.mailslurp.com",
210
+ url: "https://ruby.api.mailslurp.com",
211
211
  description: "MailSlurp API Server",
212
212
  }
213
213
  ]
@@ -126,7 +126,7 @@ module MailSlurpClient
126
126
  # @return true if the model is valid
127
127
  def valid?
128
128
  return false if @event_name.nil?
129
- event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
129
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
130
130
  return false unless event_name_validator.valid?(@event_name)
131
131
  return false if @message_id.nil?
132
132
  return false if @webhook_id.nil?
@@ -136,7 +136,7 @@ module MailSlurpClient
136
136
  # Custom attribute writer method checking allowed values (enum).
137
137
  # @param [Object] event_name Object to be assigned
138
138
  def event_name=(event_name)
139
- validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
139
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
140
140
  unless validator.valid?(event_name)
141
141
  fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
142
142
  end
@@ -19,29 +19,29 @@ module MailSlurpClient
19
19
 
20
20
  attr_accessor :id
21
21
 
22
- attr_accessor :inbox_id
22
+ attr_accessor :user_id
23
23
 
24
24
  attr_accessor :email_address
25
25
 
26
- attr_accessor :user_id
27
-
28
- attr_accessor :use_threads
26
+ attr_accessor :inbox_id
29
27
 
30
28
  attr_accessor :created_at
31
29
 
32
30
  attr_accessor :updated_at
33
31
 
32
+ attr_accessor :use_threads
33
+
34
34
  # Attribute mapping from ruby-style variable name to JSON key.
35
35
  def self.attribute_map
36
36
  {
37
37
  :'name' => :'name',
38
38
  :'id' => :'id',
39
- :'inbox_id' => :'inboxId',
40
- :'email_address' => :'emailAddress',
41
39
  :'user_id' => :'userId',
42
- :'use_threads' => :'useThreads',
40
+ :'email_address' => :'emailAddress',
41
+ :'inbox_id' => :'inboxId',
43
42
  :'created_at' => :'createdAt',
44
- :'updated_at' => :'updatedAt'
43
+ :'updated_at' => :'updatedAt',
44
+ :'use_threads' => :'useThreads'
45
45
  }
46
46
  end
47
47
 
@@ -50,12 +50,12 @@ module MailSlurpClient
50
50
  {
51
51
  :'name' => :'String',
52
52
  :'id' => :'String',
53
- :'inbox_id' => :'String',
54
- :'email_address' => :'String',
55
53
  :'user_id' => :'String',
56
- :'use_threads' => :'Boolean',
54
+ :'email_address' => :'String',
55
+ :'inbox_id' => :'String',
57
56
  :'created_at' => :'DateTime',
58
- :'updated_at' => :'DateTime'
57
+ :'updated_at' => :'DateTime',
58
+ :'use_threads' => :'Boolean'
59
59
  }
60
60
  end
61
61
 
@@ -88,20 +88,16 @@ module MailSlurpClient
88
88
  self.id = attributes[:'id']
89
89
  end
90
90
 
91
- if attributes.key?(:'inbox_id')
92
- self.inbox_id = attributes[:'inbox_id']
91
+ if attributes.key?(:'user_id')
92
+ self.user_id = attributes[:'user_id']
93
93
  end
94
94
 
95
95
  if attributes.key?(:'email_address')
96
96
  self.email_address = attributes[:'email_address']
97
97
  end
98
98
 
99
- if attributes.key?(:'user_id')
100
- self.user_id = attributes[:'user_id']
101
- end
102
-
103
- if attributes.key?(:'use_threads')
104
- self.use_threads = attributes[:'use_threads']
99
+ if attributes.key?(:'inbox_id')
100
+ self.inbox_id = attributes[:'inbox_id']
105
101
  end
106
102
 
107
103
  if attributes.key?(:'created_at')
@@ -111,6 +107,10 @@ module MailSlurpClient
111
107
  if attributes.key?(:'updated_at')
112
108
  self.updated_at = attributes[:'updated_at']
113
109
  end
110
+
111
+ if attributes.key?(:'use_threads')
112
+ self.use_threads = attributes[:'use_threads']
113
+ end
114
114
  end
115
115
 
116
116
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -121,16 +121,16 @@ module MailSlurpClient
121
121
  invalid_properties.push('invalid value for "id", id cannot be nil.')
122
122
  end
123
123
 
124
- if @inbox_id.nil?
125
- invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
124
+ if @user_id.nil?
125
+ invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
126
126
  end
127
127
 
128
128
  if @email_address.nil?
129
129
  invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
130
130
  end
131
131
 
132
- if @user_id.nil?
133
- invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
132
+ if @inbox_id.nil?
133
+ invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
134
134
  end
135
135
 
136
136
  if @created_at.nil?
@@ -148,9 +148,9 @@ module MailSlurpClient
148
148
  # @return true if the model is valid
149
149
  def valid?
150
150
  return false if @id.nil?
151
- return false if @inbox_id.nil?
152
- return false if @email_address.nil?
153
151
  return false if @user_id.nil?
152
+ return false if @email_address.nil?
153
+ return false if @inbox_id.nil?
154
154
  return false if @created_at.nil?
155
155
  return false if @updated_at.nil?
156
156
  true
@@ -163,12 +163,12 @@ module MailSlurpClient
163
163
  self.class == o.class &&
164
164
  name == o.name &&
165
165
  id == o.id &&
166
- inbox_id == o.inbox_id &&
167
- email_address == o.email_address &&
168
166
  user_id == o.user_id &&
169
- use_threads == o.use_threads &&
167
+ email_address == o.email_address &&
168
+ inbox_id == o.inbox_id &&
170
169
  created_at == o.created_at &&
171
- updated_at == o.updated_at
170
+ updated_at == o.updated_at &&
171
+ use_threads == o.use_threads
172
172
  end
173
173
 
174
174
  # @see the `==` method
@@ -180,7 +180,7 @@ module MailSlurpClient
180
180
  # Calculates hash code according to all attributes.
181
181
  # @return [Integer] Hash code
182
182
  def hash
183
- [name, id, inbox_id, email_address, user_id, use_threads, created_at, updated_at].hash
183
+ [name, id, user_id, email_address, inbox_id, created_at, updated_at, use_threads].hash
184
184
  end
185
185
 
186
186
  # Builds the object from hash
@@ -19,6 +19,8 @@ module MailSlurpClient
19
19
 
20
20
  attr_accessor :attachment_id
21
21
 
22
+ attr_accessor :bucket
23
+
22
24
  attr_accessor :user_id
23
25
 
24
26
  attr_accessor :content_type
@@ -36,6 +38,7 @@ module MailSlurpClient
36
38
  {
37
39
  :'id' => :'id',
38
40
  :'attachment_id' => :'attachmentId',
41
+ :'bucket' => :'bucket',
39
42
  :'user_id' => :'userId',
40
43
  :'content_type' => :'contentType',
41
44
  :'content_length' => :'contentLength',
@@ -50,6 +53,7 @@ module MailSlurpClient
50
53
  {
51
54
  :'id' => :'String',
52
55
  :'attachment_id' => :'String',
56
+ :'bucket' => :'String',
53
57
  :'user_id' => :'String',
54
58
  :'content_type' => :'String',
55
59
  :'content_length' => :'Integer',
@@ -88,6 +92,10 @@ module MailSlurpClient
88
92
  self.attachment_id = attributes[:'attachment_id']
89
93
  end
90
94
 
95
+ if attributes.key?(:'bucket')
96
+ self.bucket = attributes[:'bucket']
97
+ end
98
+
91
99
  if attributes.key?(:'user_id')
92
100
  self.user_id = attributes[:'user_id']
93
101
  end
@@ -153,6 +161,7 @@ module MailSlurpClient
153
161
  self.class == o.class &&
154
162
  id == o.id &&
155
163
  attachment_id == o.attachment_id &&
164
+ bucket == o.bucket &&
156
165
  user_id == o.user_id &&
157
166
  content_type == o.content_type &&
158
167
  content_length == o.content_length &&
@@ -170,7 +179,7 @@ module MailSlurpClient
170
179
  # Calculates hash code according to all attributes.
171
180
  # @return [Integer] Hash code
172
181
  def hash
173
- [id, attachment_id, user_id, content_type, content_length, name, created_at, updated_at].hash
182
+ [id, attachment_id, bucket, user_id, content_type, content_length, name, created_at, updated_at].hash
174
183
  end
175
184
 
176
185
  # Builds the object from hash