Skip to content

Commit

Permalink
Deprecates Booking#calculate_price_quote
Browse files Browse the repository at this point in the history
  • Loading branch information
alxberardi committed Apr 19, 2016
1 parent b605951 commit 1cdfb90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 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/).

## [Unreleased]
### Changed
- Deprecates Booking#calculate_price_quote

## [2.2.1] - 2016-04-18
### Fixed
- Adds missing require for PriceQuote adapter
Expand Down
2 changes: 2 additions & 0 deletions lib/quick_travel/booking.rb
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ def total_price_change_on(reservation)
price_change.total_price_change_on(reservation.id)
end

# <b>DEPRECATED:</b>
# Please use <tt>PriceQuote.calculate(params.merge(booking_id: booking.id))</tt> instead.
def calculate_price_quote(params = {})
response = post_and_validate("#{api_base}/#{@id}/price_quotes/calculate", params)
Money.new(response['quoted_booking_gross_in_cents'])
Expand Down

0 comments on commit 1cdfb90

Please sign in to comment.