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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 557dcad02c9d0ee37da7efc4dde94df088a8d6ec
4
- data.tar.gz: 16bd2b9a9024a8bb9e3db4610e0fb40c91b3d04e
3
+ metadata.gz: 2087ea6d06f80910b08422290767099664c7025e
4
+ data.tar.gz: a16cde4dc03bf5dfbc040cc51682edbd8e4a4156
5
5
  SHA512:
6
- metadata.gz: 653c7dd90f805d67bab75c142c9d020df00737c780588c4f20f1c2505fce1934863248716cef27c6384997ce59263fed180e5acd07e53e6f9d40b5a55509037d
7
- data.tar.gz: ec5d21508df926d51a626c87f2dc00e889e56605f1fca868ab49683188c3b4f13b43f8b2877d6d468339c203eac14e04cd329081f2abd0d2415fbcd016c1d96a
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
@@ -1,3 +1,3 @@
1
1
  module ExpediaApi
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
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.2
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-08 00:00:00.000000000 Z
11
+ date: 2016-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler