Class: SabreApiRuby::Services::CheckFlightTickets

Inherits:
Object
  • Object
show all
Defined in:
lib/sabre_api_ruby/services/check_flight_tickets.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ CheckFlightTickets

Returns a new instance of CheckFlightTickets.



8
9
10
# File 'lib/sabre_api_ruby/services/check_flight_tickets.rb', line 8

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



6
7
8
# File 'lib/sabre_api_ruby/services/check_flight_tickets.rb', line 6

def client
  @client
end

Instance Method Details

#call(booking_id) ⇒ Object



12
13
14
15
16
# File 'lib/sabre_api_ruby/services/check_flight_tickets.rb', line 12

def call(booking_id)
  validate_booking_id(booking_id)
  response = client.request(:get, "/booking/#{booking_id}/tickets")
  build_response(response)
end