bigcartel 0.1.5 → 0.1.6
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.
- data/lib/bigcartel/version.rb +1 -1
- data/lib/bigcartel.rb +11 -2
- metadata +3 -3
data/lib/bigcartel/version.rb
CHANGED
data/lib/bigcartel.rb
CHANGED
@@ -114,7 +114,7 @@ module BigCartel
|
|
114
114
|
@tax = data['tax']
|
115
115
|
@permalink = data['permalink']
|
116
116
|
@images = data['images'].blank? ? [] : data['images'].map{|img| Image.new(img)}
|
117
|
-
@shipping = data['shipping']
|
117
|
+
@shipping = data['shipping'].map{|ship| Shipping.new(ship)} unless data['shipping'].blank?
|
118
118
|
end
|
119
119
|
|
120
120
|
def img
|
@@ -139,5 +139,14 @@ module BigCartel
|
|
139
139
|
@id = data['id']
|
140
140
|
end
|
141
141
|
end
|
142
|
-
|
142
|
+
|
143
|
+
class Shipping < Base
|
144
|
+
attr_reader :amount_alone, :amount_combined, :country
|
145
|
+
def initialize(data={})
|
146
|
+
@amount_alone = data['amount_alone']
|
147
|
+
@amount_combined = data['amount_with_others']
|
148
|
+
@country = data['country']['code'] unless data['country'].blank?
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
143
152
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 6
|
9
|
+
version: 0.1.6
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Matt Anderson
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-01-
|
17
|
+
date: 2011-01-31 00:00:00 -06:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|