mailslurp_client 17.2.0 → 17.3.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 (176) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/campaign_probe_controller_api.rb +138 -0
  3. data/lib/mailslurp_client/api/domain_monitor_controller_api.rb +264 -0
  4. data/lib/mailslurp_client/api/email_audit_controller_api.rb +334 -0
  5. data/lib/mailslurp_client/api/email_controller_api.rb +124 -0
  6. data/lib/mailslurp_client/api/inbox_controller_api.rb +4 -4
  7. data/lib/mailslurp_client/api/phone_controller_api.rb +1312 -81
  8. data/lib/mailslurp_client/api/sms_controller_api.rb +125 -0
  9. data/lib/mailslurp_client/api/tools_controller_api.rb +806 -0
  10. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +15 -15
  11. data/lib/mailslurp_client/models/acquire_phone_pool_lease_options.rb +233 -0
  12. data/lib/mailslurp_client/models/add_phone_pool_numbers_options.rb +213 -0
  13. data/lib/mailslurp_client/models/ai_transform_mapping_projection.rb +27 -27
  14. data/lib/mailslurp_client/models/ai_transform_projection.rb +28 -28
  15. data/lib/mailslurp_client/models/alias_projection.rb +45 -45
  16. data/lib/mailslurp_client/models/alias_thread_projection.rb +42 -42
  17. data/lib/mailslurp_client/models/analyze_dmarc_report_options.rb +248 -0
  18. data/lib/mailslurp_client/models/analyze_dmarc_report_results.rb +386 -0
  19. data/lib/mailslurp_client/models/analyze_email_headers_options.rb +240 -0
  20. data/lib/mailslurp_client/models/analyze_email_headers_results.rb +275 -0
  21. data/lib/mailslurp_client/models/attachment_projection.rb +50 -50
  22. data/lib/mailslurp_client/models/available_phone_number_dto.rb +325 -0
  23. data/lib/mailslurp_client/models/available_phone_numbers_result.rb +236 -0
  24. data/lib/mailslurp_client/models/bounce_projection.rb +28 -28
  25. data/lib/mailslurp_client/models/bounce_recipient_projection.rb +10 -10
  26. data/lib/mailslurp_client/models/campaign_probe_run_comparison_dto.rb +397 -0
  27. data/lib/mailslurp_client/models/check_campaign_probe_options.rb +371 -0
  28. data/lib/mailslurp_client/models/check_campaign_probe_results.rb +482 -0
  29. data/lib/mailslurp_client/models/check_dns_propagation_options.rb +297 -0
  30. data/lib/mailslurp_client/models/check_dns_propagation_results.rb +361 -0
  31. data/lib/mailslurp_client/models/check_domain_monitor_options.rb +243 -0
  32. data/lib/mailslurp_client/models/check_domain_monitor_results.rb +398 -0
  33. data/lib/mailslurp_client/models/check_email_audit_options.rb +405 -0
  34. data/lib/mailslurp_client/models/check_email_auth_stack_options.rb +248 -0
  35. data/lib/mailslurp_client/models/check_email_auth_stack_results.rb +462 -0
  36. data/lib/mailslurp_client/models/check_email_blacklist_options.rb +241 -0
  37. data/lib/mailslurp_client/models/check_email_blacklist_results.rb +366 -0
  38. data/lib/mailslurp_client/models/connector_event_projection.rb +42 -42
  39. data/lib/mailslurp_client/models/connector_projection.rb +42 -42
  40. data/lib/mailslurp_client/models/contact_projection.rb +15 -15
  41. data/lib/mailslurp_client/models/create_email_audit_options.rb +394 -0
  42. data/lib/mailslurp_client/models/create_phone_number_options.rb +25 -4
  43. data/lib/mailslurp_client/models/create_phone_pool_options.rb +220 -0
  44. data/lib/mailslurp_client/models/create_phone_provisioning_job_item_options.rb +256 -0
  45. data/lib/mailslurp_client/models/create_phone_provisioning_job_options.rb +284 -0
  46. data/lib/mailslurp_client/models/dmarc_report_metadata.rb +308 -0
  47. data/lib/mailslurp_client/models/dmarc_report_source_summary.rb +274 -0
  48. data/lib/mailslurp_client/models/dns_propagation_resolver_result.rb +252 -0
  49. data/lib/mailslurp_client/models/domain_monitor_run_comparison_dto.rb +369 -0
  50. data/lib/mailslurp_client/models/domain_monitor_summary_dto.rb +248 -0
  51. data/lib/mailslurp_client/models/email_audit_analysis_result.rb +620 -0
  52. data/lib/mailslurp_client/models/email_audit_comparison_dto.rb +411 -0
  53. data/lib/mailslurp_client/models/email_audit_dto.rb +308 -0
  54. data/lib/mailslurp_client/models/email_audit_spelling_issue.rb +276 -0
  55. data/lib/mailslurp_client/models/email_audit_url_issue.rb +236 -0
  56. data/lib/mailslurp_client/models/email_blacklist_ip_result.rb +242 -0
  57. data/lib/mailslurp_client/models/email_blacklist_listing_result.rb +258 -0
  58. data/lib/mailslurp_client/models/email_header_analysis_summary.rb +242 -0
  59. data/lib/mailslurp_client/models/email_header_received_hop.rb +242 -0
  60. data/lib/mailslurp_client/models/email_projection.rb +88 -88
  61. data/lib/mailslurp_client/models/email_thread_projection.rb +54 -54
  62. data/lib/mailslurp_client/models/entity_automation_item_projection.rb +33 -33
  63. data/lib/mailslurp_client/models/entity_event_item_projection.rb +42 -42
  64. data/lib/mailslurp_client/models/entity_favourite_item_projection.rb +29 -29
  65. data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +27 -27
  66. data/lib/mailslurp_client/models/generate_spf_record_options.rb +357 -0
  67. data/lib/mailslurp_client/models/generate_spf_record_results.rb +318 -0
  68. data/lib/mailslurp_client/models/get_or_create_phone_pool_options.rb +220 -0
  69. data/lib/mailslurp_client/models/group_projection.rb +15 -15
  70. data/lib/mailslurp_client/models/guest_portal_user_projection.rb +47 -47
  71. data/lib/mailslurp_client/models/imap_email_projection.rb +18 -18
  72. data/lib/mailslurp_client/models/inbox_forwarder_event_projection.rb +21 -21
  73. data/lib/mailslurp_client/models/inbox_replier_event_projection.rb +33 -33
  74. data/lib/mailslurp_client/models/list_unsubscribe_recipient_projection.rb +19 -19
  75. data/lib/mailslurp_client/models/lookup_dkim_domain_options.rb +275 -0
  76. data/lib/mailslurp_client/models/lookup_dkim_domain_results.rb +304 -0
  77. data/lib/mailslurp_client/models/lookup_ptr_options.rb +241 -0
  78. data/lib/mailslurp_client/models/lookup_ptr_results.rb +305 -0
  79. data/lib/mailslurp_client/models/lookup_spf_domain_options.rb +240 -0
  80. data/lib/mailslurp_client/models/lookup_spf_domain_results.rb +305 -0
  81. data/lib/mailslurp_client/models/missed_email_projection.rb +28 -28
  82. data/lib/mailslurp_client/models/missed_sms_projection.rb +32 -32
  83. data/lib/mailslurp_client/models/opt_in_identity_projection.rb +18 -18
  84. data/lib/mailslurp_client/models/page_ai_transform_mapping_projection.rb +19 -19
  85. data/lib/mailslurp_client/models/page_ai_transform_projection.rb +19 -19
  86. data/lib/mailslurp_client/models/page_ai_transform_result_projection.rb +19 -19
  87. data/lib/mailslurp_client/models/page_alias.rb +19 -19
  88. data/lib/mailslurp_client/models/page_alias_thread_projection.rb +19 -19
  89. data/lib/mailslurp_client/models/page_attachment_entity.rb +19 -19
  90. data/lib/mailslurp_client/models/page_bounced_email.rb +19 -19
  91. data/lib/mailslurp_client/models/page_bounced_recipients.rb +19 -19
  92. data/lib/mailslurp_client/models/page_complaint.rb +19 -19
  93. data/lib/mailslurp_client/models/page_connector.rb +19 -19
  94. data/lib/mailslurp_client/models/page_connector_events.rb +19 -19
  95. data/lib/mailslurp_client/models/page_contact_projection.rb +19 -19
  96. data/lib/mailslurp_client/models/page_delivery_status.rb +19 -19
  97. data/lib/mailslurp_client/models/page_device_preview_run_projection.rb +19 -19
  98. data/lib/mailslurp_client/models/page_email_preview.rb +19 -19
  99. data/lib/mailslurp_client/models/page_email_projection.rb +19 -19
  100. data/lib/mailslurp_client/models/page_email_thread_projection.rb +19 -19
  101. data/lib/mailslurp_client/models/page_email_validation_request.rb +19 -19
  102. data/lib/mailslurp_client/models/page_entity_automation_items.rb +19 -19
  103. data/lib/mailslurp_client/models/page_entity_event_items.rb +19 -19
  104. data/lib/mailslurp_client/models/page_entity_favourite_items.rb +19 -19
  105. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +19 -19
  106. data/lib/mailslurp_client/models/page_group_projection.rb +19 -19
  107. data/lib/mailslurp_client/models/page_guest_portal_users.rb +19 -19
  108. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +19 -19
  109. data/lib/mailslurp_client/models/page_inbox_forwarder_events.rb +19 -19
  110. data/lib/mailslurp_client/models/page_inbox_projection.rb +19 -19
  111. data/lib/mailslurp_client/models/page_inbox_replier_dto.rb +19 -19
  112. data/lib/mailslurp_client/models/page_inbox_replier_events.rb +19 -19
  113. data/lib/mailslurp_client/models/page_inbox_tags.rb +19 -19
  114. data/lib/mailslurp_client/models/page_list_unsubscribe_recipients.rb +19 -19
  115. data/lib/mailslurp_client/models/page_missed_email_projection.rb +19 -19
  116. data/lib/mailslurp_client/models/page_missed_sms_projection.rb +19 -19
  117. data/lib/mailslurp_client/models/page_opt_in_identity_projection.rb +19 -19
  118. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +19 -19
  119. data/lib/mailslurp_client/models/page_phone_message_thread_item_projection.rb +19 -19
  120. data/lib/mailslurp_client/models/page_phone_message_thread_projection.rb +19 -19
  121. data/lib/mailslurp_client/models/page_phone_number_projection.rb +19 -19
  122. data/lib/mailslurp_client/models/page_phone_number_release_projection.rb +19 -19
  123. data/lib/mailslurp_client/models/page_plus_address_projection.rb +19 -19
  124. data/lib/mailslurp_client/models/page_reputation_items.rb +19 -19
  125. data/lib/mailslurp_client/models/page_ruleset_dto.rb +19 -19
  126. data/lib/mailslurp_client/models/page_scheduled_jobs.rb +19 -19
  127. data/lib/mailslurp_client/models/page_sent_email_projection.rb +19 -19
  128. data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +19 -19
  129. data/lib/mailslurp_client/models/page_sent_sms_projection.rb +19 -19
  130. data/lib/mailslurp_client/models/page_sms_projection.rb +19 -19
  131. data/lib/mailslurp_client/models/page_template_projection.rb +19 -19
  132. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +19 -19
  133. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +19 -19
  134. data/lib/mailslurp_client/models/page_webhook_endpoint_projection.rb +19 -19
  135. data/lib/mailslurp_client/models/page_webhook_projection.rb +19 -19
  136. data/lib/mailslurp_client/models/page_webhook_result.rb +19 -19
  137. data/lib/mailslurp_client/models/pageable_object.rb +22 -22
  138. data/lib/mailslurp_client/models/phone_message_thread_item_projection.rb +18 -18
  139. data/lib/mailslurp_client/models/phone_number_dto.rb +49 -4
  140. data/lib/mailslurp_client/models/phone_number_line_type_intelligence_dto.rb +242 -0
  141. data/lib/mailslurp_client/models/phone_number_line_type_lookup_dto.rb +286 -0
  142. data/lib/mailslurp_client/models/phone_number_projection.rb +80 -35
  143. data/lib/mailslurp_client/models/phone_number_release_projection.rb +39 -39
  144. data/lib/mailslurp_client/models/phone_pool_detail_dto.rb +334 -0
  145. data/lib/mailslurp_client/models/phone_pool_dto.rb +318 -0
  146. data/lib/mailslurp_client/models/phone_pool_lease_dto.rb +351 -0
  147. data/lib/mailslurp_client/models/phone_pool_member_dto.rb +333 -0
  148. data/lib/mailslurp_client/models/phone_provider_capabilities_result.rb +284 -0
  149. data/lib/mailslurp_client/models/phone_provisioning_job_dto.rb +434 -0
  150. data/lib/mailslurp_client/models/phone_provisioning_job_item_dto.rb +336 -0
  151. data/lib/mailslurp_client/models/phone_sms_prepaid_credit_dto.rb +340 -0
  152. data/lib/mailslurp_client/models/phone_sms_prepaid_credits_dto.rb +241 -0
  153. data/lib/mailslurp_client/models/plus_address_projection.rb +27 -27
  154. data/lib/mailslurp_client/models/recipient_projection.rb +13 -13
  155. data/lib/mailslurp_client/models/reputation_item_projection.rb +41 -41
  156. data/lib/mailslurp_client/models/search_available_phone_numbers_options.rb +377 -0
  157. data/lib/mailslurp_client/models/sender_projection.rb +13 -13
  158. data/lib/mailslurp_client/models/sent_email_projection.rb +63 -63
  159. data/lib/mailslurp_client/models/sent_sms_projection.rb +18 -18
  160. data/lib/mailslurp_client/models/sms_projection.rb +18 -18
  161. data/lib/mailslurp_client/models/smtp_auth_diagnostic_result.rb +235 -0
  162. data/lib/mailslurp_client/models/smtp_diagnostic_step.rb +236 -0
  163. data/lib/mailslurp_client/models/smtp_tls_diagnostic_result.rb +245 -0
  164. data/lib/mailslurp_client/models/sort_object.rb +10 -10
  165. data/lib/mailslurp_client/models/spf_mechanism_result.rb +229 -0
  166. data/lib/mailslurp_client/models/template_projection.rb +41 -41
  167. data/lib/mailslurp_client/models/test_smtp_server_options.rb +337 -0
  168. data/lib/mailslurp_client/models/test_smtp_server_results.rb +297 -0
  169. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +27 -27
  170. data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +27 -27
  171. data/lib/mailslurp_client/models/update_phone_pool_options.rb +215 -0
  172. data/lib/mailslurp_client/models/validation_dto.rb +1 -5
  173. data/lib/mailslurp_client/models/webhook_projection.rb +45 -45
  174. data/lib/mailslurp_client/version.rb +1 -1
  175. data/lib/mailslurp_client.rb +67 -0
  176. metadata +69 -2
@@ -0,0 +1,286 @@
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 PhoneNumberLineTypeLookupDto
17
+ attr_accessor :phone_number
18
+
19
+ attr_accessor :national_format
20
+
21
+ attr_accessor :country_code
22
+
23
+ attr_accessor :country_prefix
24
+
25
+ attr_accessor :is_valid
26
+
27
+ attr_accessor :validation_errors
28
+
29
+ attr_accessor :line_type_intelligence
30
+
31
+ attr_accessor :mailslurp_phone_number
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'phone_number' => :'phoneNumber',
37
+ :'national_format' => :'nationalFormat',
38
+ :'country_code' => :'countryCode',
39
+ :'country_prefix' => :'countryPrefix',
40
+ :'is_valid' => :'isValid',
41
+ :'validation_errors' => :'validationErrors',
42
+ :'line_type_intelligence' => :'lineTypeIntelligence',
43
+ :'mailslurp_phone_number' => :'mailslurpPhoneNumber'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'phone_number' => :'String',
51
+ :'national_format' => :'String',
52
+ :'country_code' => :'String',
53
+ :'country_prefix' => :'String',
54
+ :'is_valid' => :'Boolean',
55
+ :'validation_errors' => :'Array<String>',
56
+ :'line_type_intelligence' => :'PhoneNumberLineTypeIntelligenceDto',
57
+ :'mailslurp_phone_number' => :'Boolean'
58
+ }
59
+ end
60
+
61
+ # List of attributes with nullable: true
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ ])
65
+ end
66
+
67
+ # Initializes the object
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ def initialize(attributes = {})
70
+ if (!attributes.is_a?(Hash))
71
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::PhoneNumberLineTypeLookupDto` initialize method"
72
+ end
73
+
74
+ # check to see if the attribute exists and convert string to symbol for hash key
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!self.class.attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::PhoneNumberLineTypeLookupDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
78
+ end
79
+ h[k.to_sym] = v
80
+ }
81
+
82
+ if attributes.key?(:'phone_number')
83
+ self.phone_number = attributes[:'phone_number']
84
+ end
85
+
86
+ if attributes.key?(:'national_format')
87
+ self.national_format = attributes[:'national_format']
88
+ end
89
+
90
+ if attributes.key?(:'country_code')
91
+ self.country_code = attributes[:'country_code']
92
+ end
93
+
94
+ if attributes.key?(:'country_prefix')
95
+ self.country_prefix = attributes[:'country_prefix']
96
+ end
97
+
98
+ if attributes.key?(:'is_valid')
99
+ self.is_valid = attributes[:'is_valid']
100
+ end
101
+
102
+ if attributes.key?(:'validation_errors')
103
+ if (value = attributes[:'validation_errors']).is_a?(Array)
104
+ self.validation_errors = value
105
+ end
106
+ end
107
+
108
+ if attributes.key?(:'line_type_intelligence')
109
+ self.line_type_intelligence = attributes[:'line_type_intelligence']
110
+ end
111
+
112
+ if attributes.key?(:'mailslurp_phone_number')
113
+ self.mailslurp_phone_number = attributes[:'mailslurp_phone_number']
114
+ end
115
+ end
116
+
117
+ # Show invalid properties with the reasons. Usually used together with valid?
118
+ # @return Array for valid properties with the reasons
119
+ def list_invalid_properties
120
+ invalid_properties = Array.new
121
+ if @phone_number.nil?
122
+ invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
123
+ end
124
+
125
+ if @is_valid.nil?
126
+ invalid_properties.push('invalid value for "is_valid", is_valid cannot be nil.')
127
+ end
128
+
129
+ if @mailslurp_phone_number.nil?
130
+ invalid_properties.push('invalid value for "mailslurp_phone_number", mailslurp_phone_number cannot be nil.')
131
+ end
132
+
133
+ invalid_properties
134
+ end
135
+
136
+ # Check to see if the all the properties in the model are valid
137
+ # @return true if the model is valid
138
+ def valid?
139
+ return false if @phone_number.nil?
140
+ return false if @is_valid.nil?
141
+ return false if @mailslurp_phone_number.nil?
142
+ true
143
+ end
144
+
145
+ # Checks equality by comparing each attribute.
146
+ # @param [Object] Object to be compared
147
+ def ==(o)
148
+ return true if self.equal?(o)
149
+ self.class == o.class &&
150
+ phone_number == o.phone_number &&
151
+ national_format == o.national_format &&
152
+ country_code == o.country_code &&
153
+ country_prefix == o.country_prefix &&
154
+ is_valid == o.is_valid &&
155
+ validation_errors == o.validation_errors &&
156
+ line_type_intelligence == o.line_type_intelligence &&
157
+ mailslurp_phone_number == o.mailslurp_phone_number
158
+ end
159
+
160
+ # @see the `==` method
161
+ # @param [Object] Object to be compared
162
+ def eql?(o)
163
+ self == o
164
+ end
165
+
166
+ # Calculates hash code according to all attributes.
167
+ # @return [Integer] Hash code
168
+ def hash
169
+ [phone_number, national_format, country_code, country_prefix, is_valid, validation_errors, line_type_intelligence, mailslurp_phone_number].hash
170
+ end
171
+
172
+ # Builds the object from hash
173
+ # @param [Hash] attributes Model attributes in the form of hash
174
+ # @return [Object] Returns the model itself
175
+ def self.build_from_hash(attributes)
176
+ new.build_from_hash(attributes)
177
+ end
178
+
179
+ # Builds the object from hash
180
+ # @param [Hash] attributes Model attributes in the form of hash
181
+ # @return [Object] Returns the model itself
182
+ def build_from_hash(attributes)
183
+ return nil unless attributes.is_a?(Hash)
184
+ self.class.openapi_types.each_pair do |key, type|
185
+ if type =~ /\AArray<(.*)>/i
186
+ # check to ensure the input is an array given that the attribute
187
+ # is documented as an array but the input is not
188
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
189
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
190
+ end
191
+ elsif !attributes[self.class.attribute_map[key]].nil?
192
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
193
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
194
+ end
195
+
196
+ self
197
+ end
198
+
199
+ # Deserializes the data based on type
200
+ # @param string type Data type
201
+ # @param string value Value to be deserialized
202
+ # @return [Object] Deserialized data
203
+ def _deserialize(type, value)
204
+ case type.to_sym
205
+ when :DateTime
206
+ DateTime.parse(value)
207
+ when :Date
208
+ Date.parse(value)
209
+ when :String
210
+ value.to_s
211
+ when :Integer
212
+ value.to_i
213
+ when :Float
214
+ value.to_f
215
+ when :Boolean
216
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
217
+ true
218
+ else
219
+ false
220
+ end
221
+ when :Object
222
+ # generic object (usually a Hash), return directly
223
+ value
224
+ when /\AArray<(?<inner_type>.+)>\z/
225
+ inner_type = Regexp.last_match[:inner_type]
226
+ value.map { |v| _deserialize(inner_type, v) }
227
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
228
+ k_type = Regexp.last_match[:k_type]
229
+ v_type = Regexp.last_match[:v_type]
230
+ {}.tap do |hash|
231
+ value.each do |k, v|
232
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
233
+ end
234
+ end
235
+ else # model
236
+ MailSlurpClient.const_get(type).build_from_hash(value)
237
+ end
238
+ end
239
+
240
+ # Returns the string representation of the object
241
+ # @return [String] String presentation of the object
242
+ def to_s
243
+ to_hash.to_s
244
+ end
245
+
246
+ # to_body is an alias to to_hash (backward compatibility)
247
+ # @return [Hash] Returns the object in the form of hash
248
+ def to_body
249
+ to_hash
250
+ end
251
+
252
+ # Returns the object in the form of hash
253
+ # @return [Hash] Returns the object in the form of hash
254
+ def to_hash
255
+ hash = {}
256
+ self.class.attribute_map.each_pair do |attr, param|
257
+ value = self.send(attr)
258
+ if value.nil?
259
+ is_nullable = self.class.openapi_nullable.include?(attr)
260
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
261
+ end
262
+
263
+ hash[param] = _to_hash(value)
264
+ end
265
+ hash
266
+ end
267
+
268
+ # Outputs non-array value in the form of hash
269
+ # For object, use to_hash. Otherwise, just return the value
270
+ # @param [Object] value Any valid value
271
+ # @return [Hash] Returns the value in the form of hash
272
+ def _to_hash(value)
273
+ if value.is_a?(Array)
274
+ value.compact.map { |v| _to_hash(v) }
275
+ elsif value.is_a?(Hash)
276
+ {}.tap do |hash|
277
+ value.each { |k, v| hash[k] = _to_hash(v) }
278
+ end
279
+ elsif value.respond_to? :to_hash
280
+ value.to_hash
281
+ else
282
+ value
283
+ end
284
+ end
285
+ end
286
+ end
@@ -15,17 +15,27 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # Phone number projection
17
17
  class PhoneNumberProjection
18
+ attr_accessor :name
19
+
20
+ attr_accessor :id
21
+
18
22
  attr_accessor :user_id
19
23
 
24
+ attr_accessor :phone_country
25
+
20
26
  attr_accessor :created_at
21
27
 
22
- attr_accessor :phone_country
28
+ attr_accessor :provider_label
23
29
 
24
- attr_accessor :phone_number
30
+ attr_accessor :line_type
25
31
 
26
- attr_accessor :name
32
+ attr_accessor :carrier_name
27
33
 
28
- attr_accessor :id
34
+ attr_accessor :mobile_country_code
35
+
36
+ attr_accessor :mobile_network_code
37
+
38
+ attr_accessor :phone_number
29
39
 
30
40
  class EnumAttributeValidator
31
41
  attr_reader :datatype
@@ -52,24 +62,34 @@ module MailSlurpClient
52
62
  # Attribute mapping from ruby-style variable name to JSON key.
53
63
  def self.attribute_map
54
64
  {
65
+ :'name' => :'name',
66
+ :'id' => :'id',
55
67
  :'user_id' => :'userId',
56
- :'created_at' => :'createdAt',
57
68
  :'phone_country' => :'phoneCountry',
58
- :'phone_number' => :'phoneNumber',
59
- :'name' => :'name',
60
- :'id' => :'id'
69
+ :'created_at' => :'createdAt',
70
+ :'provider_label' => :'providerLabel',
71
+ :'line_type' => :'lineType',
72
+ :'carrier_name' => :'carrierName',
73
+ :'mobile_country_code' => :'mobileCountryCode',
74
+ :'mobile_network_code' => :'mobileNetworkCode',
75
+ :'phone_number' => :'phoneNumber'
61
76
  }
62
77
  end
63
78
 
64
79
  # Attribute type mapping.
65
80
  def self.openapi_types
66
81
  {
82
+ :'name' => :'String',
83
+ :'id' => :'String',
67
84
  :'user_id' => :'String',
68
- :'created_at' => :'DateTime',
69
85
  :'phone_country' => :'String',
70
- :'phone_number' => :'String',
71
- :'name' => :'String',
72
- :'id' => :'String'
86
+ :'created_at' => :'DateTime',
87
+ :'provider_label' => :'String',
88
+ :'line_type' => :'String',
89
+ :'carrier_name' => :'String',
90
+ :'mobile_country_code' => :'String',
91
+ :'mobile_network_code' => :'String',
92
+ :'phone_number' => :'String'
73
93
  }
74
94
  end
75
95
 
@@ -94,28 +114,48 @@ module MailSlurpClient
94
114
  h[k.to_sym] = v
95
115
  }
96
116
 
117
+ if attributes.key?(:'name')
118
+ self.name = attributes[:'name']
119
+ end
120
+
121
+ if attributes.key?(:'id')
122
+ self.id = attributes[:'id']
123
+ end
124
+
97
125
  if attributes.key?(:'user_id')
98
126
  self.user_id = attributes[:'user_id']
99
127
  end
100
128
 
129
+ if attributes.key?(:'phone_country')
130
+ self.phone_country = attributes[:'phone_country']
131
+ end
132
+
101
133
  if attributes.key?(:'created_at')
102
134
  self.created_at = attributes[:'created_at']
103
135
  end
104
136
 
105
- if attributes.key?(:'phone_country')
106
- self.phone_country = attributes[:'phone_country']
137
+ if attributes.key?(:'provider_label')
138
+ self.provider_label = attributes[:'provider_label']
107
139
  end
108
140
 
109
- if attributes.key?(:'phone_number')
110
- self.phone_number = attributes[:'phone_number']
141
+ if attributes.key?(:'line_type')
142
+ self.line_type = attributes[:'line_type']
111
143
  end
112
144
 
113
- if attributes.key?(:'name')
114
- self.name = attributes[:'name']
145
+ if attributes.key?(:'carrier_name')
146
+ self.carrier_name = attributes[:'carrier_name']
115
147
  end
116
148
 
117
- if attributes.key?(:'id')
118
- self.id = attributes[:'id']
149
+ if attributes.key?(:'mobile_country_code')
150
+ self.mobile_country_code = attributes[:'mobile_country_code']
151
+ end
152
+
153
+ if attributes.key?(:'mobile_network_code')
154
+ self.mobile_network_code = attributes[:'mobile_network_code']
155
+ end
156
+
157
+ if attributes.key?(:'phone_number')
158
+ self.phone_number = attributes[:'phone_number']
119
159
  end
120
160
  end
121
161
 
@@ -123,24 +163,24 @@ module MailSlurpClient
123
163
  # @return Array for valid properties with the reasons
124
164
  def list_invalid_properties
125
165
  invalid_properties = Array.new
126
- if @user_id.nil?
127
- invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
166
+ if @id.nil?
167
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
128
168
  end
129
169
 
130
- if @created_at.nil?
131
- invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
170
+ if @user_id.nil?
171
+ invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
132
172
  end
133
173
 
134
174
  if @phone_country.nil?
135
175
  invalid_properties.push('invalid value for "phone_country", phone_country cannot be nil.')
136
176
  end
137
177
 
138
- if @phone_number.nil?
139
- invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
178
+ if @created_at.nil?
179
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
140
180
  end
141
181
 
142
- if @id.nil?
143
- invalid_properties.push('invalid value for "id", id cannot be nil.')
182
+ if @phone_number.nil?
183
+ invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
144
184
  end
145
185
 
146
186
  invalid_properties
@@ -149,13 +189,13 @@ module MailSlurpClient
149
189
  # Check to see if the all the properties in the model are valid
150
190
  # @return true if the model is valid
151
191
  def valid?
192
+ return false if @id.nil?
152
193
  return false if @user_id.nil?
153
- return false if @created_at.nil?
154
194
  return false if @phone_country.nil?
155
195
  phone_country_validator = EnumAttributeValidator.new('String', ["US", "GB", "AU", "CA", "EE", "HK", "PL", "PT", "NL", "IL", "FI", "SE"])
156
196
  return false unless phone_country_validator.valid?(@phone_country)
197
+ return false if @created_at.nil?
157
198
  return false if @phone_number.nil?
158
- return false if @id.nil?
159
199
  true
160
200
  end
161
201
 
@@ -174,12 +214,17 @@ module MailSlurpClient
174
214
  def ==(o)
175
215
  return true if self.equal?(o)
176
216
  self.class == o.class &&
217
+ name == o.name &&
218
+ id == o.id &&
177
219
  user_id == o.user_id &&
178
- created_at == o.created_at &&
179
220
  phone_country == o.phone_country &&
180
- phone_number == o.phone_number &&
181
- name == o.name &&
182
- id == o.id
221
+ created_at == o.created_at &&
222
+ provider_label == o.provider_label &&
223
+ line_type == o.line_type &&
224
+ carrier_name == o.carrier_name &&
225
+ mobile_country_code == o.mobile_country_code &&
226
+ mobile_network_code == o.mobile_network_code &&
227
+ phone_number == o.phone_number
183
228
  end
184
229
 
185
230
  # @see the `==` method
@@ -191,7 +236,7 @@ module MailSlurpClient
191
236
  # Calculates hash code according to all attributes.
192
237
  # @return [Integer] Hash code
193
238
  def hash
194
- [user_id, created_at, phone_country, phone_number, name, id].hash
239
+ [name, id, user_id, phone_country, created_at, provider_label, line_type, carrier_name, mobile_country_code, mobile_network_code, phone_number].hash
195
240
  end
196
241
 
197
242
  # Builds the object from hash
@@ -15,22 +15,22 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # Released phone number projection
17
17
  class PhoneNumberReleaseProjection
18
- attr_accessor :user_id
18
+ attr_accessor :name
19
19
 
20
- attr_accessor :created_at
20
+ attr_accessor :id
21
+
22
+ attr_accessor :user_id
21
23
 
22
24
  attr_accessor :phone_country
23
25
 
26
+ attr_accessor :created_at
27
+
24
28
  attr_accessor :phone_number
25
29
 
26
30
  attr_accessor :subscription_schedule
27
31
 
28
32
  attr_accessor :plan_currency
29
33
 
30
- attr_accessor :name
31
-
32
- attr_accessor :id
33
-
34
34
  class EnumAttributeValidator
35
35
  attr_reader :datatype
36
36
  attr_reader :allowable_values
@@ -56,28 +56,28 @@ module MailSlurpClient
56
56
  # Attribute mapping from ruby-style variable name to JSON key.
57
57
  def self.attribute_map
58
58
  {
59
+ :'name' => :'name',
60
+ :'id' => :'id',
59
61
  :'user_id' => :'userId',
60
- :'created_at' => :'createdAt',
61
62
  :'phone_country' => :'phoneCountry',
63
+ :'created_at' => :'createdAt',
62
64
  :'phone_number' => :'phoneNumber',
63
65
  :'subscription_schedule' => :'subscriptionSchedule',
64
- :'plan_currency' => :'planCurrency',
65
- :'name' => :'name',
66
- :'id' => :'id'
66
+ :'plan_currency' => :'planCurrency'
67
67
  }
68
68
  end
69
69
 
70
70
  # Attribute type mapping.
71
71
  def self.openapi_types
72
72
  {
73
+ :'name' => :'String',
74
+ :'id' => :'String',
73
75
  :'user_id' => :'String',
74
- :'created_at' => :'DateTime',
75
76
  :'phone_country' => :'String',
77
+ :'created_at' => :'DateTime',
76
78
  :'phone_number' => :'String',
77
79
  :'subscription_schedule' => :'String',
78
- :'plan_currency' => :'String',
79
- :'name' => :'String',
80
- :'id' => :'String'
80
+ :'plan_currency' => :'String'
81
81
  }
82
82
  end
83
83
 
@@ -102,18 +102,26 @@ module MailSlurpClient
102
102
  h[k.to_sym] = v
103
103
  }
104
104
 
105
- if attributes.key?(:'user_id')
106
- self.user_id = attributes[:'user_id']
105
+ if attributes.key?(:'name')
106
+ self.name = attributes[:'name']
107
107
  end
108
108
 
109
- if attributes.key?(:'created_at')
110
- self.created_at = attributes[:'created_at']
109
+ if attributes.key?(:'id')
110
+ self.id = attributes[:'id']
111
+ end
112
+
113
+ if attributes.key?(:'user_id')
114
+ self.user_id = attributes[:'user_id']
111
115
  end
112
116
 
113
117
  if attributes.key?(:'phone_country')
114
118
  self.phone_country = attributes[:'phone_country']
115
119
  end
116
120
 
121
+ if attributes.key?(:'created_at')
122
+ self.created_at = attributes[:'created_at']
123
+ end
124
+
117
125
  if attributes.key?(:'phone_number')
118
126
  self.phone_number = attributes[:'phone_number']
119
127
  end
@@ -125,34 +133,26 @@ module MailSlurpClient
125
133
  if attributes.key?(:'plan_currency')
126
134
  self.plan_currency = attributes[:'plan_currency']
127
135
  end
128
-
129
- if attributes.key?(:'name')
130
- self.name = attributes[:'name']
131
- end
132
-
133
- if attributes.key?(:'id')
134
- self.id = attributes[:'id']
135
- end
136
136
  end
137
137
 
138
138
  # Show invalid properties with the reasons. Usually used together with valid?
139
139
  # @return Array for valid properties with the reasons
140
140
  def list_invalid_properties
141
141
  invalid_properties = Array.new
142
- if @user_id.nil?
143
- invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
142
+ if @id.nil?
143
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
144
144
  end
145
145
 
146
- if @created_at.nil?
147
- invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
146
+ if @user_id.nil?
147
+ invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
148
148
  end
149
149
 
150
150
  if @phone_country.nil?
151
151
  invalid_properties.push('invalid value for "phone_country", phone_country cannot be nil.')
152
152
  end
153
153
 
154
- if @id.nil?
155
- invalid_properties.push('invalid value for "id", id cannot be nil.')
154
+ if @created_at.nil?
155
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
156
156
  end
157
157
 
158
158
  invalid_properties
@@ -161,16 +161,16 @@ module MailSlurpClient
161
161
  # Check to see if the all the properties in the model are valid
162
162
  # @return true if the model is valid
163
163
  def valid?
164
+ return false if @id.nil?
164
165
  return false if @user_id.nil?
165
- return false if @created_at.nil?
166
166
  return false if @phone_country.nil?
167
167
  phone_country_validator = EnumAttributeValidator.new('String', ["US", "GB", "AU", "CA", "EE", "HK", "PL", "PT", "NL", "IL", "FI", "SE"])
168
168
  return false unless phone_country_validator.valid?(@phone_country)
169
+ return false if @created_at.nil?
169
170
  subscription_schedule_validator = EnumAttributeValidator.new('String', ["MONTHLY", "YEARLY"])
170
171
  return false unless subscription_schedule_validator.valid?(@subscription_schedule)
171
172
  plan_currency_validator = EnumAttributeValidator.new('String', ["EUR", "USD", "JPY", "GBP", "AUD", "CAD", "CHF", "CNY", "INR", "NZD"])
172
173
  return false unless plan_currency_validator.valid?(@plan_currency)
173
- return false if @id.nil?
174
174
  true
175
175
  end
176
176
 
@@ -209,14 +209,14 @@ module MailSlurpClient
209
209
  def ==(o)
210
210
  return true if self.equal?(o)
211
211
  self.class == o.class &&
212
+ name == o.name &&
213
+ id == o.id &&
212
214
  user_id == o.user_id &&
213
- created_at == o.created_at &&
214
215
  phone_country == o.phone_country &&
216
+ created_at == o.created_at &&
215
217
  phone_number == o.phone_number &&
216
218
  subscription_schedule == o.subscription_schedule &&
217
- plan_currency == o.plan_currency &&
218
- name == o.name &&
219
- id == o.id
219
+ plan_currency == o.plan_currency
220
220
  end
221
221
 
222
222
  # @see the `==` method
@@ -228,7 +228,7 @@ module MailSlurpClient
228
228
  # Calculates hash code according to all attributes.
229
229
  # @return [Integer] Hash code
230
230
  def hash
231
- [user_id, created_at, phone_country, phone_number, subscription_schedule, plan_currency, name, id].hash
231
+ [name, id, user_id, phone_country, created_at, phone_number, subscription_schedule, plan_currency].hash
232
232
  end
233
233
 
234
234
  # Builds the object from hash