zernio-sdk 0.0.620 → 0.0.621
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 +5 -0
- data/docs/GetWhatsAppCallingConfig200Response.md +5 -1
- data/docs/StartWhatsAppCallerIdVerification200Response.md +22 -0
- data/docs/StartWhatsAppCallerIdVerificationRequest.md +18 -0
- data/docs/VerifyWhatsAppCallerIdRequest.md +18 -0
- data/docs/WhatsAppCallingApi.md +146 -0
- data/lib/zernio-sdk/api/whats_app_calling_api.rb +144 -0
- data/lib/zernio-sdk/models/get_whats_app_calling_config200_response.rb +59 -5
- data/lib/zernio-sdk/models/start_whats_app_caller_id_verification200_response.rb +199 -0
- data/lib/zernio-sdk/models/start_whats_app_caller_id_verification_request.rb +183 -0
- data/lib/zernio-sdk/models/verify_whats_app_caller_id_request.rb +182 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +3 -0
- data/openapi.yaml +79 -0
- data/spec/api/whats_app_calling_api_spec.rb +26 -0
- data/spec/models/get_whats_app_calling_config200_response_spec.rb +16 -0
- data/spec/models/start_whats_app_caller_id_verification200_response_spec.rb +52 -0
- data/spec/models/start_whats_app_caller_id_verification_request_spec.rb +40 -0
- data/spec/models/verify_whats_app_caller_id_request_spec.rb +36 -0
- metadata +13 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0c9db4f09edf26d95f63f75a133d52beccee2bd2fd4857a2a46b3b85514ee0ba
|
|
4
|
+
data.tar.gz: 1ebb55ed871c2949b9eb8ed1c9c88839a92fa739107c79aa4544620863891700
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 137b1c72c30ec88401fb645802620f292482438d8394115844dc0cf973842f53f37d4d04cecb3f1114cfedfeb42f95b783f8f38e162bf5a08196e93e8af87713
|
|
7
|
+
data.tar.gz: c59bda91be19462a686a47c6795fc038aac5ea3ad0745361f817ad4683b2b4034d7bde32e5acb7e43d8e64355fbe247fdb6f6899de25469b0ec68ed5ca6407ac
|
data/README.md
CHANGED
|
@@ -546,8 +546,10 @@ Class | Method | HTTP request | Description
|
|
|
546
546
|
*Zernio::WhatsAppCallingApi* | [**get_whats_app_calling_config**](docs/WhatsAppCallingApi.md#get_whats_app_calling_config) | **GET** /v1/whatsapp/calling | Get calling config for an account
|
|
547
547
|
*Zernio::WhatsAppCallingApi* | [**initiate_whats_app_call**](docs/WhatsAppCallingApi.md#initiate_whats_app_call) | **POST** /v1/whatsapp/calls | Initiate outbound call
|
|
548
548
|
*Zernio::WhatsAppCallingApi* | [**list_whats_app_calls**](docs/WhatsAppCallingApi.md#list_whats_app_calls) | **GET** /v1/whatsapp/calls | List call history for an account
|
|
549
|
+
*Zernio::WhatsAppCallingApi* | [**start_whats_app_caller_id_verification**](docs/WhatsAppCallingApi.md#start_whats_app_caller_id_verification) | **POST** /v1/phone-numbers/{id}/whatsapp/caller-id-verification | Start caller-ID verification for a customer-brought number
|
|
549
550
|
*Zernio::WhatsAppCallingApi* | [**update_whats_app_calling**](docs/WhatsAppCallingApi.md#update_whats_app_calling) | **PATCH** /v1/phone-numbers/{id}/whatsapp/calling | Update calling config
|
|
550
551
|
*Zernio::WhatsAppCallingApi* | [**update_whats_app_calling_legacy**](docs/WhatsAppCallingApi.md#update_whats_app_calling_legacy) | **PATCH** /v1/whatsapp/phone-numbers/{id}/calling | Update calling config
|
|
552
|
+
*Zernio::WhatsAppCallingApi* | [**verify_whats_app_caller_id**](docs/WhatsAppCallingApi.md#verify_whats_app_caller_id) | **POST** /v1/phone-numbers/{id}/whatsapp/caller-id-verification/verify | Confirm the caller-ID verification code
|
|
551
553
|
*Zernio::WhatsAppFlowsApi* | [**create_whats_app_flow**](docs/WhatsAppFlowsApi.md#create_whats_app_flow) | **POST** /v1/whatsapp/flows | Create flow
|
|
552
554
|
*Zernio::WhatsAppFlowsApi* | [**delete_whats_app_flow**](docs/WhatsAppFlowsApi.md#delete_whats_app_flow) | **DELETE** /v1/whatsapp/flows/{flowId} | Delete flow
|
|
553
555
|
*Zernio::WhatsAppFlowsApi* | [**deprecate_whats_app_flow**](docs/WhatsAppFlowsApi.md#deprecate_whats_app_flow) | **POST** /v1/whatsapp/flows/{flowId}/deprecate | Deprecate flow
|
|
@@ -1803,6 +1805,8 @@ Class | Method | HTTP request | Description
|
|
|
1803
1805
|
- [Zernio::StartSmsRegistrationRequestBrand](docs/StartSmsRegistrationRequestBrand.md)
|
|
1804
1806
|
- [Zernio::StartSmsRegistrationRequestCampaign](docs/StartSmsRegistrationRequestCampaign.md)
|
|
1805
1807
|
- [Zernio::StartSmsRegistrationRequestTollFree](docs/StartSmsRegistrationRequestTollFree.md)
|
|
1808
|
+
- [Zernio::StartWhatsAppCallerIdVerification200Response](docs/StartWhatsAppCallerIdVerification200Response.md)
|
|
1809
|
+
- [Zernio::StartWhatsAppCallerIdVerificationRequest](docs/StartWhatsAppCallerIdVerificationRequest.md)
|
|
1806
1810
|
- [Zernio::SubmitPhoneNumberKyc200Response](docs/SubmitPhoneNumberKyc200Response.md)
|
|
1807
1811
|
- [Zernio::SubmitPhoneNumberKyc200ResponseNumbersInner](docs/SubmitPhoneNumberKyc200ResponseNumbersInner.md)
|
|
1808
1812
|
- [Zernio::SubmitPhoneNumberKyc200ResponsePhoneNumber](docs/SubmitPhoneNumberKyc200ResponsePhoneNumber.md)
|
|
@@ -2030,6 +2034,7 @@ Class | Method | HTTP request | Description
|
|
|
2030
2034
|
- [Zernio::Verification](docs/Verification.md)
|
|
2031
2035
|
- [Zernio::VerifySmsRegistrationOtp200Response](docs/VerifySmsRegistrationOtp200Response.md)
|
|
2032
2036
|
- [Zernio::VerifySmsRegistrationOtpRequest](docs/VerifySmsRegistrationOtpRequest.md)
|
|
2037
|
+
- [Zernio::VerifyWhatsAppCallerIdRequest](docs/VerifyWhatsAppCallerIdRequest.md)
|
|
2033
2038
|
- [Zernio::VoteRedditThingRequest](docs/VoteRedditThingRequest.md)
|
|
2034
2039
|
- [Zernio::Webhook](docs/Webhook.md)
|
|
2035
2040
|
- [Zernio::WebhookLog](docs/WebhookLog.md)
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
| **sip_auth_username** | **String** | | [optional] |
|
|
14
14
|
| **sip_auth_password_configured** | **Boolean** | True when a SIP digest password is stored. The plaintext is never returned. | [optional] |
|
|
15
15
|
| **call_icon_countries** | **Array<String>** | | [optional] |
|
|
16
|
+
| **caller_id_mode** | **String** | Caller ID the forward-leg callee sees on tel: forwards. business = this WhatsApp number; platform = a Zernio number (customer-brought number without verified caller ID; verify via /v1/phone-numbers/{id}/whatsapp/caller-id-verification). | [optional] |
|
|
17
|
+
| **caller_id_verified** | **Boolean** | True once the number completed caller-ID verification. | [optional] |
|
|
16
18
|
|
|
17
19
|
## Example
|
|
18
20
|
|
|
@@ -28,7 +30,9 @@ instance = Zernio::GetWhatsAppCallingConfig200Response.new(
|
|
|
28
30
|
recording_enabled: null,
|
|
29
31
|
sip_auth_username: null,
|
|
30
32
|
sip_auth_password_configured: null,
|
|
31
|
-
call_icon_countries: null
|
|
33
|
+
call_icon_countries: null,
|
|
34
|
+
caller_id_mode: null,
|
|
35
|
+
caller_id_verified: null
|
|
32
36
|
)
|
|
33
37
|
```
|
|
34
38
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::StartWhatsAppCallerIdVerification200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **verified** | **Boolean** | | [optional] |
|
|
8
|
+
| **code_sent** | **Boolean** | | [optional] |
|
|
9
|
+
| **method** | **String** | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::StartWhatsAppCallerIdVerification200Response.new(
|
|
17
|
+
verified: null,
|
|
18
|
+
code_sent: null,
|
|
19
|
+
method: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Zernio::StartWhatsAppCallerIdVerificationRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **method** | **String** | | [optional][default to 'sms'] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'zernio-sdk'
|
|
13
|
+
|
|
14
|
+
instance = Zernio::StartWhatsAppCallerIdVerificationRequest.new(
|
|
15
|
+
method: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Zernio::VerifyWhatsAppCallerIdRequest
|
|
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::VerifyWhatsAppCallerIdRequest.new(
|
|
15
|
+
code: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
data/docs/WhatsAppCallingApi.md
CHANGED
|
@@ -16,8 +16,10 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
16
16
|
| [**get_whats_app_calling_config**](WhatsAppCallingApi.md#get_whats_app_calling_config) | **GET** /v1/whatsapp/calling | Get calling config for an account |
|
|
17
17
|
| [**initiate_whats_app_call**](WhatsAppCallingApi.md#initiate_whats_app_call) | **POST** /v1/whatsapp/calls | Initiate outbound call |
|
|
18
18
|
| [**list_whats_app_calls**](WhatsAppCallingApi.md#list_whats_app_calls) | **GET** /v1/whatsapp/calls | List call history for an account |
|
|
19
|
+
| [**start_whats_app_caller_id_verification**](WhatsAppCallingApi.md#start_whats_app_caller_id_verification) | **POST** /v1/phone-numbers/{id}/whatsapp/caller-id-verification | Start caller-ID verification for a customer-brought number |
|
|
19
20
|
| [**update_whats_app_calling**](WhatsAppCallingApi.md#update_whats_app_calling) | **PATCH** /v1/phone-numbers/{id}/whatsapp/calling | Update calling config |
|
|
20
21
|
| [**update_whats_app_calling_legacy**](WhatsAppCallingApi.md#update_whats_app_calling_legacy) | **PATCH** /v1/whatsapp/phone-numbers/{id}/calling | Update calling config |
|
|
22
|
+
| [**verify_whats_app_caller_id**](WhatsAppCallingApi.md#verify_whats_app_caller_id) | **POST** /v1/phone-numbers/{id}/whatsapp/caller-id-verification/verify | Confirm the caller-ID verification code |
|
|
21
23
|
|
|
22
24
|
|
|
23
25
|
## disable_whats_app_calling
|
|
@@ -888,6 +890,79 @@ end
|
|
|
888
890
|
- **Accept**: application/json
|
|
889
891
|
|
|
890
892
|
|
|
893
|
+
## start_whats_app_caller_id_verification
|
|
894
|
+
|
|
895
|
+
> <StartWhatsAppCallerIdVerification200Response> start_whats_app_caller_id_verification(id, opts)
|
|
896
|
+
|
|
897
|
+
Start caller-ID verification for a customer-brought number
|
|
898
|
+
|
|
899
|
+
Customer-brought (BYO) WhatsApp numbers cannot present themselves as caller ID on `tel:` call forwards until verified (carrier anti-spoofing); until then forwarded calls show a Zernio number (`callerIdMode: platform` on the calling config). This sends a one-time code to the number by SMS or voice call. Re-POST to resend. Zernio-purchased numbers never need this and get a 400.
|
|
900
|
+
|
|
901
|
+
### Examples
|
|
902
|
+
|
|
903
|
+
```ruby
|
|
904
|
+
require 'time'
|
|
905
|
+
require 'zernio-sdk'
|
|
906
|
+
# setup authorization
|
|
907
|
+
Zernio.configure do |config|
|
|
908
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
909
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
910
|
+
end
|
|
911
|
+
|
|
912
|
+
api_instance = Zernio::WhatsAppCallingApi.new
|
|
913
|
+
id = 'id_example' # String | Phone number record ID (from GET /v1/phone-numbers).
|
|
914
|
+
opts = {
|
|
915
|
+
start_whats_app_caller_id_verification_request: Zernio::StartWhatsAppCallerIdVerificationRequest.new # StartWhatsAppCallerIdVerificationRequest |
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
begin
|
|
919
|
+
# Start caller-ID verification for a customer-brought number
|
|
920
|
+
result = api_instance.start_whats_app_caller_id_verification(id, opts)
|
|
921
|
+
p result
|
|
922
|
+
rescue Zernio::ApiError => e
|
|
923
|
+
puts "Error when calling WhatsAppCallingApi->start_whats_app_caller_id_verification: #{e}"
|
|
924
|
+
end
|
|
925
|
+
```
|
|
926
|
+
|
|
927
|
+
#### Using the start_whats_app_caller_id_verification_with_http_info variant
|
|
928
|
+
|
|
929
|
+
This returns an Array which contains the response data, status code and headers.
|
|
930
|
+
|
|
931
|
+
> <Array(<StartWhatsAppCallerIdVerification200Response>, Integer, Hash)> start_whats_app_caller_id_verification_with_http_info(id, opts)
|
|
932
|
+
|
|
933
|
+
```ruby
|
|
934
|
+
begin
|
|
935
|
+
# Start caller-ID verification for a customer-brought number
|
|
936
|
+
data, status_code, headers = api_instance.start_whats_app_caller_id_verification_with_http_info(id, opts)
|
|
937
|
+
p status_code # => 2xx
|
|
938
|
+
p headers # => { ... }
|
|
939
|
+
p data # => <StartWhatsAppCallerIdVerification200Response>
|
|
940
|
+
rescue Zernio::ApiError => e
|
|
941
|
+
puts "Error when calling WhatsAppCallingApi->start_whats_app_caller_id_verification_with_http_info: #{e}"
|
|
942
|
+
end
|
|
943
|
+
```
|
|
944
|
+
|
|
945
|
+
### Parameters
|
|
946
|
+
|
|
947
|
+
| Name | Type | Description | Notes |
|
|
948
|
+
| ---- | ---- | ----------- | ----- |
|
|
949
|
+
| **id** | **String** | Phone number record ID (from GET /v1/phone-numbers). | |
|
|
950
|
+
| **start_whats_app_caller_id_verification_request** | [**StartWhatsAppCallerIdVerificationRequest**](StartWhatsAppCallerIdVerificationRequest.md) | | [optional] |
|
|
951
|
+
|
|
952
|
+
### Return type
|
|
953
|
+
|
|
954
|
+
[**StartWhatsAppCallerIdVerification200Response**](StartWhatsAppCallerIdVerification200Response.md)
|
|
955
|
+
|
|
956
|
+
### Authorization
|
|
957
|
+
|
|
958
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
959
|
+
|
|
960
|
+
### HTTP request headers
|
|
961
|
+
|
|
962
|
+
- **Content-Type**: application/json
|
|
963
|
+
- **Accept**: application/json
|
|
964
|
+
|
|
965
|
+
|
|
891
966
|
## update_whats_app_calling
|
|
892
967
|
|
|
893
968
|
> update_whats_app_calling(id, update_whats_app_calling_legacy_request)
|
|
@@ -1027,3 +1102,74 @@ nil (empty response body)
|
|
|
1027
1102
|
- **Content-Type**: application/json
|
|
1028
1103
|
- **Accept**: application/json
|
|
1029
1104
|
|
|
1105
|
+
|
|
1106
|
+
## verify_whats_app_caller_id
|
|
1107
|
+
|
|
1108
|
+
> <VerifySmsRegistrationOtp200Response> verify_whats_app_caller_id(id, verify_whats_app_caller_id_request)
|
|
1109
|
+
|
|
1110
|
+
Confirm the caller-ID verification code
|
|
1111
|
+
|
|
1112
|
+
Submits the one-time code the number received. On success, `tel:` call forwards present the business number itself as caller ID (`callerIdMode: business`).
|
|
1113
|
+
|
|
1114
|
+
### Examples
|
|
1115
|
+
|
|
1116
|
+
```ruby
|
|
1117
|
+
require 'time'
|
|
1118
|
+
require 'zernio-sdk'
|
|
1119
|
+
# setup authorization
|
|
1120
|
+
Zernio.configure do |config|
|
|
1121
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
1122
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1123
|
+
end
|
|
1124
|
+
|
|
1125
|
+
api_instance = Zernio::WhatsAppCallingApi.new
|
|
1126
|
+
id = 'id_example' # String | Phone number record ID (from GET /v1/phone-numbers).
|
|
1127
|
+
verify_whats_app_caller_id_request = Zernio::VerifyWhatsAppCallerIdRequest.new({code: 'code_example'}) # VerifyWhatsAppCallerIdRequest |
|
|
1128
|
+
|
|
1129
|
+
begin
|
|
1130
|
+
# Confirm the caller-ID verification code
|
|
1131
|
+
result = api_instance.verify_whats_app_caller_id(id, verify_whats_app_caller_id_request)
|
|
1132
|
+
p result
|
|
1133
|
+
rescue Zernio::ApiError => e
|
|
1134
|
+
puts "Error when calling WhatsAppCallingApi->verify_whats_app_caller_id: #{e}"
|
|
1135
|
+
end
|
|
1136
|
+
```
|
|
1137
|
+
|
|
1138
|
+
#### Using the verify_whats_app_caller_id_with_http_info variant
|
|
1139
|
+
|
|
1140
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1141
|
+
|
|
1142
|
+
> <Array(<VerifySmsRegistrationOtp200Response>, Integer, Hash)> verify_whats_app_caller_id_with_http_info(id, verify_whats_app_caller_id_request)
|
|
1143
|
+
|
|
1144
|
+
```ruby
|
|
1145
|
+
begin
|
|
1146
|
+
# Confirm the caller-ID verification code
|
|
1147
|
+
data, status_code, headers = api_instance.verify_whats_app_caller_id_with_http_info(id, verify_whats_app_caller_id_request)
|
|
1148
|
+
p status_code # => 2xx
|
|
1149
|
+
p headers # => { ... }
|
|
1150
|
+
p data # => <VerifySmsRegistrationOtp200Response>
|
|
1151
|
+
rescue Zernio::ApiError => e
|
|
1152
|
+
puts "Error when calling WhatsAppCallingApi->verify_whats_app_caller_id_with_http_info: #{e}"
|
|
1153
|
+
end
|
|
1154
|
+
```
|
|
1155
|
+
|
|
1156
|
+
### Parameters
|
|
1157
|
+
|
|
1158
|
+
| Name | Type | Description | Notes |
|
|
1159
|
+
| ---- | ---- | ----------- | ----- |
|
|
1160
|
+
| **id** | **String** | Phone number record ID (from GET /v1/phone-numbers). | |
|
|
1161
|
+
| **verify_whats_app_caller_id_request** | [**VerifyWhatsAppCallerIdRequest**](VerifyWhatsAppCallerIdRequest.md) | | |
|
|
1162
|
+
|
|
1163
|
+
### Return type
|
|
1164
|
+
|
|
1165
|
+
[**VerifySmsRegistrationOtp200Response**](VerifySmsRegistrationOtp200Response.md)
|
|
1166
|
+
|
|
1167
|
+
### Authorization
|
|
1168
|
+
|
|
1169
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
1170
|
+
|
|
1171
|
+
### HTTP request headers
|
|
1172
|
+
|
|
1173
|
+
- **Content-Type**: application/json
|
|
1174
|
+
- **Accept**: application/json
|
|
1175
|
+
|
|
@@ -908,6 +908,76 @@ module Zernio
|
|
|
908
908
|
return data, status_code, headers
|
|
909
909
|
end
|
|
910
910
|
|
|
911
|
+
# Start caller-ID verification for a customer-brought number
|
|
912
|
+
# Customer-brought (BYO) WhatsApp numbers cannot present themselves as caller ID on `tel:` call forwards until verified (carrier anti-spoofing); until then forwarded calls show a Zernio number (`callerIdMode: platform` on the calling config). This sends a one-time code to the number by SMS or voice call. Re-POST to resend. Zernio-purchased numbers never need this and get a 400.
|
|
913
|
+
# @param id [String] Phone number record ID (from GET /v1/phone-numbers).
|
|
914
|
+
# @param [Hash] opts the optional parameters
|
|
915
|
+
# @option opts [StartWhatsAppCallerIdVerificationRequest] :start_whats_app_caller_id_verification_request
|
|
916
|
+
# @return [StartWhatsAppCallerIdVerification200Response]
|
|
917
|
+
def start_whats_app_caller_id_verification(id, opts = {})
|
|
918
|
+
data, _status_code, _headers = start_whats_app_caller_id_verification_with_http_info(id, opts)
|
|
919
|
+
data
|
|
920
|
+
end
|
|
921
|
+
|
|
922
|
+
# Start caller-ID verification for a customer-brought number
|
|
923
|
+
# Customer-brought (BYO) WhatsApp numbers cannot present themselves as caller ID on `tel:` call forwards until verified (carrier anti-spoofing); until then forwarded calls show a Zernio number (`callerIdMode: platform` on the calling config). This sends a one-time code to the number by SMS or voice call. Re-POST to resend. Zernio-purchased numbers never need this and get a 400.
|
|
924
|
+
# @param id [String] Phone number record ID (from GET /v1/phone-numbers).
|
|
925
|
+
# @param [Hash] opts the optional parameters
|
|
926
|
+
# @option opts [StartWhatsAppCallerIdVerificationRequest] :start_whats_app_caller_id_verification_request
|
|
927
|
+
# @return [Array<(StartWhatsAppCallerIdVerification200Response, Integer, Hash)>] StartWhatsAppCallerIdVerification200Response data, response status code and response headers
|
|
928
|
+
def start_whats_app_caller_id_verification_with_http_info(id, opts = {})
|
|
929
|
+
if @api_client.config.debugging
|
|
930
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppCallingApi.start_whats_app_caller_id_verification ...'
|
|
931
|
+
end
|
|
932
|
+
# verify the required parameter 'id' is set
|
|
933
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
934
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling WhatsAppCallingApi.start_whats_app_caller_id_verification"
|
|
935
|
+
end
|
|
936
|
+
# resource path
|
|
937
|
+
local_var_path = '/v1/phone-numbers/{id}/whatsapp/caller-id-verification'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
938
|
+
|
|
939
|
+
# query parameters
|
|
940
|
+
query_params = opts[:query_params] || {}
|
|
941
|
+
|
|
942
|
+
# header parameters
|
|
943
|
+
header_params = opts[:header_params] || {}
|
|
944
|
+
# HTTP header 'Accept' (if needed)
|
|
945
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
946
|
+
# HTTP header 'Content-Type'
|
|
947
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
948
|
+
if !content_type.nil?
|
|
949
|
+
header_params['Content-Type'] = content_type
|
|
950
|
+
end
|
|
951
|
+
|
|
952
|
+
# form parameters
|
|
953
|
+
form_params = opts[:form_params] || {}
|
|
954
|
+
|
|
955
|
+
# http body (model)
|
|
956
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'start_whats_app_caller_id_verification_request'])
|
|
957
|
+
|
|
958
|
+
# return_type
|
|
959
|
+
return_type = opts[:debug_return_type] || 'StartWhatsAppCallerIdVerification200Response'
|
|
960
|
+
|
|
961
|
+
# auth_names
|
|
962
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
963
|
+
|
|
964
|
+
new_options = opts.merge(
|
|
965
|
+
:operation => :"WhatsAppCallingApi.start_whats_app_caller_id_verification",
|
|
966
|
+
:header_params => header_params,
|
|
967
|
+
:query_params => query_params,
|
|
968
|
+
:form_params => form_params,
|
|
969
|
+
:body => post_body,
|
|
970
|
+
:auth_names => auth_names,
|
|
971
|
+
:return_type => return_type
|
|
972
|
+
)
|
|
973
|
+
|
|
974
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
975
|
+
if @api_client.config.debugging
|
|
976
|
+
@api_client.config.logger.debug "API called: WhatsAppCallingApi#start_whats_app_caller_id_verification\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
977
|
+
end
|
|
978
|
+
return data, status_code, headers
|
|
979
|
+
end
|
|
980
|
+
|
|
911
981
|
# Update calling config
|
|
912
982
|
# Update fields on an already-enabled number. Only fields present in the body are written; `undefined` leaves the stored value alone, explicit `null` clears a nullable field. No Meta side effect, this only changes local routing state consumed by the Telnyx webhook handler.
|
|
913
983
|
# @param id [String]
|
|
@@ -1055,5 +1125,79 @@ module Zernio
|
|
|
1055
1125
|
end
|
|
1056
1126
|
return data, status_code, headers
|
|
1057
1127
|
end
|
|
1128
|
+
|
|
1129
|
+
# Confirm the caller-ID verification code
|
|
1130
|
+
# Submits the one-time code the number received. On success, `tel:` call forwards present the business number itself as caller ID (`callerIdMode: business`).
|
|
1131
|
+
# @param id [String] Phone number record ID (from GET /v1/phone-numbers).
|
|
1132
|
+
# @param verify_whats_app_caller_id_request [VerifyWhatsAppCallerIdRequest]
|
|
1133
|
+
# @param [Hash] opts the optional parameters
|
|
1134
|
+
# @return [VerifySmsRegistrationOtp200Response]
|
|
1135
|
+
def verify_whats_app_caller_id(id, verify_whats_app_caller_id_request, opts = {})
|
|
1136
|
+
data, _status_code, _headers = verify_whats_app_caller_id_with_http_info(id, verify_whats_app_caller_id_request, opts)
|
|
1137
|
+
data
|
|
1138
|
+
end
|
|
1139
|
+
|
|
1140
|
+
# Confirm the caller-ID verification code
|
|
1141
|
+
# Submits the one-time code the number received. On success, `tel:` call forwards present the business number itself as caller ID (`callerIdMode: business`).
|
|
1142
|
+
# @param id [String] Phone number record ID (from GET /v1/phone-numbers).
|
|
1143
|
+
# @param verify_whats_app_caller_id_request [VerifyWhatsAppCallerIdRequest]
|
|
1144
|
+
# @param [Hash] opts the optional parameters
|
|
1145
|
+
# @return [Array<(VerifySmsRegistrationOtp200Response, Integer, Hash)>] VerifySmsRegistrationOtp200Response data, response status code and response headers
|
|
1146
|
+
def verify_whats_app_caller_id_with_http_info(id, verify_whats_app_caller_id_request, opts = {})
|
|
1147
|
+
if @api_client.config.debugging
|
|
1148
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppCallingApi.verify_whats_app_caller_id ...'
|
|
1149
|
+
end
|
|
1150
|
+
# verify the required parameter 'id' is set
|
|
1151
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1152
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling WhatsAppCallingApi.verify_whats_app_caller_id"
|
|
1153
|
+
end
|
|
1154
|
+
# verify the required parameter 'verify_whats_app_caller_id_request' is set
|
|
1155
|
+
if @api_client.config.client_side_validation && verify_whats_app_caller_id_request.nil?
|
|
1156
|
+
fail ArgumentError, "Missing the required parameter 'verify_whats_app_caller_id_request' when calling WhatsAppCallingApi.verify_whats_app_caller_id"
|
|
1157
|
+
end
|
|
1158
|
+
# resource path
|
|
1159
|
+
local_var_path = '/v1/phone-numbers/{id}/whatsapp/caller-id-verification/verify'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1160
|
+
|
|
1161
|
+
# query parameters
|
|
1162
|
+
query_params = opts[:query_params] || {}
|
|
1163
|
+
|
|
1164
|
+
# header parameters
|
|
1165
|
+
header_params = opts[:header_params] || {}
|
|
1166
|
+
# HTTP header 'Accept' (if needed)
|
|
1167
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1168
|
+
# HTTP header 'Content-Type'
|
|
1169
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1170
|
+
if !content_type.nil?
|
|
1171
|
+
header_params['Content-Type'] = content_type
|
|
1172
|
+
end
|
|
1173
|
+
|
|
1174
|
+
# form parameters
|
|
1175
|
+
form_params = opts[:form_params] || {}
|
|
1176
|
+
|
|
1177
|
+
# http body (model)
|
|
1178
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(verify_whats_app_caller_id_request)
|
|
1179
|
+
|
|
1180
|
+
# return_type
|
|
1181
|
+
return_type = opts[:debug_return_type] || 'VerifySmsRegistrationOtp200Response'
|
|
1182
|
+
|
|
1183
|
+
# auth_names
|
|
1184
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1185
|
+
|
|
1186
|
+
new_options = opts.merge(
|
|
1187
|
+
:operation => :"WhatsAppCallingApi.verify_whats_app_caller_id",
|
|
1188
|
+
:header_params => header_params,
|
|
1189
|
+
:query_params => query_params,
|
|
1190
|
+
:form_params => form_params,
|
|
1191
|
+
:body => post_body,
|
|
1192
|
+
:auth_names => auth_names,
|
|
1193
|
+
:return_type => return_type
|
|
1194
|
+
)
|
|
1195
|
+
|
|
1196
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1197
|
+
if @api_client.config.debugging
|
|
1198
|
+
@api_client.config.logger.debug "API called: WhatsAppCallingApi#verify_whats_app_caller_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1199
|
+
end
|
|
1200
|
+
return data, status_code, headers
|
|
1201
|
+
end
|
|
1058
1202
|
end
|
|
1059
1203
|
end
|
|
@@ -37,6 +37,34 @@ module Zernio
|
|
|
37
37
|
|
|
38
38
|
attr_accessor :call_icon_countries
|
|
39
39
|
|
|
40
|
+
# Caller ID the forward-leg callee sees on tel: forwards. business = this WhatsApp number; platform = a Zernio number (customer-brought number without verified caller ID; verify via /v1/phone-numbers/{id}/whatsapp/caller-id-verification).
|
|
41
|
+
attr_accessor :caller_id_mode
|
|
42
|
+
|
|
43
|
+
# True once the number completed caller-ID verification.
|
|
44
|
+
attr_accessor :caller_id_verified
|
|
45
|
+
|
|
46
|
+
class EnumAttributeValidator
|
|
47
|
+
attr_reader :datatype
|
|
48
|
+
attr_reader :allowable_values
|
|
49
|
+
|
|
50
|
+
def initialize(datatype, allowable_values)
|
|
51
|
+
@allowable_values = allowable_values.map do |value|
|
|
52
|
+
case datatype.to_s
|
|
53
|
+
when /Integer/i
|
|
54
|
+
value.to_i
|
|
55
|
+
when /Float/i
|
|
56
|
+
value.to_f
|
|
57
|
+
else
|
|
58
|
+
value
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def valid?(value)
|
|
64
|
+
!value || allowable_values.include?(value)
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
40
68
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
41
69
|
def self.attribute_map
|
|
42
70
|
{
|
|
@@ -48,7 +76,9 @@ module Zernio
|
|
|
48
76
|
:'recording_enabled' => :'recordingEnabled',
|
|
49
77
|
:'sip_auth_username' => :'sipAuthUsername',
|
|
50
78
|
:'sip_auth_password_configured' => :'sipAuthPasswordConfigured',
|
|
51
|
-
:'call_icon_countries' => :'callIconCountries'
|
|
79
|
+
:'call_icon_countries' => :'callIconCountries',
|
|
80
|
+
:'caller_id_mode' => :'callerIdMode',
|
|
81
|
+
:'caller_id_verified' => :'callerIdVerified'
|
|
52
82
|
}
|
|
53
83
|
end
|
|
54
84
|
|
|
@@ -73,7 +103,9 @@ module Zernio
|
|
|
73
103
|
:'recording_enabled' => :'Boolean',
|
|
74
104
|
:'sip_auth_username' => :'String',
|
|
75
105
|
:'sip_auth_password_configured' => :'Boolean',
|
|
76
|
-
:'call_icon_countries' => :'Array<String>'
|
|
106
|
+
:'call_icon_countries' => :'Array<String>',
|
|
107
|
+
:'caller_id_mode' => :'String',
|
|
108
|
+
:'caller_id_verified' => :'Boolean'
|
|
77
109
|
}
|
|
78
110
|
end
|
|
79
111
|
|
|
@@ -83,7 +115,7 @@ module Zernio
|
|
|
83
115
|
:'call_deep_link',
|
|
84
116
|
:'forward_to',
|
|
85
117
|
:'sip_auth_username',
|
|
86
|
-
:'call_icon_countries'
|
|
118
|
+
:'call_icon_countries',
|
|
87
119
|
])
|
|
88
120
|
end
|
|
89
121
|
|
|
@@ -140,6 +172,14 @@ module Zernio
|
|
|
140
172
|
self.call_icon_countries = value
|
|
141
173
|
end
|
|
142
174
|
end
|
|
175
|
+
|
|
176
|
+
if attributes.key?(:'caller_id_mode')
|
|
177
|
+
self.caller_id_mode = attributes[:'caller_id_mode']
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if attributes.key?(:'caller_id_verified')
|
|
181
|
+
self.caller_id_verified = attributes[:'caller_id_verified']
|
|
182
|
+
end
|
|
143
183
|
end
|
|
144
184
|
|
|
145
185
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -154,9 +194,21 @@ module Zernio
|
|
|
154
194
|
# @return true if the model is valid
|
|
155
195
|
def valid?
|
|
156
196
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
197
|
+
caller_id_mode_validator = EnumAttributeValidator.new('String', ["business", "platform"])
|
|
198
|
+
return false unless caller_id_mode_validator.valid?(@caller_id_mode)
|
|
157
199
|
true
|
|
158
200
|
end
|
|
159
201
|
|
|
202
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
203
|
+
# @param [Object] caller_id_mode Object to be assigned
|
|
204
|
+
def caller_id_mode=(caller_id_mode)
|
|
205
|
+
validator = EnumAttributeValidator.new('String', ["business", "platform"])
|
|
206
|
+
unless validator.valid?(caller_id_mode)
|
|
207
|
+
fail ArgumentError, "invalid value for \"caller_id_mode\", must be one of #{validator.allowable_values}."
|
|
208
|
+
end
|
|
209
|
+
@caller_id_mode = caller_id_mode
|
|
210
|
+
end
|
|
211
|
+
|
|
160
212
|
# Checks equality by comparing each attribute.
|
|
161
213
|
# @param [Object] Object to be compared
|
|
162
214
|
def ==(o)
|
|
@@ -170,7 +222,9 @@ module Zernio
|
|
|
170
222
|
recording_enabled == o.recording_enabled &&
|
|
171
223
|
sip_auth_username == o.sip_auth_username &&
|
|
172
224
|
sip_auth_password_configured == o.sip_auth_password_configured &&
|
|
173
|
-
call_icon_countries == o.call_icon_countries
|
|
225
|
+
call_icon_countries == o.call_icon_countries &&
|
|
226
|
+
caller_id_mode == o.caller_id_mode &&
|
|
227
|
+
caller_id_verified == o.caller_id_verified
|
|
174
228
|
end
|
|
175
229
|
|
|
176
230
|
# @see the `==` method
|
|
@@ -182,7 +236,7 @@ module Zernio
|
|
|
182
236
|
# Calculates hash code according to all attributes.
|
|
183
237
|
# @return [Integer] Hash code
|
|
184
238
|
def hash
|
|
185
|
-
[phone_number_doc_id, phone_number, calling_enabled, call_deep_link, forward_to, recording_enabled, sip_auth_username, sip_auth_password_configured, call_icon_countries].hash
|
|
239
|
+
[phone_number_doc_id, phone_number, calling_enabled, call_deep_link, forward_to, recording_enabled, sip_auth_username, sip_auth_password_configured, call_icon_countries, caller_id_mode, caller_id_verified].hash
|
|
186
240
|
end
|
|
187
241
|
|
|
188
242
|
# Builds the object from hash
|