mailslurp_client 15.0.3 → 15.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/lib/mailslurp_client/api/alias_controller_api.rb +59 -55
- data/lib/mailslurp_client/api/attachment_controller_api.rb +49 -60
- data/lib/mailslurp_client/api/bounce_controller_api.rb +26 -18
- data/lib/mailslurp_client/api/bulk_actions_controller_api.rb +15 -15
- data/lib/mailslurp_client/api/common_actions_controller_api.rb +128 -67
- data/lib/mailslurp_client/api/contact_controller_api.rb +22 -22
- data/lib/mailslurp_client/api/domain_controller_api.rb +32 -32
- data/lib/mailslurp_client/api/email_controller_api.rb +137 -117
- data/lib/mailslurp_client/api/expired_controller_api.rb +19 -19
- data/lib/mailslurp_client/api/export_controller_api.rb +38 -38
- data/lib/mailslurp_client/api/form_controller_api.rb +16 -18
- data/lib/mailslurp_client/api/group_controller_api.rb +52 -52
- data/lib/mailslurp_client/api/inbox_controller_api.rb +256 -236
- data/lib/mailslurp_client/api/inbox_forwarder_controller_api.rb +33 -29
- data/lib/mailslurp_client/api/inbox_ruleset_controller_api.rb +33 -29
- data/lib/mailslurp_client/api/mail_server_controller_api.rb +26 -26
- data/lib/mailslurp_client/api/missed_email_controller_api.rb +54 -42
- data/lib/mailslurp_client/api/sent_emails_controller_api.rb +157 -47
- data/lib/mailslurp_client/api/template_controller_api.rb +21 -21
- data/lib/mailslurp_client/api/tracking_controller_api.rb +16 -16
- data/lib/mailslurp_client/api/wait_for_controller_api.rb +128 -88
- data/lib/mailslurp_client/api/webhook_controller_api.rb +102 -86
- data/lib/mailslurp_client/configuration.rb +4 -4
- data/lib/mailslurp_client/models/abstract_webhook_payload.rb +10 -25
- data/lib/mailslurp_client/models/alias_dto.rb +45 -56
- data/lib/mailslurp_client/models/alias_projection.rb +42 -72
- data/lib/mailslurp_client/models/attachment_entity.rb +34 -54
- data/lib/mailslurp_client/models/attachment_meta_data.rb +21 -21
- data/lib/mailslurp_client/models/attachment_projection.rb +36 -51
- data/lib/mailslurp_client/models/basic_auth_options.rb +0 -10
- data/lib/mailslurp_client/models/bounce_projection.rb +13 -23
- data/lib/mailslurp_client/models/bounce_recipient.rb +22 -42
- data/lib/mailslurp_client/models/bounced_email_dto.rb +56 -76
- data/lib/mailslurp_client/models/bounced_recipient_dto.rb +16 -31
- data/lib/mailslurp_client/models/bulk_send_email_options.rb +5 -0
- data/lib/mailslurp_client/models/condition_option.rb +2 -2
- data/lib/mailslurp_client/models/contact_dto.rb +53 -73
- data/lib/mailslurp_client/models/contact_projection.rb +42 -52
- data/lib/mailslurp_client/models/count_dto.rb +0 -5
- data/lib/mailslurp_client/models/create_contact_options.rb +42 -42
- data/lib/mailslurp_client/models/create_domain_options.rb +21 -16
- data/lib/mailslurp_client/models/create_group_options.rb +0 -5
- data/lib/mailslurp_client/models/create_inbox_dto.rb +58 -58
- data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +19 -14
- data/lib/mailslurp_client/models/create_inbox_ruleset_options.rb +23 -23
- data/lib/mailslurp_client/models/create_template_options.rb +0 -10
- data/lib/mailslurp_client/models/create_webhook_options.rb +18 -18
- data/lib/mailslurp_client/models/describe_mail_server_domain_result.rb +15 -25
- data/lib/mailslurp_client/models/dns_lookup_options.rb +24 -14
- data/lib/mailslurp_client/models/dns_lookup_result.rb +23 -42
- data/lib/mailslurp_client/models/dns_lookup_results.rb +0 -5
- data/lib/mailslurp_client/models/domain_dto.rb +59 -80
- data/lib/mailslurp_client/models/domain_name_record.rb +11 -30
- data/lib/mailslurp_client/models/domain_preview.rb +26 -50
- data/lib/mailslurp_client/models/email.rb +134 -135
- data/lib/mailslurp_client/models/email_analysis.rb +28 -28
- data/lib/mailslurp_client/models/email_content_match_result.rb +13 -23
- data/lib/mailslurp_client/models/email_links_result.rb +13 -23
- data/lib/mailslurp_client/models/email_preview.rb +47 -47
- data/lib/mailslurp_client/models/email_projection.rb +77 -97
- data/lib/mailslurp_client/models/email_recipients.rb +16 -15
- data/lib/mailslurp_client/models/email_text_lines_result.rb +13 -23
- data/lib/mailslurp_client/models/email_verification_result.rb +16 -36
- data/lib/mailslurp_client/models/expiration_defaults.rb +16 -26
- data/lib/mailslurp_client/models/expired_inbox_dto.rb +13 -28
- data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +22 -42
- data/lib/mailslurp_client/models/export_link.rb +0 -5
- data/lib/mailslurp_client/models/export_options.rb +1 -6
- data/lib/mailslurp_client/models/flush_expired_inboxes_result.rb +13 -23
- data/lib/mailslurp_client/models/forward_email_options.rb +36 -31
- data/lib/mailslurp_client/models/gravatar_url.rb +13 -23
- data/lib/mailslurp_client/models/group_contacts_dto.rb +13 -23
- data/lib/mailslurp_client/models/group_dto.rb +22 -37
- data/lib/mailslurp_client/models/group_projection.rb +22 -37
- data/lib/mailslurp_client/models/html_validation_result.rb +13 -14
- data/lib/mailslurp_client/models/{inbox.rb → inbox_dto.rb} +47 -57
- data/lib/mailslurp_client/models/inbox_exists_dto.rb +0 -5
- data/lib/mailslurp_client/models/inbox_forwarder_dto.rb +31 -61
- data/lib/mailslurp_client/models/inbox_forwarder_test_options.rb +0 -5
- data/lib/mailslurp_client/models/inbox_forwarder_test_result.rb +13 -23
- data/lib/mailslurp_client/models/inbox_preview.rb +38 -38
- data/lib/mailslurp_client/models/inbox_ruleset_dto.rb +43 -78
- data/lib/mailslurp_client/models/inbox_ruleset_test_options.rb +0 -5
- data/lib/mailslurp_client/models/inbox_ruleset_test_result.rb +13 -18
- data/lib/mailslurp_client/models/inline_object.rb +221 -0
- data/lib/mailslurp_client/models/ip_address_result.rb +0 -10
- data/lib/mailslurp_client/models/json_schema_dto.rb +0 -5
- data/lib/mailslurp_client/models/match_option.rb +7 -2
- data/lib/mailslurp_client/models/match_options.rb +16 -16
- data/lib/mailslurp_client/models/missed_email.rb +67 -102
- data/lib/mailslurp_client/models/missed_email_projection.rb +19 -29
- data/lib/mailslurp_client/models/name_server_record.rb +10 -30
- data/lib/mailslurp_client/models/organization_inbox_projection.rb +44 -44
- data/lib/mailslurp_client/models/page_alias.rb +52 -52
- data/lib/mailslurp_client/models/page_attachment_entity.rb +52 -52
- data/lib/mailslurp_client/models/page_bounced_email.rb +52 -52
- data/lib/mailslurp_client/models/page_bounced_recipients.rb +52 -52
- data/lib/mailslurp_client/models/page_contact_projection.rb +52 -52
- data/lib/mailslurp_client/models/page_email_preview.rb +52 -52
- data/lib/mailslurp_client/models/page_email_projection.rb +52 -52
- data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +52 -52
- data/lib/mailslurp_client/models/page_group_projection.rb +52 -52
- data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +52 -52
- data/lib/mailslurp_client/models/page_inbox_projection.rb +52 -52
- data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +52 -52
- data/lib/mailslurp_client/models/page_missed_email_projection.rb +52 -52
- data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +52 -52
- data/lib/mailslurp_client/models/page_sent_email_projection.rb +49 -49
- data/lib/mailslurp_client/models/page_template_projection.rb +52 -52
- data/lib/mailslurp_client/models/page_thread_projection.rb +52 -52
- data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +52 -52
- data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +52 -52
- data/lib/mailslurp_client/models/page_webhook_projection.rb +52 -52
- data/lib/mailslurp_client/models/page_webhook_result.rb +52 -52
- data/lib/mailslurp_client/models/pageable.rb +10 -10
- data/lib/mailslurp_client/models/raw_email_json.rb +0 -5
- data/lib/mailslurp_client/models/recipient.rb +13 -23
- data/lib/mailslurp_client/models/reply_to_alias_email_options.rb +38 -37
- data/lib/mailslurp_client/models/reply_to_email_options.rb +51 -50
- data/lib/mailslurp_client/models/send_email_options.rb +107 -115
- data/lib/mailslurp_client/models/sender.rb +14 -23
- data/lib/mailslurp_client/models/sent_email_dto.rb +97 -102
- data/lib/mailslurp_client/models/sent_email_projection.rb +66 -105
- data/lib/mailslurp_client/models/simple_send_email_options.rb +24 -24
- data/lib/mailslurp_client/models/template_dto.rb +22 -47
- data/lib/mailslurp_client/models/template_projection.rb +16 -41
- data/lib/mailslurp_client/models/template_variable.rb +0 -10
- data/lib/mailslurp_client/models/test_new_inbox_forwarder_options.rb +0 -10
- data/lib/mailslurp_client/models/test_new_inbox_ruleset_options.rb +0 -10
- data/lib/mailslurp_client/models/thread_projection.rb +60 -95
- data/lib/mailslurp_client/models/tracking_pixel_dto.rb +43 -68
- data/lib/mailslurp_client/models/tracking_pixel_projection.rb +34 -54
- data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +19 -29
- data/lib/mailslurp_client/models/unread_count.rb +0 -5
- data/lib/mailslurp_client/models/unseen_error_count_dto.rb +0 -5
- data/lib/mailslurp_client/models/update_group_contacts.rb +0 -5
- data/lib/mailslurp_client/models/update_inbox_options.rb +26 -26
- data/lib/mailslurp_client/models/upload_attachment_options.rb +14 -14
- data/lib/mailslurp_client/models/validation_message.rb +1 -5
- data/lib/mailslurp_client/models/verify_email_address_options.rb +0 -5
- data/lib/mailslurp_client/models/wait_for_conditions.rb +48 -58
- data/lib/mailslurp_client/models/webhook_dto.rb +64 -69
- data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +42 -42
- data/lib/mailslurp_client/models/webhook_email_read_payload.rb +49 -49
- data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +43 -43
- data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +75 -95
- data/lib/mailslurp_client/models/webhook_new_email_payload.rb +84 -84
- data/lib/mailslurp_client/models/webhook_projection.rb +36 -61
- data/lib/mailslurp_client/models/webhook_redrive_result.rb +13 -23
- data/lib/mailslurp_client/models/webhook_result_dto.rb +76 -126
- data/lib/mailslurp_client/models/webhook_test_request.rb +21 -36
- data/lib/mailslurp_client/models/webhook_test_response.rb +13 -13
- data/lib/mailslurp_client/models/webhook_test_result.rb +13 -23
- data/lib/mailslurp_client/version.rb +1 -1
- data/lib/mailslurp_client.rb +2 -1
- metadata +4 -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
|
+
|
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
|
@@ -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
|
|
@@ -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
|
|
@@ -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
|
-
#
|
18
|
+
# Fields of an email object that can be used to filter results
|
19
19
|
attr_accessor :field
|
20
20
|
|
21
|
-
#
|
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
|
|
@@ -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
|
-
:'
|
28
|
-
:'
|
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
|
-
:'
|
36
|
-
:'
|
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
|
-
|
93
|
-
|
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
|
-
[
|
105
|
+
[matches, conditions].hash
|
106
106
|
end
|
107
107
|
|
108
108
|
# Builds the object from hash
|
@@ -14,63 +14,63 @@ require 'date'
|
|
14
14
|
|
15
15
|
module MailSlurpClient
|
16
16
|
class MissedEmail
|
17
|
-
attr_accessor :
|
17
|
+
attr_accessor :id
|
18
18
|
|
19
|
-
attr_accessor :
|
19
|
+
attr_accessor :user_id
|
20
20
|
|
21
|
-
attr_accessor :
|
21
|
+
attr_accessor :subject
|
22
22
|
|
23
|
-
attr_accessor :
|
23
|
+
attr_accessor :body_excerpt
|
24
24
|
|
25
|
-
attr_accessor :
|
25
|
+
attr_accessor :attachment_count
|
26
26
|
|
27
27
|
attr_accessor :from
|
28
28
|
|
29
|
-
attr_accessor :
|
29
|
+
attr_accessor :to
|
30
30
|
|
31
|
-
attr_accessor :
|
31
|
+
attr_accessor :cc
|
32
32
|
|
33
|
-
attr_accessor :
|
33
|
+
attr_accessor :bcc
|
34
34
|
|
35
|
-
attr_accessor :
|
35
|
+
attr_accessor :inbox_ids
|
36
36
|
|
37
|
-
attr_accessor :
|
37
|
+
attr_accessor :created_at
|
38
38
|
|
39
|
-
attr_accessor :
|
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
|
-
:'
|
45
|
+
:'user_id' => :'userId',
|
52
46
|
:'subject' => :'subject',
|
47
|
+
:'body_excerpt' => :'bodyExcerpt',
|
48
|
+
:'attachment_count' => :'attachmentCount',
|
49
|
+
:'from' => :'from',
|
53
50
|
:'to' => :'to',
|
54
|
-
:'
|
55
|
-
:'
|
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
|
-
:'
|
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
|
-
:'
|
73
|
-
:'
|
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?(:'
|
99
|
-
self.
|
98
|
+
if attributes.key?(:'id')
|
99
|
+
self.id = attributes[:'id']
|
100
100
|
end
|
101
101
|
|
102
|
-
if attributes.key?(:'
|
103
|
-
|
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?(:'
|
109
|
-
self.
|
106
|
+
if attributes.key?(:'subject')
|
107
|
+
self.subject = attributes[:'subject']
|
110
108
|
end
|
111
109
|
|
112
|
-
if attributes.key?(:'
|
113
|
-
|
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?(:'
|
119
|
-
self.
|
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?(:'
|
127
|
-
|
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?(:'
|
131
|
-
if (value = attributes[:'
|
132
|
-
self.
|
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?(:'
|
137
|
-
|
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?(:'
|
141
|
-
if (value = attributes[:'
|
142
|
-
self.
|
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?(:'
|
147
|
-
self.
|
146
|
+
if attributes.key?(:'created_at')
|
147
|
+
self.created_at = attributes[:'created_at']
|
148
148
|
end
|
149
149
|
|
150
|
-
if attributes.key?(:'
|
151
|
-
self.
|
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
|
-
|
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
|
-
|
219
|
-
|
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
|
-
[
|
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
|