late-sdk 0.0.885 → 0.0.887
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/AdCampaignsApi.md +1 -1
- 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/SendInboxMessage400Response.md +5 -1
- data/docs/VerifyWhatsAppNumber200Response.md +22 -0
- data/docs/VerifyWhatsAppNumberRequest.md +18 -0
- data/docs/WhatsAppApi.md +146 -0
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +2 -2
- 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/send_inbox_message400_response.rb +36 -4
- data/lib/zernio-sdk/models/update_ad_request_targeting.rb +1 -1
- 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 +144 -12
- data/spec/api/ad_campaigns_api_spec.rb +1 -1
- 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/send_inbox_message400_response_spec.rb +17 -1
- 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.887.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: 0e52d92983c6d3599ba3581d272f188042d0cba4045c02523fc2a6b1b93e8975
|
|
4
|
+
data.tar.gz: d1f4b1aa64d9c967805d730f524303399422e530ad38e32716d525342f36e168
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 877eed765d2f687b820e181e038b5dfe6974aecf4f517c4acecf54c5eb6a0e011e5206bcf283aa8b16baf8803e53743a2d7a27efde3fd022bc3e8874d27bfe6f
|
|
7
|
+
data.tar.gz: f252e5a141cb879e3ddf9b7f7c2d4460cc568fadd3297a92e514a226113809d3275b430f78edeec6b9d6e3fc79d1d1039ccbf9411f671cb1255cbdb879623c06
|
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)
|
data/docs/AdCampaignsApi.md
CHANGED
|
@@ -2183,7 +2183,7 @@ end
|
|
|
2183
2183
|
|
|
2184
2184
|
Update ad
|
|
2185
2185
|
|
|
2186
|
-
Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via `/v2/adgroup/update/`), and creative (via `/v2/ad/update/` patch-style: `headline` is ignored, `body` becomes `ad_text`). - **Google**: status, budget, KEYWORD edits via `targeting.keywords` / `targeting.negativeKeywords`, and DEVICE bid adjustments via `targeting.devices`. Each list you send becomes the FULL new set of its kind (criteria not in the list are removed); a kind left out is untouched. Any other `targeting` field returns 400: Google cannot mutate broad targeting post-create without recreating the campaign. `creative` returns 501. - **LinkedIn**: status, budget, targeting (
|
|
2186
|
+
Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via `/v2/adgroup/update/`), and creative (via `/v2/ad/update/` patch-style: `headline` is ignored, `body` becomes `ad_text`). - **Google**: status, budget, KEYWORD edits via `targeting.keywords` / `targeting.negativeKeywords`, and DEVICE bid adjustments via `targeting.devices`. Each list you send becomes the FULL new set of its kind (criteria not in the list are removed); a kind left out is untouched. Any other `targeting` field returns 400: Google cannot mutate broad targeting post-create without recreating the campaign. `creative` returns 501. - **LinkedIn**: status, budget, targeting (countries or regions, excludedLocations (countries), the B2B facets, and audience segments; applied to the LinkedIn Campaign via PARTIAL_UPDATE, and REPLACES the campaign's entire targetingCriteria, not a merge), and creative (uploads new media, creates a replacement inline creative on the same campaign, pauses the old one). - **Pinterest / X / OpenAI Ads**: status + budget only. Sending `targeting` or `creative` returns 501 with code `unsupported_platform_operation`. OpenAI Ads budget is lifetime-only (see `budget.type` below). **Google keyword replacement:** These edits affect the ad's entire ad group, including sibling ads. Positive (`targeting.keywords`) and negative (`targeting.negativeKeywords`) sets are independent: omit a field to leave that set unchanged, or send `[]` to remove every keyword of that kind. Zernio compares each supplied set with Google's live criteria by case-insensitive keyword text and match type. A matching criterion is left untouched, retaining its criterion ID, enabled/paused status, keyword-level bid overrides, labels, and criterion-associated history/statistics. Zernio does not reset its quality score; Google continues to calculate scores and statistics normally. Text comparison does not trim whitespace. A bare string or an object without `matchType` means `broad`, not the existing criterion's match type. For example, resending an existing `{ \"text\": \"plumber\", \"matchType\": \"exact\" }` preserves it; sending `\"plumber\"` instead removes that EXACT criterion and requests a BROAD one. Changing text or match type removes criteria no longer requested and creates any missing criteria. New criteria get new IDs and do not inherit removed criteria's bid overrides, labels, or history. Historical reporting for a removed criterion is not transferred to its replacement. To add keywords without replacing a set, use [POST /v1/ads/keywords](https://docs.zernio.com/ad-campaigns/add-ad-keywords). Use `PATCH /v1/ads/keywords/{keywordId}` to pause/enable one keyword, or `DELETE /v1/ads/keywords/{keywordId}` to remove it.
|
|
2187
2187
|
|
|
2188
2188
|
### Examples
|
|
2189
2189
|
|
|
@@ -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
|
+
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **error** | **String** | | [optional] |
|
|
8
|
-
| **
|
|
8
|
+
| **type** | **String** | Present on Meta pass-through rejections: platform_error when Meta rejected the send (see platform/platformError below), invalid_request_error for validation failures. | [optional] |
|
|
9
|
+
| **code** | **String** | Stable machine-readable reason. PLATFORM_LIMITATION covers a capability the platform does not offer (e.g. Bluesky and Reddit DMs reject media); MISSING_PARTICIPANT means the stored conversation has no recipient to send to; DIRECT_SEND_NOT_ELIGIBLE and DIRECT_SEND_BLOCKED mean the WhatsApp Business Account needs Meta to grant or restore Direct Send access; DIRECT_SEND_LIMITED is temporary, Meta lifts it on its own; platform_api_error means Meta itself rejected the send (see platformError). | [optional] |
|
|
10
|
+
| **platform** | **String** | Present alongside code platform_api_error. The platform that rejected the send (e.g. instagram, facebook). | [optional] |
|
|
9
11
|
| **platform_error** | [**SendInboxMessage400ResponsePlatformError**](SendInboxMessage400ResponsePlatformError.md) | | [optional] |
|
|
10
12
|
|
|
11
13
|
## Example
|
|
@@ -15,7 +17,9 @@ require 'zernio-sdk'
|
|
|
15
17
|
|
|
16
18
|
instance = Zernio::SendInboxMessage400Response.new(
|
|
17
19
|
error: null,
|
|
20
|
+
type: null,
|
|
18
21
|
code: null,
|
|
22
|
+
platform: null,
|
|
19
23
|
platform_error: null
|
|
20
24
|
)
|
|
21
25
|
```
|
|
@@ -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
|
+
|
|
@@ -2264,7 +2264,7 @@ module Zernio
|
|
|
2264
2264
|
end
|
|
2265
2265
|
|
|
2266
2266
|
# Update ad
|
|
2267
|
-
# Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via `/v2/adgroup/update/`), and creative (via `/v2/ad/update/` patch-style: `headline` is ignored, `body` becomes `ad_text`). - **Google**: status, budget, KEYWORD edits via `targeting.keywords` / `targeting.negativeKeywords`, and DEVICE bid adjustments via `targeting.devices`. Each list you send becomes the FULL new set of its kind (criteria not in the list are removed); a kind left out is untouched. Any other `targeting` field returns 400: Google cannot mutate broad targeting post-create without recreating the campaign. `creative` returns 501. - **LinkedIn**: status, budget, targeting (
|
|
2267
|
+
# Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via `/v2/adgroup/update/`), and creative (via `/v2/ad/update/` patch-style: `headline` is ignored, `body` becomes `ad_text`). - **Google**: status, budget, KEYWORD edits via `targeting.keywords` / `targeting.negativeKeywords`, and DEVICE bid adjustments via `targeting.devices`. Each list you send becomes the FULL new set of its kind (criteria not in the list are removed); a kind left out is untouched. Any other `targeting` field returns 400: Google cannot mutate broad targeting post-create without recreating the campaign. `creative` returns 501. - **LinkedIn**: status, budget, targeting (countries or regions, excludedLocations (countries), the B2B facets, and audience segments; applied to the LinkedIn Campaign via PARTIAL_UPDATE, and REPLACES the campaign's entire targetingCriteria, not a merge), and creative (uploads new media, creates a replacement inline creative on the same campaign, pauses the old one). - **Pinterest / X / OpenAI Ads**: status + budget only. Sending `targeting` or `creative` returns 501 with code `unsupported_platform_operation`. OpenAI Ads budget is lifetime-only (see `budget.type` below). **Google keyword replacement:** These edits affect the ad's entire ad group, including sibling ads. Positive (`targeting.keywords`) and negative (`targeting.negativeKeywords`) sets are independent: omit a field to leave that set unchanged, or send `[]` to remove every keyword of that kind. Zernio compares each supplied set with Google's live criteria by case-insensitive keyword text and match type. A matching criterion is left untouched, retaining its criterion ID, enabled/paused status, keyword-level bid overrides, labels, and criterion-associated history/statistics. Zernio does not reset its quality score; Google continues to calculate scores and statistics normally. Text comparison does not trim whitespace. A bare string or an object without `matchType` means `broad`, not the existing criterion's match type. For example, resending an existing `{ \"text\": \"plumber\", \"matchType\": \"exact\" }` preserves it; sending `\"plumber\"` instead removes that EXACT criterion and requests a BROAD one. Changing text or match type removes criteria no longer requested and creates any missing criteria. New criteria get new IDs and do not inherit removed criteria's bid overrides, labels, or history. Historical reporting for a removed criterion is not transferred to its replacement. To add keywords without replacing a set, use [POST /v1/ads/keywords](https://docs.zernio.com/ad-campaigns/add-ad-keywords). Use `PATCH /v1/ads/keywords/{keywordId}` to pause/enable one keyword, or `DELETE /v1/ads/keywords/{keywordId}` to remove it.
|
|
2268
2268
|
# @param ad_id [String]
|
|
2269
2269
|
# @param update_ad_request [UpdateAdRequest]
|
|
2270
2270
|
# @param [Hash] opts the optional parameters
|
|
@@ -2275,7 +2275,7 @@ module Zernio
|
|
|
2275
2275
|
end
|
|
2276
2276
|
|
|
2277
2277
|
# Update ad
|
|
2278
|
-
# Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via `/v2/adgroup/update/`), and creative (via `/v2/ad/update/` patch-style: `headline` is ignored, `body` becomes `ad_text`). - **Google**: status, budget, KEYWORD edits via `targeting.keywords` / `targeting.negativeKeywords`, and DEVICE bid adjustments via `targeting.devices`. Each list you send becomes the FULL new set of its kind (criteria not in the list are removed); a kind left out is untouched. Any other `targeting` field returns 400: Google cannot mutate broad targeting post-create without recreating the campaign. `creative` returns 501. - **LinkedIn**: status, budget, targeting (
|
|
2278
|
+
# Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via `/v2/adgroup/update/`), and creative (via `/v2/ad/update/` patch-style: `headline` is ignored, `body` becomes `ad_text`). - **Google**: status, budget, KEYWORD edits via `targeting.keywords` / `targeting.negativeKeywords`, and DEVICE bid adjustments via `targeting.devices`. Each list you send becomes the FULL new set of its kind (criteria not in the list are removed); a kind left out is untouched. Any other `targeting` field returns 400: Google cannot mutate broad targeting post-create without recreating the campaign. `creative` returns 501. - **LinkedIn**: status, budget, targeting (countries or regions, excludedLocations (countries), the B2B facets, and audience segments; applied to the LinkedIn Campaign via PARTIAL_UPDATE, and REPLACES the campaign's entire targetingCriteria, not a merge), and creative (uploads new media, creates a replacement inline creative on the same campaign, pauses the old one). - **Pinterest / X / OpenAI Ads**: status + budget only. Sending `targeting` or `creative` returns 501 with code `unsupported_platform_operation`. OpenAI Ads budget is lifetime-only (see `budget.type` below). **Google keyword replacement:** These edits affect the ad's entire ad group, including sibling ads. Positive (`targeting.keywords`) and negative (`targeting.negativeKeywords`) sets are independent: omit a field to leave that set unchanged, or send `[]` to remove every keyword of that kind. Zernio compares each supplied set with Google's live criteria by case-insensitive keyword text and match type. A matching criterion is left untouched, retaining its criterion ID, enabled/paused status, keyword-level bid overrides, labels, and criterion-associated history/statistics. Zernio does not reset its quality score; Google continues to calculate scores and statistics normally. Text comparison does not trim whitespace. A bare string or an object without `matchType` means `broad`, not the existing criterion's match type. For example, resending an existing `{ \"text\": \"plumber\", \"matchType\": \"exact\" }` preserves it; sending `\"plumber\"` instead removes that EXACT criterion and requests a BROAD one. Changing text or match type removes criteria no longer requested and creates any missing criteria. New criteria get new IDs and do not inherit removed criteria's bid overrides, labels, or history. Historical reporting for a removed criterion is not transferred to its replacement. To add keywords without replacing a set, use [POST /v1/ads/keywords](https://docs.zernio.com/ad-campaigns/add-ad-keywords). Use `PATCH /v1/ads/keywords/{keywordId}` to pause/enable one keyword, or `DELETE /v1/ads/keywords/{keywordId}` to remove it.
|
|
2279
2279
|
# @param ad_id [String]
|
|
2280
2280
|
# @param update_ad_request [UpdateAdRequest]
|
|
2281
2281
|
# @param [Hash] opts the optional parameters
|
|
@@ -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.
|