promoqui-api-sdk 1.0.0 → 1.0.1
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/lib/pqsdk/leaflet.rb +1 -6
- data/lib/pqsdk/store.rb +6 -1
- 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: a5ddb8abd07927a02b5969fddb9e8309248061a4
|
4
|
+
data.tar.gz: 4662bd2cee569d2988ef9adf1041a1e801196b9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 550a796dd0068f22dfe1c6f7593c1f0400f952bce03774ffc53690965354cd18b77342014e4099f73588c51ea06eb726bcd371a4d10e059cebd874ee2c80d1c3
|
7
|
+
data.tar.gz: bb93b8e46d798bf6dbc52d904f33b1e69a30cd8eeeb7290c7c8b1ef8691c2949cb6faf4ee7eb61088b6e8c78d42bba0f590071a6b8a6d77a3f7eca748733a83e
|
data/lib/pqsdk/leaflet.rb
CHANGED
@@ -1,10 +1,6 @@
|
|
1
1
|
module PQSDK
|
2
2
|
class Leaflet
|
3
|
-
attr_accessor :id, :name, :url, :start_date, :end_date, :pdf_data
|
4
|
-
|
5
|
-
def initialize
|
6
|
-
self.store_ids = []
|
7
|
-
end
|
3
|
+
attr_accessor :id, :name, :url, :start_date, :end_date, :pdf_data
|
8
4
|
|
9
5
|
def self.find(url)
|
10
6
|
res = RestLayer.get('v1/leaflets', { url: url }, { 'Authorization' => "Bearer #{Token.access_token}" })
|
@@ -28,7 +24,6 @@ module PQSDK
|
|
28
24
|
fields['start_date'] = start_date unless start_date.nil?
|
29
25
|
fields['end_date'] = end_date unless end_date.nil?
|
30
26
|
fields['pdf_data'] = pdf_data unless pdf_data.nil?
|
31
|
-
fields['store_ids'] = store_ids unless store_ids.nil?
|
32
27
|
|
33
28
|
res = RestLayer.send(method, endpoint, fields, { 'Authorization' => "Bearer #{Token.access_token}" })
|
34
29
|
|
data/lib/pqsdk/store.rb
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
module PQSDK
|
2
2
|
class Store
|
3
|
-
attr_accessor :id, :name, :address, :zipcode, :latitude, :longitude, :phone, :city_id, :origin, :opening_hours
|
3
|
+
attr_accessor :id, :name, :address, :zipcode, :latitude, :longitude, :phone, :city_id, :origin, :opening_hours, :leaflet_ids
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
self.leaflet_ids = []
|
7
|
+
end
|
4
8
|
|
5
9
|
def self.find(address, zipcode, retailer = nil)
|
6
10
|
res = RestLayer.get('v1/stores', { address: address, zipcode: zipcode, retailer: retailer }, { 'Authorization' => "Bearer #{Token.access_token}" })
|
@@ -44,6 +48,7 @@ module PQSDK
|
|
44
48
|
fields['city_id'] = city_id unless city_id.nil?
|
45
49
|
fields['origin'] = origin unless origin.nil?
|
46
50
|
fields['opening_hours'] = opening_hours.to_json unless opening_hours.nil?
|
51
|
+
fields['leaflet_ids'] = leaflet_ids unless leaflet_ids.nil?
|
47
52
|
|
48
53
|
res = RestLayer.send(method, url, fields, { 'Authorization' => "Bearer #{Token.access_token}" })
|
49
54
|
|
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.0.
|
4
|
+
version: 1.0.1
|
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-01-
|
11
|
+
date: 2015-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|