mailslurp_client 5.0.0 → 7.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (214) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -0
  3. data/README.md +127 -40
  4. data/docs/AttachmentControllerApi.md +124 -0
  5. data/docs/AttachmentMetaData.md +23 -0
  6. data/docs/BasicAuthOptions.md +10 -0
  7. data/docs/BulkActionsControllerApi.md +165 -0
  8. data/docs/BulkSendEmailOptions.md +11 -1
  9. data/docs/CommonActionsControllerApi.md +167 -0
  10. data/docs/ContactControllerApi.md +274 -0
  11. data/docs/ContactDto.md +31 -0
  12. data/docs/ContactProjection.md +27 -0
  13. data/docs/CreateContactOptions.md +31 -0
  14. data/docs/CreateDomainOptions.md +17 -0
  15. data/docs/CreateGroupOptions.md +19 -0
  16. data/docs/CreateTemplateOptions.md +19 -0
  17. data/docs/CreateWebhookOptions.md +13 -2
  18. data/docs/DomainControllerApi.md +223 -0
  19. data/docs/DomainDto.md +29 -0
  20. data/docs/DomainPreview.md +21 -0
  21. data/docs/Email.md +40 -15
  22. data/docs/EmailAnalysis.md +18 -5
  23. data/docs/EmailControllerApi.md +740 -0
  24. data/docs/EmailPreview.md +24 -6
  25. data/docs/EmailProjection.md +33 -0
  26. data/docs/ForwardEmailOptions.md +12 -0
  27. data/docs/GroupContactsDto.md +19 -0
  28. data/docs/GroupControllerApi.md +437 -0
  29. data/docs/GroupDto.md +23 -0
  30. data/docs/GroupProjection.md +23 -0
  31. data/docs/HTMLValidationResult.md +21 -0
  32. data/docs/Inbox.md +26 -4
  33. data/docs/InboxControllerApi.md +652 -0
  34. data/docs/InboxProjection.md +29 -0
  35. data/docs/JsonNode.md +59 -0
  36. data/docs/MatchOption.md +13 -2
  37. data/docs/MatchOptions.md +9 -0
  38. data/docs/PageContactProjection.md +37 -0
  39. data/docs/PageEmailPreview.md +37 -0
  40. data/docs/PageEmailProjection.md +37 -0
  41. data/docs/PageGroupProjection.md +37 -0
  42. data/docs/PageInboxProjection.md +37 -0
  43. data/docs/PageTemplateProjection.md +37 -0
  44. data/docs/PageWebhookProjection.md +37 -0
  45. data/docs/Pageable.md +27 -0
  46. data/docs/RawEmailJson.md +17 -0
  47. data/docs/SendEmailOptions.md +33 -6
  48. data/docs/SetInboxFavouritedOptions.md +17 -0
  49. data/docs/Sort.md +21 -0
  50. data/docs/TemplateControllerApi.md +274 -0
  51. data/docs/TemplateDto.md +25 -0
  52. data/docs/TemplateProjection.md +25 -0
  53. data/docs/TemplateVariable.md +19 -0
  54. data/docs/UnreadCount.md +17 -0
  55. data/docs/UpdateGroupContacts.md +17 -0
  56. data/docs/UpdateInboxOptions.md +25 -0
  57. data/docs/UploadAttachmentOptions.md +12 -1
  58. data/docs/ValidationDto.md +19 -0
  59. data/docs/ValidationMessage.md +19 -0
  60. data/docs/WaitForConditions.md +29 -0
  61. data/docs/WaitForControllerApi.md +317 -0
  62. data/docs/WebhookControllerApi.md +339 -0
  63. data/docs/WebhookDto.md +33 -0
  64. data/docs/WebhookProjection.md +27 -0
  65. data/docs/WebhookTestRequest.md +23 -0
  66. data/docs/WebhookTestResponse.md +19 -0
  67. data/docs/WebhookTestResult.md +21 -0
  68. data/git_push.sh +10 -7
  69. data/lib/mailslurp_client.rb +56 -7
  70. data/lib/mailslurp_client/api/attachment_controller_api.rb +157 -0
  71. data/lib/mailslurp_client/api/bulk_actions_controller_api.rb +203 -0
  72. data/lib/mailslurp_client/api/common_actions_controller_api.rb +201 -0
  73. data/lib/mailslurp_client/api/contact_controller_api.rb +323 -0
  74. data/lib/mailslurp_client/api/domain_controller_api.rb +264 -0
  75. data/lib/mailslurp_client/api/email_controller_api.rb +852 -0
  76. data/lib/mailslurp_client/api/group_controller_api.rb +519 -0
  77. data/lib/mailslurp_client/api/inbox_controller_api.rb +763 -0
  78. data/lib/mailslurp_client/api/template_controller_api.rb +323 -0
  79. data/lib/mailslurp_client/api/wait_for_controller_api.rb +359 -0
  80. data/lib/mailslurp_client/api/webhook_controller_api.rb +405 -0
  81. data/lib/mailslurp_client/api_client.rb +36 -39
  82. data/lib/mailslurp_client/api_error.rb +23 -4
  83. data/lib/mailslurp_client/configuration.rb +8 -11
  84. data/lib/mailslurp_client/models/attachment_meta_data.rb +253 -0
  85. data/lib/mailslurp_client/models/basic_auth_options.rb +39 -15
  86. data/lib/mailslurp_client/models/bulk_send_email_options.rb +42 -19
  87. data/lib/mailslurp_client/models/contact_dto.rb +288 -0
  88. data/lib/mailslurp_client/models/contact_projection.rb +261 -0
  89. data/lib/mailslurp_client/models/create_contact_options.rb +277 -0
  90. data/lib/mailslurp_client/models/create_domain_options.rb +208 -0
  91. data/lib/mailslurp_client/models/create_group_options.rb +220 -0
  92. data/lib/mailslurp_client/models/create_template_options.rb +225 -0
  93. data/lib/mailslurp_client/models/create_webhook_options.rb +54 -29
  94. data/lib/mailslurp_client/models/domain_dto.rb +296 -0
  95. data/lib/mailslurp_client/models/domain_preview.rb +240 -0
  96. data/lib/mailslurp_client/models/email.rb +86 -78
  97. data/lib/mailslurp_client/models/email_analysis.rb +46 -48
  98. data/lib/mailslurp_client/models/email_preview.rb +77 -41
  99. data/lib/mailslurp_client/models/email_projection.rb +306 -0
  100. data/lib/mailslurp_client/models/forward_email_options.rb +40 -17
  101. data/lib/mailslurp_client/models/group_contacts_dto.rb +227 -0
  102. data/lib/mailslurp_client/models/{webhook.rb → group_dto.rb} +60 -54
  103. data/lib/mailslurp_client/models/group_projection.rb +248 -0
  104. data/lib/mailslurp_client/models/html_validation_result.rb +243 -0
  105. data/lib/mailslurp_client/models/inbox.rb +104 -26
  106. data/lib/mailslurp_client/models/inbox_projection.rb +272 -0
  107. data/lib/mailslurp_client/models/json_node.rb +429 -0
  108. data/lib/mailslurp_client/models/match_option.rb +48 -24
  109. data/lib/mailslurp_client/models/match_options.rb +37 -14
  110. data/lib/mailslurp_client/models/page_contact_projection.rb +298 -0
  111. data/lib/mailslurp_client/models/page_email_preview.rb +298 -0
  112. data/lib/mailslurp_client/models/page_email_projection.rb +298 -0
  113. data/lib/mailslurp_client/models/page_group_projection.rb +298 -0
  114. data/lib/mailslurp_client/models/page_inbox_projection.rb +298 -0
  115. data/lib/mailslurp_client/models/page_template_projection.rb +298 -0
  116. data/lib/mailslurp_client/models/page_webhook_projection.rb +298 -0
  117. data/lib/mailslurp_client/models/pageable.rb +251 -0
  118. data/lib/mailslurp_client/models/raw_email_json.rb +211 -0
  119. data/lib/mailslurp_client/models/send_email_options.rb +141 -46
  120. data/lib/mailslurp_client/models/set_inbox_favourited_options.rb +208 -0
  121. data/lib/mailslurp_client/models/sort.rb +224 -0
  122. data/lib/mailslurp_client/models/template_dto.rb +269 -0
  123. data/lib/mailslurp_client/models/template_projection.rb +269 -0
  124. data/lib/mailslurp_client/models/template_variable.rb +259 -0
  125. data/lib/mailslurp_client/models/unread_count.rb +211 -0
  126. data/lib/mailslurp_client/models/update_group_contacts.rb +213 -0
  127. data/lib/mailslurp_client/models/update_inbox_options.rb +250 -0
  128. data/lib/mailslurp_client/models/upload_attachment_options.rb +43 -20
  129. data/lib/mailslurp_client/models/validation_dto.rb +225 -0
  130. data/lib/mailslurp_client/models/validation_message.rb +220 -0
  131. data/lib/mailslurp_client/models/wait_for_conditions.rb +315 -0
  132. data/lib/mailslurp_client/models/webhook_dto.rb +326 -0
  133. data/lib/mailslurp_client/models/webhook_projection.rb +277 -0
  134. data/lib/mailslurp_client/models/webhook_test_request.rb +284 -0
  135. data/lib/mailslurp_client/models/webhook_test_response.rb +215 -0
  136. data/lib/mailslurp_client/models/webhook_test_result.rb +235 -0
  137. data/lib/mailslurp_client/version.rb +5 -5
  138. data/mailslurp_client.gemspec +4 -10
  139. data/spec/api/attachment_controller_api_spec.rb +61 -0
  140. data/spec/api/bulk_actions_controller_api_spec.rb +68 -0
  141. data/spec/api/common_actions_controller_api_spec.rb +129 -0
  142. data/spec/api/contact_controller_api_spec.rb +91 -0
  143. data/spec/api/domain_controller_api_spec.rb +82 -0
  144. data/spec/api/email_controller_api_spec.rb +162 -0
  145. data/spec/api/group_controller_api_spec.rb +126 -0
  146. data/spec/api/inbox_controller_api_spec.rb +172 -0
  147. data/spec/api/template_controller_api_spec.rb +91 -0
  148. data/spec/api/wait_for_controller_api_spec.rb +107 -0
  149. data/spec/api/webhook_controller_api_spec.rb +107 -0
  150. data/spec/api_client_spec.rb +5 -5
  151. data/spec/configuration_spec.rb +4 -4
  152. data/spec/models/attachment_meta_data_spec.rb +59 -0
  153. data/spec/models/basic_auth_options_spec.rb +4 -4
  154. data/spec/models/bulk_send_email_options_spec.rb +4 -4
  155. data/spec/models/contact_dto_spec.rb +83 -0
  156. data/spec/models/contact_projection_spec.rb +71 -0
  157. data/spec/models/create_contact_options_spec.rb +83 -0
  158. data/spec/models/create_domain_options_spec.rb +41 -0
  159. data/spec/models/create_group_options_spec.rb +47 -0
  160. data/spec/models/create_template_options_spec.rb +47 -0
  161. data/spec/models/create_webhook_options_spec.rb +6 -6
  162. data/spec/models/domain_dto_spec.rb +77 -0
  163. data/spec/models/domain_preview_spec.rb +53 -0
  164. data/spec/models/email_analysis_spec.rb +4 -4
  165. data/spec/models/email_preview_spec.rb +41 -5
  166. data/spec/models/email_projection_spec.rb +89 -0
  167. data/spec/models/email_spec.rb +17 -5
  168. data/spec/models/forward_email_options_spec.rb +4 -4
  169. data/spec/models/group_contacts_dto_spec.rb +47 -0
  170. data/spec/models/group_dto_spec.rb +59 -0
  171. data/spec/models/group_projection_spec.rb +59 -0
  172. data/spec/models/html_validation_result_spec.rb +53 -0
  173. data/spec/models/inbox_projection_spec.rb +77 -0
  174. data/spec/models/inbox_spec.rb +35 -5
  175. data/spec/models/json_node_spec.rb +171 -0
  176. data/spec/models/match_option_spec.rb +4 -4
  177. data/spec/models/match_options_spec.rb +4 -4
  178. data/spec/models/page_contact_projection_spec.rb +101 -0
  179. data/spec/models/page_email_preview_spec.rb +101 -0
  180. data/spec/models/page_email_projection_spec.rb +101 -0
  181. data/spec/models/page_group_projection_spec.rb +101 -0
  182. data/spec/models/page_inbox_projection_spec.rb +101 -0
  183. data/spec/models/page_template_projection_spec.rb +101 -0
  184. data/spec/models/page_webhook_projection_spec.rb +101 -0
  185. data/spec/models/pageable_spec.rb +71 -0
  186. data/spec/models/raw_email_json_spec.rb +41 -0
  187. data/spec/models/send_email_options_spec.rb +45 -5
  188. data/spec/models/set_inbox_favourited_options_spec.rb +41 -0
  189. data/spec/models/sort_spec.rb +53 -0
  190. data/spec/models/template_dto_spec.rb +65 -0
  191. data/spec/models/template_projection_spec.rb +65 -0
  192. data/spec/models/template_variable_spec.rb +51 -0
  193. data/spec/models/unread_count_spec.rb +41 -0
  194. data/spec/models/update_group_contacts_spec.rb +41 -0
  195. data/spec/models/{webhook_spec.rb → update_inbox_options_spec.rb} +14 -20
  196. data/spec/models/upload_attachment_options_spec.rb +4 -4
  197. data/spec/models/validation_dto_spec.rb +47 -0
  198. data/spec/models/validation_message_spec.rb +47 -0
  199. data/spec/models/wait_for_conditions_spec.rb +85 -0
  200. data/spec/models/webhook_dto_spec.rb +93 -0
  201. data/spec/models/webhook_projection_spec.rb +71 -0
  202. data/spec/models/webhook_test_request_spec.rb +63 -0
  203. data/spec/models/webhook_test_response_spec.rb +47 -0
  204. data/spec/models/webhook_test_result_spec.rb +53 -0
  205. data/spec/spec_helper.rb +4 -4
  206. metadata +223 -149
  207. data/Gemfile.lock +0 -79
  208. data/docs/CommonOperationsApi.md +0 -499
  209. data/docs/ExtraOperationsApi.md +0 -1021
  210. data/docs/Webhook.md +0 -13
  211. data/lib/mailslurp_client/api/common_operations_api.rb +0 -502
  212. data/lib/mailslurp_client/api/extra_operations_api.rb +0 -1054
  213. data/spec/api/common_operations_api_spec.rb +0 -95
  214. data/spec/api/extra_operations_api_spec.rb +0 -231
@@ -1,52 +1,67 @@
1
1
  =begin
2
2
  #MailSlurp API
3
3
 
4
- #For documentation see [developer guide](https://www.mailslurp.com/developers). [Create an account](https://app.mailslurp.com) in the MailSlurp Dashboard to [view your API Key](https://app). For all bugs, feature requests, or help please [see support](https://www.mailslurp.com/support/).
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: 67c9a1eda264be4cfe0bb2c76151f0aadf0862bc
5
7
 
6
- OpenAPI spec version: 0.0.1-alpha
7
- Contact: contact@mailslurp.dev
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.4
9
+ OpenAPI Generator version: 4.2.3
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
- # Representation of an email
16
+ # Representation of an email received by an inbox. Use the ID to access more properties of an email using the EmailController endpoints.
17
17
  class Email
18
18
  attr_accessor :analysis
19
19
 
20
+ # List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension.
20
21
  attr_accessor :attachments
21
22
 
23
+ # List of `BCC` recipients email was addressed to
22
24
  attr_accessor :bcc
23
25
 
26
+ # The body of the email message
24
27
  attr_accessor :body
25
28
 
29
+ # List of `CC` recipients email was addressed to
26
30
  attr_accessor :cc
27
31
 
32
+ # Detected character set of the email body such as UTF-8
28
33
  attr_accessor :charset
29
34
 
35
+ # When was the email received by MailSlurp
30
36
  attr_accessor :created_at
31
37
 
38
+ # Who the email was sent from
32
39
  attr_accessor :from
33
40
 
34
41
  attr_accessor :headers
35
42
 
36
- attr_accessor :html
37
-
43
+ # ID of the email
38
44
  attr_accessor :id
39
45
 
46
+ # ID of the inbox that received the email
40
47
  attr_accessor :inbox_id
41
48
 
42
- attr_accessor :raw_url
49
+ # Was HTML sent in the email body
50
+ attr_accessor :is_html
43
51
 
52
+ # Has the email been viewed ever
53
+ attr_accessor :read
54
+
55
+ # The subject line of the email message
44
56
  attr_accessor :subject
45
57
 
58
+ # List of `To` recipients email was addressed to
46
59
  attr_accessor :to
47
60
 
61
+ # When was the email last updated
48
62
  attr_accessor :updated_at
49
63
 
64
+ # ID of user that email belongs
50
65
  attr_accessor :user_id
51
66
 
52
67
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -61,10 +76,10 @@ module MailSlurpClient
61
76
  :'created_at' => :'createdAt',
62
77
  :'from' => :'from',
63
78
  :'headers' => :'headers',
64
- :'html' => :'html',
65
79
  :'id' => :'id',
66
80
  :'inbox_id' => :'inboxId',
67
- :'raw_url' => :'rawUrl',
81
+ :'is_html' => :'isHTML',
82
+ :'read' => :'read',
68
83
  :'subject' => :'subject',
69
84
  :'to' => :'to',
70
85
  :'updated_at' => :'updatedAt',
@@ -84,10 +99,10 @@ module MailSlurpClient
84
99
  :'created_at' => :'DateTime',
85
100
  :'from' => :'String',
86
101
  :'headers' => :'Hash<String, String>',
87
- :'html' => :'BOOLEAN',
88
102
  :'id' => :'String',
89
103
  :'inbox_id' => :'String',
90
- :'raw_url' => :'String',
104
+ :'is_html' => :'Boolean',
105
+ :'read' => :'Boolean',
91
106
  :'subject' => :'String',
92
107
  :'to' => :'Array<String>',
93
108
  :'updated_at' => :'DateTime',
@@ -95,90 +110,103 @@ module MailSlurpClient
95
110
  }
96
111
  end
97
112
 
113
+ # List of attributes with nullable: true
114
+ def self.openapi_nullable
115
+ Set.new([
116
+ ])
117
+ end
118
+
98
119
  # Initializes the object
99
120
  # @param [Hash] attributes Model attributes in the form of hash
100
121
  def initialize(attributes = {})
101
- return unless attributes.is_a?(Hash)
122
+ if (!attributes.is_a?(Hash))
123
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::Email` initialize method"
124
+ end
102
125
 
103
- # convert string to symbol for hash key
104
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
126
+ # check to see if the attribute exists and convert string to symbol for hash key
127
+ attributes = attributes.each_with_object({}) { |(k, v), h|
128
+ if (!self.class.attribute_map.key?(k.to_sym))
129
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::Email`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
130
+ end
131
+ h[k.to_sym] = v
132
+ }
105
133
 
106
- if attributes.has_key?(:'analysis')
134
+ if attributes.key?(:'analysis')
107
135
  self.analysis = attributes[:'analysis']
108
136
  end
109
137
 
110
- if attributes.has_key?(:'attachments')
138
+ if attributes.key?(:'attachments')
111
139
  if (value = attributes[:'attachments']).is_a?(Array)
112
140
  self.attachments = value
113
141
  end
114
142
  end
115
143
 
116
- if attributes.has_key?(:'bcc')
144
+ if attributes.key?(:'bcc')
117
145
  if (value = attributes[:'bcc']).is_a?(Array)
118
146
  self.bcc = value
119
147
  end
120
148
  end
121
149
 
122
- if attributes.has_key?(:'body')
150
+ if attributes.key?(:'body')
123
151
  self.body = attributes[:'body']
124
152
  end
125
153
 
126
- if attributes.has_key?(:'cc')
154
+ if attributes.key?(:'cc')
127
155
  if (value = attributes[:'cc']).is_a?(Array)
128
156
  self.cc = value
129
157
  end
130
158
  end
131
159
 
132
- if attributes.has_key?(:'charset')
160
+ if attributes.key?(:'charset')
133
161
  self.charset = attributes[:'charset']
134
162
  end
135
163
 
136
- if attributes.has_key?(:'createdAt')
137
- self.created_at = attributes[:'createdAt']
164
+ if attributes.key?(:'created_at')
165
+ self.created_at = attributes[:'created_at']
138
166
  end
139
167
 
140
- if attributes.has_key?(:'from')
168
+ if attributes.key?(:'from')
141
169
  self.from = attributes[:'from']
142
170
  end
143
171
 
144
- if attributes.has_key?(:'headers')
172
+ if attributes.key?(:'headers')
145
173
  if (value = attributes[:'headers']).is_a?(Hash)
146
174
  self.headers = value
147
175
  end
148
176
  end
149
177
 
150
- if attributes.has_key?(:'html')
151
- self.html = attributes[:'html']
178
+ if attributes.key?(:'id')
179
+ self.id = attributes[:'id']
152
180
  end
153
181
 
154
- if attributes.has_key?(:'id')
155
- self.id = attributes[:'id']
182
+ if attributes.key?(:'inbox_id')
183
+ self.inbox_id = attributes[:'inbox_id']
156
184
  end
157
185
 
158
- if attributes.has_key?(:'inboxId')
159
- self.inbox_id = attributes[:'inboxId']
186
+ if attributes.key?(:'is_html')
187
+ self.is_html = attributes[:'is_html']
160
188
  end
161
189
 
162
- if attributes.has_key?(:'rawUrl')
163
- self.raw_url = attributes[:'rawUrl']
190
+ if attributes.key?(:'read')
191
+ self.read = attributes[:'read']
164
192
  end
165
193
 
166
- if attributes.has_key?(:'subject')
194
+ if attributes.key?(:'subject')
167
195
  self.subject = attributes[:'subject']
168
196
  end
169
197
 
170
- if attributes.has_key?(:'to')
198
+ if attributes.key?(:'to')
171
199
  if (value = attributes[:'to']).is_a?(Array)
172
200
  self.to = value
173
201
  end
174
202
  end
175
203
 
176
- if attributes.has_key?(:'updatedAt')
177
- self.updated_at = attributes[:'updatedAt']
204
+ if attributes.key?(:'updated_at')
205
+ self.updated_at = attributes[:'updated_at']
178
206
  end
179
207
 
180
- if attributes.has_key?(:'userId')
181
- self.user_id = attributes[:'userId']
208
+ if attributes.key?(:'user_id')
209
+ self.user_id = attributes[:'user_id']
182
210
  end
183
211
  end
184
212
 
@@ -186,42 +214,12 @@ module MailSlurpClient
186
214
  # @return Array for valid properties with the reasons
187
215
  def list_invalid_properties
188
216
  invalid_properties = Array.new
189
- if @created_at.nil?
190
- invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
191
- end
192
-
193
- if @id.nil?
194
- invalid_properties.push('invalid value for "id", id cannot be nil.')
195
- end
196
-
197
- if @inbox_id.nil?
198
- invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
199
- end
200
-
201
- if @to.nil?
202
- invalid_properties.push('invalid value for "to", to cannot be nil.')
203
- end
204
-
205
- if @updated_at.nil?
206
- invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
207
- end
208
-
209
- if @user_id.nil?
210
- invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
211
- end
212
-
213
217
  invalid_properties
214
218
  end
215
219
 
216
220
  # Check to see if the all the properties in the model are valid
217
221
  # @return true if the model is valid
218
222
  def valid?
219
- return false if @created_at.nil?
220
- return false if @id.nil?
221
- return false if @inbox_id.nil?
222
- return false if @to.nil?
223
- return false if @updated_at.nil?
224
- return false if @user_id.nil?
225
223
  true
226
224
  end
227
225
 
@@ -239,10 +237,10 @@ module MailSlurpClient
239
237
  created_at == o.created_at &&
240
238
  from == o.from &&
241
239
  headers == o.headers &&
242
- html == o.html &&
243
240
  id == o.id &&
244
241
  inbox_id == o.inbox_id &&
245
- raw_url == o.raw_url &&
242
+ is_html == o.is_html &&
243
+ read == o.read &&
246
244
  subject == o.subject &&
247
245
  to == o.to &&
248
246
  updated_at == o.updated_at &&
@@ -256,9 +254,16 @@ module MailSlurpClient
256
254
  end
257
255
 
258
256
  # Calculates hash code according to all attributes.
259
- # @return [Fixnum] Hash code
257
+ # @return [Integer] Hash code
260
258
  def hash
261
- [analysis, attachments, bcc, body, cc, charset, created_at, from, headers, html, id, inbox_id, raw_url, subject, to, updated_at, user_id].hash
259
+ [analysis, attachments, bcc, body, cc, charset, created_at, from, headers, id, inbox_id, is_html, read, subject, to, updated_at, user_id].hash
260
+ end
261
+
262
+ # Builds the object from hash
263
+ # @param [Hash] attributes Model attributes in the form of hash
264
+ # @return [Object] Returns the model itself
265
+ def self.build_from_hash(attributes)
266
+ new.build_from_hash(attributes)
262
267
  end
263
268
 
264
269
  # Builds the object from hash
@@ -268,7 +273,7 @@ module MailSlurpClient
268
273
  return nil unless attributes.is_a?(Hash)
269
274
  self.class.openapi_types.each_pair do |key, type|
270
275
  if type =~ /\AArray<(.*)>/i
271
- # check to ensure the input is an array given that the the attribute
276
+ # check to ensure the input is an array given that the attribute
272
277
  # is documented as an array but the input is not
273
278
  if attributes[self.class.attribute_map[key]].is_a?(Array)
274
279
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -297,7 +302,7 @@ module MailSlurpClient
297
302
  value.to_i
298
303
  when :Float
299
304
  value.to_f
300
- when :BOOLEAN
305
+ when :Boolean
301
306
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
302
307
  true
303
308
  else
@@ -318,8 +323,7 @@ module MailSlurpClient
318
323
  end
319
324
  end
320
325
  else # model
321
- temp_model = MailSlurpClient.const_get(type).new
322
- temp_model.build_from_hash(value)
326
+ MailSlurpClient.const_get(type).build_from_hash(value)
323
327
  end
324
328
  end
325
329
 
@@ -341,7 +345,11 @@ module MailSlurpClient
341
345
  hash = {}
342
346
  self.class.attribute_map.each_pair do |attr, param|
343
347
  value = self.send(attr)
344
- next if value.nil?
348
+ if value.nil?
349
+ is_nullable = self.class.openapi_nullable.include?(attr)
350
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
351
+ end
352
+
345
353
  hash[param] = _to_hash(value)
346
354
  end
347
355
  hash
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #MailSlurp API
3
3
 
4
- #For documentation see [developer guide](https://www.mailslurp.com/developers). [Create an account](https://app.mailslurp.com) in the MailSlurp Dashboard to [view your API Key](https://app). For all bugs, feature requests, or help please [see support](https://www.mailslurp.com/support/).
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: 67c9a1eda264be4cfe0bb2c76151f0aadf0862bc
5
7
 
6
- OpenAPI spec version: 0.0.1-alpha
7
- Contact: contact@mailslurp.dev
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.4
9
+ OpenAPI Generator version: 4.2.3
10
10
 
11
11
  =end
12
12
 
@@ -47,32 +47,45 @@ module MailSlurpClient
47
47
  }
48
48
  end
49
49
 
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
50
56
  # Initializes the object
51
57
  # @param [Hash] attributes Model attributes in the form of hash
52
58
  def initialize(attributes = {})
53
- return unless attributes.is_a?(Hash)
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::EmailAnalysis` initialize method"
61
+ end
54
62
 
55
- # convert string to symbol for hash key
56
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!self.class.attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::EmailAnalysis`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
57
70
 
58
- if attributes.has_key?(:'dkimVerdict')
59
- self.dkim_verdict = attributes[:'dkimVerdict']
71
+ if attributes.key?(:'dkim_verdict')
72
+ self.dkim_verdict = attributes[:'dkim_verdict']
60
73
  end
61
74
 
62
- if attributes.has_key?(:'dmarcVerdict')
63
- self.dmarc_verdict = attributes[:'dmarcVerdict']
75
+ if attributes.key?(:'dmarc_verdict')
76
+ self.dmarc_verdict = attributes[:'dmarc_verdict']
64
77
  end
65
78
 
66
- if attributes.has_key?(:'spamVerdict')
67
- self.spam_verdict = attributes[:'spamVerdict']
79
+ if attributes.key?(:'spam_verdict')
80
+ self.spam_verdict = attributes[:'spam_verdict']
68
81
  end
69
82
 
70
- if attributes.has_key?(:'spfVerdict')
71
- self.spf_verdict = attributes[:'spfVerdict']
83
+ if attributes.key?(:'spf_verdict')
84
+ self.spf_verdict = attributes[:'spf_verdict']
72
85
  end
73
86
 
74
- if attributes.has_key?(:'virusVerdict')
75
- self.virus_verdict = attributes[:'virusVerdict']
87
+ if attributes.key?(:'virus_verdict')
88
+ self.virus_verdict = attributes[:'virus_verdict']
76
89
  end
77
90
  end
78
91
 
@@ -80,37 +93,12 @@ module MailSlurpClient
80
93
  # @return Array for valid properties with the reasons
81
94
  def list_invalid_properties
82
95
  invalid_properties = Array.new
83
- if @dkim_verdict.nil?
84
- invalid_properties.push('invalid value for "dkim_verdict", dkim_verdict cannot be nil.')
85
- end
86
-
87
- if @dmarc_verdict.nil?
88
- invalid_properties.push('invalid value for "dmarc_verdict", dmarc_verdict cannot be nil.')
89
- end
90
-
91
- if @spam_verdict.nil?
92
- invalid_properties.push('invalid value for "spam_verdict", spam_verdict cannot be nil.')
93
- end
94
-
95
- if @spf_verdict.nil?
96
- invalid_properties.push('invalid value for "spf_verdict", spf_verdict cannot be nil.')
97
- end
98
-
99
- if @virus_verdict.nil?
100
- invalid_properties.push('invalid value for "virus_verdict", virus_verdict cannot be nil.')
101
- end
102
-
103
96
  invalid_properties
104
97
  end
105
98
 
106
99
  # Check to see if the all the properties in the model are valid
107
100
  # @return true if the model is valid
108
101
  def valid?
109
- return false if @dkim_verdict.nil?
110
- return false if @dmarc_verdict.nil?
111
- return false if @spam_verdict.nil?
112
- return false if @spf_verdict.nil?
113
- return false if @virus_verdict.nil?
114
102
  true
115
103
  end
116
104
 
@@ -133,11 +121,18 @@ module MailSlurpClient
133
121
  end
134
122
 
135
123
  # Calculates hash code according to all attributes.
136
- # @return [Fixnum] Hash code
124
+ # @return [Integer] Hash code
137
125
  def hash
138
126
  [dkim_verdict, dmarc_verdict, spam_verdict, spf_verdict, virus_verdict].hash
139
127
  end
140
128
 
129
+ # Builds the object from hash
130
+ # @param [Hash] attributes Model attributes in the form of hash
131
+ # @return [Object] Returns the model itself
132
+ def self.build_from_hash(attributes)
133
+ new.build_from_hash(attributes)
134
+ end
135
+
141
136
  # Builds the object from hash
142
137
  # @param [Hash] attributes Model attributes in the form of hash
143
138
  # @return [Object] Returns the model itself
@@ -145,7 +140,7 @@ module MailSlurpClient
145
140
  return nil unless attributes.is_a?(Hash)
146
141
  self.class.openapi_types.each_pair do |key, type|
147
142
  if type =~ /\AArray<(.*)>/i
148
- # check to ensure the input is an array given that the the attribute
143
+ # check to ensure the input is an array given that the attribute
149
144
  # is documented as an array but the input is not
150
145
  if attributes[self.class.attribute_map[key]].is_a?(Array)
151
146
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -174,7 +169,7 @@ module MailSlurpClient
174
169
  value.to_i
175
170
  when :Float
176
171
  value.to_f
177
- when :BOOLEAN
172
+ when :Boolean
178
173
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
179
174
  true
180
175
  else
@@ -195,8 +190,7 @@ module MailSlurpClient
195
190
  end
196
191
  end
197
192
  else # model
198
- temp_model = MailSlurpClient.const_get(type).new
199
- temp_model.build_from_hash(value)
193
+ MailSlurpClient.const_get(type).build_from_hash(value)
200
194
  end
201
195
  end
202
196
 
@@ -218,7 +212,11 @@ module MailSlurpClient
218
212
  hash = {}
219
213
  self.class.attribute_map.each_pair do |attr, param|
220
214
  value = self.send(attr)
221
- next if value.nil?
215
+ if value.nil?
216
+ is_nullable = self.class.openapi_nullable.include?(attr)
217
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
218
+ end
219
+
222
220
  hash[param] = _to_hash(value)
223
221
  end
224
222
  hash