mailslurp_client 8.2.11 → 8.2.17

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,10 +15,13 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # HTML Validation Results
17
17
  class HTMLValidationResult
18
+ # Optional errors resulting from HTML validation
18
19
  attr_accessor :errors
19
20
 
21
+ # Is HTML validation result valid
20
22
  attr_accessor :is_valid
21
23
 
24
+ # Optional warnings resulting from HTML validation
22
25
  attr_accessor :warnings
23
26
 
24
27
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -81,27 +84,12 @@ module MailSlurpClient
81
84
  # @return Array for valid properties with the reasons
82
85
  def list_invalid_properties
83
86
  invalid_properties = Array.new
84
- if @errors.nil?
85
- invalid_properties.push('invalid value for "errors", errors cannot be nil.')
86
- end
87
-
88
- if @is_valid.nil?
89
- invalid_properties.push('invalid value for "is_valid", is_valid cannot be nil.')
90
- end
91
-
92
- if @warnings.nil?
93
- invalid_properties.push('invalid value for "warnings", warnings cannot be nil.')
94
- end
95
-
96
87
  invalid_properties
97
88
  end
98
89
 
99
90
  # Check to see if the all the properties in the model are valid
100
91
  # @return true if the model is valid
101
92
  def valid?
102
- return false if @errors.nil?
103
- return false if @is_valid.nil?
104
- return false if @warnings.nil?
105
93
  true
106
94
  end
107
95
 
@@ -15,28 +15,28 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # Representation of an inbox with an email address. Emails can be sent to or from this email address.
17
17
  class Inbox
18
- # When was the inbox created
18
+ # When was the inbox created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`.
19
19
  attr_accessor :created_at
20
20
 
21
21
  # Optional description of an inbox for labelling purposes
22
22
  attr_accessor :description
23
23
 
24
- # The inbox's email address. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints.
24
+ # The inbox's email address. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID.
25
25
  attr_accessor :email_address
26
26
 
27
27
  # When, if ever, will the inbox expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. Timestamp passed as string.
28
28
  attr_accessor :expires_at
29
29
 
30
- # Is the inbox favourited
30
+ # Is the inbox favorited. Favouriting inboxes is typically done in the dashboard for quick access
31
31
  attr_accessor :favourite
32
32
 
33
- # ID of the inbox
33
+ # ID of the inbox. The ID is a UUID-V4 string. See the emailAddress property for the email address.
34
34
  attr_accessor :id
35
35
 
36
36
  # Optional name of the inbox. Displayed in the dashboard for easier search
37
37
  attr_accessor :name
38
38
 
39
- # Tags that inbox has been tagged with
39
+ # Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.
40
40
  attr_accessor :tags
41
41
 
42
42
  # ID of user that inbox belongs to
@@ -0,0 +1,226 @@
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
+ # IP Address look up result for a given domain / hostname
17
+ class IPAddressResult
18
+ attr_accessor :address
19
+
20
+ attr_accessor :hostname
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'address' => :'address',
26
+ :'hostname' => :'hostname'
27
+ }
28
+ end
29
+
30
+ # Attribute type mapping.
31
+ def self.openapi_types
32
+ {
33
+ :'address' => :'String',
34
+ :'hostname' => :'String'
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::IPAddressResult` 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::IPAddressResult`. 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?(:'address')
60
+ self.address = attributes[:'address']
61
+ end
62
+
63
+ if attributes.key?(:'hostname')
64
+ self.hostname = attributes[:'hostname']
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 @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
+ invalid_properties
81
+ end
82
+
83
+ # Check to see if the all the properties in the model are valid
84
+ # @return true if the model is valid
85
+ def valid?
86
+ return false if @address.nil?
87
+ return false if @hostname.nil?
88
+ true
89
+ end
90
+
91
+ # Checks equality by comparing each attribute.
92
+ # @param [Object] Object to be compared
93
+ def ==(o)
94
+ return true if self.equal?(o)
95
+ self.class == o.class &&
96
+ address == o.address &&
97
+ hostname == o.hostname
98
+ end
99
+
100
+ # @see the `==` method
101
+ # @param [Object] Object to be compared
102
+ def eql?(o)
103
+ self == o
104
+ end
105
+
106
+ # Calculates hash code according to all attributes.
107
+ # @return [Integer] Hash code
108
+ def hash
109
+ [address, hostname].hash
110
+ end
111
+
112
+ # Builds the object from hash
113
+ # @param [Hash] attributes Model attributes in the form of hash
114
+ # @return [Object] Returns the model itself
115
+ def self.build_from_hash(attributes)
116
+ new.build_from_hash(attributes)
117
+ end
118
+
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def build_from_hash(attributes)
123
+ return nil unless attributes.is_a?(Hash)
124
+ self.class.openapi_types.each_pair do |key, type|
125
+ if type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
129
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
130
+ end
131
+ elsif !attributes[self.class.attribute_map[key]].nil?
132
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
134
+ end
135
+
136
+ self
137
+ end
138
+
139
+ # Deserializes the data based on type
140
+ # @param string type Data type
141
+ # @param string value Value to be deserialized
142
+ # @return [Object] Deserialized data
143
+ def _deserialize(type, value)
144
+ case type.to_sym
145
+ when :DateTime
146
+ DateTime.parse(value)
147
+ when :Date
148
+ Date.parse(value)
149
+ when :String
150
+ value.to_s
151
+ when :Integer
152
+ value.to_i
153
+ when :Float
154
+ value.to_f
155
+ when :Boolean
156
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
157
+ true
158
+ else
159
+ false
160
+ end
161
+ when :Object
162
+ # generic object (usually a Hash), return directly
163
+ value
164
+ when /\AArray<(?<inner_type>.+)>\z/
165
+ inner_type = Regexp.last_match[:inner_type]
166
+ value.map { |v| _deserialize(inner_type, v) }
167
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
168
+ k_type = Regexp.last_match[:k_type]
169
+ v_type = Regexp.last_match[:v_type]
170
+ {}.tap do |hash|
171
+ value.each do |k, v|
172
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
173
+ end
174
+ end
175
+ else # model
176
+ MailSlurpClient.const_get(type).build_from_hash(value)
177
+ end
178
+ end
179
+
180
+ # Returns the string representation of the object
181
+ # @return [String] String presentation of the object
182
+ def to_s
183
+ to_hash.to_s
184
+ end
185
+
186
+ # to_body is an alias to to_hash (backward compatibility)
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_body
189
+ to_hash
190
+ end
191
+
192
+ # Returns the object in the form of hash
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_hash
195
+ hash = {}
196
+ self.class.attribute_map.each_pair do |attr, param|
197
+ value = self.send(attr)
198
+ if value.nil?
199
+ is_nullable = self.class.openapi_nullable.include?(attr)
200
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
201
+ end
202
+
203
+ hash[param] = _to_hash(value)
204
+ end
205
+ hash
206
+ end
207
+
208
+ # Outputs non-array value in the form of hash
209
+ # For object, use to_hash. Otherwise, just return the value
210
+ # @param [Object] value Any valid value
211
+ # @return [Hash] Returns the value in the form of hash
212
+ def _to_hash(value)
213
+ if value.is_a?(Array)
214
+ value.compact.map { |v| _to_hash(v) }
215
+ elsif value.is_a?(Hash)
216
+ {}.tap do |hash|
217
+ value.each { |k, v| hash[k] = _to_hash(v) }
218
+ end
219
+ elsif value.respond_to? :to_hash
220
+ value.to_hash
221
+ else
222
+ value
223
+ end
224
+ end
225
+ end
226
+ end
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
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.
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' }] }`. If you wish to extract regex matches inside the email content see the `getEmailContentMatch` method in the EmailController.
17
17
  class MatchOptions
18
18
  # 1 or more match options. Options are additive so if one does not match the email is excluded from results
19
19
  attr_accessor :matches
@@ -13,13 +13,16 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
+ # Sent email details
16
17
  class SentEmailDto
18
+ # Array of IDs of attachments that were sent with this email
17
19
  attr_accessor :attachments
18
20
 
19
21
  attr_accessor :bcc
20
22
 
21
23
  attr_accessor :body
22
24
 
25
+ # MD5 Hash
23
26
  attr_accessor :body_md5_hash
24
27
 
25
28
  attr_accessor :cc
@@ -28,8 +31,10 @@ module MailSlurpClient
28
31
 
29
32
  attr_accessor :from
30
33
 
34
+ # ID of sent email
31
35
  attr_accessor :id
32
36
 
37
+ # Inbox ID email was sent from
33
38
  attr_accessor :inbox_id
34
39
 
35
40
  attr_accessor :is_html
@@ -38,8 +43,10 @@ module MailSlurpClient
38
43
 
39
44
  attr_accessor :subject
40
45
 
46
+ # Recipients email was sent to
41
47
  attr_accessor :to
42
48
 
49
+ # User ID
43
50
  attr_accessor :user_id
44
51
 
45
52
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -172,32 +179,17 @@ module MailSlurpClient
172
179
  # @return Array for valid properties with the reasons
173
180
  def list_invalid_properties
174
181
  invalid_properties = Array.new
175
- if @id.nil?
176
- invalid_properties.push('invalid value for "id", id cannot be nil.')
177
- end
178
-
179
- if @inbox_id.nil?
180
- invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
181
- end
182
-
183
182
  if @sent_at.nil?
184
183
  invalid_properties.push('invalid value for "sent_at", sent_at cannot be nil.')
185
184
  end
186
185
 
187
- if @user_id.nil?
188
- invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
189
- end
190
-
191
186
  invalid_properties
192
187
  end
193
188
 
194
189
  # Check to see if the all the properties in the model are valid
195
190
  # @return true if the model is valid
196
191
  def valid?
197
- return false if @id.nil?
198
- return false if @inbox_id.nil?
199
192
  return false if @sent_at.nil?
200
- return false if @user_id.nil?
201
193
  true
202
194
  end
203
195
 
@@ -21,13 +21,13 @@ module MailSlurpClient
21
21
  # When, if ever, will the inbox expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. Timestamp passed as string.
22
22
  attr_accessor :expires_at
23
23
 
24
- # Is the inbox favourited
24
+ # Is the inbox favorited. Favouriting inboxes is typically done in the dashboard for quick access
25
25
  attr_accessor :favourite
26
26
 
27
27
  # Optional name of the inbox. Displayed in the dashboard for easier search
28
28
  attr_accessor :name
29
29
 
30
- # Tags that inbox has been tagged with
30
+ # Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.
31
31
  attr_accessor :tags
32
32
 
33
33
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -21,7 +21,7 @@ module MailSlurpClient
21
21
  # Optional contentType for file. For instance `application/pdf`
22
22
  attr_accessor :content_type
23
23
 
24
- # Optional filename to save upload with
24
+ # Optional filename to save upload with. Will be the name that is shown in email clients
25
25
  attr_accessor :filename
26
26
 
27
27
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.3.1
11
11
  =end
12
12
 
13
13
  module MailSlurpClient
14
- VERSION = '8.2.11'
14
+ VERSION = '8.2.17'
15
15
  end
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: 8.2.11
4
+ version: 8.2.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - mailslurp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-22 00:00:00.000000000 Z
11
+ date: 2020-12-01 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.
@@ -56,6 +56,9 @@ files:
56
56
  - lib/mailslurp_client/models/create_webhook_options.rb
57
57
  - lib/mailslurp_client/models/describe_domain_options.rb
58
58
  - lib/mailslurp_client/models/describe_mail_server_domain_result.rb
59
+ - lib/mailslurp_client/models/dns_lookup_options.rb
60
+ - lib/mailslurp_client/models/dns_lookup_result.rb
61
+ - lib/mailslurp_client/models/dns_lookup_results.rb
59
62
  - lib/mailslurp_client/models/domain_dto.rb
60
63
  - lib/mailslurp_client/models/domain_preview.rb
61
64
  - lib/mailslurp_client/models/download_attachment_dto.rb
@@ -72,6 +75,7 @@ files:
72
75
  - lib/mailslurp_client/models/html_validation_result.rb
73
76
  - lib/mailslurp_client/models/inbox.rb
74
77
  - lib/mailslurp_client/models/inbox_projection.rb
78
+ - lib/mailslurp_client/models/ip_address_result.rb
75
79
  - lib/mailslurp_client/models/match_option.rb
76
80
  - lib/mailslurp_client/models/match_options.rb
77
81
  - lib/mailslurp_client/models/model_alias.rb
@@ -88,7 +92,6 @@ files:
88
92
  - lib/mailslurp_client/models/pageable.rb
89
93
  - lib/mailslurp_client/models/raw_email_json.rb
90
94
  - lib/mailslurp_client/models/send_email_options.rb
91
- - lib/mailslurp_client/models/sent_email.rb
92
95
  - lib/mailslurp_client/models/sent_email_dto.rb
93
96
  - lib/mailslurp_client/models/sent_email_projection.rb
94
97
  - lib/mailslurp_client/models/set_inbox_favourited_options.rb