blurb 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/blurb.gemspec +1 -1
- data/lib/blurb/report_requests.rb +12 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc759e7143938c4b655af1c4ea8b72af388933f065d84230c0353451c6ffc9f2
|
4
|
+
data.tar.gz: 3e300e444044b62ef1dcb07dcbe2c29e03ff0d0973ec3afa25b1666f5a08510e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06dc8e873b618c4ba50ffa6bf3c889841c2e1816d06dccbf1b538d74f0442f8895b68172bb656f020cf91bd86c9264b027c64722fb22d3b2f129494b09ccbc07
|
7
|
+
data.tar.gz: 2ec363459a1f8751cc0dbe79abcbc06699bac1b90804520627886b72e358b544d93fa55b5c097a7d3725db6e49cd476cdb02be14082d9acbbe6e7f37dbc4be61
|
data/blurb.gemspec
CHANGED
@@ -17,7 +17,7 @@ class Blurb
|
|
17
17
|
segment: nil
|
18
18
|
)
|
19
19
|
# create payload
|
20
|
-
metrics = get_default_metrics(record_type.to_s.underscore.to_sym) if metrics.nil?
|
20
|
+
metrics = get_default_metrics(record_type.to_s.underscore.to_sym, segment) if metrics.nil?
|
21
21
|
payload = {
|
22
22
|
metrics: metrics.map{ |m| m.to_s.camelize(:lower) }.join(","),
|
23
23
|
report_date: report_date
|
@@ -48,7 +48,7 @@ class Blurb
|
|
48
48
|
|
49
49
|
private
|
50
50
|
|
51
|
-
def get_default_metrics(record_type)
|
51
|
+
def get_default_metrics(record_type, segment = nil)
|
52
52
|
if @campaign_type == CAMPAIGN_TYPE_CODES[:sb]
|
53
53
|
return [
|
54
54
|
"campaignId",
|
@@ -82,7 +82,16 @@ class Blurb
|
|
82
82
|
"attributedSales14dSameSKU",
|
83
83
|
"attributedConversions14d",
|
84
84
|
"attributedConversions14dSameSKU"
|
85
|
-
] if record_type == :keywords
|
85
|
+
] if record_type == :keywords && segment.nil?
|
86
|
+
return [
|
87
|
+
"adGroupId",
|
88
|
+
"campaignId",
|
89
|
+
"impressions",
|
90
|
+
"clicks",
|
91
|
+
"cost",
|
92
|
+
"attributedSales14d",
|
93
|
+
"attributedConversions14d",
|
94
|
+
] if record_type == :keywords && segment.present?
|
86
95
|
elsif @campaign_type == CAMPAIGN_TYPE_CODES[:sp]
|
87
96
|
return [
|
88
97
|
"campaignId",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blurb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dlbunker
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-07
|
13
|
+
date: 2020-08-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|