43
44
45
46
47
48
49
50
51
52
|
# File 'lib/parsec/request/order.rb', line 43
def read(parsec_id)
attributes = { xmlns: NAMESPACE, 'DetailLevel' => '1', 'RateDetails' => '1', 'Language' => 'EN' }
message = { unique_i_d: { '@Type' => 'Locator', '@ID' => parsec_id } }
response = client(:read).call('OTA_ReadRQ', attributes: attributes, message: message)
return error(response.body[:ota_booking_info_rs]) if response.body[:ota_booking_info_rs][:errors].present?
Parsec::Order.build(response.body[:ota_booking_info_rs])
rescue Savon::Error => e
Xlog.and_raise_error(e)
end
|