blurb 0.4.7 → 0.4.8

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: 669e05b5dc6b0c14fb71f93de5d7a0b779c22e133a24b760d8d6547d4050c67e
4
- data.tar.gz: 2101c431694c2294c17ac660d1d18e11e6d1848262a18e44e2f6fa9fe232b04a
3
+ metadata.gz: 92ab9498ffa51bc559bac7ee7b4294bef3b0f8f106c5375531af20f8ae026649
4
+ data.tar.gz: b7709d612fecbeb4bbd634a716fae4b259ea9d77a0bf4701125856cf90b5726b
5
5
  SHA512:
6
- metadata.gz: fbfb8710e76e917a67358f44053a3918e0a907ba5dc8ef741a4fc8216c3e95e0f3a6c68043165d396b37c3bec2166748d601f2f96554504bffed53849751feaa
7
- data.tar.gz: 17b92a47dce657e57a33bde1bd952e1b4ecd9e6f6cda62bce5a1915819ceea3ffc8fedebdba942392daeb317ff923d175aa6104f46489e3f00a857456a025e11
6
+ metadata.gz: 4e0e4ac917c156469d58b9bc9a33fa63f94cf88e79cbaf90bd999536a89773cf47ba460acb8e538fb180e583e0a6f7e52240623aec120a39aa9f3d3fc69cbc49
7
+ data.tar.gz: e9d09bbc20847bfe92d177e87cfb689bc5a6c59e89fd7d0928e4b27051574b656639027236130d24c71c57e28e906cdd898a5f138bf86805a0936347ba45661e
data/blurb.gemspec CHANGED
@@ -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.4.7"
7
+ spec.version = "0.4.8"
8
8
  spec.authors = ["dlbunker", "eamigo13", "smithworx"]
9
9
  spec.email = ["evan@pattern.com"]
10
10
 
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 = CampaignRequests.new(
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 = CampaignRequests.new(
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.7
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: 2019-12-09 00:00:00.000000000 Z
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