mailslurp_client 17.2.0 → 17.4.0

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 (199) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/attachment_controller_api.rb +5 -5
  3. data/lib/mailslurp_client/api/campaign_probe_controller_api.rb +138 -0
  4. data/lib/mailslurp_client/api/domain_monitor_controller_api.rb +264 -0
  5. data/lib/mailslurp_client/api/email_audit_controller_api.rb +334 -0
  6. data/lib/mailslurp_client/api/email_controller_api.rb +126 -2
  7. data/lib/mailslurp_client/api/email_verification_controller_api.rb +64 -0
  8. data/lib/mailslurp_client/api/inbox_controller_api.rb +233 -4
  9. data/lib/mailslurp_client/api/phone_controller_api.rb +2091 -526
  10. data/lib/mailslurp_client/api/sms_controller_api.rb +125 -0
  11. data/lib/mailslurp_client/api/tools_controller_api.rb +806 -0
  12. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +18 -18
  13. data/lib/mailslurp_client/models/acquire_phone_pool_lease_options.rb +233 -0
  14. data/lib/mailslurp_client/models/add_phone_pool_numbers_options.rb +213 -0
  15. data/lib/mailslurp_client/models/ai_transform_mapping_projection.rb +27 -27
  16. data/lib/mailslurp_client/models/ai_transform_projection.rb +28 -28
  17. data/lib/mailslurp_client/models/alias_projection.rb +36 -36
  18. data/lib/mailslurp_client/models/alias_thread_projection.rb +42 -42
  19. data/lib/mailslurp_client/models/analyze_dmarc_report_options.rb +248 -0
  20. data/lib/mailslurp_client/models/analyze_dmarc_report_results.rb +386 -0
  21. data/lib/mailslurp_client/models/analyze_email_headers_options.rb +240 -0
  22. data/lib/mailslurp_client/models/analyze_email_headers_results.rb +275 -0
  23. data/lib/mailslurp_client/models/attachment_projection.rb +66 -66
  24. data/lib/mailslurp_client/models/available_phone_number_dto.rb +325 -0
  25. data/lib/mailslurp_client/models/available_phone_numbers_result.rb +236 -0
  26. data/lib/mailslurp_client/models/bounce_projection.rb +28 -28
  27. data/lib/mailslurp_client/models/bounce_recipient_projection.rb +24 -24
  28. data/lib/mailslurp_client/models/campaign_probe_run_comparison_dto.rb +397 -0
  29. data/lib/mailslurp_client/models/check_campaign_probe_options.rb +371 -0
  30. data/lib/mailslurp_client/models/check_campaign_probe_results.rb +482 -0
  31. data/lib/mailslurp_client/models/check_dns_propagation_options.rb +297 -0
  32. data/lib/mailslurp_client/models/check_dns_propagation_results.rb +361 -0
  33. data/lib/mailslurp_client/models/check_domain_monitor_options.rb +243 -0
  34. data/lib/mailslurp_client/models/check_domain_monitor_results.rb +398 -0
  35. data/lib/mailslurp_client/models/check_email_audit_options.rb +405 -0
  36. data/lib/mailslurp_client/models/check_email_auth_stack_options.rb +248 -0
  37. data/lib/mailslurp_client/models/check_email_auth_stack_results.rb +462 -0
  38. data/lib/mailslurp_client/models/check_email_blacklist_options.rb +241 -0
  39. data/lib/mailslurp_client/models/check_email_blacklist_results.rb +366 -0
  40. data/lib/mailslurp_client/models/connector_event_projection.rb +65 -65
  41. data/lib/mailslurp_client/models/connector_projection.rb +36 -36
  42. data/lib/mailslurp_client/models/contact_projection.rb +29 -29
  43. data/lib/mailslurp_client/models/create_email_audit_options.rb +394 -0
  44. data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +58 -29
  45. data/lib/mailslurp_client/models/create_inbox_replier_options.rb +39 -33
  46. data/lib/mailslurp_client/models/create_phone_number_options.rb +58 -4
  47. data/lib/mailslurp_client/models/create_phone_pool_options.rb +220 -0
  48. data/lib/mailslurp_client/models/create_phone_provisioning_job_item_options.rb +256 -0
  49. data/lib/mailslurp_client/models/create_phone_provisioning_job_options.rb +284 -0
  50. data/lib/mailslurp_client/models/dmarc_report_metadata.rb +308 -0
  51. data/lib/mailslurp_client/models/dmarc_report_source_summary.rb +274 -0
  52. data/lib/mailslurp_client/models/dns_propagation_resolver_result.rb +252 -0
  53. data/lib/mailslurp_client/models/domain_monitor_run_comparison_dto.rb +369 -0
  54. data/lib/mailslurp_client/models/domain_monitor_summary_dto.rb +248 -0
  55. data/lib/mailslurp_client/models/email_audit_analysis_result.rb +620 -0
  56. data/lib/mailslurp_client/models/email_audit_comparison_dto.rb +411 -0
  57. data/lib/mailslurp_client/models/email_audit_dto.rb +308 -0
  58. data/lib/mailslurp_client/models/email_audit_spelling_issue.rb +276 -0
  59. data/lib/mailslurp_client/models/email_audit_url_issue.rb +236 -0
  60. data/lib/mailslurp_client/models/email_blacklist_ip_result.rb +242 -0
  61. data/lib/mailslurp_client/models/email_blacklist_listing_result.rb +258 -0
  62. data/lib/mailslurp_client/models/email_header_analysis_summary.rb +242 -0
  63. data/lib/mailslurp_client/models/email_header_received_hop.rb +242 -0
  64. data/lib/mailslurp_client/models/email_intelligence_list_result.rb +285 -0
  65. data/lib/mailslurp_client/models/email_intelligence_options.rb +308 -0
  66. data/lib/mailslurp_client/models/email_intelligence_result_dto.rb +256 -0
  67. data/lib/mailslurp_client/models/email_intelligence_score_breakdown_dto.rb +296 -0
  68. data/lib/mailslurp_client/models/email_intelligence_signals_dto.rb +352 -0
  69. data/lib/mailslurp_client/models/email_intelligence_tests_options.rb +253 -0
  70. data/lib/mailslurp_client/models/email_projection.rb +88 -88
  71. data/lib/mailslurp_client/models/email_thread_projection.rb +57 -57
  72. data/lib/mailslurp_client/models/entity_automation_item_projection.rb +33 -33
  73. data/lib/mailslurp_client/models/entity_event_item_projection.rb +42 -42
  74. data/lib/mailslurp_client/models/entity_favourite_item_projection.rb +32 -32
  75. data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +18 -18
  76. data/lib/mailslurp_client/models/extract_attachment_text_options.rb +1 -1
  77. data/lib/mailslurp_client/models/extract_attachment_text_result.rb +1 -1
  78. data/lib/mailslurp_client/models/generate_spf_record_options.rb +357 -0
  79. data/lib/mailslurp_client/models/generate_spf_record_results.rb +318 -0
  80. data/lib/mailslurp_client/models/get_or_create_phone_pool_options.rb +220 -0
  81. data/lib/mailslurp_client/models/group_projection.rb +19 -19
  82. data/lib/mailslurp_client/models/guest_portal_user_projection.rb +41 -41
  83. data/lib/mailslurp_client/models/imap_email_projection.rb +18 -18
  84. data/lib/mailslurp_client/models/import_email_options.rb +269 -0
  85. data/lib/mailslurp_client/models/inbox_automation_match_option.rb +308 -0
  86. data/lib/mailslurp_client/models/inbox_automation_match_options.rb +273 -0
  87. data/lib/mailslurp_client/models/inbox_forwarder_dto.rb +65 -17
  88. data/lib/mailslurp_client/models/inbox_forwarder_event_projection.rb +36 -36
  89. data/lib/mailslurp_client/models/inbox_forwarder_test_options.rb +17 -9
  90. data/lib/mailslurp_client/models/inbox_replier_dto.rb +41 -16
  91. data/lib/mailslurp_client/models/inbox_replier_event_projection.rb +48 -48
  92. data/lib/mailslurp_client/models/inline_object.rb +12 -58
  93. data/lib/mailslurp_client/models/inline_object1.rb +58 -12
  94. data/lib/mailslurp_client/models/inline_object2.rb +211 -0
  95. data/lib/mailslurp_client/models/list_unsubscribe_recipient_projection.rb +19 -19
  96. data/lib/mailslurp_client/models/lookup_dkim_domain_options.rb +275 -0
  97. data/lib/mailslurp_client/models/lookup_dkim_domain_results.rb +304 -0
  98. data/lib/mailslurp_client/models/lookup_ptr_options.rb +241 -0
  99. data/lib/mailslurp_client/models/lookup_ptr_results.rb +305 -0
  100. data/lib/mailslurp_client/models/lookup_spf_domain_options.rb +240 -0
  101. data/lib/mailslurp_client/models/lookup_spf_domain_results.rb +305 -0
  102. data/lib/mailslurp_client/models/missed_email_projection.rb +28 -28
  103. data/lib/mailslurp_client/models/missed_sms_projection.rb +32 -32
  104. data/lib/mailslurp_client/models/opt_in_identity_projection.rb +15 -15
  105. data/lib/mailslurp_client/models/page_ai_transform_mapping_projection.rb +36 -36
  106. data/lib/mailslurp_client/models/page_ai_transform_projection.rb +36 -36
  107. data/lib/mailslurp_client/models/page_ai_transform_result_projection.rb +36 -36
  108. data/lib/mailslurp_client/models/page_alias.rb +36 -36
  109. data/lib/mailslurp_client/models/page_alias_thread_projection.rb +36 -36
  110. data/lib/mailslurp_client/models/page_attachment_entity.rb +36 -36
  111. data/lib/mailslurp_client/models/page_bounced_email.rb +36 -36
  112. data/lib/mailslurp_client/models/page_bounced_recipients.rb +36 -36
  113. data/lib/mailslurp_client/models/page_complaint.rb +36 -36
  114. data/lib/mailslurp_client/models/page_connector.rb +36 -36
  115. data/lib/mailslurp_client/models/page_connector_events.rb +36 -36
  116. data/lib/mailslurp_client/models/page_contact_projection.rb +36 -36
  117. data/lib/mailslurp_client/models/page_delivery_status.rb +36 -36
  118. data/lib/mailslurp_client/models/page_device_preview_run_projection.rb +36 -36
  119. data/lib/mailslurp_client/models/page_email_preview.rb +36 -36
  120. data/lib/mailslurp_client/models/page_email_projection.rb +36 -36
  121. data/lib/mailslurp_client/models/page_email_thread_projection.rb +36 -36
  122. data/lib/mailslurp_client/models/page_email_validation_request.rb +36 -36
  123. data/lib/mailslurp_client/models/page_entity_automation_items.rb +36 -36
  124. data/lib/mailslurp_client/models/page_entity_event_items.rb +36 -36
  125. data/lib/mailslurp_client/models/page_entity_favourite_items.rb +36 -36
  126. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +36 -36
  127. data/lib/mailslurp_client/models/page_group_projection.rb +36 -36
  128. data/lib/mailslurp_client/models/page_guest_portal_users.rb +36 -36
  129. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +36 -36
  130. data/lib/mailslurp_client/models/page_inbox_forwarder_events.rb +36 -36
  131. data/lib/mailslurp_client/models/page_inbox_projection.rb +36 -36
  132. data/lib/mailslurp_client/models/page_inbox_replier_dto.rb +36 -36
  133. data/lib/mailslurp_client/models/page_inbox_replier_events.rb +36 -36
  134. data/lib/mailslurp_client/models/page_inbox_tags.rb +36 -36
  135. data/lib/mailslurp_client/models/page_list_unsubscribe_recipients.rb +36 -36
  136. data/lib/mailslurp_client/models/page_missed_email_projection.rb +36 -36
  137. data/lib/mailslurp_client/models/page_missed_sms_projection.rb +36 -36
  138. data/lib/mailslurp_client/models/page_opt_in_identity_projection.rb +36 -36
  139. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +36 -36
  140. data/lib/mailslurp_client/models/page_phone_message_thread_item_projection.rb +36 -36
  141. data/lib/mailslurp_client/models/page_phone_message_thread_projection.rb +36 -36
  142. data/lib/mailslurp_client/models/page_phone_number_projection.rb +36 -36
  143. data/lib/mailslurp_client/models/page_phone_number_release_projection.rb +36 -36
  144. data/lib/mailslurp_client/models/page_plus_address_projection.rb +36 -36
  145. data/lib/mailslurp_client/models/page_reputation_items.rb +36 -36
  146. data/lib/mailslurp_client/models/page_ruleset_dto.rb +36 -36
  147. data/lib/mailslurp_client/models/page_scheduled_jobs.rb +36 -36
  148. data/lib/mailslurp_client/models/page_sent_email_projection.rb +36 -36
  149. data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +36 -36
  150. data/lib/mailslurp_client/models/page_sent_sms_projection.rb +36 -36
  151. data/lib/mailslurp_client/models/page_sms_projection.rb +36 -36
  152. data/lib/mailslurp_client/models/page_template_projection.rb +36 -36
  153. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +36 -36
  154. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +36 -36
  155. data/lib/mailslurp_client/models/page_webhook_endpoint_projection.rb +36 -36
  156. data/lib/mailslurp_client/models/page_webhook_projection.rb +36 -36
  157. data/lib/mailslurp_client/models/page_webhook_result.rb +36 -36
  158. data/lib/mailslurp_client/models/pageable_object.rb +28 -28
  159. data/lib/mailslurp_client/models/phone_message_thread_item_projection.rb +32 -32
  160. data/lib/mailslurp_client/models/phone_number_dto.rb +65 -4
  161. data/lib/mailslurp_client/models/phone_number_line_type_intelligence_dto.rb +242 -0
  162. data/lib/mailslurp_client/models/phone_number_line_type_lookup_dto.rb +286 -0
  163. data/lib/mailslurp_client/models/phone_number_projection.rb +80 -35
  164. data/lib/mailslurp_client/models/phone_number_release_projection.rb +39 -39
  165. data/lib/mailslurp_client/models/phone_number_tags_options.rb +213 -0
  166. data/lib/mailslurp_client/models/phone_pool_detail_dto.rb +334 -0
  167. data/lib/mailslurp_client/models/phone_pool_dto.rb +318 -0
  168. data/lib/mailslurp_client/models/phone_pool_lease_dto.rb +351 -0
  169. data/lib/mailslurp_client/models/phone_pool_member_dto.rb +333 -0
  170. data/lib/mailslurp_client/models/phone_provider_capabilities_result.rb +284 -0
  171. data/lib/mailslurp_client/models/phone_provisioning_job_dto.rb +434 -0
  172. data/lib/mailslurp_client/models/phone_provisioning_job_item_dto.rb +336 -0
  173. data/lib/mailslurp_client/models/phone_sms_prepaid_credit_dto.rb +340 -0
  174. data/lib/mailslurp_client/models/phone_sms_prepaid_credits_dto.rb +241 -0
  175. data/lib/mailslurp_client/models/plus_address_projection.rb +27 -27
  176. data/lib/mailslurp_client/models/recipient_projection.rb +13 -13
  177. data/lib/mailslurp_client/models/reputation_item_projection.rb +53 -53
  178. data/lib/mailslurp_client/models/search_available_phone_numbers_options.rb +377 -0
  179. data/lib/mailslurp_client/models/sender_projection.rb +13 -13
  180. data/lib/mailslurp_client/models/sent_email_projection.rb +63 -63
  181. data/lib/mailslurp_client/models/sent_sms_projection.rb +18 -18
  182. data/lib/mailslurp_client/models/sms_projection.rb +18 -18
  183. data/lib/mailslurp_client/models/smtp_auth_diagnostic_result.rb +235 -0
  184. data/lib/mailslurp_client/models/smtp_diagnostic_step.rb +236 -0
  185. data/lib/mailslurp_client/models/smtp_tls_diagnostic_result.rb +245 -0
  186. data/lib/mailslurp_client/models/sort_object.rb +10 -10
  187. data/lib/mailslurp_client/models/spf_mechanism_result.rb +229 -0
  188. data/lib/mailslurp_client/models/template_projection.rb +32 -32
  189. data/lib/mailslurp_client/models/test_smtp_server_options.rb +337 -0
  190. data/lib/mailslurp_client/models/test_smtp_server_results.rb +297 -0
  191. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +27 -27
  192. data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +27 -27
  193. data/lib/mailslurp_client/models/update_inbox_replier_options.rb +39 -33
  194. data/lib/mailslurp_client/models/update_phone_pool_options.rb +215 -0
  195. data/lib/mailslurp_client/models/validation_dto.rb +1 -5
  196. data/lib/mailslurp_client/models/webhook_projection.rb +50 -50
  197. data/lib/mailslurp_client/version.rb +1 -1
  198. data/lib/mailslurp_client.rb +78 -0
  199. metadata +80 -2
@@ -15,6 +15,14 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # Inbox replier event
17
17
  class InboxReplierEventProjection
18
+ attr_accessor :message
19
+
20
+ attr_accessor :id
21
+
22
+ attr_accessor :status
23
+
24
+ attr_accessor :recipients
25
+
18
26
  attr_accessor :user_id
19
27
 
20
28
  attr_accessor :email_id
@@ -23,18 +31,10 @@ module MailSlurpClient
23
31
 
24
32
  attr_accessor :created_at
25
33
 
26
- attr_accessor :recipients
27
-
28
34
  attr_accessor :sent_id
29
35
 
30
36
  attr_accessor :replier_id
31
37
 
32
- attr_accessor :message
33
-
34
- attr_accessor :id
35
-
36
- attr_accessor :status
37
-
38
38
  class EnumAttributeValidator
39
39
  attr_reader :datatype
40
40
  attr_reader :allowable_values
@@ -60,47 +60,47 @@ module MailSlurpClient
60
60
  # Attribute mapping from ruby-style variable name to JSON key.
61
61
  def self.attribute_map
62
62
  {
63
+ :'message' => :'message',
64
+ :'id' => :'id',
65
+ :'status' => :'status',
66
+ :'recipients' => :'recipients',
63
67
  :'user_id' => :'userId',
64
68
  :'email_id' => :'emailId',
65
69
  :'inbox_id' => :'inboxId',
66
70
  :'created_at' => :'createdAt',
67
- :'recipients' => :'recipients',
68
71
  :'sent_id' => :'sentId',
69
- :'replier_id' => :'replierId',
70
- :'message' => :'message',
71
- :'id' => :'id',
72
- :'status' => :'status'
72
+ :'replier_id' => :'replierId'
73
73
  }
74
74
  end
75
75
 
76
76
  # Attribute type mapping.
77
77
  def self.openapi_types
78
78
  {
79
+ :'message' => :'String',
80
+ :'id' => :'String',
81
+ :'status' => :'String',
82
+ :'recipients' => :'Array<String>',
79
83
  :'user_id' => :'String',
80
84
  :'email_id' => :'String',
81
85
  :'inbox_id' => :'String',
82
86
  :'created_at' => :'DateTime',
83
- :'recipients' => :'Array<String>',
84
87
  :'sent_id' => :'String',
85
- :'replier_id' => :'String',
86
- :'message' => :'String',
87
- :'id' => :'String',
88
- :'status' => :'String'
88
+ :'replier_id' => :'String'
89
89
  }
90
90
  end
91
91
 
92
92
  # List of attributes with nullable: true
93
93
  def self.openapi_nullable
94
94
  Set.new([
95
+ :'message',
96
+ :'id',
97
+ :'status',
98
+ :'recipients',
95
99
  :'user_id',
96
100
  :'email_id',
97
101
  :'inbox_id',
98
- :'recipients',
99
102
  :'sent_id',
100
- :'replier_id',
101
- :'message',
102
- :'id',
103
- :'status'
103
+ :'replier_id'
104
104
  ])
105
105
  end
106
106
 
@@ -119,6 +119,24 @@ module MailSlurpClient
119
119
  h[k.to_sym] = v
120
120
  }
121
121
 
122
+ if attributes.key?(:'message')
123
+ self.message = attributes[:'message']
124
+ end
125
+
126
+ if attributes.key?(:'id')
127
+ self.id = attributes[:'id']
128
+ end
129
+
130
+ if attributes.key?(:'status')
131
+ self.status = attributes[:'status']
132
+ end
133
+
134
+ if attributes.key?(:'recipients')
135
+ if (value = attributes[:'recipients']).is_a?(Array)
136
+ self.recipients = value
137
+ end
138
+ end
139
+
122
140
  if attributes.key?(:'user_id')
123
141
  self.user_id = attributes[:'user_id']
124
142
  end
@@ -135,12 +153,6 @@ module MailSlurpClient
135
153
  self.created_at = attributes[:'created_at']
136
154
  end
137
155
 
138
- if attributes.key?(:'recipients')
139
- if (value = attributes[:'recipients']).is_a?(Array)
140
- self.recipients = value
141
- end
142
- end
143
-
144
156
  if attributes.key?(:'sent_id')
145
157
  self.sent_id = attributes[:'sent_id']
146
158
  end
@@ -148,18 +160,6 @@ module MailSlurpClient
148
160
  if attributes.key?(:'replier_id')
149
161
  self.replier_id = attributes[:'replier_id']
150
162
  end
151
-
152
- if attributes.key?(:'message')
153
- self.message = attributes[:'message']
154
- end
155
-
156
- if attributes.key?(:'id')
157
- self.id = attributes[:'id']
158
- end
159
-
160
- if attributes.key?(:'status')
161
- self.status = attributes[:'status']
162
- end
163
163
  end
164
164
 
165
165
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -176,9 +176,9 @@ module MailSlurpClient
176
176
  # Check to see if the all the properties in the model are valid
177
177
  # @return true if the model is valid
178
178
  def valid?
179
- return false if @created_at.nil?
180
179
  status_validator = EnumAttributeValidator.new('String', ["SUCCESS", "FAILURE"])
181
180
  return false unless status_validator.valid?(@status)
181
+ return false if @created_at.nil?
182
182
  true
183
183
  end
184
184
 
@@ -197,16 +197,16 @@ module MailSlurpClient
197
197
  def ==(o)
198
198
  return true if self.equal?(o)
199
199
  self.class == o.class &&
200
+ message == o.message &&
201
+ id == o.id &&
202
+ status == o.status &&
203
+ recipients == o.recipients &&
200
204
  user_id == o.user_id &&
201
205
  email_id == o.email_id &&
202
206
  inbox_id == o.inbox_id &&
203
207
  created_at == o.created_at &&
204
- recipients == o.recipients &&
205
208
  sent_id == o.sent_id &&
206
- replier_id == o.replier_id &&
207
- message == o.message &&
208
- id == o.id &&
209
- status == o.status
209
+ replier_id == o.replier_id
210
210
  end
211
211
 
212
212
  # @see the `==` method
@@ -218,7 +218,7 @@ module MailSlurpClient
218
218
  # Calculates hash code according to all attributes.
219
219
  # @return [Integer] Hash code
220
220
  def hash
221
- [user_id, email_id, inbox_id, created_at, recipients, sent_id, replier_id, message, id, status].hash
221
+ [message, id, status, recipients, user_id, email_id, inbox_id, created_at, sent_id, replier_id].hash
222
222
  end
223
223
 
224
224
  # Builds the object from hash
@@ -14,45 +14,19 @@ require 'date'
14
14
 
15
15
  module MailSlurpClient
16
16
  class InlineObject
17
- # The email address that submitted form should be sent to.
18
- attr_accessor :_to
19
-
20
- # Optional subject of the email that will be sent.
21
- attr_accessor :_subject
22
-
23
- # Email address of the submitting user. Include this if you wish to record the submitters email address and reply to it later.
24
- attr_accessor :_email_address
25
-
26
- # Optional success message to display if no _redirectTo present.
27
- attr_accessor :_success_message
28
-
29
- # Optional but recommended field that catches spammers out. Include as a hidden form field but LEAVE EMPTY. Spam-bots will usually fill every field. If the _spamCheck field is filled the form submission will be ignored.
30
- attr_accessor :_spam_check
31
-
32
- # All other parameters or fields will be accepted and attached to the sent email. This includes files and any HTML form field with a name. These fields will become the body of the email that is sent.
33
- attr_accessor :other_parameters
17
+ attr_accessor :file
34
18
 
35
19
  # Attribute mapping from ruby-style variable name to JSON key.
36
20
  def self.attribute_map
37
21
  {
38
- :'_to' => :'_to',
39
- :'_subject' => :'_subject',
40
- :'_email_address' => :'_emailAddress',
41
- :'_success_message' => :'_successMessage',
42
- :'_spam_check' => :'_spamCheck',
43
- :'other_parameters' => :'otherParameters'
22
+ :'file' => :'file'
44
23
  }
45
24
  end
46
25
 
47
26
  # Attribute type mapping.
48
27
  def self.openapi_types
49
28
  {
50
- :'_to' => :'String',
51
- :'_subject' => :'String',
52
- :'_email_address' => :'String',
53
- :'_success_message' => :'String',
54
- :'_spam_check' => :'String',
55
- :'other_parameters' => :'String'
29
+ :'file' => :'File'
56
30
  }
57
31
  end
58
32
 
@@ -77,28 +51,8 @@ module MailSlurpClient
77
51
  h[k.to_sym] = v
78
52
  }
79
53
 
80
- if attributes.key?(:'_to')
81
- self._to = attributes[:'_to']
82
- end
83
-
84
- if attributes.key?(:'_subject')
85
- self._subject = attributes[:'_subject']
86
- end
87
-
88
- if attributes.key?(:'_email_address')
89
- self._email_address = attributes[:'_email_address']
90
- end
91
-
92
- if attributes.key?(:'_success_message')
93
- self._success_message = attributes[:'_success_message']
94
- end
95
-
96
- if attributes.key?(:'_spam_check')
97
- self._spam_check = attributes[:'_spam_check']
98
- end
99
-
100
- if attributes.key?(:'other_parameters')
101
- self.other_parameters = attributes[:'other_parameters']
54
+ if attributes.key?(:'file')
55
+ self.file = attributes[:'file']
102
56
  end
103
57
  end
104
58
 
@@ -106,12 +60,17 @@ module MailSlurpClient
106
60
  # @return Array for valid properties with the reasons
107
61
  def list_invalid_properties
108
62
  invalid_properties = Array.new
63
+ if @file.nil?
64
+ invalid_properties.push('invalid value for "file", file cannot be nil.')
65
+ end
66
+
109
67
  invalid_properties
110
68
  end
111
69
 
112
70
  # Check to see if the all the properties in the model are valid
113
71
  # @return true if the model is valid
114
72
  def valid?
73
+ return false if @file.nil?
115
74
  true
116
75
  end
117
76
 
@@ -120,12 +79,7 @@ module MailSlurpClient
120
79
  def ==(o)
121
80
  return true if self.equal?(o)
122
81
  self.class == o.class &&
123
- _to == o._to &&
124
- _subject == o._subject &&
125
- _email_address == o._email_address &&
126
- _success_message == o._success_message &&
127
- _spam_check == o._spam_check &&
128
- other_parameters == o.other_parameters
82
+ file == o.file
129
83
  end
130
84
 
131
85
  # @see the `==` method
@@ -137,7 +91,7 @@ module MailSlurpClient
137
91
  # Calculates hash code according to all attributes.
138
92
  # @return [Integer] Hash code
139
93
  def hash
140
- [_to, _subject, _email_address, _success_message, _spam_check, other_parameters].hash
94
+ [file].hash
141
95
  end
142
96
 
143
97
  # Builds the object from hash
@@ -14,19 +14,45 @@ require 'date'
14
14
 
15
15
  module MailSlurpClient
16
16
  class InlineObject1
17
- attr_accessor :file
17
+ # The email address that submitted form should be sent to.
18
+ attr_accessor :_to
19
+
20
+ # Optional subject of the email that will be sent.
21
+ attr_accessor :_subject
22
+
23
+ # Email address of the submitting user. Include this if you wish to record the submitters email address and reply to it later.
24
+ attr_accessor :_email_address
25
+
26
+ # Optional success message to display if no _redirectTo present.
27
+ attr_accessor :_success_message
28
+
29
+ # Optional but recommended field that catches spammers out. Include as a hidden form field but LEAVE EMPTY. Spam-bots will usually fill every field. If the _spamCheck field is filled the form submission will be ignored.
30
+ attr_accessor :_spam_check
31
+
32
+ # All other parameters or fields will be accepted and attached to the sent email. This includes files and any HTML form field with a name. These fields will become the body of the email that is sent.
33
+ attr_accessor :other_parameters
18
34
 
19
35
  # Attribute mapping from ruby-style variable name to JSON key.
20
36
  def self.attribute_map
21
37
  {
22
- :'file' => :'file'
38
+ :'_to' => :'_to',
39
+ :'_subject' => :'_subject',
40
+ :'_email_address' => :'_emailAddress',
41
+ :'_success_message' => :'_successMessage',
42
+ :'_spam_check' => :'_spamCheck',
43
+ :'other_parameters' => :'otherParameters'
23
44
  }
24
45
  end
25
46
 
26
47
  # Attribute type mapping.
27
48
  def self.openapi_types
28
49
  {
29
- :'file' => :'File'
50
+ :'_to' => :'String',
51
+ :'_subject' => :'String',
52
+ :'_email_address' => :'String',
53
+ :'_success_message' => :'String',
54
+ :'_spam_check' => :'String',
55
+ :'other_parameters' => :'String'
30
56
  }
31
57
  end
32
58
 
@@ -51,8 +77,28 @@ module MailSlurpClient
51
77
  h[k.to_sym] = v
52
78
  }
53
79
 
54
- if attributes.key?(:'file')
55
- self.file = attributes[:'file']
80
+ if attributes.key?(:'_to')
81
+ self._to = attributes[:'_to']
82
+ end
83
+
84
+ if attributes.key?(:'_subject')
85
+ self._subject = attributes[:'_subject']
86
+ end
87
+
88
+ if attributes.key?(:'_email_address')
89
+ self._email_address = attributes[:'_email_address']
90
+ end
91
+
92
+ if attributes.key?(:'_success_message')
93
+ self._success_message = attributes[:'_success_message']
94
+ end
95
+
96
+ if attributes.key?(:'_spam_check')
97
+ self._spam_check = attributes[:'_spam_check']
98
+ end
99
+
100
+ if attributes.key?(:'other_parameters')
101
+ self.other_parameters = attributes[:'other_parameters']
56
102
  end
57
103
  end
58
104
 
@@ -60,17 +106,12 @@ module MailSlurpClient
60
106
  # @return Array for valid properties with the reasons
61
107
  def list_invalid_properties
62
108
  invalid_properties = Array.new
63
- if @file.nil?
64
- invalid_properties.push('invalid value for "file", file cannot be nil.')
65
- end
66
-
67
109
  invalid_properties
68
110
  end
69
111
 
70
112
  # Check to see if the all the properties in the model are valid
71
113
  # @return true if the model is valid
72
114
  def valid?
73
- return false if @file.nil?
74
115
  true
75
116
  end
76
117
 
@@ -79,7 +120,12 @@ module MailSlurpClient
79
120
  def ==(o)
80
121
  return true if self.equal?(o)
81
122
  self.class == o.class &&
82
- file == o.file
123
+ _to == o._to &&
124
+ _subject == o._subject &&
125
+ _email_address == o._email_address &&
126
+ _success_message == o._success_message &&
127
+ _spam_check == o._spam_check &&
128
+ other_parameters == o.other_parameters
83
129
  end
84
130
 
85
131
  # @see the `==` method
@@ -91,7 +137,7 @@ module MailSlurpClient
91
137
  # Calculates hash code according to all attributes.
92
138
  # @return [Integer] Hash code
93
139
  def hash
94
- [file].hash
140
+ [_to, _subject, _email_address, _success_message, _spam_check, other_parameters].hash
95
141
  end
96
142
 
97
143
  # Builds the object from hash
@@ -0,0 +1,211 @@
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 InlineObject2
17
+ attr_accessor :file
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'file' => :'file'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.openapi_types
28
+ {
29
+ :'file' => :'File'
30
+ }
31
+ end
32
+
33
+ # List of attributes with nullable: true
34
+ def self.openapi_nullable
35
+ Set.new([
36
+ ])
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ if (!attributes.is_a?(Hash))
43
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::InlineObject2` initialize method"
44
+ end
45
+
46
+ # check to see if the attribute exists and convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}) { |(k, v), h|
48
+ if (!self.class.attribute_map.key?(k.to_sym))
49
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::InlineObject2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
50
+ end
51
+ h[k.to_sym] = v
52
+ }
53
+
54
+ if attributes.key?(:'file')
55
+ self.file = attributes[:'file']
56
+ end
57
+ end
58
+
59
+ # Show invalid properties with the reasons. Usually used together with valid?
60
+ # @return Array for valid properties with the reasons
61
+ def list_invalid_properties
62
+ invalid_properties = Array.new
63
+ if @file.nil?
64
+ invalid_properties.push('invalid value for "file", file cannot be nil.')
65
+ end
66
+
67
+ invalid_properties
68
+ end
69
+
70
+ # Check to see if the all the properties in the model are valid
71
+ # @return true if the model is valid
72
+ def valid?
73
+ return false if @file.nil?
74
+ true
75
+ end
76
+
77
+ # Checks equality by comparing each attribute.
78
+ # @param [Object] Object to be compared
79
+ def ==(o)
80
+ return true if self.equal?(o)
81
+ self.class == o.class &&
82
+ file == o.file
83
+ end
84
+
85
+ # @see the `==` method
86
+ # @param [Object] Object to be compared
87
+ def eql?(o)
88
+ self == o
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Integer] Hash code
93
+ def hash
94
+ [file].hash
95
+ end
96
+
97
+ # Builds the object from hash
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ # @return [Object] Returns the model itself
100
+ def self.build_from_hash(attributes)
101
+ new.build_from_hash(attributes)
102
+ end
103
+
104
+ # Builds the object from hash
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ # @return [Object] Returns the model itself
107
+ def build_from_hash(attributes)
108
+ return nil unless attributes.is_a?(Hash)
109
+ self.class.openapi_types.each_pair do |key, type|
110
+ if type =~ /\AArray<(.*)>/i
111
+ # check to ensure the input is an array given that the attribute
112
+ # is documented as an array but the input is not
113
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
114
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
115
+ end
116
+ elsif !attributes[self.class.attribute_map[key]].nil?
117
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
118
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
119
+ end
120
+
121
+ self
122
+ end
123
+
124
+ # Deserializes the data based on type
125
+ # @param string type Data type
126
+ # @param string value Value to be deserialized
127
+ # @return [Object] Deserialized data
128
+ def _deserialize(type, value)
129
+ case type.to_sym
130
+ when :DateTime
131
+ DateTime.parse(value)
132
+ when :Date
133
+ Date.parse(value)
134
+ when :String
135
+ value.to_s
136
+ when :Integer
137
+ value.to_i
138
+ when :Float
139
+ value.to_f
140
+ when :Boolean
141
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
142
+ true
143
+ else
144
+ false
145
+ end
146
+ when :Object
147
+ # generic object (usually a Hash), return directly
148
+ value
149
+ when /\AArray<(?<inner_type>.+)>\z/
150
+ inner_type = Regexp.last_match[:inner_type]
151
+ value.map { |v| _deserialize(inner_type, v) }
152
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
153
+ k_type = Regexp.last_match[:k_type]
154
+ v_type = Regexp.last_match[:v_type]
155
+ {}.tap do |hash|
156
+ value.each do |k, v|
157
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
158
+ end
159
+ end
160
+ else # model
161
+ MailSlurpClient.const_get(type).build_from_hash(value)
162
+ end
163
+ end
164
+
165
+ # Returns the string representation of the object
166
+ # @return [String] String presentation of the object
167
+ def to_s
168
+ to_hash.to_s
169
+ end
170
+
171
+ # to_body is an alias to to_hash (backward compatibility)
172
+ # @return [Hash] Returns the object in the form of hash
173
+ def to_body
174
+ to_hash
175
+ end
176
+
177
+ # Returns the object in the form of hash
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_hash
180
+ hash = {}
181
+ self.class.attribute_map.each_pair do |attr, param|
182
+ value = self.send(attr)
183
+ if value.nil?
184
+ is_nullable = self.class.openapi_nullable.include?(attr)
185
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
186
+ end
187
+
188
+ hash[param] = _to_hash(value)
189
+ end
190
+ hash
191
+ end
192
+
193
+ # Outputs non-array value in the form of hash
194
+ # For object, use to_hash. Otherwise, just return the value
195
+ # @param [Object] value Any valid value
196
+ # @return [Hash] Returns the value in the form of hash
197
+ def _to_hash(value)
198
+ if value.is_a?(Array)
199
+ value.compact.map { |v| _to_hash(v) }
200
+ elsif value.is_a?(Hash)
201
+ {}.tap do |hash|
202
+ value.each { |k, v| hash[k] = _to_hash(v) }
203
+ end
204
+ elsif value.respond_to? :to_hash
205
+ value.to_hash
206
+ else
207
+ value
208
+ end
209
+ end
210
+ end
211
+ end