mailslurp_client 15.12.14 → 15.12.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/api_user_controller_api.rb +104 -0
  3. data/lib/mailslurp_client/models/alias_projection.rb +15 -15
  4. data/lib/mailslurp_client/models/attachment_projection.rb +14 -14
  5. data/lib/mailslurp_client/models/bounce_projection.rb +22 -22
  6. data/lib/mailslurp_client/models/bounce_recipient_projection.rb +13 -13
  7. data/lib/mailslurp_client/models/create_webhook_options.rb +8 -4
  8. data/lib/mailslurp_client/models/page_alias.rb +19 -19
  9. data/lib/mailslurp_client/models/page_attachment_entity.rb +19 -19
  10. data/lib/mailslurp_client/models/page_bounced_email.rb +19 -19
  11. data/lib/mailslurp_client/models/page_bounced_recipients.rb +19 -19
  12. data/lib/mailslurp_client/models/page_contact_projection.rb +19 -19
  13. data/lib/mailslurp_client/models/page_email_preview.rb +19 -19
  14. data/lib/mailslurp_client/models/page_email_projection.rb +19 -19
  15. data/lib/mailslurp_client/models/page_email_validation_request.rb +19 -19
  16. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +19 -19
  17. data/lib/mailslurp_client/models/page_group_projection.rb +19 -19
  18. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +19 -19
  19. data/lib/mailslurp_client/models/page_inbox_projection.rb +19 -19
  20. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +19 -19
  21. data/lib/mailslurp_client/models/page_missed_email_projection.rb +19 -19
  22. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +19 -19
  23. data/lib/mailslurp_client/models/page_phone_number_projection.rb +19 -19
  24. data/lib/mailslurp_client/models/page_sms_projection.rb +19 -19
  25. data/lib/mailslurp_client/models/page_template_projection.rb +19 -19
  26. data/lib/mailslurp_client/models/page_thread_projection.rb +19 -19
  27. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +19 -19
  28. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +19 -19
  29. data/lib/mailslurp_client/models/page_webhook_projection.rb +19 -19
  30. data/lib/mailslurp_client/models/page_webhook_result.rb +19 -19
  31. data/lib/mailslurp_client/models/sent_email_dto.rb +52 -1
  32. data/lib/mailslurp_client/models/thread_projection.rb +16 -16
  33. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +19 -19
  34. data/lib/mailslurp_client/version.rb +1 -1
  35. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5115bc2f8ca0c4cbfe748f3e3c7d6eae3d8aa1ab4711fab5e3eaea505364e81
4
- data.tar.gz: 5d8ee9139852ead5bfed33d4addfc9b30ec967516cd3f3522ca7dc4d8d0741c2
3
+ metadata.gz: 1b8e7e366076b52e650de96ef4978c5a3aa66496afc619770c3ec9729b4589eb
4
+ data.tar.gz: 8bb32eb87a3d0d93aa92862d382f1fa2ea1c62341225dfe2ce9047bae43be7aa
5
5
  SHA512:
6
- metadata.gz: 3a375671aad02955aa43a22aab055768224ef24573b433ac210035b4e9b6c6e240c64bd5ecd5594213b35e6660dd52169dc40fb7360562ada40a90b7ad453d95
7
- data.tar.gz: db485fe77b62ddb0d681faee23296f505ad7d9dc957b5380a12e73af8832d97ed0b8d33102e2b53bd7a4a54d26392e8d92f3f13464370c55bc41bff949515227
6
+ metadata.gz: 7847af2adeaee0f7c7f058b7364225a3455c5ad8cee0ba6bd1e79e3ea0e0b170e3d356234db273c171651e5e7a0778d29f9633112554930f66b807f3fe758eb0
7
+ data.tar.gz: cae9e3474cf492b809b9b2cfe2bce0fe98e05939b9cccad3832513a52e7981f69c3386ac52f75892974f7443247d84875d6137278fd75663c85e5ed7a7ea0150
@@ -19,6 +19,110 @@ module MailSlurpClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # @param [Hash] opts the optional parameters
23
+ # @return [String]
24
+ def get_smtp_password(opts = {})
25
+ data, _status_code, _headers = get_smtp_password_with_http_info(opts)
26
+ data
27
+ end
28
+
29
+ # @param [Hash] opts the optional parameters
30
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
31
+ def get_smtp_password_with_http_info(opts = {})
32
+ if @api_client.config.debugging
33
+ @api_client.config.logger.debug 'Calling API: ApiUserControllerApi.get_smtp_password ...'
34
+ end
35
+ # resource path
36
+ local_var_path = '/user/smtp/password'
37
+
38
+ # query parameters
39
+ query_params = opts[:query_params] || {}
40
+
41
+ # header parameters
42
+ header_params = opts[:header_params] || {}
43
+ # HTTP header 'Accept' (if needed)
44
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
45
+
46
+ # form parameters
47
+ form_params = opts[:form_params] || {}
48
+
49
+ # http body (model)
50
+ post_body = opts[:body]
51
+
52
+ # return_type
53
+ return_type = opts[:return_type] || 'String'
54
+
55
+ # auth_names
56
+ auth_names = opts[:auth_names] || ['API_KEY']
57
+
58
+ new_options = opts.merge(
59
+ :header_params => header_params,
60
+ :query_params => query_params,
61
+ :form_params => form_params,
62
+ :body => post_body,
63
+ :auth_names => auth_names,
64
+ :return_type => return_type
65
+ )
66
+
67
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
68
+ if @api_client.config.debugging
69
+ @api_client.config.logger.debug "API called: ApiUserControllerApi#get_smtp_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
70
+ end
71
+ return data, status_code, headers
72
+ end
73
+
74
+ # @param [Hash] opts the optional parameters
75
+ # @return [String]
76
+ def get_smtp_username(opts = {})
77
+ data, _status_code, _headers = get_smtp_username_with_http_info(opts)
78
+ data
79
+ end
80
+
81
+ # @param [Hash] opts the optional parameters
82
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
83
+ def get_smtp_username_with_http_info(opts = {})
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug 'Calling API: ApiUserControllerApi.get_smtp_username ...'
86
+ end
87
+ # resource path
88
+ local_var_path = '/user/smtp/username'
89
+
90
+ # query parameters
91
+ query_params = opts[:query_params] || {}
92
+
93
+ # header parameters
94
+ header_params = opts[:header_params] || {}
95
+ # HTTP header 'Accept' (if needed)
96
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
97
+
98
+ # form parameters
99
+ form_params = opts[:form_params] || {}
100
+
101
+ # http body (model)
102
+ post_body = opts[:body]
103
+
104
+ # return_type
105
+ return_type = opts[:return_type] || 'String'
106
+
107
+ # auth_names
108
+ auth_names = opts[:auth_names] || ['API_KEY']
109
+
110
+ new_options = opts.merge(
111
+ :header_params => header_params,
112
+ :query_params => query_params,
113
+ :form_params => form_params,
114
+ :body => post_body,
115
+ :auth_names => auth_names,
116
+ :return_type => return_type
117
+ )
118
+
119
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
120
+ if @api_client.config.debugging
121
+ @api_client.config.logger.debug "API called: ApiUserControllerApi#get_smtp_username\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
122
+ end
123
+ return data, status_code, headers
124
+ end
125
+
22
126
  # @param [Hash] opts the optional parameters
23
127
  # @return [UserInfoDto]
24
128
  def get_user_info(opts = {})
@@ -19,12 +19,12 @@ module MailSlurpClient
19
19
 
20
20
  attr_accessor :id
21
21
 
22
+ attr_accessor :inbox_id
23
+
22
24
  attr_accessor :user_id
23
25
 
24
26
  attr_accessor :email_address
25
27
 
26
- attr_accessor :inbox_id
27
-
28
28
  attr_accessor :created_at
29
29
 
30
30
  attr_accessor :updated_at
@@ -36,9 +36,9 @@ module MailSlurpClient
36
36
  {
37
37
  :'name' => :'name',
38
38
  :'id' => :'id',
39
+ :'inbox_id' => :'inboxId',
39
40
  :'user_id' => :'userId',
40
41
  :'email_address' => :'emailAddress',
41
- :'inbox_id' => :'inboxId',
42
42
  :'created_at' => :'createdAt',
43
43
  :'updated_at' => :'updatedAt',
44
44
  :'use_threads' => :'useThreads'
@@ -50,9 +50,9 @@ module MailSlurpClient
50
50
  {
51
51
  :'name' => :'String',
52
52
  :'id' => :'String',
53
+ :'inbox_id' => :'String',
53
54
  :'user_id' => :'String',
54
55
  :'email_address' => :'String',
55
- :'inbox_id' => :'String',
56
56
  :'created_at' => :'DateTime',
57
57
  :'updated_at' => :'DateTime',
58
58
  :'use_threads' => :'Boolean'
@@ -88,6 +88,10 @@ module MailSlurpClient
88
88
  self.id = attributes[:'id']
89
89
  end
90
90
 
91
+ if attributes.key?(:'inbox_id')
92
+ self.inbox_id = attributes[:'inbox_id']
93
+ end
94
+
91
95
  if attributes.key?(:'user_id')
92
96
  self.user_id = attributes[:'user_id']
93
97
  end
@@ -96,10 +100,6 @@ module MailSlurpClient
96
100
  self.email_address = attributes[:'email_address']
97
101
  end
98
102
 
99
- if attributes.key?(:'inbox_id')
100
- self.inbox_id = attributes[:'inbox_id']
101
- end
102
-
103
103
  if attributes.key?(:'created_at')
104
104
  self.created_at = attributes[:'created_at']
105
105
  end
@@ -121,6 +121,10 @@ module MailSlurpClient
121
121
  invalid_properties.push('invalid value for "id", id cannot be nil.')
122
122
  end
123
123
 
124
+ if @inbox_id.nil?
125
+ invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
126
+ end
127
+
124
128
  if @user_id.nil?
125
129
  invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
126
130
  end
@@ -129,10 +133,6 @@ module MailSlurpClient
129
133
  invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
130
134
  end
131
135
 
132
- if @inbox_id.nil?
133
- invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
134
- end
135
-
136
136
  if @created_at.nil?
137
137
  invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
138
138
  end
@@ -148,9 +148,9 @@ module MailSlurpClient
148
148
  # @return true if the model is valid
149
149
  def valid?
150
150
  return false if @id.nil?
151
+ return false if @inbox_id.nil?
151
152
  return false if @user_id.nil?
152
153
  return false if @email_address.nil?
153
- return false if @inbox_id.nil?
154
154
  return false if @created_at.nil?
155
155
  return false if @updated_at.nil?
156
156
  true
@@ -163,9 +163,9 @@ module MailSlurpClient
163
163
  self.class == o.class &&
164
164
  name == o.name &&
165
165
  id == o.id &&
166
+ inbox_id == o.inbox_id &&
166
167
  user_id == o.user_id &&
167
168
  email_address == o.email_address &&
168
- inbox_id == o.inbox_id &&
169
169
  created_at == o.created_at &&
170
170
  updated_at == o.updated_at &&
171
171
  use_threads == o.use_threads
@@ -180,7 +180,7 @@ module MailSlurpClient
180
180
  # Calculates hash code according to all attributes.
181
181
  # @return [Integer] Hash code
182
182
  def hash
183
- [name, id, user_id, email_address, inbox_id, created_at, updated_at, use_threads].hash
183
+ [name, id, inbox_id, user_id, email_address, created_at, updated_at, use_threads].hash
184
184
  end
185
185
 
186
186
  # Builds the object from hash
@@ -20,9 +20,6 @@ module MailSlurpClient
20
20
  # Content length of attachment in bytes
21
21
  attr_accessor :content_length
22
22
 
23
- # Content type of attachment.
24
- attr_accessor :content_type
25
-
26
23
  attr_accessor :user_id
27
24
 
28
25
  # Attachment ID
@@ -32,16 +29,19 @@ module MailSlurpClient
32
29
 
33
30
  attr_accessor :updated_at
34
31
 
32
+ # Content type of attachment.
33
+ attr_accessor :content_type
34
+
35
35
  # Attribute mapping from ruby-style variable name to JSON key.
36
36
  def self.attribute_map
37
37
  {
38
38
  :'name' => :'name',
39
39
  :'content_length' => :'contentLength',
40
- :'content_type' => :'contentType',
41
40
  :'user_id' => :'userId',
42
41
  :'attachment_id' => :'attachmentId',
43
42
  :'created_at' => :'createdAt',
44
- :'updated_at' => :'updatedAt'
43
+ :'updated_at' => :'updatedAt',
44
+ :'content_type' => :'contentType'
45
45
  }
46
46
  end
47
47
 
@@ -50,11 +50,11 @@ module MailSlurpClient
50
50
  {
51
51
  :'name' => :'String',
52
52
  :'content_length' => :'Integer',
53
- :'content_type' => :'String',
54
53
  :'user_id' => :'String',
55
54
  :'attachment_id' => :'String',
56
55
  :'created_at' => :'DateTime',
57
- :'updated_at' => :'DateTime'
56
+ :'updated_at' => :'DateTime',
57
+ :'content_type' => :'String'
58
58
  }
59
59
  end
60
60
 
@@ -87,10 +87,6 @@ module MailSlurpClient
87
87
  self.content_length = attributes[:'content_length']
88
88
  end
89
89
 
90
- if attributes.key?(:'content_type')
91
- self.content_type = attributes[:'content_type']
92
- end
93
-
94
90
  if attributes.key?(:'user_id')
95
91
  self.user_id = attributes[:'user_id']
96
92
  end
@@ -106,6 +102,10 @@ module MailSlurpClient
106
102
  if attributes.key?(:'updated_at')
107
103
  self.updated_at = attributes[:'updated_at']
108
104
  end
105
+
106
+ if attributes.key?(:'content_type')
107
+ self.content_type = attributes[:'content_type']
108
+ end
109
109
  end
110
110
 
111
111
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -148,11 +148,11 @@ module MailSlurpClient
148
148
  self.class == o.class &&
149
149
  name == o.name &&
150
150
  content_length == o.content_length &&
151
- content_type == o.content_type &&
152
151
  user_id == o.user_id &&
153
152
  attachment_id == o.attachment_id &&
154
153
  created_at == o.created_at &&
155
- updated_at == o.updated_at
154
+ updated_at == o.updated_at &&
155
+ content_type == o.content_type
156
156
  end
157
157
 
158
158
  # @see the `==` method
@@ -164,7 +164,7 @@ module MailSlurpClient
164
164
  # Calculates hash code according to all attributes.
165
165
  # @return [Integer] Hash code
166
166
  def hash
167
- [name, content_length, content_type, user_id, attachment_id, created_at, updated_at].hash
167
+ [name, content_length, user_id, attachment_id, created_at, updated_at, content_type].hash
168
168
  end
169
169
 
170
170
  # Builds the object from hash
@@ -17,25 +17,25 @@ module MailSlurpClient
17
17
  class BounceProjection
18
18
  attr_accessor :id
19
19
 
20
- attr_accessor :subject
21
-
22
20
  attr_accessor :sender
23
21
 
24
- attr_accessor :created_at
22
+ attr_accessor :subject
25
23
 
26
- attr_accessor :bounce_mta
24
+ attr_accessor :created_at
27
25
 
28
26
  attr_accessor :bounce_type
29
27
 
28
+ attr_accessor :bounce_mta
29
+
30
30
  # Attribute mapping from ruby-style variable name to JSON key.
31
31
  def self.attribute_map
32
32
  {
33
33
  :'id' => :'id',
34
- :'subject' => :'subject',
35
34
  :'sender' => :'sender',
35
+ :'subject' => :'subject',
36
36
  :'created_at' => :'createdAt',
37
- :'bounce_mta' => :'bounceMta',
38
- :'bounce_type' => :'bounceType'
37
+ :'bounce_type' => :'bounceType',
38
+ :'bounce_mta' => :'bounceMta'
39
39
  }
40
40
  end
41
41
 
@@ -43,11 +43,11 @@ module MailSlurpClient
43
43
  def self.openapi_types
44
44
  {
45
45
  :'id' => :'String',
46
- :'subject' => :'String',
47
46
  :'sender' => :'String',
47
+ :'subject' => :'String',
48
48
  :'created_at' => :'DateTime',
49
- :'bounce_mta' => :'String',
50
- :'bounce_type' => :'String'
49
+ :'bounce_type' => :'String',
50
+ :'bounce_mta' => :'String'
51
51
  }
52
52
  end
53
53
 
@@ -76,25 +76,25 @@ module MailSlurpClient
76
76
  self.id = attributes[:'id']
77
77
  end
78
78
 
79
- if attributes.key?(:'subject')
80
- self.subject = attributes[:'subject']
81
- end
82
-
83
79
  if attributes.key?(:'sender')
84
80
  self.sender = attributes[:'sender']
85
81
  end
86
82
 
87
- if attributes.key?(:'created_at')
88
- self.created_at = attributes[:'created_at']
83
+ if attributes.key?(:'subject')
84
+ self.subject = attributes[:'subject']
89
85
  end
90
86
 
91
- if attributes.key?(:'bounce_mta')
92
- self.bounce_mta = attributes[:'bounce_mta']
87
+ if attributes.key?(:'created_at')
88
+ self.created_at = attributes[:'created_at']
93
89
  end
94
90
 
95
91
  if attributes.key?(:'bounce_type')
96
92
  self.bounce_type = attributes[:'bounce_type']
97
93
  end
94
+
95
+ if attributes.key?(:'bounce_mta')
96
+ self.bounce_mta = attributes[:'bounce_mta']
97
+ end
98
98
  end
99
99
 
100
100
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -126,11 +126,11 @@ module MailSlurpClient
126
126
  return true if self.equal?(o)
127
127
  self.class == o.class &&
128
128
  id == o.id &&
129
- subject == o.subject &&
130
129
  sender == o.sender &&
130
+ subject == o.subject &&
131
131
  created_at == o.created_at &&
132
- bounce_mta == o.bounce_mta &&
133
- bounce_type == o.bounce_type
132
+ bounce_type == o.bounce_type &&
133
+ bounce_mta == o.bounce_mta
134
134
  end
135
135
 
136
136
  # @see the `==` method
@@ -142,7 +142,7 @@ module MailSlurpClient
142
142
  # Calculates hash code according to all attributes.
143
143
  # @return [Integer] Hash code
144
144
  def hash
145
- [id, subject, sender, created_at, bounce_mta, bounce_type].hash
145
+ [id, sender, subject, created_at, bounce_type, bounce_mta].hash
146
146
  end
147
147
 
148
148
  # Builds the object from hash
@@ -17,8 +17,6 @@ module MailSlurpClient
17
17
  class BounceRecipientProjection
18
18
  attr_accessor :id
19
19
 
20
- attr_accessor :action
21
-
22
20
  attr_accessor :status
23
21
 
24
22
  attr_accessor :sent_email_id
@@ -27,15 +25,17 @@ module MailSlurpClient
27
25
 
28
26
  attr_accessor :recipient
29
27
 
28
+ attr_accessor :action
29
+
30
30
  # Attribute mapping from ruby-style variable name to JSON key.
31
31
  def self.attribute_map
32
32
  {
33
33
  :'id' => :'id',
34
- :'action' => :'action',
35
34
  :'status' => :'status',
36
35
  :'sent_email_id' => :'sentEmailId',
37
36
  :'created_at' => :'createdAt',
38
- :'recipient' => :'recipient'
37
+ :'recipient' => :'recipient',
38
+ :'action' => :'action'
39
39
  }
40
40
  end
41
41
 
@@ -43,11 +43,11 @@ module MailSlurpClient
43
43
  def self.openapi_types
44
44
  {
45
45
  :'id' => :'String',
46
- :'action' => :'String',
47
46
  :'status' => :'String',
48
47
  :'sent_email_id' => :'String',
49
48
  :'created_at' => :'DateTime',
50
- :'recipient' => :'String'
49
+ :'recipient' => :'String',
50
+ :'action' => :'String'
51
51
  }
52
52
  end
53
53
 
@@ -76,10 +76,6 @@ module MailSlurpClient
76
76
  self.id = attributes[:'id']
77
77
  end
78
78
 
79
- if attributes.key?(:'action')
80
- self.action = attributes[:'action']
81
- end
82
-
83
79
  if attributes.key?(:'status')
84
80
  self.status = attributes[:'status']
85
81
  end
@@ -95,6 +91,10 @@ module MailSlurpClient
95
91
  if attributes.key?(:'recipient')
96
92
  self.recipient = attributes[:'recipient']
97
93
  end
94
+
95
+ if attributes.key?(:'action')
96
+ self.action = attributes[:'action']
97
+ end
98
98
  end
99
99
 
100
100
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -126,11 +126,11 @@ module MailSlurpClient
126
126
  return true if self.equal?(o)
127
127
  self.class == o.class &&
128
128
  id == o.id &&
129
- action == o.action &&
130
129
  status == o.status &&
131
130
  sent_email_id == o.sent_email_id &&
132
131
  created_at == o.created_at &&
133
- recipient == o.recipient
132
+ recipient == o.recipient &&
133
+ action == o.action
134
134
  end
135
135
 
136
136
  # @see the `==` method
@@ -142,7 +142,7 @@ module MailSlurpClient
142
142
  # Calculates hash code according to all attributes.
143
143
  # @return [Integer] Hash code
144
144
  def hash
145
- [id, action, status, sent_email_id, created_at, recipient].hash
145
+ [id, status, sent_email_id, created_at, recipient, action].hash
146
146
  end
147
147
 
148
148
  # Builds the object from hash
@@ -13,9 +13,9 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
- # Options for creating a webhook. Webhooks can be attached to inboxes and MailSlurp will POST a webhook payload to the URL specified whenever the inbox receives an email. Webhooks are great for processing many inbound emails.
16
+ # Options for creating a webhook. Webhooks can be attached to inboxes and MailSlurp will POST a webhook payload to the URL specified whenever the webhook's event is triggered. Webhooks are great for processing many inbound emails and responding to other events at scale.
17
17
  class CreateWebhookOptions
18
- # Public URL on your server that MailSlurp can post WebhookNotification payload to when an email is received or an event is trigger. The payload of the submitted JSON is dependent on the webhook event type. The default `EMAIL_RECEIVED` payload is described by `https://ruby.api.mailslurp.com/schemas/webhook-payload`. The other events, `NEW_EMAIL`, `NEW_CONTACT`, and `NEW_ATTACHMENT` are described by `https://ruby.api.mailslurp.com/schemas/webhook-new-email-payload`, `https://ruby.api.mailslurp.com/schemas/webhook-new-contact-payload`,`https://ruby.api.mailslurp.com/schemas/webhook-new-attachment-payload` respectively.
18
+ # Public URL on your server that MailSlurp can post WebhookNotification payload to when an email is received or an event is trigger. The payload of the submitted JSON is dependent on the webhook event type. See docs.mailslurp.com/webhooks for event payload documentation.
19
19
  attr_accessor :url
20
20
 
21
21
  attr_accessor :basic_auth
@@ -23,7 +23,7 @@ module MailSlurpClient
23
23
  # Optional name for the webhook
24
24
  attr_accessor :name
25
25
 
26
- # Optional webhook event name. Default is `EMAIL_RECEIVED` and is triggered when an email is received by the inbox associated with the webhook. Payload differ according to the webhook event name. The other events are `NEW_EMAIL`, `NEW_CONTACT`, and `NEW_ATTACHMENT` and `EMAIL_OPENED`. `EMAIL_OPENED` requires the use of tracking pixels when sending. See the email tracking guide for more information.
26
+ # Optional webhook event name. Default is `EMAIL_RECEIVED` and is triggered when an email is received by the inbox associated with the webhook. Payload differ according to the webhook event name.
27
27
  attr_accessor :event_name
28
28
 
29
29
  attr_accessor :include_headers
@@ -76,7 +76,6 @@ module MailSlurpClient
76
76
  def self.openapi_nullable
77
77
  Set.new([
78
78
  :'basic_auth',
79
- :'event_name',
80
79
  ])
81
80
  end
82
81
 
@@ -124,6 +123,10 @@ module MailSlurpClient
124
123
  invalid_properties.push('invalid value for "url", url cannot be nil.')
125
124
  end
126
125
 
126
+ if @event_name.nil?
127
+ invalid_properties.push('invalid value for "event_name", event_name cannot be nil.')
128
+ end
129
+
127
130
  invalid_properties
128
131
  end
129
132
 
@@ -131,6 +134,7 @@ module MailSlurpClient
131
134
  # @return true if the model is valid
132
135
  def valid?
133
136
  return false if @url.nil?
137
+ return false if @event_name.nil?
134
138
  event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
135
139
  return false unless event_name_validator.valid?(@event_name)
136
140
  true
@@ -21,22 +21,22 @@ module MailSlurpClient
21
21
 
22
22
  attr_accessor :total
23
23
 
24
- attr_accessor :last
25
-
26
24
  attr_accessor :total_elements
27
25
 
28
26
  attr_accessor :total_pages
29
27
 
28
+ attr_accessor :last
29
+
30
30
  attr_accessor :size
31
31
 
32
32
  attr_accessor :number
33
33
 
34
34
  attr_accessor :sort
35
35
 
36
- attr_accessor :first
37
-
38
36
  attr_accessor :number_of_elements
39
37
 
38
+ attr_accessor :first
39
+
40
40
  attr_accessor :empty
41
41
 
42
42
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -45,14 +45,14 @@ module MailSlurpClient
45
45
  :'content' => :'content',
46
46
  :'pageable' => :'pageable',
47
47
  :'total' => :'total',
48
- :'last' => :'last',
49
48
  :'total_elements' => :'totalElements',
50
49
  :'total_pages' => :'totalPages',
50
+ :'last' => :'last',
51
51
  :'size' => :'size',
52
52
  :'number' => :'number',
53
53
  :'sort' => :'sort',
54
- :'first' => :'first',
55
54
  :'number_of_elements' => :'numberOfElements',
55
+ :'first' => :'first',
56
56
  :'empty' => :'empty'
57
57
  }
58
58
  end
@@ -63,14 +63,14 @@ module MailSlurpClient
63
63
  :'content' => :'Array<AliasProjection>',
64
64
  :'pageable' => :'PageableObject',
65
65
  :'total' => :'Integer',
66
- :'last' => :'Boolean',
67
66
  :'total_elements' => :'Integer',
68
67
  :'total_pages' => :'Integer',
68
+ :'last' => :'Boolean',
69
69
  :'size' => :'Integer',
70
70
  :'number' => :'Integer',
71
71
  :'sort' => :'Sort',
72
- :'first' => :'Boolean',
73
72
  :'number_of_elements' => :'Integer',
73
+ :'first' => :'Boolean',
74
74
  :'empty' => :'Boolean'
75
75
  }
76
76
  end
@@ -110,10 +110,6 @@ module MailSlurpClient
110
110
  self.total = attributes[:'total']
111
111
  end
112
112
 
113
- if attributes.key?(:'last')
114
- self.last = attributes[:'last']
115
- end
116
-
117
113
  if attributes.key?(:'total_elements')
118
114
  self.total_elements = attributes[:'total_elements']
119
115
  end
@@ -122,6 +118,10 @@ module MailSlurpClient
122
118
  self.total_pages = attributes[:'total_pages']
123
119
  end
124
120
 
121
+ if attributes.key?(:'last')
122
+ self.last = attributes[:'last']
123
+ end
124
+
125
125
  if attributes.key?(:'size')
126
126
  self.size = attributes[:'size']
127
127
  end
@@ -134,14 +134,14 @@ module MailSlurpClient
134
134
  self.sort = attributes[:'sort']
135
135
  end
136
136
 
137
- if attributes.key?(:'first')
138
- self.first = attributes[:'first']
139
- end
140
-
141
137
  if attributes.key?(:'number_of_elements')
142
138
  self.number_of_elements = attributes[:'number_of_elements']
143
139
  end
144
140
 
141
+ if attributes.key?(:'first')
142
+ self.first = attributes[:'first']
143
+ end
144
+
145
145
  if attributes.key?(:'empty')
146
146
  self.empty = attributes[:'empty']
147
147
  end
@@ -168,14 +168,14 @@ module MailSlurpClient
168
168
  content == o.content &&
169
169
  pageable == o.pageable &&
170
170
  total == o.total &&
171
- last == o.last &&
172
171
  total_elements == o.total_elements &&
173
172
  total_pages == o.total_pages &&
173
+ last == o.last &&
174
174
  size == o.size &&
175
175
  number == o.number &&
176
176
  sort == o.sort &&
177
- first == o.first &&
178
177
  number_of_elements == o.number_of_elements &&
178
+ first == o.first &&
179
179
  empty == o.empty
180
180
  end
181
181
 
@@ -188,7 +188,7 @@ module MailSlurpClient
188
188
  # Calculates hash code according to all attributes.
189
189
  # @return [Integer] Hash code
190
190
  def hash
191
- [content, pageable, total, last, total_elements, total_pages, size, number, sort, first, number_of_elements, empty].hash
191
+ [content, pageable, total, total_elements, total_pages, last, size, number, sort, number_of_elements, first, empty].hash
192
192
  end
193
193
 
194
194
  # Builds the object from hash