mailslurp_client 12.6.4 → 12.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,225 @@
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 TestNewInboxForwarderOptions
17
+ attr_accessor :inbox_forwarder_test_options
18
+
19
+ attr_accessor :create_inbox_forwarder_options
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'inbox_forwarder_test_options' => :'inboxForwarderTestOptions',
25
+ :'create_inbox_forwarder_options' => :'createInboxForwarderOptions'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.openapi_types
31
+ {
32
+ :'inbox_forwarder_test_options' => :'InboxForwarderTestOptions',
33
+ :'create_inbox_forwarder_options' => :'CreateInboxForwarderOptions'
34
+ }
35
+ end
36
+
37
+ # List of attributes with nullable: true
38
+ def self.openapi_nullable
39
+ Set.new([
40
+ ])
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ if (!attributes.is_a?(Hash))
47
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::TestNewInboxForwarderOptions` initialize method"
48
+ end
49
+
50
+ # check to see if the attribute exists and convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h|
52
+ if (!self.class.attribute_map.key?(k.to_sym))
53
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::TestNewInboxForwarderOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
+ end
55
+ h[k.to_sym] = v
56
+ }
57
+
58
+ if attributes.key?(:'inbox_forwarder_test_options')
59
+ self.inbox_forwarder_test_options = attributes[:'inbox_forwarder_test_options']
60
+ end
61
+
62
+ if attributes.key?(:'create_inbox_forwarder_options')
63
+ self.create_inbox_forwarder_options = attributes[:'create_inbox_forwarder_options']
64
+ end
65
+ end
66
+
67
+ # Show invalid properties with the reasons. Usually used together with valid?
68
+ # @return Array for valid properties with the reasons
69
+ def list_invalid_properties
70
+ invalid_properties = Array.new
71
+ if @inbox_forwarder_test_options.nil?
72
+ invalid_properties.push('invalid value for "inbox_forwarder_test_options", inbox_forwarder_test_options cannot be nil.')
73
+ end
74
+
75
+ if @create_inbox_forwarder_options.nil?
76
+ invalid_properties.push('invalid value for "create_inbox_forwarder_options", create_inbox_forwarder_options cannot be nil.')
77
+ end
78
+
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ return false if @inbox_forwarder_test_options.nil?
86
+ return false if @create_inbox_forwarder_options.nil?
87
+ true
88
+ end
89
+
90
+ # Checks equality by comparing each attribute.
91
+ # @param [Object] Object to be compared
92
+ def ==(o)
93
+ return true if self.equal?(o)
94
+ self.class == o.class &&
95
+ inbox_forwarder_test_options == o.inbox_forwarder_test_options &&
96
+ create_inbox_forwarder_options == o.create_inbox_forwarder_options
97
+ end
98
+
99
+ # @see the `==` method
100
+ # @param [Object] Object to be compared
101
+ def eql?(o)
102
+ self == o
103
+ end
104
+
105
+ # Calculates hash code according to all attributes.
106
+ # @return [Integer] Hash code
107
+ def hash
108
+ [inbox_forwarder_test_options, create_inbox_forwarder_options].hash
109
+ end
110
+
111
+ # Builds the object from hash
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ # @return [Object] Returns the model itself
114
+ def self.build_from_hash(attributes)
115
+ new.build_from_hash(attributes)
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def build_from_hash(attributes)
122
+ return nil unless attributes.is_a?(Hash)
123
+ self.class.openapi_types.each_pair do |key, type|
124
+ if type =~ /\AArray<(.*)>/i
125
+ # check to ensure the input is an array given that the attribute
126
+ # is documented as an array but the input is not
127
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
128
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
129
+ end
130
+ elsif !attributes[self.class.attribute_map[key]].nil?
131
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
132
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
133
+ end
134
+
135
+ self
136
+ end
137
+
138
+ # Deserializes the data based on type
139
+ # @param string type Data type
140
+ # @param string value Value to be deserialized
141
+ # @return [Object] Deserialized data
142
+ def _deserialize(type, value)
143
+ case type.to_sym
144
+ when :DateTime
145
+ DateTime.parse(value)
146
+ when :Date
147
+ Date.parse(value)
148
+ when :String
149
+ value.to_s
150
+ when :Integer
151
+ value.to_i
152
+ when :Float
153
+ value.to_f
154
+ when :Boolean
155
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
156
+ true
157
+ else
158
+ false
159
+ end
160
+ when :Object
161
+ # generic object (usually a Hash), return directly
162
+ value
163
+ when /\AArray<(?<inner_type>.+)>\z/
164
+ inner_type = Regexp.last_match[:inner_type]
165
+ value.map { |v| _deserialize(inner_type, v) }
166
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
167
+ k_type = Regexp.last_match[:k_type]
168
+ v_type = Regexp.last_match[:v_type]
169
+ {}.tap do |hash|
170
+ value.each do |k, v|
171
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
172
+ end
173
+ end
174
+ else # model
175
+ MailSlurpClient.const_get(type).build_from_hash(value)
176
+ end
177
+ end
178
+
179
+ # Returns the string representation of the object
180
+ # @return [String] String presentation of the object
181
+ def to_s
182
+ to_hash.to_s
183
+ end
184
+
185
+ # to_body is an alias to to_hash (backward compatibility)
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_body
188
+ to_hash
189
+ end
190
+
191
+ # Returns the object in the form of hash
192
+ # @return [Hash] Returns the object in the form of hash
193
+ def to_hash
194
+ hash = {}
195
+ self.class.attribute_map.each_pair do |attr, param|
196
+ value = self.send(attr)
197
+ if value.nil?
198
+ is_nullable = self.class.openapi_nullable.include?(attr)
199
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
200
+ end
201
+
202
+ hash[param] = _to_hash(value)
203
+ end
204
+ hash
205
+ end
206
+
207
+ # Outputs non-array value in the form of hash
208
+ # For object, use to_hash. Otherwise, just return the value
209
+ # @param [Object] value Any valid value
210
+ # @return [Hash] Returns the value in the form of hash
211
+ def _to_hash(value)
212
+ if value.is_a?(Array)
213
+ value.compact.map { |v| _to_hash(v) }
214
+ elsif value.is_a?(Hash)
215
+ {}.tap do |hash|
216
+ value.each { |k, v| hash[k] = _to_hash(v) }
217
+ end
218
+ elsif value.respond_to? :to_hash
219
+ value.to_hash
220
+ else
221
+ value
222
+ end
223
+ end
224
+ end
225
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.3.1
11
11
  =end
12
12
 
13
13
  module MailSlurpClient
14
- VERSION = '12.6.4'
14
+ VERSION = '12.7.0'
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: 12.6.4
4
+ version: 12.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - mailslurp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-05 00:00:00.000000000 Z
11
+ date: 2021-07-07 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.
@@ -35,6 +35,7 @@ files:
35
35
  - lib/mailslurp_client/api/form_controller_api.rb
36
36
  - lib/mailslurp_client/api/group_controller_api.rb
37
37
  - lib/mailslurp_client/api/inbox_controller_api.rb
38
+ - lib/mailslurp_client/api/inbox_forwarder_controller_api.rb
38
39
  - lib/mailslurp_client/api/inbox_ruleset_controller_api.rb
39
40
  - lib/mailslurp_client/api/mail_server_controller_api.rb
40
41
  - lib/mailslurp_client/api/missed_email_controller_api.rb
@@ -62,6 +63,7 @@ files:
62
63
  - lib/mailslurp_client/models/create_domain_options.rb
63
64
  - lib/mailslurp_client/models/create_group_options.rb
64
65
  - lib/mailslurp_client/models/create_inbox_dto.rb
66
+ - lib/mailslurp_client/models/create_inbox_forwarder_options.rb
65
67
  - lib/mailslurp_client/models/create_inbox_ruleset_options.rb
66
68
  - lib/mailslurp_client/models/create_template_options.rb
67
69
  - lib/mailslurp_client/models/create_tracking_pixel_options.rb
@@ -93,6 +95,9 @@ files:
93
95
  - lib/mailslurp_client/models/group_projection.rb
94
96
  - lib/mailslurp_client/models/html_validation_result.rb
95
97
  - lib/mailslurp_client/models/inbox.rb
98
+ - lib/mailslurp_client/models/inbox_forwarder_dto.rb
99
+ - lib/mailslurp_client/models/inbox_forwarder_test_options.rb
100
+ - lib/mailslurp_client/models/inbox_forwarder_test_result.rb
96
101
  - lib/mailslurp_client/models/inbox_projection.rb
97
102
  - lib/mailslurp_client/models/inbox_ruleset_dto.rb
98
103
  - lib/mailslurp_client/models/inbox_ruleset_test_options.rb
@@ -112,6 +117,7 @@ files:
112
117
  - lib/mailslurp_client/models/page_email_projection.rb
113
118
  - lib/mailslurp_client/models/page_expired_inbox_record_projection.rb
114
119
  - lib/mailslurp_client/models/page_group_projection.rb
120
+ - lib/mailslurp_client/models/page_inbox_forwarder_dto.rb
115
121
  - lib/mailslurp_client/models/page_inbox_projection.rb
116
122
  - lib/mailslurp_client/models/page_inbox_ruleset_dto.rb
117
123
  - lib/mailslurp_client/models/page_missed_email_projection.rb
@@ -135,6 +141,7 @@ files:
135
141
  - lib/mailslurp_client/models/template_dto.rb
136
142
  - lib/mailslurp_client/models/template_projection.rb
137
143
  - lib/mailslurp_client/models/template_variable.rb
144
+ - lib/mailslurp_client/models/test_new_inbox_forwarder_options.rb
138
145
  - lib/mailslurp_client/models/test_new_inbox_ruleset_options.rb
139
146
  - lib/mailslurp_client/models/thread_projection.rb
140
147
  - lib/mailslurp_client/models/tracking_pixel_dto.rb