Class: ServicesAutomation::RetrieveTicket
- Defined in:
- lib/services/retrieve_ticket.rb
Overview
search params searchHash/serviceType
Constant Summary collapse
- SERVICE_PATH =
''
Constants inherited from DSSM
DSSM::SERVICE_METHOD, DSSM::SERVICE_SERVER
Instance Method Summary collapse
- #get_service_path ⇒ Object
- #get_service_path_with_additionals ⇒ Object
- #get_service_path_without_additionals ⇒ Object
- #run_search(server) ⇒ Object
Methods inherited from Retrieve
#get_additionals, #get_adult_max_age, #get_cancellation_policies, #get_child_max_age, #get_destination_iata, #get_distribution, #get_dto, #get_from_date, #get_highlights, #get_home_iata, #get_infant_max_age, #get_language, #get_particular_conditions, #get_payment_plans, #get_price_by_currency, #get_prices, #get_product_type, #get_provider, #get_service_description, #get_service_id, #get_service_name, #get_service_type, #get_to_date, #get_total_price, #initialize, #set_total_price_to_config
Methods inherited from DSSM
#do_call, #get_search_path, #status
Constructor Details
This class inherits a constructor from ServicesAutomation::Retrieve
Instance Method Details
#get_service_path ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/services/retrieve_ticket.rb', line 12 def get_service_path if CONFIG[:hasAdditionals] SERVICE_PATH.replace get_service_path_with_additionals else SERVICE_PATH.replace get_service_path_without_additionals end end |
#get_service_path_with_additionals ⇒ Object
20 21 22 23 24 25 |
# File 'lib/services/retrieve_ticket.rb', line 20 def get_service_path_with_additionals path = '/service/search/ticket/retrieve' \ + '/:searchHash' \ + '/:serviceId' \ '/:additionals' end |
#get_service_path_without_additionals ⇒ Object
27 28 29 30 31 |
# File 'lib/services/retrieve_ticket.rb', line 27 def get_service_path_without_additionals path = '/service/search/ticket/retrieve' \ + '/:searchHash' \ + '/:serviceId' end |
#run_search(server) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/services/retrieve_ticket.rb', line 33 def run_search(server) search = ServicesAutomation::SearchTicket.new(server) search.set_params(CONFIG[:params]) search.run search.set_search_hash_to_config search.set_service_id_to_config search.set_total_price_to_config(CONFIG[:params][:serviceId]) if !CONFIG[:hasAdditionals] search.set_additionals_to_config(CONFIG[:params][:additionals], search) if CONFIG[:hasAdditionals] end |