Class: Tourico::Api

Inherits:
Object
  • Object
show all
Defined in:
lib/tourico/api.rb

Instance Method Summary collapse

Constructor Details

#initializeApi

Returns a new instance of Api.



4
5
# File 'lib/tourico/api.rb', line 4

def initialize
end

Instance Method Details

#book_hotel_v3(args) ⇒ Object



23
24
25
# File 'lib/tourico/api.rb', line 23

def book_hotel_v3(args)
  services(:book_hotel_v3,args)
end

#book_hotel_v3_with_retry(args, try_count = 1) ⇒ Object



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/tourico/api.rb', line 27

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



43
44
45
# File 'lib/tourico/api.rb', line 43

def cancel_reservation(args)
  services(:cancel_reservation,args)
end

#check_availability_and_prices(args) ⇒ Object



47
48
49
# File 'lib/tourico/api.rb', line 47

def check_availability_and_prices(args)
  services(:check_availability_and_prices,args)
end

#cost_amend(args) ⇒ Object



56
57
58
# File 'lib/tourico/api.rb', line 56

def cost_amend(args)

end

#do_amend(args) ⇒ Object



60
61
62
# File 'lib/tourico/api.rb', line 60

def do_amend(args)

end

#get_cancellation_fee_for_reservation(args) ⇒ Object



39
40
41
# File 'lib/tourico/api.rb', line 39

def get_cancellation_fee_for_reservation(args)
  services(:get_cancellation_fee, args)
end

#get_cancellation_policy(args) ⇒ Object



19
20
21
# File 'lib/tourico/api.rb', line 19

def get_cancellation_policy(args)
  services(:get_cancellation_policies, args)
end

#get_hotel_details(args) ⇒ Object



15
16
17
# File 'lib/tourico/api.rb', line 15

def get_hotel_details(args)
  services(:get_hotel_details_v3,args)
end

#get_hotels_by_destination(args) ⇒ Object



64
65
66
# File 'lib/tourico/api.rb', line 64

def get_hotels_by_destination(args)
  services(:get_hotels_by_destination, args)
end

#get_list(args) ⇒ Object



7
8
9
# File 'lib/tourico/api.rb', line 7

def get_list(args)
  services(:search_hotels, args)
end

#get_list_by_hotel(args) ⇒ Object



11
12
13
# File 'lib/tourico/api.rb', line 11

def get_list_by_hotel(args)
  services(:search_hotels_by_id, args)
end

#get_previous_reservations(args) ⇒ Object

  • not working



52
53
54
# File 'lib/tourico/api.rb', line 52

def get_previous_reservations(args)
  services(:get_previous_RG, args)
end