mailslurp_client 12.8.1 → 12.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 49a895adb891dc40b1bc2974fe5298e7fe05847362e9447a9bdac0873036116b
4
- data.tar.gz: 944ba2ff57efae68ef7b1baba6ba1a78c0193f0033835b8efff92e7ed57f1007
3
+ metadata.gz: 9631374b4be566eabd7d85aa8bdc05f9b27d3904be856e85a6eb70df08ec272f
4
+ data.tar.gz: 660a9a5e1d6af82ee9213085f06acf469f2d5f396ac61d43d09f10fc14bafc7d
5
5
  SHA512:
6
- metadata.gz: ae0ab02f60f634753822bdb3727c2b0bf1d8a0d64c447d7617417d12c8c5f1e3776f496549f636b4feb524a598b38d001a71d358c7544b9be334430f79af7fc6
7
- data.tar.gz: a664fc6b6042398f1871e2f10e80530ef8130f6b846129007b4d3c2f0fe7de9f07eb4554c73eb6c00beff6a3ffc20d7d1a13faa9f34963d549f031d802e3da27
6
+ metadata.gz: 871cd565c92d7ec331543bc40e44a250cb5b5ef81af8ba8c9a0ce5a0790aba35c3e925eb2eafb179eed3aee194e825ee064ad0bf773ff00ae19d836cb76adfff
7
+ data.tar.gz: 709bbd3304bc4092f49c02054ac726f5ce6de43abf4edb804d60f0feb292e35cc909f5bb62323fb51fab6a22eb07f917ea16c15f63f99922ccf3f8f042338776
@@ -23,9 +23,10 @@ require 'mailslurp_client/models/alias_projection'
23
23
  require 'mailslurp_client/models/attachment_meta_data'
24
24
  require 'mailslurp_client/models/attachment_projection'
25
25
  require 'mailslurp_client/models/basic_auth_options'
26
- require 'mailslurp_client/models/bounce'
27
26
  require 'mailslurp_client/models/bounce_projection'
28
27
  require 'mailslurp_client/models/bounce_recipient'
28
+ require 'mailslurp_client/models/bounced_email_dto'
29
+ require 'mailslurp_client/models/bounced_recipient_dto'
29
30
  require 'mailslurp_client/models/bulk_send_email_options'
30
31
  require 'mailslurp_client/models/condition_option'
31
32
  require 'mailslurp_client/models/contact_dto'
@@ -23,7 +23,7 @@ module MailSlurpClient
23
23
  # Bounced emails are email you have sent that were rejected by a recipient
24
24
  # @param id [String] ID of the bounced email to fetch
25
25
  # @param [Hash] opts the optional parameters
26
- # @return [Bounce]
26
+ # @return [BouncedEmailDto]
27
27
  def get_bounced_email(id, opts = {})
28
28
  data, _status_code, _headers = get_bounced_email_with_http_info(id, opts)
29
29
  data
@@ -33,7 +33,7 @@ module MailSlurpClient
33
33
  # Bounced emails are email you have sent that were rejected by a recipient
34
34
  # @param id [String] ID of the bounced email to fetch
35
35
  # @param [Hash] opts the optional parameters
36
- # @return [Array<(Bounce, Integer, Hash)>] Bounce data, response status code and response headers
36
+ # @return [Array<(BouncedEmailDto, Integer, Hash)>] BouncedEmailDto data, response status code and response headers
37
37
  def get_bounced_email_with_http_info(id, opts = {})
38
38
  if @api_client.config.debugging
39
39
  @api_client.config.logger.debug 'Calling API: BounceControllerApi.get_bounced_email ...'
@@ -60,7 +60,7 @@ module MailSlurpClient
60
60
  post_body = opts[:body]
61
61
 
62
62
  # return_type
63
- return_type = opts[:return_type] || 'Bounce'
63
+ return_type = opts[:return_type] || 'BouncedEmailDto'
64
64
 
65
65
  # auth_names
66
66
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -154,7 +154,7 @@ module MailSlurpClient
154
154
  # Bounced emails are email you have sent that were rejected by a recipient
155
155
  # @param id [String] ID of the bounced recipient
156
156
  # @param [Hash] opts the optional parameters
157
- # @return [BounceRecipient]
157
+ # @return [BouncedRecipientDto]
158
158
  def get_bounced_recipient(id, opts = {})
159
159
  data, _status_code, _headers = get_bounced_recipient_with_http_info(id, opts)
160
160
  data
@@ -164,7 +164,7 @@ module MailSlurpClient
164
164
  # Bounced emails are email you have sent that were rejected by a recipient
165
165
  # @param id [String] ID of the bounced recipient
166
166
  # @param [Hash] opts the optional parameters
167
- # @return [Array<(BounceRecipient, Integer, Hash)>] BounceRecipient data, response status code and response headers
167
+ # @return [Array<(BouncedRecipientDto, Integer, Hash)>] BouncedRecipientDto data, response status code and response headers
168
168
  def get_bounced_recipient_with_http_info(id, opts = {})
169
169
  if @api_client.config.debugging
170
170
  @api_client.config.logger.debug 'Calling API: BounceControllerApi.get_bounced_recipient ...'
@@ -191,7 +191,7 @@ module MailSlurpClient
191
191
  post_body = opts[:body]
192
192
 
193
193
  # return_type
194
- return_type = opts[:return_type] || 'BounceRecipient'
194
+ return_type = opts[:return_type] || 'BouncedRecipientDto'
195
195
 
196
196
  # auth_names
197
197
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -13,7 +13,8 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
- class Bounce
16
+ # Bounced email
17
+ class BouncedEmailDto
17
18
  attr_accessor :bounce_mta
18
19
 
19
20
  attr_accessor :bounce_recipients
@@ -32,8 +33,6 @@ module MailSlurpClient
32
33
 
33
34
  attr_accessor :sent_to_recipients
34
35
 
35
- attr_accessor :updated_at
36
-
37
36
  attr_accessor :user_id
38
37
 
39
38
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -48,7 +47,6 @@ module MailSlurpClient
48
47
  :'notification_type' => :'notificationType',
49
48
  :'sender' => :'sender',
50
49
  :'sent_to_recipients' => :'sentToRecipients',
51
- :'updated_at' => :'updatedAt',
52
50
  :'user_id' => :'userId'
53
51
  }
54
52
  end
@@ -65,7 +63,6 @@ module MailSlurpClient
65
63
  :'notification_type' => :'String',
66
64
  :'sender' => :'String',
67
65
  :'sent_to_recipients' => :'Array<String>',
68
- :'updated_at' => :'DateTime',
69
66
  :'user_id' => :'String'
70
67
  }
71
68
  end
@@ -80,13 +77,13 @@ module MailSlurpClient
80
77
  # @param [Hash] attributes Model attributes in the form of hash
81
78
  def initialize(attributes = {})
82
79
  if (!attributes.is_a?(Hash))
83
- fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::Bounce` initialize method"
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::BouncedEmailDto` initialize method"
84
81
  end
85
82
 
86
83
  # check to see if the attribute exists and convert string to symbol for hash key
87
84
  attributes = attributes.each_with_object({}) { |(k, v), h|
88
85
  if (!self.class.attribute_map.key?(k.to_sym))
89
- fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::Bounce`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
86
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::BouncedEmailDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
90
87
  end
91
88
  h[k.to_sym] = v
92
89
  }
@@ -131,10 +128,6 @@ module MailSlurpClient
131
128
  end
132
129
  end
133
130
 
134
- if attributes.key?(:'updated_at')
135
- self.updated_at = attributes[:'updated_at']
136
- end
137
-
138
131
  if attributes.key?(:'user_id')
139
132
  self.user_id = attributes[:'user_id']
140
133
  end
@@ -156,10 +149,6 @@ module MailSlurpClient
156
149
  invalid_properties.push('invalid value for "sender", sender cannot be nil.')
157
150
  end
158
151
 
159
- if @updated_at.nil?
160
- invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
161
- end
162
-
163
152
  if @user_id.nil?
164
153
  invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
165
154
  end
@@ -173,7 +162,6 @@ module MailSlurpClient
173
162
  return false if @created_at.nil?
174
163
  return false if @notification_type.nil?
175
164
  return false if @sender.nil?
176
- return false if @updated_at.nil?
177
165
  return false if @user_id.nil?
178
166
  true
179
167
  end
@@ -192,7 +180,6 @@ module MailSlurpClient
192
180
  notification_type == o.notification_type &&
193
181
  sender == o.sender &&
194
182
  sent_to_recipients == o.sent_to_recipients &&
195
- updated_at == o.updated_at &&
196
183
  user_id == o.user_id
197
184
  end
198
185
 
@@ -205,7 +192,7 @@ module MailSlurpClient
205
192
  # Calculates hash code according to all attributes.
206
193
  # @return [Integer] Hash code
207
194
  def hash
208
- [bounce_mta, bounce_recipients, bounce_sub_type, bounce_type, created_at, id, notification_type, sender, sent_to_recipients, updated_at, user_id].hash
195
+ [bounce_mta, bounce_recipients, bounce_sub_type, bounce_type, created_at, id, notification_type, sender, sent_to_recipients, user_id].hash
209
196
  end
210
197
 
211
198
  # Builds the object from hash
@@ -0,0 +1,249 @@
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
+ # Bounced recipient
17
+ class BouncedRecipientDto
18
+ attr_accessor :created_at
19
+
20
+ attr_accessor :id
21
+
22
+ attr_accessor :recipient
23
+
24
+ attr_accessor :user_id
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'created_at' => :'createdAt',
30
+ :'id' => :'id',
31
+ :'recipient' => :'recipient',
32
+ :'user_id' => :'userId'
33
+ }
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.openapi_types
38
+ {
39
+ :'created_at' => :'DateTime',
40
+ :'id' => :'String',
41
+ :'recipient' => :'String',
42
+ :'user_id' => :'String'
43
+ }
44
+ end
45
+
46
+ # List of attributes with nullable: true
47
+ def self.openapi_nullable
48
+ Set.new([
49
+ ])
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ if (!attributes.is_a?(Hash))
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::BouncedRecipientDto` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::BouncedRecipientDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'created_at')
68
+ self.created_at = attributes[:'created_at']
69
+ end
70
+
71
+ if attributes.key?(:'id')
72
+ self.id = attributes[:'id']
73
+ end
74
+
75
+ if attributes.key?(:'recipient')
76
+ self.recipient = attributes[:'recipient']
77
+ end
78
+
79
+ if attributes.key?(:'user_id')
80
+ self.user_id = attributes[:'user_id']
81
+ end
82
+ end
83
+
84
+ # Show invalid properties with the reasons. Usually used together with valid?
85
+ # @return Array for valid properties with the reasons
86
+ def list_invalid_properties
87
+ invalid_properties = Array.new
88
+ if @created_at.nil?
89
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
90
+ end
91
+
92
+ if @recipient.nil?
93
+ invalid_properties.push('invalid value for "recipient", recipient cannot be nil.')
94
+ end
95
+
96
+ if @user_id.nil?
97
+ invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
98
+ end
99
+
100
+ invalid_properties
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ def valid?
106
+ return false if @created_at.nil?
107
+ return false if @recipient.nil?
108
+ return false if @user_id.nil?
109
+ true
110
+ end
111
+
112
+ # Checks equality by comparing each attribute.
113
+ # @param [Object] Object to be compared
114
+ def ==(o)
115
+ return true if self.equal?(o)
116
+ self.class == o.class &&
117
+ created_at == o.created_at &&
118
+ id == o.id &&
119
+ recipient == o.recipient &&
120
+ user_id == o.user_id
121
+ end
122
+
123
+ # @see the `==` method
124
+ # @param [Object] Object to be compared
125
+ def eql?(o)
126
+ self == o
127
+ end
128
+
129
+ # Calculates hash code according to all attributes.
130
+ # @return [Integer] Hash code
131
+ def hash
132
+ [created_at, id, recipient, user_id].hash
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def self.build_from_hash(attributes)
139
+ new.build_from_hash(attributes)
140
+ end
141
+
142
+ # Builds the object from hash
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ # @return [Object] Returns the model itself
145
+ def build_from_hash(attributes)
146
+ return nil unless attributes.is_a?(Hash)
147
+ self.class.openapi_types.each_pair do |key, type|
148
+ if type =~ /\AArray<(.*)>/i
149
+ # check to ensure the input is an array given that the attribute
150
+ # is documented as an array but the input is not
151
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
152
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
153
+ end
154
+ elsif !attributes[self.class.attribute_map[key]].nil?
155
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
156
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
157
+ end
158
+
159
+ self
160
+ end
161
+
162
+ # Deserializes the data based on type
163
+ # @param string type Data type
164
+ # @param string value Value to be deserialized
165
+ # @return [Object] Deserialized data
166
+ def _deserialize(type, value)
167
+ case type.to_sym
168
+ when :DateTime
169
+ DateTime.parse(value)
170
+ when :Date
171
+ Date.parse(value)
172
+ when :String
173
+ value.to_s
174
+ when :Integer
175
+ value.to_i
176
+ when :Float
177
+ value.to_f
178
+ when :Boolean
179
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
180
+ true
181
+ else
182
+ false
183
+ end
184
+ when :Object
185
+ # generic object (usually a Hash), return directly
186
+ value
187
+ when /\AArray<(?<inner_type>.+)>\z/
188
+ inner_type = Regexp.last_match[:inner_type]
189
+ value.map { |v| _deserialize(inner_type, v) }
190
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
191
+ k_type = Regexp.last_match[:k_type]
192
+ v_type = Regexp.last_match[:v_type]
193
+ {}.tap do |hash|
194
+ value.each do |k, v|
195
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
196
+ end
197
+ end
198
+ else # model
199
+ MailSlurpClient.const_get(type).build_from_hash(value)
200
+ end
201
+ end
202
+
203
+ # Returns the string representation of the object
204
+ # @return [String] String presentation of the object
205
+ def to_s
206
+ to_hash.to_s
207
+ end
208
+
209
+ # to_body is an alias to to_hash (backward compatibility)
210
+ # @return [Hash] Returns the object in the form of hash
211
+ def to_body
212
+ to_hash
213
+ end
214
+
215
+ # Returns the object in the form of hash
216
+ # @return [Hash] Returns the object in the form of hash
217
+ def to_hash
218
+ hash = {}
219
+ self.class.attribute_map.each_pair do |attr, param|
220
+ value = self.send(attr)
221
+ if value.nil?
222
+ is_nullable = self.class.openapi_nullable.include?(attr)
223
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
224
+ end
225
+
226
+ hash[param] = _to_hash(value)
227
+ end
228
+ hash
229
+ end
230
+
231
+ # Outputs non-array value in the form of hash
232
+ # For object, use to_hash. Otherwise, just return the value
233
+ # @param [Object] value Any valid value
234
+ # @return [Hash] Returns the value in the form of hash
235
+ def _to_hash(value)
236
+ if value.is_a?(Array)
237
+ value.compact.map { |v| _to_hash(v) }
238
+ elsif value.is_a?(Hash)
239
+ {}.tap do |hash|
240
+ value.each { |k, v| hash[k] = _to_hash(v) }
241
+ end
242
+ elsif value.respond_to? :to_hash
243
+ value.to_hash
244
+ else
245
+ value
246
+ end
247
+ end
248
+ end
249
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.3.1
11
11
  =end
12
12
 
13
13
  module MailSlurpClient
14
- VERSION = '12.8.1'
14
+ VERSION = '12.8.2'
15
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailslurp_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.8.1
4
+ version: 12.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - mailslurp
@@ -54,9 +54,10 @@ files:
54
54
  - lib/mailslurp_client/models/attachment_meta_data.rb
55
55
  - lib/mailslurp_client/models/attachment_projection.rb
56
56
  - lib/mailslurp_client/models/basic_auth_options.rb
57
- - lib/mailslurp_client/models/bounce.rb
58
57
  - lib/mailslurp_client/models/bounce_projection.rb
59
58
  - lib/mailslurp_client/models/bounce_recipient.rb
59
+ - lib/mailslurp_client/models/bounced_email_dto.rb
60
+ - lib/mailslurp_client/models/bounced_recipient_dto.rb
60
61
  - lib/mailslurp_client/models/bulk_send_email_options.rb
61
62
  - lib/mailslurp_client/models/condition_option.rb
62
63
  - lib/mailslurp_client/models/contact_dto.rb