late-sdk 0.0.894 → 0.0.896
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 +26 -3
- data/docs/AdAccountsApi.md +446 -0
- data/docs/AdAnalyticsResponse.md +1 -1
- data/docs/AdAnalyticsResponseAnalytics.md +22 -0
- data/docs/AdCampaign.md +1 -1
- data/docs/AdCampaignBudget.md +11 -3
- data/docs/AdCampaignsApi.md +149 -3
- data/docs/AdInsightsApi.md +1 -1
- data/docs/AdNegativeKeywordList.md +26 -0
- data/docs/AdNegativeKeywordListKeyword.md +22 -0
- data/docs/BoostPostRequest.md +6 -4
- data/docs/CampaignAnalyticsResponseAnalytics.md +3 -1
- data/docs/CampaignAnalyticsResponseAnalyticsImpressionShareCache.md +20 -0
- data/docs/CampaignAnalyticsResponseAnalyticsSummary.md +96 -0
- data/docs/CampaignAnalyticsResponseCampaign.md +2 -0
- data/docs/CreateAdNegativeKeywordList201Response.md +24 -0
- data/docs/CreateAdNegativeKeywordListRequest.md +26 -0
- data/docs/CreateCallAdRequest.md +8 -2
- data/docs/CreateMessagingAdRequest.md +8 -2
- data/docs/CtwaAdRequestBody.md +8 -2
- data/docs/CtwaAdRequestBodyCreativesInner.md +7 -3
- data/docs/DeleteAdNegativeKeywordList200Response.md +20 -0
- data/docs/GetAdAnalytics202Response.md +1 -1
- data/docs/GetAdNegativeKeywordList200Response.md +24 -0
- data/docs/GetAdNegativeKeywordList200ResponseList.md +28 -0
- data/docs/ListAdNegativeKeywordLists200Response.md +24 -0
- data/docs/MediaItem.md +1 -1
- data/docs/MessagingAdsApi.md +10 -10
- data/docs/ReplaceAdNegativeKeywordListKeywords200Response.md +22 -0
- data/docs/ReplaceAdNegativeKeywordListKeywordsRequest.md +24 -0
- data/docs/ReplaceCampaignNegativeKeywordListsRequest.md +20 -0
- data/docs/UpdateAdCampaign200Response.md +1 -1
- data/docs/UpdateAdCampaignRequest.md +2 -0
- data/docs/UpdateAdNegativeKeywordList200Response.md +20 -0
- data/docs/UpdateAdNegativeKeywordListRequest.md +24 -0
- data/lib/zernio-sdk/api/ad_accounts_api.rb +500 -0
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +160 -6
- data/lib/zernio-sdk/api/ad_insights_api.rb +2 -2
- data/lib/zernio-sdk/api/messaging_ads_api.rb +8 -8
- data/lib/zernio-sdk/models/ad_analytics_response.rb +1 -1
- data/lib/zernio-sdk/models/ad_analytics_response_analytics.rb +169 -0
- data/lib/zernio-sdk/models/ad_campaign.rb +3 -1
- data/lib/zernio-sdk/models/ad_campaign_budget.rb +99 -5
- data/lib/zernio-sdk/models/ad_negative_keyword_list.rb +209 -0
- data/lib/zernio-sdk/models/ad_negative_keyword_list_keyword.rb +222 -0
- data/lib/zernio-sdk/models/boost_post_request.rb +38 -7
- data/lib/zernio-sdk/models/campaign_analytics_response_analytics.rb +11 -2
- data/lib/zernio-sdk/models/campaign_analytics_response_analytics_impression_share_cache.rb +158 -0
- data/lib/zernio-sdk/models/campaign_analytics_response_analytics_summary.rb +550 -0
- data/lib/zernio-sdk/models/campaign_analytics_response_campaign.rb +11 -1
- data/lib/zernio-sdk/models/create_ad_negative_keyword_list201_response.rb +220 -0
- data/lib/zernio-sdk/models/create_ad_negative_keyword_list_request.rb +327 -0
- data/lib/zernio-sdk/models/create_call_ad_request.rb +94 -3
- data/lib/zernio-sdk/models/create_messaging_ad_request.rb +94 -3
- data/lib/zernio-sdk/models/ctwa_ad_request_body.rb +95 -4
- data/lib/zernio-sdk/models/ctwa_ad_request_body_creatives_inner.rb +67 -21
- data/lib/zernio-sdk/models/ctwa_ad_request_body_creatives_inner_video.rb +1 -1
- data/lib/zernio-sdk/models/ctwa_ad_request_body_video.rb +1 -1
- data/lib/zernio-sdk/models/{ad_campaign_campaign_budget.rb → delete_ad_negative_keyword_list200_response.rb} +35 -48
- data/lib/zernio-sdk/models/get_ad_analytics202_response.rb +1 -1
- data/lib/zernio-sdk/models/get_ad_negative_keyword_list200_response.rb +199 -0
- data/lib/zernio-sdk/models/get_ad_negative_keyword_list200_response_list.rb +227 -0
- data/lib/zernio-sdk/models/list_ad_negative_keyword_lists200_response.rb +201 -0
- data/lib/zernio-sdk/models/media_item.rb +1 -0
- data/lib/zernio-sdk/models/replace_ad_negative_keyword_list_keywords200_response.rb +189 -0
- data/lib/zernio-sdk/models/replace_ad_negative_keyword_list_keywords_request.rb +289 -0
- data/lib/zernio-sdk/models/replace_campaign_negative_keyword_lists_request.rb +219 -0
- data/lib/zernio-sdk/models/update_ad_campaign200_response.rb +1 -1
- data/lib/zernio-sdk/models/update_ad_campaign_request.rb +13 -1
- data/lib/zernio-sdk/models/update_ad_campaign_request_budget.rb +1 -1
- data/lib/zernio-sdk/models/update_ad_negative_keyword_list200_response.rb +178 -0
- data/lib/zernio-sdk/models/update_ad_negative_keyword_list_request.rb +296 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +16 -1
- data/openapi.yaml +981 -43
- data/spec/api/ad_accounts_api_spec.rb +82 -0
- data/spec/api/ad_campaigns_api_spec.rb +29 -3
- data/spec/api/ad_insights_api_spec.rb +1 -1
- data/spec/api/messaging_ads_api_spec.rb +4 -4
- data/spec/models/ad_analytics_response_analytics_spec.rb +48 -0
- data/spec/models/ad_campaign_budget_spec.rb +24 -0
- data/spec/models/ad_negative_keyword_list_keyword_spec.rb +52 -0
- data/spec/models/ad_negative_keyword_list_spec.rb +60 -0
- data/spec/models/boost_post_request_spec.rb +7 -1
- data/spec/models/campaign_analytics_response_analytics_impression_share_cache_spec.rb +42 -0
- data/spec/models/campaign_analytics_response_analytics_spec.rb +6 -0
- data/spec/models/campaign_analytics_response_analytics_summary_spec.rb +270 -0
- data/spec/models/campaign_analytics_response_campaign_spec.rb +6 -0
- data/spec/models/create_ad_negative_keyword_list201_response_spec.rb +54 -0
- data/spec/models/create_ad_negative_keyword_list_request_spec.rb +64 -0
- data/spec/models/create_call_ad_request_spec.rb +18 -0
- data/spec/models/create_messaging_ad_request_spec.rb +18 -0
- data/spec/models/ctwa_ad_request_body_creatives_inner_spec.rb +12 -0
- data/spec/models/ctwa_ad_request_body_spec.rb +18 -0
- data/spec/models/delete_ad_negative_keyword_list200_response_spec.rb +42 -0
- data/spec/models/get_ad_negative_keyword_list200_response_list_spec.rb +66 -0
- data/spec/models/get_ad_negative_keyword_list200_response_spec.rb +54 -0
- data/spec/models/list_ad_negative_keyword_lists200_response_spec.rb +54 -0
- data/spec/models/replace_ad_negative_keyword_list_keywords200_response_spec.rb +48 -0
- data/spec/models/replace_ad_negative_keyword_list_keywords_request_spec.rb +58 -0
- data/spec/models/{ad_campaign_campaign_budget_spec.rb → replace_campaign_negative_keyword_lists_request_spec.rb} +12 -12
- data/spec/models/update_ad_campaign_request_spec.rb +6 -0
- data/spec/models/update_ad_negative_keyword_list200_response_spec.rb +42 -0
- data/spec/models/update_ad_negative_keyword_list_request_spec.rb +58 -0
- data/zernio-sdk-0.0.896.gem +0 -0
- metadata +66 -6
- data/docs/AdCampaignCampaignBudget.md +0 -20
- data/zernio-sdk-0.0.894.gem +0 -0
|
@@ -0,0 +1,550 @@
|
|
|
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
|
+
class CampaignAnalyticsResponseAnalyticsSummary < ApiModelBase
|
|
18
|
+
attr_accessor :spend
|
|
19
|
+
|
|
20
|
+
attr_accessor :impressions
|
|
21
|
+
|
|
22
|
+
# Unique people reached in the requested date range. Meta (facebook/instagram) and TikTok: the platform's own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient platform error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, reach is NOT additive on these platforms: neither daily values nor child nodes sum to the range total. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Frequency (impressions / reach) is only meaningful for Meta and TikTok.
|
|
23
|
+
attr_accessor :reach
|
|
24
|
+
|
|
25
|
+
attr_accessor :clicks
|
|
26
|
+
|
|
27
|
+
# Click-through rate (%)
|
|
28
|
+
attr_accessor :ctr
|
|
29
|
+
|
|
30
|
+
# Cost per click
|
|
31
|
+
attr_accessor :cpc
|
|
32
|
+
|
|
33
|
+
# Cost per 1000 impressions
|
|
34
|
+
attr_accessor :cpm
|
|
35
|
+
|
|
36
|
+
attr_accessor :engagement
|
|
37
|
+
|
|
38
|
+
# Count of conversion events over the requested date range. FRACTIONAL: attribution splits one conversion across touchpoints and Google additionally reports modeled conversions, so values like 0.347 are normal. Meta: events matching the campaign's promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account's tracked conversions. X and LinkedIn: their reported website/lead conversions (added 2026-07). 0 for non-conversion campaigns or when no events have fired.
|
|
39
|
+
attr_accessor :conversions
|
|
40
|
+
|
|
41
|
+
# All conversions, including actions excluded from the Conversions column (Google metrics.all_conversions). 0 on platforms without the concept.
|
|
42
|
+
attr_accessor :all_conversions
|
|
43
|
+
|
|
44
|
+
# Derived spend / conversions in the same currency as spend. 0 when conversions is 0.
|
|
45
|
+
attr_accessor :cost_per_conversion
|
|
46
|
+
|
|
47
|
+
# Per-action-type counts summed over the date range, keyed by the platform's action-type names. Meta: raw Insights action_type keys (link_click, offsite_conversion.fb_pixel_purchase, onsite_conversion.lead_grouped, ...), covering both engagement and conversion events. TikTok: pixel conversions (purchase, add_to_cart, initiate_checkout, view_content, complete_payment, lead) plus the paid-engagement family (follow, post_reaction for paid likes, comment, share). Follow is how FOLLOWERS-goal campaigns report their result. X: conversion types (purchase, sign_up, site_visit, download, custom). LinkedIn: conversion types (post_click, post_view, lead_gen). Google returns {} (its per-action names aren't synced per ad). Empty object when no actions are reported. NOTE: keys differ by platform, so branch on the ad's platform when interpreting them.
|
|
48
|
+
attr_accessor :actions
|
|
49
|
+
|
|
50
|
+
# Monetary mirror of `actions`, from Meta's Insights `action_values[]` array. Same keying: values are the revenue attributed to each action_type, in ad-account native currency (same unit as `spend`; see the campaign node's `currency` field). Use this to compute revenue-per-event (e.g. avg purchase value). Meta-only; other platforms return {}.
|
|
51
|
+
attr_accessor :action_values
|
|
52
|
+
|
|
53
|
+
# Convenience sum of purchase-type action values, picked from `actionValues` via the same priority list as `conversions` so both fields describe the same events. In ad-account native currency. 0 when the campaign has no purchase event configured. Meta-only.
|
|
54
|
+
attr_accessor :purchase_value
|
|
55
|
+
|
|
56
|
+
# Return on ad spend, derived as `purchaseValue / spend`. 0 when `spend` is 0. Equivalent to Meta's `purchase_roas` under default attribution. At ad-set and campaign levels this is recomputed from summed purchaseValue + spend (NOT averaged across children) so it's mathematically correct at every rollup level.
|
|
57
|
+
attr_accessor :roas
|
|
58
|
+
|
|
59
|
+
# Derived `spend / actions[type]` for every action type with a non-zero count, in ad-account native currency. Same keys as `actions`. Rounded to 4 decimals because cheap actions cost well under a cent. Recomputed from summed spend + counts at every rollup level. Empty object when spend is 0 or no actions are reported.
|
|
60
|
+
attr_accessor :cost_per_action
|
|
61
|
+
|
|
62
|
+
# Clicks leading off Meta's surfaces to the advertiser's destination. Meta-only; other platforms report 0.
|
|
63
|
+
attr_accessor :outbound_clicks
|
|
64
|
+
|
|
65
|
+
# Derived `outboundClicks / impressions * 100`, recomputed from sums at every rollup level.
|
|
66
|
+
attr_accessor :outbound_clicks_ctr
|
|
67
|
+
|
|
68
|
+
# In-session link clicks. Differs from the attributed `link_click` count in `actions`/`engagementBreakdown.linkClicks`, which uses the attribution window. Meta-only.
|
|
69
|
+
attr_accessor :inline_link_clicks
|
|
70
|
+
|
|
71
|
+
# Derived `inlineLinkClicks / impressions * 100`, recomputed from sums at every rollup level.
|
|
72
|
+
attr_accessor :inline_link_click_ctr
|
|
73
|
+
|
|
74
|
+
# People who clicked at least once. NOT additive: summed across days/children it overcounts people who clicked on multiple days or ads, so treat rollups as an upper bound (same caveat as `reach`). Meta-only.
|
|
75
|
+
attr_accessor :unique_clicks
|
|
76
|
+
|
|
77
|
+
# Derived `uniqueClicks / impressions * 100` (NOT Meta's reach-based unique_ctr). Inherits the non-additivity caveat of `uniqueClicks`.
|
|
78
|
+
attr_accessor :unique_ctr
|
|
79
|
+
|
|
80
|
+
# Number of times the video started playing, summed over the date range and across children at ad-set/campaign level. 0 for non-video ads. Sources: Meta `video_play_actions`, TikTok `video_play_actions`.
|
|
81
|
+
attr_accessor :video_play_actions
|
|
82
|
+
|
|
83
|
+
# Views of at least 30 seconds (or to the end, for shorter videos). Sources: Meta `video_30_sec_watched_actions` (Meta only).
|
|
84
|
+
attr_accessor :video30_sec_watched_actions
|
|
85
|
+
|
|
86
|
+
# ThruPlays (watched to completion, or at least 15 seconds). Sources: Meta `video_thruplay_watched_actions` (Meta only).
|
|
87
|
+
attr_accessor :video_thruplay_watched_actions
|
|
88
|
+
|
|
89
|
+
# Views reaching 25% of the video's length. With the other percentile fields, powers hook/hold/drop-off analysis (e.g. hook rate = videoP25WatchedActions / videoPlayActions). Sources: Meta `video_p25_watched_actions`, TikTok `video_views_p25`.
|
|
90
|
+
attr_accessor :video_p25_watched_actions
|
|
91
|
+
|
|
92
|
+
# Views reaching 50% of the video's length. Sources: Meta `video_p50_watched_actions`, TikTok `video_views_p50`.
|
|
93
|
+
attr_accessor :video_p50_watched_actions
|
|
94
|
+
|
|
95
|
+
# Views reaching 75% of the video's length. Sources: Meta `video_p75_watched_actions`, TikTok `video_views_p75`.
|
|
96
|
+
attr_accessor :video_p75_watched_actions
|
|
97
|
+
|
|
98
|
+
# Views reaching 95% of the video's length. Sources: Meta `video_p95_watched_actions` (Meta only).
|
|
99
|
+
attr_accessor :video_p95_watched_actions
|
|
100
|
+
|
|
101
|
+
# Views reaching 100% of the video's length. Sources: Meta `video_p100_watched_actions`, TikTok `video_views_p100`.
|
|
102
|
+
attr_accessor :video_p100_watched_actions
|
|
103
|
+
|
|
104
|
+
# Average seconds watched per play. Aggregated over date ranges and across children as a play-weighted average (total watch time / total plays), never a plain average of averages. Sources: Meta `video_avg_time_watched_actions`, TikTok `average_video_play`.
|
|
105
|
+
attr_accessor :video_avg_time_watched_actions
|
|
106
|
+
|
|
107
|
+
# 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 (ThruPlay is Meta-only).
|
|
108
|
+
attr_accessor :cost_per_thruplay
|
|
109
|
+
|
|
110
|
+
attr_accessor :funnel
|
|
111
|
+
|
|
112
|
+
attr_accessor :engagement_breakdown
|
|
113
|
+
|
|
114
|
+
# Present on individual ads only, not on campaign aggregations
|
|
115
|
+
attr_accessor :last_synced_at
|
|
116
|
+
|
|
117
|
+
# Google only. Date-range ratio, not a percentage. Null when unavailable; Google's threshold sentinel values are preserved.
|
|
118
|
+
attr_accessor :search_impression_share
|
|
119
|
+
|
|
120
|
+
# Google only. Date-range ratio, not a percentage. Null when unavailable; Google's threshold sentinel values are preserved.
|
|
121
|
+
attr_accessor :search_budget_lost_impression_share
|
|
122
|
+
|
|
123
|
+
# Google only. Date-range ratio, not a percentage. Null when unavailable; Google's threshold sentinel values are preserved.
|
|
124
|
+
attr_accessor :search_rank_lost_impression_share
|
|
125
|
+
|
|
126
|
+
# Google only. Date-range ratio, not a percentage. Null when unavailable; Google's threshold sentinel values are preserved.
|
|
127
|
+
attr_accessor :search_top_impression_share
|
|
128
|
+
|
|
129
|
+
# Google only. Date-range ratio, not a percentage. Null when unavailable; Google's threshold sentinel values are preserved.
|
|
130
|
+
attr_accessor :search_absolute_top_impression_share
|
|
131
|
+
|
|
132
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
133
|
+
def self.attribute_map
|
|
134
|
+
{
|
|
135
|
+
:'spend' => :'spend',
|
|
136
|
+
:'impressions' => :'impressions',
|
|
137
|
+
:'reach' => :'reach',
|
|
138
|
+
:'clicks' => :'clicks',
|
|
139
|
+
:'ctr' => :'ctr',
|
|
140
|
+
:'cpc' => :'cpc',
|
|
141
|
+
:'cpm' => :'cpm',
|
|
142
|
+
:'engagement' => :'engagement',
|
|
143
|
+
:'conversions' => :'conversions',
|
|
144
|
+
:'all_conversions' => :'allConversions',
|
|
145
|
+
:'cost_per_conversion' => :'costPerConversion',
|
|
146
|
+
:'actions' => :'actions',
|
|
147
|
+
:'action_values' => :'actionValues',
|
|
148
|
+
:'purchase_value' => :'purchaseValue',
|
|
149
|
+
:'roas' => :'roas',
|
|
150
|
+
:'cost_per_action' => :'costPerAction',
|
|
151
|
+
:'outbound_clicks' => :'outboundClicks',
|
|
152
|
+
:'outbound_clicks_ctr' => :'outboundClicksCtr',
|
|
153
|
+
:'inline_link_clicks' => :'inlineLinkClicks',
|
|
154
|
+
:'inline_link_click_ctr' => :'inlineLinkClickCtr',
|
|
155
|
+
:'unique_clicks' => :'uniqueClicks',
|
|
156
|
+
:'unique_ctr' => :'uniqueCtr',
|
|
157
|
+
:'video_play_actions' => :'videoPlayActions',
|
|
158
|
+
:'video30_sec_watched_actions' => :'video30SecWatchedActions',
|
|
159
|
+
:'video_thruplay_watched_actions' => :'videoThruplayWatchedActions',
|
|
160
|
+
:'video_p25_watched_actions' => :'videoP25WatchedActions',
|
|
161
|
+
:'video_p50_watched_actions' => :'videoP50WatchedActions',
|
|
162
|
+
:'video_p75_watched_actions' => :'videoP75WatchedActions',
|
|
163
|
+
:'video_p95_watched_actions' => :'videoP95WatchedActions',
|
|
164
|
+
:'video_p100_watched_actions' => :'videoP100WatchedActions',
|
|
165
|
+
:'video_avg_time_watched_actions' => :'videoAvgTimeWatchedActions',
|
|
166
|
+
:'cost_per_thruplay' => :'costPerThruplay',
|
|
167
|
+
:'funnel' => :'funnel',
|
|
168
|
+
:'engagement_breakdown' => :'engagementBreakdown',
|
|
169
|
+
:'last_synced_at' => :'lastSyncedAt',
|
|
170
|
+
:'search_impression_share' => :'searchImpressionShare',
|
|
171
|
+
:'search_budget_lost_impression_share' => :'searchBudgetLostImpressionShare',
|
|
172
|
+
:'search_rank_lost_impression_share' => :'searchRankLostImpressionShare',
|
|
173
|
+
:'search_top_impression_share' => :'searchTopImpressionShare',
|
|
174
|
+
:'search_absolute_top_impression_share' => :'searchAbsoluteTopImpressionShare'
|
|
175
|
+
}
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Returns attribute mapping this model knows about
|
|
179
|
+
def self.acceptable_attribute_map
|
|
180
|
+
attribute_map
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Returns all the JSON keys this model knows about
|
|
184
|
+
def self.acceptable_attributes
|
|
185
|
+
acceptable_attribute_map.values
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Attribute type mapping.
|
|
189
|
+
def self.openapi_types
|
|
190
|
+
{
|
|
191
|
+
:'spend' => :'Float',
|
|
192
|
+
:'impressions' => :'Integer',
|
|
193
|
+
:'reach' => :'Integer',
|
|
194
|
+
:'clicks' => :'Integer',
|
|
195
|
+
:'ctr' => :'Float',
|
|
196
|
+
:'cpc' => :'Float',
|
|
197
|
+
:'cpm' => :'Float',
|
|
198
|
+
:'engagement' => :'Integer',
|
|
199
|
+
:'conversions' => :'Float',
|
|
200
|
+
:'all_conversions' => :'Float',
|
|
201
|
+
:'cost_per_conversion' => :'Float',
|
|
202
|
+
:'actions' => :'Hash<String, Integer>',
|
|
203
|
+
:'action_values' => :'Hash<String, Float>',
|
|
204
|
+
:'purchase_value' => :'Float',
|
|
205
|
+
:'roas' => :'Float',
|
|
206
|
+
:'cost_per_action' => :'Hash<String, Float>',
|
|
207
|
+
:'outbound_clicks' => :'Integer',
|
|
208
|
+
:'outbound_clicks_ctr' => :'Float',
|
|
209
|
+
:'inline_link_clicks' => :'Integer',
|
|
210
|
+
:'inline_link_click_ctr' => :'Float',
|
|
211
|
+
:'unique_clicks' => :'Integer',
|
|
212
|
+
:'unique_ctr' => :'Float',
|
|
213
|
+
:'video_play_actions' => :'Integer',
|
|
214
|
+
:'video30_sec_watched_actions' => :'Integer',
|
|
215
|
+
:'video_thruplay_watched_actions' => :'Integer',
|
|
216
|
+
:'video_p25_watched_actions' => :'Integer',
|
|
217
|
+
:'video_p50_watched_actions' => :'Integer',
|
|
218
|
+
:'video_p75_watched_actions' => :'Integer',
|
|
219
|
+
:'video_p95_watched_actions' => :'Integer',
|
|
220
|
+
:'video_p100_watched_actions' => :'Integer',
|
|
221
|
+
:'video_avg_time_watched_actions' => :'Float',
|
|
222
|
+
:'cost_per_thruplay' => :'Float',
|
|
223
|
+
:'funnel' => :'AdFunnelCounts',
|
|
224
|
+
:'engagement_breakdown' => :'AdEngagementCounts',
|
|
225
|
+
:'last_synced_at' => :'Time',
|
|
226
|
+
:'search_impression_share' => :'Float',
|
|
227
|
+
:'search_budget_lost_impression_share' => :'Float',
|
|
228
|
+
:'search_rank_lost_impression_share' => :'Float',
|
|
229
|
+
:'search_top_impression_share' => :'Float',
|
|
230
|
+
:'search_absolute_top_impression_share' => :'Float'
|
|
231
|
+
}
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# List of attributes with nullable: true
|
|
235
|
+
def self.openapi_nullable
|
|
236
|
+
Set.new([
|
|
237
|
+
:'search_impression_share',
|
|
238
|
+
:'search_budget_lost_impression_share',
|
|
239
|
+
:'search_rank_lost_impression_share',
|
|
240
|
+
:'search_top_impression_share',
|
|
241
|
+
:'search_absolute_top_impression_share'
|
|
242
|
+
])
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# List of class defined in allOf (OpenAPI v3)
|
|
246
|
+
def self.openapi_all_of
|
|
247
|
+
[
|
|
248
|
+
:'AdMetrics'
|
|
249
|
+
]
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# Initializes the object
|
|
253
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
254
|
+
def initialize(attributes = {})
|
|
255
|
+
if (!attributes.is_a?(Hash))
|
|
256
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CampaignAnalyticsResponseAnalyticsSummary` initialize method"
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
260
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
261
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
262
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
263
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CampaignAnalyticsResponseAnalyticsSummary`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
264
|
+
end
|
|
265
|
+
h[k.to_sym] = v
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
if attributes.key?(:'spend')
|
|
269
|
+
self.spend = attributes[:'spend']
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
if attributes.key?(:'impressions')
|
|
273
|
+
self.impressions = attributes[:'impressions']
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
if attributes.key?(:'reach')
|
|
277
|
+
self.reach = attributes[:'reach']
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
if attributes.key?(:'clicks')
|
|
281
|
+
self.clicks = attributes[:'clicks']
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
if attributes.key?(:'ctr')
|
|
285
|
+
self.ctr = attributes[:'ctr']
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
if attributes.key?(:'cpc')
|
|
289
|
+
self.cpc = attributes[:'cpc']
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
if attributes.key?(:'cpm')
|
|
293
|
+
self.cpm = attributes[:'cpm']
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
if attributes.key?(:'engagement')
|
|
297
|
+
self.engagement = attributes[:'engagement']
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
if attributes.key?(:'conversions')
|
|
301
|
+
self.conversions = attributes[:'conversions']
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
if attributes.key?(:'all_conversions')
|
|
305
|
+
self.all_conversions = attributes[:'all_conversions']
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
if attributes.key?(:'cost_per_conversion')
|
|
309
|
+
self.cost_per_conversion = attributes[:'cost_per_conversion']
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
if attributes.key?(:'actions')
|
|
313
|
+
if (value = attributes[:'actions']).is_a?(Hash)
|
|
314
|
+
self.actions = value
|
|
315
|
+
end
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
if attributes.key?(:'action_values')
|
|
319
|
+
if (value = attributes[:'action_values']).is_a?(Hash)
|
|
320
|
+
self.action_values = value
|
|
321
|
+
end
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
if attributes.key?(:'purchase_value')
|
|
325
|
+
self.purchase_value = attributes[:'purchase_value']
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
if attributes.key?(:'roas')
|
|
329
|
+
self.roas = attributes[:'roas']
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
if attributes.key?(:'cost_per_action')
|
|
333
|
+
if (value = attributes[:'cost_per_action']).is_a?(Hash)
|
|
334
|
+
self.cost_per_action = value
|
|
335
|
+
end
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
if attributes.key?(:'outbound_clicks')
|
|
339
|
+
self.outbound_clicks = attributes[:'outbound_clicks']
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
if attributes.key?(:'outbound_clicks_ctr')
|
|
343
|
+
self.outbound_clicks_ctr = attributes[:'outbound_clicks_ctr']
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
if attributes.key?(:'inline_link_clicks')
|
|
347
|
+
self.inline_link_clicks = attributes[:'inline_link_clicks']
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
if attributes.key?(:'inline_link_click_ctr')
|
|
351
|
+
self.inline_link_click_ctr = attributes[:'inline_link_click_ctr']
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
if attributes.key?(:'unique_clicks')
|
|
355
|
+
self.unique_clicks = attributes[:'unique_clicks']
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
if attributes.key?(:'unique_ctr')
|
|
359
|
+
self.unique_ctr = attributes[:'unique_ctr']
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
if attributes.key?(:'video_play_actions')
|
|
363
|
+
self.video_play_actions = attributes[:'video_play_actions']
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
if attributes.key?(:'video30_sec_watched_actions')
|
|
367
|
+
self.video30_sec_watched_actions = attributes[:'video30_sec_watched_actions']
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
if attributes.key?(:'video_thruplay_watched_actions')
|
|
371
|
+
self.video_thruplay_watched_actions = attributes[:'video_thruplay_watched_actions']
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
if attributes.key?(:'video_p25_watched_actions')
|
|
375
|
+
self.video_p25_watched_actions = attributes[:'video_p25_watched_actions']
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
if attributes.key?(:'video_p50_watched_actions')
|
|
379
|
+
self.video_p50_watched_actions = attributes[:'video_p50_watched_actions']
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
if attributes.key?(:'video_p75_watched_actions')
|
|
383
|
+
self.video_p75_watched_actions = attributes[:'video_p75_watched_actions']
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
if attributes.key?(:'video_p95_watched_actions')
|
|
387
|
+
self.video_p95_watched_actions = attributes[:'video_p95_watched_actions']
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
if attributes.key?(:'video_p100_watched_actions')
|
|
391
|
+
self.video_p100_watched_actions = attributes[:'video_p100_watched_actions']
|
|
392
|
+
end
|
|
393
|
+
|
|
394
|
+
if attributes.key?(:'video_avg_time_watched_actions')
|
|
395
|
+
self.video_avg_time_watched_actions = attributes[:'video_avg_time_watched_actions']
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
if attributes.key?(:'cost_per_thruplay')
|
|
399
|
+
self.cost_per_thruplay = attributes[:'cost_per_thruplay']
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
if attributes.key?(:'funnel')
|
|
403
|
+
self.funnel = attributes[:'funnel']
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
if attributes.key?(:'engagement_breakdown')
|
|
407
|
+
self.engagement_breakdown = attributes[:'engagement_breakdown']
|
|
408
|
+
end
|
|
409
|
+
|
|
410
|
+
if attributes.key?(:'last_synced_at')
|
|
411
|
+
self.last_synced_at = attributes[:'last_synced_at']
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
if attributes.key?(:'search_impression_share')
|
|
415
|
+
self.search_impression_share = attributes[:'search_impression_share']
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
if attributes.key?(:'search_budget_lost_impression_share')
|
|
419
|
+
self.search_budget_lost_impression_share = attributes[:'search_budget_lost_impression_share']
|
|
420
|
+
end
|
|
421
|
+
|
|
422
|
+
if attributes.key?(:'search_rank_lost_impression_share')
|
|
423
|
+
self.search_rank_lost_impression_share = attributes[:'search_rank_lost_impression_share']
|
|
424
|
+
end
|
|
425
|
+
|
|
426
|
+
if attributes.key?(:'search_top_impression_share')
|
|
427
|
+
self.search_top_impression_share = attributes[:'search_top_impression_share']
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
if attributes.key?(:'search_absolute_top_impression_share')
|
|
431
|
+
self.search_absolute_top_impression_share = attributes[:'search_absolute_top_impression_share']
|
|
432
|
+
end
|
|
433
|
+
end
|
|
434
|
+
|
|
435
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
436
|
+
# @return Array for valid properties with the reasons
|
|
437
|
+
def list_invalid_properties
|
|
438
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
439
|
+
invalid_properties = Array.new
|
|
440
|
+
invalid_properties
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
# Check to see if the all the properties in the model are valid
|
|
444
|
+
# @return true if the model is valid
|
|
445
|
+
def valid?
|
|
446
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
447
|
+
true
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
# Checks equality by comparing each attribute.
|
|
451
|
+
# @param [Object] Object to be compared
|
|
452
|
+
def ==(o)
|
|
453
|
+
return true if self.equal?(o)
|
|
454
|
+
self.class == o.class &&
|
|
455
|
+
spend == o.spend &&
|
|
456
|
+
impressions == o.impressions &&
|
|
457
|
+
reach == o.reach &&
|
|
458
|
+
clicks == o.clicks &&
|
|
459
|
+
ctr == o.ctr &&
|
|
460
|
+
cpc == o.cpc &&
|
|
461
|
+
cpm == o.cpm &&
|
|
462
|
+
engagement == o.engagement &&
|
|
463
|
+
conversions == o.conversions &&
|
|
464
|
+
all_conversions == o.all_conversions &&
|
|
465
|
+
cost_per_conversion == o.cost_per_conversion &&
|
|
466
|
+
actions == o.actions &&
|
|
467
|
+
action_values == o.action_values &&
|
|
468
|
+
purchase_value == o.purchase_value &&
|
|
469
|
+
roas == o.roas &&
|
|
470
|
+
cost_per_action == o.cost_per_action &&
|
|
471
|
+
outbound_clicks == o.outbound_clicks &&
|
|
472
|
+
outbound_clicks_ctr == o.outbound_clicks_ctr &&
|
|
473
|
+
inline_link_clicks == o.inline_link_clicks &&
|
|
474
|
+
inline_link_click_ctr == o.inline_link_click_ctr &&
|
|
475
|
+
unique_clicks == o.unique_clicks &&
|
|
476
|
+
unique_ctr == o.unique_ctr &&
|
|
477
|
+
video_play_actions == o.video_play_actions &&
|
|
478
|
+
video30_sec_watched_actions == o.video30_sec_watched_actions &&
|
|
479
|
+
video_thruplay_watched_actions == o.video_thruplay_watched_actions &&
|
|
480
|
+
video_p25_watched_actions == o.video_p25_watched_actions &&
|
|
481
|
+
video_p50_watched_actions == o.video_p50_watched_actions &&
|
|
482
|
+
video_p75_watched_actions == o.video_p75_watched_actions &&
|
|
483
|
+
video_p95_watched_actions == o.video_p95_watched_actions &&
|
|
484
|
+
video_p100_watched_actions == o.video_p100_watched_actions &&
|
|
485
|
+
video_avg_time_watched_actions == o.video_avg_time_watched_actions &&
|
|
486
|
+
cost_per_thruplay == o.cost_per_thruplay &&
|
|
487
|
+
funnel == o.funnel &&
|
|
488
|
+
engagement_breakdown == o.engagement_breakdown &&
|
|
489
|
+
last_synced_at == o.last_synced_at &&
|
|
490
|
+
search_impression_share == o.search_impression_share &&
|
|
491
|
+
search_budget_lost_impression_share == o.search_budget_lost_impression_share &&
|
|
492
|
+
search_rank_lost_impression_share == o.search_rank_lost_impression_share &&
|
|
493
|
+
search_top_impression_share == o.search_top_impression_share &&
|
|
494
|
+
search_absolute_top_impression_share == o.search_absolute_top_impression_share
|
|
495
|
+
end
|
|
496
|
+
|
|
497
|
+
# @see the `==` method
|
|
498
|
+
# @param [Object] Object to be compared
|
|
499
|
+
def eql?(o)
|
|
500
|
+
self == o
|
|
501
|
+
end
|
|
502
|
+
|
|
503
|
+
# Calculates hash code according to all attributes.
|
|
504
|
+
# @return [Integer] Hash code
|
|
505
|
+
def hash
|
|
506
|
+
[spend, impressions, reach, clicks, ctr, cpc, cpm, engagement, conversions, all_conversions, cost_per_conversion, actions, action_values, purchase_value, roas, cost_per_action, outbound_clicks, outbound_clicks_ctr, inline_link_clicks, inline_link_click_ctr, unique_clicks, unique_ctr, 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, search_impression_share, search_budget_lost_impression_share, search_rank_lost_impression_share, search_top_impression_share, search_absolute_top_impression_share].hash
|
|
507
|
+
end
|
|
508
|
+
|
|
509
|
+
# Builds the object from hash
|
|
510
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
511
|
+
# @return [Object] Returns the model itself
|
|
512
|
+
def self.build_from_hash(attributes)
|
|
513
|
+
return nil unless attributes.is_a?(Hash)
|
|
514
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
515
|
+
transformed_hash = {}
|
|
516
|
+
openapi_types.each_pair do |key, type|
|
|
517
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
518
|
+
transformed_hash["#{key}"] = nil
|
|
519
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
520
|
+
# check to ensure the input is an array given that the attribute
|
|
521
|
+
# is documented as an array but the input is not
|
|
522
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
523
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
524
|
+
end
|
|
525
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
526
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
527
|
+
end
|
|
528
|
+
end
|
|
529
|
+
new(transformed_hash)
|
|
530
|
+
end
|
|
531
|
+
|
|
532
|
+
# Returns the object in the form of hash
|
|
533
|
+
# @return [Hash] Returns the object in the form of hash
|
|
534
|
+
def to_hash
|
|
535
|
+
hash = {}
|
|
536
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
537
|
+
value = self.send(attr)
|
|
538
|
+
if value.nil?
|
|
539
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
540
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
541
|
+
end
|
|
542
|
+
|
|
543
|
+
hash[param] = _to_hash(value)
|
|
544
|
+
end
|
|
545
|
+
hash
|
|
546
|
+
end
|
|
547
|
+
|
|
548
|
+
end
|
|
549
|
+
|
|
550
|
+
end
|
|
@@ -24,6 +24,8 @@ module Zernio
|
|
|
24
24
|
# Effective campaign status (ACTIVE when any child ad is active).
|
|
25
25
|
attr_accessor :status
|
|
26
26
|
|
|
27
|
+
attr_accessor :budget
|
|
28
|
+
|
|
27
29
|
# ISO 4217 code of the ad account (e.g. USD, THB). All money values in `summary` and `daily` are in this currency.
|
|
28
30
|
attr_accessor :currency
|
|
29
31
|
|
|
@@ -34,6 +36,7 @@ module Zernio
|
|
|
34
36
|
:'name' => :'name',
|
|
35
37
|
:'platform' => :'platform',
|
|
36
38
|
:'status' => :'status',
|
|
39
|
+
:'budget' => :'budget',
|
|
37
40
|
:'currency' => :'currency'
|
|
38
41
|
}
|
|
39
42
|
end
|
|
@@ -55,6 +58,7 @@ module Zernio
|
|
|
55
58
|
:'name' => :'String',
|
|
56
59
|
:'platform' => :'String',
|
|
57
60
|
:'status' => :'String',
|
|
61
|
+
:'budget' => :'AdCampaignBudget',
|
|
58
62
|
:'currency' => :'String'
|
|
59
63
|
}
|
|
60
64
|
end
|
|
@@ -64,6 +68,7 @@ module Zernio
|
|
|
64
68
|
Set.new([
|
|
65
69
|
:'name',
|
|
66
70
|
:'status',
|
|
71
|
+
:'budget',
|
|
67
72
|
:'currency'
|
|
68
73
|
])
|
|
69
74
|
end
|
|
@@ -100,6 +105,10 @@ module Zernio
|
|
|
100
105
|
self.status = attributes[:'status']
|
|
101
106
|
end
|
|
102
107
|
|
|
108
|
+
if attributes.key?(:'budget')
|
|
109
|
+
self.budget = attributes[:'budget']
|
|
110
|
+
end
|
|
111
|
+
|
|
103
112
|
if attributes.key?(:'currency')
|
|
104
113
|
self.currency = attributes[:'currency']
|
|
105
114
|
end
|
|
@@ -129,6 +138,7 @@ module Zernio
|
|
|
129
138
|
name == o.name &&
|
|
130
139
|
platform == o.platform &&
|
|
131
140
|
status == o.status &&
|
|
141
|
+
budget == o.budget &&
|
|
132
142
|
currency == o.currency
|
|
133
143
|
end
|
|
134
144
|
|
|
@@ -141,7 +151,7 @@ module Zernio
|
|
|
141
151
|
# Calculates hash code according to all attributes.
|
|
142
152
|
# @return [Integer] Hash code
|
|
143
153
|
def hash
|
|
144
|
-
[id, name, platform, status, currency].hash
|
|
154
|
+
[id, name, platform, status, budget, currency].hash
|
|
145
155
|
end
|
|
146
156
|
|
|
147
157
|
# Builds the object from hash
|