blurb 0.4.7 → 0.4.8
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/blurb.gemspec +1 -1
- data/lib/blurb/profile.rb +2 -3
- metadata +2 -3
- data/lib/blurb/campaign_requests.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92ab9498ffa51bc559bac7ee7b4294bef3b0f8f106c5375531af20f8ae026649
|
4
|
+
data.tar.gz: b7709d612fecbeb4bbd634a716fae4b259ea9d77a0bf4701125856cf90b5726b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e0e4ac917c156469d58b9bc9a33fa63f94cf88e79cbaf90bd999536a89773cf47ba460acb8e538fb180e583e0a6f7e52240623aec120a39aa9f3d3fc69cbc49
|
7
|
+
data.tar.gz: e9d09bbc20847bfe92d177e87cfb689bc5a6c59e89fd7d0928e4b27051574b656639027236130d24c71c57e28e906cdd898a5f138bf86805a0936347ba45661e
|
data/blurb.gemspec
CHANGED
data/lib/blurb/profile.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require "blurb/account"
|
2
|
-
require "blurb/campaign_requests"
|
3
2
|
require "blurb/snapshot_requests"
|
4
3
|
require "blurb/report_requests"
|
5
4
|
require "blurb/request_collection"
|
@@ -24,13 +23,13 @@ class Blurb
|
|
24
23
|
@profile_id = profile_id
|
25
24
|
@account = account
|
26
25
|
|
27
|
-
@sp_campaigns =
|
26
|
+
@sp_campaigns = RequestCollectionWithCampaignType.new(
|
28
27
|
headers: headers_hash,
|
29
28
|
base_url: @account.api_url,
|
30
29
|
resource: "campaigns",
|
31
30
|
campaign_type: CAMPAIGN_TYPE_CODES[:sp]
|
32
31
|
)
|
33
|
-
@sb_campaigns =
|
32
|
+
@sb_campaigns = RequestCollectionWithCampaignType.new(
|
34
33
|
headers: headers_hash,
|
35
34
|
base_url: @account.api_url,
|
36
35
|
resource: "campaigns",
|
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.4.
|
4
|
+
version: 0.4.8
|
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:
|
13
|
+
date: 2020-02-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -175,7 +175,6 @@ files:
|
|
175
175
|
- lib/blurb.rb
|
176
176
|
- lib/blurb/account.rb
|
177
177
|
- lib/blurb/base_class.rb
|
178
|
-
- lib/blurb/campaign_requests.rb
|
179
178
|
- lib/blurb/client.rb
|
180
179
|
- lib/blurb/errors/failed_request.rb
|
181
180
|
- lib/blurb/errors/invalid_report_request.rb
|
@@ -1,23 +0,0 @@
|
|
1
|
-
require 'blurb/request_collection_with_campaign_type'
|
2
|
-
|
3
|
-
class Blurb
|
4
|
-
class CampaignRequests < RequestCollectionWithCampaignType
|
5
|
-
def create_bulk(create_array)
|
6
|
-
create_array = map_campaign_payload(create_array)
|
7
|
-
super(create_array)
|
8
|
-
end
|
9
|
-
|
10
|
-
def update_bulk(update_array)
|
11
|
-
update_array = map_campaign_payload(update_array)
|
12
|
-
super(update_array)
|
13
|
-
end
|
14
|
-
|
15
|
-
private
|
16
|
-
|
17
|
-
def map_campaign_payload(payload)
|
18
|
-
campaign_type_string = "sponsoredProducts" if @campaign_type == CAMPAIGN_TYPE_CODES[:sp]
|
19
|
-
campaign_type_string = "sponsoredBrands" if @campaign_type == CAMPAIGN_TYPE_CODES[:sb]
|
20
|
-
payload.each{ |p| p[:campaign_type] = campaign_type_string }
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|