-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #412 from roomorama/release/0.12.0
Release/0.12.0
- Loading branch information
Showing
171 changed files
with
7,705 additions
and
299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,31 @@ | ||
post '/atleisure/quote', to: 'at_leisure#quote' | ||
post '/jtb/quote', to: 'j_t_b#quote' | ||
post '/kigo/quote', to: 'kigo#quote' | ||
post '/kigo/legacy/quote', to: 'kigo/legacy#quote' | ||
post '/poplidays/quote', to: 'poplidays#quote' | ||
post '/ciirus/quote', to: 'ciirus#quote' | ||
post '/waytostay/quote', to: 'waytostay#quote' | ||
post '/saw/quote', to: 's_a_w#quote' | ||
post '/atleisure/quote', to: 'at_leisure#quote' | ||
post '/jtb/quote', to: 'j_t_b#quote' | ||
post '/kigo/quote', to: 'kigo#quote' | ||
post '/kigo/legacy/quote', to: 'kigo/legacy#quote' | ||
post '/poplidays/quote', to: 'poplidays#quote' | ||
post '/ciirus/quote', to: 'ciirus#quote' | ||
post '/waytostay/quote', to: 'waytostay#quote' | ||
post '/saw/quote', to: 's_a_w#quote' | ||
post '/rentalsunited/quote', to: 'rentals_united#quote' | ||
|
||
post '/jtb/booking', to: 'j_t_b#booking' | ||
post '/atleisure/booking', to: 'at_leisure#booking' | ||
post '/waytostay/booking', to: 'waytostay#booking' | ||
post '/ciirus/booking', to: 'ciirus#booking' | ||
post '/kigo/booking', to: 'kigo#booking' | ||
post '/kigo/legacy/booking', to: 'kigo/legacy#booking' | ||
post '/saw/booking', to: 's_a_w#booking' | ||
post '/poplidays/booking', to: 'poplidays#booking' | ||
post '/jtb/booking', to: 'j_t_b#booking' | ||
post '/atleisure/booking', to: 'at_leisure#booking' | ||
post '/waytostay/booking', to: 'waytostay#booking' | ||
post '/ciirus/booking', to: 'ciirus#booking' | ||
post '/kigo/booking', to: 'kigo#booking' | ||
post '/kigo/legacy/booking', to: 'kigo/legacy#booking' | ||
post '/saw/booking', to: 's_a_w#booking' | ||
post '/poplidays/booking', to: 'poplidays#booking' | ||
post '/rentalsunited/booking', to: 'rentals_united#booking' | ||
|
||
post '/waytostay/cancel', to: 'waytostay#cancel' | ||
post '/ciirus/cancel', to: 'ciirus#cancel' | ||
post '/saw/cancel', to: 's_a_w#cancel' | ||
post '/kigo/cancel', to: 'kigo#cancel' | ||
post '/kigo/legacy/cancel', to: 'kigo/legacy#cancel' | ||
post '/poplidays/cancel', to: 'poplidays#cancel' | ||
post '/atleisure/cancel', to: 'at_leisure#cancel' | ||
post '/waytostay/cancel', to: 'waytostay#cancel' | ||
post '/ciirus/cancel', to: 'ciirus#cancel' | ||
post '/saw/cancel', to: 's_a_w#cancel' | ||
post '/kigo/cancel', to: 'kigo#cancel' | ||
post '/kigo/legacy/cancel', to: 'kigo/legacy#cancel' | ||
post '/poplidays/cancel', to: 'poplidays#cancel' | ||
post '/atleisure/cancel', to: 'at_leisure#cancel' | ||
post '/rentalsunited/cancel', to: 'rentals_united#cancel' | ||
|
||
post '/checkout', to: 'static#checkout' | ||
get '/kigo/image/:property_id/:image_id', to: 'kigo#image' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
require_relative "../booking" | ||
require_relative "../params/booking" | ||
|
||
module API::Controllers::RentalsUnited | ||
|
||
# +API::Controllers::RentalsUnited::Booking+ | ||
# | ||
# Performs create booking for properties from RentalsUnited. | ||
class Booking | ||
include API::Controllers::Booking | ||
|
||
params API::Controllers::Params::Booking | ||
|
||
# Make property booking request | ||
# | ||
# Usage | ||
# | ||
# It returns a +Reservation+ object in both success and fail cases: | ||
# | ||
# API::Controllers::RentalsUnited::Booking.create_booking(selected_params) | ||
# => Reservation(..) | ||
def create_booking(params) | ||
credentials = Concierge::Credentials.for(supplier_name) | ||
RentalsUnited::Client.new(credentials).book(params) | ||
end | ||
|
||
def supplier_name | ||
RentalsUnited::Client::SUPPLIER_NAME | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
require_relative "../cancel" | ||
|
||
module API::Controllers::RentalsUnited | ||
# +API::Controllers::RentalsUnited::Cancel+ | ||
# | ||
# Cancels reservation from RentalsUnited. | ||
class Cancel | ||
include API::Controllers::Cancel | ||
|
||
params API::Controllers::Params::Cancel | ||
|
||
def cancel_reservation(params) | ||
credentials = Concierge::Credentials.for(supplier_name) | ||
RentalsUnited::Client.new(credentials).cancel(params) | ||
end | ||
|
||
def supplier_name | ||
RentalsUnited::Client::SUPPLIER_NAME | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
require_relative "../quote" | ||
|
||
module API::Controllers::RentalsUnited | ||
# API::Controllers::RentalsUnited::Quote | ||
# | ||
# Performs booking quotations for properties from RentalsUnited. | ||
class Quote | ||
include API::Controllers::Quote | ||
|
||
params API::Controllers::Params::Quote | ||
|
||
# Make price (property rate) request | ||
# | ||
# Returns a +Result+ wrapping a +Quotation+ when operation succeeds | ||
# Returns a +Result+ with +Result::Error+ when operation fails | ||
def quote_price(params) | ||
credentials = Concierge::Credentials.for(supplier_name) | ||
RentalsUnited::Client.new(credentials).quote(params) | ||
end | ||
|
||
def supplier_name | ||
RentalsUnited::Client::SUPPLIER_NAME | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.