late-sdk 0.0.645 → 0.0.646
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 +2 -0
- data/docs/GetInboxConversation200ResponseData.md +3 -1
- data/docs/GetInboxConversation200ResponseDataMetadata.md +38 -0
- data/docs/ListInboxConversations200ResponseDataInner.md +3 -1
- data/docs/ListInboxConversations200ResponseDataInnerMetadata.md +50 -0
- data/lib/zernio-sdk/api/messages_api.rb +1 -1
- data/lib/zernio-sdk/models/get_inbox_conversation200_response_data.rb +13 -4
- data/lib/zernio-sdk/models/get_inbox_conversation200_response_data_metadata.rb +249 -0
- data/lib/zernio-sdk/models/list_inbox_conversations200_response_data_inner.rb +13 -4
- data/lib/zernio-sdk/models/list_inbox_conversations200_response_data_inner_metadata.rb +309 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +2 -0
- data/openapi.yaml +149 -1
- data/spec/models/get_inbox_conversation200_response_data_metadata_spec.rb +96 -0
- data/spec/models/get_inbox_conversation200_response_data_spec.rb +6 -0
- data/spec/models/list_inbox_conversations200_response_data_inner_metadata_spec.rb +132 -0
- data/spec/models/list_inbox_conversations200_response_data_inner_spec.rb +6 -0
- data/zernio-sdk-0.0.646.gem +0 -0
- metadata +10 -2
- data/zernio-sdk-0.0.645.gem +0 -0
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
# Ad-click attribution for a conversation that started from a Meta ad. Absent when the conversation did not originate from an ad click. Captured from the referral Meta attaches to the first inbound message after the click, which is the only message that carries it. If the same person later clicks a different ad, the original values are kept, so the first ad wins. One exception on WhatsApp: when Meta omits `ctwa_clid` from that referral, a later Meta automatic event can supply it and refresh `ctwa_captured_at`, so treat `ctwa_captured_at` as the time Zernio stored the value, not the time of the click. Two families of keys, one per surface. They never appear together: - `ctwa_*` is WhatsApp Click-to-WhatsApp. The ad ID is `ctwa_source_id`. There is no `meta_ad_id` on WhatsApp. - `meta_ad_*` is Instagram Click-to-Direct and Facebook Messenger Click-to-Message. The ad ID is `meta_ad_id`. `ctwa_clid` never appears on these platforms. Every key is optional and only the keys Meta supplied are returned, so read defensively. Meta does not send a campaign or ad set ID, so none is exposed here. More keys may be added over time. Treat any key you do not recognise as an opaque string. Key names differ from the `message.received` webhook on purpose. The webhook forwards Meta's referral verbatim (`ad_id`, `source`, `type`) while the stored conversation record uses the prefixed names below. Renaming either side would break existing integrations, so both spellings are kept.
|
|
18
|
+
class ListInboxConversations200ResponseDataInnerMetadata < ApiModelBase
|
|
19
|
+
# WhatsApp only. Meta's click identifier, the value to forward to the Meta Conversions API for Business Messaging. Meta omits it on some numbers, so a WhatsApp referral can arrive without it.
|
|
20
|
+
attr_accessor :ctwa_clid
|
|
21
|
+
|
|
22
|
+
# WhatsApp only. The Meta ad ID the user clicked. This is the WhatsApp equivalent of meta_ad_id.
|
|
23
|
+
attr_accessor :ctwa_source_id
|
|
24
|
+
|
|
25
|
+
# WhatsApp only. What the user clicked, as supplied by Meta (for example ad or post).
|
|
26
|
+
attr_accessor :ctwa_source_type
|
|
27
|
+
|
|
28
|
+
# WhatsApp only. Meta's URL for the ad that was clicked, normally an fb.me short link.
|
|
29
|
+
attr_accessor :ctwa_source_url
|
|
30
|
+
|
|
31
|
+
# WhatsApp only. Headline of the ad creative at click time.
|
|
32
|
+
attr_accessor :ctwa_headline
|
|
33
|
+
|
|
34
|
+
# WhatsApp only. When Zernio stored this referral. Always present when a WhatsApp referral was captured.
|
|
35
|
+
attr_accessor :ctwa_captured_at
|
|
36
|
+
|
|
37
|
+
# Instagram and Facebook only. The Meta ad ID the user clicked. Always present when an Instagram or Facebook referral was captured.
|
|
38
|
+
attr_accessor :meta_ad_id
|
|
39
|
+
|
|
40
|
+
# Instagram and Facebook only. Meta-supplied source identifier, for example ADS.
|
|
41
|
+
attr_accessor :meta_ad_source
|
|
42
|
+
|
|
43
|
+
# Instagram and Facebook only. Meta-supplied referral type, for example OPEN_THREAD.
|
|
44
|
+
attr_accessor :meta_ad_type
|
|
45
|
+
|
|
46
|
+
# Instagram and Facebook only. The ref parameter passed through from the ad creative.
|
|
47
|
+
attr_accessor :meta_ad_ref
|
|
48
|
+
|
|
49
|
+
# Instagram and Facebook only. Title of the ad creative at click time.
|
|
50
|
+
attr_accessor :meta_ad_title
|
|
51
|
+
|
|
52
|
+
# Instagram and Facebook only. Image of the ad creative at click time.
|
|
53
|
+
attr_accessor :meta_ad_photo_url
|
|
54
|
+
|
|
55
|
+
# Instagram and Facebook only. Video of the ad creative at click time.
|
|
56
|
+
attr_accessor :meta_ad_video_url
|
|
57
|
+
|
|
58
|
+
# Instagram and Facebook only. The organic post the ad promoted, when the ad was a boosted post.
|
|
59
|
+
attr_accessor :meta_ad_post_id
|
|
60
|
+
|
|
61
|
+
# Instagram and Facebook only. The catalogue product the user clicked, for product ads.
|
|
62
|
+
attr_accessor :meta_ad_product_id
|
|
63
|
+
|
|
64
|
+
# Instagram and Facebook only. The Meta flow the ad launched, for flow ads.
|
|
65
|
+
attr_accessor :meta_ad_flow_id
|
|
66
|
+
|
|
67
|
+
# Instagram and Facebook only. When Zernio stored this referral. Always present when an Instagram or Facebook referral was captured.
|
|
68
|
+
attr_accessor :meta_ad_captured_at
|
|
69
|
+
|
|
70
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
71
|
+
def self.attribute_map
|
|
72
|
+
{
|
|
73
|
+
:'ctwa_clid' => :'ctwa_clid',
|
|
74
|
+
:'ctwa_source_id' => :'ctwa_source_id',
|
|
75
|
+
:'ctwa_source_type' => :'ctwa_source_type',
|
|
76
|
+
:'ctwa_source_url' => :'ctwa_source_url',
|
|
77
|
+
:'ctwa_headline' => :'ctwa_headline',
|
|
78
|
+
:'ctwa_captured_at' => :'ctwa_captured_at',
|
|
79
|
+
:'meta_ad_id' => :'meta_ad_id',
|
|
80
|
+
:'meta_ad_source' => :'meta_ad_source',
|
|
81
|
+
:'meta_ad_type' => :'meta_ad_type',
|
|
82
|
+
:'meta_ad_ref' => :'meta_ad_ref',
|
|
83
|
+
:'meta_ad_title' => :'meta_ad_title',
|
|
84
|
+
:'meta_ad_photo_url' => :'meta_ad_photo_url',
|
|
85
|
+
:'meta_ad_video_url' => :'meta_ad_video_url',
|
|
86
|
+
:'meta_ad_post_id' => :'meta_ad_post_id',
|
|
87
|
+
:'meta_ad_product_id' => :'meta_ad_product_id',
|
|
88
|
+
:'meta_ad_flow_id' => :'meta_ad_flow_id',
|
|
89
|
+
:'meta_ad_captured_at' => :'meta_ad_captured_at'
|
|
90
|
+
}
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Returns attribute mapping this model knows about
|
|
94
|
+
def self.acceptable_attribute_map
|
|
95
|
+
attribute_map
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Returns all the JSON keys this model knows about
|
|
99
|
+
def self.acceptable_attributes
|
|
100
|
+
acceptable_attribute_map.values
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Attribute type mapping.
|
|
104
|
+
def self.openapi_types
|
|
105
|
+
{
|
|
106
|
+
:'ctwa_clid' => :'String',
|
|
107
|
+
:'ctwa_source_id' => :'String',
|
|
108
|
+
:'ctwa_source_type' => :'String',
|
|
109
|
+
:'ctwa_source_url' => :'String',
|
|
110
|
+
:'ctwa_headline' => :'String',
|
|
111
|
+
:'ctwa_captured_at' => :'Time',
|
|
112
|
+
:'meta_ad_id' => :'String',
|
|
113
|
+
:'meta_ad_source' => :'String',
|
|
114
|
+
:'meta_ad_type' => :'String',
|
|
115
|
+
:'meta_ad_ref' => :'String',
|
|
116
|
+
:'meta_ad_title' => :'String',
|
|
117
|
+
:'meta_ad_photo_url' => :'String',
|
|
118
|
+
:'meta_ad_video_url' => :'String',
|
|
119
|
+
:'meta_ad_post_id' => :'String',
|
|
120
|
+
:'meta_ad_product_id' => :'String',
|
|
121
|
+
:'meta_ad_flow_id' => :'String',
|
|
122
|
+
:'meta_ad_captured_at' => :'Time'
|
|
123
|
+
}
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# List of attributes with nullable: true
|
|
127
|
+
def self.openapi_nullable
|
|
128
|
+
Set.new([
|
|
129
|
+
])
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Initializes the object
|
|
133
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
134
|
+
def initialize(attributes = {})
|
|
135
|
+
if (!attributes.is_a?(Hash))
|
|
136
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ListInboxConversations200ResponseDataInnerMetadata` initialize method"
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
140
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
141
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
142
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
143
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ListInboxConversations200ResponseDataInnerMetadata`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
144
|
+
end
|
|
145
|
+
h[k.to_sym] = v
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
if attributes.key?(:'ctwa_clid')
|
|
149
|
+
self.ctwa_clid = attributes[:'ctwa_clid']
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if attributes.key?(:'ctwa_source_id')
|
|
153
|
+
self.ctwa_source_id = attributes[:'ctwa_source_id']
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if attributes.key?(:'ctwa_source_type')
|
|
157
|
+
self.ctwa_source_type = attributes[:'ctwa_source_type']
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if attributes.key?(:'ctwa_source_url')
|
|
161
|
+
self.ctwa_source_url = attributes[:'ctwa_source_url']
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if attributes.key?(:'ctwa_headline')
|
|
165
|
+
self.ctwa_headline = attributes[:'ctwa_headline']
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if attributes.key?(:'ctwa_captured_at')
|
|
169
|
+
self.ctwa_captured_at = attributes[:'ctwa_captured_at']
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if attributes.key?(:'meta_ad_id')
|
|
173
|
+
self.meta_ad_id = attributes[:'meta_ad_id']
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if attributes.key?(:'meta_ad_source')
|
|
177
|
+
self.meta_ad_source = attributes[:'meta_ad_source']
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if attributes.key?(:'meta_ad_type')
|
|
181
|
+
self.meta_ad_type = attributes[:'meta_ad_type']
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if attributes.key?(:'meta_ad_ref')
|
|
185
|
+
self.meta_ad_ref = attributes[:'meta_ad_ref']
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
if attributes.key?(:'meta_ad_title')
|
|
189
|
+
self.meta_ad_title = attributes[:'meta_ad_title']
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
if attributes.key?(:'meta_ad_photo_url')
|
|
193
|
+
self.meta_ad_photo_url = attributes[:'meta_ad_photo_url']
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
if attributes.key?(:'meta_ad_video_url')
|
|
197
|
+
self.meta_ad_video_url = attributes[:'meta_ad_video_url']
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
if attributes.key?(:'meta_ad_post_id')
|
|
201
|
+
self.meta_ad_post_id = attributes[:'meta_ad_post_id']
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
if attributes.key?(:'meta_ad_product_id')
|
|
205
|
+
self.meta_ad_product_id = attributes[:'meta_ad_product_id']
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
if attributes.key?(:'meta_ad_flow_id')
|
|
209
|
+
self.meta_ad_flow_id = attributes[:'meta_ad_flow_id']
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
if attributes.key?(:'meta_ad_captured_at')
|
|
213
|
+
self.meta_ad_captured_at = attributes[:'meta_ad_captured_at']
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
218
|
+
# @return Array for valid properties with the reasons
|
|
219
|
+
def list_invalid_properties
|
|
220
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
221
|
+
invalid_properties = Array.new
|
|
222
|
+
invalid_properties
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Check to see if the all the properties in the model are valid
|
|
226
|
+
# @return true if the model is valid
|
|
227
|
+
def valid?
|
|
228
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
229
|
+
true
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Checks equality by comparing each attribute.
|
|
233
|
+
# @param [Object] Object to be compared
|
|
234
|
+
def ==(o)
|
|
235
|
+
return true if self.equal?(o)
|
|
236
|
+
self.class == o.class &&
|
|
237
|
+
ctwa_clid == o.ctwa_clid &&
|
|
238
|
+
ctwa_source_id == o.ctwa_source_id &&
|
|
239
|
+
ctwa_source_type == o.ctwa_source_type &&
|
|
240
|
+
ctwa_source_url == o.ctwa_source_url &&
|
|
241
|
+
ctwa_headline == o.ctwa_headline &&
|
|
242
|
+
ctwa_captured_at == o.ctwa_captured_at &&
|
|
243
|
+
meta_ad_id == o.meta_ad_id &&
|
|
244
|
+
meta_ad_source == o.meta_ad_source &&
|
|
245
|
+
meta_ad_type == o.meta_ad_type &&
|
|
246
|
+
meta_ad_ref == o.meta_ad_ref &&
|
|
247
|
+
meta_ad_title == o.meta_ad_title &&
|
|
248
|
+
meta_ad_photo_url == o.meta_ad_photo_url &&
|
|
249
|
+
meta_ad_video_url == o.meta_ad_video_url &&
|
|
250
|
+
meta_ad_post_id == o.meta_ad_post_id &&
|
|
251
|
+
meta_ad_product_id == o.meta_ad_product_id &&
|
|
252
|
+
meta_ad_flow_id == o.meta_ad_flow_id &&
|
|
253
|
+
meta_ad_captured_at == o.meta_ad_captured_at
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# @see the `==` method
|
|
257
|
+
# @param [Object] Object to be compared
|
|
258
|
+
def eql?(o)
|
|
259
|
+
self == o
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# Calculates hash code according to all attributes.
|
|
263
|
+
# @return [Integer] Hash code
|
|
264
|
+
def hash
|
|
265
|
+
[ctwa_clid, ctwa_source_id, ctwa_source_type, ctwa_source_url, ctwa_headline, ctwa_captured_at, meta_ad_id, meta_ad_source, meta_ad_type, meta_ad_ref, meta_ad_title, meta_ad_photo_url, meta_ad_video_url, meta_ad_post_id, meta_ad_product_id, meta_ad_flow_id, meta_ad_captured_at].hash
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
# Builds the object from hash
|
|
269
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
270
|
+
# @return [Object] Returns the model itself
|
|
271
|
+
def self.build_from_hash(attributes)
|
|
272
|
+
return nil unless attributes.is_a?(Hash)
|
|
273
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
274
|
+
transformed_hash = {}
|
|
275
|
+
openapi_types.each_pair do |key, type|
|
|
276
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
277
|
+
transformed_hash["#{key}"] = nil
|
|
278
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
279
|
+
# check to ensure the input is an array given that the attribute
|
|
280
|
+
# is documented as an array but the input is not
|
|
281
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
282
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
283
|
+
end
|
|
284
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
285
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
286
|
+
end
|
|
287
|
+
end
|
|
288
|
+
new(transformed_hash)
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# Returns the object in the form of hash
|
|
292
|
+
# @return [Hash] Returns the object in the form of hash
|
|
293
|
+
def to_hash
|
|
294
|
+
hash = {}
|
|
295
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
296
|
+
value = self.send(attr)
|
|
297
|
+
if value.nil?
|
|
298
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
299
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
hash[param] = _to_hash(value)
|
|
303
|
+
end
|
|
304
|
+
hash
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -551,6 +551,7 @@ require 'zernio-sdk/models/get_google_business_verifications200_response_voice_o
|
|
|
551
551
|
require 'zernio-sdk/models/get_google_business_verifications200_response_voice_of_merchant_state_verify'
|
|
552
552
|
require 'zernio-sdk/models/get_inbox_conversation200_response'
|
|
553
553
|
require 'zernio-sdk/models/get_inbox_conversation200_response_data'
|
|
554
|
+
require 'zernio-sdk/models/get_inbox_conversation200_response_data_metadata'
|
|
554
555
|
require 'zernio-sdk/models/get_inbox_conversation_analytics200_response'
|
|
555
556
|
require 'zernio-sdk/models/get_inbox_conversation_analytics200_response_by_source_inner'
|
|
556
557
|
require 'zernio-sdk/models/get_inbox_conversation_analytics200_response_summary'
|
|
@@ -873,6 +874,7 @@ require 'zernio-sdk/models/list_inbox_conversation_analytics200_response_paginat
|
|
|
873
874
|
require 'zernio-sdk/models/list_inbox_conversations200_response'
|
|
874
875
|
require 'zernio-sdk/models/list_inbox_conversations200_response_data_inner'
|
|
875
876
|
require 'zernio-sdk/models/list_inbox_conversations200_response_data_inner_instagram_profile'
|
|
877
|
+
require 'zernio-sdk/models/list_inbox_conversations200_response_data_inner_metadata'
|
|
876
878
|
require 'zernio-sdk/models/list_inbox_conversations200_response_meta'
|
|
877
879
|
require 'zernio-sdk/models/list_inbox_conversations200_response_meta_failed_accounts_inner'
|
|
878
880
|
require 'zernio-sdk/models/list_inbox_conversations200_response_pagination'
|
data/openapi.yaml
CHANGED
|
@@ -22567,7 +22567,7 @@ paths:
|
|
|
22567
22567
|
description: Filter by profile ID
|
|
22568
22568
|
- name: platform
|
|
22569
22569
|
in: query
|
|
22570
|
-
schema: { type: string, enum: [facebook, instagram, twitter, bluesky, reddit, telegram] }
|
|
22570
|
+
schema: { type: string, enum: [facebook, instagram, twitter, bluesky, reddit, telegram, whatsapp] }
|
|
22571
22571
|
description: Filter by platform
|
|
22572
22572
|
- name: status
|
|
22573
22573
|
in: query
|
|
@@ -22642,6 +22642,92 @@ paths:
|
|
|
22642
22642
|
type: [string, "null"]
|
|
22643
22643
|
format: date-time
|
|
22644
22644
|
description: When this profile data was last fetched from Instagram
|
|
22645
|
+
metadata:
|
|
22646
|
+
type: [object, "null"]
|
|
22647
|
+
description: |
|
|
22648
|
+
Ad-click attribution for a conversation that started from a Meta ad.
|
|
22649
|
+
Absent when the conversation did not originate from an ad click.
|
|
22650
|
+
|
|
22651
|
+
Captured from the referral Meta attaches to the first inbound message
|
|
22652
|
+
after the click, which is the only message that carries it. If the same
|
|
22653
|
+
person later clicks a different ad, the original values are kept, so the
|
|
22654
|
+
first ad wins. One exception on WhatsApp: when Meta omits `ctwa_clid`
|
|
22655
|
+
from that referral, a later Meta automatic event can supply it and
|
|
22656
|
+
refresh `ctwa_captured_at`, so treat `ctwa_captured_at` as the time
|
|
22657
|
+
Zernio stored the value, not the time of the click.
|
|
22658
|
+
|
|
22659
|
+
Two families of keys, one per surface. They never appear together:
|
|
22660
|
+
|
|
22661
|
+
- `ctwa_*` is WhatsApp Click-to-WhatsApp. The ad ID is
|
|
22662
|
+
`ctwa_source_id`. There is no `meta_ad_id` on WhatsApp.
|
|
22663
|
+
- `meta_ad_*` is Instagram Click-to-Direct and Facebook Messenger
|
|
22664
|
+
Click-to-Message. The ad ID is `meta_ad_id`. `ctwa_clid` never
|
|
22665
|
+
appears on these platforms.
|
|
22666
|
+
|
|
22667
|
+
Every key is optional and only the keys Meta supplied are returned, so
|
|
22668
|
+
read defensively. Meta does not send a campaign or ad set ID, so none
|
|
22669
|
+
is exposed here. More keys may be added over time. Treat any key you
|
|
22670
|
+
do not recognise as an opaque string.
|
|
22671
|
+
|
|
22672
|
+
Key names differ from the `message.received` webhook on purpose. The
|
|
22673
|
+
webhook forwards Meta's referral verbatim (`ad_id`, `source`, `type`)
|
|
22674
|
+
while the stored conversation record uses the prefixed names below.
|
|
22675
|
+
Renaming either side would break existing integrations, so both
|
|
22676
|
+
spellings are kept.
|
|
22677
|
+
properties:
|
|
22678
|
+
ctwa_clid:
|
|
22679
|
+
type: string
|
|
22680
|
+
description: "WhatsApp only. Meta's click identifier, the value to forward to the Meta Conversions API for Business Messaging. Meta omits it on some numbers, so a WhatsApp referral can arrive without it."
|
|
22681
|
+
ctwa_source_id:
|
|
22682
|
+
type: string
|
|
22683
|
+
description: "WhatsApp only. The Meta ad ID the user clicked. This is the WhatsApp equivalent of meta_ad_id."
|
|
22684
|
+
ctwa_source_type:
|
|
22685
|
+
type: string
|
|
22686
|
+
description: "WhatsApp only. What the user clicked, as supplied by Meta (for example ad or post)."
|
|
22687
|
+
ctwa_source_url:
|
|
22688
|
+
type: string
|
|
22689
|
+
description: "WhatsApp only. Meta's URL for the ad that was clicked, normally an fb.me short link."
|
|
22690
|
+
ctwa_headline:
|
|
22691
|
+
type: string
|
|
22692
|
+
description: "WhatsApp only. Headline of the ad creative at click time."
|
|
22693
|
+
ctwa_captured_at:
|
|
22694
|
+
type: string
|
|
22695
|
+
format: date-time
|
|
22696
|
+
description: "WhatsApp only. When Zernio stored this referral. Always present when a WhatsApp referral was captured."
|
|
22697
|
+
meta_ad_id:
|
|
22698
|
+
type: string
|
|
22699
|
+
description: "Instagram and Facebook only. The Meta ad ID the user clicked. Always present when an Instagram or Facebook referral was captured."
|
|
22700
|
+
meta_ad_source:
|
|
22701
|
+
type: string
|
|
22702
|
+
description: "Instagram and Facebook only. Meta-supplied source identifier, for example ADS."
|
|
22703
|
+
meta_ad_type:
|
|
22704
|
+
type: string
|
|
22705
|
+
description: "Instagram and Facebook only. Meta-supplied referral type, for example OPEN_THREAD."
|
|
22706
|
+
meta_ad_ref:
|
|
22707
|
+
type: string
|
|
22708
|
+
description: "Instagram and Facebook only. The ref parameter passed through from the ad creative."
|
|
22709
|
+
meta_ad_title:
|
|
22710
|
+
type: string
|
|
22711
|
+
description: "Instagram and Facebook only. Title of the ad creative at click time."
|
|
22712
|
+
meta_ad_photo_url:
|
|
22713
|
+
type: string
|
|
22714
|
+
description: "Instagram and Facebook only. Image of the ad creative at click time."
|
|
22715
|
+
meta_ad_video_url:
|
|
22716
|
+
type: string
|
|
22717
|
+
description: "Instagram and Facebook only. Video of the ad creative at click time."
|
|
22718
|
+
meta_ad_post_id:
|
|
22719
|
+
type: string
|
|
22720
|
+
description: "Instagram and Facebook only. The organic post the ad promoted, when the ad was a boosted post."
|
|
22721
|
+
meta_ad_product_id:
|
|
22722
|
+
type: string
|
|
22723
|
+
description: "Instagram and Facebook only. The catalogue product the user clicked, for product ads."
|
|
22724
|
+
meta_ad_flow_id:
|
|
22725
|
+
type: string
|
|
22726
|
+
description: "Instagram and Facebook only. The Meta flow the ad launched, for flow ads."
|
|
22727
|
+
meta_ad_captured_at:
|
|
22728
|
+
type: string
|
|
22729
|
+
format: date-time
|
|
22730
|
+
description: "Instagram and Facebook only. When Zernio stored this referral. Always present when an Instagram or Facebook referral was captured."
|
|
22645
22731
|
pagination:
|
|
22646
22732
|
type: object
|
|
22647
22733
|
properties:
|
|
@@ -23028,6 +23114,68 @@ paths:
|
|
|
23028
23114
|
type: [string, "null"]
|
|
23029
23115
|
format: date-time
|
|
23030
23116
|
description: When this profile data was last fetched from Instagram
|
|
23117
|
+
metadata:
|
|
23118
|
+
type: [object, "null"]
|
|
23119
|
+
description: |
|
|
23120
|
+
Ad-click attribution for a conversation that started from a Meta ad.
|
|
23121
|
+
Absent when the conversation did not originate from an ad click.
|
|
23122
|
+
|
|
23123
|
+
Captured once, on the first inbound message after the click, and never
|
|
23124
|
+
overwritten. If the same person later clicks a different ad, the
|
|
23125
|
+
original values are kept. Meta only sends the referral on that first
|
|
23126
|
+
message.
|
|
23127
|
+
|
|
23128
|
+
This operation currently returns only the `meta_ad_*` family, which
|
|
23129
|
+
covers Instagram Click-to-Direct and Facebook Messenger
|
|
23130
|
+
Click-to-Message. WhatsApp Click-to-WhatsApp attribution (the `ctwa_*`
|
|
23131
|
+
keys, where the ad ID is `ctwa_source_id`) is returned by
|
|
23132
|
+
`GET /v1/inbox/conversations` instead.
|
|
23133
|
+
|
|
23134
|
+
Every key is optional and only the keys Meta supplied are returned, so
|
|
23135
|
+
read defensively. Meta does not send a campaign or ad set ID, so none is
|
|
23136
|
+
exposed here. More keys may be added over time. Treat any key you do not
|
|
23137
|
+
recognise as an opaque string.
|
|
23138
|
+
|
|
23139
|
+
Key names differ from the `message.received` webhook on purpose. The
|
|
23140
|
+
webhook forwards Meta's referral verbatim (`ad_id`, `source`, `type`)
|
|
23141
|
+
while the stored conversation record uses the prefixed names below.
|
|
23142
|
+
Renaming either side would break existing integrations, so both
|
|
23143
|
+
spellings are kept.
|
|
23144
|
+
properties:
|
|
23145
|
+
meta_ad_id:
|
|
23146
|
+
type: string
|
|
23147
|
+
description: "The Meta ad ID the user clicked. Always present when a referral was captured."
|
|
23148
|
+
meta_ad_source:
|
|
23149
|
+
type: string
|
|
23150
|
+
description: "Meta-supplied source identifier, for example ADS."
|
|
23151
|
+
meta_ad_type:
|
|
23152
|
+
type: string
|
|
23153
|
+
description: "Meta-supplied referral type, for example OPEN_THREAD."
|
|
23154
|
+
meta_ad_ref:
|
|
23155
|
+
type: string
|
|
23156
|
+
description: "The ref parameter passed through from the ad creative."
|
|
23157
|
+
meta_ad_title:
|
|
23158
|
+
type: string
|
|
23159
|
+
description: "Title of the ad creative at click time."
|
|
23160
|
+
meta_ad_photo_url:
|
|
23161
|
+
type: string
|
|
23162
|
+
description: "Image of the ad creative at click time."
|
|
23163
|
+
meta_ad_video_url:
|
|
23164
|
+
type: string
|
|
23165
|
+
description: "Video of the ad creative at click time."
|
|
23166
|
+
meta_ad_post_id:
|
|
23167
|
+
type: string
|
|
23168
|
+
description: "The organic post the ad promoted, when the ad was a boosted post."
|
|
23169
|
+
meta_ad_product_id:
|
|
23170
|
+
type: string
|
|
23171
|
+
description: "The catalogue product the user clicked, for product ads."
|
|
23172
|
+
meta_ad_flow_id:
|
|
23173
|
+
type: string
|
|
23174
|
+
description: "The Meta flow the ad launched, for flow ads."
|
|
23175
|
+
meta_ad_captured_at:
|
|
23176
|
+
type: string
|
|
23177
|
+
format: date-time
|
|
23178
|
+
description: "When Zernio stored this referral. Always present when a referral was captured."
|
|
23031
23179
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
23032
23180
|
'403':
|
|
23033
23181
|
description: Inbox addon required
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zernio::GetInboxConversation200ResponseDataMetadata
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::GetInboxConversation200ResponseDataMetadata do
|
|
21
|
+
#let(:instance) { Zernio::GetInboxConversation200ResponseDataMetadata.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of GetInboxConversation200ResponseDataMetadata' do
|
|
24
|
+
it 'should create an instance of GetInboxConversation200ResponseDataMetadata' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::GetInboxConversation200ResponseDataMetadata)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "meta_ad_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 "meta_ad_source"' 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 "meta_ad_type"' 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 "meta_ad_ref"' 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
|
+
describe 'test attribute "meta_ad_title"' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
describe 'test attribute "meta_ad_photo_url"' do
|
|
61
|
+
it 'should work' do
|
|
62
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
describe 'test attribute "meta_ad_video_url"' do
|
|
67
|
+
it 'should work' do
|
|
68
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
describe 'test attribute "meta_ad_post_id"' do
|
|
73
|
+
it 'should work' do
|
|
74
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
describe 'test attribute "meta_ad_product_id"' do
|
|
79
|
+
it 'should work' do
|
|
80
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
describe 'test attribute "meta_ad_flow_id"' do
|
|
85
|
+
it 'should work' do
|
|
86
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
describe 'test attribute "meta_ad_captured_at"' do
|
|
91
|
+
it 'should work' do
|
|
92
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
end
|
|
@@ -113,4 +113,10 @@ describe Zernio::GetInboxConversation200ResponseData do
|
|
|
113
113
|
end
|
|
114
114
|
end
|
|
115
115
|
|
|
116
|
+
describe 'test attribute "metadata"' do
|
|
117
|
+
it 'should work' do
|
|
118
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
|
|
116
122
|
end
|