Class: Tourico::Api
- Inherits:
-
Object
- Object
- Tourico::Api
- Defined in:
- lib/tourico/api.rb
Instance Method Summary collapse
- #book_hotel_v3(args) ⇒ Object
- #book_hotel_v3_with_retry(args, try_count = 1) ⇒ Object
- #cancel_reservation(args) ⇒ Object
- #check_availability_and_prices(args) ⇒ Object
- #cost_amend(args) ⇒ Object
- #do_amend(args) ⇒ Object
- #get_cancellation_fee_for_reservation(args) ⇒ Object
- #get_cancellation_policy(args) ⇒ Object
- #get_hotel_details(args) ⇒ Object
- #get_list(args) ⇒ Object
- #get_list_by_hotel(args) ⇒ Object
-
#get_previous_reservations(args) ⇒ Object
-
not working.
-
-
#initialize ⇒ Api
constructor
A new instance of Api.
Constructor Details
#initialize ⇒ Api
Returns a new instance of Api.
4 5 6 |
# File 'lib/tourico/api.rb', line 4 def initialize end |
Instance Method Details
#book_hotel_v3(args) ⇒ Object
24 25 26 |
# File 'lib/tourico/api.rb', line 24 def book_hotel_v3(args) services(:book_hotel_v3,args) end |
#book_hotel_v3_with_retry(args, try_count = 1) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/tourico/api.rb', line 28 def book_hotel_v3_with_retry(args,try_count = 1) supplier_response = '' try_count.times do supplier_response = book_hotel_v3(args) itinerary_id = supplier_response[:book_hotel_v3_response][:book_hotel_v3_result][:res_group][:@rg_id] rescue '' if !itinerary_id.blank? break end end supplier_response end |
#cancel_reservation(args) ⇒ Object
44 45 46 |
# File 'lib/tourico/api.rb', line 44 def cancel_reservation(args) services(:cancel_reservation,args) end |
#check_availability_and_prices(args) ⇒ Object
48 49 50 |
# File 'lib/tourico/api.rb', line 48 def check_availability_and_prices(args) services(:check_availability_and_prices,args) end |
#cost_amend(args) ⇒ Object
57 58 59 |
# File 'lib/tourico/api.rb', line 57 def cost_amend(args) end |
#do_amend(args) ⇒ Object
61 62 63 |
# File 'lib/tourico/api.rb', line 61 def do_amend(args) end |
#get_cancellation_fee_for_reservation(args) ⇒ Object
40 41 42 |
# File 'lib/tourico/api.rb', line 40 def get_cancellation_fee_for_reservation(args) services(:get_cancellation_fee, args) end |
#get_cancellation_policy(args) ⇒ Object
20 21 22 |
# File 'lib/tourico/api.rb', line 20 def get_cancellation_policy(args) services(:get_cancellation_policies, args) end |
#get_hotel_details(args) ⇒ Object
16 17 18 |
# File 'lib/tourico/api.rb', line 16 def get_hotel_details(args) services(:get_hotel_details_v3,args) end |
#get_list(args) ⇒ Object
8 9 10 |
# File 'lib/tourico/api.rb', line 8 def get_list(args) services(:search_hotels, args) end |
#get_list_by_hotel(args) ⇒ Object
12 13 14 |
# File 'lib/tourico/api.rb', line 12 def get_list_by_hotel(args) services(:search_hotels_by_id, args) end |
#get_previous_reservations(args) ⇒ Object
-
not working
53 54 55 |
# File 'lib/tourico/api.rb', line 53 def get_previous_reservations(args) services(:get_previous_RG, args) end |