late-sdk 0.0.686 → 0.0.688
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 +3 -0
- data/docs/CommentAutomationTemplate.md +20 -0
- data/docs/CommentAutomationTemplateElement.md +24 -0
- data/docs/CommentAutomationTemplateElementButtonsInner.md +24 -0
- data/docs/CreateCommentAutomation200ResponseAutomation.md +2 -0
- data/docs/CreateCommentAutomationRequest.md +2 -0
- data/docs/GetCommentAutomation200ResponseAutomation.md +2 -0
- data/docs/ListCommentAutomations200ResponseAutomationsInner.md +2 -0
- data/docs/MessagesApi.md +2 -2
- data/docs/SendInboxMessageRequest.md +1 -1
- data/docs/UpdateCommentAutomation200ResponseAutomation.md +2 -0
- data/docs/UpdateCommentAutomationRequest.md +2 -0
- data/docs/WebhookEventsApi.md +1 -1
- data/lib/zernio-sdk/api/messages_api.rb +4 -4
- data/lib/zernio-sdk/api/webhook_events_api.rb +2 -2
- data/lib/zernio-sdk/models/comment_automation_template.rb +235 -0
- data/lib/zernio-sdk/models/comment_automation_template_element.rb +244 -0
- data/lib/zernio-sdk/models/comment_automation_template_element_buttons_inner.rb +243 -0
- data/lib/zernio-sdk/models/create_comment_automation200_response_automation.rb +11 -1
- data/lib/zernio-sdk/models/create_comment_automation_request.rb +12 -1
- data/lib/zernio-sdk/models/get_comment_automation200_response_automation.rb +11 -1
- data/lib/zernio-sdk/models/list_comment_automations200_response_automations_inner.rb +10 -1
- data/lib/zernio-sdk/models/send_inbox_message_request.rb +1 -1
- data/lib/zernio-sdk/models/send_inbox_message_request_template.rb +1 -1
- data/lib/zernio-sdk/models/update_comment_automation200_response_automation.rb +11 -1
- data/lib/zernio-sdk/models/update_comment_automation_request.rb +11 -1
- data/lib/zernio-sdk/models/webhook_payload_reaction.rb +1 -1
- data/lib/zernio-sdk/models/webhook_payload_reaction_reaction_sender.rb +1 -1
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +3 -0
- data/openapi.yaml +77 -9
- data/spec/api/messages_api_spec.rb +2 -2
- data/spec/models/comment_automation_template_element_buttons_inner_spec.rb +58 -0
- data/spec/models/comment_automation_template_element_spec.rb +54 -0
- data/spec/models/comment_automation_template_spec.rb +46 -0
- data/spec/models/create_comment_automation200_response_automation_spec.rb +6 -0
- data/spec/models/create_comment_automation_request_spec.rb +6 -0
- data/spec/models/get_comment_automation200_response_automation_spec.rb +6 -0
- data/spec/models/list_comment_automations200_response_automations_inner_spec.rb +6 -0
- data/spec/models/update_comment_automation200_response_automation_spec.rb +6 -0
- data/spec/models/update_comment_automation_request_spec.rb +6 -0
- data/zernio-sdk-0.0.688.gem +0 -0
- metadata +1584 -1572
- data/zernio-sdk-0.0.686.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: b143ecb762b80cabe774126a168a6340056d9a22958f0b24996b7208b17e8cb4
|
|
4
|
+
data.tar.gz: 930f50835e0d43b4140e4f101ea7eb55c42427496cbc221101b8b5e57b14b97b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1035874795e5b74415661548c47afdfc229ed61ca20928175b48c4d6589a40a296e1b3f51245ee6291974439ea9c8aa2aab3e93d8efdcdbeff441af632f27c2b
|
|
7
|
+
data.tar.gz: 0b27cfa924fea7f95420f8046cb9ed09a5a5fb81c63d3e520744a578b2d97404e899360f3d92b120dd3223685029d59095fd53fc50f51decb0e4dece490439cb
|
data/README.md
CHANGED
|
@@ -728,6 +728,9 @@ Class | Method | HTTP request | Description
|
|
|
728
728
|
- [Zernio::CheckVerificationRequest](docs/CheckVerificationRequest.md)
|
|
729
729
|
- [Zernio::CommentAutomationAudience](docs/CommentAutomationAudience.md)
|
|
730
730
|
- [Zernio::CommentAutomationFollowGate](docs/CommentAutomationFollowGate.md)
|
|
731
|
+
- [Zernio::CommentAutomationTemplate](docs/CommentAutomationTemplate.md)
|
|
732
|
+
- [Zernio::CommentAutomationTemplateElement](docs/CommentAutomationTemplateElement.md)
|
|
733
|
+
- [Zernio::CommentAutomationTemplateElementButtonsInner](docs/CommentAutomationTemplateElementButtonsInner.md)
|
|
731
734
|
- [Zernio::CompleteGoogleBusinessVerificationRequest](docs/CompleteGoogleBusinessVerificationRequest.md)
|
|
732
735
|
- [Zernio::CompleteTelegramConnect200Response](docs/CompleteTelegramConnect200Response.md)
|
|
733
736
|
- [Zernio::CompleteWhatsAppPhoneSelection200Response](docs/CompleteWhatsAppPhoneSelection200Response.md)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::CommentAutomationTemplate
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **type** | **String** | | |
|
|
8
|
+
| **elements** | [**Array<CommentAutomationTemplateElement>**](CommentAutomationTemplateElement.md) | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::CommentAutomationTemplate.new(
|
|
16
|
+
type: null,
|
|
17
|
+
elements: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zernio::CommentAutomationTemplateElement
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **title** | **String** | Card headline (80 chars max). Also used as the Inbox preview for the sent DM. | |
|
|
8
|
+
| **subtitle** | **String** | Card description, e.g. the price or a short pitch (80 chars max). | [optional] |
|
|
9
|
+
| **image_url** | **String** | Publicly reachable http(s) image rendered large above the card. | [optional] |
|
|
10
|
+
| **buttons** | [**Array<CommentAutomationTemplateElementButtonsInner>**](CommentAutomationTemplateElementButtonsInner.md) | Up to 3 card buttons. A generic template has NO phone button, on either platform. `url` buttons are click-tracked when linkTracking is on. | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'zernio-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Zernio::CommentAutomationTemplateElement.new(
|
|
18
|
+
title: null,
|
|
19
|
+
subtitle: null,
|
|
20
|
+
image_url: null,
|
|
21
|
+
buttons: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zernio::CommentAutomationTemplateElementButtonsInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **type** | **String** | | |
|
|
8
|
+
| **title** | **String** | | |
|
|
9
|
+
| **url** | **String** | Target URL (required when type is url) | [optional] |
|
|
10
|
+
| **payload** | **String** | Postback payload delivered via the messaging_postbacks webhook (required when type is postback) | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'zernio-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Zernio::CommentAutomationTemplateElementButtonsInner.new(
|
|
18
|
+
type: null,
|
|
19
|
+
title: null,
|
|
20
|
+
url: null,
|
|
21
|
+
payload: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
| **typo_tolerance** | **Boolean** | Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched. | [optional] |
|
|
16
16
|
| **dm_message** | **String** | | [optional] |
|
|
17
17
|
| **buttons** | [**Array<DmButton>**](DmButton.md) | Inline DM buttons (up to 3). Omitted when none are set. | [optional] |
|
|
18
|
+
| **template** | [**CommentAutomationTemplate**](CommentAutomationTemplate.md) | | [optional] |
|
|
18
19
|
| **comment_reply** | **String** | | [optional] |
|
|
19
20
|
| **dm_message_variations** | **Array<String>** | Alternate DM texts rotated at random with dmMessage. Omitted when none. | [optional] |
|
|
20
21
|
| **comment_reply_variations** | **Array<String>** | Alternate public replies rotated at random with commentReply. Omitted when none. | [optional] |
|
|
@@ -45,6 +46,7 @@ instance = Zernio::CreateCommentAutomation200ResponseAutomation.new(
|
|
|
45
46
|
typo_tolerance: null,
|
|
46
47
|
dm_message: null,
|
|
47
48
|
buttons: null,
|
|
49
|
+
template: null,
|
|
48
50
|
comment_reply: null,
|
|
49
51
|
dm_message_variations: null,
|
|
50
52
|
comment_reply_variations: null,
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
| **typo_tolerance** | **Boolean** | Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched. | [optional] |
|
|
18
18
|
| **dm_message** | **String** | DM text to send to commenter. Max 640 chars when buttons are set, otherwise ~1000. | |
|
|
19
19
|
| **buttons** | [**Array<DmButton>**](DmButton.md) | Optional inline DM buttons (1-3). Phone buttons are Facebook-only. Omit or pass [] for a plain-text DM. | [optional] |
|
|
20
|
+
| **template** | [**CommentAutomationTemplate**](CommentAutomationTemplate.md) | Optional product card sent INSTEAD of the plain dmMessage bubble. Mutually exclusive with buttons. dmMessage stays required: it is what gets sent the moment the card is cleared. | [optional] |
|
|
20
21
|
| **comment_reply** | **String** | Optional public reply to the comment | [optional] |
|
|
21
22
|
| **dm_message_variations** | **Array<String>** | Optional alternate DM texts for random rotation. When set, each triggered comment sends one picked at random from [dmMessage, ...dmMessageVariations], so repeat commenters get slightly different DMs (helps avoid identical-message patterns). Up to 5. Buttons are attached to whichever text is picked, not varied. | [optional] |
|
|
22
23
|
| **comment_reply_variations** | **Array<String>** | Optional alternate public replies, rotated at random alongside commentReply (picked independently of the DM). Up to 5. | [optional] |
|
|
@@ -46,6 +47,7 @@ instance = Zernio::CreateCommentAutomationRequest.new(
|
|
|
46
47
|
typo_tolerance: null,
|
|
47
48
|
dm_message: null,
|
|
48
49
|
buttons: null,
|
|
50
|
+
template: null,
|
|
49
51
|
comment_reply: null,
|
|
50
52
|
dm_message_variations: null,
|
|
51
53
|
comment_reply_variations: null,
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
| **typo_tolerance** | **Boolean** | Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched. | [optional] |
|
|
19
19
|
| **dm_message** | **String** | | [optional] |
|
|
20
20
|
| **buttons** | [**Array<DmButton>**](DmButton.md) | Inline DM buttons (up to 3). Omitted when none are set. | [optional] |
|
|
21
|
+
| **template** | [**CommentAutomationTemplate**](CommentAutomationTemplate.md) | | [optional] |
|
|
21
22
|
| **comment_reply** | **String** | | [optional] |
|
|
22
23
|
| **dm_message_variations** | **Array<String>** | Alternate DM texts rotated at random with dmMessage. Omitted when none. | [optional] |
|
|
23
24
|
| **comment_reply_variations** | **Array<String>** | Alternate public replies rotated at random with commentReply. Omitted when none. | [optional] |
|
|
@@ -52,6 +53,7 @@ instance = Zernio::GetCommentAutomation200ResponseAutomation.new(
|
|
|
52
53
|
typo_tolerance: null,
|
|
53
54
|
dm_message: null,
|
|
54
55
|
buttons: null,
|
|
56
|
+
template: null,
|
|
55
57
|
comment_reply: null,
|
|
56
58
|
dm_message_variations: null,
|
|
57
59
|
comment_reply_variations: null,
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
| **typo_tolerance** | **Boolean** | Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched. | [optional] |
|
|
18
18
|
| **dm_message** | **String** | | [optional] |
|
|
19
19
|
| **buttons** | [**Array<DmButton>**](DmButton.md) | Inline DM buttons (up to 3). Omitted when none are set. | [optional] |
|
|
20
|
+
| **template** | [**CommentAutomationTemplate**](CommentAutomationTemplate.md) | | [optional] |
|
|
20
21
|
| **comment_reply** | **String** | | [optional] |
|
|
21
22
|
| **dm_message_variations** | **Array<String>** | Alternate DM texts rotated at random with dmMessage. Omitted when none. | [optional] |
|
|
22
23
|
| **comment_reply_variations** | **Array<String>** | Alternate public replies rotated at random with commentReply. Omitted when none. | [optional] |
|
|
@@ -47,6 +48,7 @@ instance = Zernio::ListCommentAutomations200ResponseAutomationsInner.new(
|
|
|
47
48
|
typo_tolerance: null,
|
|
48
49
|
dm_message: null,
|
|
49
50
|
buttons: null,
|
|
51
|
+
template: null,
|
|
50
52
|
comment_reply: null,
|
|
51
53
|
dm_message_variations: null,
|
|
52
54
|
comment_reply_variations: null,
|
data/docs/MessagesApi.md
CHANGED
|
@@ -26,7 +26,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
26
26
|
|
|
27
27
|
Add reaction
|
|
28
28
|
|
|
29
|
-
Add an emoji reaction to a message. Platform support: - Telegram: Supports a subset of Unicode emoji reactions - WhatsApp: Supports any standard emoji (one reaction per message per sender) - All others: Returns 400 (not supported)
|
|
29
|
+
Add an emoji reaction to a message. Platform support: - Telegram: Supports a subset of Unicode emoji reactions - WhatsApp: Supports any standard emoji (one reaction per message per sender) - Instagram and Facebook Messenger: Any standard emoji, subject to Meta's 24h messaging window - Slack: The emoji must have a Slack name (e.g. `:thumbsup:`); unnamed characters return 400 - All others: Returns 400 (not supported)
|
|
30
30
|
|
|
31
31
|
### Examples
|
|
32
32
|
|
|
@@ -618,7 +618,7 @@ end
|
|
|
618
618
|
|
|
619
619
|
Remove reaction
|
|
620
620
|
|
|
621
|
-
Remove a reaction from a message. Platform support: - Telegram: Send empty reaction array to clear - WhatsApp: Send empty emoji to remove - All others: Returns 400 (not supported)
|
|
621
|
+
Remove a reaction from a message. Platform support: - Telegram: Send empty reaction array to clear - WhatsApp: Send empty emoji to remove - Instagram and Facebook Messenger: Sends Meta's `unreact` action; the emoji does not need to be repeated - Slack: Removes the reaction we previously sent on that message - All others: Returns 400 (not supported)
|
|
622
622
|
|
|
623
623
|
### Examples
|
|
624
624
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
| **attachment_name** | **String** | WhatsApp only. Display name for a document sent via attachmentUrl with attachmentType: file (e.g. \"Report.pdf\"). Maps to the recipient's file name; without it WhatsApp derives the name from the URL and shows \"Untitled\". Ignored for image/video/audio and for binary uploads (which use the uploaded file's name). | [optional] |
|
|
13
13
|
| **voice_note** | **Boolean** | WhatsApp only. When `true` on an audio attachment, the message is sent as a voice message (PTT) — the recipient sees the waveform + voice-note UI instead of a basic audio attachment. The audio file MUST be `.ogg` encoded with the OPUS codec (mono) per Meta's voice-message contract; other formats are rejected by WhatsApp. Ignored for non-audio attachments. | [optional] |
|
|
14
14
|
| **quick_replies** | [**Array<SendInboxMessageRequestQuickRepliesInner>**](SendInboxMessageRequestQuickRepliesInner.md) | Quick reply buttons. Mutually exclusive with buttons. Max 13 items. | [optional] |
|
|
15
|
-
| **buttons** | [**Array<SendInboxMessageRequestButtonsInner>**](SendInboxMessageRequestButtonsInner.md) | Action buttons. Mutually exclusive with quickReplies. Max 3 items. WhatsApp: buttons always render as interactive reply buttons. Only `title` and `payload` are used — `type`, `url`, and `phone` are ignored (WhatsApp has no URL/phone button in this field; use the `interactive` field with `type: cta_url` for a link button). `payload` becomes the button reply ID delivered on the `message.received` webhook when the user taps. To send a simple reply-button message, provide `title` + `payload` and set `type: postback`, e.g. `{ \"type\": \"postback\", \"title\": \"Yes\", \"payload\": \"yes\" }`. | [optional] |
|
|
15
|
+
| **buttons** | [**Array<SendInboxMessageRequestButtonsInner>**](SendInboxMessageRequestButtonsInner.md) | Action buttons. Mutually exclusive with quickReplies. Max 3 items. Instagram / Facebook: also mutually exclusive with `template`. A Meta message carries one body shape, so sending both is a 400 rather than a silent drop of the buttons. WhatsApp: buttons always render as interactive reply buttons. Only `title` and `payload` are used — `type`, `url`, and `phone` are ignored (WhatsApp has no URL/phone button in this field; use the `interactive` field with `type: cta_url` for a link button). `payload` becomes the button reply ID delivered on the `message.received` webhook when the user taps. To send a simple reply-button message, provide `title` + `payload` and set `type: postback`, e.g. `{ \"type\": \"postback\", \"title\": \"Yes\", \"payload\": \"yes\" }`. | [optional] |
|
|
16
16
|
| **template** | [**SendInboxMessageRequestTemplate**](SendInboxMessageRequestTemplate.md) | | [optional] |
|
|
17
17
|
| **interactive** | [**SendInboxMessageRequestInteractive**](SendInboxMessageRequestInteractive.md) | | [optional] |
|
|
18
18
|
| **reply_markup** | [**SendInboxMessageRequestReplyMarkup**](SendInboxMessageRequestReplyMarkup.md) | | [optional] |
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
| **typo_tolerance** | **Boolean** | Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched. | [optional] |
|
|
13
13
|
| **dm_message** | **String** | | [optional] |
|
|
14
14
|
| **buttons** | [**Array<DmButton>**](DmButton.md) | Inline DM buttons (up to 3). Omitted when none are set. | [optional] |
|
|
15
|
+
| **template** | [**CommentAutomationTemplate**](CommentAutomationTemplate.md) | | [optional] |
|
|
15
16
|
| **comment_reply** | **String** | | [optional] |
|
|
16
17
|
| **dm_message_variations** | **Array<String>** | Alternate DM texts rotated at random with dmMessage. Omitted when none. | [optional] |
|
|
17
18
|
| **comment_reply_variations** | **Array<String>** | Alternate public replies rotated at random with commentReply. Omitted when none. | [optional] |
|
|
@@ -34,6 +35,7 @@ instance = Zernio::UpdateCommentAutomation200ResponseAutomation.new(
|
|
|
34
35
|
typo_tolerance: null,
|
|
35
36
|
dm_message: null,
|
|
36
37
|
buttons: null,
|
|
38
|
+
template: null,
|
|
37
39
|
comment_reply: null,
|
|
38
40
|
dm_message_variations: null,
|
|
39
41
|
comment_reply_variations: null,
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
| **typo_tolerance** | **Boolean** | Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched. | [optional] |
|
|
13
13
|
| **dm_message** | **String** | | [optional] |
|
|
14
14
|
| **buttons** | [**Array<DmButton>**](DmButton.md) | Inline DM buttons (1-3). Pass [] to clear all buttons. | [optional] |
|
|
15
|
+
| **template** | [**CommentAutomationTemplate**](CommentAutomationTemplate.md) | | [optional] |
|
|
15
16
|
| **comment_reply** | **String** | | [optional] |
|
|
16
17
|
| **dm_message_variations** | **Array<String>** | Alternate DM texts for random rotation (see create). Pass [] to clear. | [optional] |
|
|
17
18
|
| **comment_reply_variations** | **Array<String>** | Alternate public replies for random rotation. Pass [] to clear. | [optional] |
|
|
@@ -37,6 +38,7 @@ instance = Zernio::UpdateCommentAutomationRequest.new(
|
|
|
37
38
|
typo_tolerance: null,
|
|
38
39
|
dm_message: null,
|
|
39
40
|
buttons: null,
|
|
41
|
+
template: null,
|
|
40
42
|
comment_reply: null,
|
|
41
43
|
dm_message_variations: null,
|
|
42
44
|
comment_reply_variations: null,
|
data/docs/WebhookEventsApi.md
CHANGED
|
@@ -2167,7 +2167,7 @@ nil (empty response body)
|
|
|
2167
2167
|
|
|
2168
2168
|
Reaction received event
|
|
2169
2169
|
|
|
2170
|
-
Fired when a participant adds or removes an emoji reaction on a message. Supported on WhatsApp and
|
|
2170
|
+
Fired when a participant adds or removes an emoji reaction on a message. Supported on WhatsApp, Telegram, Slack, Instagram and Facebook Messenger. Distinct from message.received so a reaction (e.g. a thumbs-up) is not mistaken for an inbound message. The `reaction.action` field is `added` or `removed`. On WhatsApp and Meta removals the platform does not report which emoji was removed, so `reaction.emoji` may be an empty string. Instagram and Facebook accounts connected before reactions shipped only emit this event after their webhook subscription is refreshed; reconnect the account if reactions never arrive. Requires the Inbox add-on.
|
|
2171
2171
|
|
|
2172
2172
|
### Examples
|
|
2173
2173
|
|
|
@@ -20,7 +20,7 @@ module Zernio
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Add reaction
|
|
23
|
-
# Add an emoji reaction to a message. Platform support: - Telegram: Supports a subset of Unicode emoji reactions - WhatsApp: Supports any standard emoji (one reaction per message per sender) - All others: Returns 400 (not supported)
|
|
23
|
+
# Add an emoji reaction to a message. Platform support: - Telegram: Supports a subset of Unicode emoji reactions - WhatsApp: Supports any standard emoji (one reaction per message per sender) - Instagram and Facebook Messenger: Any standard emoji, subject to Meta's 24h messaging window - Slack: The emoji must have a Slack name (e.g. `:thumbsup:`); unnamed characters return 400 - All others: Returns 400 (not supported)
|
|
24
24
|
# @param conversation_id [String] The conversation ID
|
|
25
25
|
# @param message_id [String] The platform message ID to react to
|
|
26
26
|
# @param add_message_reaction_request [AddMessageReactionRequest]
|
|
@@ -32,7 +32,7 @@ module Zernio
|
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
# Add reaction
|
|
35
|
-
# Add an emoji reaction to a message. Platform support: - Telegram: Supports a subset of Unicode emoji reactions - WhatsApp: Supports any standard emoji (one reaction per message per sender) - All others: Returns 400 (not supported)
|
|
35
|
+
# Add an emoji reaction to a message. Platform support: - Telegram: Supports a subset of Unicode emoji reactions - WhatsApp: Supports any standard emoji (one reaction per message per sender) - Instagram and Facebook Messenger: Any standard emoji, subject to Meta's 24h messaging window - Slack: The emoji must have a Slack name (e.g. `:thumbsup:`); unnamed characters return 400 - All others: Returns 400 (not supported)
|
|
36
36
|
# @param conversation_id [String] The conversation ID
|
|
37
37
|
# @param message_id [String] The platform message ID to react to
|
|
38
38
|
# @param add_message_reaction_request [AddMessageReactionRequest]
|
|
@@ -657,7 +657,7 @@ module Zernio
|
|
|
657
657
|
end
|
|
658
658
|
|
|
659
659
|
# Remove reaction
|
|
660
|
-
# Remove a reaction from a message. Platform support: - Telegram: Send empty reaction array to clear - WhatsApp: Send empty emoji to remove - All others: Returns 400 (not supported)
|
|
660
|
+
# Remove a reaction from a message. Platform support: - Telegram: Send empty reaction array to clear - WhatsApp: Send empty emoji to remove - Instagram and Facebook Messenger: Sends Meta's `unreact` action; the emoji does not need to be repeated - Slack: Removes the reaction we previously sent on that message - All others: Returns 400 (not supported)
|
|
661
661
|
# @param conversation_id [String] The conversation ID
|
|
662
662
|
# @param message_id [String] The platform message ID
|
|
663
663
|
# @param account_id [String] Social account ID
|
|
@@ -669,7 +669,7 @@ module Zernio
|
|
|
669
669
|
end
|
|
670
670
|
|
|
671
671
|
# Remove reaction
|
|
672
|
-
# Remove a reaction from a message. Platform support: - Telegram: Send empty reaction array to clear - WhatsApp: Send empty emoji to remove - All others: Returns 400 (not supported)
|
|
672
|
+
# Remove a reaction from a message. Platform support: - Telegram: Send empty reaction array to clear - WhatsApp: Send empty emoji to remove - Instagram and Facebook Messenger: Sends Meta's `unreact` action; the emoji does not need to be repeated - Slack: Removes the reaction we previously sent on that message - All others: Returns 400 (not supported)
|
|
673
673
|
# @param conversation_id [String] The conversation ID
|
|
674
674
|
# @param message_id [String] The platform message ID
|
|
675
675
|
# @param account_id [String] Social account ID
|
|
@@ -2066,7 +2066,7 @@ module Zernio
|
|
|
2066
2066
|
end
|
|
2067
2067
|
|
|
2068
2068
|
# Reaction received event
|
|
2069
|
-
# Fired when a participant adds or removes an emoji reaction on a message. Supported on WhatsApp and
|
|
2069
|
+
# Fired when a participant adds or removes an emoji reaction on a message. Supported on WhatsApp, Telegram, Slack, Instagram and Facebook Messenger. Distinct from message.received so a reaction (e.g. a thumbs-up) is not mistaken for an inbound message. The `reaction.action` field is `added` or `removed`. On WhatsApp and Meta removals the platform does not report which emoji was removed, so `reaction.emoji` may be an empty string. Instagram and Facebook accounts connected before reactions shipped only emit this event after their webhook subscription is refreshed; reconnect the account if reactions never arrive. Requires the Inbox add-on.
|
|
2070
2070
|
# @param webhook_payload_reaction [WebhookPayloadReaction]
|
|
2071
2071
|
# @param [Hash] opts the optional parameters
|
|
2072
2072
|
# @return [nil]
|
|
@@ -2076,7 +2076,7 @@ module Zernio
|
|
|
2076
2076
|
end
|
|
2077
2077
|
|
|
2078
2078
|
# Reaction received event
|
|
2079
|
-
# Fired when a participant adds or removes an emoji reaction on a message. Supported on WhatsApp and
|
|
2079
|
+
# Fired when a participant adds or removes an emoji reaction on a message. Supported on WhatsApp, Telegram, Slack, Instagram and Facebook Messenger. Distinct from message.received so a reaction (e.g. a thumbs-up) is not mistaken for an inbound message. The `reaction.action` field is `added` or `removed`. On WhatsApp and Meta removals the platform does not report which emoji was removed, so `reaction.emoji` may be an empty string. Instagram and Facebook accounts connected before reactions shipped only emit this event after their webhook subscription is refreshed; reconnect the account if reactions never arrive. Requires the Inbox add-on.
|
|
2080
2080
|
# @param webhook_payload_reaction [WebhookPayloadReaction]
|
|
2081
2081
|
# @param [Hash] opts the optional parameters
|
|
2082
2082
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
# A Meta generic template (product card) sent as the automation's first DM. It REPLACES the plain `dmMessage` bubble: a Meta message carries one body shape, and a comment gets exactly one private reply, so the card and the text cannot both be delivered. Put your selling copy in `subtitle`. Mutually exclusive with `buttons` (sending both is a 400). Works on both the `comment` and `story_reply` triggers. Up to 10 elements, rendered as a horizontally swipeable carousel. Rendering confirmed on the Instagram and Messenger mobile apps.
|
|
18
|
+
class CommentAutomationTemplate < ApiModelBase
|
|
19
|
+
attr_accessor :type
|
|
20
|
+
|
|
21
|
+
attr_accessor :elements
|
|
22
|
+
|
|
23
|
+
class EnumAttributeValidator
|
|
24
|
+
attr_reader :datatype
|
|
25
|
+
attr_reader :allowable_values
|
|
26
|
+
|
|
27
|
+
def initialize(datatype, allowable_values)
|
|
28
|
+
@allowable_values = allowable_values.map do |value|
|
|
29
|
+
case datatype.to_s
|
|
30
|
+
when /Integer/i
|
|
31
|
+
value.to_i
|
|
32
|
+
when /Float/i
|
|
33
|
+
value.to_f
|
|
34
|
+
else
|
|
35
|
+
value
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def valid?(value)
|
|
41
|
+
!value || allowable_values.include?(value)
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
46
|
+
def self.attribute_map
|
|
47
|
+
{
|
|
48
|
+
:'type' => :'type',
|
|
49
|
+
:'elements' => :'elements'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Returns attribute mapping this model knows about
|
|
54
|
+
def self.acceptable_attribute_map
|
|
55
|
+
attribute_map
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Returns all the JSON keys this model knows about
|
|
59
|
+
def self.acceptable_attributes
|
|
60
|
+
acceptable_attribute_map.values
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Attribute type mapping.
|
|
64
|
+
def self.openapi_types
|
|
65
|
+
{
|
|
66
|
+
:'type' => :'String',
|
|
67
|
+
:'elements' => :'Array<CommentAutomationTemplateElement>'
|
|
68
|
+
}
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# List of attributes with nullable: true
|
|
72
|
+
def self.openapi_nullable
|
|
73
|
+
Set.new([
|
|
74
|
+
])
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Initializes the object
|
|
78
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
79
|
+
def initialize(attributes = {})
|
|
80
|
+
if (!attributes.is_a?(Hash))
|
|
81
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CommentAutomationTemplate` initialize method"
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
85
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
86
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
87
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
88
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CommentAutomationTemplate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
89
|
+
end
|
|
90
|
+
h[k.to_sym] = v
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'type')
|
|
94
|
+
self.type = attributes[:'type']
|
|
95
|
+
else
|
|
96
|
+
self.type = nil
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'elements')
|
|
100
|
+
if (value = attributes[:'elements']).is_a?(Array)
|
|
101
|
+
self.elements = value
|
|
102
|
+
end
|
|
103
|
+
else
|
|
104
|
+
self.elements = nil
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
109
|
+
# @return Array for valid properties with the reasons
|
|
110
|
+
def list_invalid_properties
|
|
111
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
112
|
+
invalid_properties = Array.new
|
|
113
|
+
if @type.nil?
|
|
114
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if @elements.nil?
|
|
118
|
+
invalid_properties.push('invalid value for "elements", elements cannot be nil.')
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if @elements.length > 10
|
|
122
|
+
invalid_properties.push('invalid value for "elements", number of items must be less than or equal to 10.')
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if @elements.length < 1
|
|
126
|
+
invalid_properties.push('invalid value for "elements", number of items must be greater than or equal to 1.')
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
invalid_properties
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Check to see if the all the properties in the model are valid
|
|
133
|
+
# @return true if the model is valid
|
|
134
|
+
def valid?
|
|
135
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
136
|
+
return false if @type.nil?
|
|
137
|
+
type_validator = EnumAttributeValidator.new('String', ["generic"])
|
|
138
|
+
return false unless type_validator.valid?(@type)
|
|
139
|
+
return false if @elements.nil?
|
|
140
|
+
return false if @elements.length > 10
|
|
141
|
+
return false if @elements.length < 1
|
|
142
|
+
true
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
146
|
+
# @param [Object] type Object to be assigned
|
|
147
|
+
def type=(type)
|
|
148
|
+
validator = EnumAttributeValidator.new('String', ["generic"])
|
|
149
|
+
unless validator.valid?(type)
|
|
150
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
151
|
+
end
|
|
152
|
+
@type = type
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Custom attribute writer method with validation
|
|
156
|
+
# @param [Object] elements Value to be assigned
|
|
157
|
+
def elements=(elements)
|
|
158
|
+
if elements.nil?
|
|
159
|
+
fail ArgumentError, 'elements cannot be nil'
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if elements.length > 10
|
|
163
|
+
fail ArgumentError, 'invalid value for "elements", number of items must be less than or equal to 10.'
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if elements.length < 1
|
|
167
|
+
fail ArgumentError, 'invalid value for "elements", number of items must be greater than or equal to 1.'
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
@elements = elements
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Checks equality by comparing each attribute.
|
|
174
|
+
# @param [Object] Object to be compared
|
|
175
|
+
def ==(o)
|
|
176
|
+
return true if self.equal?(o)
|
|
177
|
+
self.class == o.class &&
|
|
178
|
+
type == o.type &&
|
|
179
|
+
elements == o.elements
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# @see the `==` method
|
|
183
|
+
# @param [Object] Object to be compared
|
|
184
|
+
def eql?(o)
|
|
185
|
+
self == o
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Calculates hash code according to all attributes.
|
|
189
|
+
# @return [Integer] Hash code
|
|
190
|
+
def hash
|
|
191
|
+
[type, elements].hash
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Builds the object from hash
|
|
195
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
196
|
+
# @return [Object] Returns the model itself
|
|
197
|
+
def self.build_from_hash(attributes)
|
|
198
|
+
return nil unless attributes.is_a?(Hash)
|
|
199
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
200
|
+
transformed_hash = {}
|
|
201
|
+
openapi_types.each_pair do |key, type|
|
|
202
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
203
|
+
transformed_hash["#{key}"] = nil
|
|
204
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
205
|
+
# check to ensure the input is an array given that the attribute
|
|
206
|
+
# is documented as an array but the input is not
|
|
207
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
208
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
209
|
+
end
|
|
210
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
211
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
new(transformed_hash)
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Returns the object in the form of hash
|
|
218
|
+
# @return [Hash] Returns the object in the form of hash
|
|
219
|
+
def to_hash
|
|
220
|
+
hash = {}
|
|
221
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
222
|
+
value = self.send(attr)
|
|
223
|
+
if value.nil?
|
|
224
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
225
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
hash[param] = _to_hash(value)
|
|
229
|
+
end
|
|
230
|
+
hash
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
end
|