mailslurp_client 15.0.2 → 15.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/lib/mailslurp_client/api/alias_controller_api.rb +60 -56
  4. data/lib/mailslurp_client/api/attachment_controller_api.rb +50 -61
  5. data/lib/mailslurp_client/api/bounce_controller_api.rb +27 -19
  6. data/lib/mailslurp_client/api/bulk_actions_controller_api.rb +16 -16
  7. data/lib/mailslurp_client/api/common_actions_controller_api.rb +129 -68
  8. data/lib/mailslurp_client/api/contact_controller_api.rb +23 -23
  9. data/lib/mailslurp_client/api/domain_controller_api.rb +33 -33
  10. data/lib/mailslurp_client/api/email_controller_api.rb +191 -117
  11. data/lib/mailslurp_client/api/expired_controller_api.rb +20 -20
  12. data/lib/mailslurp_client/api/export_controller_api.rb +39 -39
  13. data/lib/mailslurp_client/api/form_controller_api.rb +17 -19
  14. data/lib/mailslurp_client/api/group_controller_api.rb +53 -53
  15. data/lib/mailslurp_client/api/inbox_controller_api.rb +360 -226
  16. data/lib/mailslurp_client/api/inbox_forwarder_controller_api.rb +34 -30
  17. data/lib/mailslurp_client/api/inbox_ruleset_controller_api.rb +34 -30
  18. data/lib/mailslurp_client/api/mail_server_controller_api.rb +27 -27
  19. data/lib/mailslurp_client/api/missed_email_controller_api.rb +55 -43
  20. data/lib/mailslurp_client/api/sent_emails_controller_api.rb +158 -48
  21. data/lib/mailslurp_client/api/template_controller_api.rb +22 -22
  22. data/lib/mailslurp_client/api/tracking_controller_api.rb +17 -17
  23. data/lib/mailslurp_client/api/wait_for_controller_api.rb +129 -89
  24. data/lib/mailslurp_client/api/webhook_controller_api.rb +103 -87
  25. data/lib/mailslurp_client/api_client.rb +1 -1
  26. data/lib/mailslurp_client/api_error.rb +1 -1
  27. data/lib/mailslurp_client/configuration.rb +3 -3
  28. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +11 -26
  29. data/lib/mailslurp_client/models/alias_dto.rb +46 -57
  30. data/lib/mailslurp_client/models/alias_projection.rb +38 -68
  31. data/lib/mailslurp_client/models/attachment_entity.rb +35 -55
  32. data/lib/mailslurp_client/models/attachment_meta_data.rb +22 -22
  33. data/lib/mailslurp_client/models/attachment_projection.rb +30 -45
  34. data/lib/mailslurp_client/models/basic_auth_options.rb +1 -11
  35. data/lib/mailslurp_client/models/bounce_projection.rb +14 -24
  36. data/lib/mailslurp_client/models/bounce_recipient.rb +23 -43
  37. data/lib/mailslurp_client/models/bounced_email_dto.rb +57 -77
  38. data/lib/mailslurp_client/models/bounced_recipient_dto.rb +17 -32
  39. data/lib/mailslurp_client/models/bulk_send_email_options.rb +6 -1
  40. data/lib/mailslurp_client/models/condition_option.rb +3 -3
  41. data/lib/mailslurp_client/models/contact_dto.rb +54 -74
  42. data/lib/mailslurp_client/models/contact_projection.rb +43 -53
  43. data/lib/mailslurp_client/models/content_match_options.rb +1 -1
  44. data/lib/mailslurp_client/models/count_dto.rb +206 -0
  45. data/lib/mailslurp_client/models/create_alias_options.rb +1 -1
  46. data/lib/mailslurp_client/models/create_contact_options.rb +43 -43
  47. data/lib/mailslurp_client/models/create_domain_options.rb +22 -17
  48. data/lib/mailslurp_client/models/create_group_options.rb +1 -6
  49. data/lib/mailslurp_client/models/create_inbox_dto.rb +59 -59
  50. data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +20 -15
  51. data/lib/mailslurp_client/models/create_inbox_ruleset_options.rb +24 -24
  52. data/lib/mailslurp_client/models/create_template_options.rb +1 -11
  53. data/lib/mailslurp_client/models/create_tracking_pixel_options.rb +1 -1
  54. data/lib/mailslurp_client/models/create_webhook_options.rb +19 -19
  55. data/lib/mailslurp_client/models/describe_domain_options.rb +1 -1
  56. data/lib/mailslurp_client/models/describe_mail_server_domain_result.rb +16 -26
  57. data/lib/mailslurp_client/models/dns_lookup_options.rb +25 -15
  58. data/lib/mailslurp_client/models/dns_lookup_result.rb +24 -43
  59. data/lib/mailslurp_client/models/dns_lookup_results.rb +1 -6
  60. data/lib/mailslurp_client/models/domain_dto.rb +60 -81
  61. data/lib/mailslurp_client/models/domain_name_record.rb +12 -31
  62. data/lib/mailslurp_client/models/domain_preview.rb +27 -51
  63. data/lib/mailslurp_client/models/download_attachment_dto.rb +1 -1
  64. data/lib/mailslurp_client/models/email.rb +135 -136
  65. data/lib/mailslurp_client/models/email_analysis.rb +29 -29
  66. data/lib/mailslurp_client/models/email_content_match_result.rb +14 -24
  67. data/lib/mailslurp_client/models/email_links_result.rb +14 -24
  68. data/lib/mailslurp_client/models/email_preview.rb +48 -48
  69. data/lib/mailslurp_client/models/email_projection.rb +67 -87
  70. data/lib/mailslurp_client/models/email_recipients.rb +17 -16
  71. data/lib/mailslurp_client/models/email_text_lines_result.rb +14 -24
  72. data/lib/mailslurp_client/models/email_verification_result.rb +17 -37
  73. data/lib/mailslurp_client/models/expiration_defaults.rb +17 -27
  74. data/lib/mailslurp_client/models/expired_inbox_dto.rb +14 -29
  75. data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +23 -43
  76. data/lib/mailslurp_client/models/export_link.rb +1 -6
  77. data/lib/mailslurp_client/models/export_options.rb +2 -7
  78. data/lib/mailslurp_client/models/flush_expired_inboxes_result.rb +14 -24
  79. data/lib/mailslurp_client/models/forward_email_options.rb +37 -32
  80. data/lib/mailslurp_client/models/gravatar_url.rb +14 -24
  81. data/lib/mailslurp_client/models/group_contacts_dto.rb +14 -24
  82. data/lib/mailslurp_client/models/group_dto.rb +23 -38
  83. data/lib/mailslurp_client/models/group_projection.rb +23 -38
  84. data/lib/mailslurp_client/models/html_validation_result.rb +14 -15
  85. data/lib/mailslurp_client/models/{inbox.rb → inbox_dto.rb} +48 -58
  86. data/lib/mailslurp_client/models/inbox_exists_dto.rb +1 -6
  87. data/lib/mailslurp_client/models/inbox_forwarder_dto.rb +32 -62
  88. data/lib/mailslurp_client/models/inbox_forwarder_test_options.rb +1 -6
  89. data/lib/mailslurp_client/models/inbox_forwarder_test_result.rb +14 -24
  90. data/lib/mailslurp_client/models/inbox_preview.rb +39 -39
  91. data/lib/mailslurp_client/models/inbox_ruleset_dto.rb +44 -79
  92. data/lib/mailslurp_client/models/inbox_ruleset_test_options.rb +1 -6
  93. data/lib/mailslurp_client/models/inbox_ruleset_test_result.rb +14 -19
  94. data/lib/mailslurp_client/models/inline_object.rb +221 -0
  95. data/lib/mailslurp_client/models/ip_address_result.rb +1 -11
  96. data/lib/mailslurp_client/models/json_schema_dto.rb +1 -6
  97. data/lib/mailslurp_client/models/match_option.rb +8 -3
  98. data/lib/mailslurp_client/models/match_options.rb +17 -17
  99. data/lib/mailslurp_client/models/missed_email.rb +68 -103
  100. data/lib/mailslurp_client/models/missed_email_projection.rb +20 -30
  101. data/lib/mailslurp_client/models/name_server_record.rb +11 -31
  102. data/lib/mailslurp_client/models/organization_inbox_projection.rb +45 -45
  103. data/lib/mailslurp_client/models/page_alias.rb +50 -50
  104. data/lib/mailslurp_client/models/page_attachment_entity.rb +50 -50
  105. data/lib/mailslurp_client/models/page_bounced_email.rb +50 -50
  106. data/lib/mailslurp_client/models/page_bounced_recipients.rb +50 -50
  107. data/lib/mailslurp_client/models/page_contact_projection.rb +50 -50
  108. data/lib/mailslurp_client/models/page_email_preview.rb +50 -50
  109. data/lib/mailslurp_client/models/page_email_projection.rb +50 -50
  110. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +50 -50
  111. data/lib/mailslurp_client/models/page_group_projection.rb +50 -50
  112. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +50 -50
  113. data/lib/mailslurp_client/models/page_inbox_projection.rb +50 -50
  114. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +50 -50
  115. data/lib/mailslurp_client/models/page_missed_email_projection.rb +50 -50
  116. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +50 -50
  117. data/lib/mailslurp_client/models/page_sent_email_projection.rb +50 -50
  118. data/lib/mailslurp_client/models/page_template_projection.rb +50 -50
  119. data/lib/mailslurp_client/models/page_thread_projection.rb +50 -50
  120. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +50 -50
  121. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +50 -50
  122. data/lib/mailslurp_client/models/page_webhook_projection.rb +50 -50
  123. data/lib/mailslurp_client/models/page_webhook_result.rb +50 -50
  124. data/lib/mailslurp_client/models/pageable.rb +29 -29
  125. data/lib/mailslurp_client/models/raw_email_json.rb +1 -6
  126. data/lib/mailslurp_client/models/recipient.rb +14 -24
  127. data/lib/mailslurp_client/models/reply_to_alias_email_options.rb +39 -38
  128. data/lib/mailslurp_client/models/reply_to_email_options.rb +52 -51
  129. data/lib/mailslurp_client/models/send_email_options.rb +108 -116
  130. data/lib/mailslurp_client/models/sender.rb +15 -24
  131. data/lib/mailslurp_client/models/sent_email_dto.rb +98 -103
  132. data/lib/mailslurp_client/models/sent_email_projection.rb +64 -103
  133. data/lib/mailslurp_client/models/set_inbox_favourited_options.rb +1 -1
  134. data/lib/mailslurp_client/models/simple_send_email_options.rb +25 -25
  135. data/lib/mailslurp_client/models/sort.rb +14 -14
  136. data/lib/mailslurp_client/models/template_dto.rb +23 -48
  137. data/lib/mailslurp_client/models/template_projection.rb +26 -51
  138. data/lib/mailslurp_client/models/template_variable.rb +1 -11
  139. data/lib/mailslurp_client/models/test_new_inbox_forwarder_options.rb +1 -11
  140. data/lib/mailslurp_client/models/test_new_inbox_ruleset_options.rb +1 -11
  141. data/lib/mailslurp_client/models/thread_projection.rb +58 -93
  142. data/lib/mailslurp_client/models/tracking_pixel_dto.rb +44 -69
  143. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +35 -55
  144. data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +20 -30
  145. data/lib/mailslurp_client/models/unread_count.rb +1 -6
  146. data/lib/mailslurp_client/models/unseen_error_count_dto.rb +1 -6
  147. data/lib/mailslurp_client/models/update_alias_options.rb +1 -1
  148. data/lib/mailslurp_client/models/update_domain_options.rb +1 -1
  149. data/lib/mailslurp_client/models/update_group_contacts.rb +1 -6
  150. data/lib/mailslurp_client/models/update_inbox_options.rb +27 -27
  151. data/lib/mailslurp_client/models/upload_attachment_options.rb +15 -15
  152. data/lib/mailslurp_client/models/validation_dto.rb +1 -1
  153. data/lib/mailslurp_client/models/validation_message.rb +2 -6
  154. data/lib/mailslurp_client/models/verify_email_address_options.rb +1 -6
  155. data/lib/mailslurp_client/models/wait_for_conditions.rb +49 -59
  156. data/lib/mailslurp_client/models/webhook_dto.rb +65 -70
  157. data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +43 -43
  158. data/lib/mailslurp_client/models/webhook_email_read_payload.rb +50 -50
  159. data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +44 -44
  160. data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +76 -96
  161. data/lib/mailslurp_client/models/webhook_new_email_payload.rb +85 -85
  162. data/lib/mailslurp_client/models/webhook_projection.rb +35 -60
  163. data/lib/mailslurp_client/models/webhook_redrive_result.rb +14 -24
  164. data/lib/mailslurp_client/models/webhook_result_dto.rb +77 -127
  165. data/lib/mailslurp_client/models/webhook_test_request.rb +22 -37
  166. data/lib/mailslurp_client/models/webhook_test_response.rb +14 -14
  167. data/lib/mailslurp_client/models/webhook_test_result.rb +14 -24
  168. data/lib/mailslurp_client/version.rb +2 -2
  169. data/lib/mailslurp_client.rb +4 -2
  170. metadata +5 -3
@@ -0,0 +1,221 @@
1
+ =begin
2
+ #MailSlurp API
3
+
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
+
6
+ The version of the OpenAPI document: 6.5.2
7
+ Contact: contact@mailslurp.dev
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module MailSlurpClient
16
+ class InlineObject
17
+ # Optional content type header of attachment
18
+ attr_accessor :content_type_header
19
+
20
+ attr_accessor :file
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'content_type_header' => :'contentTypeHeader',
26
+ :'file' => :'file'
27
+ }
28
+ end
29
+
30
+ # Attribute type mapping.
31
+ def self.openapi_types
32
+ {
33
+ :'content_type_header' => :'String',
34
+ :'file' => :'File'
35
+ }
36
+ end
37
+
38
+ # List of attributes with nullable: true
39
+ def self.openapi_nullable
40
+ Set.new([
41
+ ])
42
+ end
43
+
44
+ # Initializes the object
45
+ # @param [Hash] attributes Model attributes in the form of hash
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::InlineObject` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::InlineObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'content_type_header')
60
+ self.content_type_header = attributes[:'content_type_header']
61
+ end
62
+
63
+ if attributes.key?(:'file')
64
+ self.file = attributes[:'file']
65
+ end
66
+ end
67
+
68
+ # Show invalid properties with the reasons. Usually used together with valid?
69
+ # @return Array for valid properties with the reasons
70
+ def list_invalid_properties
71
+ invalid_properties = Array.new
72
+ if @file.nil?
73
+ invalid_properties.push('invalid value for "file", file cannot be nil.')
74
+ end
75
+
76
+ invalid_properties
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ def valid?
82
+ return false if @file.nil?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ content_type_header == o.content_type_header &&
92
+ file == o.file
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [content_type_header, file].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ new.build_from_hash(attributes)
112
+ end
113
+
114
+ # Builds the object from hash
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ # @return [Object] Returns the model itself
117
+ def build_from_hash(attributes)
118
+ return nil unless attributes.is_a?(Hash)
119
+ self.class.openapi_types.each_pair do |key, type|
120
+ if type =~ /\AArray<(.*)>/i
121
+ # check to ensure the input is an array given that the attribute
122
+ # is documented as an array but the input is not
123
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
124
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
125
+ end
126
+ elsif !attributes[self.class.attribute_map[key]].nil?
127
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
128
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
129
+ end
130
+
131
+ self
132
+ end
133
+
134
+ # Deserializes the data based on type
135
+ # @param string type Data type
136
+ # @param string value Value to be deserialized
137
+ # @return [Object] Deserialized data
138
+ def _deserialize(type, value)
139
+ case type.to_sym
140
+ when :DateTime
141
+ DateTime.parse(value)
142
+ when :Date
143
+ Date.parse(value)
144
+ when :String
145
+ value.to_s
146
+ when :Integer
147
+ value.to_i
148
+ when :Float
149
+ value.to_f
150
+ when :Boolean
151
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
152
+ true
153
+ else
154
+ false
155
+ end
156
+ when :Object
157
+ # generic object (usually a Hash), return directly
158
+ value
159
+ when /\AArray<(?<inner_type>.+)>\z/
160
+ inner_type = Regexp.last_match[:inner_type]
161
+ value.map { |v| _deserialize(inner_type, v) }
162
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
163
+ k_type = Regexp.last_match[:k_type]
164
+ v_type = Regexp.last_match[:v_type]
165
+ {}.tap do |hash|
166
+ value.each do |k, v|
167
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
168
+ end
169
+ end
170
+ else # model
171
+ MailSlurpClient.const_get(type).build_from_hash(value)
172
+ end
173
+ end
174
+
175
+ # Returns the string representation of the object
176
+ # @return [String] String presentation of the object
177
+ def to_s
178
+ to_hash.to_s
179
+ end
180
+
181
+ # to_body is an alias to to_hash (backward compatibility)
182
+ # @return [Hash] Returns the object in the form of hash
183
+ def to_body
184
+ to_hash
185
+ end
186
+
187
+ # Returns the object in the form of hash
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_hash
190
+ hash = {}
191
+ self.class.attribute_map.each_pair do |attr, param|
192
+ value = self.send(attr)
193
+ if value.nil?
194
+ is_nullable = self.class.openapi_nullable.include?(attr)
195
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
196
+ end
197
+
198
+ hash[param] = _to_hash(value)
199
+ end
200
+ hash
201
+ end
202
+
203
+ # Outputs non-array value in the form of hash
204
+ # For object, use to_hash. Otherwise, just return the value
205
+ # @param [Object] value Any valid value
206
+ # @return [Hash] Returns the value in the form of hash
207
+ def _to_hash(value)
208
+ if value.is_a?(Array)
209
+ value.compact.map { |v| _to_hash(v) }
210
+ elsif value.is_a?(Hash)
211
+ {}.tap do |hash|
212
+ value.each { |k, v| hash[k] = _to_hash(v) }
213
+ end
214
+ elsif value.respond_to? :to_hash
215
+ value.to_hash
216
+ else
217
+ value
218
+ end
219
+ end
220
+ end
221
+ end
@@ -4,7 +4,7 @@
4
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
+ Contact: contact@mailslurp.dev
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.3.1
10
10
 
@@ -69,22 +69,12 @@ module MailSlurpClient
69
69
  # @return Array for valid properties with the reasons
70
70
  def list_invalid_properties
71
71
  invalid_properties = Array.new
72
- if @address.nil?
73
- invalid_properties.push('invalid value for "address", address cannot be nil.')
74
- end
75
-
76
- if @hostname.nil?
77
- invalid_properties.push('invalid value for "hostname", hostname cannot be nil.')
78
- end
79
-
80
72
  invalid_properties
81
73
  end
82
74
 
83
75
  # Check to see if the all the properties in the model are valid
84
76
  # @return true if the model is valid
85
77
  def valid?
86
- return false if @address.nil?
87
- return false if @hostname.nil?
88
78
  true
89
79
  end
90
80
 
@@ -4,7 +4,7 @@
4
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
+ Contact: contact@mailslurp.dev
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.3.1
10
10
 
@@ -60,17 +60,12 @@ module MailSlurpClient
60
60
  # @return Array for valid properties with the reasons
61
61
  def list_invalid_properties
62
62
  invalid_properties = Array.new
63
- if @value.nil?
64
- invalid_properties.push('invalid value for "value", value cannot be nil.')
65
- end
66
-
67
63
  invalid_properties
68
64
  end
69
65
 
70
66
  # Check to see if the all the properties in the model are valid
71
67
  # @return true if the model is valid
72
68
  def valid?
73
- return false if @value.nil?
74
69
  true
75
70
  end
76
71
 
@@ -4,7 +4,7 @@
4
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
+ Contact: contact@mailslurp.dev
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.3.1
10
10
 
@@ -15,10 +15,10 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # Options for matching emails in an inbox. Each match option object contains a `field`, `should` and `value` property. Together they form logical conditions such as `SUBJECT` should `CONTAIN` value.
17
17
  class MatchOption
18
- # The email property to match on. One of SUBJECT, TO, BCC, CC or FROM
18
+ # Fields of an email object that can be used to filter results
19
19
  attr_accessor :field
20
20
 
21
- # What criteria to apply. CONTAIN or EQUAL. Note CONTAIN is recommended due to some SMTP servers adding new lines to fields and body content.
21
+ # How the value of the email field specified should be compared to the value given in the match options.
22
22
  attr_accessor :should
23
23
 
24
24
  # The value you wish to compare with the value of the field specified using the `should` value passed. For example `BODY` should `CONTAIN` a value passed.
@@ -102,6 +102,10 @@ module MailSlurpClient
102
102
  # @return Array for valid properties with the reasons
103
103
  def list_invalid_properties
104
104
  invalid_properties = Array.new
105
+ if @value.nil?
106
+ invalid_properties.push('invalid value for "value", value cannot be nil.')
107
+ end
108
+
105
109
  invalid_properties
106
110
  end
107
111
 
@@ -112,6 +116,7 @@ module MailSlurpClient
112
116
  return false unless field_validator.valid?(@field)
113
117
  should_validator = EnumAttributeValidator.new('String', ["CONTAIN", "EQUAL"])
114
118
  return false unless should_validator.valid?(@should)
119
+ return false if @value.nil?
115
120
  true
116
121
  end
117
122
 
@@ -4,7 +4,7 @@
4
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
+ Contact: contact@mailslurp.dev
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.3.1
10
10
 
@@ -15,25 +15,25 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # Optional filter for matching emails based on fields. For instance filter results to only include emails whose `SUBJECT` value does `CONTAIN` given match value. An example payload would be `{ matches: [{ field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }] }`. You can also pass conditions such as `HAS_ATTACHMENT`. If you wish to extract regex matches inside the email content see the `getEmailContentMatch` method in the EmailController.
17
17
  class MatchOptions
18
- # Zero or more conditions such as `{ condition: 'HAS_ATTACHMENTS', value: 'TRUE' }`. Note the values are the strings `TRUE|FALSE` not booleans.
19
- attr_accessor :conditions
20
-
21
18
  # Zero or more match options such as `{ field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }`. Options are additive so if one does not match the email is excluded from results
22
19
  attr_accessor :matches
23
20
 
21
+ # Zero or more conditions such as `{ condition: 'HAS_ATTACHMENTS', value: 'TRUE' }`. Note the values are the strings `TRUE|FALSE` not booleans.
22
+ attr_accessor :conditions
23
+
24
24
  # Attribute mapping from ruby-style variable name to JSON key.
25
25
  def self.attribute_map
26
26
  {
27
- :'conditions' => :'conditions',
28
- :'matches' => :'matches'
27
+ :'matches' => :'matches',
28
+ :'conditions' => :'conditions'
29
29
  }
30
30
  end
31
31
 
32
32
  # Attribute type mapping.
33
33
  def self.openapi_types
34
34
  {
35
- :'conditions' => :'Array<ConditionOption>',
36
- :'matches' => :'Array<MatchOption>'
35
+ :'matches' => :'Array<MatchOption>',
36
+ :'conditions' => :'Array<ConditionOption>'
37
37
  }
38
38
  end
39
39
 
@@ -58,17 +58,17 @@ module MailSlurpClient
58
58
  h[k.to_sym] = v
59
59
  }
60
60
 
61
- if attributes.key?(:'conditions')
62
- if (value = attributes[:'conditions']).is_a?(Array)
63
- self.conditions = value
64
- end
65
- end
66
-
67
61
  if attributes.key?(:'matches')
68
62
  if (value = attributes[:'matches']).is_a?(Array)
69
63
  self.matches = value
70
64
  end
71
65
  end
66
+
67
+ if attributes.key?(:'conditions')
68
+ if (value = attributes[:'conditions']).is_a?(Array)
69
+ self.conditions = value
70
+ end
71
+ end
72
72
  end
73
73
 
74
74
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -89,8 +89,8 @@ module MailSlurpClient
89
89
  def ==(o)
90
90
  return true if self.equal?(o)
91
91
  self.class == o.class &&
92
- conditions == o.conditions &&
93
- matches == o.matches
92
+ matches == o.matches &&
93
+ conditions == o.conditions
94
94
  end
95
95
 
96
96
  # @see the `==` method
@@ -102,7 +102,7 @@ module MailSlurpClient
102
102
  # Calculates hash code according to all attributes.
103
103
  # @return [Integer] Hash code
104
104
  def hash
105
- [conditions, matches].hash
105
+ [matches, conditions].hash
106
106
  end
107
107
 
108
108
  # Builds the object from hash
@@ -4,7 +4,7 @@
4
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
+ Contact: contact@mailslurp.dev
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.3.1
10
10
 
@@ -14,63 +14,63 @@ require 'date'
14
14
 
15
15
  module MailSlurpClient
16
16
  class MissedEmail
17
- attr_accessor :attachment_count
17
+ attr_accessor :id
18
18
 
19
- attr_accessor :bcc
19
+ attr_accessor :user_id
20
20
 
21
- attr_accessor :body_excerpt
21
+ attr_accessor :subject
22
22
 
23
- attr_accessor :cc
23
+ attr_accessor :body_excerpt
24
24
 
25
- attr_accessor :created_at
25
+ attr_accessor :attachment_count
26
26
 
27
27
  attr_accessor :from
28
28
 
29
- attr_accessor :id
29
+ attr_accessor :to
30
30
 
31
- attr_accessor :inbox_ids
31
+ attr_accessor :cc
32
32
 
33
- attr_accessor :subject
33
+ attr_accessor :bcc
34
34
 
35
- attr_accessor :to
35
+ attr_accessor :inbox_ids
36
36
 
37
- attr_accessor :updated_at
37
+ attr_accessor :created_at
38
38
 
39
- attr_accessor :user_id
39
+ attr_accessor :updated_at
40
40
 
41
41
  # Attribute mapping from ruby-style variable name to JSON key.
42
42
  def self.attribute_map
43
43
  {
44
- :'attachment_count' => :'attachmentCount',
45
- :'bcc' => :'bcc',
46
- :'body_excerpt' => :'bodyExcerpt',
47
- :'cc' => :'cc',
48
- :'created_at' => :'createdAt',
49
- :'from' => :'from',
50
44
  :'id' => :'id',
51
- :'inbox_ids' => :'inboxIds',
45
+ :'user_id' => :'userId',
52
46
  :'subject' => :'subject',
47
+ :'body_excerpt' => :'bodyExcerpt',
48
+ :'attachment_count' => :'attachmentCount',
49
+ :'from' => :'from',
53
50
  :'to' => :'to',
54
- :'updated_at' => :'updatedAt',
55
- :'user_id' => :'userId'
51
+ :'cc' => :'cc',
52
+ :'bcc' => :'bcc',
53
+ :'inbox_ids' => :'inboxIds',
54
+ :'created_at' => :'createdAt',
55
+ :'updated_at' => :'updatedAt'
56
56
  }
57
57
  end
58
58
 
59
59
  # Attribute type mapping.
60
60
  def self.openapi_types
61
61
  {
62
- :'attachment_count' => :'Integer',
63
- :'bcc' => :'Array<String>',
64
- :'body_excerpt' => :'String',
65
- :'cc' => :'Array<String>',
66
- :'created_at' => :'DateTime',
67
- :'from' => :'String',
68
62
  :'id' => :'String',
69
- :'inbox_ids' => :'Array<String>',
63
+ :'user_id' => :'String',
70
64
  :'subject' => :'String',
65
+ :'body_excerpt' => :'String',
66
+ :'attachment_count' => :'Integer',
67
+ :'from' => :'String',
71
68
  :'to' => :'Array<String>',
72
- :'updated_at' => :'DateTime',
73
- :'user_id' => :'String'
69
+ :'cc' => :'Array<String>',
70
+ :'bcc' => :'Array<String>',
71
+ :'inbox_ids' => :'Array<String>',
72
+ :'created_at' => :'DateTime',
73
+ :'updated_at' => :'DateTime'
74
74
  }
75
75
  end
76
76
 
@@ -95,60 +95,60 @@ module MailSlurpClient
95
95
  h[k.to_sym] = v
96
96
  }
97
97
 
98
- if attributes.key?(:'attachment_count')
99
- self.attachment_count = attributes[:'attachment_count']
98
+ if attributes.key?(:'id')
99
+ self.id = attributes[:'id']
100
100
  end
101
101
 
102
- if attributes.key?(:'bcc')
103
- if (value = attributes[:'bcc']).is_a?(Array)
104
- self.bcc = value
105
- end
102
+ if attributes.key?(:'user_id')
103
+ self.user_id = attributes[:'user_id']
106
104
  end
107
105
 
108
- if attributes.key?(:'body_excerpt')
109
- self.body_excerpt = attributes[:'body_excerpt']
106
+ if attributes.key?(:'subject')
107
+ self.subject = attributes[:'subject']
110
108
  end
111
109
 
112
- if attributes.key?(:'cc')
113
- if (value = attributes[:'cc']).is_a?(Array)
114
- self.cc = value
115
- end
110
+ if attributes.key?(:'body_excerpt')
111
+ self.body_excerpt = attributes[:'body_excerpt']
116
112
  end
117
113
 
118
- if attributes.key?(:'created_at')
119
- self.created_at = attributes[:'created_at']
114
+ if attributes.key?(:'attachment_count')
115
+ self.attachment_count = attributes[:'attachment_count']
120
116
  end
121
117
 
122
118
  if attributes.key?(:'from')
123
119
  self.from = attributes[:'from']
124
120
  end
125
121
 
126
- if attributes.key?(:'id')
127
- self.id = attributes[:'id']
122
+ if attributes.key?(:'to')
123
+ if (value = attributes[:'to']).is_a?(Array)
124
+ self.to = value
125
+ end
128
126
  end
129
127
 
130
- if attributes.key?(:'inbox_ids')
131
- if (value = attributes[:'inbox_ids']).is_a?(Array)
132
- self.inbox_ids = value
128
+ if attributes.key?(:'cc')
129
+ if (value = attributes[:'cc']).is_a?(Array)
130
+ self.cc = value
133
131
  end
134
132
  end
135
133
 
136
- if attributes.key?(:'subject')
137
- self.subject = attributes[:'subject']
134
+ if attributes.key?(:'bcc')
135
+ if (value = attributes[:'bcc']).is_a?(Array)
136
+ self.bcc = value
137
+ end
138
138
  end
139
139
 
140
- if attributes.key?(:'to')
141
- if (value = attributes[:'to']).is_a?(Array)
142
- self.to = value
140
+ if attributes.key?(:'inbox_ids')
141
+ if (value = attributes[:'inbox_ids']).is_a?(Array)
142
+ self.inbox_ids = value
143
143
  end
144
144
  end
145
145
 
146
- if attributes.key?(:'updated_at')
147
- self.updated_at = attributes[:'updated_at']
146
+ if attributes.key?(:'created_at')
147
+ self.created_at = attributes[:'created_at']
148
148
  end
149
149
 
150
- if attributes.key?(:'user_id')
151
- self.user_id = attributes[:'user_id']
150
+ if attributes.key?(:'updated_at')
151
+ self.updated_at = attributes[:'updated_at']
152
152
  end
153
153
  end
154
154
 
@@ -156,47 +156,12 @@ module MailSlurpClient
156
156
  # @return Array for valid properties with the reasons
157
157
  def list_invalid_properties
158
158
  invalid_properties = Array.new
159
- if @attachment_count.nil?
160
- invalid_properties.push('invalid value for "attachment_count", attachment_count cannot be nil.')
161
- end
162
-
163
- if @bcc.nil?
164
- invalid_properties.push('invalid value for "bcc", bcc cannot be nil.')
165
- end
166
-
167
- if @cc.nil?
168
- invalid_properties.push('invalid value for "cc", cc cannot be nil.')
169
- end
170
-
171
- if @created_at.nil?
172
- invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
173
- end
174
-
175
- if @inbox_ids.nil?
176
- invalid_properties.push('invalid value for "inbox_ids", inbox_ids cannot be nil.')
177
- end
178
-
179
- if @to.nil?
180
- invalid_properties.push('invalid value for "to", to cannot be nil.')
181
- end
182
-
183
- if @updated_at.nil?
184
- invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
185
- end
186
-
187
159
  invalid_properties
188
160
  end
189
161
 
190
162
  # Check to see if the all the properties in the model are valid
191
163
  # @return true if the model is valid
192
164
  def valid?
193
- return false if @attachment_count.nil?
194
- return false if @bcc.nil?
195
- return false if @cc.nil?
196
- return false if @created_at.nil?
197
- return false if @inbox_ids.nil?
198
- return false if @to.nil?
199
- return false if @updated_at.nil?
200
165
  true
201
166
  end
202
167
 
@@ -205,18 +170,18 @@ module MailSlurpClient
205
170
  def ==(o)
206
171
  return true if self.equal?(o)
207
172
  self.class == o.class &&
208
- attachment_count == o.attachment_count &&
209
- bcc == o.bcc &&
210
- body_excerpt == o.body_excerpt &&
211
- cc == o.cc &&
212
- created_at == o.created_at &&
213
- from == o.from &&
214
173
  id == o.id &&
215
- inbox_ids == o.inbox_ids &&
174
+ user_id == o.user_id &&
216
175
  subject == o.subject &&
176
+ body_excerpt == o.body_excerpt &&
177
+ attachment_count == o.attachment_count &&
178
+ from == o.from &&
217
179
  to == o.to &&
218
- updated_at == o.updated_at &&
219
- user_id == o.user_id
180
+ cc == o.cc &&
181
+ bcc == o.bcc &&
182
+ inbox_ids == o.inbox_ids &&
183
+ created_at == o.created_at &&
184
+ updated_at == o.updated_at
220
185
  end
221
186
 
222
187
  # @see the `==` method
@@ -228,7 +193,7 @@ module MailSlurpClient
228
193
  # Calculates hash code according to all attributes.
229
194
  # @return [Integer] Hash code
230
195
  def hash
231
- [attachment_count, bcc, body_excerpt, cc, created_at, from, id, inbox_ids, subject, to, updated_at, user_id].hash
196
+ [id, user_id, subject, body_excerpt, attachment_count, from, to, cc, bcc, inbox_ids, created_at, updated_at].hash
232
197
  end
233
198
 
234
199
  # Builds the object from hash