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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb0a9de4da870a75d50edd62ac867fb783f0e879
4
- data.tar.gz: c6565dc9f2f9ef447b0db8299d1ca9c80787ccbd
3
+ metadata.gz: e0e42403def3c6d8567050d156b89fcbbb4dd368
4
+ data.tar.gz: ce8a48d540fc9125e9b6e78ce78ee0135934facc
5
5
  SHA512:
6
- metadata.gz: a6e055aed3ab6d482c85d22d8b32baeb4e626c22ee8fd8c1b78eb115b23c34e1a2abda4728da9c406d0d3211a0889be25af8aba386ef985ea6153d719893eb50
7
- data.tar.gz: 73242786a9236bf9bbf07b4401e160ee94a4a24b83b161699769c7467e3695eef889b48aed9b508cc49f58363cd58752a3fc535eb672b9d2cb1e111adda5be63
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
@@ -1,3 +1,3 @@
1
1
  module PQSDK
2
- VERSION = '1.7.3'
2
+ VERSION = '1.7.4'
3
3
  end
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.3
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-24 00:00:00.000000000 Z
11
+ date: 2015-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json