late-sdk 0.0.680 → 0.0.682
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/Ad.md +2 -0
- data/docs/AdDailyMetrics.md +6 -0
- data/docs/AdEngagementCounts.md +34 -0
- data/docs/AdFunnelCounts.md +42 -0
- data/docs/AdMetrics.md +6 -0
- data/docs/CreateCommentAutomation200ResponseAutomation.md +5 -1
- data/docs/CreateCommentAutomationRequest.md +5 -1
- data/docs/GetCampaignAnalytics200ResponseAnalyticsDailyInner.md +6 -0
- data/docs/GetCommentAutomation200ResponseAutomation.md +5 -1
- data/docs/ListCommentAutomations200ResponseAutomationsInner.md +5 -1
- data/docs/UpdateCommentAutomation200ResponseAutomation.md +5 -1
- data/docs/UpdateCommentAutomationRequest.md +5 -1
- data/docs/WebhookEventsApi.md +2 -2
- data/lib/zernio-sdk/api/webhook_events_api.rb +4 -4
- data/lib/zernio-sdk/models/ad.rb +24 -1
- data/lib/zernio-sdk/models/ad_daily_metrics.rb +29 -1
- data/lib/zernio-sdk/models/ad_engagement_counts.rb +229 -0
- data/lib/zernio-sdk/models/ad_funnel_counts.rb +269 -0
- data/lib/zernio-sdk/models/ad_metrics.rb +29 -1
- data/lib/zernio-sdk/models/create_comment_automation200_response_automation.rb +26 -3
- data/lib/zernio-sdk/models/create_comment_automation_request.rb +26 -3
- data/lib/zernio-sdk/models/get_campaign_analytics200_response_analytics_daily_inner.rb +29 -1
- data/lib/zernio-sdk/models/get_comment_automation200_response_automation.rb +26 -3
- data/lib/zernio-sdk/models/list_comment_automations200_response_automations_inner.rb +26 -3
- data/lib/zernio-sdk/models/update_comment_automation200_response_automation.rb +26 -3
- data/lib/zernio-sdk/models/update_comment_automation_request.rb +26 -3
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +2 -0
- data/openapi.yaml +87 -9
- data/spec/models/ad_daily_metrics_spec.rb +18 -0
- data/spec/models/ad_engagement_counts_spec.rb +84 -0
- data/spec/models/ad_funnel_counts_spec.rb +108 -0
- data/spec/models/ad_metrics_spec.rb +18 -0
- data/spec/models/ad_spec.rb +10 -0
- data/spec/models/create_comment_automation200_response_automation_spec.rb +13 -1
- data/spec/models/create_comment_automation_request_spec.rb +13 -1
- data/spec/models/get_campaign_analytics200_response_analytics_daily_inner_spec.rb +18 -0
- data/spec/models/get_comment_automation200_response_automation_spec.rb +13 -1
- data/spec/models/list_comment_automations200_response_automations_inner_spec.rb +13 -1
- data/spec/models/update_comment_automation200_response_automation_spec.rb +13 -1
- data/spec/models/update_comment_automation_request_spec.rb +13 -1
- data/zernio-sdk-0.0.682.gem +0 -0
- metadata +1570 -1562
- data/zernio-sdk-0.0.680.gem +0 -0
|
@@ -0,0 +1,229 @@
|
|
|
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
|
+
# The single `engagement` total split into the interactions behind it. Note that `engagement` is not the sum of these: Meta's own `post_engagement` and `page_engagement` totals already contain the individual interactions, and all of them are counted into `engagement`. Use these fields when you need a specific interaction, and `engagement` only as the coarse total it has always been. Meta-only; other platforms leave these at 0.
|
|
18
|
+
class AdEngagementCounts < ApiModelBase
|
|
19
|
+
# Meta's own post-engagement total (`post_engagement`).
|
|
20
|
+
attr_accessor :post_engagement
|
|
21
|
+
|
|
22
|
+
# Meta's own page-engagement total (`page_engagement`).
|
|
23
|
+
attr_accessor :page_engagement
|
|
24
|
+
|
|
25
|
+
# Reactions on the ad's post (`post_reaction`).
|
|
26
|
+
attr_accessor :reactions
|
|
27
|
+
|
|
28
|
+
# Comments on the ad's post.
|
|
29
|
+
attr_accessor :comments
|
|
30
|
+
|
|
31
|
+
# Shares of the ad's post. Meta reports these under the action type literally named `post`.
|
|
32
|
+
attr_accessor :shares
|
|
33
|
+
|
|
34
|
+
# Saves of the ad's post (`onsite_conversion.post_save`).
|
|
35
|
+
attr_accessor :saves
|
|
36
|
+
|
|
37
|
+
# New Page likes attributed to the ad (`like`).
|
|
38
|
+
attr_accessor :page_likes
|
|
39
|
+
|
|
40
|
+
# 3-second video views (`video_view`). For completion-based counts use `videoThruplayWatchedActions`.
|
|
41
|
+
attr_accessor :video_views
|
|
42
|
+
|
|
43
|
+
# Attributed link clicks (`link_click`). This is the attribution-window count, which differs from the in-session `inline_link_clicks` reported by `GET /v1/ads/{adId}/analytics`.
|
|
44
|
+
attr_accessor :link_clicks
|
|
45
|
+
|
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
|
+
def self.attribute_map
|
|
48
|
+
{
|
|
49
|
+
:'post_engagement' => :'postEngagement',
|
|
50
|
+
:'page_engagement' => :'pageEngagement',
|
|
51
|
+
:'reactions' => :'reactions',
|
|
52
|
+
:'comments' => :'comments',
|
|
53
|
+
:'shares' => :'shares',
|
|
54
|
+
:'saves' => :'saves',
|
|
55
|
+
:'page_likes' => :'pageLikes',
|
|
56
|
+
:'video_views' => :'videoViews',
|
|
57
|
+
:'link_clicks' => :'linkClicks'
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Returns attribute mapping this model knows about
|
|
62
|
+
def self.acceptable_attribute_map
|
|
63
|
+
attribute_map
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Returns all the JSON keys this model knows about
|
|
67
|
+
def self.acceptable_attributes
|
|
68
|
+
acceptable_attribute_map.values
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Attribute type mapping.
|
|
72
|
+
def self.openapi_types
|
|
73
|
+
{
|
|
74
|
+
:'post_engagement' => :'Integer',
|
|
75
|
+
:'page_engagement' => :'Integer',
|
|
76
|
+
:'reactions' => :'Integer',
|
|
77
|
+
:'comments' => :'Integer',
|
|
78
|
+
:'shares' => :'Integer',
|
|
79
|
+
:'saves' => :'Integer',
|
|
80
|
+
:'page_likes' => :'Integer',
|
|
81
|
+
:'video_views' => :'Integer',
|
|
82
|
+
:'link_clicks' => :'Integer'
|
|
83
|
+
}
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# List of attributes with nullable: true
|
|
87
|
+
def self.openapi_nullable
|
|
88
|
+
Set.new([
|
|
89
|
+
])
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Initializes the object
|
|
93
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
94
|
+
def initialize(attributes = {})
|
|
95
|
+
if (!attributes.is_a?(Hash))
|
|
96
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AdEngagementCounts` initialize method"
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
100
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
101
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
102
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
103
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AdEngagementCounts`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
104
|
+
end
|
|
105
|
+
h[k.to_sym] = v
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'post_engagement')
|
|
109
|
+
self.post_engagement = attributes[:'post_engagement']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'page_engagement')
|
|
113
|
+
self.page_engagement = attributes[:'page_engagement']
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'reactions')
|
|
117
|
+
self.reactions = attributes[:'reactions']
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'comments')
|
|
121
|
+
self.comments = attributes[:'comments']
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'shares')
|
|
125
|
+
self.shares = attributes[:'shares']
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if attributes.key?(:'saves')
|
|
129
|
+
self.saves = attributes[:'saves']
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if attributes.key?(:'page_likes')
|
|
133
|
+
self.page_likes = attributes[:'page_likes']
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if attributes.key?(:'video_views')
|
|
137
|
+
self.video_views = attributes[:'video_views']
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if attributes.key?(:'link_clicks')
|
|
141
|
+
self.link_clicks = attributes[:'link_clicks']
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
146
|
+
# @return Array for valid properties with the reasons
|
|
147
|
+
def list_invalid_properties
|
|
148
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
149
|
+
invalid_properties = Array.new
|
|
150
|
+
invalid_properties
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Check to see if the all the properties in the model are valid
|
|
154
|
+
# @return true if the model is valid
|
|
155
|
+
def valid?
|
|
156
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
157
|
+
true
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Checks equality by comparing each attribute.
|
|
161
|
+
# @param [Object] Object to be compared
|
|
162
|
+
def ==(o)
|
|
163
|
+
return true if self.equal?(o)
|
|
164
|
+
self.class == o.class &&
|
|
165
|
+
post_engagement == o.post_engagement &&
|
|
166
|
+
page_engagement == o.page_engagement &&
|
|
167
|
+
reactions == o.reactions &&
|
|
168
|
+
comments == o.comments &&
|
|
169
|
+
shares == o.shares &&
|
|
170
|
+
saves == o.saves &&
|
|
171
|
+
page_likes == o.page_likes &&
|
|
172
|
+
video_views == o.video_views &&
|
|
173
|
+
link_clicks == o.link_clicks
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# @see the `==` method
|
|
177
|
+
# @param [Object] Object to be compared
|
|
178
|
+
def eql?(o)
|
|
179
|
+
self == o
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Calculates hash code according to all attributes.
|
|
183
|
+
# @return [Integer] Hash code
|
|
184
|
+
def hash
|
|
185
|
+
[post_engagement, page_engagement, reactions, comments, shares, saves, page_likes, video_views, link_clicks].hash
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Builds the object from hash
|
|
189
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
190
|
+
# @return [Object] Returns the model itself
|
|
191
|
+
def self.build_from_hash(attributes)
|
|
192
|
+
return nil unless attributes.is_a?(Hash)
|
|
193
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
194
|
+
transformed_hash = {}
|
|
195
|
+
openapi_types.each_pair do |key, type|
|
|
196
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
197
|
+
transformed_hash["#{key}"] = nil
|
|
198
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
199
|
+
# check to ensure the input is an array given that the attribute
|
|
200
|
+
# is documented as an array but the input is not
|
|
201
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
202
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
203
|
+
end
|
|
204
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
205
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
new(transformed_hash)
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Returns the object in the form of hash
|
|
212
|
+
# @return [Hash] Returns the object in the form of hash
|
|
213
|
+
def to_hash
|
|
214
|
+
hash = {}
|
|
215
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
216
|
+
value = self.send(attr)
|
|
217
|
+
if value.nil?
|
|
218
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
219
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
hash[param] = _to_hash(value)
|
|
223
|
+
end
|
|
224
|
+
hash
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
end
|
|
@@ -0,0 +1,269 @@
|
|
|
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
|
+
# Named conversion-funnel steps, resolved from the same data as `actions` so you never have to parse action-type strings yourself. Meta reports one event under several action types at once (`offsite_conversion.fb_pixel_purchase`, `omni_purchase`, `purchase`, …). Each field below takes the FIRST family member present rather than summing them, which is what makes these counts safe to add up — summing the raw `actions` keys yourself double or triple counts. The same priority order backs `conversions`, so a purchase-optimised campaign reports the identical number in `conversions` and `funnel.purchases`. Every field is 0 when that step never fired. Populated for Meta ads; other platforms report a different action taxonomy and generally leave these at 0 (read `actions` for those). At ad-set and campaign level each step is summed from its per-ad values.
|
|
18
|
+
class AdFunnelCounts < ApiModelBase
|
|
19
|
+
# Landing page views — the visitor actually loaded the destination, unlike a link click. Meta `landing_page_view`.
|
|
20
|
+
attr_accessor :landing_page_views
|
|
21
|
+
|
|
22
|
+
# Content views (Meta `ViewContent` pixel event).
|
|
23
|
+
attr_accessor :content_views
|
|
24
|
+
|
|
25
|
+
# On-site searches (Meta `Search` pixel event).
|
|
26
|
+
attr_accessor :searches
|
|
27
|
+
|
|
28
|
+
# Adds to wishlist (Meta `AddToWishlist` pixel event).
|
|
29
|
+
attr_accessor :wishlist_adds
|
|
30
|
+
|
|
31
|
+
# Adds to cart (Meta `AddToCart` pixel event).
|
|
32
|
+
attr_accessor :cart_adds
|
|
33
|
+
|
|
34
|
+
# Checkouts started (Meta `InitiateCheckout` pixel event).
|
|
35
|
+
attr_accessor :checkouts_initiated
|
|
36
|
+
|
|
37
|
+
# Payment details added at checkout (Meta `AddPaymentInfo` pixel event).
|
|
38
|
+
attr_accessor :payment_info_adds
|
|
39
|
+
|
|
40
|
+
# Purchases (Meta `Purchase` pixel event). Pair with `purchaseValue` for revenue.
|
|
41
|
+
attr_accessor :purchases
|
|
42
|
+
|
|
43
|
+
# Leads, from either the website pixel or an instant form — whichever the ad uses.
|
|
44
|
+
attr_accessor :leads
|
|
45
|
+
|
|
46
|
+
# Completed registrations (Meta `CompleteRegistration` pixel event).
|
|
47
|
+
attr_accessor :registrations_completed
|
|
48
|
+
|
|
49
|
+
# Mobile app installs attributed to the ad.
|
|
50
|
+
attr_accessor :app_installs
|
|
51
|
+
|
|
52
|
+
# Messaging conversations started within 7 days — the headline metric for click-to-WhatsApp and click-to-Messenger ads.
|
|
53
|
+
attr_accessor :messaging_conversations_started
|
|
54
|
+
|
|
55
|
+
# Messaging threads where the person sent a first reply.
|
|
56
|
+
attr_accessor :messaging_first_replies
|
|
57
|
+
|
|
58
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
59
|
+
def self.attribute_map
|
|
60
|
+
{
|
|
61
|
+
:'landing_page_views' => :'landingPageViews',
|
|
62
|
+
:'content_views' => :'contentViews',
|
|
63
|
+
:'searches' => :'searches',
|
|
64
|
+
:'wishlist_adds' => :'wishlistAdds',
|
|
65
|
+
:'cart_adds' => :'cartAdds',
|
|
66
|
+
:'checkouts_initiated' => :'checkoutsInitiated',
|
|
67
|
+
:'payment_info_adds' => :'paymentInfoAdds',
|
|
68
|
+
:'purchases' => :'purchases',
|
|
69
|
+
:'leads' => :'leads',
|
|
70
|
+
:'registrations_completed' => :'registrationsCompleted',
|
|
71
|
+
:'app_installs' => :'appInstalls',
|
|
72
|
+
:'messaging_conversations_started' => :'messagingConversationsStarted',
|
|
73
|
+
:'messaging_first_replies' => :'messagingFirstReplies'
|
|
74
|
+
}
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Returns attribute mapping this model knows about
|
|
78
|
+
def self.acceptable_attribute_map
|
|
79
|
+
attribute_map
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Returns all the JSON keys this model knows about
|
|
83
|
+
def self.acceptable_attributes
|
|
84
|
+
acceptable_attribute_map.values
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Attribute type mapping.
|
|
88
|
+
def self.openapi_types
|
|
89
|
+
{
|
|
90
|
+
:'landing_page_views' => :'Integer',
|
|
91
|
+
:'content_views' => :'Integer',
|
|
92
|
+
:'searches' => :'Integer',
|
|
93
|
+
:'wishlist_adds' => :'Integer',
|
|
94
|
+
:'cart_adds' => :'Integer',
|
|
95
|
+
:'checkouts_initiated' => :'Integer',
|
|
96
|
+
:'payment_info_adds' => :'Integer',
|
|
97
|
+
:'purchases' => :'Integer',
|
|
98
|
+
:'leads' => :'Integer',
|
|
99
|
+
:'registrations_completed' => :'Integer',
|
|
100
|
+
:'app_installs' => :'Integer',
|
|
101
|
+
:'messaging_conversations_started' => :'Integer',
|
|
102
|
+
:'messaging_first_replies' => :'Integer'
|
|
103
|
+
}
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# List of attributes with nullable: true
|
|
107
|
+
def self.openapi_nullable
|
|
108
|
+
Set.new([
|
|
109
|
+
])
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Initializes the object
|
|
113
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
114
|
+
def initialize(attributes = {})
|
|
115
|
+
if (!attributes.is_a?(Hash))
|
|
116
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AdFunnelCounts` initialize method"
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
120
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
121
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
122
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
123
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AdFunnelCounts`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
124
|
+
end
|
|
125
|
+
h[k.to_sym] = v
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if attributes.key?(:'landing_page_views')
|
|
129
|
+
self.landing_page_views = attributes[:'landing_page_views']
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if attributes.key?(:'content_views')
|
|
133
|
+
self.content_views = attributes[:'content_views']
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if attributes.key?(:'searches')
|
|
137
|
+
self.searches = attributes[:'searches']
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if attributes.key?(:'wishlist_adds')
|
|
141
|
+
self.wishlist_adds = attributes[:'wishlist_adds']
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if attributes.key?(:'cart_adds')
|
|
145
|
+
self.cart_adds = attributes[:'cart_adds']
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if attributes.key?(:'checkouts_initiated')
|
|
149
|
+
self.checkouts_initiated = attributes[:'checkouts_initiated']
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if attributes.key?(:'payment_info_adds')
|
|
153
|
+
self.payment_info_adds = attributes[:'payment_info_adds']
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if attributes.key?(:'purchases')
|
|
157
|
+
self.purchases = attributes[:'purchases']
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if attributes.key?(:'leads')
|
|
161
|
+
self.leads = attributes[:'leads']
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if attributes.key?(:'registrations_completed')
|
|
165
|
+
self.registrations_completed = attributes[:'registrations_completed']
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if attributes.key?(:'app_installs')
|
|
169
|
+
self.app_installs = attributes[:'app_installs']
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if attributes.key?(:'messaging_conversations_started')
|
|
173
|
+
self.messaging_conversations_started = attributes[:'messaging_conversations_started']
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if attributes.key?(:'messaging_first_replies')
|
|
177
|
+
self.messaging_first_replies = attributes[:'messaging_first_replies']
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
182
|
+
# @return Array for valid properties with the reasons
|
|
183
|
+
def list_invalid_properties
|
|
184
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
185
|
+
invalid_properties = Array.new
|
|
186
|
+
invalid_properties
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Check to see if the all the properties in the model are valid
|
|
190
|
+
# @return true if the model is valid
|
|
191
|
+
def valid?
|
|
192
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
193
|
+
true
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Checks equality by comparing each attribute.
|
|
197
|
+
# @param [Object] Object to be compared
|
|
198
|
+
def ==(o)
|
|
199
|
+
return true if self.equal?(o)
|
|
200
|
+
self.class == o.class &&
|
|
201
|
+
landing_page_views == o.landing_page_views &&
|
|
202
|
+
content_views == o.content_views &&
|
|
203
|
+
searches == o.searches &&
|
|
204
|
+
wishlist_adds == o.wishlist_adds &&
|
|
205
|
+
cart_adds == o.cart_adds &&
|
|
206
|
+
checkouts_initiated == o.checkouts_initiated &&
|
|
207
|
+
payment_info_adds == o.payment_info_adds &&
|
|
208
|
+
purchases == o.purchases &&
|
|
209
|
+
leads == o.leads &&
|
|
210
|
+
registrations_completed == o.registrations_completed &&
|
|
211
|
+
app_installs == o.app_installs &&
|
|
212
|
+
messaging_conversations_started == o.messaging_conversations_started &&
|
|
213
|
+
messaging_first_replies == o.messaging_first_replies
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# @see the `==` method
|
|
217
|
+
# @param [Object] Object to be compared
|
|
218
|
+
def eql?(o)
|
|
219
|
+
self == o
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Calculates hash code according to all attributes.
|
|
223
|
+
# @return [Integer] Hash code
|
|
224
|
+
def hash
|
|
225
|
+
[landing_page_views, content_views, searches, wishlist_adds, cart_adds, checkouts_initiated, payment_info_adds, purchases, leads, registrations_completed, app_installs, messaging_conversations_started, messaging_first_replies].hash
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Builds the object from hash
|
|
229
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
230
|
+
# @return [Object] Returns the model itself
|
|
231
|
+
def self.build_from_hash(attributes)
|
|
232
|
+
return nil unless attributes.is_a?(Hash)
|
|
233
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
234
|
+
transformed_hash = {}
|
|
235
|
+
openapi_types.each_pair do |key, type|
|
|
236
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
237
|
+
transformed_hash["#{key}"] = nil
|
|
238
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
239
|
+
# check to ensure the input is an array given that the attribute
|
|
240
|
+
# is documented as an array but the input is not
|
|
241
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
242
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
243
|
+
end
|
|
244
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
245
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
246
|
+
end
|
|
247
|
+
end
|
|
248
|
+
new(transformed_hash)
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# Returns the object in the form of hash
|
|
252
|
+
# @return [Hash] Returns the object in the form of hash
|
|
253
|
+
def to_hash
|
|
254
|
+
hash = {}
|
|
255
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
256
|
+
value = self.send(attr)
|
|
257
|
+
if value.nil?
|
|
258
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
259
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
hash[param] = _to_hash(value)
|
|
263
|
+
end
|
|
264
|
+
hash
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
end
|
|
@@ -80,6 +80,13 @@ module Zernio
|
|
|
80
80
|
# Average seconds watched per play (Meta `video_avg_time_watched_actions`). Aggregated over date ranges and across children as a play-weighted average (total watch time / total plays), never a plain average of averages.
|
|
81
81
|
attr_accessor :video_avg_time_watched_actions
|
|
82
82
|
|
|
83
|
+
# Derived `spend / videoThruplayWatchedActions`, in ad-account native currency. Rounded to 4 decimals rather than the usual 2 because a ThruPlay routinely costs well under a cent. 0 when the ad has no ThruPlays.
|
|
84
|
+
attr_accessor :cost_per_thruplay
|
|
85
|
+
|
|
86
|
+
attr_accessor :funnel
|
|
87
|
+
|
|
88
|
+
attr_accessor :engagement_breakdown
|
|
89
|
+
|
|
83
90
|
# Present on individual ads only, not on campaign aggregations
|
|
84
91
|
attr_accessor :last_synced_at
|
|
85
92
|
|
|
@@ -109,6 +116,9 @@ module Zernio
|
|
|
109
116
|
:'video_p95_watched_actions' => :'videoP95WatchedActions',
|
|
110
117
|
:'video_p100_watched_actions' => :'videoP100WatchedActions',
|
|
111
118
|
:'video_avg_time_watched_actions' => :'videoAvgTimeWatchedActions',
|
|
119
|
+
:'cost_per_thruplay' => :'costPerThruplay',
|
|
120
|
+
:'funnel' => :'funnel',
|
|
121
|
+
:'engagement_breakdown' => :'engagementBreakdown',
|
|
112
122
|
:'last_synced_at' => :'lastSyncedAt'
|
|
113
123
|
}
|
|
114
124
|
end
|
|
@@ -149,6 +159,9 @@ module Zernio
|
|
|
149
159
|
:'video_p95_watched_actions' => :'Integer',
|
|
150
160
|
:'video_p100_watched_actions' => :'Integer',
|
|
151
161
|
:'video_avg_time_watched_actions' => :'Float',
|
|
162
|
+
:'cost_per_thruplay' => :'Float',
|
|
163
|
+
:'funnel' => :'AdFunnelCounts',
|
|
164
|
+
:'engagement_breakdown' => :'AdEngagementCounts',
|
|
152
165
|
:'last_synced_at' => :'Time'
|
|
153
166
|
}
|
|
154
167
|
end
|
|
@@ -271,6 +284,18 @@ module Zernio
|
|
|
271
284
|
self.video_avg_time_watched_actions = attributes[:'video_avg_time_watched_actions']
|
|
272
285
|
end
|
|
273
286
|
|
|
287
|
+
if attributes.key?(:'cost_per_thruplay')
|
|
288
|
+
self.cost_per_thruplay = attributes[:'cost_per_thruplay']
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
if attributes.key?(:'funnel')
|
|
292
|
+
self.funnel = attributes[:'funnel']
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
if attributes.key?(:'engagement_breakdown')
|
|
296
|
+
self.engagement_breakdown = attributes[:'engagement_breakdown']
|
|
297
|
+
end
|
|
298
|
+
|
|
274
299
|
if attributes.key?(:'last_synced_at')
|
|
275
300
|
self.last_synced_at = attributes[:'last_synced_at']
|
|
276
301
|
end
|
|
@@ -319,6 +344,9 @@ module Zernio
|
|
|
319
344
|
video_p95_watched_actions == o.video_p95_watched_actions &&
|
|
320
345
|
video_p100_watched_actions == o.video_p100_watched_actions &&
|
|
321
346
|
video_avg_time_watched_actions == o.video_avg_time_watched_actions &&
|
|
347
|
+
cost_per_thruplay == o.cost_per_thruplay &&
|
|
348
|
+
funnel == o.funnel &&
|
|
349
|
+
engagement_breakdown == o.engagement_breakdown &&
|
|
322
350
|
last_synced_at == o.last_synced_at
|
|
323
351
|
end
|
|
324
352
|
|
|
@@ -331,7 +359,7 @@ module Zernio
|
|
|
331
359
|
# Calculates hash code according to all attributes.
|
|
332
360
|
# @return [Integer] Hash code
|
|
333
361
|
def hash
|
|
334
|
-
[spend, impressions, reach, clicks, ctr, cpc, cpm, engagement, conversions, cost_per_conversion, actions, action_values, purchase_value, roas, video_play_actions, video30_sec_watched_actions, video_thruplay_watched_actions, video_p25_watched_actions, video_p50_watched_actions, video_p75_watched_actions, video_p95_watched_actions, video_p100_watched_actions, video_avg_time_watched_actions, last_synced_at].hash
|
|
362
|
+
[spend, impressions, reach, clicks, ctr, cpc, cpm, engagement, conversions, cost_per_conversion, actions, action_values, purchase_value, roas, video_play_actions, video30_sec_watched_actions, video_thruplay_watched_actions, video_p25_watched_actions, video_p50_watched_actions, video_p75_watched_actions, video_p95_watched_actions, video_p100_watched_actions, video_avg_time_watched_actions, cost_per_thruplay, funnel, engagement_breakdown, last_synced_at].hash
|
|
335
363
|
end
|
|
336
364
|
|
|
337
365
|
# Builds the object from hash
|
|
@@ -27,8 +27,15 @@ module Zernio
|
|
|
27
27
|
|
|
28
28
|
attr_accessor :keywords
|
|
29
29
|
|
|
30
|
+
# How a keyword is compared with the comment. 'contains' (default) matches anywhere, even inside another word (keyword 'app' fires on 'happy'). 'word' matches the keyword only as a standalone word. 'exact' requires the whole comment to be exactly the keyword.
|
|
30
31
|
attr_accessor :match_mode
|
|
31
32
|
|
|
33
|
+
# Comments containing one of these never trigger the automation, even when a trigger keyword also matches. Compared using the same matchMode.
|
|
34
|
+
attr_accessor :exclude_keywords
|
|
35
|
+
|
|
36
|
+
# Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched.
|
|
37
|
+
attr_accessor :typo_tolerance
|
|
38
|
+
|
|
32
39
|
attr_accessor :dm_message
|
|
33
40
|
|
|
34
41
|
# Inline DM buttons (up to 3). Omitted when none are set.
|
|
@@ -84,6 +91,8 @@ module Zernio
|
|
|
84
91
|
:'platform_post_id' => :'platformPostId',
|
|
85
92
|
:'keywords' => :'keywords',
|
|
86
93
|
:'match_mode' => :'matchMode',
|
|
94
|
+
:'exclude_keywords' => :'excludeKeywords',
|
|
95
|
+
:'typo_tolerance' => :'typoTolerance',
|
|
87
96
|
:'dm_message' => :'dmMessage',
|
|
88
97
|
:'buttons' => :'buttons',
|
|
89
98
|
:'comment_reply' => :'commentReply',
|
|
@@ -117,6 +126,8 @@ module Zernio
|
|
|
117
126
|
:'platform_post_id' => :'String',
|
|
118
127
|
:'keywords' => :'Array<String>',
|
|
119
128
|
:'match_mode' => :'String',
|
|
129
|
+
:'exclude_keywords' => :'Array<String>',
|
|
130
|
+
:'typo_tolerance' => :'Boolean',
|
|
120
131
|
:'dm_message' => :'String',
|
|
121
132
|
:'buttons' => :'Array<DmButton>',
|
|
122
133
|
:'comment_reply' => :'String',
|
|
@@ -182,6 +193,16 @@ module Zernio
|
|
|
182
193
|
self.match_mode = attributes[:'match_mode']
|
|
183
194
|
end
|
|
184
195
|
|
|
196
|
+
if attributes.key?(:'exclude_keywords')
|
|
197
|
+
if (value = attributes[:'exclude_keywords']).is_a?(Array)
|
|
198
|
+
self.exclude_keywords = value
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
if attributes.key?(:'typo_tolerance')
|
|
203
|
+
self.typo_tolerance = attributes[:'typo_tolerance']
|
|
204
|
+
end
|
|
205
|
+
|
|
185
206
|
if attributes.key?(:'dm_message')
|
|
186
207
|
self.dm_message = attributes[:'dm_message']
|
|
187
208
|
end
|
|
@@ -243,7 +264,7 @@ module Zernio
|
|
|
243
264
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
244
265
|
trigger_validator = EnumAttributeValidator.new('String', ["comment", "story_reply"])
|
|
245
266
|
return false unless trigger_validator.valid?(@trigger)
|
|
246
|
-
match_mode_validator = EnumAttributeValidator.new('String', ["exact", "contains"])
|
|
267
|
+
match_mode_validator = EnumAttributeValidator.new('String', ["exact", "contains", "word"])
|
|
247
268
|
return false unless match_mode_validator.valid?(@match_mode)
|
|
248
269
|
true
|
|
249
270
|
end
|
|
@@ -261,7 +282,7 @@ module Zernio
|
|
|
261
282
|
# Custom attribute writer method checking allowed values (enum).
|
|
262
283
|
# @param [Object] match_mode Object to be assigned
|
|
263
284
|
def match_mode=(match_mode)
|
|
264
|
-
validator = EnumAttributeValidator.new('String', ["exact", "contains"])
|
|
285
|
+
validator = EnumAttributeValidator.new('String', ["exact", "contains", "word"])
|
|
265
286
|
unless validator.valid?(match_mode)
|
|
266
287
|
fail ArgumentError, "invalid value for \"match_mode\", must be one of #{validator.allowable_values}."
|
|
267
288
|
end
|
|
@@ -280,6 +301,8 @@ module Zernio
|
|
|
280
301
|
platform_post_id == o.platform_post_id &&
|
|
281
302
|
keywords == o.keywords &&
|
|
282
303
|
match_mode == o.match_mode &&
|
|
304
|
+
exclude_keywords == o.exclude_keywords &&
|
|
305
|
+
typo_tolerance == o.typo_tolerance &&
|
|
283
306
|
dm_message == o.dm_message &&
|
|
284
307
|
buttons == o.buttons &&
|
|
285
308
|
comment_reply == o.comment_reply &&
|
|
@@ -301,7 +324,7 @@ module Zernio
|
|
|
301
324
|
# Calculates hash code according to all attributes.
|
|
302
325
|
# @return [Integer] Hash code
|
|
303
326
|
def hash
|
|
304
|
-
[id, name, platform, trigger, platform_post_id, keywords, match_mode, dm_message, buttons, comment_reply, dm_message_variations, comment_reply_variations, link_tracking, click_tag, is_active, stats, created_at].hash
|
|
327
|
+
[id, name, platform, trigger, platform_post_id, keywords, match_mode, exclude_keywords, typo_tolerance, dm_message, buttons, comment_reply, dm_message_variations, comment_reply_variations, link_tracking, click_tag, is_active, stats, created_at].hash
|
|
305
328
|
end
|
|
306
329
|
|
|
307
330
|
# Builds the object from hash
|