fassbinder 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/fassbinder/response.rb +10 -9
- data/lib/fassbinder/version.rb +1 -1
- metadata +2 -2
data/lib/fassbinder/response.rb
CHANGED
@@ -6,6 +6,13 @@ module Fassbinder
|
|
6
6
|
class Response
|
7
7
|
include Enumerable
|
8
8
|
|
9
|
+
DEFAULT_SHIPPING_CENTS = { :us => 399,
|
10
|
+
:uk => 280,
|
11
|
+
:de => 299,
|
12
|
+
:ca => 649,
|
13
|
+
:fr => 300,
|
14
|
+
:jp => 25000 }
|
15
|
+
|
9
16
|
def initialize(response, locale)
|
10
17
|
raise InvalidResponseError unless response.valid?
|
11
18
|
|
@@ -56,16 +63,10 @@ module Fassbinder
|
|
56
63
|
Kosher::Seller.new(doc['Merchant']['MerchantId'],
|
57
64
|
doc['Merchant']['Name'],
|
58
65
|
doc['Merchant']['AverageFeedbackRating'].to_f,
|
59
|
-
Kosher::Location.new((doc['Merchant']['Location']['CountryCode'] rescue nil),
|
66
|
+
Kosher::Location.new((doc['Merchant']['Location']['CountryCode'] rescue nil),
|
67
|
+
(doc['Merchant']['Location']['StateCode'] rescue nil))),
|
60
68
|
Kosher::Shipping.new(doc['OfferListing']['IsEligibleForSuperSaverShipping'] == '1' ?
|
61
|
-
0 :
|
62
|
-
when :us then 399
|
63
|
-
when :uk then 280
|
64
|
-
when :de then 299
|
65
|
-
when :ca then 649
|
66
|
-
when :fr then 300
|
67
|
-
when :jp then 25000
|
68
|
-
end),
|
69
|
+
0 : DEFAULT_SHIPPING_CENTS[@locale],
|
69
70
|
doc['OfferListing']['Price']['CurrencyCode'],
|
70
71
|
Kosher::Availability.new(doc['OfferListing']['AvailabilityAttributes']['MaximumHours'].to_i))
|
71
72
|
)
|
data/lib/fassbinder/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: fassbinder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.8
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Paper Cavalier
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-03-
|
13
|
+
date: 2011-03-21 00:00:00 +00:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|