promoqui-api-sdk 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pqsdk/leaflet.rb +5 -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: ba21f3fac04a57878a4e8992dd317aadcf31c6b3
|
4
|
+
data.tar.gz: 2eece5cfe4bcd0fa6818886e8c89764de0fff95d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a62b251ee56a5451898286b3731b50ed9bb3368a0a778b43cf850f62dde70a755a2e3ce257c5207510647281c2e9ac3481516b0c7120fb9a7cc2fd97993ce390
|
7
|
+
data.tar.gz: 030e1b2d4ff73c50100a4422c24f670c4450d74c31d3669502eb530a314a3fbcb7a2486327dd13fd0cdfd71369b3ad30501ae588d032f695054ca3ead0089d6c
|
data/lib/pqsdk/leaflet.rb
CHANGED
@@ -2,6 +2,10 @@ module PQSDK
|
|
2
2
|
class Leaflet
|
3
3
|
attr_accessor :id, :name, :url, :start_date, :end_date, :pdf_data, :image_urls
|
4
4
|
|
5
|
+
def initialize
|
6
|
+
self.image_urls = []
|
7
|
+
end
|
8
|
+
|
5
9
|
def self.find(url)
|
6
10
|
res = RestLayer.get('v1/leaflets', { url: url }, { 'Authorization' => "Bearer #{Token.access_token}" })
|
7
11
|
if res[0] == 200
|
@@ -24,7 +28,7 @@ module PQSDK
|
|
24
28
|
fields['start_date'] = start_date unless start_date.nil?
|
25
29
|
fields['end_date'] = end_date unless end_date.nil?
|
26
30
|
fields['pdf_data'] = pdf_data unless pdf_data.nil?
|
27
|
-
fields['image_urls'] = image_urls
|
31
|
+
fields['image_urls'] = image_urls.try(:to_json) || []
|
28
32
|
|
29
33
|
res = RestLayer.send(method, endpoint, fields, { 'Authorization' => "Bearer #{Token.access_token}" })
|
30
34
|
|
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.1.
|
4
|
+
version: 1.1.2
|
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-02-
|
11
|
+
date: 2015-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|