mailslurp_client 13.1.0 → 14.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/alias_controller_api.rb +18 -0
  3. data/lib/mailslurp_client/api/attachment_controller_api.rb +6 -0
  4. data/lib/mailslurp_client/api/bounce_controller_api.rb +12 -0
  5. data/lib/mailslurp_client/api/common_actions_controller_api.rb +44 -0
  6. data/lib/mailslurp_client/api/contact_controller_api.rb +6 -0
  7. data/lib/mailslurp_client/api/email_controller_api.rb +12 -0
  8. data/lib/mailslurp_client/api/expired_controller_api.rb +6 -0
  9. data/lib/mailslurp_client/api/group_controller_api.rb +12 -0
  10. data/lib/mailslurp_client/api/inbox_controller_api.rb +110 -6
  11. data/lib/mailslurp_client/api/inbox_forwarder_controller_api.rb +6 -0
  12. data/lib/mailslurp_client/api/inbox_ruleset_controller_api.rb +6 -0
  13. data/lib/mailslurp_client/api/missed_email_controller_api.rb +18 -0
  14. data/lib/mailslurp_client/api/sent_emails_controller_api.rb +24 -0
  15. data/lib/mailslurp_client/api/template_controller_api.rb +6 -0
  16. data/lib/mailslurp_client/api/tracking_controller_api.rb +6 -0
  17. data/lib/mailslurp_client/api/wait_for_controller_api.rb +15 -0
  18. data/lib/mailslurp_client/api/webhook_controller_api.rb +262 -0
  19. data/lib/mailslurp_client/models/create_inbox_dto.rb +1 -1
  20. data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +17 -28
  21. data/lib/mailslurp_client/models/expiration_defaults.rb +18 -4
  22. data/lib/mailslurp_client/models/flush_expired_inboxes_result.rb +227 -0
  23. data/lib/mailslurp_client/models/{inbox_projection.rb → inbox_preview.rb} +22 -24
  24. data/lib/mailslurp_client/models/json_schema_dto.rb +211 -0
  25. data/lib/mailslurp_client/models/page_inbox_projection.rb +1 -1
  26. data/lib/mailslurp_client/models/unseen_error_count_dto.rb +211 -0
  27. data/lib/mailslurp_client/models/wait_for_conditions.rb +21 -6
  28. data/lib/mailslurp_client/models/webhook_dto.rb +1 -1
  29. data/lib/mailslurp_client/models/webhook_result_dto.rb +10 -1
  30. data/lib/mailslurp_client/version.rb +1 -1
  31. data/lib/mailslurp_client.rb +4 -1
  32. metadata +6 -3
@@ -0,0 +1,211 @@
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 UnseenErrorCountDto
17
+ attr_accessor :count
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'count' => :'count'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.openapi_types
28
+ {
29
+ :'count' => :'Integer'
30
+ }
31
+ end
32
+
33
+ # List of attributes with nullable: true
34
+ def self.openapi_nullable
35
+ Set.new([
36
+ ])
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ if (!attributes.is_a?(Hash))
43
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::UnseenErrorCountDto` initialize method"
44
+ end
45
+
46
+ # check to see if the attribute exists and convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}) { |(k, v), h|
48
+ if (!self.class.attribute_map.key?(k.to_sym))
49
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::UnseenErrorCountDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
50
+ end
51
+ h[k.to_sym] = v
52
+ }
53
+
54
+ if attributes.key?(:'count')
55
+ self.count = attributes[:'count']
56
+ end
57
+ end
58
+
59
+ # Show invalid properties with the reasons. Usually used together with valid?
60
+ # @return Array for valid properties with the reasons
61
+ def list_invalid_properties
62
+ invalid_properties = Array.new
63
+ if @count.nil?
64
+ invalid_properties.push('invalid value for "count", count cannot be nil.')
65
+ end
66
+
67
+ invalid_properties
68
+ end
69
+
70
+ # Check to see if the all the properties in the model are valid
71
+ # @return true if the model is valid
72
+ def valid?
73
+ return false if @count.nil?
74
+ true
75
+ end
76
+
77
+ # Checks equality by comparing each attribute.
78
+ # @param [Object] Object to be compared
79
+ def ==(o)
80
+ return true if self.equal?(o)
81
+ self.class == o.class &&
82
+ count == o.count
83
+ end
84
+
85
+ # @see the `==` method
86
+ # @param [Object] Object to be compared
87
+ def eql?(o)
88
+ self == o
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Integer] Hash code
93
+ def hash
94
+ [count].hash
95
+ end
96
+
97
+ # Builds the object from hash
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ # @return [Object] Returns the model itself
100
+ def self.build_from_hash(attributes)
101
+ new.build_from_hash(attributes)
102
+ end
103
+
104
+ # Builds the object from hash
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ # @return [Object] Returns the model itself
107
+ def build_from_hash(attributes)
108
+ return nil unless attributes.is_a?(Hash)
109
+ self.class.openapi_types.each_pair do |key, type|
110
+ if type =~ /\AArray<(.*)>/i
111
+ # check to ensure the input is an array given that the attribute
112
+ # is documented as an array but the input is not
113
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
114
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
115
+ end
116
+ elsif !attributes[self.class.attribute_map[key]].nil?
117
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
118
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
119
+ end
120
+
121
+ self
122
+ end
123
+
124
+ # Deserializes the data based on type
125
+ # @param string type Data type
126
+ # @param string value Value to be deserialized
127
+ # @return [Object] Deserialized data
128
+ def _deserialize(type, value)
129
+ case type.to_sym
130
+ when :DateTime
131
+ DateTime.parse(value)
132
+ when :Date
133
+ Date.parse(value)
134
+ when :String
135
+ value.to_s
136
+ when :Integer
137
+ value.to_i
138
+ when :Float
139
+ value.to_f
140
+ when :Boolean
141
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
142
+ true
143
+ else
144
+ false
145
+ end
146
+ when :Object
147
+ # generic object (usually a Hash), return directly
148
+ value
149
+ when /\AArray<(?<inner_type>.+)>\z/
150
+ inner_type = Regexp.last_match[:inner_type]
151
+ value.map { |v| _deserialize(inner_type, v) }
152
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
153
+ k_type = Regexp.last_match[:k_type]
154
+ v_type = Regexp.last_match[:v_type]
155
+ {}.tap do |hash|
156
+ value.each do |k, v|
157
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
158
+ end
159
+ end
160
+ else # model
161
+ MailSlurpClient.const_get(type).build_from_hash(value)
162
+ end
163
+ end
164
+
165
+ # Returns the string representation of the object
166
+ # @return [String] String presentation of the object
167
+ def to_s
168
+ to_hash.to_s
169
+ end
170
+
171
+ # to_body is an alias to to_hash (backward compatibility)
172
+ # @return [Hash] Returns the object in the form of hash
173
+ def to_body
174
+ to_hash
175
+ end
176
+
177
+ # Returns the object in the form of hash
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_hash
180
+ hash = {}
181
+ self.class.attribute_map.each_pair do |attr, param|
182
+ value = self.send(attr)
183
+ if value.nil?
184
+ is_nullable = self.class.openapi_nullable.include?(attr)
185
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
186
+ end
187
+
188
+ hash[param] = _to_hash(value)
189
+ end
190
+ hash
191
+ end
192
+
193
+ # Outputs non-array value in the form of hash
194
+ # For object, use to_hash. Otherwise, just return the value
195
+ # @param [Object] value Any valid value
196
+ # @return [Hash] Returns the value in the form of hash
197
+ def _to_hash(value)
198
+ if value.is_a?(Array)
199
+ value.compact.map { |v| _to_hash(v) }
200
+ elsif value.is_a?(Hash)
201
+ {}.tap do |hash|
202
+ value.each { |k, v| hash[k] = _to_hash(v) }
203
+ end
204
+ elsif value.respond_to? :to_hash
205
+ value.to_hash
206
+ else
207
+ value
208
+ end
209
+ end
210
+ end
211
+ end
@@ -15,12 +15,18 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # Conditions that a `waitForXEmails` endpoint operates on. The methods wait until given conditions are met or a timeout is reached. If the conditions are met without needing to wait the results will be returned immediately. Can include `unreadOnly` to ignore already read emails that were returned in an API call or viewing in the dashboard. Can also include matches for emails containing `from`, `subject`, `hasAttachments` etc.
17
17
  class WaitForConditions
18
+ # ISO Date Time latest time of email to consider. Filter for matching emails that were received before this date
19
+ attr_accessor :before
20
+
18
21
  # Number of results that should match conditions. Either exactly or at least this amount based on the `countType`. If count condition is not met and the timeout has not been reached the `waitFor` method will retry the operation.
19
22
  attr_accessor :count
20
23
 
21
24
  # How should the found count be compared to the expected count.
22
25
  attr_accessor :count_type
23
26
 
27
+ # Max time in milliseconds to wait between retries if a `timeout` is specified.
28
+ attr_accessor :delay_timeout
29
+
24
30
  # ID of inbox to search within and apply conditions to. Essentially filtering the emails found to give a count.
25
31
  attr_accessor :inbox_id
26
32
 
@@ -64,8 +70,10 @@ module MailSlurpClient
64
70
  # Attribute mapping from ruby-style variable name to JSON key.
65
71
  def self.attribute_map
66
72
  {
73
+ :'before' => :'before',
67
74
  :'count' => :'count',
68
75
  :'count_type' => :'countType',
76
+ :'delay_timeout' => :'delayTimeout',
69
77
  :'inbox_id' => :'inboxId',
70
78
  :'matches' => :'matches',
71
79
  :'since' => :'since',
@@ -78,8 +86,10 @@ module MailSlurpClient
78
86
  # Attribute type mapping.
79
87
  def self.openapi_types
80
88
  {
89
+ :'before' => :'DateTime',
81
90
  :'count' => :'Integer',
82
91
  :'count_type' => :'String',
92
+ :'delay_timeout' => :'Integer',
83
93
  :'inbox_id' => :'String',
84
94
  :'matches' => :'Array<MatchOption>',
85
95
  :'since' => :'DateTime',
@@ -110,6 +120,10 @@ module MailSlurpClient
110
120
  h[k.to_sym] = v
111
121
  }
112
122
 
123
+ if attributes.key?(:'before')
124
+ self.before = attributes[:'before']
125
+ end
126
+
113
127
  if attributes.key?(:'count')
114
128
  self.count = attributes[:'count']
115
129
  end
@@ -118,6 +132,10 @@ module MailSlurpClient
118
132
  self.count_type = attributes[:'count_type']
119
133
  end
120
134
 
135
+ if attributes.key?(:'delay_timeout')
136
+ self.delay_timeout = attributes[:'delay_timeout']
137
+ end
138
+
121
139
  if attributes.key?(:'inbox_id')
122
140
  self.inbox_id = attributes[:'inbox_id']
123
141
  end
@@ -149,10 +167,6 @@ module MailSlurpClient
149
167
  # @return Array for valid properties with the reasons
150
168
  def list_invalid_properties
151
169
  invalid_properties = Array.new
152
- if @count.nil?
153
- invalid_properties.push('invalid value for "count", count cannot be nil.')
154
- end
155
-
156
170
  if @inbox_id.nil?
157
171
  invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
158
172
  end
@@ -167,7 +181,6 @@ module MailSlurpClient
167
181
  # Check to see if the all the properties in the model are valid
168
182
  # @return true if the model is valid
169
183
  def valid?
170
- return false if @count.nil?
171
184
  count_type_validator = EnumAttributeValidator.new('String', ["EXACTLY", "ATLEAST"])
172
185
  return false unless count_type_validator.valid?(@count_type)
173
186
  return false if @inbox_id.nil?
@@ -202,8 +215,10 @@ module MailSlurpClient
202
215
  def ==(o)
203
216
  return true if self.equal?(o)
204
217
  self.class == o.class &&
218
+ before == o.before &&
205
219
  count == o.count &&
206
220
  count_type == o.count_type &&
221
+ delay_timeout == o.delay_timeout &&
207
222
  inbox_id == o.inbox_id &&
208
223
  matches == o.matches &&
209
224
  since == o.since &&
@@ -221,7 +236,7 @@ module MailSlurpClient
221
236
  # Calculates hash code according to all attributes.
222
237
  # @return [Integer] Hash code
223
238
  def hash
224
- [count, count_type, inbox_id, matches, since, sort_direction, timeout, unread_only].hash
239
+ [before, count, count_type, delay_timeout, inbox_id, matches, since, sort_direction, timeout, unread_only].hash
225
240
  end
226
241
 
227
242
  # Builds the object from hash
@@ -35,7 +35,7 @@ module MailSlurpClient
35
35
  # Name of the webhook
36
36
  attr_accessor :name
37
37
 
38
- # JSON Schema for the payload that will be sent to your URL via the HTTP method described.
38
+ # Deprecated. Fetch JSON Schema for webhook using the getJsonSchemaForWebhookPayload method
39
39
  attr_accessor :payload_json_schema
40
40
 
41
41
  attr_accessor :updated_at
@@ -34,6 +34,8 @@ module MailSlurpClient
34
34
 
35
35
  attr_accessor :result_type
36
36
 
37
+ attr_accessor :seen
38
+
37
39
  attr_accessor :updated_at
38
40
 
39
41
  attr_accessor :user_id
@@ -79,6 +81,7 @@ module MailSlurpClient
79
81
  :'response_status' => :'responseStatus',
80
82
  :'response_time_millis' => :'responseTimeMillis',
81
83
  :'result_type' => :'resultType',
84
+ :'seen' => :'seen',
82
85
  :'updated_at' => :'updatedAt',
83
86
  :'user_id' => :'userId',
84
87
  :'webhook_event' => :'webhookEvent',
@@ -100,6 +103,7 @@ module MailSlurpClient
100
103
  :'response_status' => :'Integer',
101
104
  :'response_time_millis' => :'Integer',
102
105
  :'result_type' => :'String',
106
+ :'seen' => :'Boolean',
103
107
  :'updated_at' => :'DateTime',
104
108
  :'user_id' => :'String',
105
109
  :'webhook_event' => :'String',
@@ -169,6 +173,10 @@ module MailSlurpClient
169
173
  self.result_type = attributes[:'result_type']
170
174
  end
171
175
 
176
+ if attributes.key?(:'seen')
177
+ self.seen = attributes[:'seen']
178
+ end
179
+
172
180
  if attributes.key?(:'updated_at')
173
181
  self.updated_at = attributes[:'updated_at']
174
182
  end
@@ -304,6 +312,7 @@ module MailSlurpClient
304
312
  response_status == o.response_status &&
305
313
  response_time_millis == o.response_time_millis &&
306
314
  result_type == o.result_type &&
315
+ seen == o.seen &&
307
316
  updated_at == o.updated_at &&
308
317
  user_id == o.user_id &&
309
318
  webhook_event == o.webhook_event &&
@@ -320,7 +329,7 @@ module MailSlurpClient
320
329
  # Calculates hash code according to all attributes.
321
330
  # @return [Integer] Hash code
322
331
  def hash
323
- [created_at, http_method, id, inbox_id, message_id, redrive_id, response_body_extract, response_status, response_time_millis, result_type, updated_at, user_id, webhook_event, webhook_id, webhook_url].hash
332
+ [created_at, http_method, id, inbox_id, message_id, redrive_id, response_body_extract, response_status, response_time_millis, result_type, seen, updated_at, user_id, webhook_event, webhook_id, webhook_url].hash
324
333
  end
325
334
 
326
335
  # Builds the object from hash
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.3.1
11
11
  =end
12
12
 
13
13
  module MailSlurpClient
14
- VERSION = '13.1.0'
14
+ VERSION = '14.0.3'
15
15
  end
@@ -66,6 +66,7 @@ require 'mailslurp_client/models/expired_inbox_dto'
66
66
  require 'mailslurp_client/models/expired_inbox_record_projection'
67
67
  require 'mailslurp_client/models/export_link'
68
68
  require 'mailslurp_client/models/export_options'
69
+ require 'mailslurp_client/models/flush_expired_inboxes_result'
69
70
  require 'mailslurp_client/models/forward_email_options'
70
71
  require 'mailslurp_client/models/gravatar_url'
71
72
  require 'mailslurp_client/models/group_contacts_dto'
@@ -77,10 +78,11 @@ require 'mailslurp_client/models/inbox'
77
78
  require 'mailslurp_client/models/inbox_forwarder_dto'
78
79
  require 'mailslurp_client/models/inbox_forwarder_test_options'
79
80
  require 'mailslurp_client/models/inbox_forwarder_test_result'
80
- require 'mailslurp_client/models/inbox_projection'
81
+ require 'mailslurp_client/models/inbox_preview'
81
82
  require 'mailslurp_client/models/inbox_ruleset_dto'
82
83
  require 'mailslurp_client/models/inbox_ruleset_test_options'
83
84
  require 'mailslurp_client/models/inbox_ruleset_test_result'
85
+ require 'mailslurp_client/models/json_schema_dto'
84
86
  require 'mailslurp_client/models/match_option'
85
87
  require 'mailslurp_client/models/match_options'
86
88
  require 'mailslurp_client/models/missed_email'
@@ -130,6 +132,7 @@ require 'mailslurp_client/models/tracking_pixel_dto'
130
132
  require 'mailslurp_client/models/tracking_pixel_projection'
131
133
  require 'mailslurp_client/models/unknown_missed_email_projection'
132
134
  require 'mailslurp_client/models/unread_count'
135
+ require 'mailslurp_client/models/unseen_error_count_dto'
133
136
  require 'mailslurp_client/models/update_alias_options'
134
137
  require 'mailslurp_client/models/update_domain_options'
135
138
  require 'mailslurp_client/models/update_group_contacts'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailslurp_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.1.0
4
+ version: 14.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - mailslurp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-31 00:00:00.000000000 Z
11
+ date: 2021-10-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Create emails addresses in Ruby then send and receive real emails and
14
14
  attachments. See https://www.mailslurp.com/docs/ruby/ for full Ruby documentation.
@@ -97,6 +97,7 @@ files:
97
97
  - lib/mailslurp_client/models/expired_inbox_record_projection.rb
98
98
  - lib/mailslurp_client/models/export_link.rb
99
99
  - lib/mailslurp_client/models/export_options.rb
100
+ - lib/mailslurp_client/models/flush_expired_inboxes_result.rb
100
101
  - lib/mailslurp_client/models/forward_email_options.rb
101
102
  - lib/mailslurp_client/models/gravatar_url.rb
102
103
  - lib/mailslurp_client/models/group_contacts_dto.rb
@@ -107,11 +108,12 @@ files:
107
108
  - lib/mailslurp_client/models/inbox_forwarder_dto.rb
108
109
  - lib/mailslurp_client/models/inbox_forwarder_test_options.rb
109
110
  - lib/mailslurp_client/models/inbox_forwarder_test_result.rb
110
- - lib/mailslurp_client/models/inbox_projection.rb
111
+ - lib/mailslurp_client/models/inbox_preview.rb
111
112
  - lib/mailslurp_client/models/inbox_ruleset_dto.rb
112
113
  - lib/mailslurp_client/models/inbox_ruleset_test_options.rb
113
114
  - lib/mailslurp_client/models/inbox_ruleset_test_result.rb
114
115
  - lib/mailslurp_client/models/ip_address_result.rb
116
+ - lib/mailslurp_client/models/json_schema_dto.rb
115
117
  - lib/mailslurp_client/models/match_option.rb
116
118
  - lib/mailslurp_client/models/match_options.rb
117
119
  - lib/mailslurp_client/models/missed_email.rb
@@ -161,6 +163,7 @@ files:
161
163
  - lib/mailslurp_client/models/tracking_pixel_projection.rb
162
164
  - lib/mailslurp_client/models/unknown_missed_email_projection.rb
163
165
  - lib/mailslurp_client/models/unread_count.rb
166
+ - lib/mailslurp_client/models/unseen_error_count_dto.rb
164
167
  - lib/mailslurp_client/models/update_alias_options.rb
165
168
  - lib/mailslurp_client/models/update_domain_options.rb
166
169
  - lib/mailslurp_client/models/update_group_contacts.rb