quicktravel_client 2.2.1 → 2.2.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ccf70f77e6dc2aa9c744c83f62bb11f17ef813a
4
- data.tar.gz: b431ad4418edddde20d1ba2990f99f889e37a689
3
+ metadata.gz: 421aff4ace14fcc897f2e4e2fb6ce1322c59cee5
4
+ data.tar.gz: 866639c423532c55b063a28c01158c3c3878a9cb
5
5
  SHA512:
6
- metadata.gz: 5dbfca0835eb101b12b893cd709d5355b2eed2e640cdcd7bc23d922c6ff08c73dfd564b1a807bfd2fcf8ab1274dbcc0a956535f0ae88abc9002be7dd39b30768
7
- data.tar.gz: f5444c3e59099646f69e4534f8b9250e145faa326ae366ef6b007996a7027b51c409561ae2528e58d824b289afc3f959bb443685eb662401de20bbade74cc255
6
+ metadata.gz: 8958463c230448871416721396a4942f67028d263a107f7bd873ea34b325f956d3cb509e53bea8500f28c421dbf13a441ab410b79b9c4d196577c441792a4400
7
+ data.tar.gz: 1701d78f156203ad7dfda195608f97561a74d6a3783a32882aee910b180709b4a244f64cf6efa61be92265ec7dd158041e5afb87263b0085c16a22817eca650f
data/CHANGELOG.md CHANGED
@@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/).
4
4
  This changelog adheres to [Keep a CHANGELOG](http://keepachangelog.com/).
5
5
 
6
+ ## [2.2.2]
7
+ ### Changed
8
+ - Deprecates Booking#calculate_price_quote
9
+ - Fix when money is nil from QT
10
+
6
11
  ## [2.2.1] - 2016-04-18
7
12
  ### Fixed
8
13
  - Adds missing require for PriceQuote adapter
@@ -36,7 +36,9 @@ module QuickTravel
36
36
  if key.to_s.ends_with? '_cents'
37
37
  name = key.to_s.gsub(/_in_cents$/, '')
38
38
  define_singleton_method(name) {
39
- Money.new(instance_variable_get("@#{key}"))
39
+ cents = instance_variable_get("@#{key}")
40
+ return nil unless cents
41
+ Money.new(cents)
40
42
  }
41
43
  end
42
44
  end
@@ -308,6 +308,8 @@ module QuickTravel
308
308
  price_change.total_price_change_on(reservation.id)
309
309
  end
310
310
 
311
+ # <b>DEPRECATED:</b>
312
+ # Please use <tt>PriceQuote.calculate(params.merge(booking_id: booking.id))</tt> instead.
311
313
  def calculate_price_quote(params = {})
312
314
  response = post_and_validate("#{api_base}/#{@id}/price_quotes/calculate", params)
313
315
  Money.new(response['quoted_booking_gross_in_cents'])
@@ -1,3 +1,3 @@
1
1
  module QuickTravel
2
- VERSION = '2.2.1'
2
+ VERSION = '2.2.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quicktravel_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Noack
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-04-18 00:00:00.000000000 Z
13
+ date: 2016-04-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty
@@ -416,7 +416,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
416
416
  version: '0'
417
417
  requirements: []
418
418
  rubyforge_project:
419
- rubygems_version: 2.4.5.1
419
+ rubygems_version: 2.4.8
420
420
  signing_key:
421
421
  specification_version: 4
422
422
  summary: Booking process using QuickTravel API