mailslurp_client 8.2.14 → 8.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,22 +17,29 @@ module MailSlurpClient
17
17
  class DomainDto
18
18
  attr_accessor :created_at
19
19
 
20
+ # DNS records for DKIM approval
21
+ attr_accessor :dkim_tokens
22
+
23
+ # Custom domain name
20
24
  attr_accessor :domain
21
25
 
22
26
  attr_accessor :id
23
27
 
28
+ # Whether domain has been verified or not. If the domain is not verified after 72 hours there is most likely an issue with the domains DNS records.
24
29
  attr_accessor :is_verified
25
30
 
26
31
  attr_accessor :updated_at
27
32
 
28
33
  attr_accessor :user_id
29
34
 
35
+ # A TXT record that you must place in the DNS settings of the domain to complete domain verification
30
36
  attr_accessor :verification_token
31
37
 
32
38
  # Attribute mapping from ruby-style variable name to JSON key.
33
39
  def self.attribute_map
34
40
  {
35
41
  :'created_at' => :'createdAt',
42
+ :'dkim_tokens' => :'dkimTokens',
36
43
  :'domain' => :'domain',
37
44
  :'id' => :'id',
38
45
  :'is_verified' => :'isVerified',
@@ -46,6 +53,7 @@ module MailSlurpClient
46
53
  def self.openapi_types
47
54
  {
48
55
  :'created_at' => :'DateTime',
56
+ :'dkim_tokens' => :'Array<String>',
49
57
  :'domain' => :'String',
50
58
  :'id' => :'String',
51
59
  :'is_verified' => :'Boolean',
@@ -80,6 +88,12 @@ module MailSlurpClient
80
88
  self.created_at = attributes[:'created_at']
81
89
  end
82
90
 
91
+ if attributes.key?(:'dkim_tokens')
92
+ if (value = attributes[:'dkim_tokens']).is_a?(Array)
93
+ self.dkim_tokens = value
94
+ end
95
+ end
96
+
83
97
  if attributes.key?(:'domain')
84
98
  self.domain = attributes[:'domain']
85
99
  end
@@ -113,18 +127,10 @@ module MailSlurpClient
113
127
  invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
114
128
  end
115
129
 
116
- if @domain.nil?
117
- invalid_properties.push('invalid value for "domain", domain cannot be nil.')
118
- end
119
-
120
130
  if @id.nil?
121
131
  invalid_properties.push('invalid value for "id", id cannot be nil.')
122
132
  end
123
133
 
124
- if @is_verified.nil?
125
- invalid_properties.push('invalid value for "is_verified", is_verified cannot be nil.')
126
- end
127
-
128
134
  if @updated_at.nil?
129
135
  invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
130
136
  end
@@ -133,10 +139,6 @@ module MailSlurpClient
133
139
  invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
134
140
  end
135
141
 
136
- if @verification_token.nil?
137
- invalid_properties.push('invalid value for "verification_token", verification_token cannot be nil.')
138
- end
139
-
140
142
  invalid_properties
141
143
  end
142
144
 
@@ -144,12 +146,9 @@ module MailSlurpClient
144
146
  # @return true if the model is valid
145
147
  def valid?
146
148
  return false if @created_at.nil?
147
- return false if @domain.nil?
148
149
  return false if @id.nil?
149
- return false if @is_verified.nil?
150
150
  return false if @updated_at.nil?
151
151
  return false if @user_id.nil?
152
- return false if @verification_token.nil?
153
152
  true
154
153
  end
155
154
 
@@ -159,6 +158,7 @@ module MailSlurpClient
159
158
  return true if self.equal?(o)
160
159
  self.class == o.class &&
161
160
  created_at == o.created_at &&
161
+ dkim_tokens == o.dkim_tokens &&
162
162
  domain == o.domain &&
163
163
  id == o.id &&
164
164
  is_verified == o.is_verified &&
@@ -176,7 +176,7 @@ module MailSlurpClient
176
176
  # Calculates hash code according to all attributes.
177
177
  # @return [Integer] Hash code
178
178
  def hash
179
- [created_at, domain, id, is_verified, updated_at, user_id, verification_token].hash
179
+ [created_at, dkim_tokens, domain, id, is_verified, updated_at, user_id, verification_token].hash
180
180
  end
181
181
 
182
182
  # Builds the object from hash
@@ -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
@@ -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.
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.3.1
11
11
  =end
12
12
 
13
13
  module MailSlurpClient
14
- VERSION = '8.2.14'
14
+ VERSION = '8.3.1'
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.14
4
+ version: 8.3.1
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-08 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.
@@ -51,11 +51,15 @@ files:
51
51
  - lib/mailslurp_client/models/create_contact_options.rb
52
52
  - lib/mailslurp_client/models/create_domain_options.rb
53
53
  - lib/mailslurp_client/models/create_group_options.rb
54
+ - lib/mailslurp_client/models/create_inbox_dto.rb
54
55
  - lib/mailslurp_client/models/create_owned_alias_options.rb
55
56
  - lib/mailslurp_client/models/create_template_options.rb
56
57
  - lib/mailslurp_client/models/create_webhook_options.rb
57
58
  - lib/mailslurp_client/models/describe_domain_options.rb
58
59
  - lib/mailslurp_client/models/describe_mail_server_domain_result.rb
60
+ - lib/mailslurp_client/models/dns_lookup_options.rb
61
+ - lib/mailslurp_client/models/dns_lookup_result.rb
62
+ - lib/mailslurp_client/models/dns_lookup_results.rb
59
63
  - lib/mailslurp_client/models/domain_dto.rb
60
64
  - lib/mailslurp_client/models/domain_preview.rb
61
65
  - lib/mailslurp_client/models/download_attachment_dto.rb
@@ -72,6 +76,7 @@ files:
72
76
  - lib/mailslurp_client/models/html_validation_result.rb
73
77
  - lib/mailslurp_client/models/inbox.rb
74
78
  - lib/mailslurp_client/models/inbox_projection.rb
79
+ - lib/mailslurp_client/models/ip_address_result.rb
75
80
  - lib/mailslurp_client/models/match_option.rb
76
81
  - lib/mailslurp_client/models/match_options.rb
77
82
  - lib/mailslurp_client/models/model_alias.rb