quicktravel_client 2.3.1 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +3 -14
  3. data/CHANGELOG.md +6 -0
  4. data/README.md +10 -0
  5. data/gemfiles/rails5.gemfile +8 -0
  6. data/lib/quick_travel/adapter.rb +28 -0
  7. data/lib/quick_travel/adapter_error.rb +11 -3
  8. data/lib/quick_travel/booking.rb +5 -38
  9. data/lib/quick_travel/payment.rb +0 -4
  10. data/lib/quick_travel/products/scheduled_trip.rb +3 -6
  11. data/lib/quick_travel/property.rb +1 -0
  12. data/lib/quick_travel/reservation.rb +5 -27
  13. data/lib/quick_travel/version.rb +1 -1
  14. data/spec/adapter_spec.rb +17 -0
  15. data/spec/booking_spec.rb +11 -0
  16. data/spec/product_type_spec.rb +1 -1
  17. data/spec/reservation_spec.rb +4 -1
  18. data/spec/support/cassettes/basic_product_scheduled_trips.yml +17 -17
  19. data/spec/support/cassettes/basic_product_scheduled_trips_multi_sector.yml +27 -35
  20. data/spec/support/cassettes/basic_product_scheduled_trips_unbookable.yml +17 -17
  21. data/spec/support/cassettes/booking_create.yml +26 -19
  22. data/spec/support/cassettes/booking_documents.yml +23 -16
  23. data/spec/support/cassettes/booking_price_changes.yml +17 -17
  24. data/spec/support/cassettes/booking_show.yml +26 -19
  25. data/spec/support/cassettes/booking_update.yml +51 -36
  26. data/spec/support/cassettes/booking_with_documents.yml +58 -44
  27. data/spec/support/cassettes/booking_with_nested_attributes.yml +94 -73
  28. data/spec/support/cassettes/booking_with_price_changes.yml +33 -33
  29. data/spec/support/cassettes/countries.yml +17 -17
  30. data/spec/support/cassettes/country_all.yml +22 -15
  31. data/spec/support/cassettes/create_reservation_fail.yml +18 -10
  32. data/spec/support/cassettes/create_reservation_with_booking.yml +27 -20
  33. data/spec/support/cassettes/passenger_all.yml +24 -17
  34. data/spec/support/cassettes/payment_info.yml +18 -18
  35. data/spec/support/cassettes/price_quote.yml +43 -41
  36. data/spec/support/cassettes/product_date_range_bookability.yml +26 -16
  37. data/spec/support/cassettes/product_show.yml +22 -15
  38. data/spec/support/cassettes/product_show_as_agent.yml +18 -8
  39. data/spec/support/cassettes/product_type_all.yml +40 -30
  40. data/spec/support/cassettes/product_type_resource_categories.yml +18 -18
  41. data/spec/support/cassettes/product_type_resource_categories_tickets.yml +18 -18
  42. data/spec/support/cassettes/product_type_routes.yml +23 -23
  43. data/spec/support/cassettes/property.yml +21 -21
  44. data/spec/support/cassettes/region_show.yml +22 -15
  45. data/spec/support/cassettes/reservation_with_extra_picks.yml +87 -64
  46. data/spec/support/cassettes/resource_category_all.yml +18 -18
  47. data/spec/support/cassettes/resource_category_all_for_product_type_8.yml +18 -18
  48. data/spec/support/cassettes/resource_fare_bases.yml +29 -20
  49. data/spec/support/cassettes/resource_show.yml +26 -18
  50. data/spec/support/cassettes/resource_with_price.yml +25 -22
  51. data/spec/support/cassettes/tenant_switcher.yml +51 -37
  52. data/spec/support/cassettes/wrong_url.yml +63 -0
  53. data/spec/support/coverage_loader.rb +8 -3
  54. metadata +5 -7
  55. data/gemfiles/rails2.gemfile +0 -11
  56. data/spec/support/cassettes/resource_product_type.yml +0 -63
  57. data/spec/support/cassettes/route_all.yml +0 -65
@@ -1,11 +0,0 @@
1
- source 'https://rubygems.org'
2
- gemspec :path => '../'
3
-
4
- group :development, :test do
5
- gem 'json', '~> 1.8'
6
- gem 'tins', '~> 1.6.0'
7
- gem 'activesupport', '~> 2.3'
8
- gem 'activerecord', '~> 2.3'
9
- gem 'actionpack', '~> 2.3'
10
- gem 'rubocop', '~> 0.41.2'
11
- end
@@ -1,63 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://test.qt.sealink.com.au:8080/api/product_types.json
6
- body:
7
- encoding: UTF-8
8
- string: access_key=<QT_KEY>
9
- headers:
10
- Content-Length:
11
- - '0'
12
- response:
13
- status:
14
- code: 200
15
- message: 'OK '
16
- headers:
17
- X-Frame-Options:
18
- - SAMEORIGIN
19
- X-Xss-Protection:
20
- - '1'
21
- X-Content-Type-Options:
22
- - nosniff
23
- X-Download-Options:
24
- - noopen
25
- X-Permitted-Cross-Domain-Policies:
26
- - none
27
- P3p:
28
- - CP="IDC DSP CAO COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
29
- Content-Type:
30
- - application/json; charset=utf-8
31
- X-Ua-Compatible:
32
- - IE=Edge,chrome=1
33
- Etag:
34
- - '"11c073c9ef8dfd437622afb5a87e5424"'
35
- Cache-Control:
36
- - max-age=0, private, must-revalidate
37
- X-Request-Id:
38
- - d6ae6dcec29fd80c84101358b1cda871
39
- X-Runtime:
40
- - '0.059593'
41
- Vary:
42
- - Origin
43
- Date:
44
- - Thu, 28 Feb 2013 13:35:53 GMT
45
- X-Rack-Cache:
46
- - miss
47
- Server:
48
- - WEBrick/1.3.1 (Ruby/2.2.4/2015-12-16)
49
- Content-Length:
50
- - '4978'
51
- Connection:
52
- - Keep-Alive
53
- Set-Cookie:
54
- - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJWUwNWI2OGUwMTczMTVmM2JhZWIzYTUxOTMzNmMwY2Q4BjsAVEkiCXVzZXIGOwBGaQY%3D--3f9cdfae11ab4c6abd4123c4661a6a701af9c1fd;
55
- path=/; HttpOnly
56
- body:
57
- encoding: UTF-8
58
- string: '[{"id":1,"name":"Ferry","resource_class_name":"Ship","disclaimer_id":null,"durational":false,"can_find_by_location":false,"measure_units_by_pax_count":true,"multi_leg":false,"prompt_for_pick_up_drop_off":false,"book_before_level":null,"book_before_units":null,"maximum_passengers_online":null,"confirmation_request_fields":[],"only_bookable_with_accommodation":false,"footer_itinerary_item":null,"created_at":null,"updated_at":null,"code":null,"needs_services":true,"can_have_quantity":false,"can_have_dates":true,"needs_passengers":true},{"id":2,"name":"Accommodation","resource_class_name":"Accommodation","disclaimer_id":null,"durational":true,"can_find_by_location":true,"measure_units_by_pax_count":false,"multi_leg":false,"prompt_for_pick_up_drop_off":false,"book_before_level":null,"book_before_units":null,"maximum_passengers_online":null,"confirmation_request_fields":[],"only_bookable_with_accommodation":false,"footer_itinerary_item":null,"created_at":null,"updated_at":null,"code":null,"needs_services":true,"can_have_quantity":false,"can_have_dates":true,"needs_passengers":true},{"id":3,"name":"Flight","resource_class_name":"ScheduledTripResource","disclaimer_id":null,"durational":false,"can_find_by_location":false,"measure_units_by_pax_count":true,"multi_leg":false,"prompt_for_pick_up_drop_off":false,"book_before_level":null,"book_before_units":null,"maximum_passengers_online":null,"confirmation_request_fields":[],"only_bookable_with_accommodation":false,"footer_itinerary_item":null,"created_at":null,"updated_at":null,"code":null,"needs_services":true,"can_have_quantity":false,"can_have_dates":true,"needs_passengers":true},{"id":4,"name":"Item","resource_class_name":"Item","disclaimer_id":null,"durational":false,"can_find_by_location":false,"measure_units_by_pax_count":false,"multi_leg":false,"prompt_for_pick_up_drop_off":false,"book_before_level":null,"book_before_units":null,"maximum_passengers_online":null,"confirmation_request_fields":[],"only_bookable_with_accommodation":false,"footer_itinerary_item":null,"created_at":null,"updated_at":null,"code":null,"needs_services":false,"can_have_quantity":true,"can_have_dates":false,"needs_passengers":false},{"id":5,"name":"Ticket","resource_class_name":"Ticket","disclaimer_id":null,"durational":false,"can_find_by_location":false,"measure_units_by_pax_count":false,"multi_leg":false,"prompt_for_pick_up_drop_off":false,"book_before_level":null,"book_before_units":null,"maximum_passengers_online":null,"confirmation_request_fields":[],"only_bookable_with_accommodation":false,"footer_itinerary_item":null,"created_at":null,"updated_at":null,"code":null,"needs_services":false,"can_have_quantity":true,"can_have_dates":false,"needs_passengers":false},{"id":6,"name":"Mainland
59
- Coach Transfers","resource_class_name":"ScheduledTripResource","disclaimer_id":null,"durational":false,"can_find_by_location":false,"measure_units_by_pax_count":true,"multi_leg":true,"prompt_for_pick_up_drop_off":false,"book_before_level":null,"book_before_units":"seconds","maximum_passengers_online":null,"confirmation_request_fields":["pick_up_information","drop_off_information","vendor_pnr","notes_for_vendor","vendor_staff","note_for_inventory_type_change"],"only_bookable_with_accommodation":false,"footer_itinerary_item":false,"created_at":"2013-03-01T01:33:37+10:30","updated_at":"2013-03-01T01:33:37+10:30","code":"","needs_services":true,"can_have_quantity":false,"can_have_dates":true,"needs_passengers":true},{"id":7,"name":"Travel
60
- Insurance","resource_class_name":"Insurance","disclaimer_id":null,"durational":true,"can_find_by_location":false,"measure_units_by_pax_count":false,"multi_leg":false,"prompt_for_pick_up_drop_off":false,"book_before_level":null,"book_before_units":"seconds","maximum_passengers_online":null,"confirmation_request_fields":["pick_up_information","drop_off_information","vendor_pnr","notes_for_vendor","vendor_staff","note_for_inventory_type_change"],"only_bookable_with_accommodation":false,"footer_itinerary_item":true,"created_at":"2014-09-12T17:06:45+09:30","updated_at":"2014-09-12T17:06:45+09:30","code":"","needs_services":true,"can_have_quantity":false,"can_have_dates":true,"needs_passengers":false},{"id":8,"name":"Merchandise","resource_class_name":"Item","disclaimer_id":1,"durational":false,"can_find_by_location":false,"measure_units_by_pax_count":false,"multi_leg":false,"prompt_for_pick_up_drop_off":false,"book_before_level":null,"book_before_units":"seconds","maximum_passengers_online":null,"confirmation_request_fields":["reservation_group_id","trip_name","departure_time","pick_up_information","drop_off_information","vendor_pnr","notes_for_vendor","vendor_staff","note_for_inventory_type_change"],"only_bookable_with_accommodation":false,"footer_itinerary_item":false,"created_at":"2015-08-25T15:10:06+09:30","updated_at":"2015-08-25T15:10:06+09:30","code":"","needs_services":false,"can_have_quantity":true,"can_have_dates":false,"needs_passengers":false}]'
61
- http_version:
62
- recorded_at: Thu, 07 Apr 2016 06:57:34 GMT
63
- recorded_with: VCR 3.0.1
@@ -1,65 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://test.qt.sealink.com.au:8080/product_types/1/routes.json
6
- body:
7
- encoding: UTF-8
8
- string: access_key=<QT_KEY>
9
- headers:
10
- Content-Length:
11
- - '0'
12
- response:
13
- status:
14
- code: 200
15
- message: 'OK '
16
- headers:
17
- X-Frame-Options:
18
- - SAMEORIGIN
19
- X-Xss-Protection:
20
- - '1'
21
- X-Content-Type-Options:
22
- - nosniff
23
- X-Download-Options:
24
- - noopen
25
- X-Permitted-Cross-Domain-Policies:
26
- - none
27
- P3p:
28
- - CP="IDC DSP CAO COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
29
- Content-Type:
30
- - application/json; charset=utf-8
31
- X-Ua-Compatible:
32
- - IE=Edge,chrome=1
33
- Etag:
34
- - '"28e8a10061a92c63158d0d85424140f3"'
35
- Cache-Control:
36
- - max-age=0, private, must-revalidate
37
- X-Request-Id:
38
- - d3c6e41f08d937995f0f8c6a9c826ffb
39
- X-Runtime:
40
- - '0.066613'
41
- Vary:
42
- - Origin
43
- Date:
44
- - Thu, 28 Feb 2013 13:35:14 GMT
45
- X-Rack-Cache:
46
- - miss
47
- Server:
48
- - WEBrick/1.3.1 (Ruby/2.2.3/2015-08-18)
49
- Content-Length:
50
- - '1201'
51
- Connection:
52
- - Keep-Alive
53
- Set-Cookie:
54
- - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJWQ5ZGFhNzEwODk2Y2M1YWMzYjUyNjg3OGFmODYwZTdiBjsAVEkiCXVzZXIGOwBGaQY%3D--510e99799935dc8095c1fcdafd0c2bf26e64618d;
55
- path=/; HttpOnly
56
- body:
57
- encoding: UTF-8
58
- string: '[{"id":1,"product_type_id":1,"reverse_id":2,"position":1,"created_at":"2013-03-01T00:01:37+10:30","updated_at":"2013-03-01T00:06:45+10:30","name":"To
59
- Kangaroo Island","path":"Cape Jervis to Penneshaw","route_stops":[{"id":1,"name":"Cape
60
- Jervis","address":"","inventory_controlled":true,"route_id":1,"position":1,"created_at":"2013-03-01T00:01:37+10:30","updated_at":"2013-03-01T00:01:37+10:30","code":"CPJ"},{"id":2,"name":"Penneshaw","address":"","inventory_controlled":true,"route_id":1,"position":2,"created_at":"2013-03-01T00:01:37+10:30","updated_at":"2013-03-01T00:01:37+10:30","code":"PEN"}]},{"id":2,"product_type_id":1,"reverse_id":1,"position":2,"created_at":"2013-03-01T00:02:06+10:30","updated_at":"2013-03-01T00:06:38+10:30","name":"From
61
- Kangaroo Island","path":"Penneshaw to Cape Jervis","route_stops":[{"id":3,"name":"Penneshaw","address":"","inventory_controlled":true,"route_id":2,"position":1,"created_at":"2013-03-01T00:02:06+10:30","updated_at":"2013-03-01T00:02:06+10:30","code":"PEN"},{"id":4,"name":"Cape
62
- Jervis","address":"","inventory_controlled":true,"route_id":2,"position":2,"created_at":"2013-03-01T00:02:06+10:30","updated_at":"2013-03-01T00:02:06+10:30","code":"CPJ"}]}]'
63
- http_version:
64
- recorded_at: Sun, 24 Jan 2016 22:13:11 GMT
65
- recorded_with: VCR 2.9.3