Skip to content

Commit

Permalink
Merge pull request #52 from sealink/pass-last-travel-date-directly
Browse files Browse the repository at this point in the history
@booking.accommodation_reserve now expects to be passed the adjusted last_travel_date
  • Loading branch information
jmortlock committed Feb 7, 2017
2 parents eaaccd8 + 8c18f47 commit 38b36ac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
This changelog adheres to [Keep a CHANGELOG](http://keepachangelog.com/).

## [2.8.0]
### Changed
- @booking.accommodation_reserve now expects to be passed the adjusted last_travel_date

## [2.7.0]
### Added
- can_choose_stops? to check if a route has more than two stops
Expand Down
3 changes: 0 additions & 3 deletions lib/quick_travel/booking.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,6 @@ def accommodation_reserve(reservations_options = {})

last_travel_date = Date.strptime(reservations_options[:last_travel_date], '%d/%m/%Y')

# Because QT requires last-date to be the date of use, we have to subtract one
last_travel_date -= 1

options = { reservations: reservations_options }
options[:reservations][:last_travel_date] = last_travel_date.strftime(QT_DATE_FORMAT)

Expand Down
2 changes: 1 addition & 1 deletion lib/quick_travel/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module QuickTravel
VERSION = '2.7.0'
VERSION = '2.8.0'
end

0 comments on commit 38b36ac

Please sign in to comment.