zernio-sdk 0.0.538 → 0.0.540

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.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -0
  3. data/docs/CheckVerification200Response.md +40 -0
  4. data/docs/CheckVerificationRequest.md +18 -0
  5. data/docs/CreateVerificationRequest.md +28 -0
  6. data/docs/OnVerificationApprovedRequest.md +24 -0
  7. data/docs/OnVerificationApprovedRequestVerification.md +22 -0
  8. data/docs/OnVerificationFailedRequest.md +26 -0
  9. data/docs/OnVerificationFailedRequestVerification.md +22 -0
  10. data/docs/Verification.md +38 -0
  11. data/docs/VerifyApi.md +219 -0
  12. data/docs/WebhookEventsApi.md +138 -0
  13. data/lib/zernio-sdk/api/verify_api.rb +227 -0
  14. data/lib/zernio-sdk/api/webhook_events_api.rb +132 -0
  15. data/lib/zernio-sdk/models/check_verification200_response.rb +301 -0
  16. data/lib/zernio-sdk/models/check_verification_request.rb +175 -0
  17. data/lib/zernio-sdk/models/create_verification_request.rb +333 -0
  18. data/lib/zernio-sdk/models/on_verification_approved_request.rb +208 -0
  19. data/lib/zernio-sdk/models/on_verification_approved_request_verification.rb +199 -0
  20. data/lib/zernio-sdk/models/on_verification_failed_request.rb +229 -0
  21. data/lib/zernio-sdk/models/on_verification_failed_request_verification.rb +199 -0
  22. data/lib/zernio-sdk/models/on_whats_app_number_kyc_submitted_request.rb +2 -2
  23. data/lib/zernio-sdk/models/verification.rb +287 -0
  24. data/lib/zernio-sdk/version.rb +1 -1
  25. data/lib/zernio-sdk.rb +9 -0
  26. data/openapi.yaml +205 -5
  27. data/spec/api/verify_api_spec.rb +72 -0
  28. data/spec/models/check_verification200_response_spec.rb +110 -0
  29. data/spec/models/check_verification_request_spec.rb +36 -0
  30. data/spec/models/create_verification_request_spec.rb +70 -0
  31. data/spec/models/create_webhook_settings_request_spec.rb +1 -1
  32. data/spec/models/on_verification_approved_request_spec.rb +58 -0
  33. data/spec/models/on_verification_approved_request_verification_spec.rb +52 -0
  34. data/spec/models/on_verification_failed_request_spec.rb +68 -0
  35. data/spec/models/on_verification_failed_request_verification_spec.rb +52 -0
  36. data/spec/models/on_whats_app_number_kyc_submitted_request_spec.rb +1 -1
  37. data/spec/models/update_webhook_settings_request_spec.rb +1 -1
  38. data/spec/models/verification_spec.rb +104 -0
  39. data/spec/models/webhook_spec.rb +1 -1
  40. metadata +37 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a4c184c8805e584685e9faba643a07bcadd37885f29979528449567e289dd76b
4
- data.tar.gz: 9a85d85cc402afda7199516bb2dc78ff60d5b1e30e5fc687cb5ad7730829e280
3
+ metadata.gz: fa6f3efbd73556e97ffc5e2e3a09a99b8cb17188194928f85157be81ef4f24e3
4
+ data.tar.gz: 351c8e05f8136e1a4a52c01b21ae023b0cabf5fe4251de66f6b536a87604b7c4
5
5
  SHA512:
6
- metadata.gz: c5ce18a053a31b636c899179860e2ab0cbb88957152c6ea1fdc7f5e4b914f10c16f16125f6414b09e8924f40b927d5a58b953a3fd0077b15b3212a94810b4870
7
- data.tar.gz: 4cd3bc1550b8e1085684223f0ef1c3c0d90974a4509cb2ba2edea54fe1818ab6e630c77abcfa4abdab57bec5d47a24a5493acc03729f780ddb1b15a063345f6d
6
+ metadata.gz: 6c8ccdb904e45088c52adb21876845344d29d87ee52a3fee752eead97223f386dd5972d14af4349b36723c061117c5da48ee5d7fe0440cb2eda559070781a510
7
+ data.tar.gz: 7c960b73cecdd97b6fe9e2e21c76c62c1591bcf047a8c87793af49d21b9fec3bd9ea2bdff0782958fd90f97c3d65ea3b348eba2d50383f61f276369a1c951f23
data/README.md CHANGED
@@ -466,6 +466,9 @@ Class | Method | HTTP request | Description
466
466
  *Zernio::ValidateApi* | [**validate_post**](docs/ValidateApi.md#validate_post) | **POST** /v1/tools/validate/post | Validate post content
467
467
  *Zernio::ValidateApi* | [**validate_post_length**](docs/ValidateApi.md#validate_post_length) | **POST** /v1/tools/validate/post-length | Validate character count
468
468
  *Zernio::ValidateApi* | [**validate_subreddit**](docs/ValidateApi.md#validate_subreddit) | **GET** /v1/tools/validate/subreddit | Check subreddit existence
469
+ *Zernio::VerifyApi* | [**check_verification**](docs/VerifyApi.md#check_verification) | **POST** /v1/verify/verifications/{verificationId}/check | Check a verification code
470
+ *Zernio::VerifyApi* | [**create_verification**](docs/VerifyApi.md#create_verification) | **POST** /v1/verify/verifications | Send a verification code
471
+ *Zernio::VerifyApi* | [**get_verification**](docs/VerifyApi.md#get_verification) | **GET** /v1/verify/verifications/{verificationId} | Get a verification
469
472
  *Zernio::VoiceApi* | [**create_voice_call**](docs/VoiceApi.md#create_voice_call) | **POST** /v1/voice/calls | Place an outbound phone call
470
473
  *Zernio::VoiceApi* | [**create_voice_web_session**](docs/VoiceApi.md#create_voice_web_session) | **POST** /v1/voice/calls/web | Mint a browser softphone session
471
474
  *Zernio::VoiceApi* | [**dial_voice_web_call**](docs/VoiceApi.md#dial_voice_web_call) | **POST** /v1/voice/calls/web/dial | Dial from the browser softphone
@@ -687,6 +690,8 @@ Class | Method | HTTP request | Description
687
690
  - [Zernio::CheckPhoneNumberPortability200Response](docs/CheckPhoneNumberPortability200Response.md)
688
691
  - [Zernio::CheckPhoneNumberPortability200ResponseResultsInner](docs/CheckPhoneNumberPortability200ResponseResultsInner.md)
689
692
  - [Zernio::CheckPhoneNumberPortabilityRequest](docs/CheckPhoneNumberPortabilityRequest.md)
693
+ - [Zernio::CheckVerification200Response](docs/CheckVerification200Response.md)
694
+ - [Zernio::CheckVerificationRequest](docs/CheckVerificationRequest.md)
690
695
  - [Zernio::CompleteGoogleBusinessVerificationRequest](docs/CompleteGoogleBusinessVerificationRequest.md)
691
696
  - [Zernio::CompleteTelegramConnect200Response](docs/CompleteTelegramConnect200Response.md)
692
697
  - [Zernio::CompleteWhatsAppPhoneSelection200Response](docs/CompleteWhatsAppPhoneSelection200Response.md)
@@ -835,6 +840,7 @@ Class | Method | HTTP request | Description
835
840
  - [Zernio::CreateTestLeadRequestFieldDataInner](docs/CreateTestLeadRequestFieldDataInner.md)
836
841
  - [Zernio::CreateTrackingTag201Response](docs/CreateTrackingTag201Response.md)
837
842
  - [Zernio::CreateTrackingTagRequest](docs/CreateTrackingTagRequest.md)
843
+ - [Zernio::CreateVerificationRequest](docs/CreateVerificationRequest.md)
838
844
  - [Zernio::CreateVoiceCall200Response](docs/CreateVoiceCall200Response.md)
839
845
  - [Zernio::CreateVoiceCallRequest](docs/CreateVoiceCallRequest.md)
840
846
  - [Zernio::CreateVoiceWebSession200Response](docs/CreateVoiceWebSession200Response.md)
@@ -1491,6 +1497,10 @@ Class | Method | HTTP request | Description
1491
1497
  - [Zernio::MoneyAmount](docs/MoneyAmount.md)
1492
1498
  - [Zernio::MoveAccountToProfile200Response](docs/MoveAccountToProfile200Response.md)
1493
1499
  - [Zernio::MoveAccountToProfileRequest](docs/MoveAccountToProfileRequest.md)
1500
+ - [Zernio::OnVerificationApprovedRequest](docs/OnVerificationApprovedRequest.md)
1501
+ - [Zernio::OnVerificationApprovedRequestVerification](docs/OnVerificationApprovedRequestVerification.md)
1502
+ - [Zernio::OnVerificationFailedRequest](docs/OnVerificationFailedRequest.md)
1503
+ - [Zernio::OnVerificationFailedRequestVerification](docs/OnVerificationFailedRequestVerification.md)
1494
1504
  - [Zernio::OnWhatsAppAutomaticEventRequest](docs/OnWhatsAppAutomaticEventRequest.md)
1495
1505
  - [Zernio::OnWhatsAppAutomaticEventRequestCustomData](docs/OnWhatsAppAutomaticEventRequestCustomData.md)
1496
1506
  - [Zernio::OnWhatsAppNumberActionRequiredRequest](docs/OnWhatsAppNumberActionRequiredRequest.md)
@@ -1942,6 +1952,7 @@ Class | Method | HTTP request | Description
1942
1952
  - [Zernio::ValidateSubreddit200ResponseOneOf](docs/ValidateSubreddit200ResponseOneOf.md)
1943
1953
  - [Zernio::ValidateSubreddit200ResponseOneOf1](docs/ValidateSubreddit200ResponseOneOf1.md)
1944
1954
  - [Zernio::ValidateSubreddit200ResponseOneOfSubreddit](docs/ValidateSubreddit200ResponseOneOfSubreddit.md)
1955
+ - [Zernio::Verification](docs/Verification.md)
1945
1956
  - [Zernio::VerifySmsRegistrationOtp200Response](docs/VerifySmsRegistrationOtp200Response.md)
1946
1957
  - [Zernio::VerifySmsRegistrationOtpRequest](docs/VerifySmsRegistrationOtpRequest.md)
1947
1958
  - [Zernio::VoteRedditThingRequest](docs/VoteRedditThingRequest.md)
@@ -0,0 +1,40 @@
1
+ # Zernio::CheckVerification200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | [optional] |
8
+ | **status** | **String** | | [optional] |
9
+ | **channel** | **String** | | [optional] |
10
+ | **to** | **String** | | [optional] |
11
+ | **expires_at** | **Time** | | [optional] |
12
+ | **attempts** | **Integer** | | [optional] |
13
+ | **max_attempts** | **Integer** | | [optional] |
14
+ | **send_count** | **Integer** | Accepted deliveries (initial send + resends); each bills one verification fee. | [optional] |
15
+ | **last_sent_at** | **Time** | | [optional] |
16
+ | **created_at** | **Time** | | [optional] |
17
+ | **resend** | **Boolean** | Present on create responses: true when an active verification was resent instead of created. | [optional] |
18
+ | **valid** | **Boolean** | | [optional] |
19
+
20
+ ## Example
21
+
22
+ ```ruby
23
+ require 'zernio-sdk'
24
+
25
+ instance = Zernio::CheckVerification200Response.new(
26
+ id: null,
27
+ status: null,
28
+ channel: null,
29
+ to: null,
30
+ expires_at: null,
31
+ attempts: null,
32
+ max_attempts: null,
33
+ send_count: null,
34
+ last_sent_at: null,
35
+ created_at: null,
36
+ resend: null,
37
+ valid: null
38
+ )
39
+ ```
40
+
@@ -0,0 +1,18 @@
1
+ # Zernio::CheckVerificationRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **code** | **String** | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'zernio-sdk'
13
+
14
+ instance = Zernio::CheckVerificationRequest.new(
15
+ code: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,28 @@
1
+ # Zernio::CreateVerificationRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **channel** | **String** | SMS-only for now. | |
8
+ | **to** | **String** | E.164 phone number. | |
9
+ | **from** | **String** | The SMS-enabled number on your account to send from. Defaults to your only SMS number. | [optional] |
10
+ | **brand_name** | **String** | Your app or business name, rendered in the message. Defaults to your account name. Letters, numbers, and basic punctuation only. | [optional] |
11
+ | **code_length** | **Integer** | | [optional][default to 6] |
12
+ | **ttl_minutes** | **Integer** | | [optional][default to 10] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'zernio-sdk'
18
+
19
+ instance = Zernio::CreateVerificationRequest.new(
20
+ channel: null,
21
+ to: null,
22
+ from: null,
23
+ brand_name: null,
24
+ code_length: null,
25
+ ttl_minutes: null
26
+ )
27
+ ```
28
+
@@ -0,0 +1,24 @@
1
+ # Zernio::OnVerificationApprovedRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | [optional] |
8
+ | **event** | **String** | | [optional] |
9
+ | **timestamp** | **Time** | | [optional] |
10
+ | **verification** | [**OnVerificationApprovedRequestVerification**](OnVerificationApprovedRequestVerification.md) | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zernio-sdk'
16
+
17
+ instance = Zernio::OnVerificationApprovedRequest.new(
18
+ id: null,
19
+ event: null,
20
+ timestamp: null,
21
+ verification: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,22 @@
1
+ # Zernio::OnVerificationApprovedRequestVerification
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **verification_id** | **String** | | [optional] |
8
+ | **channel** | **String** | | [optional] |
9
+ | **to** | **String** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::OnVerificationApprovedRequestVerification.new(
17
+ verification_id: null,
18
+ channel: null,
19
+ to: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,26 @@
1
+ # Zernio::OnVerificationFailedRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | [optional] |
8
+ | **event** | **String** | | [optional] |
9
+ | **timestamp** | **Time** | | [optional] |
10
+ | **verification** | [**OnVerificationFailedRequestVerification**](OnVerificationFailedRequestVerification.md) | | [optional] |
11
+ | **reason** | **String** | | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'zernio-sdk'
17
+
18
+ instance = Zernio::OnVerificationFailedRequest.new(
19
+ id: null,
20
+ event: null,
21
+ timestamp: null,
22
+ verification: null,
23
+ reason: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,22 @@
1
+ # Zernio::OnVerificationFailedRequestVerification
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **verification_id** | **String** | | [optional] |
8
+ | **channel** | **String** | | [optional] |
9
+ | **to** | **String** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::OnVerificationFailedRequestVerification.new(
17
+ verification_id: null,
18
+ channel: null,
19
+ to: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,38 @@
1
+ # Zernio::Verification
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | [optional] |
8
+ | **status** | **String** | | [optional] |
9
+ | **channel** | **String** | | [optional] |
10
+ | **to** | **String** | | [optional] |
11
+ | **expires_at** | **Time** | | [optional] |
12
+ | **attempts** | **Integer** | | [optional] |
13
+ | **max_attempts** | **Integer** | | [optional] |
14
+ | **send_count** | **Integer** | Accepted deliveries (initial send + resends); each bills one verification fee. | [optional] |
15
+ | **last_sent_at** | **Time** | | [optional] |
16
+ | **created_at** | **Time** | | [optional] |
17
+ | **resend** | **Boolean** | Present on create responses: true when an active verification was resent instead of created. | [optional] |
18
+
19
+ ## Example
20
+
21
+ ```ruby
22
+ require 'zernio-sdk'
23
+
24
+ instance = Zernio::Verification.new(
25
+ id: null,
26
+ status: null,
27
+ channel: null,
28
+ to: null,
29
+ expires_at: null,
30
+ attempts: null,
31
+ max_attempts: null,
32
+ send_count: null,
33
+ last_sent_at: null,
34
+ created_at: null,
35
+ resend: null
36
+ )
37
+ ```
38
+
data/docs/VerifyApi.md ADDED
@@ -0,0 +1,219 @@
1
+ # Zernio::VerifyApi
2
+
3
+ All URIs are relative to *https://zernio.com/api*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**check_verification**](VerifyApi.md#check_verification) | **POST** /v1/verify/verifications/{verificationId}/check | Check a verification code |
8
+ | [**create_verification**](VerifyApi.md#create_verification) | **POST** /v1/verify/verifications | Send a verification code |
9
+ | [**get_verification**](VerifyApi.md#get_verification) | **GET** /v1/verify/verifications/{verificationId} | Get a verification |
10
+
11
+
12
+ ## check_verification
13
+
14
+ > <CheckVerification200Response> check_verification(verification_id, check_verification_request)
15
+
16
+ Check a verification code
17
+
18
+ Verify the code the user typed. Wrong, expired, and exhausted codes answer 200 with `valid: false` and the settled `status` — only an unknown id is a 404. A correct code consumes the verification (single-use, `status: approved`) and fires the `verification.approved` webhook; the 5th wrong attempt settles it as `max_attempts_reached` and fires `verification.failed`.
19
+
20
+ ### Examples
21
+
22
+ ```ruby
23
+ require 'time'
24
+ require 'zernio-sdk'
25
+ # setup authorization
26
+ Zernio.configure do |config|
27
+ # Configure Bearer authorization (JWT): bearerAuth
28
+ config.access_token = 'YOUR_BEARER_TOKEN'
29
+ end
30
+
31
+ api_instance = Zernio::VerifyApi.new
32
+ verification_id = 'verification_id_example' # String |
33
+ check_verification_request = Zernio::CheckVerificationRequest.new({code: 'code_example'}) # CheckVerificationRequest |
34
+
35
+ begin
36
+ # Check a verification code
37
+ result = api_instance.check_verification(verification_id, check_verification_request)
38
+ p result
39
+ rescue Zernio::ApiError => e
40
+ puts "Error when calling VerifyApi->check_verification: #{e}"
41
+ end
42
+ ```
43
+
44
+ #### Using the check_verification_with_http_info variant
45
+
46
+ This returns an Array which contains the response data, status code and headers.
47
+
48
+ > <Array(<CheckVerification200Response>, Integer, Hash)> check_verification_with_http_info(verification_id, check_verification_request)
49
+
50
+ ```ruby
51
+ begin
52
+ # Check a verification code
53
+ data, status_code, headers = api_instance.check_verification_with_http_info(verification_id, check_verification_request)
54
+ p status_code # => 2xx
55
+ p headers # => { ... }
56
+ p data # => <CheckVerification200Response>
57
+ rescue Zernio::ApiError => e
58
+ puts "Error when calling VerifyApi->check_verification_with_http_info: #{e}"
59
+ end
60
+ ```
61
+
62
+ ### Parameters
63
+
64
+ | Name | Type | Description | Notes |
65
+ | ---- | ---- | ----------- | ----- |
66
+ | **verification_id** | **String** | | |
67
+ | **check_verification_request** | [**CheckVerificationRequest**](CheckVerificationRequest.md) | | |
68
+
69
+ ### Return type
70
+
71
+ [**CheckVerification200Response**](CheckVerification200Response.md)
72
+
73
+ ### Authorization
74
+
75
+ [bearerAuth](../README.md#bearerAuth)
76
+
77
+ ### HTTP request headers
78
+
79
+ - **Content-Type**: application/json
80
+ - **Accept**: application/json
81
+
82
+
83
+ ## create_verification
84
+
85
+ > <Verification> create_verification(create_verification_request)
86
+
87
+ Send a verification code
88
+
89
+ Generate a one-time code, deliver it to the recipient, and store only its hash. Check the user-typed code with POST /v1/verify/verifications/{verificationId}/check. Re-POSTing for the same (channel, to) while a verification is active RESENDS a fresh code on the existing verification (200 with `resend: true`) instead of creating a new one; resends are limited to one per 60 seconds (429 with `retryAfterSeconds` inside the cooldown). The stored brandName/codeLength/ttlMinutes win on a resend. Codes deliver by SMS from a phone number on your account (`from` optional when you own exactly one SMS-enabled number) and the message uses a fixed template. Each accepted send bills one verification fee plus the standard message rate.
90
+
91
+ ### Examples
92
+
93
+ ```ruby
94
+ require 'time'
95
+ require 'zernio-sdk'
96
+ # setup authorization
97
+ Zernio.configure do |config|
98
+ # Configure Bearer authorization (JWT): bearerAuth
99
+ config.access_token = 'YOUR_BEARER_TOKEN'
100
+ end
101
+
102
+ api_instance = Zernio::VerifyApi.new
103
+ create_verification_request = Zernio::CreateVerificationRequest.new({channel: 'sms', to: 'to_example'}) # CreateVerificationRequest |
104
+
105
+ begin
106
+ # Send a verification code
107
+ result = api_instance.create_verification(create_verification_request)
108
+ p result
109
+ rescue Zernio::ApiError => e
110
+ puts "Error when calling VerifyApi->create_verification: #{e}"
111
+ end
112
+ ```
113
+
114
+ #### Using the create_verification_with_http_info variant
115
+
116
+ This returns an Array which contains the response data, status code and headers.
117
+
118
+ > <Array(<Verification>, Integer, Hash)> create_verification_with_http_info(create_verification_request)
119
+
120
+ ```ruby
121
+ begin
122
+ # Send a verification code
123
+ data, status_code, headers = api_instance.create_verification_with_http_info(create_verification_request)
124
+ p status_code # => 2xx
125
+ p headers # => { ... }
126
+ p data # => <Verification>
127
+ rescue Zernio::ApiError => e
128
+ puts "Error when calling VerifyApi->create_verification_with_http_info: #{e}"
129
+ end
130
+ ```
131
+
132
+ ### Parameters
133
+
134
+ | Name | Type | Description | Notes |
135
+ | ---- | ---- | ----------- | ----- |
136
+ | **create_verification_request** | [**CreateVerificationRequest**](CreateVerificationRequest.md) | | |
137
+
138
+ ### Return type
139
+
140
+ [**Verification**](Verification.md)
141
+
142
+ ### Authorization
143
+
144
+ [bearerAuth](../README.md#bearerAuth)
145
+
146
+ ### HTTP request headers
147
+
148
+ - **Content-Type**: application/json
149
+ - **Accept**: application/json
150
+
151
+
152
+ ## get_verification
153
+
154
+ > <Verification> get_verification(verification_id)
155
+
156
+ Get a verification
157
+
158
+ Current state of a verification. `status` is effective (a pending code past its expiry reads as `expired`). Verification records are deleted 24 hours after creation, after which this returns 404.
159
+
160
+ ### Examples
161
+
162
+ ```ruby
163
+ require 'time'
164
+ require 'zernio-sdk'
165
+ # setup authorization
166
+ Zernio.configure do |config|
167
+ # Configure Bearer authorization (JWT): bearerAuth
168
+ config.access_token = 'YOUR_BEARER_TOKEN'
169
+ end
170
+
171
+ api_instance = Zernio::VerifyApi.new
172
+ verification_id = 'verification_id_example' # String |
173
+
174
+ begin
175
+ # Get a verification
176
+ result = api_instance.get_verification(verification_id)
177
+ p result
178
+ rescue Zernio::ApiError => e
179
+ puts "Error when calling VerifyApi->get_verification: #{e}"
180
+ end
181
+ ```
182
+
183
+ #### Using the get_verification_with_http_info variant
184
+
185
+ This returns an Array which contains the response data, status code and headers.
186
+
187
+ > <Array(<Verification>, Integer, Hash)> get_verification_with_http_info(verification_id)
188
+
189
+ ```ruby
190
+ begin
191
+ # Get a verification
192
+ data, status_code, headers = api_instance.get_verification_with_http_info(verification_id)
193
+ p status_code # => 2xx
194
+ p headers # => { ... }
195
+ p data # => <Verification>
196
+ rescue Zernio::ApiError => e
197
+ puts "Error when calling VerifyApi->get_verification_with_http_info: #{e}"
198
+ end
199
+ ```
200
+
201
+ ### Parameters
202
+
203
+ | Name | Type | Description | Notes |
204
+ | ---- | ---- | ----------- | ----- |
205
+ | **verification_id** | **String** | | |
206
+
207
+ ### Return type
208
+
209
+ [**Verification**](Verification.md)
210
+
211
+ ### Authorization
212
+
213
+ [bearerAuth](../README.md#bearerAuth)
214
+
215
+ ### HTTP request headers
216
+
217
+ - **Content-Type**: Not defined
218
+ - **Accept**: application/json
219
+
@@ -37,6 +37,8 @@ All URIs are relative to *https://zernio.com/api*
37
37
  | [**on_reaction_received**](WebhookEventsApi.md#on_reaction_received) | **POST** /reaction.received | Reaction received event |
38
38
  | [**on_review_new**](WebhookEventsApi.md#on_review_new) | **POST** /review.new | Review new event |
39
39
  | [**on_review_updated**](WebhookEventsApi.md#on_review_updated) | **POST** /review.updated | Review updated event |
40
+ | [**on_verification_approved**](WebhookEventsApi.md#on_verification_approved) | **POST** /verification.approved | Verification approved event |
41
+ | [**on_verification_failed**](WebhookEventsApi.md#on_verification_failed) | **POST** /verification.failed | Verification failed event |
40
42
  | [**on_webhook_test**](WebhookEventsApi.md#on_webhook_test) | **POST** /webhook.test | Webhook test event |
41
43
  | [**on_whats_app_automatic_event**](WebhookEventsApi.md#on_whats_app_automatic_event) | **POST** /whatsapp.automatic_event | WhatsApp automatic event detected |
42
44
  | [**on_whats_app_number_action_required**](WebhookEventsApi.md#on_whats_app_number_action_required) | **POST** /whatsapp.number.action_required | WhatsApp number action required event |
@@ -2294,6 +2296,142 @@ nil (empty response body)
2294
2296
  - **Accept**: Not defined
2295
2297
 
2296
2298
 
2299
+ ## on_verification_approved
2300
+
2301
+ > on_verification_approved(on_verification_approved_request)
2302
+
2303
+ Verification approved event
2304
+
2305
+ Fired when a managed-OTP verification is approved (the user submitted the correct code to POST /v1/verify/verifications/{verificationId}/check).
2306
+
2307
+ ### Examples
2308
+
2309
+ ```ruby
2310
+ require 'time'
2311
+ require 'zernio-sdk'
2312
+ # setup authorization
2313
+ Zernio.configure do |config|
2314
+ # Configure Bearer authorization (JWT): bearerAuth
2315
+ config.access_token = 'YOUR_BEARER_TOKEN'
2316
+ end
2317
+
2318
+ api_instance = Zernio::WebhookEventsApi.new
2319
+ on_verification_approved_request = # OnVerificationApprovedRequest |
2320
+
2321
+ begin
2322
+ # Verification approved event
2323
+ api_instance.on_verification_approved(on_verification_approved_request)
2324
+ rescue Zernio::ApiError => e
2325
+ puts "Error when calling WebhookEventsApi->on_verification_approved: #{e}"
2326
+ end
2327
+ ```
2328
+
2329
+ #### Using the on_verification_approved_with_http_info variant
2330
+
2331
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
2332
+
2333
+ > <Array(nil, Integer, Hash)> on_verification_approved_with_http_info(on_verification_approved_request)
2334
+
2335
+ ```ruby
2336
+ begin
2337
+ # Verification approved event
2338
+ data, status_code, headers = api_instance.on_verification_approved_with_http_info(on_verification_approved_request)
2339
+ p status_code # => 2xx
2340
+ p headers # => { ... }
2341
+ p data # => nil
2342
+ rescue Zernio::ApiError => e
2343
+ puts "Error when calling WebhookEventsApi->on_verification_approved_with_http_info: #{e}"
2344
+ end
2345
+ ```
2346
+
2347
+ ### Parameters
2348
+
2349
+ | Name | Type | Description | Notes |
2350
+ | ---- | ---- | ----------- | ----- |
2351
+ | **on_verification_approved_request** | [**OnVerificationApprovedRequest**](OnVerificationApprovedRequest.md) | | |
2352
+
2353
+ ### Return type
2354
+
2355
+ nil (empty response body)
2356
+
2357
+ ### Authorization
2358
+
2359
+ [bearerAuth](../README.md#bearerAuth)
2360
+
2361
+ ### HTTP request headers
2362
+
2363
+ - **Content-Type**: application/json
2364
+ - **Accept**: Not defined
2365
+
2366
+
2367
+ ## on_verification_failed
2368
+
2369
+ > on_verification_failed(on_verification_failed_request)
2370
+
2371
+ Verification failed event
2372
+
2373
+ Fired when a managed-OTP verification is exhausted (the maximum number of wrong code attempts was reached).
2374
+
2375
+ ### Examples
2376
+
2377
+ ```ruby
2378
+ require 'time'
2379
+ require 'zernio-sdk'
2380
+ # setup authorization
2381
+ Zernio.configure do |config|
2382
+ # Configure Bearer authorization (JWT): bearerAuth
2383
+ config.access_token = 'YOUR_BEARER_TOKEN'
2384
+ end
2385
+
2386
+ api_instance = Zernio::WebhookEventsApi.new
2387
+ on_verification_failed_request = # OnVerificationFailedRequest |
2388
+
2389
+ begin
2390
+ # Verification failed event
2391
+ api_instance.on_verification_failed(on_verification_failed_request)
2392
+ rescue Zernio::ApiError => e
2393
+ puts "Error when calling WebhookEventsApi->on_verification_failed: #{e}"
2394
+ end
2395
+ ```
2396
+
2397
+ #### Using the on_verification_failed_with_http_info variant
2398
+
2399
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
2400
+
2401
+ > <Array(nil, Integer, Hash)> on_verification_failed_with_http_info(on_verification_failed_request)
2402
+
2403
+ ```ruby
2404
+ begin
2405
+ # Verification failed event
2406
+ data, status_code, headers = api_instance.on_verification_failed_with_http_info(on_verification_failed_request)
2407
+ p status_code # => 2xx
2408
+ p headers # => { ... }
2409
+ p data # => nil
2410
+ rescue Zernio::ApiError => e
2411
+ puts "Error when calling WebhookEventsApi->on_verification_failed_with_http_info: #{e}"
2412
+ end
2413
+ ```
2414
+
2415
+ ### Parameters
2416
+
2417
+ | Name | Type | Description | Notes |
2418
+ | ---- | ---- | ----------- | ----- |
2419
+ | **on_verification_failed_request** | [**OnVerificationFailedRequest**](OnVerificationFailedRequest.md) | | |
2420
+
2421
+ ### Return type
2422
+
2423
+ nil (empty response body)
2424
+
2425
+ ### Authorization
2426
+
2427
+ [bearerAuth](../README.md#bearerAuth)
2428
+
2429
+ ### HTTP request headers
2430
+
2431
+ - **Content-Type**: application/json
2432
+ - **Accept**: Not defined
2433
+
2434
+
2297
2435
  ## on_webhook_test
2298
2436
 
2299
2437
  > on_webhook_test(webhook_payload_test)