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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 637f9566c6691149db022ed83f8e63af8a49aab3cf9ac04259445e80715c9965
4
- data.tar.gz: 0fa942a78f9cb8a0dae1cf1f29521c1629e0d72add6db5c5b334e4a90da2d427
3
+ metadata.gz: cc759e7143938c4b655af1c4ea8b72af388933f065d84230c0353451c6ffc9f2
4
+ data.tar.gz: 3e300e444044b62ef1dcb07dcbe2c29e03ff0d0973ec3afa25b1666f5a08510e
5
5
  SHA512:
6
- metadata.gz: 91e9d8f908a076de92769f0ef7d094505f9ffc1aa03c4cea4600d47a76df066de82db4d2ca5ae18dd41af57dc50e51b30304dba3ba41653128c2636763b90571
7
- data.tar.gz: 33b4474711cb676df700c72c84ba383d4e8c76881a7c21d810bda8e0a9cb0702359c14766649445d40200ab36ced70d483a40a4ce95d8be5157212640a3b8e1a
6
+ metadata.gz: 06dc8e873b618c4ba50ffa6bf3c889841c2e1816d06dccbf1b538d74f0442f8895b68172bb656f020cf91bd86c9264b027c64722fb22d3b2f129494b09ccbc07
7
+ data.tar.gz: 2ec363459a1f8751cc0dbe79abcbc06699bac1b90804520627886b72e358b544d93fa55b5c097a7d3725db6e49cd476cdb02be14082d9acbbe6e7f37dbc4be61
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "blurb"
7
- spec.version = "0.5.1"
7
+ spec.version = "0.5.2"
8
8
  spec.authors = ["dlbunker", "eamigo13", "smithworx"]
9
9
  spec.email = ["evan@pattern.com"]
10
10
 
@@ -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.1
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-28 00:00:00.000000000 Z
13
+ date: 2020-08-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler