zyphr 0.1.34 → 0.1.35
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 +4 -4
- data/README.md +14 -13
- data/docs/AuthEmailOTPApi.md +384 -0
- data/docs/CheckEmailOtpAvailability200Response.md +18 -0
- data/docs/{PhoneAuthAvailabilityResponseData.md → CheckEmailOtpAvailability200ResponseData.md} +2 -2
- data/docs/PhoneAuthAvailabilityResponse.md +1 -1
- data/docs/SendEmailOtpRegistrationRequest.md +18 -0
- data/docs/VerifyEmailOtpLoginRequest.md +22 -0
- data/docs/VerifyEmailOtpRegistrationRequest.md +24 -0
- data/lib/zyphr/api/auth_email_otp_api.rb +351 -0
- data/lib/zyphr/models/check_email_otp_availability200_response.rb +220 -0
- data/lib/zyphr/models/{phone_auth_availability_response_data.rb → check_email_otp_availability200_response_data.rb} +3 -3
- data/lib/zyphr/models/phone_auth_availability_response.rb +1 -1
- data/lib/zyphr/models/send_email_otp_registration_request.rb +237 -0
- data/lib/zyphr/models/verify_email_otp_login_request.rb +272 -0
- data/lib/zyphr/models/verify_email_otp_registration_request.rb +281 -0
- data/lib/zyphr.rb +6 -1
- data/spec/api/auth_email_otp_api_spec.rb +94 -0
- data/spec/models/{phone_auth_availability_response_data_spec.rb → check_email_otp_availability200_response_data_spec.rb} +6 -6
- data/spec/models/check_email_otp_availability200_response_spec.rb +36 -0
- data/spec/models/send_email_otp_registration_request_spec.rb +36 -0
- data/spec/models/verify_email_otp_login_request_spec.rb +48 -0
- data/spec/models/verify_email_otp_registration_request_spec.rb +54 -0
- data/zyphr.gemspec +1 -1
- metadata +441 -421
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zyphr API
|
|
3
|
+
|
|
4
|
+
#Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@zyphr.dev
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zyphr
|
|
17
|
+
class VerifyEmailOtpRegistrationRequest
|
|
18
|
+
attr_accessor :email
|
|
19
|
+
|
|
20
|
+
attr_accessor :code
|
|
21
|
+
|
|
22
|
+
attr_accessor :name
|
|
23
|
+
|
|
24
|
+
attr_accessor :metadata
|
|
25
|
+
|
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
+
def self.attribute_map
|
|
28
|
+
{
|
|
29
|
+
:'email' => :'email',
|
|
30
|
+
:'code' => :'code',
|
|
31
|
+
:'name' => :'name',
|
|
32
|
+
:'metadata' => :'metadata'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
acceptable_attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'email' => :'String',
|
|
50
|
+
:'code' => :'String',
|
|
51
|
+
:'name' => :'String',
|
|
52
|
+
:'metadata' => :'Object'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of attributes with nullable: true
|
|
57
|
+
def self.openapi_nullable
|
|
58
|
+
Set.new([
|
|
59
|
+
])
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Initializes the object
|
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
|
+
def initialize(attributes = {})
|
|
65
|
+
if (!attributes.is_a?(Hash))
|
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zyphr::VerifyEmailOtpRegistrationRequest` initialize method"
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zyphr::VerifyEmailOtpRegistrationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
74
|
+
end
|
|
75
|
+
h[k.to_sym] = v
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'email')
|
|
79
|
+
self.email = attributes[:'email']
|
|
80
|
+
else
|
|
81
|
+
self.email = nil
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'code')
|
|
85
|
+
self.code = attributes[:'code']
|
|
86
|
+
else
|
|
87
|
+
self.code = nil
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'name')
|
|
91
|
+
self.name = attributes[:'name']
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'metadata')
|
|
95
|
+
self.metadata = attributes[:'metadata']
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
100
|
+
# @return Array for valid properties with the reasons
|
|
101
|
+
def list_invalid_properties
|
|
102
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
103
|
+
invalid_properties = Array.new
|
|
104
|
+
if @email.nil?
|
|
105
|
+
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if @code.nil?
|
|
109
|
+
invalid_properties.push('invalid value for "code", code cannot be nil.')
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
invalid_properties
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Check to see if the all the properties in the model are valid
|
|
116
|
+
# @return true if the model is valid
|
|
117
|
+
def valid?
|
|
118
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
119
|
+
return false if @email.nil?
|
|
120
|
+
return false if @code.nil?
|
|
121
|
+
true
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Custom attribute writer method with validation
|
|
125
|
+
# @param [Object] email Value to be assigned
|
|
126
|
+
def email=(email)
|
|
127
|
+
if email.nil?
|
|
128
|
+
fail ArgumentError, 'email cannot be nil'
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
@email = email
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Custom attribute writer method with validation
|
|
135
|
+
# @param [Object] code Value to be assigned
|
|
136
|
+
def code=(code)
|
|
137
|
+
if code.nil?
|
|
138
|
+
fail ArgumentError, 'code cannot be nil'
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
@code = code
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Checks equality by comparing each attribute.
|
|
145
|
+
# @param [Object] Object to be compared
|
|
146
|
+
def ==(o)
|
|
147
|
+
return true if self.equal?(o)
|
|
148
|
+
self.class == o.class &&
|
|
149
|
+
email == o.email &&
|
|
150
|
+
code == o.code &&
|
|
151
|
+
name == o.name &&
|
|
152
|
+
metadata == o.metadata
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# @see the `==` method
|
|
156
|
+
# @param [Object] Object to be compared
|
|
157
|
+
def eql?(o)
|
|
158
|
+
self == o
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Calculates hash code according to all attributes.
|
|
162
|
+
# @return [Integer] Hash code
|
|
163
|
+
def hash
|
|
164
|
+
[email, code, name, metadata].hash
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Builds the object from hash
|
|
168
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
169
|
+
# @return [Object] Returns the model itself
|
|
170
|
+
def self.build_from_hash(attributes)
|
|
171
|
+
return nil unless attributes.is_a?(Hash)
|
|
172
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
173
|
+
transformed_hash = {}
|
|
174
|
+
openapi_types.each_pair do |key, type|
|
|
175
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
176
|
+
transformed_hash["#{key}"] = nil
|
|
177
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
178
|
+
# check to ensure the input is an array given that the attribute
|
|
179
|
+
# is documented as an array but the input is not
|
|
180
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
181
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
182
|
+
end
|
|
183
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
184
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
new(transformed_hash)
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Deserializes the data based on type
|
|
191
|
+
# @param string type Data type
|
|
192
|
+
# @param string value Value to be deserialized
|
|
193
|
+
# @return [Object] Deserialized data
|
|
194
|
+
def self._deserialize(type, value)
|
|
195
|
+
case type.to_sym
|
|
196
|
+
when :Time
|
|
197
|
+
Time.parse(value)
|
|
198
|
+
when :Date
|
|
199
|
+
Date.parse(value)
|
|
200
|
+
when :String
|
|
201
|
+
value.to_s
|
|
202
|
+
when :Integer
|
|
203
|
+
value.to_i
|
|
204
|
+
when :Float
|
|
205
|
+
value.to_f
|
|
206
|
+
when :Boolean
|
|
207
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
208
|
+
true
|
|
209
|
+
else
|
|
210
|
+
false
|
|
211
|
+
end
|
|
212
|
+
when :Object
|
|
213
|
+
# generic object (usually a Hash), return directly
|
|
214
|
+
value
|
|
215
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
216
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
217
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
218
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
219
|
+
k_type = Regexp.last_match[:k_type]
|
|
220
|
+
v_type = Regexp.last_match[:v_type]
|
|
221
|
+
{}.tap do |hash|
|
|
222
|
+
value.each do |k, v|
|
|
223
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
else # model
|
|
227
|
+
# models (e.g. Pet) or oneOf
|
|
228
|
+
klass = Zyphr.const_get(type)
|
|
229
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Returns the string representation of the object
|
|
234
|
+
# @return [String] String presentation of the object
|
|
235
|
+
def to_s
|
|
236
|
+
to_hash.to_s
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
240
|
+
# @return [Hash] Returns the object in the form of hash
|
|
241
|
+
def to_body
|
|
242
|
+
to_hash
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Returns the object in the form of hash
|
|
246
|
+
# @return [Hash] Returns the object in the form of hash
|
|
247
|
+
def to_hash
|
|
248
|
+
hash = {}
|
|
249
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
250
|
+
value = self.send(attr)
|
|
251
|
+
if value.nil?
|
|
252
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
253
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
hash[param] = _to_hash(value)
|
|
257
|
+
end
|
|
258
|
+
hash
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
# Outputs non-array value in the form of hash
|
|
262
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
263
|
+
# @param [Object] value Any valid value
|
|
264
|
+
# @return [Hash] Returns the value in the form of hash
|
|
265
|
+
def _to_hash(value)
|
|
266
|
+
if value.is_a?(Array)
|
|
267
|
+
value.compact.map { |v| _to_hash(v) }
|
|
268
|
+
elsif value.is_a?(Hash)
|
|
269
|
+
{}.tap do |hash|
|
|
270
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
271
|
+
end
|
|
272
|
+
elsif value.respond_to? :to_hash
|
|
273
|
+
value.to_hash
|
|
274
|
+
else
|
|
275
|
+
value
|
|
276
|
+
end
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
end
|
data/lib/zyphr.rb
CHANGED
|
@@ -60,6 +60,8 @@ require 'zyphr/models/bulk_upsert_auth_email_templates_response'
|
|
|
60
60
|
require 'zyphr/models/category'
|
|
61
61
|
require 'zyphr/models/category_list_response'
|
|
62
62
|
require 'zyphr/models/category_response'
|
|
63
|
+
require 'zyphr/models/check_email_otp_availability200_response'
|
|
64
|
+
require 'zyphr/models/check_email_otp_availability200_response_data'
|
|
63
65
|
require 'zyphr/models/confirm_email_verification_request'
|
|
64
66
|
require 'zyphr/models/confirm_email_verification_response'
|
|
65
67
|
require 'zyphr/models/confirm_email_verification_response_data'
|
|
@@ -210,7 +212,6 @@ require 'zyphr/models/payload_too_large_error'
|
|
|
210
212
|
require 'zyphr/models/payload_too_large_error_error'
|
|
211
213
|
require 'zyphr/models/payload_too_large_error_error_details'
|
|
212
214
|
require 'zyphr/models/phone_auth_availability_response'
|
|
213
|
-
require 'zyphr/models/phone_auth_availability_response_data'
|
|
214
215
|
require 'zyphr/models/phone_login_verify_request'
|
|
215
216
|
require 'zyphr/models/phone_otp_send_request'
|
|
216
217
|
require 'zyphr/models/phone_otp_sent_response'
|
|
@@ -260,6 +261,7 @@ require 'zyphr/models/send_batch_in_app_response'
|
|
|
260
261
|
require 'zyphr/models/send_batch_sms_data'
|
|
261
262
|
require 'zyphr/models/send_batch_sms_request'
|
|
262
263
|
require 'zyphr/models/send_batch_sms_response'
|
|
264
|
+
require 'zyphr/models/send_email_otp_registration_request'
|
|
263
265
|
require 'zyphr/models/send_email_request'
|
|
264
266
|
require 'zyphr/models/send_email_response'
|
|
265
267
|
require 'zyphr/models/send_email_response_data'
|
|
@@ -371,6 +373,8 @@ require 'zyphr/models/verification_status_response'
|
|
|
371
373
|
require 'zyphr/models/verification_status_response_data'
|
|
372
374
|
require 'zyphr/models/verify_domain_response'
|
|
373
375
|
require 'zyphr/models/verify_domain_response_data'
|
|
376
|
+
require 'zyphr/models/verify_email_otp_login_request'
|
|
377
|
+
require 'zyphr/models/verify_email_otp_registration_request'
|
|
374
378
|
require 'zyphr/models/verify_sms_config_data'
|
|
375
379
|
require 'zyphr/models/verify_sms_config_response'
|
|
376
380
|
require 'zyphr/models/waa_s_application'
|
|
@@ -443,6 +447,7 @@ require 'zyphr/models/workflow_step_execution'
|
|
|
443
447
|
require 'zyphr/models/workflow_step_execution_status'
|
|
444
448
|
|
|
445
449
|
# APIs
|
|
450
|
+
require 'zyphr/api/auth_email_otp_api'
|
|
446
451
|
require 'zyphr/api/auth_email_templates_api'
|
|
447
452
|
require 'zyphr/api/auth_email_verification_api'
|
|
448
453
|
require 'zyphr/api/auth_login_api'
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zyphr API
|
|
3
|
+
|
|
4
|
+
#Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@zyphr.dev
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for Zyphr::AuthEmailOTPApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'AuthEmailOTPApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = Zyphr::AuthEmailOTPApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of AuthEmailOTPApi' do
|
|
30
|
+
it 'should create an instance of AuthEmailOTPApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(Zyphr::AuthEmailOTPApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for check_email_otp_availability
|
|
36
|
+
# Check email OTP availability
|
|
37
|
+
# Check if numeric email OTP authentication is available for this application. Requires a verified sending domain on the project.
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @return [CheckEmailOtpAvailability200Response]
|
|
40
|
+
describe 'check_email_otp_availability test' do
|
|
41
|
+
it 'should work' do
|
|
42
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# unit tests for send_email_otp_login
|
|
47
|
+
# Send email OTP for login
|
|
48
|
+
# Send a numeric verification code to an existing user's email address for login.
|
|
49
|
+
# @param send_email_otp_registration_request
|
|
50
|
+
# @param [Hash] opts the optional parameters
|
|
51
|
+
# @return [PhoneOtpSentResponse]
|
|
52
|
+
describe 'send_email_otp_login test' do
|
|
53
|
+
it 'should work' do
|
|
54
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# unit tests for send_email_otp_registration
|
|
59
|
+
# Send email OTP for registration
|
|
60
|
+
# Send a numeric verification code to an email address for new user registration.
|
|
61
|
+
# @param send_email_otp_registration_request
|
|
62
|
+
# @param [Hash] opts the optional parameters
|
|
63
|
+
# @return [PhoneOtpSentResponse]
|
|
64
|
+
describe 'send_email_otp_registration test' do
|
|
65
|
+
it 'should work' do
|
|
66
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# unit tests for verify_email_otp_login
|
|
71
|
+
# Verify email OTP login
|
|
72
|
+
# Verify the numeric code and login an existing user. If MFA is enabled, returns mfa_required with a challenge token.
|
|
73
|
+
# @param verify_email_otp_login_request
|
|
74
|
+
# @param [Hash] opts the optional parameters
|
|
75
|
+
# @return [AuthLoginResponse]
|
|
76
|
+
describe 'verify_email_otp_login test' do
|
|
77
|
+
it 'should work' do
|
|
78
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# unit tests for verify_email_otp_registration
|
|
83
|
+
# Verify email OTP registration
|
|
84
|
+
# Verify the numeric code and create a new user account with the email address.
|
|
85
|
+
# @param verify_email_otp_registration_request
|
|
86
|
+
# @param [Hash] opts the optional parameters
|
|
87
|
+
# @return [AuthResultResponse]
|
|
88
|
+
describe 'verify_email_otp_registration test' do
|
|
89
|
+
it 'should work' do
|
|
90
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
end
|
|
@@ -14,16 +14,16 @@ require 'spec_helper'
|
|
|
14
14
|
require 'json'
|
|
15
15
|
require 'date'
|
|
16
16
|
|
|
17
|
-
# Unit tests for Zyphr::
|
|
17
|
+
# Unit tests for Zyphr::CheckEmailOtpAvailability200ResponseData
|
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
19
|
# Please update as you see appropriate
|
|
20
|
-
describe Zyphr::
|
|
21
|
-
let(:instance) { Zyphr::
|
|
20
|
+
describe Zyphr::CheckEmailOtpAvailability200ResponseData do
|
|
21
|
+
let(:instance) { Zyphr::CheckEmailOtpAvailability200ResponseData.new }
|
|
22
22
|
|
|
23
|
-
describe 'test an instance of
|
|
24
|
-
it 'should create an instance of
|
|
23
|
+
describe 'test an instance of CheckEmailOtpAvailability200ResponseData' do
|
|
24
|
+
it 'should create an instance of CheckEmailOtpAvailability200ResponseData' do
|
|
25
25
|
# uncomment below to test the instance creation
|
|
26
|
-
#expect(instance).to be_instance_of(Zyphr::
|
|
26
|
+
#expect(instance).to be_instance_of(Zyphr::CheckEmailOtpAvailability200ResponseData)
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zyphr API
|
|
3
|
+
|
|
4
|
+
#Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@zyphr.dev
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zyphr::CheckEmailOtpAvailability200Response
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zyphr::CheckEmailOtpAvailability200Response do
|
|
21
|
+
let(:instance) { Zyphr::CheckEmailOtpAvailability200Response.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CheckEmailOtpAvailability200Response' do
|
|
24
|
+
it 'should create an instance of CheckEmailOtpAvailability200Response' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zyphr::CheckEmailOtpAvailability200Response)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "data"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zyphr API
|
|
3
|
+
|
|
4
|
+
#Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@zyphr.dev
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zyphr::SendEmailOtpRegistrationRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zyphr::SendEmailOtpRegistrationRequest do
|
|
21
|
+
let(:instance) { Zyphr::SendEmailOtpRegistrationRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of SendEmailOtpRegistrationRequest' do
|
|
24
|
+
it 'should create an instance of SendEmailOtpRegistrationRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zyphr::SendEmailOtpRegistrationRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "email"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zyphr API
|
|
3
|
+
|
|
4
|
+
#Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@zyphr.dev
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zyphr::VerifyEmailOtpLoginRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zyphr::VerifyEmailOtpLoginRequest do
|
|
21
|
+
let(:instance) { Zyphr::VerifyEmailOtpLoginRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of VerifyEmailOtpLoginRequest' do
|
|
24
|
+
it 'should create an instance of VerifyEmailOtpLoginRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zyphr::VerifyEmailOtpLoginRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "email"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "code"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
describe 'test attribute "custom_claims"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zyphr API
|
|
3
|
+
|
|
4
|
+
#Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@zyphr.dev
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zyphr::VerifyEmailOtpRegistrationRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zyphr::VerifyEmailOtpRegistrationRequest do
|
|
21
|
+
let(:instance) { Zyphr::VerifyEmailOtpRegistrationRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of VerifyEmailOtpRegistrationRequest' do
|
|
24
|
+
it 'should create an instance of VerifyEmailOtpRegistrationRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zyphr::VerifyEmailOtpRegistrationRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "email"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "code"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
describe 'test attribute "name"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe 'test attribute "metadata"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
end
|