late-sdk 0.0.714 → 0.0.716
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 +15 -10
- data/docs/AdAnalyticsResponse.md +22 -0
- data/docs/{GetAdAnalytics200ResponseAd.md → AdAnalyticsResponseAd.md} +2 -4
- data/docs/AdCampaignsApi.md +12 -12
- data/docs/AdDailyMetrics.md +14 -0
- data/docs/AdEngagementCounts.md +1 -1
- data/docs/AdInsightsApi.md +8 -8
- data/docs/AdMetrics.md +14 -0
- data/docs/AdTreeResponse.md +22 -0
- data/docs/AdsListResponse.md +22 -0
- data/docs/AdsTimelineResponse.md +20 -0
- data/docs/{GetAdsTimeline200ResponseRowsInner.md → AdsTimelineResponseRowsInner.md} +2 -2
- data/docs/CampaignAnalyticsResponse.md +22 -0
- data/docs/{GetCampaignAnalytics200ResponseAnalytics.md → CampaignAnalyticsResponseAnalytics.md} +3 -3
- data/docs/{GetCampaignAnalytics200ResponseAnalyticsDailyInner.md → CampaignAnalyticsResponseAnalyticsDailyInner.md} +16 -2
- data/docs/{GetCampaignAnalytics200ResponseCampaign.md → CampaignAnalyticsResponseCampaign.md} +2 -2
- data/docs/GetAdAnalytics202Response.md +22 -0
- data/docs/GetAdTree202Response.md +22 -0
- data/docs/GetAdsTimeline202Response.md +20 -0
- data/docs/GetCampaignAnalytics202Response.md +22 -0
- data/docs/ListAds202Response.md +22 -0
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +9 -9
- data/lib/zernio-sdk/api/ad_insights_api.rb +6 -6
- data/lib/zernio-sdk/models/{get_ad_analytics200_response.rb → ad_analytics_response.rb} +15 -15
- data/lib/zernio-sdk/models/{get_ad_analytics200_response_ad.rb → ad_analytics_response_ad.rb} +4 -47
- data/lib/zernio-sdk/models/ad_daily_metrics.rb +73 -1
- data/lib/zernio-sdk/models/ad_engagement_counts.rb +1 -1
- data/lib/zernio-sdk/models/ad_metrics.rb +73 -1
- data/lib/zernio-sdk/models/{get_ad_tree200_response.rb → ad_tree_response.rb} +17 -17
- data/lib/zernio-sdk/models/{list_ads200_response.rb → ads_list_response.rb} +17 -17
- data/lib/zernio-sdk/models/{get_ads_timeline200_response.rb → ads_timeline_response.rb} +17 -17
- data/lib/zernio-sdk/models/{get_ads_timeline200_response_rows_inner.rb → ads_timeline_response_rows_inner.rb} +3 -3
- data/lib/zernio-sdk/models/{get_campaign_analytics200_response.rb → campaign_analytics_response.rb} +15 -15
- data/lib/zernio-sdk/models/{get_campaign_analytics200_response_analytics.rb → campaign_analytics_response_analytics.rb} +4 -4
- data/lib/zernio-sdk/models/{get_campaign_analytics200_response_analytics_daily_inner.rb → campaign_analytics_response_analytics_daily_inner.rb} +76 -4
- data/lib/zernio-sdk/models/{get_campaign_analytics200_response_campaign.rb → campaign_analytics_response_campaign.rb} +3 -3
- data/lib/zernio-sdk/models/get_ad_analytics202_response.rb +213 -0
- data/lib/zernio-sdk/models/get_ad_tree202_response.rb +215 -0
- data/lib/zernio-sdk/models/get_ads_timeline202_response.rb +206 -0
- data/lib/zernio-sdk/models/get_campaign_analytics202_response.rb +213 -0
- data/lib/zernio-sdk/models/list_ads202_response.rb +215 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +15 -10
- data/openapi.yaml +205 -123
- data/spec/api/ad_campaigns_api_spec.rb +3 -3
- data/spec/api/ad_insights_api_spec.rb +2 -2
- data/spec/models/{get_campaign_analytics200_response_campaign_spec.rb → ad_analytics_response_ad_spec.rb} +6 -6
- data/spec/models/{get_ad_analytics200_response_spec.rb → ad_analytics_response_spec.rb} +8 -8
- data/spec/models/ad_daily_metrics_spec.rb +42 -0
- data/spec/models/ad_metrics_spec.rb +42 -0
- data/spec/models/{get_ad_tree200_response_spec.rb → ad_tree_response_spec.rb} +8 -8
- data/spec/models/{list_ads200_response_spec.rb → ads_list_response_spec.rb} +8 -8
- data/spec/models/{get_ads_timeline200_response_rows_inner_spec.rb → ads_timeline_response_rows_inner_spec.rb} +6 -6
- data/spec/models/{get_ads_timeline200_response_spec.rb → ads_timeline_response_spec.rb} +8 -8
- data/spec/models/{get_campaign_analytics200_response_analytics_daily_inner_spec.rb → campaign_analytics_response_analytics_daily_inner_spec.rb} +48 -6
- data/spec/models/{get_campaign_analytics200_response_analytics_spec.rb → campaign_analytics_response_analytics_spec.rb} +6 -6
- data/spec/models/{get_ad_analytics200_response_ad_spec.rb → campaign_analytics_response_campaign_spec.rb} +6 -16
- data/spec/models/{get_campaign_analytics200_response_spec.rb → campaign_analytics_response_spec.rb} +8 -8
- data/spec/models/get_ad_analytics202_response_spec.rb +52 -0
- data/spec/models/get_ad_tree202_response_spec.rb +52 -0
- data/spec/models/get_ads_timeline202_response_spec.rb +46 -0
- data/spec/models/get_campaign_analytics202_response_spec.rb +52 -0
- data/spec/models/list_ads202_response_spec.rb +52 -0
- data/zernio-sdk-0.0.716.gem +0 -0
- metadata +1654 -1634
- data/docs/GetAdAnalytics200Response.md +0 -22
- data/docs/GetAdTree200Response.md +0 -22
- data/docs/GetAdsTimeline200Response.md +0 -20
- data/docs/GetCampaignAnalytics200Response.md +0 -22
- data/docs/ListAds200Response.md +0 -22
- data/zernio-sdk-0.0.714.gem +0 -0
|
@@ -14,20 +14,20 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
class
|
|
17
|
+
class AdTreeResponse < ApiModelBase
|
|
18
18
|
attr_accessor :campaigns
|
|
19
19
|
|
|
20
|
-
# Present and true only on `202` responses: part of the requested date range is still being backfilled from the platform in the background. Retry the same request shortly; it returns 200 once the range is fully ingested.
|
|
21
|
-
attr_accessor :backfill_pending
|
|
22
|
-
|
|
23
20
|
attr_accessor :pagination
|
|
24
21
|
|
|
22
|
+
# Present and true while historical data is being backfilled.
|
|
23
|
+
attr_accessor :backfill_pending
|
|
24
|
+
|
|
25
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
26
|
def self.attribute_map
|
|
27
27
|
{
|
|
28
28
|
:'campaigns' => :'campaigns',
|
|
29
|
-
:'
|
|
30
|
-
:'
|
|
29
|
+
:'pagination' => :'pagination',
|
|
30
|
+
:'backfill_pending' => :'backfillPending'
|
|
31
31
|
}
|
|
32
32
|
end
|
|
33
33
|
|
|
@@ -45,8 +45,8 @@ module Zernio
|
|
|
45
45
|
def self.openapi_types
|
|
46
46
|
{
|
|
47
47
|
:'campaigns' => :'Array<AdTreeCampaign>',
|
|
48
|
-
:'
|
|
49
|
-
:'
|
|
48
|
+
:'pagination' => :'Pagination',
|
|
49
|
+
:'backfill_pending' => :'Boolean'
|
|
50
50
|
}
|
|
51
51
|
end
|
|
52
52
|
|
|
@@ -60,14 +60,14 @@ module Zernio
|
|
|
60
60
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
61
61
|
def initialize(attributes = {})
|
|
62
62
|
if (!attributes.is_a?(Hash))
|
|
63
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::
|
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AdTreeResponse` initialize method"
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
67
67
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
68
68
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
69
69
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
70
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::
|
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AdTreeResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
71
71
|
end
|
|
72
72
|
h[k.to_sym] = v
|
|
73
73
|
}
|
|
@@ -78,13 +78,13 @@ module Zernio
|
|
|
78
78
|
end
|
|
79
79
|
end
|
|
80
80
|
|
|
81
|
-
if attributes.key?(:'backfill_pending')
|
|
82
|
-
self.backfill_pending = attributes[:'backfill_pending']
|
|
83
|
-
end
|
|
84
|
-
|
|
85
81
|
if attributes.key?(:'pagination')
|
|
86
82
|
self.pagination = attributes[:'pagination']
|
|
87
83
|
end
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'backfill_pending')
|
|
86
|
+
self.backfill_pending = attributes[:'backfill_pending']
|
|
87
|
+
end
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -108,8 +108,8 @@ module Zernio
|
|
|
108
108
|
return true if self.equal?(o)
|
|
109
109
|
self.class == o.class &&
|
|
110
110
|
campaigns == o.campaigns &&
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
pagination == o.pagination &&
|
|
112
|
+
backfill_pending == o.backfill_pending
|
|
113
113
|
end
|
|
114
114
|
|
|
115
115
|
# @see the `==` method
|
|
@@ -121,7 +121,7 @@ module Zernio
|
|
|
121
121
|
# Calculates hash code according to all attributes.
|
|
122
122
|
# @return [Integer] Hash code
|
|
123
123
|
def hash
|
|
124
|
-
[campaigns,
|
|
124
|
+
[campaigns, pagination, backfill_pending].hash
|
|
125
125
|
end
|
|
126
126
|
|
|
127
127
|
# Builds the object from hash
|
|
@@ -14,20 +14,20 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
class
|
|
17
|
+
class AdsListResponse < ApiModelBase
|
|
18
18
|
attr_accessor :ads
|
|
19
19
|
|
|
20
|
-
# Present and true only on `202` responses: part of the requested date range is still being backfilled from the platform in the background. Retry the same request shortly; it returns 200 once the range is fully ingested.
|
|
21
|
-
attr_accessor :backfill_pending
|
|
22
|
-
|
|
23
20
|
attr_accessor :pagination
|
|
24
21
|
|
|
22
|
+
# Present and true while historical data is being backfilled.
|
|
23
|
+
attr_accessor :backfill_pending
|
|
24
|
+
|
|
25
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
26
|
def self.attribute_map
|
|
27
27
|
{
|
|
28
28
|
:'ads' => :'ads',
|
|
29
|
-
:'
|
|
30
|
-
:'
|
|
29
|
+
:'pagination' => :'pagination',
|
|
30
|
+
:'backfill_pending' => :'backfillPending'
|
|
31
31
|
}
|
|
32
32
|
end
|
|
33
33
|
|
|
@@ -45,8 +45,8 @@ module Zernio
|
|
|
45
45
|
def self.openapi_types
|
|
46
46
|
{
|
|
47
47
|
:'ads' => :'Array<Ad>',
|
|
48
|
-
:'
|
|
49
|
-
:'
|
|
48
|
+
:'pagination' => :'Pagination',
|
|
49
|
+
:'backfill_pending' => :'Boolean'
|
|
50
50
|
}
|
|
51
51
|
end
|
|
52
52
|
|
|
@@ -60,14 +60,14 @@ module Zernio
|
|
|
60
60
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
61
61
|
def initialize(attributes = {})
|
|
62
62
|
if (!attributes.is_a?(Hash))
|
|
63
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::
|
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AdsListResponse` initialize method"
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
67
67
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
68
68
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
69
69
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
70
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::
|
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AdsListResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
71
71
|
end
|
|
72
72
|
h[k.to_sym] = v
|
|
73
73
|
}
|
|
@@ -78,13 +78,13 @@ module Zernio
|
|
|
78
78
|
end
|
|
79
79
|
end
|
|
80
80
|
|
|
81
|
-
if attributes.key?(:'backfill_pending')
|
|
82
|
-
self.backfill_pending = attributes[:'backfill_pending']
|
|
83
|
-
end
|
|
84
|
-
|
|
85
81
|
if attributes.key?(:'pagination')
|
|
86
82
|
self.pagination = attributes[:'pagination']
|
|
87
83
|
end
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'backfill_pending')
|
|
86
|
+
self.backfill_pending = attributes[:'backfill_pending']
|
|
87
|
+
end
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -108,8 +108,8 @@ module Zernio
|
|
|
108
108
|
return true if self.equal?(o)
|
|
109
109
|
self.class == o.class &&
|
|
110
110
|
ads == o.ads &&
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
pagination == o.pagination &&
|
|
112
|
+
backfill_pending == o.backfill_pending
|
|
113
113
|
end
|
|
114
114
|
|
|
115
115
|
# @see the `==` method
|
|
@@ -121,7 +121,7 @@ module Zernio
|
|
|
121
121
|
# Calculates hash code according to all attributes.
|
|
122
122
|
# @return [Integer] Hash code
|
|
123
123
|
def hash
|
|
124
|
-
[ads,
|
|
124
|
+
[ads, pagination, backfill_pending].hash
|
|
125
125
|
end
|
|
126
126
|
|
|
127
127
|
# Builds the object from hash
|
|
@@ -14,17 +14,17 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
class
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
# Present and true only on `202` responses: part of the requested date range is still being backfilled from the platform in the background. Retry the same request shortly; it returns 200 once the range is fully ingested.
|
|
17
|
+
class AdsTimelineResponse < ApiModelBase
|
|
18
|
+
# Present and true while historical data is being backfilled.
|
|
21
19
|
attr_accessor :backfill_pending
|
|
22
20
|
|
|
21
|
+
attr_accessor :rows
|
|
22
|
+
|
|
23
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
24
|
def self.attribute_map
|
|
25
25
|
{
|
|
26
|
-
:'
|
|
27
|
-
:'
|
|
26
|
+
:'backfill_pending' => :'backfillPending',
|
|
27
|
+
:'rows' => :'rows'
|
|
28
28
|
}
|
|
29
29
|
end
|
|
30
30
|
|
|
@@ -41,8 +41,8 @@ module Zernio
|
|
|
41
41
|
# Attribute type mapping.
|
|
42
42
|
def self.openapi_types
|
|
43
43
|
{
|
|
44
|
-
:'
|
|
45
|
-
:'
|
|
44
|
+
:'backfill_pending' => :'Boolean',
|
|
45
|
+
:'rows' => :'Array<AdsTimelineResponseRowsInner>'
|
|
46
46
|
}
|
|
47
47
|
end
|
|
48
48
|
|
|
@@ -56,27 +56,27 @@ module Zernio
|
|
|
56
56
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
57
57
|
def initialize(attributes = {})
|
|
58
58
|
if (!attributes.is_a?(Hash))
|
|
59
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::
|
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AdsTimelineResponse` initialize method"
|
|
60
60
|
end
|
|
61
61
|
|
|
62
62
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
63
63
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
64
64
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
65
65
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
66
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::
|
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AdsTimelineResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
67
67
|
end
|
|
68
68
|
h[k.to_sym] = v
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
if attributes.key?(:'backfill_pending')
|
|
72
|
+
self.backfill_pending = attributes[:'backfill_pending']
|
|
73
|
+
end
|
|
74
|
+
|
|
71
75
|
if attributes.key?(:'rows')
|
|
72
76
|
if (value = attributes[:'rows']).is_a?(Array)
|
|
73
77
|
self.rows = value
|
|
74
78
|
end
|
|
75
79
|
end
|
|
76
|
-
|
|
77
|
-
if attributes.key?(:'backfill_pending')
|
|
78
|
-
self.backfill_pending = attributes[:'backfill_pending']
|
|
79
|
-
end
|
|
80
80
|
end
|
|
81
81
|
|
|
82
82
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -99,8 +99,8 @@ module Zernio
|
|
|
99
99
|
def ==(o)
|
|
100
100
|
return true if self.equal?(o)
|
|
101
101
|
self.class == o.class &&
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
backfill_pending == o.backfill_pending &&
|
|
103
|
+
rows == o.rows
|
|
104
104
|
end
|
|
105
105
|
|
|
106
106
|
# @see the `==` method
|
|
@@ -112,7 +112,7 @@ module Zernio
|
|
|
112
112
|
# Calculates hash code according to all attributes.
|
|
113
113
|
# @return [Integer] Hash code
|
|
114
114
|
def hash
|
|
115
|
-
[
|
|
115
|
+
[backfill_pending, rows].hash
|
|
116
116
|
end
|
|
117
117
|
|
|
118
118
|
# Builds the object from hash
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
class
|
|
17
|
+
class AdsTimelineResponseRowsInner < ApiModelBase
|
|
18
18
|
attr_accessor :date
|
|
19
19
|
|
|
20
20
|
# Native currency units (matches /ads/tree convention).
|
|
@@ -117,14 +117,14 @@ module Zernio
|
|
|
117
117
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
118
118
|
def initialize(attributes = {})
|
|
119
119
|
if (!attributes.is_a?(Hash))
|
|
120
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::
|
|
120
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AdsTimelineResponseRowsInner` initialize method"
|
|
121
121
|
end
|
|
122
122
|
|
|
123
123
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
124
124
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
125
125
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
126
126
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
127
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::
|
|
127
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AdsTimelineResponseRowsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
128
128
|
end
|
|
129
129
|
h[k.to_sym] = v
|
|
130
130
|
}
|
data/lib/zernio-sdk/models/{get_campaign_analytics200_response.rb → campaign_analytics_response.rb}
RENAMED
|
@@ -14,19 +14,19 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
class
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
# Present and true only on `202` responses: part of the requested date range is still being backfilled from the platform in the background. Retry the same request shortly; it returns 200 once the range is fully ingested.
|
|
17
|
+
class CampaignAnalyticsResponse < ApiModelBase
|
|
18
|
+
# Present and true while historical data is being backfilled.
|
|
21
19
|
attr_accessor :backfill_pending
|
|
22
20
|
|
|
21
|
+
attr_accessor :campaign
|
|
22
|
+
|
|
23
23
|
attr_accessor :analytics
|
|
24
24
|
|
|
25
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
26
|
def self.attribute_map
|
|
27
27
|
{
|
|
28
|
-
:'campaign' => :'campaign',
|
|
29
28
|
:'backfill_pending' => :'backfillPending',
|
|
29
|
+
:'campaign' => :'campaign',
|
|
30
30
|
:'analytics' => :'analytics'
|
|
31
31
|
}
|
|
32
32
|
end
|
|
@@ -44,9 +44,9 @@ module Zernio
|
|
|
44
44
|
# Attribute type mapping.
|
|
45
45
|
def self.openapi_types
|
|
46
46
|
{
|
|
47
|
-
:'campaign' => :'GetCampaignAnalytics200ResponseCampaign',
|
|
48
47
|
:'backfill_pending' => :'Boolean',
|
|
49
|
-
:'
|
|
48
|
+
:'campaign' => :'CampaignAnalyticsResponseCampaign',
|
|
49
|
+
:'analytics' => :'CampaignAnalyticsResponseAnalytics'
|
|
50
50
|
}
|
|
51
51
|
end
|
|
52
52
|
|
|
@@ -60,26 +60,26 @@ module Zernio
|
|
|
60
60
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
61
61
|
def initialize(attributes = {})
|
|
62
62
|
if (!attributes.is_a?(Hash))
|
|
63
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::
|
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CampaignAnalyticsResponse` initialize method"
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
67
67
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
68
68
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
69
69
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
70
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::
|
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CampaignAnalyticsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
71
71
|
end
|
|
72
72
|
h[k.to_sym] = v
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
if attributes.key?(:'campaign')
|
|
76
|
-
self.campaign = attributes[:'campaign']
|
|
77
|
-
end
|
|
78
|
-
|
|
79
75
|
if attributes.key?(:'backfill_pending')
|
|
80
76
|
self.backfill_pending = attributes[:'backfill_pending']
|
|
81
77
|
end
|
|
82
78
|
|
|
79
|
+
if attributes.key?(:'campaign')
|
|
80
|
+
self.campaign = attributes[:'campaign']
|
|
81
|
+
end
|
|
82
|
+
|
|
83
83
|
if attributes.key?(:'analytics')
|
|
84
84
|
self.analytics = attributes[:'analytics']
|
|
85
85
|
end
|
|
@@ -105,8 +105,8 @@ module Zernio
|
|
|
105
105
|
def ==(o)
|
|
106
106
|
return true if self.equal?(o)
|
|
107
107
|
self.class == o.class &&
|
|
108
|
-
campaign == o.campaign &&
|
|
109
108
|
backfill_pending == o.backfill_pending &&
|
|
109
|
+
campaign == o.campaign &&
|
|
110
110
|
analytics == o.analytics
|
|
111
111
|
end
|
|
112
112
|
|
|
@@ -119,7 +119,7 @@ module Zernio
|
|
|
119
119
|
# Calculates hash code according to all attributes.
|
|
120
120
|
# @return [Integer] Hash code
|
|
121
121
|
def hash
|
|
122
|
-
[
|
|
122
|
+
[backfill_pending, campaign, analytics].hash
|
|
123
123
|
end
|
|
124
124
|
|
|
125
125
|
# Builds the object from hash
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
class
|
|
17
|
+
class CampaignAnalyticsResponseAnalytics < ApiModelBase
|
|
18
18
|
attr_accessor :summary
|
|
19
19
|
|
|
20
20
|
attr_accessor :daily
|
|
@@ -44,7 +44,7 @@ module Zernio
|
|
|
44
44
|
def self.openapi_types
|
|
45
45
|
{
|
|
46
46
|
:'summary' => :'AdMetrics',
|
|
47
|
-
:'daily' => :'Array<
|
|
47
|
+
:'daily' => :'Array<CampaignAnalyticsResponseAnalyticsDailyInner>',
|
|
48
48
|
:'breakdowns' => :'Hash<String, Array<Object>>'
|
|
49
49
|
}
|
|
50
50
|
end
|
|
@@ -59,14 +59,14 @@ module Zernio
|
|
|
59
59
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
60
60
|
def initialize(attributes = {})
|
|
61
61
|
if (!attributes.is_a?(Hash))
|
|
62
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::
|
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CampaignAnalyticsResponseAnalytics` initialize method"
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
66
66
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
67
67
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
68
68
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
69
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::
|
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CampaignAnalyticsResponseAnalytics`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
70
70
|
end
|
|
71
71
|
h[k.to_sym] = v
|
|
72
72
|
}
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
class
|
|
17
|
+
class CampaignAnalyticsResponseAnalyticsDailyInner < ApiModelBase
|
|
18
18
|
attr_accessor :spend
|
|
19
19
|
|
|
20
20
|
attr_accessor :impressions
|
|
@@ -53,6 +53,27 @@ module Zernio
|
|
|
53
53
|
# 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.
|
|
54
54
|
attr_accessor :roas
|
|
55
55
|
|
|
56
|
+
# 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.
|
|
57
|
+
attr_accessor :cost_per_action
|
|
58
|
+
|
|
59
|
+
# Clicks leading off Meta's surfaces to the advertiser's destination. Meta-only; other platforms report 0.
|
|
60
|
+
attr_accessor :outbound_clicks
|
|
61
|
+
|
|
62
|
+
# Derived `outboundClicks / impressions * 100`, recomputed from sums at every rollup level.
|
|
63
|
+
attr_accessor :outbound_clicks_ctr
|
|
64
|
+
|
|
65
|
+
# In-session link clicks. Differs from the attributed `link_click` count in `actions`/`engagementBreakdown.linkClicks`, which uses the attribution window. Meta-only.
|
|
66
|
+
attr_accessor :inline_link_clicks
|
|
67
|
+
|
|
68
|
+
# Derived `inlineLinkClicks / impressions * 100`, recomputed from sums at every rollup level.
|
|
69
|
+
attr_accessor :inline_link_click_ctr
|
|
70
|
+
|
|
71
|
+
# 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.
|
|
72
|
+
attr_accessor :unique_clicks
|
|
73
|
+
|
|
74
|
+
# Derived `uniqueClicks / impressions * 100` (NOT Meta's reach-based unique_ctr). Inherits the non-additivity caveat of `uniqueClicks`.
|
|
75
|
+
attr_accessor :unique_ctr
|
|
76
|
+
|
|
56
77
|
# 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`.
|
|
57
78
|
attr_accessor :video_play_actions
|
|
58
79
|
|
|
@@ -109,6 +130,13 @@ module Zernio
|
|
|
109
130
|
:'action_values' => :'actionValues',
|
|
110
131
|
:'purchase_value' => :'purchaseValue',
|
|
111
132
|
:'roas' => :'roas',
|
|
133
|
+
:'cost_per_action' => :'costPerAction',
|
|
134
|
+
:'outbound_clicks' => :'outboundClicks',
|
|
135
|
+
:'outbound_clicks_ctr' => :'outboundClicksCtr',
|
|
136
|
+
:'inline_link_clicks' => :'inlineLinkClicks',
|
|
137
|
+
:'inline_link_click_ctr' => :'inlineLinkClickCtr',
|
|
138
|
+
:'unique_clicks' => :'uniqueClicks',
|
|
139
|
+
:'unique_ctr' => :'uniqueCtr',
|
|
112
140
|
:'video_play_actions' => :'videoPlayActions',
|
|
113
141
|
:'video30_sec_watched_actions' => :'video30SecWatchedActions',
|
|
114
142
|
:'video_thruplay_watched_actions' => :'videoThruplayWatchedActions',
|
|
@@ -153,6 +181,13 @@ module Zernio
|
|
|
153
181
|
:'action_values' => :'Hash<String, Float>',
|
|
154
182
|
:'purchase_value' => :'Float',
|
|
155
183
|
:'roas' => :'Float',
|
|
184
|
+
:'cost_per_action' => :'Hash<String, Float>',
|
|
185
|
+
:'outbound_clicks' => :'Integer',
|
|
186
|
+
:'outbound_clicks_ctr' => :'Float',
|
|
187
|
+
:'inline_link_clicks' => :'Integer',
|
|
188
|
+
:'inline_link_click_ctr' => :'Float',
|
|
189
|
+
:'unique_clicks' => :'Integer',
|
|
190
|
+
:'unique_ctr' => :'Float',
|
|
156
191
|
:'video_play_actions' => :'Integer',
|
|
157
192
|
:'video30_sec_watched_actions' => :'Integer',
|
|
158
193
|
:'video_thruplay_watched_actions' => :'Integer',
|
|
@@ -187,14 +222,14 @@ module Zernio
|
|
|
187
222
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
188
223
|
def initialize(attributes = {})
|
|
189
224
|
if (!attributes.is_a?(Hash))
|
|
190
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::
|
|
225
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CampaignAnalyticsResponseAnalyticsDailyInner` initialize method"
|
|
191
226
|
end
|
|
192
227
|
|
|
193
228
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
194
229
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
195
230
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
196
231
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
197
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::
|
|
232
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CampaignAnalyticsResponseAnalyticsDailyInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
198
233
|
end
|
|
199
234
|
h[k.to_sym] = v
|
|
200
235
|
}
|
|
@@ -259,6 +294,36 @@ module Zernio
|
|
|
259
294
|
self.roas = attributes[:'roas']
|
|
260
295
|
end
|
|
261
296
|
|
|
297
|
+
if attributes.key?(:'cost_per_action')
|
|
298
|
+
if (value = attributes[:'cost_per_action']).is_a?(Hash)
|
|
299
|
+
self.cost_per_action = value
|
|
300
|
+
end
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
if attributes.key?(:'outbound_clicks')
|
|
304
|
+
self.outbound_clicks = attributes[:'outbound_clicks']
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
if attributes.key?(:'outbound_clicks_ctr')
|
|
308
|
+
self.outbound_clicks_ctr = attributes[:'outbound_clicks_ctr']
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
if attributes.key?(:'inline_link_clicks')
|
|
312
|
+
self.inline_link_clicks = attributes[:'inline_link_clicks']
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
if attributes.key?(:'inline_link_click_ctr')
|
|
316
|
+
self.inline_link_click_ctr = attributes[:'inline_link_click_ctr']
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
if attributes.key?(:'unique_clicks')
|
|
320
|
+
self.unique_clicks = attributes[:'unique_clicks']
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
if attributes.key?(:'unique_ctr')
|
|
324
|
+
self.unique_ctr = attributes[:'unique_ctr']
|
|
325
|
+
end
|
|
326
|
+
|
|
262
327
|
if attributes.key?(:'video_play_actions')
|
|
263
328
|
self.video_play_actions = attributes[:'video_play_actions']
|
|
264
329
|
end
|
|
@@ -350,6 +415,13 @@ module Zernio
|
|
|
350
415
|
action_values == o.action_values &&
|
|
351
416
|
purchase_value == o.purchase_value &&
|
|
352
417
|
roas == o.roas &&
|
|
418
|
+
cost_per_action == o.cost_per_action &&
|
|
419
|
+
outbound_clicks == o.outbound_clicks &&
|
|
420
|
+
outbound_clicks_ctr == o.outbound_clicks_ctr &&
|
|
421
|
+
inline_link_clicks == o.inline_link_clicks &&
|
|
422
|
+
inline_link_click_ctr == o.inline_link_click_ctr &&
|
|
423
|
+
unique_clicks == o.unique_clicks &&
|
|
424
|
+
unique_ctr == o.unique_ctr &&
|
|
353
425
|
video_play_actions == o.video_play_actions &&
|
|
354
426
|
video30_sec_watched_actions == o.video30_sec_watched_actions &&
|
|
355
427
|
video_thruplay_watched_actions == o.video_thruplay_watched_actions &&
|
|
@@ -375,7 +447,7 @@ module Zernio
|
|
|
375
447
|
# Calculates hash code according to all attributes.
|
|
376
448
|
# @return [Integer] Hash code
|
|
377
449
|
def hash
|
|
378
|
-
[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, date].hash
|
|
450
|
+
[spend, impressions, reach, clicks, ctr, cpc, cpm, engagement, 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, date].hash
|
|
379
451
|
end
|
|
380
452
|
|
|
381
453
|
# Builds the object from hash
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
class
|
|
17
|
+
class CampaignAnalyticsResponseCampaign < ApiModelBase
|
|
18
18
|
attr_accessor :id
|
|
19
19
|
|
|
20
20
|
attr_accessor :name
|
|
@@ -72,14 +72,14 @@ module Zernio
|
|
|
72
72
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
73
73
|
def initialize(attributes = {})
|
|
74
74
|
if (!attributes.is_a?(Hash))
|
|
75
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::
|
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CampaignAnalyticsResponseCampaign` initialize method"
|
|
76
76
|
end
|
|
77
77
|
|
|
78
78
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
79
79
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
80
80
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
81
81
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
82
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::
|
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CampaignAnalyticsResponseCampaign`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
83
83
|
end
|
|
84
84
|
h[k.to_sym] = v
|
|
85
85
|
}
|