zernio-sdk 0.0.823 → 0.0.825
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/InstagramPlatformData.md +9 -1
- data/docs/WebhookPayloadMessageMetadata.md +3 -1
- data/docs/WebhookPayloadMessageMetadataQuotedMessage.md +20 -0
- data/lib/zernio-sdk/models/instagram_platform_data.rb +90 -4
- data/lib/zernio-sdk/models/webhook_payload_message_metadata.rb +11 -2
- data/lib/zernio-sdk/models/webhook_payload_message_metadata_quoted_message.rb +159 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +1 -0
- data/openapi.yaml +43 -4
- data/spec/models/instagram_platform_data_spec.rb +24 -0
- data/spec/models/webhook_payload_message_metadata_quoted_message_spec.rb +42 -0
- data/spec/models/webhook_payload_message_metadata_spec.rb +6 -0
- metadata +1758 -1754
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e45c3b1ad4a7289f771b285143d405d2ea20352ba73ba89ab6ff71751cf5c5b2
|
|
4
|
+
data.tar.gz: 5bf1d0ecd41260e109ade8714f5bc7755f58fde55930766b7c6006372bc90f33
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 49e9ccd7eef5f092f680ef20c7228bebf950127442d1690f9d1b013b9a2e0c15566409477783a12e66d4be8ead24a11b4309f8fde16d5ff0548012b10444cf89
|
|
7
|
+
data.tar.gz: 5050299eaae0d8283644c46a67aae97bd25d2d0539dfac7906303e3495fb52e105e918c82af988cb1a1ce77edd91189d92f6040fbe0088c0153dbcba4aadd7ff
|
data/README.md
CHANGED
|
@@ -2344,6 +2344,7 @@ Class | Method | HTTP request | Description
|
|
|
2344
2344
|
- [Zernio::WebhookPayloadMessageMetadata](docs/WebhookPayloadMessageMetadata.md)
|
|
2345
2345
|
- [Zernio::WebhookPayloadMessageMetadataOrder](docs/WebhookPayloadMessageMetadataOrder.md)
|
|
2346
2346
|
- [Zernio::WebhookPayloadMessageMetadataOrderProductItemsInner](docs/WebhookPayloadMessageMetadataOrderProductItemsInner.md)
|
|
2347
|
+
- [Zernio::WebhookPayloadMessageMetadataQuotedMessage](docs/WebhookPayloadMessageMetadataQuotedMessage.md)
|
|
2347
2348
|
- [Zernio::WebhookPayloadMessageMetadataReferral](docs/WebhookPayloadMessageMetadataReferral.md)
|
|
2348
2349
|
- [Zernio::WebhookPayloadMessageMetadataReferralAdsContextData](docs/WebhookPayloadMessageMetadataReferralAdsContextData.md)
|
|
2349
2350
|
- [Zernio::WebhookPayloadMessageMetadataReferredProduct](docs/WebhookPayloadMessageMetadataReferredProduct.md)
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
| **instagram_thumbnail** | **String** | Custom cover image URL for Instagram Reels (JPG or PNG, publicly accessible). Overrides thumbOffset when provided. Also accepted as reelCover (alias). | [optional] |
|
|
18
18
|
| **reel_cover** | **String** | Alias for instagramThumbnail. If both are provided, instagramThumbnail takes priority. | [optional] |
|
|
19
19
|
| **is_ai_generated** | **Boolean** | When true, the post is labeled by Instagram as containing AI-generated media. Per Meta, this self-disclosure label is for AI-generated media, not AI-written captions. Applies to feed posts, Reels, Stories, and carousels. | [optional][default to false] |
|
|
20
|
+
| **is_paid_partnership** | **Boolean** | When true, Instagram shows the \"Paid partnership\" label on the post. Applies to feed posts, Reels, and carousels; not supported on Stories (400). Requires an Instagram account connected via Facebook Login; classic Instagram Login accounts get a 400 (instagram_paid_partnership_requires_facebook_login). Implied when brandedContentSponsors is set. | [optional][default to false] |
|
|
21
|
+
| **branded_content_sponsors** | **Array<String>** | Up to 2 brands to tag as sponsors, each an Instagram username (leading @ optional) or a numeric Instagram user ID. Usernames are resolved at publish time via the Business Discovery API on the publishing account; a sponsor that cannot be resolved (private, personal, or nonexistent account) fails the post with a user error naming it. Sponsors must be professional (Business or Creator) accounts. A brand that has pre-approved the creator shows as \"Paid partnership with @brand\" immediately; otherwise the plain label shows and the brand receives an approval request. Sets isPaidPartnership. Same login and content-type rules as isPaidPartnership. | [optional] |
|
|
22
|
+
| **comments_enabled** | **Boolean** | When false, comments are turned off on the post right after it is published (Meta exposes this as comment_enabled on the media object). Applies to feed posts, Reels, and carousels; ignored for Stories, which have no comments. Works with both Instagram connection methods. Best-effort: if the toggle fails after a successful publish, the post still succeeds and stays live with comments on. | [optional][default to true] |
|
|
23
|
+
| **location_id** | **String** | Tags the post with a location. The ID of a Facebook Page that has location data (digits only); it is sent to Instagram as location_id. Applies to feed posts, Reels, and the carousel as a whole; Stories and individual carousel slides are unsupported (a Story with locationId is rejected with a 400). A Page without location data or that does not exist fails the post with a user error at publish time. | [optional] |
|
|
20
24
|
|
|
21
25
|
## Example
|
|
22
26
|
|
|
@@ -36,7 +40,11 @@ instance = Zernio::InstagramPlatformData.new(
|
|
|
36
40
|
thumb_offset: 5000,
|
|
37
41
|
instagram_thumbnail: null,
|
|
38
42
|
reel_cover: null,
|
|
39
|
-
is_ai_generated: null
|
|
43
|
+
is_ai_generated: null,
|
|
44
|
+
is_paid_partnership: true,
|
|
45
|
+
branded_content_sponsors: [nike, 17841400000000000],
|
|
46
|
+
comments_enabled: false,
|
|
47
|
+
location_id: 105890561436614
|
|
40
48
|
)
|
|
41
49
|
```
|
|
42
50
|
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **quoted_message_id** | **String** |
|
|
7
|
+
| **quoted_message_id** | **String** | Raw platform envelope id (WhatsApp `context.id`; Instagram and Facebook Messenger `reply_to.mid`) of the message this one is a quote-reply to, forwarded verbatim. It may not equal the stored id of that message (see `quotedMessage.platformMessageId`). On outgoing messages the same field appears on `message.sent`, but only on some surfaces: see WebhookPayloadMessageSent.metadata.quotedMessageId. | [optional] |
|
|
8
|
+
| **quoted_message** | [**WebhookPayloadMessageMetadataQuotedMessage**](WebhookPayloadMessageMetadataQuotedMessage.md) | | [optional] |
|
|
8
9
|
| **quick_reply_payload** | **String** | Payload from a quick reply tap (Facebook/Instagram Messenger). | [optional] |
|
|
9
10
|
| **postback_payload** | **String** | Payload from a postback button tap (Facebook/Instagram Messenger). | [optional] |
|
|
10
11
|
| **postback_title** | **String** | Title of the tapped postback button (Facebook/Instagram Messenger). | [optional] |
|
|
@@ -32,6 +33,7 @@ require 'zernio-sdk'
|
|
|
32
33
|
|
|
33
34
|
instance = Zernio::WebhookPayloadMessageMetadata.new(
|
|
34
35
|
quoted_message_id: null,
|
|
36
|
+
quoted_message: null,
|
|
35
37
|
quick_reply_payload: null,
|
|
36
38
|
postback_payload: null,
|
|
37
39
|
postback_title: null,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::WebhookPayloadMessageMetadataQuotedMessage
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **message_id** | **String** | Internal id of the stored quoted message. | [optional] |
|
|
8
|
+
| **platform_message_id** | **String** | The STORED message's platform id (what message.sent and list-messages return). Can differ from quotedMessageId, because Meta renders one message under a different wamid per perspective. | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::WebhookPayloadMessageMetadataQuotedMessage.new(
|
|
16
|
+
message_id: null,
|
|
17
|
+
platform_message_id: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -53,6 +53,18 @@ module Zernio
|
|
|
53
53
|
# When true, the post is labeled by Instagram as containing AI-generated media. Per Meta, this self-disclosure label is for AI-generated media, not AI-written captions. Applies to feed posts, Reels, Stories, and carousels.
|
|
54
54
|
attr_accessor :is_ai_generated
|
|
55
55
|
|
|
56
|
+
# When true, Instagram shows the \"Paid partnership\" label on the post. Applies to feed posts, Reels, and carousels; not supported on Stories (400). Requires an Instagram account connected via Facebook Login; classic Instagram Login accounts get a 400 (instagram_paid_partnership_requires_facebook_login). Implied when brandedContentSponsors is set.
|
|
57
|
+
attr_accessor :is_paid_partnership
|
|
58
|
+
|
|
59
|
+
# Up to 2 brands to tag as sponsors, each an Instagram username (leading @ optional) or a numeric Instagram user ID. Usernames are resolved at publish time via the Business Discovery API on the publishing account; a sponsor that cannot be resolved (private, personal, or nonexistent account) fails the post with a user error naming it. Sponsors must be professional (Business or Creator) accounts. A brand that has pre-approved the creator shows as \"Paid partnership with @brand\" immediately; otherwise the plain label shows and the brand receives an approval request. Sets isPaidPartnership. Same login and content-type rules as isPaidPartnership.
|
|
60
|
+
attr_accessor :branded_content_sponsors
|
|
61
|
+
|
|
62
|
+
# When false, comments are turned off on the post right after it is published (Meta exposes this as comment_enabled on the media object). Applies to feed posts, Reels, and carousels; ignored for Stories, which have no comments. Works with both Instagram connection methods. Best-effort: if the toggle fails after a successful publish, the post still succeeds and stays live with comments on.
|
|
63
|
+
attr_accessor :comments_enabled
|
|
64
|
+
|
|
65
|
+
# Tags the post with a location. The ID of a Facebook Page that has location data (digits only); it is sent to Instagram as location_id. Applies to feed posts, Reels, and the carousel as a whole; Stories and individual carousel slides are unsupported (a Story with locationId is rejected with a 400). A Page without location data or that does not exist fails the post with a user error at publish time.
|
|
66
|
+
attr_accessor :location_id
|
|
67
|
+
|
|
56
68
|
class EnumAttributeValidator
|
|
57
69
|
attr_reader :datatype
|
|
58
70
|
attr_reader :allowable_values
|
|
@@ -90,7 +102,11 @@ module Zernio
|
|
|
90
102
|
:'thumb_offset' => :'thumbOffset',
|
|
91
103
|
:'instagram_thumbnail' => :'instagramThumbnail',
|
|
92
104
|
:'reel_cover' => :'reelCover',
|
|
93
|
-
:'is_ai_generated' => :'isAiGenerated'
|
|
105
|
+
:'is_ai_generated' => :'isAiGenerated',
|
|
106
|
+
:'is_paid_partnership' => :'isPaidPartnership',
|
|
107
|
+
:'branded_content_sponsors' => :'brandedContentSponsors',
|
|
108
|
+
:'comments_enabled' => :'commentsEnabled',
|
|
109
|
+
:'location_id' => :'locationId'
|
|
94
110
|
}
|
|
95
111
|
end
|
|
96
112
|
|
|
@@ -119,7 +135,11 @@ module Zernio
|
|
|
119
135
|
:'thumb_offset' => :'Integer',
|
|
120
136
|
:'instagram_thumbnail' => :'String',
|
|
121
137
|
:'reel_cover' => :'String',
|
|
122
|
-
:'is_ai_generated' => :'Boolean'
|
|
138
|
+
:'is_ai_generated' => :'Boolean',
|
|
139
|
+
:'is_paid_partnership' => :'Boolean',
|
|
140
|
+
:'branded_content_sponsors' => :'Array<String>',
|
|
141
|
+
:'comments_enabled' => :'Boolean',
|
|
142
|
+
:'location_id' => :'String'
|
|
123
143
|
}
|
|
124
144
|
end
|
|
125
145
|
|
|
@@ -206,6 +226,28 @@ module Zernio
|
|
|
206
226
|
else
|
|
207
227
|
self.is_ai_generated = false
|
|
208
228
|
end
|
|
229
|
+
|
|
230
|
+
if attributes.key?(:'is_paid_partnership')
|
|
231
|
+
self.is_paid_partnership = attributes[:'is_paid_partnership']
|
|
232
|
+
else
|
|
233
|
+
self.is_paid_partnership = false
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
if attributes.key?(:'branded_content_sponsors')
|
|
237
|
+
if (value = attributes[:'branded_content_sponsors']).is_a?(Array)
|
|
238
|
+
self.branded_content_sponsors = value
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
if attributes.key?(:'comments_enabled')
|
|
243
|
+
self.comments_enabled = attributes[:'comments_enabled']
|
|
244
|
+
else
|
|
245
|
+
self.comments_enabled = true
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
if attributes.key?(:'location_id')
|
|
249
|
+
self.location_id = attributes[:'location_id']
|
|
250
|
+
end
|
|
209
251
|
end
|
|
210
252
|
|
|
211
253
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -217,6 +259,15 @@ module Zernio
|
|
|
217
259
|
invalid_properties.push('invalid value for "thumb_offset", must be greater than or equal to 0.')
|
|
218
260
|
end
|
|
219
261
|
|
|
262
|
+
if !@branded_content_sponsors.nil? && @branded_content_sponsors.length > 2
|
|
263
|
+
invalid_properties.push('invalid value for "branded_content_sponsors", number of items must be less than or equal to 2.')
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
pattern = Regexp.new(/^[0-9]+$/)
|
|
267
|
+
if !@location_id.nil? && @location_id !~ pattern
|
|
268
|
+
invalid_properties.push("invalid value for \"location_id\", must conform to the pattern #{pattern}.")
|
|
269
|
+
end
|
|
270
|
+
|
|
220
271
|
invalid_properties
|
|
221
272
|
end
|
|
222
273
|
|
|
@@ -227,6 +278,8 @@ module Zernio
|
|
|
227
278
|
content_type_validator = EnumAttributeValidator.new('String', ["story"])
|
|
228
279
|
return false unless content_type_validator.valid?(@content_type)
|
|
229
280
|
return false if !@thumb_offset.nil? && @thumb_offset < 0
|
|
281
|
+
return false if !@branded_content_sponsors.nil? && @branded_content_sponsors.length > 2
|
|
282
|
+
return false if !@location_id.nil? && @location_id !~ Regexp.new(/^[0-9]+$/)
|
|
230
283
|
true
|
|
231
284
|
end
|
|
232
285
|
|
|
@@ -254,6 +307,35 @@ module Zernio
|
|
|
254
307
|
@thumb_offset = thumb_offset
|
|
255
308
|
end
|
|
256
309
|
|
|
310
|
+
# Custom attribute writer method with validation
|
|
311
|
+
# @param [Object] branded_content_sponsors Value to be assigned
|
|
312
|
+
def branded_content_sponsors=(branded_content_sponsors)
|
|
313
|
+
if branded_content_sponsors.nil?
|
|
314
|
+
fail ArgumentError, 'branded_content_sponsors cannot be nil'
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
if branded_content_sponsors.length > 2
|
|
318
|
+
fail ArgumentError, 'invalid value for "branded_content_sponsors", number of items must be less than or equal to 2.'
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
@branded_content_sponsors = branded_content_sponsors
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Custom attribute writer method with validation
|
|
325
|
+
# @param [Object] location_id Value to be assigned
|
|
326
|
+
def location_id=(location_id)
|
|
327
|
+
if location_id.nil?
|
|
328
|
+
fail ArgumentError, 'location_id cannot be nil'
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
pattern = Regexp.new(/^[0-9]+$/)
|
|
332
|
+
if location_id !~ pattern
|
|
333
|
+
fail ArgumentError, "invalid value for \"location_id\", must conform to the pattern #{pattern}."
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
@location_id = location_id
|
|
337
|
+
end
|
|
338
|
+
|
|
257
339
|
# Checks equality by comparing each attribute.
|
|
258
340
|
# @param [Object] Object to be compared
|
|
259
341
|
def ==(o)
|
|
@@ -271,7 +353,11 @@ module Zernio
|
|
|
271
353
|
thumb_offset == o.thumb_offset &&
|
|
272
354
|
instagram_thumbnail == o.instagram_thumbnail &&
|
|
273
355
|
reel_cover == o.reel_cover &&
|
|
274
|
-
is_ai_generated == o.is_ai_generated
|
|
356
|
+
is_ai_generated == o.is_ai_generated &&
|
|
357
|
+
is_paid_partnership == o.is_paid_partnership &&
|
|
358
|
+
branded_content_sponsors == o.branded_content_sponsors &&
|
|
359
|
+
comments_enabled == o.comments_enabled &&
|
|
360
|
+
location_id == o.location_id
|
|
275
361
|
end
|
|
276
362
|
|
|
277
363
|
# @see the `==` method
|
|
@@ -283,7 +369,7 @@ module Zernio
|
|
|
283
369
|
# Calculates hash code according to all attributes.
|
|
284
370
|
# @return [Integer] Hash code
|
|
285
371
|
def hash
|
|
286
|
-
[content_type, share_to_feed, collaborators, first_comment, trial_params, user_tags, audio_name, audio_configuration, mute_audio, thumb_offset, instagram_thumbnail, reel_cover, is_ai_generated].hash
|
|
372
|
+
[content_type, share_to_feed, collaborators, first_comment, trial_params, user_tags, audio_name, audio_configuration, mute_audio, thumb_offset, instagram_thumbnail, reel_cover, is_ai_generated, is_paid_partnership, branded_content_sponsors, comments_enabled, location_id].hash
|
|
287
373
|
end
|
|
288
374
|
|
|
289
375
|
# Builds the object from hash
|
|
@@ -16,9 +16,11 @@ require 'time'
|
|
|
16
16
|
module Zernio
|
|
17
17
|
# Platform-specific message context (present when the message is a quick reply tap, postback button tap, inline keyboard callback, or a quote-reply to an earlier message)
|
|
18
18
|
class WebhookPayloadMessageMetadata < ApiModelBase
|
|
19
|
-
#
|
|
19
|
+
# Raw platform envelope id (WhatsApp `context.id`; Instagram and Facebook Messenger `reply_to.mid`) of the message this one is a quote-reply to, forwarded verbatim. It may not equal the stored id of that message (see `quotedMessage.platformMessageId`). On outgoing messages the same field appears on `message.sent`, but only on some surfaces: see WebhookPayloadMessageSent.metadata.quotedMessageId.
|
|
20
20
|
attr_accessor :quoted_message_id
|
|
21
21
|
|
|
22
|
+
attr_accessor :quoted_message
|
|
23
|
+
|
|
22
24
|
# Payload from a quick reply tap (Facebook/Instagram Messenger).
|
|
23
25
|
attr_accessor :quick_reply_payload
|
|
24
26
|
|
|
@@ -97,6 +99,7 @@ module Zernio
|
|
|
97
99
|
def self.attribute_map
|
|
98
100
|
{
|
|
99
101
|
:'quoted_message_id' => :'quotedMessageId',
|
|
102
|
+
:'quoted_message' => :'quotedMessage',
|
|
100
103
|
:'quick_reply_payload' => :'quickReplyPayload',
|
|
101
104
|
:'postback_payload' => :'postbackPayload',
|
|
102
105
|
:'postback_title' => :'postbackTitle',
|
|
@@ -133,6 +136,7 @@ module Zernio
|
|
|
133
136
|
def self.openapi_types
|
|
134
137
|
{
|
|
135
138
|
:'quoted_message_id' => :'String',
|
|
139
|
+
:'quoted_message' => :'WebhookPayloadMessageMetadataQuotedMessage',
|
|
136
140
|
:'quick_reply_payload' => :'String',
|
|
137
141
|
:'postback_payload' => :'String',
|
|
138
142
|
:'postback_title' => :'String',
|
|
@@ -181,6 +185,10 @@ module Zernio
|
|
|
181
185
|
self.quoted_message_id = attributes[:'quoted_message_id']
|
|
182
186
|
end
|
|
183
187
|
|
|
188
|
+
if attributes.key?(:'quoted_message')
|
|
189
|
+
self.quoted_message = attributes[:'quoted_message']
|
|
190
|
+
end
|
|
191
|
+
|
|
184
192
|
if attributes.key?(:'quick_reply_payload')
|
|
185
193
|
self.quick_reply_payload = attributes[:'quick_reply_payload']
|
|
186
194
|
end
|
|
@@ -307,6 +315,7 @@ module Zernio
|
|
|
307
315
|
return true if self.equal?(o)
|
|
308
316
|
self.class == o.class &&
|
|
309
317
|
quoted_message_id == o.quoted_message_id &&
|
|
318
|
+
quoted_message == o.quoted_message &&
|
|
310
319
|
quick_reply_payload == o.quick_reply_payload &&
|
|
311
320
|
postback_payload == o.postback_payload &&
|
|
312
321
|
postback_title == o.postback_title &&
|
|
@@ -337,7 +346,7 @@ module Zernio
|
|
|
337
346
|
# Calculates hash code according to all attributes.
|
|
338
347
|
# @return [Integer] Hash code
|
|
339
348
|
def hash
|
|
340
|
-
[quoted_message_id, quick_reply_payload, postback_payload, postback_title, callback_data, interactive_type, interactive_id, button_payload, flow_response_json, flow_response_data, nfm_reply_name, order, referred_product, contacts, contacts_origin, story_reply, is_story_mention, referral, unsupported, no_renderable_content].hash
|
|
349
|
+
[quoted_message_id, quoted_message, quick_reply_payload, postback_payload, postback_title, callback_data, interactive_type, interactive_id, button_payload, flow_response_json, flow_response_data, nfm_reply_name, order, referred_product, contacts, contacts_origin, story_reply, is_story_mention, referral, unsupported, no_renderable_content].hash
|
|
341
350
|
end
|
|
342
351
|
|
|
343
352
|
# Builds the object from hash
|
|
@@ -0,0 +1,159 @@
|
|
|
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
|
+
# Zernio's own ids for the message this one quote-replies to. Present only when that message is stored; WhatsApp only today.
|
|
18
|
+
class WebhookPayloadMessageMetadataQuotedMessage < ApiModelBase
|
|
19
|
+
# Internal id of the stored quoted message.
|
|
20
|
+
attr_accessor :message_id
|
|
21
|
+
|
|
22
|
+
# The STORED message's platform id (what message.sent and list-messages return). Can differ from quotedMessageId, because Meta renders one message under a different wamid per perspective.
|
|
23
|
+
attr_accessor :platform_message_id
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'message_id' => :'messageId',
|
|
29
|
+
:'platform_message_id' => :'platformMessageId'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Returns all the JSON keys this model knows about
|
|
39
|
+
def self.acceptable_attributes
|
|
40
|
+
acceptable_attribute_map.values
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute type mapping.
|
|
44
|
+
def self.openapi_types
|
|
45
|
+
{
|
|
46
|
+
:'message_id' => :'String',
|
|
47
|
+
:'platform_message_id' => :'String'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# List of attributes with nullable: true
|
|
52
|
+
def self.openapi_nullable
|
|
53
|
+
Set.new([
|
|
54
|
+
])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Initializes the object
|
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
59
|
+
def initialize(attributes = {})
|
|
60
|
+
if (!attributes.is_a?(Hash))
|
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::WebhookPayloadMessageMetadataQuotedMessage` initialize method"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
65
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
67
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::WebhookPayloadMessageMetadataQuotedMessage`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
69
|
+
end
|
|
70
|
+
h[k.to_sym] = v
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if attributes.key?(:'message_id')
|
|
74
|
+
self.message_id = attributes[:'message_id']
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'platform_message_id')
|
|
78
|
+
self.platform_message_id = attributes[:'platform_message_id']
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
83
|
+
# @return Array for valid properties with the reasons
|
|
84
|
+
def list_invalid_properties
|
|
85
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
86
|
+
invalid_properties = Array.new
|
|
87
|
+
invalid_properties
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Check to see if the all the properties in the model are valid
|
|
91
|
+
# @return true if the model is valid
|
|
92
|
+
def valid?
|
|
93
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
94
|
+
true
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Checks equality by comparing each attribute.
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def ==(o)
|
|
100
|
+
return true if self.equal?(o)
|
|
101
|
+
self.class == o.class &&
|
|
102
|
+
message_id == o.message_id &&
|
|
103
|
+
platform_message_id == o.platform_message_id
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# @see the `==` method
|
|
107
|
+
# @param [Object] Object to be compared
|
|
108
|
+
def eql?(o)
|
|
109
|
+
self == o
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Calculates hash code according to all attributes.
|
|
113
|
+
# @return [Integer] Hash code
|
|
114
|
+
def hash
|
|
115
|
+
[message_id, platform_message_id].hash
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Builds the object from hash
|
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
120
|
+
# @return [Object] Returns the model itself
|
|
121
|
+
def self.build_from_hash(attributes)
|
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
|
123
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
124
|
+
transformed_hash = {}
|
|
125
|
+
openapi_types.each_pair do |key, type|
|
|
126
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
127
|
+
transformed_hash["#{key}"] = nil
|
|
128
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
129
|
+
# check to ensure the input is an array given that the attribute
|
|
130
|
+
# is documented as an array but the input is not
|
|
131
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
132
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
133
|
+
end
|
|
134
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
135
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
new(transformed_hash)
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Returns the object in the form of hash
|
|
142
|
+
# @return [Hash] Returns the object in the form of hash
|
|
143
|
+
def to_hash
|
|
144
|
+
hash = {}
|
|
145
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
146
|
+
value = self.send(attr)
|
|
147
|
+
if value.nil?
|
|
148
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
149
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
hash[param] = _to_hash(value)
|
|
153
|
+
end
|
|
154
|
+
hash
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -1684,6 +1684,7 @@ require 'zernio-sdk/models/webhook_payload_message_message_sender_instagram_prof
|
|
|
1684
1684
|
require 'zernio-sdk/models/webhook_payload_message_metadata'
|
|
1685
1685
|
require 'zernio-sdk/models/webhook_payload_message_metadata_order'
|
|
1686
1686
|
require 'zernio-sdk/models/webhook_payload_message_metadata_order_product_items_inner'
|
|
1687
|
+
require 'zernio-sdk/models/webhook_payload_message_metadata_quoted_message'
|
|
1687
1688
|
require 'zernio-sdk/models/webhook_payload_message_metadata_referral'
|
|
1688
1689
|
require 'zernio-sdk/models/webhook_payload_message_metadata_referral_ads_context_data'
|
|
1689
1690
|
require 'zernio-sdk/models/webhook_payload_message_metadata_referred_product'
|
data/openapi.yaml
CHANGED
|
@@ -3841,11 +3841,29 @@ components:
|
|
|
3841
3841
|
quotedMessageId:
|
|
3842
3842
|
type: string
|
|
3843
3843
|
description: |
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3844
|
+
Raw platform envelope id (WhatsApp `context.id`; Instagram and
|
|
3845
|
+
Facebook Messenger `reply_to.mid`) of the message this one is a
|
|
3846
|
+
quote-reply to, forwarded verbatim. It may not equal the stored
|
|
3847
|
+
id of that message (see `quotedMessage.platformMessageId`). On
|
|
3848
|
+
outgoing messages the same field appears on `message.sent`, but
|
|
3849
|
+
only on some surfaces: see
|
|
3848
3850
|
WebhookPayloadMessageSent.metadata.quotedMessageId.
|
|
3851
|
+
quotedMessage:
|
|
3852
|
+
type: object
|
|
3853
|
+
description: >-
|
|
3854
|
+
Zernio's own ids for the message this one quote-replies to.
|
|
3855
|
+
Present only when that message is stored; WhatsApp only today.
|
|
3856
|
+
properties:
|
|
3857
|
+
messageId:
|
|
3858
|
+
type: string
|
|
3859
|
+
description: Internal id of the stored quoted message.
|
|
3860
|
+
platformMessageId:
|
|
3861
|
+
type: string
|
|
3862
|
+
description: >-
|
|
3863
|
+
The STORED message's platform id (what message.sent and
|
|
3864
|
+
list-messages return). Can differ from quotedMessageId,
|
|
3865
|
+
because Meta renders one message under a different wamid
|
|
3866
|
+
per perspective.
|
|
3849
3867
|
quickReplyPayload:
|
|
3850
3868
|
type: string
|
|
3851
3869
|
description: Payload from a quick reply tap (Facebook/Instagram Messenger).
|
|
@@ -5837,6 +5855,27 @@ components:
|
|
|
5837
5855
|
type: boolean
|
|
5838
5856
|
default: false
|
|
5839
5857
|
description: When true, the post is labeled by Instagram as containing AI-generated media. Per Meta, this self-disclosure label is for AI-generated media, not AI-written captions. Applies to feed posts, Reels, Stories, and carousels.
|
|
5858
|
+
isPaidPartnership:
|
|
5859
|
+
type: boolean
|
|
5860
|
+
default: false
|
|
5861
|
+
description: 'When true, Instagram shows the "Paid partnership" label on the post. Applies to feed posts, Reels, and carousels; not supported on Stories (400). Requires an Instagram account connected via Facebook Login; classic Instagram Login accounts get a 400 (instagram_paid_partnership_requires_facebook_login). Implied when brandedContentSponsors is set.'
|
|
5862
|
+
example: true
|
|
5863
|
+
brandedContentSponsors:
|
|
5864
|
+
type: array
|
|
5865
|
+
maxItems: 2
|
|
5866
|
+
items: { type: string }
|
|
5867
|
+
description: 'Up to 2 brands to tag as sponsors, each an Instagram username (leading @ optional) or a numeric Instagram user ID. Usernames are resolved at publish time via the Business Discovery API on the publishing account; a sponsor that cannot be resolved (private, personal, or nonexistent account) fails the post with a user error naming it. Sponsors must be professional (Business or Creator) accounts. A brand that has pre-approved the creator shows as "Paid partnership with @brand" immediately; otherwise the plain label shows and the brand receives an approval request. Sets isPaidPartnership. Same login and content-type rules as isPaidPartnership.'
|
|
5868
|
+
example: ['nike', '17841400000000000']
|
|
5869
|
+
commentsEnabled:
|
|
5870
|
+
type: boolean
|
|
5871
|
+
default: true
|
|
5872
|
+
description: 'When false, comments are turned off on the post right after it is published (Meta exposes this as comment_enabled on the media object). Applies to feed posts, Reels, and carousels; ignored for Stories, which have no comments. Works with both Instagram connection methods. Best-effort: if the toggle fails after a successful publish, the post still succeeds and stays live with comments on.'
|
|
5873
|
+
example: false
|
|
5874
|
+
locationId:
|
|
5875
|
+
type: string
|
|
5876
|
+
pattern: '^[0-9]+$'
|
|
5877
|
+
description: 'Tags the post with a location. The ID of a Facebook Page that has location data (digits only); it is sent to Instagram as location_id. Applies to feed posts, Reels, and the carousel as a whole; Stories and individual carousel slides are unsupported (a Story with locationId is rejected with a 400). A Page without location data or that does not exist fails the post with a user error at publish time.'
|
|
5878
|
+
example: '105890561436614'
|
|
5840
5879
|
description: Feed aspect ratio 0.5625-1.91, carousels up to 10 items, stories require media (no captions). User tag coordinates 0.0-1.0 from top-left. Images over 8 MB and videos over platform limits are auto-compressed.
|
|
5841
5880
|
|
|
5842
5881
|
InstagramAudioAsset:
|
|
@@ -109,4 +109,28 @@ describe Zernio::InstagramPlatformData do
|
|
|
109
109
|
end
|
|
110
110
|
end
|
|
111
111
|
|
|
112
|
+
describe 'test attribute "is_paid_partnership"' do
|
|
113
|
+
it 'should work' do
|
|
114
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
describe 'test attribute "branded_content_sponsors"' do
|
|
119
|
+
it 'should work' do
|
|
120
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
describe 'test attribute "comments_enabled"' do
|
|
125
|
+
it 'should work' do
|
|
126
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
describe 'test attribute "location_id"' do
|
|
131
|
+
it 'should work' do
|
|
132
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
112
136
|
end
|
|
@@ -0,0 +1,42 @@
|
|
|
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::WebhookPayloadMessageMetadataQuotedMessage
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::WebhookPayloadMessageMetadataQuotedMessage do
|
|
21
|
+
#let(:instance) { Zernio::WebhookPayloadMessageMetadataQuotedMessage.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of WebhookPayloadMessageMetadataQuotedMessage' do
|
|
24
|
+
it 'should create an instance of WebhookPayloadMessageMetadataQuotedMessage' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::WebhookPayloadMessageMetadataQuotedMessage)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "message_id"' 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 "platform_message_id"' 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
|
+
end
|
|
@@ -33,6 +33,12 @@ describe Zernio::WebhookPayloadMessageMetadata do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "quoted_message"' 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
|
+
|
|
36
42
|
describe 'test attribute "quick_reply_payload"' do
|
|
37
43
|
it 'should work' do
|
|
38
44
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|