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
@@ -0,0 +1,253 @@
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
+ # Optional test toggles for email intelligence scoring.
17
+ class EmailIntelligenceTestsOptions
18
+ # Check local-part randomness for email inputs.
19
+ attr_accessor :check_random_local_part
20
+
21
+ # Check if domain is a known free email provider.
22
+ attr_accessor :check_free_provider
23
+
24
+ # Check if the domain has a reachable HTTPS website.
25
+ attr_accessor :check_https_website
26
+
27
+ # Check DNS records (A, MX, SOA) for the domain.
28
+ attr_accessor :check_dns
29
+
30
+ # Derive a domain age hint from DNS SOA serial when possible.
31
+ attr_accessor :check_domain_age_hint
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'check_random_local_part' => :'checkRandomLocalPart',
37
+ :'check_free_provider' => :'checkFreeProvider',
38
+ :'check_https_website' => :'checkHttpsWebsite',
39
+ :'check_dns' => :'checkDns',
40
+ :'check_domain_age_hint' => :'checkDomainAgeHint'
41
+ }
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.openapi_types
46
+ {
47
+ :'check_random_local_part' => :'Boolean',
48
+ :'check_free_provider' => :'Boolean',
49
+ :'check_https_website' => :'Boolean',
50
+ :'check_dns' => :'Boolean',
51
+ :'check_domain_age_hint' => :'Boolean'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ :'check_random_local_part',
59
+ :'check_free_provider',
60
+ :'check_https_website',
61
+ :'check_dns',
62
+ :'check_domain_age_hint'
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::EmailIntelligenceTestsOptions` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!self.class.attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::EmailIntelligenceTestsOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'check_random_local_part')
82
+ self.check_random_local_part = attributes[:'check_random_local_part']
83
+ end
84
+
85
+ if attributes.key?(:'check_free_provider')
86
+ self.check_free_provider = attributes[:'check_free_provider']
87
+ end
88
+
89
+ if attributes.key?(:'check_https_website')
90
+ self.check_https_website = attributes[:'check_https_website']
91
+ end
92
+
93
+ if attributes.key?(:'check_dns')
94
+ self.check_dns = attributes[:'check_dns']
95
+ end
96
+
97
+ if attributes.key?(:'check_domain_age_hint')
98
+ self.check_domain_age_hint = attributes[:'check_domain_age_hint']
99
+ end
100
+ end
101
+
102
+ # Show invalid properties with the reasons. Usually used together with valid?
103
+ # @return Array for valid properties with the reasons
104
+ def list_invalid_properties
105
+ invalid_properties = Array.new
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ true
113
+ end
114
+
115
+ # Checks equality by comparing each attribute.
116
+ # @param [Object] Object to be compared
117
+ def ==(o)
118
+ return true if self.equal?(o)
119
+ self.class == o.class &&
120
+ check_random_local_part == o.check_random_local_part &&
121
+ check_free_provider == o.check_free_provider &&
122
+ check_https_website == o.check_https_website &&
123
+ check_dns == o.check_dns &&
124
+ check_domain_age_hint == o.check_domain_age_hint
125
+ end
126
+
127
+ # @see the `==` method
128
+ # @param [Object] Object to be compared
129
+ def eql?(o)
130
+ self == o
131
+ end
132
+
133
+ # Calculates hash code according to all attributes.
134
+ # @return [Integer] Hash code
135
+ def hash
136
+ [check_random_local_part, check_free_provider, check_https_website, check_dns, check_domain_age_hint].hash
137
+ end
138
+
139
+ # Builds the object from hash
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ # @return [Object] Returns the model itself
142
+ def self.build_from_hash(attributes)
143
+ new.build_from_hash(attributes)
144
+ end
145
+
146
+ # Builds the object from hash
147
+ # @param [Hash] attributes Model attributes in the form of hash
148
+ # @return [Object] Returns the model itself
149
+ def build_from_hash(attributes)
150
+ return nil unless attributes.is_a?(Hash)
151
+ self.class.openapi_types.each_pair do |key, type|
152
+ if type =~ /\AArray<(.*)>/i
153
+ # check to ensure the input is an array given that the attribute
154
+ # is documented as an array but the input is not
155
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
156
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
157
+ end
158
+ elsif !attributes[self.class.attribute_map[key]].nil?
159
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
160
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
161
+ end
162
+
163
+ self
164
+ end
165
+
166
+ # Deserializes the data based on type
167
+ # @param string type Data type
168
+ # @param string value Value to be deserialized
169
+ # @return [Object] Deserialized data
170
+ def _deserialize(type, value)
171
+ case type.to_sym
172
+ when :DateTime
173
+ DateTime.parse(value)
174
+ when :Date
175
+ Date.parse(value)
176
+ when :String
177
+ value.to_s
178
+ when :Integer
179
+ value.to_i
180
+ when :Float
181
+ value.to_f
182
+ when :Boolean
183
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
184
+ true
185
+ else
186
+ false
187
+ end
188
+ when :Object
189
+ # generic object (usually a Hash), return directly
190
+ value
191
+ when /\AArray<(?<inner_type>.+)>\z/
192
+ inner_type = Regexp.last_match[:inner_type]
193
+ value.map { |v| _deserialize(inner_type, v) }
194
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
195
+ k_type = Regexp.last_match[:k_type]
196
+ v_type = Regexp.last_match[:v_type]
197
+ {}.tap do |hash|
198
+ value.each do |k, v|
199
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
200
+ end
201
+ end
202
+ else # model
203
+ MailSlurpClient.const_get(type).build_from_hash(value)
204
+ end
205
+ end
206
+
207
+ # Returns the string representation of the object
208
+ # @return [String] String presentation of the object
209
+ def to_s
210
+ to_hash.to_s
211
+ end
212
+
213
+ # to_body is an alias to to_hash (backward compatibility)
214
+ # @return [Hash] Returns the object in the form of hash
215
+ def to_body
216
+ to_hash
217
+ end
218
+
219
+ # Returns the object in the form of hash
220
+ # @return [Hash] Returns the object in the form of hash
221
+ def to_hash
222
+ hash = {}
223
+ self.class.attribute_map.each_pair do |attr, param|
224
+ value = self.send(attr)
225
+ if value.nil?
226
+ is_nullable = self.class.openapi_nullable.include?(attr)
227
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
228
+ end
229
+
230
+ hash[param] = _to_hash(value)
231
+ end
232
+ hash
233
+ end
234
+
235
+ # Outputs non-array value in the form of hash
236
+ # For object, use to_hash. Otherwise, just return the value
237
+ # @param [Object] value Any valid value
238
+ # @return [Hash] Returns the value in the form of hash
239
+ def _to_hash(value)
240
+ if value.is_a?(Array)
241
+ value.compact.map { |v| _to_hash(v) }
242
+ elsif value.is_a?(Hash)
243
+ {}.tap do |hash|
244
+ value.each { |k, v| hash[k] = _to_hash(v) }
245
+ end
246
+ elsif value.respond_to? :to_hash
247
+ value.to_hash
248
+ else
249
+ value
250
+ end
251
+ end
252
+ end
253
+ end
@@ -15,20 +15,24 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # A compact representation of a full email. Used in list endpoints to keep response sizes low. Body and attachments are not included. To get all fields of the email use the `getEmail` method with the email projection's ID. See `EmailDto` for documentation on projection properties.
17
17
  class EmailProjection
18
- attr_accessor :subject
18
+ attr_accessor :id
19
19
 
20
- attr_accessor :size_bytes
20
+ attr_accessor :thread_id
21
21
 
22
- attr_accessor :message_id
22
+ attr_accessor :from
23
23
 
24
- attr_accessor :favourite
24
+ attr_accessor :subject
25
25
 
26
- attr_accessor :domain_id
26
+ attr_accessor :sender
27
27
 
28
- attr_accessor :attachments
28
+ attr_accessor :recipients
29
29
 
30
30
  attr_accessor :inbox_id
31
31
 
32
+ attr_accessor :attachments
33
+
34
+ attr_accessor :size_bytes
35
+
32
36
  attr_accessor :created_at
33
37
 
34
38
  attr_accessor :to
@@ -37,9 +41,11 @@ module MailSlurpClient
37
41
 
38
42
  attr_accessor :bcc
39
43
 
40
- attr_accessor :sender
44
+ attr_accessor :message_id
41
45
 
42
- attr_accessor :recipients
46
+ attr_accessor :favourite
47
+
48
+ attr_accessor :domain_id
43
49
 
44
50
  attr_accessor :plus_address
45
51
 
@@ -59,28 +65,25 @@ module MailSlurpClient
59
65
 
60
66
  attr_accessor :team_access
61
67
 
62
- attr_accessor :id
63
-
64
- attr_accessor :thread_id
65
-
66
- attr_accessor :from
67
-
68
68
  # Attribute mapping from ruby-style variable name to JSON key.
69
69
  def self.attribute_map
70
70
  {
71
+ :'id' => :'id',
72
+ :'thread_id' => :'threadId',
73
+ :'from' => :'from',
71
74
  :'subject' => :'subject',
72
- :'size_bytes' => :'sizeBytes',
73
- :'message_id' => :'messageId',
74
- :'favourite' => :'favourite',
75
- :'domain_id' => :'domainId',
76
- :'attachments' => :'attachments',
75
+ :'sender' => :'sender',
76
+ :'recipients' => :'recipients',
77
77
  :'inbox_id' => :'inboxId',
78
+ :'attachments' => :'attachments',
79
+ :'size_bytes' => :'sizeBytes',
78
80
  :'created_at' => :'createdAt',
79
81
  :'to' => :'to',
80
82
  :'cc' => :'cc',
81
83
  :'bcc' => :'bcc',
82
- :'sender' => :'sender',
83
- :'recipients' => :'recipients',
84
+ :'message_id' => :'messageId',
85
+ :'favourite' => :'favourite',
86
+ :'domain_id' => :'domainId',
84
87
  :'plus_address' => :'plusAddress',
85
88
  :'imap_uid' => :'imapUid',
86
89
  :'in_reply_to' => :'inReplyTo',
@@ -89,29 +92,29 @@ module MailSlurpClient
89
92
  :'text_excerpt' => :'textExcerpt',
90
93
  :'body_part_content_types' => :'bodyPartContentTypes',
91
94
  :'body_md5_hash' => :'bodyMD5Hash',
92
- :'team_access' => :'teamAccess',
93
- :'id' => :'id',
94
- :'thread_id' => :'threadId',
95
- :'from' => :'from'
95
+ :'team_access' => :'teamAccess'
96
96
  }
97
97
  end
98
98
 
99
99
  # Attribute type mapping.
100
100
  def self.openapi_types
101
101
  {
102
+ :'id' => :'String',
103
+ :'thread_id' => :'String',
104
+ :'from' => :'String',
102
105
  :'subject' => :'String',
103
- :'size_bytes' => :'Integer',
104
- :'message_id' => :'String',
105
- :'favourite' => :'Boolean',
106
- :'domain_id' => :'String',
107
- :'attachments' => :'Array<String>',
106
+ :'sender' => :'Sender',
107
+ :'recipients' => :'EmailRecipients',
108
108
  :'inbox_id' => :'String',
109
+ :'attachments' => :'Array<String>',
110
+ :'size_bytes' => :'Integer',
109
111
  :'created_at' => :'DateTime',
110
112
  :'to' => :'Array<String>',
111
113
  :'cc' => :'Array<String>',
112
114
  :'bcc' => :'Array<String>',
113
- :'sender' => :'Sender',
114
- :'recipients' => :'EmailRecipients',
115
+ :'message_id' => :'String',
116
+ :'favourite' => :'Boolean',
117
+ :'domain_id' => :'String',
115
118
  :'plus_address' => :'String',
116
119
  :'imap_uid' => :'Integer',
117
120
  :'in_reply_to' => :'String',
@@ -120,26 +123,25 @@ module MailSlurpClient
120
123
  :'text_excerpt' => :'String',
121
124
  :'body_part_content_types' => :'Array<String>',
122
125
  :'body_md5_hash' => :'String',
123
- :'team_access' => :'Boolean',
124
- :'id' => :'String',
125
- :'thread_id' => :'String',
126
- :'from' => :'String'
126
+ :'team_access' => :'Boolean'
127
127
  }
128
128
  end
129
129
 
130
130
  # List of attributes with nullable: true
131
131
  def self.openapi_nullable
132
132
  Set.new([
133
+ :'thread_id',
134
+ :'from',
133
135
  :'subject',
136
+ :'sender',
137
+ :'recipients',
138
+ :'attachments',
134
139
  :'size_bytes',
140
+ :'cc',
141
+ :'bcc',
135
142
  :'message_id',
136
143
  :'favourite',
137
144
  :'domain_id',
138
- :'attachments',
139
- :'cc',
140
- :'bcc',
141
- :'sender',
142
- :'recipients',
143
145
  :'plus_address',
144
146
  :'imap_uid',
145
147
  :'in_reply_to',
@@ -147,8 +149,6 @@ module MailSlurpClient
147
149
  :'text_excerpt',
148
150
  :'body_part_content_types',
149
151
  :'body_md5_hash',
150
- :'thread_id',
151
- :'from'
152
152
  ])
153
153
  end
154
154
 
@@ -167,24 +167,32 @@ module MailSlurpClient
167
167
  h[k.to_sym] = v
168
168
  }
169
169
 
170
- if attributes.key?(:'subject')
171
- self.subject = attributes[:'subject']
170
+ if attributes.key?(:'id')
171
+ self.id = attributes[:'id']
172
172
  end
173
173
 
174
- if attributes.key?(:'size_bytes')
175
- self.size_bytes = attributes[:'size_bytes']
174
+ if attributes.key?(:'thread_id')
175
+ self.thread_id = attributes[:'thread_id']
176
176
  end
177
177
 
178
- if attributes.key?(:'message_id')
179
- self.message_id = attributes[:'message_id']
178
+ if attributes.key?(:'from')
179
+ self.from = attributes[:'from']
180
180
  end
181
181
 
182
- if attributes.key?(:'favourite')
183
- self.favourite = attributes[:'favourite']
182
+ if attributes.key?(:'subject')
183
+ self.subject = attributes[:'subject']
184
184
  end
185
185
 
186
- if attributes.key?(:'domain_id')
187
- self.domain_id = attributes[:'domain_id']
186
+ if attributes.key?(:'sender')
187
+ self.sender = attributes[:'sender']
188
+ end
189
+
190
+ if attributes.key?(:'recipients')
191
+ self.recipients = attributes[:'recipients']
192
+ end
193
+
194
+ if attributes.key?(:'inbox_id')
195
+ self.inbox_id = attributes[:'inbox_id']
188
196
  end
189
197
 
190
198
  if attributes.key?(:'attachments')
@@ -193,8 +201,8 @@ module MailSlurpClient
193
201
  end
194
202
  end
195
203
 
196
- if attributes.key?(:'inbox_id')
197
- self.inbox_id = attributes[:'inbox_id']
204
+ if attributes.key?(:'size_bytes')
205
+ self.size_bytes = attributes[:'size_bytes']
198
206
  end
199
207
 
200
208
  if attributes.key?(:'created_at')
@@ -219,12 +227,16 @@ module MailSlurpClient
219
227
  end
220
228
  end
221
229
 
222
- if attributes.key?(:'sender')
223
- self.sender = attributes[:'sender']
230
+ if attributes.key?(:'message_id')
231
+ self.message_id = attributes[:'message_id']
224
232
  end
225
233
 
226
- if attributes.key?(:'recipients')
227
- self.recipients = attributes[:'recipients']
234
+ if attributes.key?(:'favourite')
235
+ self.favourite = attributes[:'favourite']
236
+ end
237
+
238
+ if attributes.key?(:'domain_id')
239
+ self.domain_id = attributes[:'domain_id']
228
240
  end
229
241
 
230
242
  if attributes.key?(:'plus_address')
@@ -264,24 +276,16 @@ module MailSlurpClient
264
276
  if attributes.key?(:'team_access')
265
277
  self.team_access = attributes[:'team_access']
266
278
  end
267
-
268
- if attributes.key?(:'id')
269
- self.id = attributes[:'id']
270
- end
271
-
272
- if attributes.key?(:'thread_id')
273
- self.thread_id = attributes[:'thread_id']
274
- end
275
-
276
- if attributes.key?(:'from')
277
- self.from = attributes[:'from']
278
- end
279
279
  end
280
280
 
281
281
  # Show invalid properties with the reasons. Usually used together with valid?
282
282
  # @return Array for valid properties with the reasons
283
283
  def list_invalid_properties
284
284
  invalid_properties = Array.new
285
+ if @id.nil?
286
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
287
+ end
288
+
285
289
  if @inbox_id.nil?
286
290
  invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
287
291
  end
@@ -302,22 +306,18 @@ module MailSlurpClient
302
306
  invalid_properties.push('invalid value for "team_access", team_access cannot be nil.')
303
307
  end
304
308
 
305
- if @id.nil?
306
- invalid_properties.push('invalid value for "id", id cannot be nil.')
307
- end
308
-
309
309
  invalid_properties
310
310
  end
311
311
 
312
312
  # Check to see if the all the properties in the model are valid
313
313
  # @return true if the model is valid
314
314
  def valid?
315
+ return false if @id.nil?
315
316
  return false if @inbox_id.nil?
316
317
  return false if @created_at.nil?
317
318
  return false if @to.nil?
318
319
  return false if @read.nil?
319
320
  return false if @team_access.nil?
320
- return false if @id.nil?
321
321
  true
322
322
  end
323
323
 
@@ -326,19 +326,22 @@ module MailSlurpClient
326
326
  def ==(o)
327
327
  return true if self.equal?(o)
328
328
  self.class == o.class &&
329
+ id == o.id &&
330
+ thread_id == o.thread_id &&
331
+ from == o.from &&
329
332
  subject == o.subject &&
330
- size_bytes == o.size_bytes &&
331
- message_id == o.message_id &&
332
- favourite == o.favourite &&
333
- domain_id == o.domain_id &&
334
- attachments == o.attachments &&
333
+ sender == o.sender &&
334
+ recipients == o.recipients &&
335
335
  inbox_id == o.inbox_id &&
336
+ attachments == o.attachments &&
337
+ size_bytes == o.size_bytes &&
336
338
  created_at == o.created_at &&
337
339
  to == o.to &&
338
340
  cc == o.cc &&
339
341
  bcc == o.bcc &&
340
- sender == o.sender &&
341
- recipients == o.recipients &&
342
+ message_id == o.message_id &&
343
+ favourite == o.favourite &&
344
+ domain_id == o.domain_id &&
342
345
  plus_address == o.plus_address &&
343
346
  imap_uid == o.imap_uid &&
344
347
  in_reply_to == o.in_reply_to &&
@@ -347,10 +350,7 @@ module MailSlurpClient
347
350
  text_excerpt == o.text_excerpt &&
348
351
  body_part_content_types == o.body_part_content_types &&
349
352
  body_md5_hash == o.body_md5_hash &&
350
- team_access == o.team_access &&
351
- id == o.id &&
352
- thread_id == o.thread_id &&
353
- from == o.from
353
+ team_access == o.team_access
354
354
  end
355
355
 
356
356
  # @see the `==` method
@@ -362,7 +362,7 @@ module MailSlurpClient
362
362
  # Calculates hash code according to all attributes.
363
363
  # @return [Integer] Hash code
364
364
  def hash
365
- [subject, size_bytes, message_id, favourite, domain_id, attachments, inbox_id, created_at, to, cc, bcc, sender, recipients, plus_address, imap_uid, in_reply_to, read, body_excerpt, text_excerpt, body_part_content_types, body_md5_hash, team_access, id, thread_id, from].hash
365
+ [id, thread_id, from, subject, sender, recipients, inbox_id, attachments, size_bytes, created_at, to, cc, bcc, message_id, favourite, domain_id, plus_address, imap_uid, in_reply_to, read, body_excerpt, text_excerpt, body_part_content_types, body_md5_hash, team_access].hash
366
366
  end
367
367
 
368
368
  # Builds the object from hash