expedia_api 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/expedia_api/entities/search_entity.rb +22 -1
- data/lib/expedia_api/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: 2087ea6d06f80910b08422290767099664c7025e
|
4
|
+
data.tar.gz: a16cde4dc03bf5dfbc040cc51682edbd8e4a4156
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebb4d56de697d4dd04579880706b959a30e99737f5b23a6085475a003a0a6eb4ec97319c71ed68f187e41fad347834b8b34d3f1339cb1824db11175b6727793a
|
7
|
+
data.tar.gz: 8a559770123d2617f5d70518c41920ce16e4137c2b860b57ffa2f999cdea16fcc43b081d0caa972fbea7ca95d0a55dd9b0ca9ba78b448b7faced03bde316d9ba
|
@@ -21,7 +21,28 @@ module ExpediaApi
|
|
21
21
|
|
22
22
|
def total_price_including_taxes
|
23
23
|
if available?
|
24
|
-
raw_data[:Price][:TotalRate][:Value].to_f
|
24
|
+
price = raw_data[:Price][:TotalRate][:Value].to_f
|
25
|
+
if hotel_mandatory_taxes_and_fees
|
26
|
+
price + hotel_mandatory_taxes_and_fees
|
27
|
+
else
|
28
|
+
price
|
29
|
+
end
|
30
|
+
else
|
31
|
+
nil
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def hotel_mandatory_taxes_and_fees
|
36
|
+
if raw_data[:HotelMandatoryTaxesAndFees] && raw_data[:HotelMandatoryTaxesAndFees][:Value]
|
37
|
+
raw_data[:HotelMandatoryTaxesAndFees][:Value].to_f
|
38
|
+
else
|
39
|
+
nil
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def hotel_mandatory_taxes_and_fees_currency
|
44
|
+
if raw_data[:HotelMandatoryTaxesAndFees] && raw_data[:HotelMandatoryTaxesAndFees][:Currency]
|
45
|
+
raw_data[:HotelMandatoryTaxesAndFees][:Currency]
|
25
46
|
else
|
26
47
|
nil
|
27
48
|
end
|
data/lib/expedia_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: expedia_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hendrik Kleinwaechter
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|