promoqui-api-sdk 1.7.3 → 1.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pqsdk/offer.rb +3 -3
- data/lib/pqsdk/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0e42403def3c6d8567050d156b89fcbbb4dd368
|
4
|
+
data.tar.gz: ce8a48d540fc9125e9b6e78ce78ee0135934facc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0cb055387c74093c4dd985f2414c89956057dec8f289953159b385123c818c0a8fa235cab4525232506fd68b9a2d1e91182776a87477b31383dc0ddd68d18b3
|
7
|
+
data.tar.gz: 0efcd3021503c99d43ea909a9bf6ddb98c3be35539b1db719bfb9d56129f2e8908082907073b946630d8a3d6ff8476a5243b8422079520fccc582799e6249fc2
|
data/lib/pqsdk/offer.rb
CHANGED
@@ -15,13 +15,13 @@ module PQSDK
|
|
15
15
|
method = :post
|
16
16
|
endpoint = "v1/offers"
|
17
17
|
|
18
|
-
fields = {}
|
18
|
+
fields = {:offer => {}}
|
19
19
|
[ :title, :description, :price, :original_price, :discount, :start_date, :end_date, :brand, :image,
|
20
20
|
:national, :partner_link,
|
21
21
|
:btn_other_offers_visible, :btn_partner_link_text, :btn_partner_link_visible, :btn_print_visible, :btn_stores_visible, :btn_online_offers_visible ].each do |key|
|
22
|
-
fields[key.to_s] = send(key) unless send(key).nil?
|
22
|
+
fields[:offer][key.to_s] = send(key) unless send(key).nil?
|
23
23
|
end
|
24
|
-
fields['store_ids'] = store_ids
|
24
|
+
fields[:offer]['store_ids'] = store_ids.presence || []
|
25
25
|
|
26
26
|
res = RestLayer.send(method, endpoint, fields, {'Authorization' => "Bearer #{Token.access_token}", 'Content-Type' => 'application/json'})
|
27
27
|
|
data/lib/pqsdk/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: promoqui-api-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francesco Boffa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|