late-sdk 0.0.885 → 0.0.886
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 +6 -0
- data/docs/CreateCommentAutomationRequest.md +1 -1
- data/docs/RegisterWhatsAppNumberRequest.md +1 -1
- data/docs/RequestWhatsAppVerificationCode200Response.md +26 -0
- data/docs/RequestWhatsAppVerificationCodeRequest.md +20 -0
- data/docs/VerifyWhatsAppNumber200Response.md +22 -0
- data/docs/VerifyWhatsAppNumberRequest.md +18 -0
- data/docs/WhatsAppApi.md +146 -0
- data/lib/zernio-sdk/api/whats_app_api.rb +144 -0
- data/lib/zernio-sdk/models/create_comment_automation_request.rb +1 -1
- data/lib/zernio-sdk/models/register_whats_app_number_request.rb +1 -1
- data/lib/zernio-sdk/models/request_whats_app_verification_code200_response.rb +183 -0
- data/lib/zernio-sdk/models/request_whats_app_verification_code_request.rb +195 -0
- data/lib/zernio-sdk/models/verify_whats_app_number200_response.rb +165 -0
- data/lib/zernio-sdk/models/verify_whats_app_number_request.rb +165 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +4 -0
- data/openapi.yaml +120 -2
- data/spec/api/whats_app_api_spec.rb +26 -0
- data/spec/models/request_whats_app_verification_code200_response_spec.rb +60 -0
- data/spec/models/request_whats_app_verification_code_request_spec.rb +46 -0
- data/spec/models/verify_whats_app_number200_response_spec.rb +48 -0
- data/spec/models/verify_whats_app_number_request_spec.rb +36 -0
- data/zernio-sdk-0.0.886.gem +0 -0
- metadata +18 -2
- data/zernio-sdk-0.0.885.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d7378a09c5bdcdd3978b1bdd9e5f840ddcaeae7fc5b45b5141548f98caec6cb7
|
|
4
|
+
data.tar.gz: 6ff1740774c1638c0dbfb2debe93f0102635e1dda6d04de2e449163375445656
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 468d185a712d5f151df32061507b09f12ddfc930879b0ecc3fae651deabb0bdd0c4fae889fa547abac10bacc63b83bd13b1d5679f36c9e3f1b9109f7839bc461
|
|
7
|
+
data.tar.gz: 28024e1c1486bce4c46de6c97b3473350e0b9a13692773579e365bf5b65c1a02932ecd17c01d765c8e0166dabf64f3af4d6c81194ba47669614e952e565824f1
|
data/README.md
CHANGED
|
@@ -679,6 +679,7 @@ Class | Method | HTTP request | Description
|
|
|
679
679
|
*Zernio::WhatsAppApi* | [**register_whats_app_number**](docs/WhatsAppApi.md#register_whats_app_number) | **POST** /v1/accounts/{accountId}/whatsapp/register | Register a connected WhatsApp number on the Cloud API
|
|
680
680
|
*Zernio::WhatsAppApi* | [**reject_whats_app_group_join_requests**](docs/WhatsAppApi.md#reject_whats_app_group_join_requests) | **DELETE** /v1/whatsapp/wa-groups/{groupId}/join-requests | Reject join requests
|
|
681
681
|
*Zernio::WhatsAppApi* | [**remove_whats_app_group_participants**](docs/WhatsAppApi.md#remove_whats_app_group_participants) | **DELETE** /v1/whatsapp/wa-groups/{groupId}/participants | Remove participants
|
|
682
|
+
*Zernio::WhatsAppApi* | [**request_whats_app_verification_code**](docs/WhatsAppApi.md#request_whats_app_verification_code) | **POST** /v1/accounts/{accountId}/whatsapp/request-code | Request a Meta re-verification code for a BYO WhatsApp number
|
|
682
683
|
*Zernio::WhatsAppApi* | [**send_whats_app_conversion**](docs/WhatsAppApi.md#send_whats_app_conversion) | **POST** /v1/whatsapp/conversions | Send WhatsApp conversion event
|
|
683
684
|
*Zernio::WhatsAppApi* | [**set_whatsapp_business_username**](docs/WhatsAppApi.md#set_whatsapp_business_username) | **POST** /v1/whatsapp/business-profile/username | Set business username
|
|
684
685
|
*Zernio::WhatsAppApi* | [**unblock_whats_app_users**](docs/WhatsAppApi.md#unblock_whats_app_users) | **DELETE** /v1/whatsapp/block-users | Unblock users
|
|
@@ -688,6 +689,7 @@ Class | Method | HTTP request | Description
|
|
|
688
689
|
*Zernio::WhatsAppApi* | [**update_whats_app_template**](docs/WhatsAppApi.md#update_whats_app_template) | **PATCH** /v1/whatsapp/templates/{templateName} | Update template
|
|
689
690
|
*Zernio::WhatsAppApi* | [**update_whats_app_template_by_id**](docs/WhatsAppApi.md#update_whats_app_template_by_id) | **PATCH** /v1/whatsapp/templates/id/{templateId} | Update template by id
|
|
690
691
|
*Zernio::WhatsAppApi* | [**upload_whats_app_profile_photo**](docs/WhatsAppApi.md#upload_whats_app_profile_photo) | **POST** /v1/whatsapp/business-profile/photo | Upload profile picture
|
|
692
|
+
*Zernio::WhatsAppApi* | [**verify_whats_app_number**](docs/WhatsAppApi.md#verify_whats_app_number) | **POST** /v1/accounts/{accountId}/whatsapp/verify-code | Verify the Meta re-verification code for a BYO WhatsApp number
|
|
691
693
|
*Zernio::WhatsAppCallingApi* | [**disable_whats_app_calling**](docs/WhatsAppCallingApi.md#disable_whats_app_calling) | **DELETE** /v1/phone-numbers/{id}/whatsapp/calling | Disable calling on a number
|
|
692
694
|
*Zernio::WhatsAppCallingApi* | [**disable_whats_app_calling_legacy**](docs/WhatsAppCallingApi.md#disable_whats_app_calling_legacy) | **DELETE** /v1/whatsapp/phone-numbers/{id}/calling | Disable calling on a number
|
|
693
695
|
*Zernio::WhatsAppCallingApi* | [**enable_whats_app_calling**](docs/WhatsAppCallingApi.md#enable_whats_app_calling) | **POST** /v1/phone-numbers/{id}/whatsapp/calling | Enable calling on a number
|
|
@@ -2047,6 +2049,8 @@ Class | Method | HTTP request | Description
|
|
|
2047
2049
|
- [Zernio::ReplyToPhoneNumberReviewerRequestAttachmentsInner](docs/ReplyToPhoneNumberReviewerRequestAttachmentsInner.md)
|
|
2048
2050
|
- [Zernio::RequestSmsSenderIdLimitIncrease200Response](docs/RequestSmsSenderIdLimitIncrease200Response.md)
|
|
2049
2051
|
- [Zernio::RequestSmsSenderIdLimitIncreaseRequest](docs/RequestSmsSenderIdLimitIncreaseRequest.md)
|
|
2052
|
+
- [Zernio::RequestWhatsAppVerificationCode200Response](docs/RequestWhatsAppVerificationCode200Response.md)
|
|
2053
|
+
- [Zernio::RequestWhatsAppVerificationCodeRequest](docs/RequestWhatsAppVerificationCodeRequest.md)
|
|
2050
2054
|
- [Zernio::ResendSmsRegistrationOtp200Response](docs/ResendSmsRegistrationOtp200Response.md)
|
|
2051
2055
|
- [Zernio::ReserveRfPrediction201Response](docs/ReserveRfPrediction201Response.md)
|
|
2052
2056
|
- [Zernio::ReserveRfPredictionRequest](docs/ReserveRfPredictionRequest.md)
|
|
@@ -2525,6 +2529,8 @@ Class | Method | HTTP request | Description
|
|
|
2525
2529
|
- [Zernio::VerifySmsRegistrationOtp200Response](docs/VerifySmsRegistrationOtp200Response.md)
|
|
2526
2530
|
- [Zernio::VerifySmsRegistrationOtpRequest](docs/VerifySmsRegistrationOtpRequest.md)
|
|
2527
2531
|
- [Zernio::VerifyWhatsAppCallerIdRequest](docs/VerifyWhatsAppCallerIdRequest.md)
|
|
2532
|
+
- [Zernio::VerifyWhatsAppNumber200Response](docs/VerifyWhatsAppNumber200Response.md)
|
|
2533
|
+
- [Zernio::VerifyWhatsAppNumberRequest](docs/VerifyWhatsAppNumberRequest.md)
|
|
2528
2534
|
- [Zernio::VoteRedditThingRequest](docs/VoteRedditThingRequest.md)
|
|
2529
2535
|
- [Zernio::Webhook](docs/Webhook.md)
|
|
2530
2536
|
- [Zernio::WebhookLog](docs/WebhookLog.md)
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
| **account_id** | **String** | Instagram or Facebook account ID | |
|
|
9
9
|
| **trigger** | **String** | What fires the automation. 'comment' (keyword comment on a post) or 'story_reply' (keyword reply to an Instagram story). For 'story_reply', platformPostId is the story media id (omit for any story). | [optional][default to 'comment'] |
|
|
10
10
|
| **platform_post_id** | **String** | Platform media/post ID (or story media id when trigger=story_reply). Omit for an account-wide (any-post / any-story) automation. | [optional] |
|
|
11
|
-
| **post_id** | **String** | Zernio post ID.
|
|
11
|
+
| **post_id** | **String** | Zernio post ID. Optional and never required. Use it INSTEAD of platformPostId to bind a per-post automation to a not-yet-published Zernio post: the automation stays pending and arms itself when that post publishes. For a post already live on the platform, pass platformPostId alone and omit this. | [optional] |
|
|
12
12
|
| **post_title** | **String** | Post content snippet for display | [optional] |
|
|
13
13
|
| **name** | **String** | Automation label | |
|
|
14
14
|
| **keywords** | **Array<String>** | Trigger keywords (empty = any comment triggers) | [optional] |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **pin** | **String** | The 6-digit two-step verification PIN set on the number.
|
|
7
|
+
| **pin** | **String** | The 6-digit two-step verification PIN set on the number. Omitting it applies Zernio's managed default registration PIN, the same one every Embedded Signup connect sets automatically. | [optional] |
|
|
8
8
|
|
|
9
9
|
## Example
|
|
10
10
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Zernio::RequestWhatsAppVerificationCode200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **requested** | **Boolean** | | [optional] |
|
|
8
|
+
| **already_active** | **Boolean** | | [optional] |
|
|
9
|
+
| **method** | **String** | | [optional] |
|
|
10
|
+
| **account_id** | **String** | | [optional] |
|
|
11
|
+
| **phone_number_id** | **String** | | [optional] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'zernio-sdk'
|
|
17
|
+
|
|
18
|
+
instance = Zernio::RequestWhatsAppVerificationCode200Response.new(
|
|
19
|
+
requested: null,
|
|
20
|
+
already_active: null,
|
|
21
|
+
method: null,
|
|
22
|
+
account_id: null,
|
|
23
|
+
phone_number_id: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::RequestWhatsAppVerificationCodeRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **method** | **String** | | [optional][default to 'SMS'] |
|
|
8
|
+
| **language** | **String** | Meta locale code for the verification message, e.g. en_US. | [optional][default to 'en_US'] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::RequestWhatsAppVerificationCodeRequest.new(
|
|
16
|
+
method: null,
|
|
17
|
+
language: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::VerifyWhatsAppNumber200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **verified** | **Boolean** | | [optional] |
|
|
8
|
+
| **account_id** | **String** | | [optional] |
|
|
9
|
+
| **phone_number_id** | **String** | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::VerifyWhatsAppNumber200Response.new(
|
|
17
|
+
verified: null,
|
|
18
|
+
account_id: null,
|
|
19
|
+
phone_number_id: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Zernio::VerifyWhatsAppNumberRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **code** | **String** | The 6-digit code Meta sent to the phone. Non-digit separators (e.g. \"749-456\") are stripped automatically. | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'zernio-sdk'
|
|
13
|
+
|
|
14
|
+
instance = Zernio::VerifyWhatsAppNumberRequest.new(
|
|
15
|
+
code: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
data/docs/WhatsAppApi.md
CHANGED
|
@@ -34,6 +34,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
34
34
|
| [**register_whats_app_number**](WhatsAppApi.md#register_whats_app_number) | **POST** /v1/accounts/{accountId}/whatsapp/register | Register a connected WhatsApp number on the Cloud API |
|
|
35
35
|
| [**reject_whats_app_group_join_requests**](WhatsAppApi.md#reject_whats_app_group_join_requests) | **DELETE** /v1/whatsapp/wa-groups/{groupId}/join-requests | Reject join requests |
|
|
36
36
|
| [**remove_whats_app_group_participants**](WhatsAppApi.md#remove_whats_app_group_participants) | **DELETE** /v1/whatsapp/wa-groups/{groupId}/participants | Remove participants |
|
|
37
|
+
| [**request_whats_app_verification_code**](WhatsAppApi.md#request_whats_app_verification_code) | **POST** /v1/accounts/{accountId}/whatsapp/request-code | Request a Meta re-verification code for a BYO WhatsApp number |
|
|
37
38
|
| [**send_whats_app_conversion**](WhatsAppApi.md#send_whats_app_conversion) | **POST** /v1/whatsapp/conversions | Send WhatsApp conversion event |
|
|
38
39
|
| [**set_whatsapp_business_username**](WhatsAppApi.md#set_whatsapp_business_username) | **POST** /v1/whatsapp/business-profile/username | Set business username |
|
|
39
40
|
| [**unblock_whats_app_users**](WhatsAppApi.md#unblock_whats_app_users) | **DELETE** /v1/whatsapp/block-users | Unblock users |
|
|
@@ -43,6 +44,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
43
44
|
| [**update_whats_app_template**](WhatsAppApi.md#update_whats_app_template) | **PATCH** /v1/whatsapp/templates/{templateName} | Update template |
|
|
44
45
|
| [**update_whats_app_template_by_id**](WhatsAppApi.md#update_whats_app_template_by_id) | **PATCH** /v1/whatsapp/templates/id/{templateId} | Update template by id |
|
|
45
46
|
| [**upload_whats_app_profile_photo**](WhatsAppApi.md#upload_whats_app_profile_photo) | **POST** /v1/whatsapp/business-profile/photo | Upload profile picture |
|
|
47
|
+
| [**verify_whats_app_number**](WhatsAppApi.md#verify_whats_app_number) | **POST** /v1/accounts/{accountId}/whatsapp/verify-code | Verify the Meta re-verification code for a BYO WhatsApp number |
|
|
46
48
|
|
|
47
49
|
|
|
48
50
|
## add_whats_app_group_participants
|
|
@@ -2191,6 +2193,79 @@ end
|
|
|
2191
2193
|
- **Accept**: application/json
|
|
2192
2194
|
|
|
2193
2195
|
|
|
2196
|
+
## request_whats_app_verification_code
|
|
2197
|
+
|
|
2198
|
+
> <RequestWhatsAppVerificationCode200Response> request_whats_app_verification_code(account_id, opts)
|
|
2199
|
+
|
|
2200
|
+
Request a Meta re-verification code for a BYO WhatsApp number
|
|
2201
|
+
|
|
2202
|
+
For a bring-your-own WhatsApp number (its own WABA, migrated off another BSP) that Meta demoted to re-verification, this requests a new OTP from Meta. The code lands on the customer's own handset, so verifying it is necessarily self-service; call POST /v1/accounts/{accountId}/whatsapp/verify-code with the code once it arrives. Rate-limited to one request per 10 minutes per account, and Meta enforces its own cooldown on top of that.
|
|
2203
|
+
|
|
2204
|
+
### Examples
|
|
2205
|
+
|
|
2206
|
+
```ruby
|
|
2207
|
+
require 'time'
|
|
2208
|
+
require 'zernio-sdk'
|
|
2209
|
+
# setup authorization
|
|
2210
|
+
Zernio.configure do |config|
|
|
2211
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
2212
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
2213
|
+
end
|
|
2214
|
+
|
|
2215
|
+
api_instance = Zernio::WhatsAppApi.new
|
|
2216
|
+
account_id = 'account_id_example' # String | The WhatsApp account ID
|
|
2217
|
+
opts = {
|
|
2218
|
+
request_whats_app_verification_code_request: Zernio::RequestWhatsAppVerificationCodeRequest.new # RequestWhatsAppVerificationCodeRequest |
|
|
2219
|
+
}
|
|
2220
|
+
|
|
2221
|
+
begin
|
|
2222
|
+
# Request a Meta re-verification code for a BYO WhatsApp number
|
|
2223
|
+
result = api_instance.request_whats_app_verification_code(account_id, opts)
|
|
2224
|
+
p result
|
|
2225
|
+
rescue Zernio::ApiError => e
|
|
2226
|
+
puts "Error when calling WhatsAppApi->request_whats_app_verification_code: #{e}"
|
|
2227
|
+
end
|
|
2228
|
+
```
|
|
2229
|
+
|
|
2230
|
+
#### Using the request_whats_app_verification_code_with_http_info variant
|
|
2231
|
+
|
|
2232
|
+
This returns an Array which contains the response data, status code and headers.
|
|
2233
|
+
|
|
2234
|
+
> <Array(<RequestWhatsAppVerificationCode200Response>, Integer, Hash)> request_whats_app_verification_code_with_http_info(account_id, opts)
|
|
2235
|
+
|
|
2236
|
+
```ruby
|
|
2237
|
+
begin
|
|
2238
|
+
# Request a Meta re-verification code for a BYO WhatsApp number
|
|
2239
|
+
data, status_code, headers = api_instance.request_whats_app_verification_code_with_http_info(account_id, opts)
|
|
2240
|
+
p status_code # => 2xx
|
|
2241
|
+
p headers # => { ... }
|
|
2242
|
+
p data # => <RequestWhatsAppVerificationCode200Response>
|
|
2243
|
+
rescue Zernio::ApiError => e
|
|
2244
|
+
puts "Error when calling WhatsAppApi->request_whats_app_verification_code_with_http_info: #{e}"
|
|
2245
|
+
end
|
|
2246
|
+
```
|
|
2247
|
+
|
|
2248
|
+
### Parameters
|
|
2249
|
+
|
|
2250
|
+
| Name | Type | Description | Notes |
|
|
2251
|
+
| ---- | ---- | ----------- | ----- |
|
|
2252
|
+
| **account_id** | **String** | The WhatsApp account ID | |
|
|
2253
|
+
| **request_whats_app_verification_code_request** | [**RequestWhatsAppVerificationCodeRequest**](RequestWhatsAppVerificationCodeRequest.md) | | [optional] |
|
|
2254
|
+
|
|
2255
|
+
### Return type
|
|
2256
|
+
|
|
2257
|
+
[**RequestWhatsAppVerificationCode200Response**](RequestWhatsAppVerificationCode200Response.md)
|
|
2258
|
+
|
|
2259
|
+
### Authorization
|
|
2260
|
+
|
|
2261
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
2262
|
+
|
|
2263
|
+
### HTTP request headers
|
|
2264
|
+
|
|
2265
|
+
- **Content-Type**: application/json
|
|
2266
|
+
- **Accept**: application/json
|
|
2267
|
+
|
|
2268
|
+
|
|
2194
2269
|
## send_whats_app_conversion
|
|
2195
2270
|
|
|
2196
2271
|
> <SendWhatsAppConversion200Response> send_whats_app_conversion(send_whats_app_conversion_request)
|
|
@@ -2821,3 +2896,74 @@ end
|
|
|
2821
2896
|
- **Content-Type**: multipart/form-data, application/json
|
|
2822
2897
|
- **Accept**: application/json
|
|
2823
2898
|
|
|
2899
|
+
|
|
2900
|
+
## verify_whats_app_number
|
|
2901
|
+
|
|
2902
|
+
> <VerifyWhatsAppNumber200Response> verify_whats_app_number(account_id, verify_whats_app_number_request)
|
|
2903
|
+
|
|
2904
|
+
Verify the Meta re-verification code for a BYO WhatsApp number
|
|
2905
|
+
|
|
2906
|
+
Submits the OTP Meta sent in response to POST /v1/accounts/{accountId}/whatsapp/request-code. This only verifies the number with Meta; it does not register it on the Cloud API. Call POST /v1/accounts/{accountId}/whatsapp/register afterward to complete activation.
|
|
2907
|
+
|
|
2908
|
+
### Examples
|
|
2909
|
+
|
|
2910
|
+
```ruby
|
|
2911
|
+
require 'time'
|
|
2912
|
+
require 'zernio-sdk'
|
|
2913
|
+
# setup authorization
|
|
2914
|
+
Zernio.configure do |config|
|
|
2915
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
2916
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
2917
|
+
end
|
|
2918
|
+
|
|
2919
|
+
api_instance = Zernio::WhatsAppApi.new
|
|
2920
|
+
account_id = 'account_id_example' # String | The WhatsApp account ID
|
|
2921
|
+
verify_whats_app_number_request = Zernio::VerifyWhatsAppNumberRequest.new({code: 'code_example'}) # VerifyWhatsAppNumberRequest |
|
|
2922
|
+
|
|
2923
|
+
begin
|
|
2924
|
+
# Verify the Meta re-verification code for a BYO WhatsApp number
|
|
2925
|
+
result = api_instance.verify_whats_app_number(account_id, verify_whats_app_number_request)
|
|
2926
|
+
p result
|
|
2927
|
+
rescue Zernio::ApiError => e
|
|
2928
|
+
puts "Error when calling WhatsAppApi->verify_whats_app_number: #{e}"
|
|
2929
|
+
end
|
|
2930
|
+
```
|
|
2931
|
+
|
|
2932
|
+
#### Using the verify_whats_app_number_with_http_info variant
|
|
2933
|
+
|
|
2934
|
+
This returns an Array which contains the response data, status code and headers.
|
|
2935
|
+
|
|
2936
|
+
> <Array(<VerifyWhatsAppNumber200Response>, Integer, Hash)> verify_whats_app_number_with_http_info(account_id, verify_whats_app_number_request)
|
|
2937
|
+
|
|
2938
|
+
```ruby
|
|
2939
|
+
begin
|
|
2940
|
+
# Verify the Meta re-verification code for a BYO WhatsApp number
|
|
2941
|
+
data, status_code, headers = api_instance.verify_whats_app_number_with_http_info(account_id, verify_whats_app_number_request)
|
|
2942
|
+
p status_code # => 2xx
|
|
2943
|
+
p headers # => { ... }
|
|
2944
|
+
p data # => <VerifyWhatsAppNumber200Response>
|
|
2945
|
+
rescue Zernio::ApiError => e
|
|
2946
|
+
puts "Error when calling WhatsAppApi->verify_whats_app_number_with_http_info: #{e}"
|
|
2947
|
+
end
|
|
2948
|
+
```
|
|
2949
|
+
|
|
2950
|
+
### Parameters
|
|
2951
|
+
|
|
2952
|
+
| Name | Type | Description | Notes |
|
|
2953
|
+
| ---- | ---- | ----------- | ----- |
|
|
2954
|
+
| **account_id** | **String** | The WhatsApp account ID | |
|
|
2955
|
+
| **verify_whats_app_number_request** | [**VerifyWhatsAppNumberRequest**](VerifyWhatsAppNumberRequest.md) | | |
|
|
2956
|
+
|
|
2957
|
+
### Return type
|
|
2958
|
+
|
|
2959
|
+
[**VerifyWhatsAppNumber200Response**](VerifyWhatsAppNumber200Response.md)
|
|
2960
|
+
|
|
2961
|
+
### Authorization
|
|
2962
|
+
|
|
2963
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
2964
|
+
|
|
2965
|
+
### HTTP request headers
|
|
2966
|
+
|
|
2967
|
+
- **Content-Type**: application/json
|
|
2968
|
+
- **Accept**: application/json
|
|
2969
|
+
|
|
@@ -2159,6 +2159,76 @@ module Zernio
|
|
|
2159
2159
|
return data, status_code, headers
|
|
2160
2160
|
end
|
|
2161
2161
|
|
|
2162
|
+
# Request a Meta re-verification code for a BYO WhatsApp number
|
|
2163
|
+
# For a bring-your-own WhatsApp number (its own WABA, migrated off another BSP) that Meta demoted to re-verification, this requests a new OTP from Meta. The code lands on the customer's own handset, so verifying it is necessarily self-service; call POST /v1/accounts/{accountId}/whatsapp/verify-code with the code once it arrives. Rate-limited to one request per 10 minutes per account, and Meta enforces its own cooldown on top of that.
|
|
2164
|
+
# @param account_id [String] The WhatsApp account ID
|
|
2165
|
+
# @param [Hash] opts the optional parameters
|
|
2166
|
+
# @option opts [RequestWhatsAppVerificationCodeRequest] :request_whats_app_verification_code_request
|
|
2167
|
+
# @return [RequestWhatsAppVerificationCode200Response]
|
|
2168
|
+
def request_whats_app_verification_code(account_id, opts = {})
|
|
2169
|
+
data, _status_code, _headers = request_whats_app_verification_code_with_http_info(account_id, opts)
|
|
2170
|
+
data
|
|
2171
|
+
end
|
|
2172
|
+
|
|
2173
|
+
# Request a Meta re-verification code for a BYO WhatsApp number
|
|
2174
|
+
# For a bring-your-own WhatsApp number (its own WABA, migrated off another BSP) that Meta demoted to re-verification, this requests a new OTP from Meta. The code lands on the customer's own handset, so verifying it is necessarily self-service; call POST /v1/accounts/{accountId}/whatsapp/verify-code with the code once it arrives. Rate-limited to one request per 10 minutes per account, and Meta enforces its own cooldown on top of that.
|
|
2175
|
+
# @param account_id [String] The WhatsApp account ID
|
|
2176
|
+
# @param [Hash] opts the optional parameters
|
|
2177
|
+
# @option opts [RequestWhatsAppVerificationCodeRequest] :request_whats_app_verification_code_request
|
|
2178
|
+
# @return [Array<(RequestWhatsAppVerificationCode200Response, Integer, Hash)>] RequestWhatsAppVerificationCode200Response data, response status code and response headers
|
|
2179
|
+
def request_whats_app_verification_code_with_http_info(account_id, opts = {})
|
|
2180
|
+
if @api_client.config.debugging
|
|
2181
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppApi.request_whats_app_verification_code ...'
|
|
2182
|
+
end
|
|
2183
|
+
# verify the required parameter 'account_id' is set
|
|
2184
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
2185
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.request_whats_app_verification_code"
|
|
2186
|
+
end
|
|
2187
|
+
# resource path
|
|
2188
|
+
local_var_path = '/v1/accounts/{accountId}/whatsapp/request-code'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
2189
|
+
|
|
2190
|
+
# query parameters
|
|
2191
|
+
query_params = opts[:query_params] || {}
|
|
2192
|
+
|
|
2193
|
+
# header parameters
|
|
2194
|
+
header_params = opts[:header_params] || {}
|
|
2195
|
+
# HTTP header 'Accept' (if needed)
|
|
2196
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2197
|
+
# HTTP header 'Content-Type'
|
|
2198
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2199
|
+
if !content_type.nil?
|
|
2200
|
+
header_params['Content-Type'] = content_type
|
|
2201
|
+
end
|
|
2202
|
+
|
|
2203
|
+
# form parameters
|
|
2204
|
+
form_params = opts[:form_params] || {}
|
|
2205
|
+
|
|
2206
|
+
# http body (model)
|
|
2207
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_whats_app_verification_code_request'])
|
|
2208
|
+
|
|
2209
|
+
# return_type
|
|
2210
|
+
return_type = opts[:debug_return_type] || 'RequestWhatsAppVerificationCode200Response'
|
|
2211
|
+
|
|
2212
|
+
# auth_names
|
|
2213
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2214
|
+
|
|
2215
|
+
new_options = opts.merge(
|
|
2216
|
+
:operation => :"WhatsAppApi.request_whats_app_verification_code",
|
|
2217
|
+
:header_params => header_params,
|
|
2218
|
+
:query_params => query_params,
|
|
2219
|
+
:form_params => form_params,
|
|
2220
|
+
:body => post_body,
|
|
2221
|
+
:auth_names => auth_names,
|
|
2222
|
+
:return_type => return_type
|
|
2223
|
+
)
|
|
2224
|
+
|
|
2225
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2226
|
+
if @api_client.config.debugging
|
|
2227
|
+
@api_client.config.logger.debug "API called: WhatsAppApi#request_whats_app_verification_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2228
|
+
end
|
|
2229
|
+
return data, status_code, headers
|
|
2230
|
+
end
|
|
2231
|
+
|
|
2162
2232
|
# Send WhatsApp conversion event
|
|
2163
2233
|
# Forward a WhatsApp Business Messaging conversion event (`LeadSubmitted`, `Purchase`, `AddToCart`, `InitiateCheckout`, `ViewContent`) to Meta's Conversions API with `action_source = business_messaging` and `messaging_channel = whatsapp`. The endpoint looks up the originating CTWA click ID (`ctwa_clid`) captured on the first inbound message of the conversation and replays it on every event so Meta can attribute the conversion back to the Click-to-WhatsApp ad that drove the chat. Configuration prerequisite on the WhatsApp account metadata: - `metaCapiDatasetId`: the Meta dataset ID linked to the WABA. Provision one with `POST /v1/whatsapp/dataset`. The WABA ID (already set automatically at connect time) is forwarded as `user_data.whatsapp_business_account_id`, which is the per-channel attribution identifier Meta requires for WhatsApp events. No Facebook Page ID is needed (that field is the Messenger-branch identifier). Identify the conversation by either `conversationId` (preferred) or `phoneE164` (digits only, no `+`). At least one is required. If the conversation has no captured `ctwa_clid`, the request returns 422 because there is nothing to attribute. Token and dataset coupling: the WhatsApp account's accessToken must have access to the configured `metaCapiDatasetId`. By default a WABA's system-user token is scoped to the WABA's own Business Manager and cannot post to a pixel owned by a different Business; Meta returns code 100 in that case. Either share the dataset with the WhatsApp app's Business in BM, or use a dataset already in the same Business as the WABA.
|
|
2164
2234
|
# @param send_whats_app_conversion_request [SendWhatsAppConversionRequest]
|
|
@@ -2803,5 +2873,79 @@ module Zernio
|
|
|
2803
2873
|
end
|
|
2804
2874
|
return data, status_code, headers
|
|
2805
2875
|
end
|
|
2876
|
+
|
|
2877
|
+
# Verify the Meta re-verification code for a BYO WhatsApp number
|
|
2878
|
+
# Submits the OTP Meta sent in response to POST /v1/accounts/{accountId}/whatsapp/request-code. This only verifies the number with Meta; it does not register it on the Cloud API. Call POST /v1/accounts/{accountId}/whatsapp/register afterward to complete activation.
|
|
2879
|
+
# @param account_id [String] The WhatsApp account ID
|
|
2880
|
+
# @param verify_whats_app_number_request [VerifyWhatsAppNumberRequest]
|
|
2881
|
+
# @param [Hash] opts the optional parameters
|
|
2882
|
+
# @return [VerifyWhatsAppNumber200Response]
|
|
2883
|
+
def verify_whats_app_number(account_id, verify_whats_app_number_request, opts = {})
|
|
2884
|
+
data, _status_code, _headers = verify_whats_app_number_with_http_info(account_id, verify_whats_app_number_request, opts)
|
|
2885
|
+
data
|
|
2886
|
+
end
|
|
2887
|
+
|
|
2888
|
+
# Verify the Meta re-verification code for a BYO WhatsApp number
|
|
2889
|
+
# Submits the OTP Meta sent in response to POST /v1/accounts/{accountId}/whatsapp/request-code. This only verifies the number with Meta; it does not register it on the Cloud API. Call POST /v1/accounts/{accountId}/whatsapp/register afterward to complete activation.
|
|
2890
|
+
# @param account_id [String] The WhatsApp account ID
|
|
2891
|
+
# @param verify_whats_app_number_request [VerifyWhatsAppNumberRequest]
|
|
2892
|
+
# @param [Hash] opts the optional parameters
|
|
2893
|
+
# @return [Array<(VerifyWhatsAppNumber200Response, Integer, Hash)>] VerifyWhatsAppNumber200Response data, response status code and response headers
|
|
2894
|
+
def verify_whats_app_number_with_http_info(account_id, verify_whats_app_number_request, opts = {})
|
|
2895
|
+
if @api_client.config.debugging
|
|
2896
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppApi.verify_whats_app_number ...'
|
|
2897
|
+
end
|
|
2898
|
+
# verify the required parameter 'account_id' is set
|
|
2899
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
2900
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.verify_whats_app_number"
|
|
2901
|
+
end
|
|
2902
|
+
# verify the required parameter 'verify_whats_app_number_request' is set
|
|
2903
|
+
if @api_client.config.client_side_validation && verify_whats_app_number_request.nil?
|
|
2904
|
+
fail ArgumentError, "Missing the required parameter 'verify_whats_app_number_request' when calling WhatsAppApi.verify_whats_app_number"
|
|
2905
|
+
end
|
|
2906
|
+
# resource path
|
|
2907
|
+
local_var_path = '/v1/accounts/{accountId}/whatsapp/verify-code'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
2908
|
+
|
|
2909
|
+
# query parameters
|
|
2910
|
+
query_params = opts[:query_params] || {}
|
|
2911
|
+
|
|
2912
|
+
# header parameters
|
|
2913
|
+
header_params = opts[:header_params] || {}
|
|
2914
|
+
# HTTP header 'Accept' (if needed)
|
|
2915
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2916
|
+
# HTTP header 'Content-Type'
|
|
2917
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2918
|
+
if !content_type.nil?
|
|
2919
|
+
header_params['Content-Type'] = content_type
|
|
2920
|
+
end
|
|
2921
|
+
|
|
2922
|
+
# form parameters
|
|
2923
|
+
form_params = opts[:form_params] || {}
|
|
2924
|
+
|
|
2925
|
+
# http body (model)
|
|
2926
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(verify_whats_app_number_request)
|
|
2927
|
+
|
|
2928
|
+
# return_type
|
|
2929
|
+
return_type = opts[:debug_return_type] || 'VerifyWhatsAppNumber200Response'
|
|
2930
|
+
|
|
2931
|
+
# auth_names
|
|
2932
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2933
|
+
|
|
2934
|
+
new_options = opts.merge(
|
|
2935
|
+
:operation => :"WhatsAppApi.verify_whats_app_number",
|
|
2936
|
+
:header_params => header_params,
|
|
2937
|
+
:query_params => query_params,
|
|
2938
|
+
:form_params => form_params,
|
|
2939
|
+
:body => post_body,
|
|
2940
|
+
:auth_names => auth_names,
|
|
2941
|
+
:return_type => return_type
|
|
2942
|
+
)
|
|
2943
|
+
|
|
2944
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2945
|
+
if @api_client.config.debugging
|
|
2946
|
+
@api_client.config.logger.debug "API called: WhatsAppApi#verify_whats_app_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2947
|
+
end
|
|
2948
|
+
return data, status_code, headers
|
|
2949
|
+
end
|
|
2806
2950
|
end
|
|
2807
2951
|
end
|
|
@@ -26,7 +26,7 @@ module Zernio
|
|
|
26
26
|
# Platform media/post ID (or story media id when trigger=story_reply). Omit for an account-wide (any-post / any-story) automation.
|
|
27
27
|
attr_accessor :platform_post_id
|
|
28
28
|
|
|
29
|
-
# Zernio post ID.
|
|
29
|
+
# Zernio post ID. Optional and never required. Use it INSTEAD of platformPostId to bind a per-post automation to a not-yet-published Zernio post: the automation stays pending and arms itself when that post publishes. For a post already live on the platform, pass platformPostId alone and omit this.
|
|
30
30
|
attr_accessor :post_id
|
|
31
31
|
|
|
32
32
|
# Post content snippet for display
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
17
|
class RegisterWhatsAppNumberRequest < ApiModelBase
|
|
18
|
-
# The 6-digit two-step verification PIN set on the number.
|
|
18
|
+
# The 6-digit two-step verification PIN set on the number. Omitting it applies Zernio's managed default registration PIN, the same one every Embedded Signup connect sets automatically.
|
|
19
19
|
attr_accessor :pin
|
|
20
20
|
|
|
21
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|