mailslurp_client 11.10.2 → 11.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client.rb +2 -2
  3. data/lib/mailslurp_client/api/alias_controller_api.rb +1 -1
  4. data/lib/mailslurp_client/api/attachment_controller_api.rb +1 -1
  5. data/lib/mailslurp_client/api/bulk_actions_controller_api.rb +1 -1
  6. data/lib/mailslurp_client/api/common_actions_controller_api.rb +1 -1
  7. data/lib/mailslurp_client/api/contact_controller_api.rb +61 -1
  8. data/lib/mailslurp_client/api/domain_controller_api.rb +1 -1
  9. data/lib/mailslurp_client/api/email_controller_api.rb +125 -1
  10. data/lib/mailslurp_client/api/expired_controller_api.rb +1 -1
  11. data/lib/mailslurp_client/api/form_controller_api.rb +1 -1
  12. data/lib/mailslurp_client/api/group_controller_api.rb +1 -1
  13. data/lib/mailslurp_client/api/inbox_controller_api.rb +61 -1
  14. data/lib/mailslurp_client/api/mail_server_controller_api.rb +1 -1
  15. data/lib/mailslurp_client/api/missed_email_controller_api.rb +1 -1
  16. data/lib/mailslurp_client/api/sent_emails_controller_api.rb +1 -1
  17. data/lib/mailslurp_client/api/template_controller_api.rb +1 -1
  18. data/lib/mailslurp_client/api/wait_for_controller_api.rb +1 -1
  19. data/lib/mailslurp_client/api/webhook_controller_api.rb +13 -6
  20. data/lib/mailslurp_client/api_client.rb +1 -1
  21. data/lib/mailslurp_client/api_error.rb +1 -1
  22. data/lib/mailslurp_client/configuration.rb +1 -1
  23. data/lib/mailslurp_client/models/{webhook_payload.rb → abstract_webhook_payload.rb} +22 -110
  24. data/lib/mailslurp_client/models/alias_dto.rb +1 -1
  25. data/lib/mailslurp_client/models/alias_projection.rb +1 -1
  26. data/lib/mailslurp_client/models/attachment_entity.rb +1 -1
  27. data/lib/mailslurp_client/models/attachment_meta_data.rb +1 -1
  28. data/lib/mailslurp_client/models/basic_auth_options.rb +1 -1
  29. data/lib/mailslurp_client/models/bulk_send_email_options.rb +1 -1
  30. data/lib/mailslurp_client/models/contact_dto.rb +11 -2
  31. data/lib/mailslurp_client/models/contact_projection.rb +1 -1
  32. data/lib/mailslurp_client/models/content_match_options.rb +1 -1
  33. data/lib/mailslurp_client/models/create_alias_options.rb +1 -1
  34. data/lib/mailslurp_client/models/create_contact_options.rb +1 -1
  35. data/lib/mailslurp_client/models/create_domain_options.rb +1 -1
  36. data/lib/mailslurp_client/models/create_group_options.rb +1 -1
  37. data/lib/mailslurp_client/models/create_inbox_dto.rb +1 -1
  38. data/lib/mailslurp_client/models/create_template_options.rb +1 -1
  39. data/lib/mailslurp_client/models/create_webhook_options.rb +46 -2
  40. data/lib/mailslurp_client/models/describe_domain_options.rb +1 -1
  41. data/lib/mailslurp_client/models/describe_mail_server_domain_result.rb +1 -1
  42. data/lib/mailslurp_client/models/dns_lookup_options.rb +1 -1
  43. data/lib/mailslurp_client/models/dns_lookup_result.rb +1 -1
  44. data/lib/mailslurp_client/models/dns_lookup_results.rb +1 -1
  45. data/lib/mailslurp_client/models/domain_dto.rb +1 -1
  46. data/lib/mailslurp_client/models/domain_name_record.rb +1 -1
  47. data/lib/mailslurp_client/models/domain_preview.rb +1 -1
  48. data/lib/mailslurp_client/models/download_attachment_dto.rb +1 -1
  49. data/lib/mailslurp_client/models/email.rb +1 -1
  50. data/lib/mailslurp_client/models/email_analysis.rb +1 -1
  51. data/lib/mailslurp_client/models/email_content_match_result.rb +1 -1
  52. data/lib/mailslurp_client/models/email_preview.rb +1 -1
  53. data/lib/mailslurp_client/models/email_projection.rb +1 -1
  54. data/lib/mailslurp_client/models/email_text_lines_result.rb +1 -1
  55. data/lib/mailslurp_client/models/email_verification_result.rb +1 -1
  56. data/lib/mailslurp_client/models/expiration_defaults.rb +1 -1
  57. data/lib/mailslurp_client/models/expired_inbox_dto.rb +1 -1
  58. data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +1 -1
  59. data/lib/mailslurp_client/models/forward_email_options.rb +1 -1
  60. data/lib/mailslurp_client/models/group_contacts_dto.rb +1 -1
  61. data/lib/mailslurp_client/models/group_dto.rb +1 -1
  62. data/lib/mailslurp_client/models/group_projection.rb +1 -1
  63. data/lib/mailslurp_client/models/html_validation_result.rb +1 -1
  64. data/lib/mailslurp_client/models/inbox.rb +1 -1
  65. data/lib/mailslurp_client/models/inbox_projection.rb +1 -1
  66. data/lib/mailslurp_client/models/ip_address_result.rb +1 -1
  67. data/lib/mailslurp_client/models/match_option.rb +1 -1
  68. data/lib/mailslurp_client/models/match_options.rb +1 -1
  69. data/lib/mailslurp_client/models/missed_email.rb +1 -1
  70. data/lib/mailslurp_client/models/missed_email_projection.rb +1 -1
  71. data/lib/mailslurp_client/models/model_alias.rb +1 -1
  72. data/lib/mailslurp_client/models/name_server_record.rb +1 -1
  73. data/lib/mailslurp_client/models/organization_inbox_projection.rb +1 -1
  74. data/lib/mailslurp_client/models/page_alias.rb +1 -1
  75. data/lib/mailslurp_client/models/page_attachment_entity.rb +1 -1
  76. data/lib/mailslurp_client/models/page_contact_projection.rb +1 -1
  77. data/lib/mailslurp_client/models/page_email_preview.rb +1 -1
  78. data/lib/mailslurp_client/models/page_email_projection.rb +1 -1
  79. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +1 -1
  80. data/lib/mailslurp_client/models/page_group_projection.rb +1 -1
  81. data/lib/mailslurp_client/models/page_inbox_projection.rb +1 -1
  82. data/lib/mailslurp_client/models/page_missed_email_projection.rb +1 -1
  83. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +1 -1
  84. data/lib/mailslurp_client/models/page_sent_email_projection.rb +1 -1
  85. data/lib/mailslurp_client/models/page_template_projection.rb +1 -1
  86. data/lib/mailslurp_client/models/page_thread_projection.rb +1 -1
  87. data/lib/mailslurp_client/models/page_webhook_projection.rb +1 -1
  88. data/lib/mailslurp_client/models/pageable.rb +1 -1
  89. data/lib/mailslurp_client/models/raw_email_json.rb +1 -1
  90. data/lib/mailslurp_client/models/reply_to_alias_email_options.rb +1 -1
  91. data/lib/mailslurp_client/models/reply_to_email_options.rb +1 -1
  92. data/lib/mailslurp_client/models/send_email_options.rb +1 -1
  93. data/lib/mailslurp_client/models/sent_email_dto.rb +1 -1
  94. data/lib/mailslurp_client/models/sent_email_projection.rb +1 -1
  95. data/lib/mailslurp_client/models/set_inbox_favourited_options.rb +1 -1
  96. data/lib/mailslurp_client/models/simple_send_email_options.rb +1 -1
  97. data/lib/mailslurp_client/models/sort.rb +1 -1
  98. data/lib/mailslurp_client/models/template_dto.rb +1 -1
  99. data/lib/mailslurp_client/models/template_projection.rb +1 -1
  100. data/lib/mailslurp_client/models/template_variable.rb +1 -1
  101. data/lib/mailslurp_client/models/thread_projection.rb +1 -1
  102. data/lib/mailslurp_client/models/unread_count.rb +1 -1
  103. data/lib/mailslurp_client/models/update_alias_options.rb +1 -1
  104. data/lib/mailslurp_client/models/update_domain_options.rb +1 -1
  105. data/lib/mailslurp_client/models/update_group_contacts.rb +1 -1
  106. data/lib/mailslurp_client/models/update_inbox_options.rb +1 -1
  107. data/lib/mailslurp_client/models/upload_attachment_options.rb +1 -1
  108. data/lib/mailslurp_client/models/validation_dto.rb +1 -1
  109. data/lib/mailslurp_client/models/validation_message.rb +1 -1
  110. data/lib/mailslurp_client/models/verify_email_address_options.rb +1 -1
  111. data/lib/mailslurp_client/models/wait_for_conditions.rb +1 -1
  112. data/lib/mailslurp_client/models/webhook_dto.rb +23 -2
  113. data/lib/mailslurp_client/models/webhook_projection.rb +1 -1
  114. data/lib/mailslurp_client/models/webhook_test_request.rb +1 -1
  115. data/lib/mailslurp_client/models/webhook_test_response.rb +1 -1
  116. data/lib/mailslurp_client/models/webhook_test_result.rb +1 -1
  117. data/lib/mailslurp_client/version.rb +2 -2
  118. metadata +3 -3
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #MailSlurp API
3
3
 
4
- #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
5
 
6
6
  The version of the OpenAPI document: 6.5.2
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #MailSlurp API
3
3
 
4
- #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
5
 
6
6
  The version of the OpenAPI document: 6.5.2
7
7
 
@@ -222,26 +222,33 @@ module MailSlurpClient
222
222
  return data, status_code, headers
223
223
  end
224
224
 
225
- # Get test webhook payload example
225
+ # Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default.
226
226
  # @param [Hash] opts the optional parameters
227
- # @return [WebhookPayload]
227
+ # @option opts [String] :event_name eventName
228
+ # @return [AbstractWebhookPayload]
228
229
  def get_test_webhook_payload(opts = {})
229
230
  data, _status_code, _headers = get_test_webhook_payload_with_http_info(opts)
230
231
  data
231
232
  end
232
233
 
233
- # Get test webhook payload example
234
+ # Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default.
234
235
  # @param [Hash] opts the optional parameters
235
- # @return [Array<(WebhookPayload, Integer, Hash)>] WebhookPayload data, response status code and response headers
236
+ # @option opts [String] :event_name eventName
237
+ # @return [Array<(AbstractWebhookPayload, Integer, Hash)>] AbstractWebhookPayload data, response status code and response headers
236
238
  def get_test_webhook_payload_with_http_info(opts = {})
237
239
  if @api_client.config.debugging
238
240
  @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload ...'
239
241
  end
242
+ allowable_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT"]
243
+ if @api_client.config.client_side_validation && opts[:'event_name'] && !allowable_values.include?(opts[:'event_name'])
244
+ fail ArgumentError, "invalid value for \"event_name\", must be one of #{allowable_values}"
245
+ end
240
246
  # resource path
241
247
  local_var_path = '/webhooks/test'
242
248
 
243
249
  # query parameters
244
250
  query_params = opts[:query_params] || {}
251
+ query_params[:'eventName'] = opts[:'event_name'] if !opts[:'event_name'].nil?
245
252
 
246
253
  # header parameters
247
254
  header_params = opts[:header_params] || {}
@@ -255,7 +262,7 @@ module MailSlurpClient
255
262
  post_body = opts[:body]
256
263
 
257
264
  # return_type
258
- return_type = opts[:return_type] || 'WebhookPayload'
265
+ return_type = opts[:return_type] || 'AbstractWebhookPayload'
259
266
 
260
267
  # auth_names
261
268
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #MailSlurp API
3
3
 
4
- #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
5
 
6
6
  The version of the OpenAPI document: 6.5.2
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #MailSlurp API
3
3
 
4
- #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
5
 
6
6
  The version of the OpenAPI document: 6.5.2
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #MailSlurp API
3
3
 
4
- #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
5
 
6
6
  The version of the OpenAPI document: 6.5.2
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #MailSlurp API
3
3
 
4
- #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
5
 
6
6
  The version of the OpenAPI document: 6.5.2
7
7
 
@@ -13,45 +13,13 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
- # MailSlurp webhook payload schema is available at https://api.mailslurp.com/schemas/webhook-payload. This schema describes the JSON object that is sent via HTTP POST to webhook urls when an email is received by an inbox that a webhook is attached to. Payloads may be delivered multiple times so use the ID as a key for event uniqueness. The payload contains IDs for the email and inbox affected. Use these to fetch more data related to the event using appropriate inbox and email endpoints. See https://www.mailslurp.com/guides/email-webhooks/ for more information. Your webhook endpoint should accept POST HTTP request and return a 200 in under 30 seconds. Process the webhook asynchronously if you need to.
17
- class WebhookPayload
18
- # List of attachment meta data objects if attachments present
19
- attr_accessor :attachment_meta_datas
20
-
21
- # List of `BCC` recipients email was addressed to
22
- attr_accessor :bcc
23
-
24
- # List of `CC` recipients email was addressed to
25
- attr_accessor :cc
26
-
27
- # Date time of event creation
28
- attr_accessor :created_at
29
-
30
- # ID of the email that was received. Use this ID for fetching the email
31
- attr_accessor :email_id
32
-
33
- # Name of the event type webhook is being triggered for
16
+ class AbstractWebhookPayload
34
17
  attr_accessor :event_name
35
18
 
36
- # Who the email was sent from
37
- attr_accessor :from
38
-
39
- # Id of the inbox that receive an email
40
- attr_accessor :inbox_id
41
-
42
- # Idempotent message ID. Store this ID locally or in a database to prevent message duplication.
43
19
  attr_accessor :message_id
44
20
 
45
- # The subject line of the email message
46
- attr_accessor :subject
47
-
48
- # List of `To` recipients that email was addressed to
49
- attr_accessor :to
50
-
51
- # ID of webhook entity being triggered
52
21
  attr_accessor :webhook_id
53
22
 
54
- # Name of the webhook being triggered
55
23
  attr_accessor :webhook_name
56
24
 
57
25
  class EnumAttributeValidator
@@ -79,17 +47,8 @@ module MailSlurpClient
79
47
  # Attribute mapping from ruby-style variable name to JSON key.
80
48
  def self.attribute_map
81
49
  {
82
- :'attachment_meta_datas' => :'attachmentMetaDatas',
83
- :'bcc' => :'bcc',
84
- :'cc' => :'cc',
85
- :'created_at' => :'createdAt',
86
- :'email_id' => :'emailId',
87
50
  :'event_name' => :'eventName',
88
- :'from' => :'from',
89
- :'inbox_id' => :'inboxId',
90
51
  :'message_id' => :'messageId',
91
- :'subject' => :'subject',
92
- :'to' => :'to',
93
52
  :'webhook_id' => :'webhookId',
94
53
  :'webhook_name' => :'webhookName'
95
54
  }
@@ -98,17 +57,8 @@ module MailSlurpClient
98
57
  # Attribute type mapping.
99
58
  def self.openapi_types
100
59
  {
101
- :'attachment_meta_datas' => :'Array<AttachmentMetaData>',
102
- :'bcc' => :'Array<String>',
103
- :'cc' => :'Array<String>',
104
- :'created_at' => :'DateTime',
105
- :'email_id' => :'String',
106
60
  :'event_name' => :'String',
107
- :'from' => :'String',
108
- :'inbox_id' => :'String',
109
61
  :'message_id' => :'String',
110
- :'subject' => :'String',
111
- :'to' => :'Array<String>',
112
62
  :'webhook_id' => :'String',
113
63
  :'webhook_name' => :'String'
114
64
  }
@@ -124,69 +74,25 @@ module MailSlurpClient
124
74
  # @param [Hash] attributes Model attributes in the form of hash
125
75
  def initialize(attributes = {})
126
76
  if (!attributes.is_a?(Hash))
127
- fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::WebhookPayload` initialize method"
77
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::AbstractWebhookPayload` initialize method"
128
78
  end
129
79
 
130
80
  # check to see if the attribute exists and convert string to symbol for hash key
131
81
  attributes = attributes.each_with_object({}) { |(k, v), h|
132
82
  if (!self.class.attribute_map.key?(k.to_sym))
133
- fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::WebhookPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
83
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::AbstractWebhookPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
134
84
  end
135
85
  h[k.to_sym] = v
136
86
  }
137
87
 
138
- if attributes.key?(:'attachment_meta_datas')
139
- if (value = attributes[:'attachment_meta_datas']).is_a?(Array)
140
- self.attachment_meta_datas = value
141
- end
142
- end
143
-
144
- if attributes.key?(:'bcc')
145
- if (value = attributes[:'bcc']).is_a?(Array)
146
- self.bcc = value
147
- end
148
- end
149
-
150
- if attributes.key?(:'cc')
151
- if (value = attributes[:'cc']).is_a?(Array)
152
- self.cc = value
153
- end
154
- end
155
-
156
- if attributes.key?(:'created_at')
157
- self.created_at = attributes[:'created_at']
158
- end
159
-
160
- if attributes.key?(:'email_id')
161
- self.email_id = attributes[:'email_id']
162
- end
163
-
164
88
  if attributes.key?(:'event_name')
165
89
  self.event_name = attributes[:'event_name']
166
90
  end
167
91
 
168
- if attributes.key?(:'from')
169
- self.from = attributes[:'from']
170
- end
171
-
172
- if attributes.key?(:'inbox_id')
173
- self.inbox_id = attributes[:'inbox_id']
174
- end
175
-
176
92
  if attributes.key?(:'message_id')
177
93
  self.message_id = attributes[:'message_id']
178
94
  end
179
95
 
180
- if attributes.key?(:'subject')
181
- self.subject = attributes[:'subject']
182
- end
183
-
184
- if attributes.key?(:'to')
185
- if (value = attributes[:'to']).is_a?(Array)
186
- self.to = value
187
- end
188
- end
189
-
190
96
  if attributes.key?(:'webhook_id')
191
97
  self.webhook_id = attributes[:'webhook_id']
192
98
  end
@@ -200,21 +106,36 @@ module MailSlurpClient
200
106
  # @return Array for valid properties with the reasons
201
107
  def list_invalid_properties
202
108
  invalid_properties = Array.new
109
+ if @event_name.nil?
110
+ invalid_properties.push('invalid value for "event_name", event_name cannot be nil.')
111
+ end
112
+
113
+ if @message_id.nil?
114
+ invalid_properties.push('invalid value for "message_id", message_id cannot be nil.')
115
+ end
116
+
117
+ if @webhook_id.nil?
118
+ invalid_properties.push('invalid value for "webhook_id", webhook_id cannot be nil.')
119
+ end
120
+
203
121
  invalid_properties
204
122
  end
205
123
 
206
124
  # Check to see if the all the properties in the model are valid
207
125
  # @return true if the model is valid
208
126
  def valid?
209
- event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED"])
127
+ return false if @event_name.nil?
128
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT"])
210
129
  return false unless event_name_validator.valid?(@event_name)
130
+ return false if @message_id.nil?
131
+ return false if @webhook_id.nil?
211
132
  true
212
133
  end
213
134
 
214
135
  # Custom attribute writer method checking allowed values (enum).
215
136
  # @param [Object] event_name Object to be assigned
216
137
  def event_name=(event_name)
217
- validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED"])
138
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT"])
218
139
  unless validator.valid?(event_name)
219
140
  fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
220
141
  end
@@ -226,17 +147,8 @@ module MailSlurpClient
226
147
  def ==(o)
227
148
  return true if self.equal?(o)
228
149
  self.class == o.class &&
229
- attachment_meta_datas == o.attachment_meta_datas &&
230
- bcc == o.bcc &&
231
- cc == o.cc &&
232
- created_at == o.created_at &&
233
- email_id == o.email_id &&
234
150
  event_name == o.event_name &&
235
- from == o.from &&
236
- inbox_id == o.inbox_id &&
237
151
  message_id == o.message_id &&
238
- subject == o.subject &&
239
- to == o.to &&
240
152
  webhook_id == o.webhook_id &&
241
153
  webhook_name == o.webhook_name
242
154
  end
@@ -250,7 +162,7 @@ module MailSlurpClient
250
162
  # Calculates hash code according to all attributes.
251
163
  # @return [Integer] Hash code
252
164
  def hash
253
- [attachment_meta_datas, bcc, cc, created_at, email_id, event_name, from, inbox_id, message_id, subject, to, webhook_id, webhook_name].hash
165
+ [event_name, message_id, webhook_id, webhook_name].hash
254
166
  end
255
167
 
256
168
  # Builds the object from hash
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #MailSlurp API
3
3
 
4
- #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
5
 
6
6
  The version of the OpenAPI document: 6.5.2
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #MailSlurp API
3
3
 
4
- #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
5
 
6
6
  The version of the OpenAPI document: 6.5.2
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #MailSlurp API
3
3
 
4
- #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
5
 
6
6
  The version of the OpenAPI document: 6.5.2
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #MailSlurp API
3
3
 
4
- #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
5
 
6
6
  The version of the OpenAPI document: 6.5.2
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #MailSlurp API
3
3
 
4
- #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
5
 
6
6
  The version of the OpenAPI document: 6.5.2
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #MailSlurp API
3
3
 
4
- #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
5
 
6
6
  The version of the OpenAPI document: 6.5.2
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #MailSlurp API
3
3
 
4
- #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
5
 
6
6
  The version of the OpenAPI document: 6.5.2
7
7
 
@@ -32,6 +32,8 @@ module MailSlurpClient
32
32
 
33
33
  attr_accessor :opt_out
34
34
 
35
+ attr_accessor :primary_email_address
36
+
35
37
  attr_accessor :tags
36
38
 
37
39
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -46,6 +48,7 @@ module MailSlurpClient
46
48
  :'last_name' => :'lastName',
47
49
  :'meta_data' => :'metaData',
48
50
  :'opt_out' => :'optOut',
51
+ :'primary_email_address' => :'primaryEmailAddress',
49
52
  :'tags' => :'tags'
50
53
  }
51
54
  end
@@ -62,6 +65,7 @@ module MailSlurpClient
62
65
  :'last_name' => :'String',
63
66
  :'meta_data' => :'Object',
64
67
  :'opt_out' => :'Boolean',
68
+ :'primary_email_address' => :'String',
65
69
  :'tags' => :'Array<String>'
66
70
  }
67
71
  end
@@ -125,6 +129,10 @@ module MailSlurpClient
125
129
  self.opt_out = attributes[:'opt_out']
126
130
  end
127
131
 
132
+ if attributes.key?(:'primary_email_address')
133
+ self.primary_email_address = attributes[:'primary_email_address']
134
+ end
135
+
128
136
  if attributes.key?(:'tags')
129
137
  if (value = attributes[:'tags']).is_a?(Array)
130
138
  self.tags = value
@@ -179,6 +187,7 @@ module MailSlurpClient
179
187
  last_name == o.last_name &&
180
188
  meta_data == o.meta_data &&
181
189
  opt_out == o.opt_out &&
190
+ primary_email_address == o.primary_email_address &&
182
191
  tags == o.tags
183
192
  end
184
193
 
@@ -191,7 +200,7 @@ module MailSlurpClient
191
200
  # Calculates hash code according to all attributes.
192
201
  # @return [Integer] Hash code
193
202
  def hash
194
- [company, created_at, email_addresses, first_name, group_id, id, last_name, meta_data, opt_out, tags].hash
203
+ [company, created_at, email_addresses, first_name, group_id, id, last_name, meta_data, opt_out, primary_email_address, tags].hash
195
204
  end
196
205
 
197
206
  # Builds the object from hash
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #MailSlurp API
3
3
 
4
- #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
5
 
6
6
  The version of the OpenAPI document: 6.5.2
7
7