mailslurp_client 16.2.0 → 16.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/ai_controller_api.rb +193 -79
  3. data/lib/mailslurp_client/api/attachment_controller_api.rb +6 -3
  4. data/lib/mailslurp_client/api/email_controller_api.rb +3 -0
  5. data/lib/mailslurp_client/api/form_controller_api.rb +8 -9
  6. data/lib/mailslurp_client/api/inbox_controller_api.rb +28 -2
  7. data/lib/mailslurp_client/api/mfa_controller_api.rb +88 -13
  8. data/lib/mailslurp_client/api/sms_controller_api.rb +3 -0
  9. data/lib/mailslurp_client/api/webhook_controller_api.rb +63 -9
  10. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +2 -2
  11. data/lib/mailslurp_client/models/{ai_tranform_create_options.rb → ai_transform_create_options.rb} +31 -7
  12. data/lib/mailslurp_client/models/ai_transform_dto.rb +1 -0
  13. data/lib/mailslurp_client/models/ai_transform_mapping_dto.rb +18 -9
  14. data/lib/mailslurp_client/models/ai_transform_mapping_projection.rb +15 -6
  15. data/lib/mailslurp_client/models/ai_transform_projection.rb +16 -1
  16. data/lib/mailslurp_client/models/ai_transform_result_dto.rb +5 -1
  17. data/lib/mailslurp_client/models/{ai_transform_result_projection.rb → ai_transform_result_projection_dto.rb} +56 -53
  18. data/lib/mailslurp_client/models/alias_thread_projection.rb +11 -11
  19. data/lib/mailslurp_client/models/bounce_projection.rb +11 -11
  20. data/lib/mailslurp_client/models/conditional_structured_content_result.rb +221 -0
  21. data/lib/mailslurp_client/models/create_ai_transformer_mapping_options.rb +5 -10
  22. data/lib/mailslurp_client/models/create_domain_options.rb +19 -0
  23. data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +19 -0
  24. data/lib/mailslurp_client/models/create_inbox_replier_options.rb +19 -0
  25. data/lib/mailslurp_client/models/create_inbox_ruleset_options.rb +2 -2
  26. data/lib/mailslurp_client/models/create_totp_device_base32_secret_key_options.rb +306 -0
  27. data/lib/mailslurp_client/models/create_totp_device_custom_options.rb +306 -0
  28. data/lib/mailslurp_client/models/create_totp_device_otp_auth_url_options.rb +35 -0
  29. data/lib/mailslurp_client/models/create_webhook_options.rb +2 -2
  30. data/lib/mailslurp_client/models/describe_domain_options.rb +19 -0
  31. data/lib/mailslurp_client/models/dns_lookup_options.rb +19 -0
  32. data/lib/mailslurp_client/models/email.rb +13 -13
  33. data/lib/mailslurp_client/models/email_projection.rb +18 -18
  34. data/lib/mailslurp_client/models/email_thread_projection.rb +17 -17
  35. data/lib/mailslurp_client/models/entity_automation_item_projection.rb +10 -10
  36. data/lib/mailslurp_client/models/expiration_defaults.rb +1 -0
  37. data/lib/mailslurp_client/models/fake_email_dto.rb +1 -0
  38. data/lib/mailslurp_client/models/generate_structured_content_attachment_options.rb +1 -0
  39. data/lib/mailslurp_client/models/generate_structured_content_email_options.rb +1 -0
  40. data/lib/mailslurp_client/models/generate_structured_content_sms_options.rb +1 -0
  41. data/lib/mailslurp_client/models/inbox_exists_dto.rb +26 -4
  42. data/lib/mailslurp_client/models/inbox_ruleset_dto.rb +2 -2
  43. data/lib/mailslurp_client/models/inline_object.rb +58 -12
  44. data/lib/mailslurp_client/models/inline_object1.rb +211 -0
  45. data/lib/mailslurp_client/models/invoke_transformer_options.rb +329 -0
  46. data/lib/mailslurp_client/models/match_option.rb +19 -0
  47. data/lib/mailslurp_client/models/missed_email_dto.rb +1 -0
  48. data/lib/mailslurp_client/models/missed_email_projection.rb +11 -11
  49. data/lib/mailslurp_client/models/page_ai_transform_result_projection.rb +1 -1
  50. data/lib/mailslurp_client/models/pageable_object.rb +10 -10
  51. data/lib/mailslurp_client/models/phone_message_thread_item_projection.rb +19 -19
  52. data/lib/mailslurp_client/models/phone_message_thread_projection.rb +15 -25
  53. data/lib/mailslurp_client/models/sent_email_projection.rb +38 -53
  54. data/lib/mailslurp_client/models/sms_match_option.rb +19 -0
  55. data/lib/mailslurp_client/models/sms_preview.rb +4 -0
  56. data/lib/mailslurp_client/models/structured_output_schema.rb +12 -9
  57. data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +10 -10
  58. data/lib/mailslurp_client/models/update_inbox_replier_options.rb +19 -0
  59. data/lib/mailslurp_client/models/upload_attachment_options.rb +19 -0
  60. data/lib/mailslurp_client/models/webhook_bounce_payload.rb +2 -2
  61. data/lib/mailslurp_client/models/webhook_bounce_recipient_payload.rb +2 -2
  62. data/lib/mailslurp_client/models/webhook_delivery_status_payload.rb +2 -2
  63. data/lib/mailslurp_client/models/webhook_dto.rb +2 -2
  64. data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +2 -2
  65. data/lib/mailslurp_client/models/webhook_email_read_payload.rb +2 -2
  66. data/lib/mailslurp_client/models/webhook_new_ai_transform_result_payload.rb +389 -0
  67. data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +2 -2
  68. data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +2 -2
  69. data/lib/mailslurp_client/models/webhook_new_email_payload.rb +2 -2
  70. data/lib/mailslurp_client/models/webhook_new_sms_payload.rb +2 -2
  71. data/lib/mailslurp_client/models/webhook_projection.rb +2 -2
  72. data/lib/mailslurp_client/models/webhook_result_dto.rb +2 -2
  73. data/lib/mailslurp_client/version.rb +1 -1
  74. data/lib/mailslurp_client.rb +8 -2
  75. metadata +10 -4
@@ -0,0 +1,329 @@
1
+ =begin
2
+ #MailSlurp API
3
+
4
+ #MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. 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://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository
5
+
6
+ The version of the OpenAPI document: 6.5.2
7
+ Contact: contact@mailslurp.dev
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 InvokeTransformerOptions
17
+ attr_accessor :ai_transform_id
18
+
19
+ attr_accessor :ai_transform_mapping_id
20
+
21
+ attr_accessor :raw_input
22
+
23
+ attr_accessor :entity_id
24
+
25
+ attr_accessor :entity_type
26
+
27
+ attr_accessor :raw_conditions
28
+
29
+ attr_accessor :raw_instructions
30
+
31
+ attr_accessor :raw_output_schema
32
+
33
+ attr_accessor :content_selector
34
+
35
+ class EnumAttributeValidator
36
+ attr_reader :datatype
37
+ attr_reader :allowable_values
38
+
39
+ def initialize(datatype, allowable_values)
40
+ @allowable_values = allowable_values.map do |value|
41
+ case datatype.to_s
42
+ when /Integer/i
43
+ value.to_i
44
+ when /Float/i
45
+ value.to_f
46
+ else
47
+ value
48
+ end
49
+ end
50
+ end
51
+
52
+ def valid?(value)
53
+ !value || allowable_values.include?(value)
54
+ end
55
+ end
56
+
57
+ # Attribute mapping from ruby-style variable name to JSON key.
58
+ def self.attribute_map
59
+ {
60
+ :'ai_transform_id' => :'aiTransformId',
61
+ :'ai_transform_mapping_id' => :'aiTransformMappingId',
62
+ :'raw_input' => :'rawInput',
63
+ :'entity_id' => :'entityId',
64
+ :'entity_type' => :'entityType',
65
+ :'raw_conditions' => :'rawConditions',
66
+ :'raw_instructions' => :'rawInstructions',
67
+ :'raw_output_schema' => :'rawOutputSchema',
68
+ :'content_selector' => :'contentSelector'
69
+ }
70
+ end
71
+
72
+ # Attribute type mapping.
73
+ def self.openapi_types
74
+ {
75
+ :'ai_transform_id' => :'String',
76
+ :'ai_transform_mapping_id' => :'String',
77
+ :'raw_input' => :'String',
78
+ :'entity_id' => :'String',
79
+ :'entity_type' => :'String',
80
+ :'raw_conditions' => :'Array<String>',
81
+ :'raw_instructions' => :'Array<String>',
82
+ :'raw_output_schema' => :'StructuredOutputSchema',
83
+ :'content_selector' => :'String'
84
+ }
85
+ end
86
+
87
+ # List of attributes with nullable: true
88
+ def self.openapi_nullable
89
+ Set.new([
90
+ :'raw_output_schema',
91
+ ])
92
+ end
93
+
94
+ # Initializes the object
95
+ # @param [Hash] attributes Model attributes in the form of hash
96
+ def initialize(attributes = {})
97
+ if (!attributes.is_a?(Hash))
98
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::InvokeTransformerOptions` initialize method"
99
+ end
100
+
101
+ # check to see if the attribute exists and convert string to symbol for hash key
102
+ attributes = attributes.each_with_object({}) { |(k, v), h|
103
+ if (!self.class.attribute_map.key?(k.to_sym))
104
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::InvokeTransformerOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
105
+ end
106
+ h[k.to_sym] = v
107
+ }
108
+
109
+ if attributes.key?(:'ai_transform_id')
110
+ self.ai_transform_id = attributes[:'ai_transform_id']
111
+ end
112
+
113
+ if attributes.key?(:'ai_transform_mapping_id')
114
+ self.ai_transform_mapping_id = attributes[:'ai_transform_mapping_id']
115
+ end
116
+
117
+ if attributes.key?(:'raw_input')
118
+ self.raw_input = attributes[:'raw_input']
119
+ end
120
+
121
+ if attributes.key?(:'entity_id')
122
+ self.entity_id = attributes[:'entity_id']
123
+ end
124
+
125
+ if attributes.key?(:'entity_type')
126
+ self.entity_type = attributes[:'entity_type']
127
+ end
128
+
129
+ if attributes.key?(:'raw_conditions')
130
+ if (value = attributes[:'raw_conditions']).is_a?(Array)
131
+ self.raw_conditions = value
132
+ end
133
+ end
134
+
135
+ if attributes.key?(:'raw_instructions')
136
+ if (value = attributes[:'raw_instructions']).is_a?(Array)
137
+ self.raw_instructions = value
138
+ end
139
+ end
140
+
141
+ if attributes.key?(:'raw_output_schema')
142
+ self.raw_output_schema = attributes[:'raw_output_schema']
143
+ end
144
+
145
+ if attributes.key?(:'content_selector')
146
+ self.content_selector = attributes[:'content_selector']
147
+ end
148
+ end
149
+
150
+ # Show invalid properties with the reasons. Usually used together with valid?
151
+ # @return Array for valid properties with the reasons
152
+ def list_invalid_properties
153
+ invalid_properties = Array.new
154
+ invalid_properties
155
+ end
156
+
157
+ # Check to see if the all the properties in the model are valid
158
+ # @return true if the model is valid
159
+ def valid?
160
+ entity_type_validator = EnumAttributeValidator.new('String', ["EMAIL", "SMS", "ATTACHMENT"])
161
+ return false unless entity_type_validator.valid?(@entity_type)
162
+ content_selector_validator = EnumAttributeValidator.new('String', ["RAW", "BODY", "BODY_ATTACHMENTS"])
163
+ return false unless content_selector_validator.valid?(@content_selector)
164
+ true
165
+ end
166
+
167
+ # Custom attribute writer method checking allowed values (enum).
168
+ # @param [Object] entity_type Object to be assigned
169
+ def entity_type=(entity_type)
170
+ validator = EnumAttributeValidator.new('String', ["EMAIL", "SMS", "ATTACHMENT"])
171
+ unless validator.valid?(entity_type)
172
+ fail ArgumentError, "invalid value for \"entity_type\", must be one of #{validator.allowable_values}."
173
+ end
174
+ @entity_type = entity_type
175
+ end
176
+
177
+ # Custom attribute writer method checking allowed values (enum).
178
+ # @param [Object] content_selector Object to be assigned
179
+ def content_selector=(content_selector)
180
+ validator = EnumAttributeValidator.new('String', ["RAW", "BODY", "BODY_ATTACHMENTS"])
181
+ unless validator.valid?(content_selector)
182
+ fail ArgumentError, "invalid value for \"content_selector\", must be one of #{validator.allowable_values}."
183
+ end
184
+ @content_selector = content_selector
185
+ end
186
+
187
+ # Checks equality by comparing each attribute.
188
+ # @param [Object] Object to be compared
189
+ def ==(o)
190
+ return true if self.equal?(o)
191
+ self.class == o.class &&
192
+ ai_transform_id == o.ai_transform_id &&
193
+ ai_transform_mapping_id == o.ai_transform_mapping_id &&
194
+ raw_input == o.raw_input &&
195
+ entity_id == o.entity_id &&
196
+ entity_type == o.entity_type &&
197
+ raw_conditions == o.raw_conditions &&
198
+ raw_instructions == o.raw_instructions &&
199
+ raw_output_schema == o.raw_output_schema &&
200
+ content_selector == o.content_selector
201
+ end
202
+
203
+ # @see the `==` method
204
+ # @param [Object] Object to be compared
205
+ def eql?(o)
206
+ self == o
207
+ end
208
+
209
+ # Calculates hash code according to all attributes.
210
+ # @return [Integer] Hash code
211
+ def hash
212
+ [ai_transform_id, ai_transform_mapping_id, raw_input, entity_id, entity_type, raw_conditions, raw_instructions, raw_output_schema, content_selector].hash
213
+ end
214
+
215
+ # Builds the object from hash
216
+ # @param [Hash] attributes Model attributes in the form of hash
217
+ # @return [Object] Returns the model itself
218
+ def self.build_from_hash(attributes)
219
+ new.build_from_hash(attributes)
220
+ end
221
+
222
+ # Builds the object from hash
223
+ # @param [Hash] attributes Model attributes in the form of hash
224
+ # @return [Object] Returns the model itself
225
+ def build_from_hash(attributes)
226
+ return nil unless attributes.is_a?(Hash)
227
+ self.class.openapi_types.each_pair do |key, type|
228
+ if type =~ /\AArray<(.*)>/i
229
+ # check to ensure the input is an array given that the attribute
230
+ # is documented as an array but the input is not
231
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
232
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
233
+ end
234
+ elsif !attributes[self.class.attribute_map[key]].nil?
235
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
236
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
237
+ end
238
+
239
+ self
240
+ end
241
+
242
+ # Deserializes the data based on type
243
+ # @param string type Data type
244
+ # @param string value Value to be deserialized
245
+ # @return [Object] Deserialized data
246
+ def _deserialize(type, value)
247
+ case type.to_sym
248
+ when :DateTime
249
+ DateTime.parse(value)
250
+ when :Date
251
+ Date.parse(value)
252
+ when :String
253
+ value.to_s
254
+ when :Integer
255
+ value.to_i
256
+ when :Float
257
+ value.to_f
258
+ when :Boolean
259
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
260
+ true
261
+ else
262
+ false
263
+ end
264
+ when :Object
265
+ # generic object (usually a Hash), return directly
266
+ value
267
+ when /\AArray<(?<inner_type>.+)>\z/
268
+ inner_type = Regexp.last_match[:inner_type]
269
+ value.map { |v| _deserialize(inner_type, v) }
270
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
271
+ k_type = Regexp.last_match[:k_type]
272
+ v_type = Regexp.last_match[:v_type]
273
+ {}.tap do |hash|
274
+ value.each do |k, v|
275
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
276
+ end
277
+ end
278
+ else # model
279
+ MailSlurpClient.const_get(type).build_from_hash(value)
280
+ end
281
+ end
282
+
283
+ # Returns the string representation of the object
284
+ # @return [String] String presentation of the object
285
+ def to_s
286
+ to_hash.to_s
287
+ end
288
+
289
+ # to_body is an alias to to_hash (backward compatibility)
290
+ # @return [Hash] Returns the object in the form of hash
291
+ def to_body
292
+ to_hash
293
+ end
294
+
295
+ # Returns the object in the form of hash
296
+ # @return [Hash] Returns the object in the form of hash
297
+ def to_hash
298
+ hash = {}
299
+ self.class.attribute_map.each_pair do |attr, param|
300
+ value = self.send(attr)
301
+ if value.nil?
302
+ is_nullable = self.class.openapi_nullable.include?(attr)
303
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
304
+ end
305
+
306
+ hash[param] = _to_hash(value)
307
+ end
308
+ hash
309
+ end
310
+
311
+ # Outputs non-array value in the form of hash
312
+ # For object, use to_hash. Otherwise, just return the value
313
+ # @param [Object] value Any valid value
314
+ # @return [Hash] Returns the value in the form of hash
315
+ def _to_hash(value)
316
+ if value.is_a?(Array)
317
+ value.compact.map { |v| _to_hash(v) }
318
+ elsif value.is_a?(Hash)
319
+ {}.tap do |hash|
320
+ value.each { |k, v| hash[k] = _to_hash(v) }
321
+ end
322
+ elsif value.respond_to? :to_hash
323
+ value.to_hash
324
+ else
325
+ value
326
+ end
327
+ end
328
+ end
329
+ end
@@ -114,6 +114,10 @@ module MailSlurpClient
114
114
  invalid_properties.push('invalid value for "value", value cannot be nil.')
115
115
  end
116
116
 
117
+ if @value.to_s.length < 1
118
+ invalid_properties.push('invalid value for "value", the character length must be great than or equal to 1.')
119
+ end
120
+
117
121
  invalid_properties
118
122
  end
119
123
 
@@ -127,6 +131,7 @@ module MailSlurpClient
127
131
  should_validator = EnumAttributeValidator.new('String', ["MATCH", "CONTAIN", "EQUAL"])
128
132
  return false unless should_validator.valid?(@should)
129
133
  return false if @value.nil?
134
+ return false if @value.to_s.length < 1
130
135
  true
131
136
  end
132
137
 
@@ -150,6 +155,20 @@ module MailSlurpClient
150
155
  @should = should
151
156
  end
152
157
 
158
+ # Custom attribute writer method with validation
159
+ # @param [Object] value Value to be assigned
160
+ def value=(value)
161
+ if value.nil?
162
+ fail ArgumentError, 'value cannot be nil'
163
+ end
164
+
165
+ if value.to_s.length < 1
166
+ fail ArgumentError, 'invalid value for "value", the character length must be great than or equal to 1.'
167
+ end
168
+
169
+ @value = value
170
+ end
171
+
153
172
  # Checks equality by comparing each attribute.
154
173
  # @param [Object] Object to be compared
155
174
  def ==(o)
@@ -27,6 +27,7 @@ module MailSlurpClient
27
27
 
28
28
  attr_accessor :from
29
29
 
30
+ # use raw key and raw bucket
30
31
  attr_accessor :raw_url
31
32
 
32
33
  attr_accessor :raw_key
@@ -15,12 +15,12 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # Missed email data
17
17
  class MissedEmailProjection
18
- attr_accessor :subject
19
-
20
18
  attr_accessor :user_id
21
19
 
22
20
  attr_accessor :created_at
23
21
 
22
+ attr_accessor :subject
23
+
24
24
  attr_accessor :id
25
25
 
26
26
  attr_accessor :from
@@ -28,9 +28,9 @@ module MailSlurpClient
28
28
  # Attribute mapping from ruby-style variable name to JSON key.
29
29
  def self.attribute_map
30
30
  {
31
- :'subject' => :'subject',
32
31
  :'user_id' => :'userId',
33
32
  :'created_at' => :'createdAt',
33
+ :'subject' => :'subject',
34
34
  :'id' => :'id',
35
35
  :'from' => :'from'
36
36
  }
@@ -39,9 +39,9 @@ module MailSlurpClient
39
39
  # Attribute type mapping.
40
40
  def self.openapi_types
41
41
  {
42
- :'subject' => :'String',
43
42
  :'user_id' => :'String',
44
43
  :'created_at' => :'DateTime',
44
+ :'subject' => :'String',
45
45
  :'id' => :'String',
46
46
  :'from' => :'String'
47
47
  }
@@ -50,8 +50,8 @@ module MailSlurpClient
50
50
  # List of attributes with nullable: true
51
51
  def self.openapi_nullable
52
52
  Set.new([
53
- :'subject',
54
53
  :'user_id',
54
+ :'subject',
55
55
  :'from'
56
56
  ])
57
57
  end
@@ -71,10 +71,6 @@ module MailSlurpClient
71
71
  h[k.to_sym] = v
72
72
  }
73
73
 
74
- if attributes.key?(:'subject')
75
- self.subject = attributes[:'subject']
76
- end
77
-
78
74
  if attributes.key?(:'user_id')
79
75
  self.user_id = attributes[:'user_id']
80
76
  end
@@ -83,6 +79,10 @@ module MailSlurpClient
83
79
  self.created_at = attributes[:'created_at']
84
80
  end
85
81
 
82
+ if attributes.key?(:'subject')
83
+ self.subject = attributes[:'subject']
84
+ end
85
+
86
86
  if attributes.key?(:'id')
87
87
  self.id = attributes[:'id']
88
88
  end
@@ -120,9 +120,9 @@ module MailSlurpClient
120
120
  def ==(o)
121
121
  return true if self.equal?(o)
122
122
  self.class == o.class &&
123
- subject == o.subject &&
124
123
  user_id == o.user_id &&
125
124
  created_at == o.created_at &&
125
+ subject == o.subject &&
126
126
  id == o.id &&
127
127
  from == o.from
128
128
  end
@@ -136,7 +136,7 @@ module MailSlurpClient
136
136
  # Calculates hash code according to all attributes.
137
137
  # @return [Integer] Hash code
138
138
  def hash
139
- [subject, user_id, created_at, id, from].hash
139
+ [user_id, created_at, subject, id, from].hash
140
140
  end
141
141
 
142
142
  # Builds the object from hash
@@ -57,7 +57,7 @@ module MailSlurpClient
57
57
  # Attribute type mapping.
58
58
  def self.openapi_types
59
59
  {
60
- :'content' => :'Array<AITransformResultProjection>',
60
+ :'content' => :'Array<AITransformResultProjectionDto>',
61
61
  :'pageable' => :'PageableObject',
62
62
  :'total_elements' => :'Integer',
63
63
  :'total_pages' => :'Integer',
@@ -14,12 +14,12 @@ require 'date'
14
14
 
15
15
  module MailSlurpClient
16
16
  class PageableObject
17
+ attr_accessor :page_size
18
+
17
19
  attr_accessor :paged
18
20
 
19
21
  attr_accessor :page_number
20
22
 
21
- attr_accessor :page_size
22
-
23
23
  attr_accessor :unpaged
24
24
 
25
25
  attr_accessor :offset
@@ -29,9 +29,9 @@ module MailSlurpClient
29
29
  # Attribute mapping from ruby-style variable name to JSON key.
30
30
  def self.attribute_map
31
31
  {
32
+ :'page_size' => :'pageSize',
32
33
  :'paged' => :'paged',
33
34
  :'page_number' => :'pageNumber',
34
- :'page_size' => :'pageSize',
35
35
  :'unpaged' => :'unpaged',
36
36
  :'offset' => :'offset',
37
37
  :'sort' => :'sort'
@@ -41,9 +41,9 @@ module MailSlurpClient
41
41
  # Attribute type mapping.
42
42
  def self.openapi_types
43
43
  {
44
+ :'page_size' => :'Integer',
44
45
  :'paged' => :'Boolean',
45
46
  :'page_number' => :'Integer',
46
- :'page_size' => :'Integer',
47
47
  :'unpaged' => :'Boolean',
48
48
  :'offset' => :'Integer',
49
49
  :'sort' => :'SortObject'
@@ -71,6 +71,10 @@ module MailSlurpClient
71
71
  h[k.to_sym] = v
72
72
  }
73
73
 
74
+ if attributes.key?(:'page_size')
75
+ self.page_size = attributes[:'page_size']
76
+ end
77
+
74
78
  if attributes.key?(:'paged')
75
79
  self.paged = attributes[:'paged']
76
80
  end
@@ -79,10 +83,6 @@ module MailSlurpClient
79
83
  self.page_number = attributes[:'page_number']
80
84
  end
81
85
 
82
- if attributes.key?(:'page_size')
83
- self.page_size = attributes[:'page_size']
84
- end
85
-
86
86
  if attributes.key?(:'unpaged')
87
87
  self.unpaged = attributes[:'unpaged']
88
88
  end
@@ -114,9 +114,9 @@ module MailSlurpClient
114
114
  def ==(o)
115
115
  return true if self.equal?(o)
116
116
  self.class == o.class &&
117
+ page_size == o.page_size &&
117
118
  paged == o.paged &&
118
119
  page_number == o.page_number &&
119
- page_size == o.page_size &&
120
120
  unpaged == o.unpaged &&
121
121
  offset == o.offset &&
122
122
  sort == o.sort
@@ -131,7 +131,7 @@ module MailSlurpClient
131
131
  # Calculates hash code according to all attributes.
132
132
  # @return [Integer] Hash code
133
133
  def hash
134
- [paged, page_number, page_size, unpaged, offset, sort].hash
134
+ [page_size, paged, page_number, unpaged, offset, sort].hash
135
135
  end
136
136
 
137
137
  # Builds the object from hash
@@ -20,11 +20,11 @@ module MailSlurpClient
20
20
 
21
21
  attr_accessor :created
22
22
 
23
- attr_accessor :from_phone_number
23
+ attr_accessor :message_direction
24
24
 
25
25
  attr_accessor :to_phone_number
26
26
 
27
- attr_accessor :message_direction
27
+ attr_accessor :from_phone_number
28
28
 
29
29
  class EnumAttributeValidator
30
30
  attr_reader :datatype
@@ -54,9 +54,9 @@ module MailSlurpClient
54
54
  :'body' => :'body',
55
55
  :'phone_number_id' => :'phoneNumberId',
56
56
  :'created' => :'created',
57
- :'from_phone_number' => :'fromPhoneNumber',
57
+ :'message_direction' => :'messageDirection',
58
58
  :'to_phone_number' => :'toPhoneNumber',
59
- :'message_direction' => :'messageDirection'
59
+ :'from_phone_number' => :'fromPhoneNumber'
60
60
  }
61
61
  end
62
62
 
@@ -66,9 +66,9 @@ module MailSlurpClient
66
66
  :'body' => :'String',
67
67
  :'phone_number_id' => :'String',
68
68
  :'created' => :'DateTime',
69
- :'from_phone_number' => :'String',
69
+ :'message_direction' => :'String',
70
70
  :'to_phone_number' => :'String',
71
- :'message_direction' => :'String'
71
+ :'from_phone_number' => :'String'
72
72
  }
73
73
  end
74
74
 
@@ -105,16 +105,16 @@ module MailSlurpClient
105
105
  self.created = attributes[:'created']
106
106
  end
107
107
 
108
- if attributes.key?(:'from_phone_number')
109
- self.from_phone_number = attributes[:'from_phone_number']
108
+ if attributes.key?(:'message_direction')
109
+ self.message_direction = attributes[:'message_direction']
110
110
  end
111
111
 
112
112
  if attributes.key?(:'to_phone_number')
113
113
  self.to_phone_number = attributes[:'to_phone_number']
114
114
  end
115
115
 
116
- if attributes.key?(:'message_direction')
117
- self.message_direction = attributes[:'message_direction']
116
+ if attributes.key?(:'from_phone_number')
117
+ self.from_phone_number = attributes[:'from_phone_number']
118
118
  end
119
119
  end
120
120
 
@@ -134,16 +134,16 @@ module MailSlurpClient
134
134
  invalid_properties.push('invalid value for "created", created cannot be nil.')
135
135
  end
136
136
 
137
- if @from_phone_number.nil?
138
- invalid_properties.push('invalid value for "from_phone_number", from_phone_number cannot be nil.')
137
+ if @message_direction.nil?
138
+ invalid_properties.push('invalid value for "message_direction", message_direction cannot be nil.')
139
139
  end
140
140
 
141
141
  if @to_phone_number.nil?
142
142
  invalid_properties.push('invalid value for "to_phone_number", to_phone_number cannot be nil.')
143
143
  end
144
144
 
145
- if @message_direction.nil?
146
- invalid_properties.push('invalid value for "message_direction", message_direction cannot be nil.')
145
+ if @from_phone_number.nil?
146
+ invalid_properties.push('invalid value for "from_phone_number", from_phone_number cannot be nil.')
147
147
  end
148
148
 
149
149
  invalid_properties
@@ -155,11 +155,11 @@ module MailSlurpClient
155
155
  return false if @body.nil?
156
156
  return false if @phone_number_id.nil?
157
157
  return false if @created.nil?
158
- return false if @from_phone_number.nil?
159
- return false if @to_phone_number.nil?
160
158
  return false if @message_direction.nil?
161
159
  message_direction_validator = EnumAttributeValidator.new('String', ["OUTBOUND", "INBOUND"])
162
160
  return false unless message_direction_validator.valid?(@message_direction)
161
+ return false if @to_phone_number.nil?
162
+ return false if @from_phone_number.nil?
163
163
  true
164
164
  end
165
165
 
@@ -181,9 +181,9 @@ module MailSlurpClient
181
181
  body == o.body &&
182
182
  phone_number_id == o.phone_number_id &&
183
183
  created == o.created &&
184
- from_phone_number == o.from_phone_number &&
184
+ message_direction == o.message_direction &&
185
185
  to_phone_number == o.to_phone_number &&
186
- message_direction == o.message_direction
186
+ from_phone_number == o.from_phone_number
187
187
  end
188
188
 
189
189
  # @see the `==` method
@@ -195,7 +195,7 @@ module MailSlurpClient
195
195
  # Calculates hash code according to all attributes.
196
196
  # @return [Integer] Hash code
197
197
  def hash
198
- [body, phone_number_id, created, from_phone_number, to_phone_number, message_direction].hash
198
+ [body, phone_number_id, created, message_direction, to_phone_number, from_phone_number].hash
199
199
  end
200
200
 
201
201
  # Builds the object from hash