zernio-sdk 0.0.787 → 0.0.788
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 +1 -0
- data/docs/CreateInboxConversationRequest.md +3 -1
- data/docs/CreateInboxConversationRequestHeaderLocation.md +24 -0
- data/docs/MessagesApi.md +1 -1
- data/lib/zernio-sdk/api/messages_api.rb +2 -2
- data/lib/zernio-sdk/models/create_inbox_conversation_request.rb +13 -4
- data/lib/zernio-sdk/models/create_inbox_conversation_request_header_location.rb +213 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +1 -0
- data/openapi.yaml +22 -1
- data/spec/api/messages_api_spec.rb +1 -1
- data/spec/models/create_inbox_conversation_request_header_location_spec.rb +54 -0
- data/spec/models/create_inbox_conversation_request_spec.rb +6 -0
- metadata +5 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5359f699200cd2cc41061273e8beffe4d0a215595e6edba75438c39d01057538
|
|
4
|
+
data.tar.gz: 50a828f49846cf8ec7e238e9cc5e8aaefdc9cfe4a07f77c0fdb1111cc851dc50
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 816ea9415279c89359074649ad6c5b213ccdc201bd9e2e04833352fdce656712e610c9046802d4d0cdd2cfb52ccf905ae6f6163a531139934333c600bd9e2483
|
|
7
|
+
data.tar.gz: ee1ecf0c473453854e64bb468a60b2e7b39c80b7a9837f03662cb48e9ff01b60b2417d224c42162610aedc052b4044acf5750ffb065055561e923b250db9bc87
|
data/README.md
CHANGED
|
@@ -916,6 +916,7 @@ Class | Method | HTTP request | Description
|
|
|
916
916
|
- [Zernio::CreateInboxConversation422Response](docs/CreateInboxConversation422Response.md)
|
|
917
917
|
- [Zernio::CreateInboxConversation429Response](docs/CreateInboxConversation429Response.md)
|
|
918
918
|
- [Zernio::CreateInboxConversationRequest](docs/CreateInboxConversationRequest.md)
|
|
919
|
+
- [Zernio::CreateInboxConversationRequestHeaderLocation](docs/CreateInboxConversationRequestHeaderLocation.md)
|
|
919
920
|
- [Zernio::CreateInboxConversationRequestHeaderMedia](docs/CreateInboxConversationRequestHeaderMedia.md)
|
|
920
921
|
- [Zernio::CreateInboxConversationRequestTemplateButtonParamsInner](docs/CreateInboxConversationRequestTemplateButtonParamsInner.md)
|
|
921
922
|
- [Zernio::CreateInviteToken201Response](docs/CreateInviteToken201Response.md)
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
| **template_params** | **Array<String>** | WhatsApp only. Template variable values as one flat array, in the order the variables appear across the whole template: text-header variables first, then body variables, then one value per dynamic URL button (in button order). Works with positional placeholders ({{1}}, {{2}}, ...) and with named placeholders ({{name}}, {{company}} - how Meta Business Manager creates templates), where values fill the named slots in order of appearance. Example - a body with {{1}}, {{2}} plus a URL button https://example.com/{{1}} takes three values: [body1, body2, buttonSuffix]. Media headers (image, video, document) are filled automatically from the approved template and take no value here (use headerMedia to override the header asset per send). Buttons that are not dynamic-URL buttons (copy-code, flow) take no value here either; use templateButtonParams. | [optional] |
|
|
17
17
|
| **template_button_params** | [**Array<CreateInboxConversationRequestTemplateButtonParamsInner>**](CreateInboxConversationRequestTemplateButtonParamsInner.md) | WhatsApp only. Values for template buttons that carry one at send time, each addressed by the button's position in the approved template. This is the only way to send a copy-code button's payload (a Pix payment code, a coupon) or a flow token, because templateParams is a flat array of text variables and covers dynamic URL buttons only. Supplying a button here overrides whatever templateParams would have derived for that same index, so the send never carries one button twice; repeating an index within this array is rejected with 400. Each index must name a button of the matching kind on the approved template, which is also checked before the send and returns 400 (INVALID_TEMPLATE_BUTTON_PARAM) rather than a Meta rejection. | [optional] |
|
|
18
18
|
| **header_media** | [**CreateInboxConversationRequestHeaderMedia**](CreateInboxConversationRequestHeaderMedia.md) | | [optional] |
|
|
19
|
+
| **header_location** | [**CreateInboxConversationRequestHeaderLocation**](CreateInboxConversationRequestHeaderLocation.md) | | [optional] |
|
|
19
20
|
|
|
20
21
|
## Example
|
|
21
22
|
|
|
@@ -34,7 +35,8 @@ instance = Zernio::CreateInboxConversationRequest.new(
|
|
|
34
35
|
template_language: null,
|
|
35
36
|
template_params: null,
|
|
36
37
|
template_button_params: null,
|
|
37
|
-
header_media: null
|
|
38
|
+
header_media: null,
|
|
39
|
+
header_location: null
|
|
38
40
|
)
|
|
39
41
|
```
|
|
40
42
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zernio::CreateInboxConversationRequestHeaderLocation
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **latitude** | **Float** | Latitude in decimal degrees. | |
|
|
8
|
+
| **longitude** | **Float** | Longitude in decimal degrees. | |
|
|
9
|
+
| **name** | **String** | Location name shown to the recipient (e.g. a business name). | [optional] |
|
|
10
|
+
| **address** | **String** | Location address shown to the recipient. | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'zernio-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Zernio::CreateInboxConversationRequestHeaderLocation.new(
|
|
18
|
+
latitude: null,
|
|
19
|
+
longitude: null,
|
|
20
|
+
name: null,
|
|
21
|
+
address: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
data/docs/MessagesApi.md
CHANGED
|
@@ -100,7 +100,7 @@ end
|
|
|
100
100
|
|
|
101
101
|
Create conversation
|
|
102
102
|
|
|
103
|
-
Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. Slack: pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. DM eligibility (X/Twitter): Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. X API tier requirement: DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. Rate limits (X/Twitter only): X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
|
|
103
|
+
Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. Slack: pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. A template whose approved header format is LOCATION has no header asset to reconstruct at all: Meta only accepts the location at send time, so pass headerLocation (latitude and longitude required) whenever such a template is sent; headerMedia and headerLocation cannot both be supplied. A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. DM eligibility (X/Twitter): Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. X API tier requirement: DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. Rate limits (X/Twitter only): X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
|
|
104
104
|
|
|
105
105
|
### Examples
|
|
106
106
|
|
|
@@ -100,7 +100,7 @@ module Zernio
|
|
|
100
100
|
end
|
|
101
101
|
|
|
102
102
|
# Create conversation
|
|
103
|
-
# Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. Slack: pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. DM eligibility (X/Twitter): Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. X API tier requirement: DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. Rate limits (X/Twitter only): X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
|
|
103
|
+
# Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. Slack: pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. A template whose approved header format is LOCATION has no header asset to reconstruct at all: Meta only accepts the location at send time, so pass headerLocation (latitude and longitude required) whenever such a template is sent; headerMedia and headerLocation cannot both be supplied. A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. DM eligibility (X/Twitter): Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. X API tier requirement: DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. Rate limits (X/Twitter only): X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
|
|
104
104
|
# @param create_inbox_conversation_request [CreateInboxConversationRequest]
|
|
105
105
|
# @param [Hash] opts the optional parameters
|
|
106
106
|
# @return [CreateInboxConversation201Response]
|
|
@@ -110,7 +110,7 @@ module Zernio
|
|
|
110
110
|
end
|
|
111
111
|
|
|
112
112
|
# Create conversation
|
|
113
|
-
# Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. Slack: pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. DM eligibility (X/Twitter): Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. X API tier requirement: DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. Rate limits (X/Twitter only): X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
|
|
113
|
+
# Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. Slack: pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. A template whose approved header format is LOCATION has no header asset to reconstruct at all: Meta only accepts the location at send time, so pass headerLocation (latitude and longitude required) whenever such a template is sent; headerMedia and headerLocation cannot both be supplied. A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. DM eligibility (X/Twitter): Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. X API tier requirement: DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. Rate limits (X/Twitter only): X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
|
|
114
114
|
# @param create_inbox_conversation_request [CreateInboxConversationRequest]
|
|
115
115
|
# @param [Hash] opts the optional parameters
|
|
116
116
|
# @return [Array<(CreateInboxConversation201Response, Integer, Hash)>] CreateInboxConversation201Response data, response status code and response headers
|
|
@@ -50,6 +50,8 @@ module Zernio
|
|
|
50
50
|
|
|
51
51
|
attr_accessor :header_media
|
|
52
52
|
|
|
53
|
+
attr_accessor :header_location
|
|
54
|
+
|
|
53
55
|
class EnumAttributeValidator
|
|
54
56
|
attr_reader :datatype
|
|
55
57
|
attr_reader :allowable_values
|
|
@@ -86,7 +88,8 @@ module Zernio
|
|
|
86
88
|
:'template_language' => :'templateLanguage',
|
|
87
89
|
:'template_params' => :'templateParams',
|
|
88
90
|
:'template_button_params' => :'templateButtonParams',
|
|
89
|
-
:'header_media' => :'headerMedia'
|
|
91
|
+
:'header_media' => :'headerMedia',
|
|
92
|
+
:'header_location' => :'headerLocation'
|
|
90
93
|
}
|
|
91
94
|
end
|
|
92
95
|
|
|
@@ -114,7 +117,8 @@ module Zernio
|
|
|
114
117
|
:'template_language' => :'String',
|
|
115
118
|
:'template_params' => :'Array<String>',
|
|
116
119
|
:'template_button_params' => :'Array<CreateInboxConversationRequestTemplateButtonParamsInner>',
|
|
117
|
-
:'header_media' => :'CreateInboxConversationRequestHeaderMedia'
|
|
120
|
+
:'header_media' => :'CreateInboxConversationRequestHeaderMedia',
|
|
121
|
+
:'header_location' => :'CreateInboxConversationRequestHeaderLocation'
|
|
118
122
|
}
|
|
119
123
|
end
|
|
120
124
|
|
|
@@ -197,6 +201,10 @@ module Zernio
|
|
|
197
201
|
if attributes.key?(:'header_media')
|
|
198
202
|
self.header_media = attributes[:'header_media']
|
|
199
203
|
end
|
|
204
|
+
|
|
205
|
+
if attributes.key?(:'header_location')
|
|
206
|
+
self.header_location = attributes[:'header_location']
|
|
207
|
+
end
|
|
200
208
|
end
|
|
201
209
|
|
|
202
210
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -276,7 +284,8 @@ module Zernio
|
|
|
276
284
|
template_language == o.template_language &&
|
|
277
285
|
template_params == o.template_params &&
|
|
278
286
|
template_button_params == o.template_button_params &&
|
|
279
|
-
header_media == o.header_media
|
|
287
|
+
header_media == o.header_media &&
|
|
288
|
+
header_location == o.header_location
|
|
280
289
|
end
|
|
281
290
|
|
|
282
291
|
# @see the `==` method
|
|
@@ -288,7 +297,7 @@ module Zernio
|
|
|
288
297
|
# Calculates hash code according to all attributes.
|
|
289
298
|
# @return [Integer] Hash code
|
|
290
299
|
def hash
|
|
291
|
-
[account_id, participant_id, participant_username, message, skip_dm_check, template_name, category, link_preview, template_language, template_params, template_button_params, header_media].hash
|
|
300
|
+
[account_id, participant_id, participant_username, message, skip_dm_check, template_name, category, link_preview, template_language, template_params, template_button_params, header_media, header_location].hash
|
|
292
301
|
end
|
|
293
302
|
|
|
294
303
|
# Builds the object from hash
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
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
|
+
# WhatsApp only. Required to send a template whose approved header format is LOCATION: Meta only accepts the location's lat/long at send time, never at template creation, so there is nothing to fill in automatically. Cannot be combined with headerMedia (a template has exactly one header).
|
|
18
|
+
class CreateInboxConversationRequestHeaderLocation < ApiModelBase
|
|
19
|
+
# Latitude in decimal degrees.
|
|
20
|
+
attr_accessor :latitude
|
|
21
|
+
|
|
22
|
+
# Longitude in decimal degrees.
|
|
23
|
+
attr_accessor :longitude
|
|
24
|
+
|
|
25
|
+
# Location name shown to the recipient (e.g. a business name).
|
|
26
|
+
attr_accessor :name
|
|
27
|
+
|
|
28
|
+
# Location address shown to the recipient.
|
|
29
|
+
attr_accessor :address
|
|
30
|
+
|
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
|
+
def self.attribute_map
|
|
33
|
+
{
|
|
34
|
+
:'latitude' => :'latitude',
|
|
35
|
+
:'longitude' => :'longitude',
|
|
36
|
+
:'name' => :'name',
|
|
37
|
+
:'address' => :'address'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns attribute mapping this model knows about
|
|
42
|
+
def self.acceptable_attribute_map
|
|
43
|
+
attribute_map
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Returns all the JSON keys this model knows about
|
|
47
|
+
def self.acceptable_attributes
|
|
48
|
+
acceptable_attribute_map.values
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Attribute type mapping.
|
|
52
|
+
def self.openapi_types
|
|
53
|
+
{
|
|
54
|
+
:'latitude' => :'Float',
|
|
55
|
+
:'longitude' => :'Float',
|
|
56
|
+
:'name' => :'String',
|
|
57
|
+
:'address' => :'String'
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# List of attributes with nullable: true
|
|
62
|
+
def self.openapi_nullable
|
|
63
|
+
Set.new([
|
|
64
|
+
])
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Initializes the object
|
|
68
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
69
|
+
def initialize(attributes = {})
|
|
70
|
+
if (!attributes.is_a?(Hash))
|
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CreateInboxConversationRequestHeaderLocation` initialize method"
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
75
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
76
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
77
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
78
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CreateInboxConversationRequestHeaderLocation`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
79
|
+
end
|
|
80
|
+
h[k.to_sym] = v
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'latitude')
|
|
84
|
+
self.latitude = attributes[:'latitude']
|
|
85
|
+
else
|
|
86
|
+
self.latitude = nil
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'longitude')
|
|
90
|
+
self.longitude = attributes[:'longitude']
|
|
91
|
+
else
|
|
92
|
+
self.longitude = nil
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'name')
|
|
96
|
+
self.name = attributes[:'name']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'address')
|
|
100
|
+
self.address = attributes[:'address']
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
105
|
+
# @return Array for valid properties with the reasons
|
|
106
|
+
def list_invalid_properties
|
|
107
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
108
|
+
invalid_properties = Array.new
|
|
109
|
+
if @latitude.nil?
|
|
110
|
+
invalid_properties.push('invalid value for "latitude", latitude cannot be nil.')
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if @longitude.nil?
|
|
114
|
+
invalid_properties.push('invalid value for "longitude", longitude cannot be nil.')
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
invalid_properties
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Check to see if the all the properties in the model are valid
|
|
121
|
+
# @return true if the model is valid
|
|
122
|
+
def valid?
|
|
123
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
124
|
+
return false if @latitude.nil?
|
|
125
|
+
return false if @longitude.nil?
|
|
126
|
+
true
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Custom attribute writer method with validation
|
|
130
|
+
# @param [Object] latitude Value to be assigned
|
|
131
|
+
def latitude=(latitude)
|
|
132
|
+
if latitude.nil?
|
|
133
|
+
fail ArgumentError, 'latitude cannot be nil'
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
@latitude = latitude
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Custom attribute writer method with validation
|
|
140
|
+
# @param [Object] longitude Value to be assigned
|
|
141
|
+
def longitude=(longitude)
|
|
142
|
+
if longitude.nil?
|
|
143
|
+
fail ArgumentError, 'longitude cannot be nil'
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
@longitude = longitude
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Checks equality by comparing each attribute.
|
|
150
|
+
# @param [Object] Object to be compared
|
|
151
|
+
def ==(o)
|
|
152
|
+
return true if self.equal?(o)
|
|
153
|
+
self.class == o.class &&
|
|
154
|
+
latitude == o.latitude &&
|
|
155
|
+
longitude == o.longitude &&
|
|
156
|
+
name == o.name &&
|
|
157
|
+
address == o.address
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# @see the `==` method
|
|
161
|
+
# @param [Object] Object to be compared
|
|
162
|
+
def eql?(o)
|
|
163
|
+
self == o
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Calculates hash code according to all attributes.
|
|
167
|
+
# @return [Integer] Hash code
|
|
168
|
+
def hash
|
|
169
|
+
[latitude, longitude, name, address].hash
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Builds the object from hash
|
|
173
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
174
|
+
# @return [Object] Returns the model itself
|
|
175
|
+
def self.build_from_hash(attributes)
|
|
176
|
+
return nil unless attributes.is_a?(Hash)
|
|
177
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
178
|
+
transformed_hash = {}
|
|
179
|
+
openapi_types.each_pair do |key, type|
|
|
180
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
181
|
+
transformed_hash["#{key}"] = nil
|
|
182
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
183
|
+
# check to ensure the input is an array given that the attribute
|
|
184
|
+
# is documented as an array but the input is not
|
|
185
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
186
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
187
|
+
end
|
|
188
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
189
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
new(transformed_hash)
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Returns the object in the form of hash
|
|
196
|
+
# @return [Hash] Returns the object in the form of hash
|
|
197
|
+
def to_hash
|
|
198
|
+
hash = {}
|
|
199
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
200
|
+
value = self.send(attr)
|
|
201
|
+
if value.nil?
|
|
202
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
203
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
hash[param] = _to_hash(value)
|
|
207
|
+
end
|
|
208
|
+
hash
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -261,6 +261,7 @@ require 'zernio-sdk/models/create_inbox_conversation404_response'
|
|
|
261
261
|
require 'zernio-sdk/models/create_inbox_conversation422_response'
|
|
262
262
|
require 'zernio-sdk/models/create_inbox_conversation429_response'
|
|
263
263
|
require 'zernio-sdk/models/create_inbox_conversation_request'
|
|
264
|
+
require 'zernio-sdk/models/create_inbox_conversation_request_header_location'
|
|
264
265
|
require 'zernio-sdk/models/create_inbox_conversation_request_header_media'
|
|
265
266
|
require 'zernio-sdk/models/create_inbox_conversation_request_template_button_params_inner'
|
|
266
267
|
require 'zernio-sdk/models/create_invite_token201_response'
|
data/openapi.yaml
CHANGED
|
@@ -25945,7 +25945,7 @@ paths:
|
|
|
25945
25945
|
|
|
25946
25946
|
Slack: pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace.
|
|
25947
25947
|
|
|
25948
|
-
WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below.
|
|
25948
|
+
WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. A template whose approved header format is LOCATION has no header asset to reconstruct at all: Meta only accepts the location at send time, so pass headerLocation (latitude and longitude required) whenever such a template is sent; headerMedia and headerLocation cannot both be supplied. A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below.
|
|
25949
25949
|
|
|
25950
25950
|
DM eligibility (X/Twitter): Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility.
|
|
25951
25951
|
|
|
@@ -26078,6 +26078,27 @@ paths:
|
|
|
26078
26078
|
filename:
|
|
26079
26079
|
type: string
|
|
26080
26080
|
description: 'Document display name shown to the recipient (e.g. "Factura 0001-123.pdf"). document type only; ignored for image/video.'
|
|
26081
|
+
headerLocation:
|
|
26082
|
+
type: object
|
|
26083
|
+
description: >-
|
|
26084
|
+
WhatsApp only. Required to send a template whose approved header format is
|
|
26085
|
+
LOCATION: Meta only accepts the location's lat/long at send time, never at
|
|
26086
|
+
template creation, so there is nothing to fill in automatically. Cannot be
|
|
26087
|
+
combined with headerMedia (a template has exactly one header).
|
|
26088
|
+
required: [latitude, longitude]
|
|
26089
|
+
properties:
|
|
26090
|
+
latitude:
|
|
26091
|
+
type: number
|
|
26092
|
+
description: Latitude in decimal degrees.
|
|
26093
|
+
longitude:
|
|
26094
|
+
type: number
|
|
26095
|
+
description: Longitude in decimal degrees.
|
|
26096
|
+
name:
|
|
26097
|
+
type: string
|
|
26098
|
+
description: Location name shown to the recipient (e.g. a business name).
|
|
26099
|
+
address:
|
|
26100
|
+
type: string
|
|
26101
|
+
description: Location address shown to the recipient.
|
|
26081
26102
|
multipart/form-data:
|
|
26082
26103
|
schema:
|
|
26083
26104
|
type: object
|
|
@@ -48,7 +48,7 @@ describe 'MessagesApi' do
|
|
|
48
48
|
|
|
49
49
|
# unit tests for create_inbox_conversation
|
|
50
50
|
# Create conversation
|
|
51
|
-
# Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. Slack: pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. DM eligibility (X/Twitter): Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. X API tier requirement: DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. Rate limits (X/Twitter only): X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
|
|
51
|
+
# Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. Slack: pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. A template whose approved header format is LOCATION has no header asset to reconstruct at all: Meta only accepts the location at send time, so pass headerLocation (latitude and longitude required) whenever such a template is sent; headerMedia and headerLocation cannot both be supplied. A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. DM eligibility (X/Twitter): Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. X API tier requirement: DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. Rate limits (X/Twitter only): X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
|
|
52
52
|
# @param create_inbox_conversation_request
|
|
53
53
|
# @param [Hash] opts the optional parameters
|
|
54
54
|
# @return [CreateInboxConversation201Response]
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zernio::CreateInboxConversationRequestHeaderLocation
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::CreateInboxConversationRequestHeaderLocation do
|
|
21
|
+
#let(:instance) { Zernio::CreateInboxConversationRequestHeaderLocation.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CreateInboxConversationRequestHeaderLocation' do
|
|
24
|
+
it 'should create an instance of CreateInboxConversationRequestHeaderLocation' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::CreateInboxConversationRequestHeaderLocation)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "latitude"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "longitude"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
describe 'test attribute "name"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe 'test attribute "address"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
end
|
|
@@ -103,4 +103,10 @@ describe Zernio::CreateInboxConversationRequest do
|
|
|
103
103
|
end
|
|
104
104
|
end
|
|
105
105
|
|
|
106
|
+
describe 'test attribute "header_location"' do
|
|
107
|
+
it 'should work' do
|
|
108
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
|
|
106
112
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zernio-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.788
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
@@ -331,6 +331,7 @@ files:
|
|
|
331
331
|
- docs/CreateInboxConversation422Response.md
|
|
332
332
|
- docs/CreateInboxConversation429Response.md
|
|
333
333
|
- docs/CreateInboxConversationRequest.md
|
|
334
|
+
- docs/CreateInboxConversationRequestHeaderLocation.md
|
|
334
335
|
- docs/CreateInboxConversationRequestHeaderMedia.md
|
|
335
336
|
- docs/CreateInboxConversationRequestTemplateButtonParamsInner.md
|
|
336
337
|
- docs/CreateInviteToken201Response.md
|
|
@@ -2197,6 +2198,7 @@ files:
|
|
|
2197
2198
|
- lib/zernio-sdk/models/create_inbox_conversation422_response.rb
|
|
2198
2199
|
- lib/zernio-sdk/models/create_inbox_conversation429_response.rb
|
|
2199
2200
|
- lib/zernio-sdk/models/create_inbox_conversation_request.rb
|
|
2201
|
+
- lib/zernio-sdk/models/create_inbox_conversation_request_header_location.rb
|
|
2200
2202
|
- lib/zernio-sdk/models/create_inbox_conversation_request_header_media.rb
|
|
2201
2203
|
- lib/zernio-sdk/models/create_inbox_conversation_request_template_button_params_inner.rb
|
|
2202
2204
|
- lib/zernio-sdk/models/create_invite_token201_response.rb
|
|
@@ -4011,6 +4013,7 @@ files:
|
|
|
4011
4013
|
- spec/models/create_inbox_conversation404_response_spec.rb
|
|
4012
4014
|
- spec/models/create_inbox_conversation422_response_spec.rb
|
|
4013
4015
|
- spec/models/create_inbox_conversation429_response_spec.rb
|
|
4016
|
+
- spec/models/create_inbox_conversation_request_header_location_spec.rb
|
|
4014
4017
|
- spec/models/create_inbox_conversation_request_header_media_spec.rb
|
|
4015
4018
|
- spec/models/create_inbox_conversation_request_spec.rb
|
|
4016
4019
|
- spec/models/create_inbox_conversation_request_template_button_params_inner_spec.rb
|
|
@@ -7028,6 +7031,7 @@ test_files:
|
|
|
7028
7031
|
- spec/models/ads_list_response_spec.rb
|
|
7029
7032
|
- spec/models/estimate_ad_reach200_response_spec.rb
|
|
7030
7033
|
- spec/models/cancel_broadcast200_response_spec.rb
|
|
7034
|
+
- spec/models/create_inbox_conversation_request_header_location_spec.rb
|
|
7031
7035
|
- spec/models/meta_ads_platform_data_spec.rb
|
|
7032
7036
|
- spec/models/add_broadcast_recipients200_response_spec.rb
|
|
7033
7037
|
- spec/models/create_broadcast200_response_spec.rb
|