late-sdk 0.0.619 → 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.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -0
  3. data/docs/EnableWhatsAppCallingLegacy200Response.md +3 -1
  4. data/docs/GetWhatsAppCalling200Response.md +5 -1
  5. data/docs/GetWhatsAppCallingConfig200Response.md +5 -1
  6. data/docs/StartWhatsAppCallerIdVerification200Response.md +22 -0
  7. data/docs/StartWhatsAppCallerIdVerificationRequest.md +18 -0
  8. data/docs/VerifyWhatsAppCallerIdRequest.md +18 -0
  9. data/docs/WhatsAppCallingApi.md +146 -0
  10. data/lib/zernio-sdk/api/whats_app_calling_api.rb +144 -0
  11. data/lib/zernio-sdk/models/enable_whats_app_calling_legacy200_response.rb +48 -4
  12. data/lib/zernio-sdk/models/get_whats_app_calling200_response.rb +58 -4
  13. data/lib/zernio-sdk/models/get_whats_app_calling_config200_response.rb +59 -5
  14. data/lib/zernio-sdk/models/start_whats_app_caller_id_verification200_response.rb +199 -0
  15. data/lib/zernio-sdk/models/start_whats_app_caller_id_verification_request.rb +183 -0
  16. data/lib/zernio-sdk/models/verify_whats_app_caller_id_request.rb +182 -0
  17. data/lib/zernio-sdk/version.rb +1 -1
  18. data/lib/zernio-sdk.rb +3 -0
  19. data/openapi.yaml +94 -2
  20. data/spec/api/whats_app_calling_api_spec.rb +26 -0
  21. data/spec/models/enable_whats_app_calling_legacy200_response_spec.rb +10 -0
  22. data/spec/models/get_whats_app_calling200_response_spec.rb +16 -0
  23. data/spec/models/get_whats_app_calling_config200_response_spec.rb +16 -0
  24. data/spec/models/start_whats_app_caller_id_verification200_response_spec.rb +52 -0
  25. data/spec/models/start_whats_app_caller_id_verification_request_spec.rb +40 -0
  26. data/spec/models/verify_whats_app_caller_id_request_spec.rb +36 -0
  27. data/zernio-sdk-0.0.621.gem +0 -0
  28. metadata +14 -2
  29. data/zernio-sdk-0.0.619.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: adec945f4270a54a62ef05557ea6e4b5767f91ce78e0a5d9c9c5e5cf126f3449
4
- data.tar.gz: d6addc95b9ba568ab0a8a8d0dbb6004d94a913d380056ab43a266c514c073193
3
+ metadata.gz: e38fe2f54b39063093315b89605bd5a11ed260e9ca697060ce1bf25a0251568f
4
+ data.tar.gz: 654d844c37316be5e61d24fd7495def04dffb286110196720ce29aec92d654de
5
5
  SHA512:
6
- metadata.gz: 7e2802c440e774a66ed49eeb69c321688c6d7390096af09346429ace57bc72ff03326502205cdc9621a1dc80015dcc1eebe0f0350bc005b4204e8eab1bf5e0fa
7
- data.tar.gz: 931723d9206d64a3fd4b39eda8d9498eb2312c755207e09990f9f3cccce4079d7df898a22efb92dadc70acaa8227b752d66e41db1bac7e1693b9ea1af0dd604e
6
+ metadata.gz: e9b04ab83f76008001e652000dbe40f8ff52336b0f9e16236885cc3e45292fe9642c3ecc4b7134c70d8b43351f554759125ce150ad04259522feebb90ac96453
7
+ data.tar.gz: 894941118d5052254b9b852bd1cd4aa651c30ea928ab802c959350035e8776201258927704095079e9a824809335c72c9d755f205af39c5ef72429a2f1e467c4
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)
@@ -8,6 +8,7 @@
8
8
  | **calling_enabled** | **Boolean** | | [optional] |
9
9
  | **sip_hostname** | **String** | | [optional] |
10
10
  | **forward_to** | **String** | | [optional] |
11
+ | **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). | [optional] |
11
12
 
12
13
  ## Example
13
14
 
@@ -18,7 +19,8 @@ instance = Zernio::EnableWhatsAppCallingLegacy200Response.new(
18
19
  success: null,
19
20
  calling_enabled: null,
20
21
  sip_hostname: null,
21
- forward_to: null
22
+ forward_to: null,
23
+ caller_id_mode: null
22
24
  )
23
25
  ```
24
26
 
@@ -13,6 +13,8 @@
13
13
  | **sip_auth_password_configured** | **Boolean** | True when a SIP digest password is stored. The plaintext is never returned. | [optional] |
14
14
  | **call_icon_countries** | **Array<String>** | | [optional] |
15
15
  | **outbound_disabled** | **Boolean** | True when the number's country blocks business-initiated (outbound) WhatsApp calling; inbound still works. | [optional] |
16
+ | **caller_id_mode** | **String** | Caller ID the forward-leg callee sees on tel: forwards. business = this WhatsApp number; platform = a Zernio number (used when the number was brought by the customer and its caller ID is not verified for PSTN origination). | [optional] |
17
+ | **caller_id_verified** | **Boolean** | True once the number completed caller-ID verification, making tel: forwards display the business number itself. | [optional] |
16
18
 
17
19
  ## Example
18
20
 
@@ -28,7 +30,9 @@ instance = Zernio::GetWhatsAppCalling200Response.new(
28
30
  sip_auth_username: null,
29
31
  sip_auth_password_configured: null,
30
32
  call_icon_countries: null,
31
- outbound_disabled: null
33
+ outbound_disabled: null,
34
+ caller_id_mode: null,
35
+ caller_id_verified: null
32
36
  )
33
37
  ```
34
38
 
@@ -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
+
@@ -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 &#x60;tel:&#x60; call forwards until verified (carrier anti-spoofing); until then forwarded calls show a Zernio number (&#x60;callerIdMode: platform&#x60; 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, &#x60;tel:&#x60; call forwards present the business number itself as caller ID (&#x60;callerIdMode: business&#x60;).
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
@@ -23,13 +23,39 @@ module Zernio
23
23
 
24
24
  attr_accessor :forward_to
25
25
 
26
+ # 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).
27
+ attr_accessor :caller_id_mode
28
+
29
+ class EnumAttributeValidator
30
+ attr_reader :datatype
31
+ attr_reader :allowable_values
32
+
33
+ def initialize(datatype, allowable_values)
34
+ @allowable_values = allowable_values.map do |value|
35
+ case datatype.to_s
36
+ when /Integer/i
37
+ value.to_i
38
+ when /Float/i
39
+ value.to_f
40
+ else
41
+ value
42
+ end
43
+ end
44
+ end
45
+
46
+ def valid?(value)
47
+ !value || allowable_values.include?(value)
48
+ end
49
+ end
50
+
26
51
  # Attribute mapping from ruby-style variable name to JSON key.
27
52
  def self.attribute_map
28
53
  {
29
54
  :'success' => :'success',
30
55
  :'calling_enabled' => :'callingEnabled',
31
56
  :'sip_hostname' => :'sipHostname',
32
- :'forward_to' => :'forwardTo'
57
+ :'forward_to' => :'forwardTo',
58
+ :'caller_id_mode' => :'callerIdMode'
33
59
  }
34
60
  end
35
61
 
@@ -49,7 +75,8 @@ module Zernio
49
75
  :'success' => :'Boolean',
50
76
  :'calling_enabled' => :'Boolean',
51
77
  :'sip_hostname' => :'String',
52
- :'forward_to' => :'String'
78
+ :'forward_to' => :'String',
79
+ :'caller_id_mode' => :'String'
53
80
  }
54
81
  end
55
82
 
@@ -90,6 +117,10 @@ module Zernio
90
117
  if attributes.key?(:'forward_to')
91
118
  self.forward_to = attributes[:'forward_to']
92
119
  end
120
+
121
+ if attributes.key?(:'caller_id_mode')
122
+ self.caller_id_mode = attributes[:'caller_id_mode']
123
+ end
93
124
  end
94
125
 
95
126
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -104,9 +135,21 @@ module Zernio
104
135
  # @return true if the model is valid
105
136
  def valid?
106
137
  warn '[DEPRECATED] the `valid?` method is obsolete'
138
+ caller_id_mode_validator = EnumAttributeValidator.new('String', ["business", "platform"])
139
+ return false unless caller_id_mode_validator.valid?(@caller_id_mode)
107
140
  true
108
141
  end
109
142
 
143
+ # Custom attribute writer method checking allowed values (enum).
144
+ # @param [Object] caller_id_mode Object to be assigned
145
+ def caller_id_mode=(caller_id_mode)
146
+ validator = EnumAttributeValidator.new('String', ["business", "platform"])
147
+ unless validator.valid?(caller_id_mode)
148
+ fail ArgumentError, "invalid value for \"caller_id_mode\", must be one of #{validator.allowable_values}."
149
+ end
150
+ @caller_id_mode = caller_id_mode
151
+ end
152
+
110
153
  # Checks equality by comparing each attribute.
111
154
  # @param [Object] Object to be compared
112
155
  def ==(o)
@@ -115,7 +158,8 @@ module Zernio
115
158
  success == o.success &&
116
159
  calling_enabled == o.calling_enabled &&
117
160
  sip_hostname == o.sip_hostname &&
118
- forward_to == o.forward_to
161
+ forward_to == o.forward_to &&
162
+ caller_id_mode == o.caller_id_mode
119
163
  end
120
164
 
121
165
  # @see the `==` method
@@ -127,7 +171,7 @@ module Zernio
127
171
  # Calculates hash code according to all attributes.
128
172
  # @return [Integer] Hash code
129
173
  def hash
130
- [success, calling_enabled, sip_hostname, forward_to].hash
174
+ [success, calling_enabled, sip_hostname, forward_to, caller_id_mode].hash
131
175
  end
132
176
 
133
177
  # Builds the object from hash