zyphr 0.1.79 → 0.1.80

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 630c672873231b9d5829033257022ed91aa1604f27e40bc977903d566102e8e0
4
- data.tar.gz: 381af5300b2be4e4785b9e7b23d57fb07cf8536c3f7173d18ca9c70d9d028693
3
+ metadata.gz: dac40cdb49afd5eb3e2193f089433dcd0e4c31cdd943d52a92637e2a0b0494dd
4
+ data.tar.gz: 80972861569949c63ae93730f614a5af88c792c4c65dbdf2634cadd1a64f5065
5
5
  SHA512:
6
- metadata.gz: 58a5ead8088cb50ba231f2e6df44ccf9d0b73960829e68cf2edd725b717fea2bf42cf8f3b7383fc3952f0716ef58dde51524853ba38fd46368f31847c1d4b279
7
- data.tar.gz: b7f67795771a72f547e56b95ab5cdd26e5b245ade9bdfafafb3300a35e4681dc4e0705c6e5fb658ac399e54404eeadfeb868857b86be9afb6b165f0e9f3ff7f0
6
+ metadata.gz: 259a71e3322c4485a43e54fd3d688a86407e07d6cb39347d268cc29a042fc2e540e2b07ccdb3e0f539d4554a09c6b2ca5e1f2ff6acabd1200cc2b3fe59dd7da4
7
+ data.tar.gz: 3bfb808bdbbe9477f29be3fa18921ee072bb72ea557989558db592edc876008b414f4ffbfcec653478f9a95c782705199b7c4bcb32a3ff08fcc68d4c53546ccf
@@ -87,7 +87,7 @@ end
87
87
 
88
88
  ## resend_email_verification
89
89
 
90
- > <SuccessResult> resend_email_verification(opts)
90
+ > <SuccessResult> resend_email_verification(resend_email_verification_request)
91
91
 
92
92
  Resend email verification
93
93
 
@@ -115,13 +115,11 @@ Zyphr.configure do |config|
115
115
  end
116
116
 
117
117
  api_instance = Zyphr::AuthEmailVerificationApi.new
118
- opts = {
119
- resend_email_verification_request: Zyphr::ResendEmailVerificationRequest.new # ResendEmailVerificationRequest |
120
- }
118
+ resend_email_verification_request = Zyphr::ResendEmailVerificationRequest.new({redirect_url: 'redirect_url_example'}) # ResendEmailVerificationRequest |
121
119
 
122
120
  begin
123
121
  # Resend email verification
124
- result = api_instance.resend_email_verification(opts)
122
+ result = api_instance.resend_email_verification(resend_email_verification_request)
125
123
  p result
126
124
  rescue Zyphr::ApiError => e
127
125
  puts "Error when calling AuthEmailVerificationApi->resend_email_verification: #{e}"
@@ -132,12 +130,12 @@ end
132
130
 
133
131
  This returns an Array which contains the response data, status code and headers.
134
132
 
135
- > <Array(<SuccessResult>, Integer, Hash)> resend_email_verification_with_http_info(opts)
133
+ > <Array(<SuccessResult>, Integer, Hash)> resend_email_verification_with_http_info(resend_email_verification_request)
136
134
 
137
135
  ```ruby
138
136
  begin
139
137
  # Resend email verification
140
- data, status_code, headers = api_instance.resend_email_verification_with_http_info(opts)
138
+ data, status_code, headers = api_instance.resend_email_verification_with_http_info(resend_email_verification_request)
141
139
  p status_code # => 2xx
142
140
  p headers # => { ... }
143
141
  p data # => <SuccessResult>
@@ -150,7 +148,7 @@ end
150
148
 
151
149
  | Name | Type | Description | Notes |
152
150
  | ---- | ---- | ----------- | ----- |
153
- | **resend_email_verification_request** | [**ResendEmailVerificationRequest**](ResendEmailVerificationRequest.md) | | [optional] |
151
+ | **resend_email_verification_request** | [**ResendEmailVerificationRequest**](ResendEmailVerificationRequest.md) | | |
154
152
 
155
153
  ### Return type
156
154
 
@@ -168,7 +166,7 @@ end
168
166
 
169
167
  ## send_email_verification
170
168
 
171
- > <SuccessResult> send_email_verification(opts)
169
+ > <SuccessResult> send_email_verification(send_email_verification_request)
172
170
 
173
171
  Send email verification
174
172
 
@@ -196,13 +194,11 @@ Zyphr.configure do |config|
196
194
  end
197
195
 
198
196
  api_instance = Zyphr::AuthEmailVerificationApi.new
199
- opts = {
200
- send_email_verification_request: Zyphr::SendEmailVerificationRequest.new # SendEmailVerificationRequest |
201
- }
197
+ send_email_verification_request = Zyphr::SendEmailVerificationRequest.new({redirect_url: 'redirect_url_example'}) # SendEmailVerificationRequest |
202
198
 
203
199
  begin
204
200
  # Send email verification
205
- result = api_instance.send_email_verification(opts)
201
+ result = api_instance.send_email_verification(send_email_verification_request)
206
202
  p result
207
203
  rescue Zyphr::ApiError => e
208
204
  puts "Error when calling AuthEmailVerificationApi->send_email_verification: #{e}"
@@ -213,12 +209,12 @@ end
213
209
 
214
210
  This returns an Array which contains the response data, status code and headers.
215
211
 
216
- > <Array(<SuccessResult>, Integer, Hash)> send_email_verification_with_http_info(opts)
212
+ > <Array(<SuccessResult>, Integer, Hash)> send_email_verification_with_http_info(send_email_verification_request)
217
213
 
218
214
  ```ruby
219
215
  begin
220
216
  # Send email verification
221
- data, status_code, headers = api_instance.send_email_verification_with_http_info(opts)
217
+ data, status_code, headers = api_instance.send_email_verification_with_http_info(send_email_verification_request)
222
218
  p status_code # => 2xx
223
219
  p headers # => { ... }
224
220
  p data # => <SuccessResult>
@@ -231,7 +227,7 @@ end
231
227
 
232
228
  | Name | Type | Description | Notes |
233
229
  | ---- | ---- | ----------- | ----- |
234
- | **send_email_verification_request** | [**SendEmailVerificationRequest**](SendEmailVerificationRequest.md) | | [optional] |
230
+ | **send_email_verification_request** | [**SendEmailVerificationRequest**](SendEmailVerificationRequest.md) | | |
235
231
 
236
232
  ### Return type
237
233
 
@@ -35,7 +35,7 @@ Zyphr.configure do |config|
35
35
  end
36
36
 
37
37
  api_instance = Zyphr::AuthMagicLinksApi.new
38
- magic_link_send_request = Zyphr::MagicLinkSendRequest.new({email: 'email_example'}) # MagicLinkSendRequest |
38
+ magic_link_send_request = Zyphr::MagicLinkSendRequest.new({email: 'email_example', redirect_url: 'redirect_url_example'}) # MagicLinkSendRequest |
39
39
 
40
40
  begin
41
41
  # Send a magic link
@@ -36,7 +36,7 @@ Zyphr.configure do |config|
36
36
  end
37
37
 
38
38
  api_instance = Zyphr::AuthPasswordResetApi.new
39
- forgot_password_request = Zyphr::ForgotPasswordRequest.new({email: 'email_example'}) # ForgotPasswordRequest |
39
+ forgot_password_request = Zyphr::ForgotPasswordRequest.new({email: 'email_example', redirect_url: 'redirect_url_example'}) # ForgotPasswordRequest |
40
40
 
41
41
  begin
42
42
  # Request a password reset
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **email** | **String** | | |
8
- | **redirect_url** | **String** | | [optional] |
8
+ | **redirect_url** | **String** | Where the emailed link points (&#x60;?token&#x3D;&lt;raw&gt;&#x60; is appended). Required: Zyphr does not host auth pages. Must match the application&#39;s redirect_uris when any are registered. | |
9
9
  | **return_link** | **Boolean** | When true, Zyphr mints the token but sends no email, and returns the link in &#x60;data.link&#x60; so you can render and send the email yourself (for example through &#x60;POST /v1/emails&#x60;). Requires &#x60;redirect_url&#x60;. | [optional][default to false] |
10
10
 
11
11
  ## Example
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **email** | **String** | | |
8
- | **redirect_url** | **String** | | [optional] |
8
+ | **redirect_url** | **String** | Where the emailed link points (&#x60;?token&#x3D;&lt;raw&gt;&#x60; is appended). Required: Zyphr does not host auth pages. Must match the application&#39;s redirect_uris when any are registered. | |
9
9
  | **return_link** | **Boolean** | When true, Zyphr mints the token but sends no email, and returns the link in &#x60;data.link&#x60; so you can render and send the email yourself (for example through &#x60;POST /v1/emails&#x60;). Requires &#x60;redirect_url&#x60;. | [optional][default to false] |
10
10
 
11
11
  ## Example
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **redirect_url** | **String** | URL to redirect to after verification. Same rules as &#x60;POST /auth/verify-email/send&#x60;. | [optional] |
7
+ | **redirect_url** | **String** | Required. URL to redirect to after verification. Same rules as &#x60;POST /auth/verify-email/send&#x60;. | |
8
8
 
9
9
  ## Example
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **redirect_url** | **String** | URL to redirect to after verification. Must be snake_case &#x60;redirect_url&#x60;: a camelCase &#x60;redirectUrl&#x60; is rejected with 400, since Zyphr hosts no fallback page. Must match one of the application&#39;s configured redirect URIs. | [optional] |
7
+ | **redirect_url** | **String** | Required. URL to redirect to after verification. Must be snake_case &#x60;redirect_url&#x60;: a camelCase &#x60;redirectUrl&#x60; is rejected with 400, since Zyphr hosts no fallback page. Must match one of the application&#39;s configured redirect URIs. | |
8
8
 
9
9
  ## Example
10
10
 
@@ -89,23 +89,27 @@ module Zyphr
89
89
 
90
90
  # Resend email verification
91
91
  # Resend the verification email to the authenticated user. Rate limited to once per 60 seconds. Requires all three credentials simultaneously: the application key (`X-Application-Key`), the application secret (`X-Application-Secret`), and the end user's `Authorization: Bearer` token. Failures behave as on `POST /auth/verify-email/send`, including the 200 accepted-and-suppressed response for a recipient outside the application allowlist.
92
+ # @param resend_email_verification_request [ResendEmailVerificationRequest]
92
93
  # @param [Hash] opts the optional parameters
93
- # @option opts [ResendEmailVerificationRequest] :resend_email_verification_request
94
94
  # @return [SuccessResult]
95
- def resend_email_verification(opts = {})
96
- data, _status_code, _headers = resend_email_verification_with_http_info(opts)
95
+ def resend_email_verification(resend_email_verification_request, opts = {})
96
+ data, _status_code, _headers = resend_email_verification_with_http_info(resend_email_verification_request, opts)
97
97
  data
98
98
  end
99
99
 
100
100
  # Resend email verification
101
101
  # Resend the verification email to the authenticated user. Rate limited to once per 60 seconds. Requires all three credentials simultaneously: the application key (&#x60;X-Application-Key&#x60;), the application secret (&#x60;X-Application-Secret&#x60;), and the end user&#39;s &#x60;Authorization: Bearer&#x60; token. Failures behave as on &#x60;POST /auth/verify-email/send&#x60;, including the 200 accepted-and-suppressed response for a recipient outside the application allowlist.
102
+ # @param resend_email_verification_request [ResendEmailVerificationRequest]
102
103
  # @param [Hash] opts the optional parameters
103
- # @option opts [ResendEmailVerificationRequest] :resend_email_verification_request
104
104
  # @return [Array<(SuccessResult, Integer, Hash)>] SuccessResult data, response status code and response headers
105
- def resend_email_verification_with_http_info(opts = {})
105
+ def resend_email_verification_with_http_info(resend_email_verification_request, opts = {})
106
106
  if @api_client.config.debugging
107
107
  @api_client.config.logger.debug 'Calling API: AuthEmailVerificationApi.resend_email_verification ...'
108
108
  end
109
+ # verify the required parameter 'resend_email_verification_request' is set
110
+ if @api_client.config.client_side_validation && resend_email_verification_request.nil?
111
+ fail ArgumentError, "Missing the required parameter 'resend_email_verification_request' when calling AuthEmailVerificationApi.resend_email_verification"
112
+ end
109
113
  # resource path
110
114
  local_var_path = '/auth/verify-email/resend'
111
115
 
@@ -126,7 +130,7 @@ module Zyphr
126
130
  form_params = opts[:form_params] || {}
127
131
 
128
132
  # http body (model)
129
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'resend_email_verification_request'])
133
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(resend_email_verification_request)
130
134
 
131
135
  # return_type
132
136
  return_type = opts[:debug_return_type] || 'SuccessResult'
@@ -153,23 +157,27 @@ module Zyphr
153
157
 
154
158
  # Send email verification
155
159
  # Send an email verification link to the authenticated user. Requires all three credentials simultaneously: the application key (`X-Application-Key`), the application secret (`X-Application-Secret`), and the end user's `Authorization: Bearer` token. If the recipient is blocked by the application's `auth_email_mode=allowlist` gate, the request is still **accepted with 200** (mirroring `POST /auth/forgot-password`): no email is sent, and the suppression is recorded as a `messages` row (`status=suppressed`, `status_reason=recipient_not_allowlisted`) and an `email.suppressed` webhook. It is NOT a 500.
160
+ # @param send_email_verification_request [SendEmailVerificationRequest]
156
161
  # @param [Hash] opts the optional parameters
157
- # @option opts [SendEmailVerificationRequest] :send_email_verification_request
158
162
  # @return [SuccessResult]
159
- def send_email_verification(opts = {})
160
- data, _status_code, _headers = send_email_verification_with_http_info(opts)
163
+ def send_email_verification(send_email_verification_request, opts = {})
164
+ data, _status_code, _headers = send_email_verification_with_http_info(send_email_verification_request, opts)
161
165
  data
162
166
  end
163
167
 
164
168
  # Send email verification
165
169
  # Send an email verification link to the authenticated user. Requires all three credentials simultaneously: the application key (&#x60;X-Application-Key&#x60;), the application secret (&#x60;X-Application-Secret&#x60;), and the end user&#39;s &#x60;Authorization: Bearer&#x60; token. If the recipient is blocked by the application&#39;s &#x60;auth_email_mode&#x3D;allowlist&#x60; gate, the request is still **accepted with 200** (mirroring &#x60;POST /auth/forgot-password&#x60;): no email is sent, and the suppression is recorded as a &#x60;messages&#x60; row (&#x60;status&#x3D;suppressed&#x60;, &#x60;status_reason&#x3D;recipient_not_allowlisted&#x60;) and an &#x60;email.suppressed&#x60; webhook. It is NOT a 500.
170
+ # @param send_email_verification_request [SendEmailVerificationRequest]
166
171
  # @param [Hash] opts the optional parameters
167
- # @option opts [SendEmailVerificationRequest] :send_email_verification_request
168
172
  # @return [Array<(SuccessResult, Integer, Hash)>] SuccessResult data, response status code and response headers
169
- def send_email_verification_with_http_info(opts = {})
173
+ def send_email_verification_with_http_info(send_email_verification_request, opts = {})
170
174
  if @api_client.config.debugging
171
175
  @api_client.config.logger.debug 'Calling API: AuthEmailVerificationApi.send_email_verification ...'
172
176
  end
177
+ # verify the required parameter 'send_email_verification_request' is set
178
+ if @api_client.config.client_side_validation && send_email_verification_request.nil?
179
+ fail ArgumentError, "Missing the required parameter 'send_email_verification_request' when calling AuthEmailVerificationApi.send_email_verification"
180
+ end
173
181
  # resource path
174
182
  local_var_path = '/auth/verify-email/send'
175
183
 
@@ -190,7 +198,7 @@ module Zyphr
190
198
  form_params = opts[:form_params] || {}
191
199
 
192
200
  # http body (model)
193
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'send_email_verification_request'])
201
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(send_email_verification_request)
194
202
 
195
203
  # return_type
196
204
  return_type = opts[:debug_return_type] || 'SuccessResult'
@@ -17,6 +17,7 @@ module Zyphr
17
17
  class ForgotPasswordRequest
18
18
  attr_accessor :email
19
19
 
20
+ # Where the emailed link points (`?token=<raw>` is appended). Required: Zyphr does not host auth pages. Must match the application's redirect_uris when any are registered.
20
21
  attr_accessor :redirect_url
21
22
 
22
23
  # When true, Zyphr mints the token but sends no email, and returns the link in `data.link` so you can render and send the email yourself (for example through `POST /v1/emails`). Requires `redirect_url`.
@@ -80,6 +81,8 @@ module Zyphr
80
81
 
81
82
  if attributes.key?(:'redirect_url')
82
83
  self.redirect_url = attributes[:'redirect_url']
84
+ else
85
+ self.redirect_url = nil
83
86
  end
84
87
 
85
88
  if attributes.key?(:'return_link')
@@ -98,6 +101,10 @@ module Zyphr
98
101
  invalid_properties.push('invalid value for "email", email cannot be nil.')
99
102
  end
100
103
 
104
+ if @redirect_url.nil?
105
+ invalid_properties.push('invalid value for "redirect_url", redirect_url cannot be nil.')
106
+ end
107
+
101
108
  invalid_properties
102
109
  end
103
110
 
@@ -106,6 +113,7 @@ module Zyphr
106
113
  def valid?
107
114
  warn '[DEPRECATED] the `valid?` method is obsolete'
108
115
  return false if @email.nil?
116
+ return false if @redirect_url.nil?
109
117
  true
110
118
  end
111
119
 
@@ -119,6 +127,16 @@ module Zyphr
119
127
  @email = email
120
128
  end
121
129
 
130
+ # Custom attribute writer method with validation
131
+ # @param [Object] redirect_url Value to be assigned
132
+ def redirect_url=(redirect_url)
133
+ if redirect_url.nil?
134
+ fail ArgumentError, 'redirect_url cannot be nil'
135
+ end
136
+
137
+ @redirect_url = redirect_url
138
+ end
139
+
122
140
  # Checks equality by comparing each attribute.
123
141
  # @param [Object] Object to be compared
124
142
  def ==(o)
@@ -17,6 +17,7 @@ module Zyphr
17
17
  class MagicLinkSendRequest
18
18
  attr_accessor :email
19
19
 
20
+ # Where the emailed link points (`?token=<raw>` is appended). Required: Zyphr does not host auth pages. Must match the application's redirect_uris when any are registered.
20
21
  attr_accessor :redirect_url
21
22
 
22
23
  # When true, Zyphr mints the token but sends no email, and returns the link in `data.link` so you can render and send the email yourself (for example through `POST /v1/emails`). Requires `redirect_url`.
@@ -80,6 +81,8 @@ module Zyphr
80
81
 
81
82
  if attributes.key?(:'redirect_url')
82
83
  self.redirect_url = attributes[:'redirect_url']
84
+ else
85
+ self.redirect_url = nil
83
86
  end
84
87
 
85
88
  if attributes.key?(:'return_link')
@@ -98,6 +101,10 @@ module Zyphr
98
101
  invalid_properties.push('invalid value for "email", email cannot be nil.')
99
102
  end
100
103
 
104
+ if @redirect_url.nil?
105
+ invalid_properties.push('invalid value for "redirect_url", redirect_url cannot be nil.')
106
+ end
107
+
101
108
  invalid_properties
102
109
  end
103
110
 
@@ -106,6 +113,7 @@ module Zyphr
106
113
  def valid?
107
114
  warn '[DEPRECATED] the `valid?` method is obsolete'
108
115
  return false if @email.nil?
116
+ return false if @redirect_url.nil?
109
117
  true
110
118
  end
111
119
 
@@ -119,6 +127,16 @@ module Zyphr
119
127
  @email = email
120
128
  end
121
129
 
130
+ # Custom attribute writer method with validation
131
+ # @param [Object] redirect_url Value to be assigned
132
+ def redirect_url=(redirect_url)
133
+ if redirect_url.nil?
134
+ fail ArgumentError, 'redirect_url cannot be nil'
135
+ end
136
+
137
+ @redirect_url = redirect_url
138
+ end
139
+
122
140
  # Checks equality by comparing each attribute.
123
141
  # @param [Object] Object to be compared
124
142
  def ==(o)
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Zyphr
17
17
  class ResendEmailVerificationRequest
18
- # URL to redirect to after verification. Same rules as `POST /auth/verify-email/send`.
18
+ # Required. URL to redirect to after verification. Same rules as `POST /auth/verify-email/send`.
19
19
  attr_accessor :redirect_url
20
20
 
21
21
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -66,6 +66,8 @@ module Zyphr
66
66
 
67
67
  if attributes.key?(:'redirect_url')
68
68
  self.redirect_url = attributes[:'redirect_url']
69
+ else
70
+ self.redirect_url = nil
69
71
  end
70
72
  end
71
73
 
@@ -74,6 +76,10 @@ module Zyphr
74
76
  def list_invalid_properties
75
77
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
76
78
  invalid_properties = Array.new
79
+ if @redirect_url.nil?
80
+ invalid_properties.push('invalid value for "redirect_url", redirect_url cannot be nil.')
81
+ end
82
+
77
83
  invalid_properties
78
84
  end
79
85
 
@@ -81,9 +87,20 @@ module Zyphr
81
87
  # @return true if the model is valid
82
88
  def valid?
83
89
  warn '[DEPRECATED] the `valid?` method is obsolete'
90
+ return false if @redirect_url.nil?
84
91
  true
85
92
  end
86
93
 
94
+ # Custom attribute writer method with validation
95
+ # @param [Object] redirect_url Value to be assigned
96
+ def redirect_url=(redirect_url)
97
+ if redirect_url.nil?
98
+ fail ArgumentError, 'redirect_url cannot be nil'
99
+ end
100
+
101
+ @redirect_url = redirect_url
102
+ end
103
+
87
104
  # Checks equality by comparing each attribute.
88
105
  # @param [Object] Object to be compared
89
106
  def ==(o)
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Zyphr
17
17
  class SendEmailVerificationRequest
18
- # URL to redirect to after verification. Must be snake_case `redirect_url`: a camelCase `redirectUrl` is rejected with 400, since Zyphr hosts no fallback page. Must match one of the application's configured redirect URIs.
18
+ # Required. URL to redirect to after verification. Must be snake_case `redirect_url`: a camelCase `redirectUrl` is rejected with 400, since Zyphr hosts no fallback page. Must match one of the application's configured redirect URIs.
19
19
  attr_accessor :redirect_url
20
20
 
21
21
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -66,6 +66,8 @@ module Zyphr
66
66
 
67
67
  if attributes.key?(:'redirect_url')
68
68
  self.redirect_url = attributes[:'redirect_url']
69
+ else
70
+ self.redirect_url = nil
69
71
  end
70
72
  end
71
73
 
@@ -74,6 +76,10 @@ module Zyphr
74
76
  def list_invalid_properties
75
77
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
76
78
  invalid_properties = Array.new
79
+ if @redirect_url.nil?
80
+ invalid_properties.push('invalid value for "redirect_url", redirect_url cannot be nil.')
81
+ end
82
+
77
83
  invalid_properties
78
84
  end
79
85
 
@@ -81,9 +87,20 @@ module Zyphr
81
87
  # @return true if the model is valid
82
88
  def valid?
83
89
  warn '[DEPRECATED] the `valid?` method is obsolete'
90
+ return false if @redirect_url.nil?
84
91
  true
85
92
  end
86
93
 
94
+ # Custom attribute writer method with validation
95
+ # @param [Object] redirect_url Value to be assigned
96
+ def redirect_url=(redirect_url)
97
+ if redirect_url.nil?
98
+ fail ArgumentError, 'redirect_url cannot be nil'
99
+ end
100
+
101
+ @redirect_url = redirect_url
102
+ end
103
+
87
104
  # Checks equality by comparing each attribute.
88
105
  # @param [Object] Object to be compared
89
106
  def ==(o)
@@ -47,8 +47,8 @@ describe 'AuthEmailVerificationApi' do
47
47
  # unit tests for resend_email_verification
48
48
  # Resend email verification
49
49
  # Resend the verification email to the authenticated user. Rate limited to once per 60 seconds. Requires all three credentials simultaneously: the application key (&#x60;X-Application-Key&#x60;), the application secret (&#x60;X-Application-Secret&#x60;), and the end user&#39;s &#x60;Authorization: Bearer&#x60; token. Failures behave as on &#x60;POST /auth/verify-email/send&#x60;, including the 200 accepted-and-suppressed response for a recipient outside the application allowlist.
50
+ # @param resend_email_verification_request
50
51
  # @param [Hash] opts the optional parameters
51
- # @option opts [ResendEmailVerificationRequest] :resend_email_verification_request
52
52
  # @return [SuccessResult]
53
53
  describe 'resend_email_verification test' do
54
54
  it 'should work' do
@@ -59,8 +59,8 @@ describe 'AuthEmailVerificationApi' do
59
59
  # unit tests for send_email_verification
60
60
  # Send email verification
61
61
  # Send an email verification link to the authenticated user. Requires all three credentials simultaneously: the application key (&#x60;X-Application-Key&#x60;), the application secret (&#x60;X-Application-Secret&#x60;), and the end user&#39;s &#x60;Authorization: Bearer&#x60; token. If the recipient is blocked by the application&#39;s &#x60;auth_email_mode&#x3D;allowlist&#x60; gate, the request is still **accepted with 200** (mirroring &#x60;POST /auth/forgot-password&#x60;): no email is sent, and the suppression is recorded as a &#x60;messages&#x60; row (&#x60;status&#x3D;suppressed&#x60;, &#x60;status_reason&#x3D;recipient_not_allowlisted&#x60;) and an &#x60;email.suppressed&#x60; webhook. It is NOT a 500.
62
+ # @param send_email_verification_request
62
63
  # @param [Hash] opts the optional parameters
63
- # @option opts [SendEmailVerificationRequest] :send_email_verification_request
64
64
  # @return [SuccessResult]
65
65
  describe 'send_email_verification test' do
66
66
  it 'should work' do
data/zyphr.gemspec CHANGED
@@ -17,7 +17,7 @@ require "zyphr/version"
17
17
 
18
18
  Gem::Specification.new do |s|
19
19
  s.name = "zyphr"
20
- s.version = '0.1.79'
20
+ s.version = '0.1.80'
21
21
  s.platform = Gem::Platform::RUBY
22
22
  s.authors = ["Zyphr"]
23
23
  s.email = ["support@zyphr.dev"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zyphr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.79
4
+ version: 0.1.80
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zyphr