mailslurp_client 15.0.1 → 15.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (158) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/lib/mailslurp_client/api/alias_controller_api.rb +59 -55
  4. data/lib/mailslurp_client/api/attachment_controller_api.rb +49 -60
  5. data/lib/mailslurp_client/api/bounce_controller_api.rb +26 -18
  6. data/lib/mailslurp_client/api/bulk_actions_controller_api.rb +15 -15
  7. data/lib/mailslurp_client/api/common_actions_controller_api.rb +128 -67
  8. data/lib/mailslurp_client/api/contact_controller_api.rb +22 -22
  9. data/lib/mailslurp_client/api/domain_controller_api.rb +32 -32
  10. data/lib/mailslurp_client/api/email_controller_api.rb +190 -116
  11. data/lib/mailslurp_client/api/expired_controller_api.rb +19 -19
  12. data/lib/mailslurp_client/api/export_controller_api.rb +38 -38
  13. data/lib/mailslurp_client/api/form_controller_api.rb +16 -18
  14. data/lib/mailslurp_client/api/group_controller_api.rb +52 -52
  15. data/lib/mailslurp_client/api/inbox_controller_api.rb +359 -225
  16. data/lib/mailslurp_client/api/inbox_forwarder_controller_api.rb +33 -29
  17. data/lib/mailslurp_client/api/inbox_ruleset_controller_api.rb +33 -29
  18. data/lib/mailslurp_client/api/mail_server_controller_api.rb +26 -26
  19. data/lib/mailslurp_client/api/missed_email_controller_api.rb +54 -42
  20. data/lib/mailslurp_client/api/sent_emails_controller_api.rb +157 -47
  21. data/lib/mailslurp_client/api/template_controller_api.rb +21 -21
  22. data/lib/mailslurp_client/api/tracking_controller_api.rb +16 -16
  23. data/lib/mailslurp_client/api/wait_for_controller_api.rb +128 -88
  24. data/lib/mailslurp_client/api/webhook_controller_api.rb +102 -86
  25. data/lib/mailslurp_client/configuration.rb +4 -4
  26. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +10 -25
  27. data/lib/mailslurp_client/models/alias_dto.rb +45 -56
  28. data/lib/mailslurp_client/models/alias_projection.rb +42 -72
  29. data/lib/mailslurp_client/models/attachment_entity.rb +34 -54
  30. data/lib/mailslurp_client/models/attachment_meta_data.rb +21 -21
  31. data/lib/mailslurp_client/models/attachment_projection.rb +36 -51
  32. data/lib/mailslurp_client/models/basic_auth_options.rb +0 -10
  33. data/lib/mailslurp_client/models/bounce_projection.rb +13 -23
  34. data/lib/mailslurp_client/models/bounce_recipient.rb +22 -42
  35. data/lib/mailslurp_client/models/bounced_email_dto.rb +56 -76
  36. data/lib/mailslurp_client/models/bounced_recipient_dto.rb +16 -31
  37. data/lib/mailslurp_client/models/bulk_send_email_options.rb +5 -0
  38. data/lib/mailslurp_client/models/condition_option.rb +2 -2
  39. data/lib/mailslurp_client/models/contact_dto.rb +53 -73
  40. data/lib/mailslurp_client/models/contact_projection.rb +42 -52
  41. data/lib/mailslurp_client/models/count_dto.rb +206 -0
  42. data/lib/mailslurp_client/models/create_contact_options.rb +42 -42
  43. data/lib/mailslurp_client/models/create_domain_options.rb +21 -16
  44. data/lib/mailslurp_client/models/create_group_options.rb +0 -5
  45. data/lib/mailslurp_client/models/create_inbox_dto.rb +58 -58
  46. data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +19 -14
  47. data/lib/mailslurp_client/models/create_inbox_ruleset_options.rb +23 -23
  48. data/lib/mailslurp_client/models/create_template_options.rb +0 -10
  49. data/lib/mailslurp_client/models/create_webhook_options.rb +18 -18
  50. data/lib/mailslurp_client/models/describe_mail_server_domain_result.rb +15 -25
  51. data/lib/mailslurp_client/models/dns_lookup_options.rb +24 -14
  52. data/lib/mailslurp_client/models/dns_lookup_result.rb +23 -42
  53. data/lib/mailslurp_client/models/dns_lookup_results.rb +0 -5
  54. data/lib/mailslurp_client/models/domain_dto.rb +59 -80
  55. data/lib/mailslurp_client/models/domain_name_record.rb +11 -30
  56. data/lib/mailslurp_client/models/domain_preview.rb +26 -50
  57. data/lib/mailslurp_client/models/email.rb +134 -135
  58. data/lib/mailslurp_client/models/email_analysis.rb +28 -28
  59. data/lib/mailslurp_client/models/email_content_match_result.rb +13 -23
  60. data/lib/mailslurp_client/models/email_links_result.rb +13 -23
  61. data/lib/mailslurp_client/models/email_preview.rb +47 -47
  62. data/lib/mailslurp_client/models/email_projection.rb +77 -97
  63. data/lib/mailslurp_client/models/email_recipients.rb +16 -15
  64. data/lib/mailslurp_client/models/email_text_lines_result.rb +13 -23
  65. data/lib/mailslurp_client/models/email_verification_result.rb +16 -36
  66. data/lib/mailslurp_client/models/expiration_defaults.rb +16 -26
  67. data/lib/mailslurp_client/models/expired_inbox_dto.rb +13 -28
  68. data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +22 -42
  69. data/lib/mailslurp_client/models/export_link.rb +0 -5
  70. data/lib/mailslurp_client/models/export_options.rb +1 -6
  71. data/lib/mailslurp_client/models/flush_expired_inboxes_result.rb +13 -23
  72. data/lib/mailslurp_client/models/forward_email_options.rb +36 -31
  73. data/lib/mailslurp_client/models/gravatar_url.rb +13 -23
  74. data/lib/mailslurp_client/models/group_contacts_dto.rb +13 -23
  75. data/lib/mailslurp_client/models/group_dto.rb +22 -37
  76. data/lib/mailslurp_client/models/group_projection.rb +22 -37
  77. data/lib/mailslurp_client/models/html_validation_result.rb +13 -14
  78. data/lib/mailslurp_client/models/{inbox.rb → inbox_dto.rb} +47 -57
  79. data/lib/mailslurp_client/models/inbox_exists_dto.rb +0 -5
  80. data/lib/mailslurp_client/models/inbox_forwarder_dto.rb +31 -61
  81. data/lib/mailslurp_client/models/inbox_forwarder_test_options.rb +0 -5
  82. data/lib/mailslurp_client/models/inbox_forwarder_test_result.rb +13 -23
  83. data/lib/mailslurp_client/models/inbox_preview.rb +38 -38
  84. data/lib/mailslurp_client/models/inbox_ruleset_dto.rb +43 -78
  85. data/lib/mailslurp_client/models/inbox_ruleset_test_options.rb +0 -5
  86. data/lib/mailslurp_client/models/inbox_ruleset_test_result.rb +13 -18
  87. data/lib/mailslurp_client/models/inline_object.rb +221 -0
  88. data/lib/mailslurp_client/models/ip_address_result.rb +0 -10
  89. data/lib/mailslurp_client/models/json_schema_dto.rb +0 -5
  90. data/lib/mailslurp_client/models/match_option.rb +7 -2
  91. data/lib/mailslurp_client/models/match_options.rb +16 -16
  92. data/lib/mailslurp_client/models/missed_email.rb +67 -102
  93. data/lib/mailslurp_client/models/missed_email_projection.rb +19 -29
  94. data/lib/mailslurp_client/models/name_server_record.rb +10 -30
  95. data/lib/mailslurp_client/models/organization_inbox_projection.rb +44 -44
  96. data/lib/mailslurp_client/models/page_alias.rb +52 -52
  97. data/lib/mailslurp_client/models/page_attachment_entity.rb +52 -52
  98. data/lib/mailslurp_client/models/page_bounced_email.rb +52 -52
  99. data/lib/mailslurp_client/models/page_bounced_recipients.rb +52 -52
  100. data/lib/mailslurp_client/models/page_contact_projection.rb +52 -52
  101. data/lib/mailslurp_client/models/page_email_preview.rb +52 -52
  102. data/lib/mailslurp_client/models/page_email_projection.rb +52 -52
  103. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +52 -52
  104. data/lib/mailslurp_client/models/page_group_projection.rb +52 -52
  105. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +52 -52
  106. data/lib/mailslurp_client/models/page_inbox_projection.rb +52 -52
  107. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +52 -52
  108. data/lib/mailslurp_client/models/page_missed_email_projection.rb +52 -52
  109. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +52 -52
  110. data/lib/mailslurp_client/models/page_sent_email_projection.rb +49 -49
  111. data/lib/mailslurp_client/models/page_template_projection.rb +52 -52
  112. data/lib/mailslurp_client/models/page_thread_projection.rb +52 -52
  113. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +52 -52
  114. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +52 -52
  115. data/lib/mailslurp_client/models/page_webhook_projection.rb +52 -52
  116. data/lib/mailslurp_client/models/page_webhook_result.rb +52 -52
  117. data/lib/mailslurp_client/models/pageable.rb +10 -10
  118. data/lib/mailslurp_client/models/raw_email_json.rb +0 -5
  119. data/lib/mailslurp_client/models/recipient.rb +13 -23
  120. data/lib/mailslurp_client/models/reply_to_alias_email_options.rb +38 -37
  121. data/lib/mailslurp_client/models/reply_to_email_options.rb +51 -50
  122. data/lib/mailslurp_client/models/send_email_options.rb +107 -115
  123. data/lib/mailslurp_client/models/sender.rb +14 -23
  124. data/lib/mailslurp_client/models/sent_email_dto.rb +97 -102
  125. data/lib/mailslurp_client/models/sent_email_projection.rb +66 -105
  126. data/lib/mailslurp_client/models/simple_send_email_options.rb +24 -24
  127. data/lib/mailslurp_client/models/template_dto.rb +22 -47
  128. data/lib/mailslurp_client/models/template_projection.rb +16 -41
  129. data/lib/mailslurp_client/models/template_variable.rb +0 -10
  130. data/lib/mailslurp_client/models/test_new_inbox_forwarder_options.rb +0 -10
  131. data/lib/mailslurp_client/models/test_new_inbox_ruleset_options.rb +0 -10
  132. data/lib/mailslurp_client/models/thread_projection.rb +60 -95
  133. data/lib/mailslurp_client/models/tracking_pixel_dto.rb +43 -68
  134. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +34 -54
  135. data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +19 -29
  136. data/lib/mailslurp_client/models/unread_count.rb +0 -5
  137. data/lib/mailslurp_client/models/unseen_error_count_dto.rb +0 -5
  138. data/lib/mailslurp_client/models/update_group_contacts.rb +0 -5
  139. data/lib/mailslurp_client/models/update_inbox_options.rb +26 -26
  140. data/lib/mailslurp_client/models/upload_attachment_options.rb +14 -14
  141. data/lib/mailslurp_client/models/validation_message.rb +1 -5
  142. data/lib/mailslurp_client/models/verify_email_address_options.rb +0 -5
  143. data/lib/mailslurp_client/models/wait_for_conditions.rb +48 -58
  144. data/lib/mailslurp_client/models/webhook_dto.rb +64 -69
  145. data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +42 -42
  146. data/lib/mailslurp_client/models/webhook_email_read_payload.rb +49 -49
  147. data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +43 -43
  148. data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +75 -95
  149. data/lib/mailslurp_client/models/webhook_new_email_payload.rb +84 -84
  150. data/lib/mailslurp_client/models/webhook_projection.rb +36 -61
  151. data/lib/mailslurp_client/models/webhook_redrive_result.rb +13 -23
  152. data/lib/mailslurp_client/models/webhook_result_dto.rb +76 -126
  153. data/lib/mailslurp_client/models/webhook_test_request.rb +21 -36
  154. data/lib/mailslurp_client/models/webhook_test_response.rb +13 -13
  155. data/lib/mailslurp_client/models/webhook_test_result.rb +13 -23
  156. data/lib/mailslurp_client/version.rb +1 -1
  157. data/lib/mailslurp_client.rb +3 -1
  158. metadata +5 -3
@@ -15,30 +15,30 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # Options for uploading files for attachments. When sending emails with the API that require attachments first upload each attachment. Then use the returned attachment ID in your `SendEmailOptions` when sending an email. This way you can use attachments multiple times once they have been uploaded.
17
17
  class UploadAttachmentOptions
18
- # Base64 encoded string of file contents. Typically this means reading the bytes or string content of a file and then converting that to a base64 encoded string. For examples of how to do this see https://www.mailslurp.com/guides/base64-file-uploads/
19
- attr_accessor :base64_contents
20
-
21
18
  # Optional contentType for file. For instance `application/pdf`
22
19
  attr_accessor :content_type
23
20
 
24
21
  # Optional filename to save upload with. Will be the name that is shown in email clients
25
22
  attr_accessor :filename
26
23
 
24
+ # Base64 encoded string of file contents. Typically this means reading the bytes or string content of a file and then converting that to a base64 encoded string. For examples of how to do this see https://www.mailslurp.com/guides/base64-file-uploads/
25
+ attr_accessor :base64_contents
26
+
27
27
  # Attribute mapping from ruby-style variable name to JSON key.
28
28
  def self.attribute_map
29
29
  {
30
- :'base64_contents' => :'base64Contents',
31
30
  :'content_type' => :'contentType',
32
- :'filename' => :'filename'
31
+ :'filename' => :'filename',
32
+ :'base64_contents' => :'base64Contents'
33
33
  }
34
34
  end
35
35
 
36
36
  # Attribute type mapping.
37
37
  def self.openapi_types
38
38
  {
39
- :'base64_contents' => :'String',
40
39
  :'content_type' => :'String',
41
- :'filename' => :'String'
40
+ :'filename' => :'String',
41
+ :'base64_contents' => :'String'
42
42
  }
43
43
  end
44
44
 
@@ -63,10 +63,6 @@ module MailSlurpClient
63
63
  h[k.to_sym] = v
64
64
  }
65
65
 
66
- if attributes.key?(:'base64_contents')
67
- self.base64_contents = attributes[:'base64_contents']
68
- end
69
-
70
66
  if attributes.key?(:'content_type')
71
67
  self.content_type = attributes[:'content_type']
72
68
  end
@@ -74,6 +70,10 @@ module MailSlurpClient
74
70
  if attributes.key?(:'filename')
75
71
  self.filename = attributes[:'filename']
76
72
  end
73
+
74
+ if attributes.key?(:'base64_contents')
75
+ self.base64_contents = attributes[:'base64_contents']
76
+ end
77
77
  end
78
78
 
79
79
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -99,9 +99,9 @@ module MailSlurpClient
99
99
  def ==(o)
100
100
  return true if self.equal?(o)
101
101
  self.class == o.class &&
102
- base64_contents == o.base64_contents &&
103
102
  content_type == o.content_type &&
104
- filename == o.filename
103
+ filename == o.filename &&
104
+ base64_contents == o.base64_contents
105
105
  end
106
106
 
107
107
  # @see the `==` method
@@ -113,7 +113,7 @@ module MailSlurpClient
113
113
  # Calculates hash code according to all attributes.
114
114
  # @return [Integer] Hash code
115
115
  def hash
116
- [base64_contents, content_type, filename].hash
116
+ [content_type, filename, base64_contents].hash
117
117
  end
118
118
 
119
119
  # Builds the object from hash
@@ -13,6 +13,7 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
+ # Optional warnings resulting from HTML validation
16
17
  class ValidationMessage
17
18
  attr_accessor :line_number
18
19
 
@@ -68,17 +69,12 @@ module MailSlurpClient
68
69
  # @return Array for valid properties with the reasons
69
70
  def list_invalid_properties
70
71
  invalid_properties = Array.new
71
- if @line_number.nil?
72
- invalid_properties.push('invalid value for "line_number", line_number cannot be nil.')
73
- end
74
-
75
72
  invalid_properties
76
73
  end
77
74
 
78
75
  # Check to see if the all the properties in the model are valid
79
76
  # @return true if the model is valid
80
77
  def valid?
81
- return false if @line_number.nil?
82
78
  true
83
79
  end
84
80
 
@@ -85,17 +85,12 @@ module MailSlurpClient
85
85
  # @return Array for valid properties with the reasons
86
86
  def list_invalid_properties
87
87
  invalid_properties = Array.new
88
- if @email_address.nil?
89
- invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
90
- end
91
-
92
88
  invalid_properties
93
89
  end
94
90
 
95
91
  # Check to see if the all the properties in the model are valid
96
92
  # @return true if the model is valid
97
93
  def valid?
98
- return false if @email_address.nil?
99
94
  true
100
95
  end
101
96
 
@@ -13,37 +13,32 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
- # Conditions that a `waitForXEmails` endpoint operates on. The methods wait until given conditions are met or a timeout is reached. If the conditions are met without needing to wait the results will be returned immediately. Can include `unreadOnly` to ignore already read emails that were returned in an API call or viewing in the dashboard. Can also include matches for emails containing `from`, `subject`, `hasAttachments` etc.
16
+ # Conditions to apply to emails that you are waiting for
17
17
  class WaitForConditions
18
- # ISO Date Time latest time of email to consider. Filter for matching emails that were received before this date
19
- attr_accessor :before
18
+ attr_accessor :inbox_id
20
19
 
21
20
  # Number of results that should match conditions. Either exactly or at least this amount based on the `countType`. If count condition is not met and the timeout has not been reached the `waitFor` method will retry the operation.
22
21
  attr_accessor :count
23
22
 
24
- # How should the found count be compared to the expected count.
25
- attr_accessor :count_type
26
-
27
23
  # Max time in milliseconds to wait between retries if a `timeout` is specified.
28
24
  attr_accessor :delay_timeout
29
25
 
30
- # ID of inbox to search within and apply conditions to. Essentially filtering the emails found to give a count.
31
- attr_accessor :inbox_id
26
+ # Max time in milliseconds to retry the `waitFor` operation until conditions are met.
27
+ attr_accessor :timeout
32
28
 
33
- # Conditions that should be matched for an email to qualify for results. Each condition will be applied in order to each email within an inbox to filter a result list of matching emails you are waiting for.
34
- attr_accessor :matches
29
+ # Apply conditions only to **unread** emails. All emails begin with `read=false`. An email is marked `read=true` when an `EmailDto` representation of it has been returned to the user at least once. For example you have called `getEmail` or `waitForLatestEmail` etc., or you have viewed the email in the dashboard.
30
+ attr_accessor :unread_only
35
31
 
36
- # ISO Date Time earliest time of email to consider. Filter for matching emails that were received after this date
37
- attr_accessor :since
32
+ # How result size should be compared with the expected size. Exactly or at-least matching result?
33
+ attr_accessor :count_type
34
+
35
+ attr_accessor :matches
38
36
 
39
- # Direction to sort matching emails by created time
40
37
  attr_accessor :sort_direction
41
38
 
42
- # Max time in milliseconds to retry the `waitFor` operation until conditions are met.
43
- attr_accessor :timeout
39
+ attr_accessor :since
44
40
 
45
- # Apply conditions only to **unread** emails. All emails begin with `read=false`. An email is marked `read=true` when an `EmailDto` representation of it has been returned to the user at least once. For example you have called `getEmail` or `waitForLatestEmail` etc., or you have viewed the email in the dashboard.
46
- attr_accessor :unread_only
41
+ attr_accessor :before
47
42
 
48
43
  class EnumAttributeValidator
49
44
  attr_reader :datatype
@@ -70,32 +65,32 @@ module MailSlurpClient
70
65
  # Attribute mapping from ruby-style variable name to JSON key.
71
66
  def self.attribute_map
72
67
  {
73
- :'before' => :'before',
68
+ :'inbox_id' => :'inboxId',
74
69
  :'count' => :'count',
75
- :'count_type' => :'countType',
76
70
  :'delay_timeout' => :'delayTimeout',
77
- :'inbox_id' => :'inboxId',
71
+ :'timeout' => :'timeout',
72
+ :'unread_only' => :'unreadOnly',
73
+ :'count_type' => :'countType',
78
74
  :'matches' => :'matches',
79
- :'since' => :'since',
80
75
  :'sort_direction' => :'sortDirection',
81
- :'timeout' => :'timeout',
82
- :'unread_only' => :'unreadOnly'
76
+ :'since' => :'since',
77
+ :'before' => :'before'
83
78
  }
84
79
  end
85
80
 
86
81
  # Attribute type mapping.
87
82
  def self.openapi_types
88
83
  {
89
- :'before' => :'DateTime',
84
+ :'inbox_id' => :'String',
90
85
  :'count' => :'Integer',
91
- :'count_type' => :'String',
92
86
  :'delay_timeout' => :'Integer',
93
- :'inbox_id' => :'String',
87
+ :'timeout' => :'Integer',
88
+ :'unread_only' => :'Boolean',
89
+ :'count_type' => :'String',
94
90
  :'matches' => :'Array<MatchOption>',
95
- :'since' => :'DateTime',
96
91
  :'sort_direction' => :'String',
97
- :'timeout' => :'Integer',
98
- :'unread_only' => :'Boolean'
92
+ :'since' => :'DateTime',
93
+ :'before' => :'DateTime'
99
94
  }
100
95
  end
101
96
 
@@ -120,24 +115,28 @@ module MailSlurpClient
120
115
  h[k.to_sym] = v
121
116
  }
122
117
 
123
- if attributes.key?(:'before')
124
- self.before = attributes[:'before']
118
+ if attributes.key?(:'inbox_id')
119
+ self.inbox_id = attributes[:'inbox_id']
125
120
  end
126
121
 
127
122
  if attributes.key?(:'count')
128
123
  self.count = attributes[:'count']
129
124
  end
130
125
 
131
- if attributes.key?(:'count_type')
132
- self.count_type = attributes[:'count_type']
133
- end
134
-
135
126
  if attributes.key?(:'delay_timeout')
136
127
  self.delay_timeout = attributes[:'delay_timeout']
137
128
  end
138
129
 
139
- if attributes.key?(:'inbox_id')
140
- self.inbox_id = attributes[:'inbox_id']
130
+ if attributes.key?(:'timeout')
131
+ self.timeout = attributes[:'timeout']
132
+ end
133
+
134
+ if attributes.key?(:'unread_only')
135
+ self.unread_only = attributes[:'unread_only']
136
+ end
137
+
138
+ if attributes.key?(:'count_type')
139
+ self.count_type = attributes[:'count_type']
141
140
  end
142
141
 
143
142
  if attributes.key?(:'matches')
@@ -146,20 +145,16 @@ module MailSlurpClient
146
145
  end
147
146
  end
148
147
 
149
- if attributes.key?(:'since')
150
- self.since = attributes[:'since']
151
- end
152
-
153
148
  if attributes.key?(:'sort_direction')
154
149
  self.sort_direction = attributes[:'sort_direction']
155
150
  end
156
151
 
157
- if attributes.key?(:'timeout')
158
- self.timeout = attributes[:'timeout']
152
+ if attributes.key?(:'since')
153
+ self.since = attributes[:'since']
159
154
  end
160
155
 
161
- if attributes.key?(:'unread_only')
162
- self.unread_only = attributes[:'unread_only']
156
+ if attributes.key?(:'before')
157
+ self.before = attributes[:'before']
163
158
  end
164
159
  end
165
160
 
@@ -167,10 +162,6 @@ module MailSlurpClient
167
162
  # @return Array for valid properties with the reasons
168
163
  def list_invalid_properties
169
164
  invalid_properties = Array.new
170
- if @inbox_id.nil?
171
- invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
172
- end
173
-
174
165
  if @timeout.nil?
175
166
  invalid_properties.push('invalid value for "timeout", timeout cannot be nil.')
176
167
  end
@@ -181,12 +172,11 @@ module MailSlurpClient
181
172
  # Check to see if the all the properties in the model are valid
182
173
  # @return true if the model is valid
183
174
  def valid?
175
+ return false if @timeout.nil?
184
176
  count_type_validator = EnumAttributeValidator.new('String', ["EXACTLY", "ATLEAST"])
185
177
  return false unless count_type_validator.valid?(@count_type)
186
- return false if @inbox_id.nil?
187
178
  sort_direction_validator = EnumAttributeValidator.new('String', ["ASC", "DESC"])
188
179
  return false unless sort_direction_validator.valid?(@sort_direction)
189
- return false if @timeout.nil?
190
180
  true
191
181
  end
192
182
 
@@ -215,16 +205,16 @@ module MailSlurpClient
215
205
  def ==(o)
216
206
  return true if self.equal?(o)
217
207
  self.class == o.class &&
218
- before == o.before &&
208
+ inbox_id == o.inbox_id &&
219
209
  count == o.count &&
220
- count_type == o.count_type &&
221
210
  delay_timeout == o.delay_timeout &&
222
- inbox_id == o.inbox_id &&
211
+ timeout == o.timeout &&
212
+ unread_only == o.unread_only &&
213
+ count_type == o.count_type &&
223
214
  matches == o.matches &&
224
- since == o.since &&
225
215
  sort_direction == o.sort_direction &&
226
- timeout == o.timeout &&
227
- unread_only == o.unread_only
216
+ since == o.since &&
217
+ before == o.before
228
218
  end
229
219
 
230
220
  # @see the `==` method
@@ -236,7 +226,7 @@ module MailSlurpClient
236
226
  # Calculates hash code according to all attributes.
237
227
  # @return [Integer] Hash code
238
228
  def hash
239
- [before, count, count_type, delay_timeout, inbox_id, matches, since, sort_direction, timeout, unread_only].hash
229
+ [inbox_id, count, delay_timeout, timeout, unread_only, count_type, matches, sort_direction, since, before].hash
240
230
  end
241
231
 
242
232
  # Builds the object from hash
@@ -15,36 +15,36 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # Representation of a webhook for an inbox. The URL specified will be using by MailSlurp whenever an email is received by the attached inbox. A webhook entity should have a URL that points to your server. Your server should accept HTTP/S POST requests and return a success 200. MailSlurp will retry your webhooks if they fail. See https://api.mailslurp.com/schemas/webhook-payload for the payload schema.
17
17
  class WebhookDto
18
- # Does webhook expect basic authentication? If true it means you created this webhook with a username and password. MailSlurp will use these in the URL to authenticate itself.
19
- attr_accessor :basic_auth
18
+ # ID of the Webhook
19
+ attr_accessor :id
20
20
 
21
- # When the webhook was created
22
- attr_accessor :created_at
21
+ # User ID of the Webhook
22
+ attr_accessor :user_id
23
23
 
24
- attr_accessor :event_name
24
+ # Does webhook expect basic authentication? If true it means you created this webhook with a username and password. MailSlurp will use these in the URL to authenticate itself.
25
+ attr_accessor :basic_auth
25
26
 
26
- # ID of the Webhook
27
- attr_accessor :id
27
+ # Name of the webhook
28
+ attr_accessor :name
28
29
 
29
30
  # The inbox that the Webhook will be triggered by
30
31
  attr_accessor :inbox_id
31
32
 
33
+ # URL of your server that the webhook will be sent to. The schema of the JSON that is sent is described by the payloadJsonSchema.
34
+ attr_accessor :url
35
+
32
36
  # HTTP method that your server endpoint must listen for
33
37
  attr_accessor :method
34
38
 
35
- # Name of the webhook
36
- attr_accessor :name
37
-
38
39
  # Deprecated. Fetch JSON Schema for webhook using the getJsonSchemaForWebhookPayload method
39
40
  attr_accessor :payload_json_schema
40
41
 
41
- attr_accessor :updated_at
42
+ # When the webhook was created
43
+ attr_accessor :created_at
42
44
 
43
- # URL of your server that the webhook will be sent to. The schema of the JSON that is sent is described by the payloadJsonSchema.
44
- attr_accessor :url
45
+ attr_accessor :updated_at
45
46
 
46
- # User ID of the Webhook
47
- attr_accessor :user_id
47
+ attr_accessor :event_name
48
48
 
49
49
  class EnumAttributeValidator
50
50
  attr_reader :datatype
@@ -71,34 +71,34 @@ module MailSlurpClient
71
71
  # Attribute mapping from ruby-style variable name to JSON key.
72
72
  def self.attribute_map
73
73
  {
74
- :'basic_auth' => :'basicAuth',
75
- :'created_at' => :'createdAt',
76
- :'event_name' => :'eventName',
77
74
  :'id' => :'id',
75
+ :'user_id' => :'userId',
76
+ :'basic_auth' => :'basicAuth',
77
+ :'name' => :'name',
78
78
  :'inbox_id' => :'inboxId',
79
+ :'url' => :'url',
79
80
  :'method' => :'method',
80
- :'name' => :'name',
81
81
  :'payload_json_schema' => :'payloadJsonSchema',
82
+ :'created_at' => :'createdAt',
82
83
  :'updated_at' => :'updatedAt',
83
- :'url' => :'url',
84
- :'user_id' => :'userId'
84
+ :'event_name' => :'eventName'
85
85
  }
86
86
  end
87
87
 
88
88
  # Attribute type mapping.
89
89
  def self.openapi_types
90
90
  {
91
- :'basic_auth' => :'Boolean',
92
- :'created_at' => :'DateTime',
93
- :'event_name' => :'String',
94
91
  :'id' => :'String',
92
+ :'user_id' => :'String',
93
+ :'basic_auth' => :'Boolean',
94
+ :'name' => :'String',
95
95
  :'inbox_id' => :'String',
96
+ :'url' => :'String',
96
97
  :'method' => :'String',
97
- :'name' => :'String',
98
98
  :'payload_json_schema' => :'String',
99
+ :'created_at' => :'DateTime',
99
100
  :'updated_at' => :'DateTime',
100
- :'url' => :'String',
101
- :'user_id' => :'String'
101
+ :'event_name' => :'String'
102
102
  }
103
103
  end
104
104
 
@@ -123,48 +123,48 @@ module MailSlurpClient
123
123
  h[k.to_sym] = v
124
124
  }
125
125
 
126
- if attributes.key?(:'basic_auth')
127
- self.basic_auth = attributes[:'basic_auth']
126
+ if attributes.key?(:'id')
127
+ self.id = attributes[:'id']
128
128
  end
129
129
 
130
- if attributes.key?(:'created_at')
131
- self.created_at = attributes[:'created_at']
130
+ if attributes.key?(:'user_id')
131
+ self.user_id = attributes[:'user_id']
132
132
  end
133
133
 
134
- if attributes.key?(:'event_name')
135
- self.event_name = attributes[:'event_name']
134
+ if attributes.key?(:'basic_auth')
135
+ self.basic_auth = attributes[:'basic_auth']
136
136
  end
137
137
 
138
- if attributes.key?(:'id')
139
- self.id = attributes[:'id']
138
+ if attributes.key?(:'name')
139
+ self.name = attributes[:'name']
140
140
  end
141
141
 
142
142
  if attributes.key?(:'inbox_id')
143
143
  self.inbox_id = attributes[:'inbox_id']
144
144
  end
145
145
 
146
- if attributes.key?(:'method')
147
- self.method = attributes[:'method']
146
+ if attributes.key?(:'url')
147
+ self.url = attributes[:'url']
148
148
  end
149
149
 
150
- if attributes.key?(:'name')
151
- self.name = attributes[:'name']
150
+ if attributes.key?(:'method')
151
+ self.method = attributes[:'method']
152
152
  end
153
153
 
154
154
  if attributes.key?(:'payload_json_schema')
155
155
  self.payload_json_schema = attributes[:'payload_json_schema']
156
156
  end
157
157
 
158
- if attributes.key?(:'updated_at')
159
- self.updated_at = attributes[:'updated_at']
158
+ if attributes.key?(:'created_at')
159
+ self.created_at = attributes[:'created_at']
160
160
  end
161
161
 
162
- if attributes.key?(:'url')
163
- self.url = attributes[:'url']
162
+ if attributes.key?(:'updated_at')
163
+ self.updated_at = attributes[:'updated_at']
164
164
  end
165
165
 
166
- if attributes.key?(:'user_id')
167
- self.user_id = attributes[:'user_id']
166
+ if attributes.key?(:'event_name')
167
+ self.event_name = attributes[:'event_name']
168
168
  end
169
169
  end
170
170
 
@@ -172,34 +172,19 @@ module MailSlurpClient
172
172
  # @return Array for valid properties with the reasons
173
173
  def list_invalid_properties
174
174
  invalid_properties = Array.new
175
- if @updated_at.nil?
176
- invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
177
- end
178
-
179
175
  invalid_properties
180
176
  end
181
177
 
182
178
  # Check to see if the all the properties in the model are valid
183
179
  # @return true if the model is valid
184
180
  def valid?
185
- event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
186
- return false unless event_name_validator.valid?(@event_name)
187
181
  method_validator = EnumAttributeValidator.new('String', ["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "TRACE"])
188
182
  return false unless method_validator.valid?(@method)
189
- return false if @updated_at.nil?
183
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
184
+ return false unless event_name_validator.valid?(@event_name)
190
185
  true
191
186
  end
192
187
 
193
- # Custom attribute writer method checking allowed values (enum).
194
- # @param [Object] event_name Object to be assigned
195
- def event_name=(event_name)
196
- validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
197
- unless validator.valid?(event_name)
198
- fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
199
- end
200
- @event_name = event_name
201
- end
202
-
203
188
  # Custom attribute writer method checking allowed values (enum).
204
189
  # @param [Object] method Object to be assigned
205
190
  def method=(method)
@@ -210,22 +195,32 @@ module MailSlurpClient
210
195
  @method = method
211
196
  end
212
197
 
198
+ # Custom attribute writer method checking allowed values (enum).
199
+ # @param [Object] event_name Object to be assigned
200
+ def event_name=(event_name)
201
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
202
+ unless validator.valid?(event_name)
203
+ fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
204
+ end
205
+ @event_name = event_name
206
+ end
207
+
213
208
  # Checks equality by comparing each attribute.
214
209
  # @param [Object] Object to be compared
215
210
  def ==(o)
216
211
  return true if self.equal?(o)
217
212
  self.class == o.class &&
218
- basic_auth == o.basic_auth &&
219
- created_at == o.created_at &&
220
- event_name == o.event_name &&
221
213
  id == o.id &&
214
+ user_id == o.user_id &&
215
+ basic_auth == o.basic_auth &&
216
+ name == o.name &&
222
217
  inbox_id == o.inbox_id &&
218
+ url == o.url &&
223
219
  method == o.method &&
224
- name == o.name &&
225
220
  payload_json_schema == o.payload_json_schema &&
221
+ created_at == o.created_at &&
226
222
  updated_at == o.updated_at &&
227
- url == o.url &&
228
- user_id == o.user_id
223
+ event_name == o.event_name
229
224
  end
230
225
 
231
226
  # @see the `==` method
@@ -237,7 +232,7 @@ module MailSlurpClient
237
232
  # Calculates hash code according to all attributes.
238
233
  # @return [Integer] Hash code
239
234
  def hash
240
- [basic_auth, created_at, event_name, id, inbox_id, method, name, payload_json_schema, updated_at, url, user_id].hash
235
+ [id, user_id, basic_auth, name, inbox_id, url, method, payload_json_schema, created_at, updated_at, event_name].hash
241
236
  end
242
237
 
243
238
  # Builds the object from hash