zyphr 0.1.35 → 0.1.36
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 +1 -2
- data/docs/AuthEmailOTPApi.md +4 -4
- data/docs/PhoneAuthAvailabilityResponse.md +1 -1
- data/docs/{CheckEmailOtpAvailability200ResponseData.md → PhoneAuthAvailabilityResponseData.md} +2 -2
- data/lib/zyphr/api/auth_email_otp_api.rb +3 -3
- data/lib/zyphr/models/phone_auth_availability_response.rb +1 -1
- data/lib/zyphr/models/{check_email_otp_availability200_response_data.rb → phone_auth_availability_response_data.rb} +3 -3
- data/lib/zyphr.rb +1 -2
- data/spec/api/auth_email_otp_api_spec.rb +1 -1
- data/spec/models/{check_email_otp_availability200_response_data_spec.rb → phone_auth_availability_response_data_spec.rb} +6 -6
- data/zyphr.gemspec +1 -1
- metadata +5 -9
- data/docs/CheckEmailOtpAvailability200Response.md +0 -18
- data/lib/zyphr/models/check_email_otp_availability200_response.rb +0 -220
- data/spec/models/check_email_otp_availability200_response_spec.rb +0 -36
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b0067ad17150f659eb4ef54057a18ad5f7a92e1d764548ab45fbe31dd782928a
|
|
4
|
+
data.tar.gz: 7b22a003289b965f16f30d233a346ae5ae5aaf3a6f1367dc828cd6a5f0bf8eb5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 84c95f09224c4d7de78be1df8cd3225dbb44e04275fd83089a17e0c44c52325895d39b8747e15c574c007907c59a969c8fce250e5817c39c09aeae5c21e29786
|
|
7
|
+
data.tar.gz: 3445f3a9cfbbe02b737e73c287265ee893ead08f168d54d62ac54833bc8e3e46614507c38667ba8db63956139f5d57390d5274ff52bee88eac6afd33a3c9ad3e
|
data/README.md
CHANGED
|
@@ -406,8 +406,6 @@ Class | Method | HTTP request | Description
|
|
|
406
406
|
- [Zyphr::Category](docs/Category.md)
|
|
407
407
|
- [Zyphr::CategoryListResponse](docs/CategoryListResponse.md)
|
|
408
408
|
- [Zyphr::CategoryResponse](docs/CategoryResponse.md)
|
|
409
|
-
- [Zyphr::CheckEmailOtpAvailability200Response](docs/CheckEmailOtpAvailability200Response.md)
|
|
410
|
-
- [Zyphr::CheckEmailOtpAvailability200ResponseData](docs/CheckEmailOtpAvailability200ResponseData.md)
|
|
411
409
|
- [Zyphr::ConfirmEmailVerificationRequest](docs/ConfirmEmailVerificationRequest.md)
|
|
412
410
|
- [Zyphr::ConfirmEmailVerificationResponse](docs/ConfirmEmailVerificationResponse.md)
|
|
413
411
|
- [Zyphr::ConfirmEmailVerificationResponseData](docs/ConfirmEmailVerificationResponseData.md)
|
|
@@ -558,6 +556,7 @@ Class | Method | HTTP request | Description
|
|
|
558
556
|
- [Zyphr::PayloadTooLargeErrorError](docs/PayloadTooLargeErrorError.md)
|
|
559
557
|
- [Zyphr::PayloadTooLargeErrorErrorDetails](docs/PayloadTooLargeErrorErrorDetails.md)
|
|
560
558
|
- [Zyphr::PhoneAuthAvailabilityResponse](docs/PhoneAuthAvailabilityResponse.md)
|
|
559
|
+
- [Zyphr::PhoneAuthAvailabilityResponseData](docs/PhoneAuthAvailabilityResponseData.md)
|
|
561
560
|
- [Zyphr::PhoneLoginVerifyRequest](docs/PhoneLoginVerifyRequest.md)
|
|
562
561
|
- [Zyphr::PhoneOtpSendRequest](docs/PhoneOtpSendRequest.md)
|
|
563
562
|
- [Zyphr::PhoneOtpSentResponse](docs/PhoneOtpSentResponse.md)
|
data/docs/AuthEmailOTPApi.md
CHANGED
|
@@ -13,7 +13,7 @@ All URIs are relative to *https://api.zyphr.dev/v1*
|
|
|
13
13
|
|
|
14
14
|
## check_email_otp_availability
|
|
15
15
|
|
|
16
|
-
> <
|
|
16
|
+
> <PhoneAuthAvailabilityResponse> check_email_otp_availability
|
|
17
17
|
|
|
18
18
|
Check email OTP availability
|
|
19
19
|
|
|
@@ -47,7 +47,7 @@ end
|
|
|
47
47
|
|
|
48
48
|
This returns an Array which contains the response data, status code and headers.
|
|
49
49
|
|
|
50
|
-
> <Array(<
|
|
50
|
+
> <Array(<PhoneAuthAvailabilityResponse>, Integer, Hash)> check_email_otp_availability_with_http_info
|
|
51
51
|
|
|
52
52
|
```ruby
|
|
53
53
|
begin
|
|
@@ -55,7 +55,7 @@ begin
|
|
|
55
55
|
data, status_code, headers = api_instance.check_email_otp_availability_with_http_info
|
|
56
56
|
p status_code # => 2xx
|
|
57
57
|
p headers # => { ... }
|
|
58
|
-
p data # => <
|
|
58
|
+
p data # => <PhoneAuthAvailabilityResponse>
|
|
59
59
|
rescue Zyphr::ApiError => e
|
|
60
60
|
puts "Error when calling AuthEmailOTPApi->check_email_otp_availability_with_http_info: #{e}"
|
|
61
61
|
end
|
|
@@ -67,7 +67,7 @@ This endpoint does not need any parameter.
|
|
|
67
67
|
|
|
68
68
|
### Return type
|
|
69
69
|
|
|
70
|
-
[**
|
|
70
|
+
[**PhoneAuthAvailabilityResponse**](PhoneAuthAvailabilityResponse.md)
|
|
71
71
|
|
|
72
72
|
### Authorization
|
|
73
73
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **data** | [**
|
|
7
|
+
| **data** | [**PhoneAuthAvailabilityResponseData**](PhoneAuthAvailabilityResponseData.md) | | [optional] |
|
|
8
8
|
| **meta** | [**RequestMeta**](RequestMeta.md) | | [optional] |
|
|
9
9
|
|
|
10
10
|
## Example
|
data/docs/{CheckEmailOtpAvailability200ResponseData.md → PhoneAuthAvailabilityResponseData.md}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Zyphr::
|
|
1
|
+
# Zyphr::PhoneAuthAvailabilityResponseData
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
```ruby
|
|
13
13
|
require 'zyphr'
|
|
14
14
|
|
|
15
|
-
instance = Zyphr::
|
|
15
|
+
instance = Zyphr::PhoneAuthAvailabilityResponseData.new(
|
|
16
16
|
available: null,
|
|
17
17
|
message: null
|
|
18
18
|
)
|
|
@@ -22,7 +22,7 @@ module Zyphr
|
|
|
22
22
|
# Check email OTP availability
|
|
23
23
|
# Check if numeric email OTP authentication is available for this application. Requires a verified sending domain on the project.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
|
-
# @return [
|
|
25
|
+
# @return [PhoneAuthAvailabilityResponse]
|
|
26
26
|
def check_email_otp_availability(opts = {})
|
|
27
27
|
data, _status_code, _headers = check_email_otp_availability_with_http_info(opts)
|
|
28
28
|
data
|
|
@@ -31,7 +31,7 @@ module Zyphr
|
|
|
31
31
|
# Check email OTP availability
|
|
32
32
|
# Check if numeric email OTP authentication is available for this application. Requires a verified sending domain on the project.
|
|
33
33
|
# @param [Hash] opts the optional parameters
|
|
34
|
-
# @return [Array<(
|
|
34
|
+
# @return [Array<(PhoneAuthAvailabilityResponse, Integer, Hash)>] PhoneAuthAvailabilityResponse data, response status code and response headers
|
|
35
35
|
def check_email_otp_availability_with_http_info(opts = {})
|
|
36
36
|
if @api_client.config.debugging
|
|
37
37
|
@api_client.config.logger.debug 'Calling API: AuthEmailOTPApi.check_email_otp_availability ...'
|
|
@@ -54,7 +54,7 @@ module Zyphr
|
|
|
54
54
|
post_body = opts[:debug_body]
|
|
55
55
|
|
|
56
56
|
# return_type
|
|
57
|
-
return_type = opts[:debug_return_type] || '
|
|
57
|
+
return_type = opts[:debug_return_type] || 'PhoneAuthAvailabilityResponse'
|
|
58
58
|
|
|
59
59
|
# auth_names
|
|
60
60
|
auth_names = opts[:debug_auth_names] || ['ApplicationPublicKey']
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zyphr
|
|
17
|
-
class
|
|
17
|
+
class PhoneAuthAvailabilityResponseData
|
|
18
18
|
attr_accessor :available
|
|
19
19
|
|
|
20
20
|
attr_accessor :message
|
|
@@ -55,14 +55,14 @@ module Zyphr
|
|
|
55
55
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
56
|
def initialize(attributes = {})
|
|
57
57
|
if (!attributes.is_a?(Hash))
|
|
58
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Zyphr::
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zyphr::PhoneAuthAvailabilityResponseData` initialize method"
|
|
59
59
|
end
|
|
60
60
|
|
|
61
61
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
62
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
63
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
64
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Zyphr::
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zyphr::PhoneAuthAvailabilityResponseData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
66
|
end
|
|
67
67
|
h[k.to_sym] = v
|
|
68
68
|
}
|
data/lib/zyphr.rb
CHANGED
|
@@ -60,8 +60,6 @@ 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'
|
|
65
63
|
require 'zyphr/models/confirm_email_verification_request'
|
|
66
64
|
require 'zyphr/models/confirm_email_verification_response'
|
|
67
65
|
require 'zyphr/models/confirm_email_verification_response_data'
|
|
@@ -212,6 +210,7 @@ require 'zyphr/models/payload_too_large_error'
|
|
|
212
210
|
require 'zyphr/models/payload_too_large_error_error'
|
|
213
211
|
require 'zyphr/models/payload_too_large_error_error_details'
|
|
214
212
|
require 'zyphr/models/phone_auth_availability_response'
|
|
213
|
+
require 'zyphr/models/phone_auth_availability_response_data'
|
|
215
214
|
require 'zyphr/models/phone_login_verify_request'
|
|
216
215
|
require 'zyphr/models/phone_otp_send_request'
|
|
217
216
|
require 'zyphr/models/phone_otp_sent_response'
|
|
@@ -36,7 +36,7 @@ describe 'AuthEmailOTPApi' do
|
|
|
36
36
|
# Check email OTP availability
|
|
37
37
|
# Check if numeric email OTP authentication is available for this application. Requires a verified sending domain on the project.
|
|
38
38
|
# @param [Hash] opts the optional parameters
|
|
39
|
-
# @return [
|
|
39
|
+
# @return [PhoneAuthAvailabilityResponse]
|
|
40
40
|
describe 'check_email_otp_availability test' do
|
|
41
41
|
it 'should work' do
|
|
42
42
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -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::PhoneAuthAvailabilityResponseData
|
|
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::PhoneAuthAvailabilityResponseData do
|
|
21
|
+
let(:instance) { Zyphr::PhoneAuthAvailabilityResponseData.new }
|
|
22
22
|
|
|
23
|
-
describe 'test an instance of
|
|
24
|
-
it 'should create an instance of
|
|
23
|
+
describe 'test an instance of PhoneAuthAvailabilityResponseData' do
|
|
24
|
+
it 'should create an instance of PhoneAuthAvailabilityResponseData' 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::PhoneAuthAvailabilityResponseData)
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
data/zyphr.gemspec
CHANGED
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.
|
|
4
|
+
version: 0.1.36
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Zyphr
|
|
@@ -145,8 +145,6 @@ files:
|
|
|
145
145
|
- docs/Category.md
|
|
146
146
|
- docs/CategoryListResponse.md
|
|
147
147
|
- docs/CategoryResponse.md
|
|
148
|
-
- docs/CheckEmailOtpAvailability200Response.md
|
|
149
|
-
- docs/CheckEmailOtpAvailability200ResponseData.md
|
|
150
148
|
- docs/ConfirmEmailVerificationRequest.md
|
|
151
149
|
- docs/ConfirmEmailVerificationResponse.md
|
|
152
150
|
- docs/ConfirmEmailVerificationResponseData.md
|
|
@@ -304,6 +302,7 @@ files:
|
|
|
304
302
|
- docs/PayloadTooLargeErrorError.md
|
|
305
303
|
- docs/PayloadTooLargeErrorErrorDetails.md
|
|
306
304
|
- docs/PhoneAuthAvailabilityResponse.md
|
|
305
|
+
- docs/PhoneAuthAvailabilityResponseData.md
|
|
307
306
|
- docs/PhoneLoginVerifyRequest.md
|
|
308
307
|
- docs/PhoneOtpSendRequest.md
|
|
309
308
|
- docs/PhoneOtpSentResponse.md
|
|
@@ -634,8 +633,6 @@ files:
|
|
|
634
633
|
- lib/zyphr/models/category.rb
|
|
635
634
|
- lib/zyphr/models/category_list_response.rb
|
|
636
635
|
- lib/zyphr/models/category_response.rb
|
|
637
|
-
- lib/zyphr/models/check_email_otp_availability200_response.rb
|
|
638
|
-
- lib/zyphr/models/check_email_otp_availability200_response_data.rb
|
|
639
636
|
- lib/zyphr/models/confirm_email_verification_request.rb
|
|
640
637
|
- lib/zyphr/models/confirm_email_verification_response.rb
|
|
641
638
|
- lib/zyphr/models/confirm_email_verification_response_data.rb
|
|
@@ -786,6 +783,7 @@ files:
|
|
|
786
783
|
- lib/zyphr/models/payload_too_large_error_error.rb
|
|
787
784
|
- lib/zyphr/models/payload_too_large_error_error_details.rb
|
|
788
785
|
- lib/zyphr/models/phone_auth_availability_response.rb
|
|
786
|
+
- lib/zyphr/models/phone_auth_availability_response_data.rb
|
|
789
787
|
- lib/zyphr/models/phone_login_verify_request.rb
|
|
790
788
|
- lib/zyphr/models/phone_otp_send_request.rb
|
|
791
789
|
- lib/zyphr/models/phone_otp_sent_response.rb
|
|
@@ -1098,8 +1096,6 @@ files:
|
|
|
1098
1096
|
- spec/models/category_list_response_spec.rb
|
|
1099
1097
|
- spec/models/category_response_spec.rb
|
|
1100
1098
|
- spec/models/category_spec.rb
|
|
1101
|
-
- spec/models/check_email_otp_availability200_response_data_spec.rb
|
|
1102
|
-
- spec/models/check_email_otp_availability200_response_spec.rb
|
|
1103
1099
|
- spec/models/confirm_email_verification_request_spec.rb
|
|
1104
1100
|
- spec/models/confirm_email_verification_response_data_spec.rb
|
|
1105
1101
|
- spec/models/confirm_email_verification_response_spec.rb
|
|
@@ -1249,6 +1245,7 @@ files:
|
|
|
1249
1245
|
- spec/models/payload_too_large_error_error_details_spec.rb
|
|
1250
1246
|
- spec/models/payload_too_large_error_error_spec.rb
|
|
1251
1247
|
- spec/models/payload_too_large_error_spec.rb
|
|
1248
|
+
- spec/models/phone_auth_availability_response_data_spec.rb
|
|
1252
1249
|
- spec/models/phone_auth_availability_response_spec.rb
|
|
1253
1250
|
- spec/models/phone_login_verify_request_spec.rb
|
|
1254
1251
|
- spec/models/phone_otp_send_request_spec.rb
|
|
@@ -1840,7 +1837,6 @@ test_files:
|
|
|
1840
1837
|
- spec/models/sms_message_detail_spec.rb
|
|
1841
1838
|
- spec/models/send_push_request_action_buttons_inner_spec.rb
|
|
1842
1839
|
- spec/models/send_batch_in_app_request_spec.rb
|
|
1843
|
-
- spec/models/check_email_otp_availability200_response_data_spec.rb
|
|
1844
1840
|
- spec/models/email_tracking_data_spec.rb
|
|
1845
1841
|
- spec/models/push_topic_subscribe_response_spec.rb
|
|
1846
1842
|
- spec/models/web_authn_credential_spec.rb
|
|
@@ -1894,7 +1890,6 @@ test_files:
|
|
|
1894
1890
|
- spec/models/update_subscriber_preferences_request_preferences_inner_spec.rb
|
|
1895
1891
|
- spec/models/unsubscribe_spec.rb
|
|
1896
1892
|
- spec/models/send_sms_response_spec.rb
|
|
1897
|
-
- spec/models/check_email_otp_availability200_response_spec.rb
|
|
1898
1893
|
- spec/models/send_batch_sms_data_spec.rb
|
|
1899
1894
|
- spec/models/create_waa_s_endpoint201_response_spec.rb
|
|
1900
1895
|
- spec/models/webhook_event_types_response_data_spec.rb
|
|
@@ -1921,6 +1916,7 @@ test_files:
|
|
|
1921
1916
|
- spec/models/sms_batch_result_summary_spec.rb
|
|
1922
1917
|
- spec/models/webhook_delivery_retry_response_data_spec.rb
|
|
1923
1918
|
- spec/models/send_email_request_spec.rb
|
|
1919
|
+
- spec/models/phone_auth_availability_response_data_spec.rb
|
|
1924
1920
|
- spec/models/domain_list_response_meta_spec.rb
|
|
1925
1921
|
- spec/models/webhook_test_event_response_data_spec.rb
|
|
1926
1922
|
- spec/models/email_event_spec.rb
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Zyphr::CheckEmailOtpAvailability200Response
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **data** | [**CheckEmailOtpAvailability200ResponseData**](CheckEmailOtpAvailability200ResponseData.md) | | [optional] |
|
|
8
|
-
|
|
9
|
-
## Example
|
|
10
|
-
|
|
11
|
-
```ruby
|
|
12
|
-
require 'zyphr'
|
|
13
|
-
|
|
14
|
-
instance = Zyphr::CheckEmailOtpAvailability200Response.new(
|
|
15
|
-
data: null
|
|
16
|
-
)
|
|
17
|
-
```
|
|
18
|
-
|
|
@@ -1,220 +0,0 @@
|
|
|
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 CheckEmailOtpAvailability200Response
|
|
18
|
-
attr_accessor :data
|
|
19
|
-
|
|
20
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
-
def self.attribute_map
|
|
22
|
-
{
|
|
23
|
-
:'data' => :'data'
|
|
24
|
-
}
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
# Returns attribute mapping this model knows about
|
|
28
|
-
def self.acceptable_attribute_map
|
|
29
|
-
attribute_map
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
# Returns all the JSON keys this model knows about
|
|
33
|
-
def self.acceptable_attributes
|
|
34
|
-
acceptable_attribute_map.values
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
# Attribute type mapping.
|
|
38
|
-
def self.openapi_types
|
|
39
|
-
{
|
|
40
|
-
:'data' => :'CheckEmailOtpAvailability200ResponseData'
|
|
41
|
-
}
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
# List of attributes with nullable: true
|
|
45
|
-
def self.openapi_nullable
|
|
46
|
-
Set.new([
|
|
47
|
-
])
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
# Initializes the object
|
|
51
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
-
def initialize(attributes = {})
|
|
53
|
-
if (!attributes.is_a?(Hash))
|
|
54
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Zyphr::CheckEmailOtpAvailability200Response` initialize method"
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
-
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
-
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Zyphr::CheckEmailOtpAvailability200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
|
-
end
|
|
63
|
-
h[k.to_sym] = v
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if attributes.key?(:'data')
|
|
67
|
-
self.data = attributes[:'data']
|
|
68
|
-
end
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
72
|
-
# @return Array for valid properties with the reasons
|
|
73
|
-
def list_invalid_properties
|
|
74
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
75
|
-
invalid_properties = Array.new
|
|
76
|
-
invalid_properties
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
# Check to see if the all the properties in the model are valid
|
|
80
|
-
# @return true if the model is valid
|
|
81
|
-
def valid?
|
|
82
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
83
|
-
true
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
# Checks equality by comparing each attribute.
|
|
87
|
-
# @param [Object] Object to be compared
|
|
88
|
-
def ==(o)
|
|
89
|
-
return true if self.equal?(o)
|
|
90
|
-
self.class == o.class &&
|
|
91
|
-
data == o.data
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
# @see the `==` method
|
|
95
|
-
# @param [Object] Object to be compared
|
|
96
|
-
def eql?(o)
|
|
97
|
-
self == o
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
# Calculates hash code according to all attributes.
|
|
101
|
-
# @return [Integer] Hash code
|
|
102
|
-
def hash
|
|
103
|
-
[data].hash
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
# Builds the object from hash
|
|
107
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
108
|
-
# @return [Object] Returns the model itself
|
|
109
|
-
def self.build_from_hash(attributes)
|
|
110
|
-
return nil unless attributes.is_a?(Hash)
|
|
111
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
112
|
-
transformed_hash = {}
|
|
113
|
-
openapi_types.each_pair do |key, type|
|
|
114
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
115
|
-
transformed_hash["#{key}"] = nil
|
|
116
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
117
|
-
# check to ensure the input is an array given that the attribute
|
|
118
|
-
# is documented as an array but the input is not
|
|
119
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
120
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
121
|
-
end
|
|
122
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
123
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
124
|
-
end
|
|
125
|
-
end
|
|
126
|
-
new(transformed_hash)
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
# Deserializes the data based on type
|
|
130
|
-
# @param string type Data type
|
|
131
|
-
# @param string value Value to be deserialized
|
|
132
|
-
# @return [Object] Deserialized data
|
|
133
|
-
def self._deserialize(type, value)
|
|
134
|
-
case type.to_sym
|
|
135
|
-
when :Time
|
|
136
|
-
Time.parse(value)
|
|
137
|
-
when :Date
|
|
138
|
-
Date.parse(value)
|
|
139
|
-
when :String
|
|
140
|
-
value.to_s
|
|
141
|
-
when :Integer
|
|
142
|
-
value.to_i
|
|
143
|
-
when :Float
|
|
144
|
-
value.to_f
|
|
145
|
-
when :Boolean
|
|
146
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
147
|
-
true
|
|
148
|
-
else
|
|
149
|
-
false
|
|
150
|
-
end
|
|
151
|
-
when :Object
|
|
152
|
-
# generic object (usually a Hash), return directly
|
|
153
|
-
value
|
|
154
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
155
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
156
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
157
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
158
|
-
k_type = Regexp.last_match[:k_type]
|
|
159
|
-
v_type = Regexp.last_match[:v_type]
|
|
160
|
-
{}.tap do |hash|
|
|
161
|
-
value.each do |k, v|
|
|
162
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
163
|
-
end
|
|
164
|
-
end
|
|
165
|
-
else # model
|
|
166
|
-
# models (e.g. Pet) or oneOf
|
|
167
|
-
klass = Zyphr.const_get(type)
|
|
168
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
169
|
-
end
|
|
170
|
-
end
|
|
171
|
-
|
|
172
|
-
# Returns the string representation of the object
|
|
173
|
-
# @return [String] String presentation of the object
|
|
174
|
-
def to_s
|
|
175
|
-
to_hash.to_s
|
|
176
|
-
end
|
|
177
|
-
|
|
178
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
179
|
-
# @return [Hash] Returns the object in the form of hash
|
|
180
|
-
def to_body
|
|
181
|
-
to_hash
|
|
182
|
-
end
|
|
183
|
-
|
|
184
|
-
# Returns the object in the form of hash
|
|
185
|
-
# @return [Hash] Returns the object in the form of hash
|
|
186
|
-
def to_hash
|
|
187
|
-
hash = {}
|
|
188
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
189
|
-
value = self.send(attr)
|
|
190
|
-
if value.nil?
|
|
191
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
192
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
193
|
-
end
|
|
194
|
-
|
|
195
|
-
hash[param] = _to_hash(value)
|
|
196
|
-
end
|
|
197
|
-
hash
|
|
198
|
-
end
|
|
199
|
-
|
|
200
|
-
# Outputs non-array value in the form of hash
|
|
201
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
202
|
-
# @param [Object] value Any valid value
|
|
203
|
-
# @return [Hash] Returns the value in the form of hash
|
|
204
|
-
def _to_hash(value)
|
|
205
|
-
if value.is_a?(Array)
|
|
206
|
-
value.compact.map { |v| _to_hash(v) }
|
|
207
|
-
elsif value.is_a?(Hash)
|
|
208
|
-
{}.tap do |hash|
|
|
209
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
210
|
-
end
|
|
211
|
-
elsif value.respond_to? :to_hash
|
|
212
|
-
value.to_hash
|
|
213
|
-
else
|
|
214
|
-
value
|
|
215
|
-
end
|
|
216
|
-
end
|
|
217
|
-
|
|
218
|
-
end
|
|
219
|
-
|
|
220
|
-
end
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|