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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b5dcbf38f81c9b909173948030ab544edf2b10a6
4
- data.tar.gz: fde0ede3e1331d355c4ee42db771e2c9f0e2e8ed
3
+ metadata.gz: b46659b883b055d384d0d6002646e619d636c4a4
4
+ data.tar.gz: a906274663a27d46b74eda888a5200bde90cc884
5
5
  SHA512:
6
- metadata.gz: ac7e14d70db0fe8944f44f07dbdd37f5bb8825dce307b38856e1f893734956a792c692876c770014ae0f6ad347c9bdd7cbacc48a430061113c75435ec0292052
7
- data.tar.gz: 0b4ca73328cea2f66a10f89cd005403443ebbd39f15f3385180d37f68d77548fd0fa82a7b042931dc8e81b464ba5b7c380c1b8abbeeaadf27a202208139f8d17
6
+ metadata.gz: bfc223f8ec2d51dddc2974b40281cc49ff6225cbbeae35a75f18b515c8656ac0a307e3f280b57b0df5e8adad90a36b1c4674eec2b2ad2696568f5bf848c0b5d8
7
+ data.tar.gz: 381d7a52dce286c3874f17e260348b2c5c2d0c294193d4ce9226c53bc69c626a77b5f5de9919ffe248142362004ea9d8b32a5c728f0306d0b119c1e2931a6ca3
data/.travis.yml CHANGED
@@ -1,24 +1,13 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9
4
- - 2.2
5
- - 2.3.0
3
+ - 2.2.5
4
+ - 2.3.1
6
5
  script: bundle && bundle exec rake spec
7
6
  gemfile:
8
- - gemfiles/rails2.gemfile
9
7
  - gemfiles/rails4.gemfile
10
- matrix:
11
- exclude:
12
- - rvm: 1.9
13
- gemfile: gemfiles/rails4.gemfile
14
- - rvm: 2.2
15
- gemfile: gemfiles/rails2.gemfile
16
- - rvm: 2.3.0
17
- gemfile: gemfiles/rails2.gemfile
8
+ - gemfiles/rails5.gemfile
18
9
  notifications:
19
10
  email:
20
11
  - support@travellink.com.au
21
- flowdock:
22
- secure: tIc3OVnTl83tGjhjzBSPk7AMRHVta4zAdacBDWOVA3s/YpDoa1wCMaq7xfG7GlEgHtPscvucSKbxoLocBd5d54jQVx3X9q9OrQ91D6h6tbTOK8ZTh1vTdSfMkIoxNjnVJ9KyZYJ3zy44DzfzgmcgqesshqSrXAgcpSvxkEcjAz8=
23
12
  sudo: false
24
13
  cache: bundler
data/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/).
4
4
  This changelog adheres to [Keep a CHANGELOG](http://keepachangelog.com/).
5
5
 
6
+ ## [2.4.0]
7
+ ### Changed
8
+ - Improve error handling when non JSON response
9
+ - Update test cassettes due to API changes
10
+ - Update test data due to new bootstrap.sql
11
+
6
12
  ## [2.3.1]
7
13
  ### Fixed
8
14
  - Omits empty array parameters
data/README.md CHANGED
@@ -15,3 +15,13 @@ Gives models that are integrated with the QuickTravel API
15
15
 
16
16
  Add to your Gemfile:
17
17
  gem 'quicktravel_client'
18
+
19
+ # REGENERATE CASSETTES
20
+
21
+ In QuickTravel:
22
+ mysql quicktravel_test < ../quicktravel_test/bootstrap.sql
23
+ TIMECOP=1 QUICKTRAVEL_CONFIG_DIR=spec/support/config RAILS_ENV=test bundle exec rails s -p8080
24
+
25
+ In QuickTravel Client:
26
+ rm spec/support/cassettes/ -rf
27
+ QT_KEYS=a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2,a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2 bundle exec rspec
@@ -0,0 +1,8 @@
1
+ source 'https://rubygems.org'
2
+ gemspec :path => '../'
3
+
4
+ group :development, :test do
5
+ gem 'activesupport', '~> 5.0'
6
+ gem 'activerecord', '~> 5.0'
7
+ gem 'actionpack', '~> 5.0'
8
+ end
@@ -46,6 +46,34 @@ module QuickTravel
46
46
  end
47
47
  end
48
48
 
49
+ def self.has_many(relation_name, options = {})
50
+ define_method relation_name do
51
+ instance_variable_get("@#{relation_name}") || instance_variable_set(
52
+ "@#{relation_name}",
53
+ begin
54
+ klass = QuickTravel.const_get(options[:class_name] || relation_name.to_s.singularize.classify)
55
+ instance_variable_get("@#{relation_name}_attributes").map { |attr|
56
+ klass.new(attr)
57
+ }
58
+ end
59
+ )
60
+ end
61
+ end
62
+
63
+ def self.belongs_to(relation_name, options = {})
64
+ define_method relation_name do
65
+ instance_variable_get("@#{relation_name}") || instance_variable_set(
66
+ "@#{relation_name}",
67
+ begin
68
+ attrs = instance_variable_get("@#{relation_name}_attributes")
69
+ return nil unless attrs
70
+ klass = QuickTravel.const_get(options[:class_name] || relation_name.to_s.singularize.classify)
71
+ klass.new(attrs)
72
+ end
73
+ )
74
+ end
75
+ end
76
+
49
77
  def self.find(id, opts = {})
50
78
  check_id!(id)
51
79
  if lookup
@@ -3,13 +3,21 @@ module QuickTravel
3
3
  attr_reader :response
4
4
 
5
5
  def initialize(response)
6
- @response = if response.is_a? String
6
+ @response = case response
7
+ when String
7
8
  { 'error' => response }
8
- else
9
+ when HTTParty::Response
9
10
  response.parsed_response
11
+ else
12
+ fail "Unexpected response type #{response.class}"\
13
+ "Should be String or HTTParty::Response"
10
14
  end
11
15
 
12
- error_message = @response.fetch('error', "We're sorry, but something went wrong. Please call us.")
16
+ error_message = if @response.is_a? Hash
17
+ @response.fetch('error', "We're sorry, but something went wrong. Please call us.")
18
+ else
19
+ @response
20
+ end
13
21
  super(error_message)
14
22
  end
15
23
 
@@ -11,10 +11,6 @@ module QuickTravel
11
11
  '/api/bookings'
12
12
  end
13
13
 
14
- def self.front_office_base
15
- '/front_office/bookings'
16
- end
17
-
18
14
  def self.find_by_reference(reference)
19
15
  find_all!("#{api_base}/reference/#{reference}.json").first
20
16
  end
@@ -24,13 +20,11 @@ module QuickTravel
24
20
  last_group: true, regenerate: regenerate)
25
21
  end
26
22
 
27
- def payments
28
- Payment.find_all!("#{Booking.front_office_base}/#{@id}/payments.json")
29
- end
30
-
31
- def payment_types
32
- PaymentType.find_all!("#{Booking.front_office_base}/#{@id}/payment_types.json")
33
- end
23
+ has_many :reservations
24
+ has_many :passengers
25
+ has_many :vehicles
26
+ has_many :payments
27
+ has_many :payment_types
34
28
 
35
29
  def on_account_payment_type
36
30
  payment_types_by_code = payment_types.group_by(&:code)
@@ -192,18 +186,6 @@ module QuickTravel
192
186
  Booking.find(@id) # refresh
193
187
  end
194
188
 
195
- # Generate passenger objects from passenger data (hash)
196
- def passengers
197
- @passengers ||=
198
- @passengers_attributes.map { |passenger| Passenger.new(passenger) }
199
- end
200
-
201
- # Generate passenger objects from passenger data (hash)
202
- def vehicles
203
- @vehicles ||=
204
- @vehicles_attributes.map { |vehicle| Vehicle.new(vehicle) }
205
- end
206
-
207
189
  def find_passenger_by_id(pid)
208
190
  passengers.detect { |p| p.id.to_i == pid.to_i }
209
191
  end
@@ -218,21 +200,6 @@ module QuickTravel
218
200
  end
219
201
  end
220
202
 
221
- def vehicles_hash
222
- @vehicles
223
- end
224
-
225
- # It returns booking items for a booking.
226
- # Array of BookingItem
227
- def reservations
228
- fail AdapterError, 'Reservations have not been set from API' if @reservations_attributes.nil?
229
- @_reservations_object_array ||= @reservations_attributes.map { |item| Reservation.new(item) }
230
- end
231
-
232
- def legacy_reservations
233
- @_reservations_object_array = @reservations.map { |item| Reservation.new(item) }
234
- end
235
-
236
203
  def client_address
237
204
  return nil unless @client_address
238
205
  @client_address_object ||= Address.new(@client_address)
@@ -7,10 +7,6 @@ module QuickTravel
7
7
  QuickTravel::PaymentType.find(@payment_type_id)
8
8
  end
9
9
 
10
- def self.create(options = {})
11
- post_and_validate("/front_office/bookings/#{options[:booking_id]}/payments.json", options)
12
- end
13
-
14
10
  def self.get_redirect_url(options)
15
11
  response = get_and_validate("/api/checkouts/migs_redirect_url.json", options)
16
12
  response[:redirect_url]
@@ -4,15 +4,12 @@ require 'quick_travel/products/base'
4
4
  module QuickTravel
5
5
  module Products
6
6
  class ScheduledTrip < Base
7
+ belongs_to :to_route_stop, class_name: 'RouteStop'
8
+ belongs_to :from_route_stop, class_name: 'RouteStop'
9
+
7
10
  @reservation_for_type = :scheduled_trips
8
11
 
9
- def to_route_stop
10
- RouteStop.new(@to_route_stop_attributes) if @to_route_stop_attributes
11
- end
12
12
 
13
- def from_route_stop
14
- RouteStop.new(@from_route_stop_attributes) if @from_route_stop_attributes
15
- end
16
13
 
17
14
  def from_route_stop_id
18
15
  return nil if from_route_stop.nil?
@@ -28,6 +28,7 @@ module QuickTravel
28
28
  property = find_all!("/api/properties/#{id}.json", options).first
29
29
  first_travel_date = options.fetch(:product).fetch(:first_travel_date)
30
30
  property.accommodations.each do |accommodation|
31
+ # Is this right? Why is first_travel_date assumed to be cheapest
31
32
  accommodation.minimum_nightly_price = accommodation.nightly_price_on first_travel_date
32
33
  accommodation.minimum_price_for_duration = accommodation.minimum_price_on first_travel_date
33
34
  end
@@ -4,6 +4,11 @@ require 'quick_travel/resource'
4
4
 
5
5
  module QuickTravel
6
6
  class Reservation < Adapter
7
+ has_many :adjustments
8
+ has_many :sub_reservations, class_name: 'Reservation'
9
+ belongs_to :to_route_stop, class_name: 'RouteStop'
10
+ belongs_to :from_route_stop, class_name: 'RouteStop'
11
+
7
12
  def self.create(options)
8
13
  json = post_and_validate('/api/reservations.json', options, expect: :json)
9
14
  new(json)
@@ -13,10 +18,6 @@ module QuickTravel
13
18
  delete_and_validate("/api/reservations/#{id}.json")
14
19
  end
15
20
 
16
- def adjustments
17
- @adjustments_attributes.map { |adjustment| Adjustment.new(adjustment) }
18
- end
19
-
20
21
  def resource
21
22
  @resource ||= QuickTravel::Resource.find(resource_id) if resource_id
22
23
  end
@@ -29,29 +30,6 @@ module QuickTravel
29
30
  end_time.to_time.on(last_travel_date) if end_time
30
31
  end
31
32
 
32
- def to_route_stop
33
- QuickTravel::RouteStop.new(@to_route_stop_attributes) if @to_route_stop_attributes
34
- end
35
-
36
- def from_route_stop
37
- QuickTravel::RouteStop.new(@from_route_stop_attributes) if @from_route_stop_attributes
38
- end
39
-
40
- # it send API request for Resource show. and cache the data.
41
- # i think now this method is not required because now booking show api call have display_text for every reservation
42
- def details
43
- if @_resource.blank?
44
- @_resource = Resource.find(@resource_id) unless @resource_id.blank?
45
- end
46
- @_resource
47
- end
48
-
49
- def sub_reservations
50
- @sub_reservations ||= Array(@sub_reservations_attributes).map do |attributes|
51
- Reservation.new(attributes)
52
- end
53
- end
54
-
55
33
  def passengers_count_string(booking)
56
34
  passengers_count(booking).join(', ')
57
35
  end
@@ -1,3 +1,3 @@
1
1
  module QuickTravel
2
- VERSION = '2.3.1'
2
+ VERSION = '2.4.0'
3
3
  end
data/spec/adapter_spec.rb CHANGED
@@ -35,4 +35,21 @@ describe QuickTravel::Adapter do
35
35
 
36
36
  specify { expect(QuickTravel::Api).to have_received(:post).with(url, expected_params) }
37
37
  end
38
+
39
+ context 'when response non standard' do
40
+ let(:url) { 'http://www.google.com' }
41
+
42
+ let(:adapter_response) {
43
+ VCR.use_cassette 'wrong_url' do
44
+ QuickTravel::Adapter.get_and_validate(url)
45
+ end
46
+ }
47
+
48
+ specify do
49
+ expect { adapter_response }.to raise_error(
50
+ QuickTravel::AdapterError,
51
+ /That’s all we know/
52
+ )
53
+ end
54
+ end
38
55
  end
data/spec/booking_spec.rb CHANGED
@@ -61,6 +61,17 @@ describe QuickTravel::Booking do
61
61
  end
62
62
  end
63
63
 
64
+ it 'should be able to return its payments and payment types' do
65
+ VCR.use_cassette('booking_show') do
66
+ b = QuickTravel::Booking.find(@booking.id)
67
+ expect(b.payment_types).to be_an_instance_of Array
68
+ expect(b.payment_types.size).to eq 3
69
+ expect(b.payment_types.first).to be_an_instance_of QuickTravel::PaymentType
70
+ expect(b.payments).to be_an_instance_of Array
71
+ expect(b.payments.size).to eq 0
72
+ end
73
+ end
74
+
64
75
  it 'should be able to update the booking' do
65
76
  VCR.use_cassette('booking_update') do
66
77
  response = @booking.update(customer_contact_name: 'John')
@@ -9,7 +9,7 @@ describe QuickTravel::ProductType do
9
9
  end
10
10
 
11
11
  its(:class) { should == Array }
12
- its(:length) { should == 8 }
12
+ its(:length) { should == 9 }
13
13
 
14
14
  context 'first element' do
15
15
  subject(:ferry) { all.first }
@@ -10,8 +10,11 @@ describe QuickTravel::Reservation do
10
10
  first_travel_date: '2016-03-01',
11
11
  passenger_types_numbers: { '1' => '2', '2' => '1' }
12
12
  )
13
- expect(reservation.booking_id).to eq 3 # based on running ALL specs
13
+ expect(reservation.booking_id).to eq 4 # based on running ALL specs
14
14
  # from a fresh bootstrap.sql
15
+ # bootstrap.sql has 2 bookings
16
+ # Plus 3rd booking created in booking_spec
17
+ # Plus 4th booking created here
15
18
  end
16
19
  end
17
20
 
@@ -14,16 +14,6 @@ http_interactions:
14
14
  code: 200
15
15
  message: 'OK '
16
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
17
  P3p:
28
18
  - CP="IDC DSP CAO COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
29
19
  Content-Type:
@@ -35,23 +25,33 @@ http_interactions:
35
25
  Cache-Control:
36
26
  - max-age=0, private, must-revalidate
37
27
  X-Request-Id:
38
- - 91d524692c087648a1441c481cb68a75
28
+ - 4aaa8ad21113c2b935ea363623ea6842
39
29
  X-Runtime:
40
- - '0.248636'
30
+ - '0.392632'
41
31
  Vary:
42
32
  - Origin
43
33
  Date:
44
- - Thu, 28 Feb 2013 13:58:07 GMT
34
+ - Fri, 01 Jan 2016 02:32:37 GMT
45
35
  X-Rack-Cache:
46
36
  - invalidate, pass
37
+ X-Content-Type-Options:
38
+ - nosniff
39
+ X-Download-Options:
40
+ - noopen
41
+ X-Frame-Options:
42
+ - sameorigin
43
+ X-Permitted-Cross-Domain-Policies:
44
+ - none
45
+ X-Xss-Protection:
46
+ - 1; mode=block
47
47
  Server:
48
- - WEBrick/1.3.1 (Ruby/2.2.4/2015-12-16)
48
+ - WEBrick/1.3.1 (Ruby/2.2.5/2016-04-26)
49
49
  Content-Length:
50
50
  - '5528'
51
51
  Connection:
52
52
  - Keep-Alive
53
53
  Set-Cookie:
54
- - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJTU5NWIxODhiOGRmODZjZWQ2ODVkNjdlMTYxYjZhNjgzBjsAVEkiCXVzZXIGOwBGaQY%3D--488a6a29ce9432df25900b3453a9f87ede1651f9;
54
+ - _quick_travel_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJTEyMWNhOTc4YmM2Mjg2NDQ3ZjBkZjA1OWFiY2JlYzgxBjsAVEkiCXVzZXIGOwBGaQY%3D--20f11c05a3d416b3c8a1276b2ef7c06ef03bb2cd;
55
55
  path=/; HttpOnly
56
56
  body:
57
57
  encoding: UTF-8
@@ -77,5 +77,5 @@ http_interactions:
77
77
  class=\"money positive\"\u003E$40.00\u003C/span\u003E","pre_adjusted_price":"$40.00","price_breakdown":"\u003Cspan\u003E\u003Cstrong\u003EPassengers:\u003C/strong\u003E\u0026nbsp;\u003Cspan
78
78
  class=\"money positive\"\u003E$40.00\u003C/span\u003E\u0026nbsp;\u003C/span\u003E","price_breakdown_passengers_in_cents":4000,"price_breakdown_vehicles_in_cents":0,"trip_id":6,"stop_departure_time":"2000-01-01T21:00:00Z","stop_arrival_time":"2000-01-01T21:45:00Z","from_route_stop_attributes":null,"to_route_stop_attributes":null,"departure_time":"2000-01-01T21:00:00Z","arrival_time":"2000-01-01T21:45:00Z"}]'
79
79
  http_version:
80
- recorded_at: Tue, 12 Apr 2016 06:41:39 GMT
81
- recorded_with: VCR 3.0.1
80
+ recorded_at: Fri, 28 Oct 2016 05:28:13 GMT
81
+ recorded_with: VCR 3.0.3
@@ -14,16 +14,6 @@ http_interactions:
14
14
  code: 200
15
15
  message: 'OK '
16
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
17
  P3p:
28
18
  - CP="IDC DSP CAO COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
29
19
  Content-Type:
@@ -31,53 +21,55 @@ http_interactions:
31
21
  X-Ua-Compatible:
32
22
  - IE=Edge,chrome=1
33
23
  Etag:
34
- - '"cd3d11993df18b66625a3215b62b1895"'
24
+ - '"05bd5d4d4ef6c4b5d312cad0ed8fc08f"'
35
25
  Cache-Control:
36
26
  - max-age=0, private, must-revalidate
37
27
  X-Request-Id:
38
- - b71587c0c43e33d5d56d7520b92cec6b
28
+ - 67e63e1e224eb5484a402505f341baf2
39
29
  X-Runtime:
40
- - '0.203403'
30
+ - '0.235456'
41
31
  Vary:
42
32
  - Origin
43
33
  Date:
44
- - Thu, 28 Feb 2013 13:58:07 GMT
34
+ - Fri, 01 Jan 2016 02:32:37 GMT
45
35
  X-Rack-Cache:
46
36
  - invalidate, pass
37
+ X-Content-Type-Options:
38
+ - nosniff
39
+ X-Download-Options:
40
+ - noopen
41
+ X-Frame-Options:
42
+ - sameorigin
43
+ X-Permitted-Cross-Domain-Policies:
44
+ - none
45
+ X-Xss-Protection:
46
+ - 1; mode=block
47
47
  Server:
48
- - WEBrick/1.3.1 (Ruby/2.2.4/2015-12-16)
48
+ - WEBrick/1.3.1 (Ruby/2.2.5/2016-04-26)
49
49
  Content-Length:
50
- - '4201'
50
+ - '3733'
51
51
  Connection:
52
52
  - Keep-Alive
53
53
  Set-Cookie:
54
- - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJTcyNWE1ZmU1NWVhMGEyMDBkNmRhNGU5YTliOGI0YjExBjsAVEkiCXVzZXIGOwBGaQY%3D--6b64f5c2f1d5328ed9b3aa3a6153b965bbc329b7;
54
+ - _quick_travel_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJTZhNDliNGM1YmNhNWFiMjczM2JjODMzMDFkM2U4ZThlBjsAVEkiCXVzZXIGOwBGaQY%3D--7b94523c7f150819b65217849cea43c305f4bbc8;
55
55
  path=/; HttpOnly
56
56
  body:
57
57
  encoding: UTF-8
58
58
  string: '[{"product_id":"9","product_id_field":"trip_id","resource_id":2,"resource_class_name_underscore":"scheduled_trip_resource","product_name_underscore":"mainland_coach_transfers","tariff_level_id":1,"service_ids":[25,26,27],"first_travel_date":"01-03-2016","last_travel_date":"01-03-2016","time_class":"","exception_type":null,"bookable_class":"
59
- bookable","bookable":true,"display_text":"Advise clients times can vary by
60
- up to 10mins and to be waiting in view of coach","from_label":"from","reason_unbookable":null,"service_notes":null,"booking_notes":"Advise
61
- clients times can vary by up to 10mins and to be waiting in view of coach","adjustment_notes":null,"developer_notes":null,"inventory_type_code":"A","price_in_cents":3000,"total_price_adjustment_in_cents":0,"selection_name":"06:45am
59
+ bookable","bookable":true,"display_text":"","from_label":"from","reason_unbookable":null,"service_notes":null,"booking_notes":null,"adjustment_notes":null,"developer_notes":null,"inventory_type_code":"A","price_in_cents":3000,"total_price_adjustment_in_cents":0,"selection_name":"06:45am
62
60
  - Ferry ConnectionDeparting Adelaide - AM","input_disabled":"","input_overbook":"","formatted_price":"\u003Cspan
63
61
  class=\"money positive\"\u003E$30.00\u003C/span\u003E","price":"$30.00","formatted_pre_adjusted_price":"\u003Cspan
64
62
  class=\"money positive\"\u003E$30.00\u003C/span\u003E","pre_adjusted_price":"$30.00","price_breakdown":"\u003Cspan\u003E\u003Cstrong\u003EPassengers:\u003C/strong\u003E\u0026nbsp;\u003Cspan
65
- class=\"money positive\"\u003E$30.00\u003C/span\u003E\u0026nbsp;\u003C/span\u003E","price_breakdown_passengers_in_cents":3000,"price_breakdown_vehicles_in_cents":0,"trip_id":9,"stop_departure_time":"2000-01-01T06:45:00Z","stop_arrival_time":"2000-01-01T08:30:00Z","from_route_stop_attributes":{"address":"85
66
- Franklin Street, Adelaide","code":"ACBS","created_at":"2013-03-01T01:49:04+10:30","id":5,"inventory_controlled":true,"name":"Adelaide
67
- Central Bus Station","position":1,"route_id":3,"stop_id":3,"updated_at":"2013-03-01T01:49:04+10:30"},"to_route_stop_attributes":{"address":"Main
68
- Road, Cape Jervis","code":"CPJ","created_at":"2013-03-01T01:49:04+10:30","id":14,"inventory_controlled":true,"name":"Cape
69
- Jervis Ferry Terminal","position":10,"route_id":3,"stop_id":12,"updated_at":"2013-03-01T01:49:04+10:30"},"departure_time":"2000-01-01T06:00:00Z","arrival_time":"2000-01-01T08:30:00Z"},{"product_id":"13","product_id_field":"trip_id","resource_id":2,"resource_class_name_underscore":"scheduled_trip_resource","product_name_underscore":"mainland_coach_transfers","tariff_level_id":1,"service_ids":[28,29,30],"first_travel_date":"01-03-2016","last_travel_date":"01-03-2016","time_class":"","exception_type":null,"bookable_class":"
70
- bookable","bookable":true,"display_text":"Advise clients times can vary by
71
- up to 10mins and to be waiting in view of coach","from_label":"from","reason_unbookable":null,"service_notes":null,"booking_notes":"Advise
72
- clients times can vary by up to 10mins and to be waiting in view of coach","adjustment_notes":null,"developer_notes":null,"inventory_type_code":"A","price_in_cents":3000,"total_price_adjustment_in_cents":0,"selection_name":"03:45pm
63
+ class=\"money positive\"\u003E$30.00\u003C/span\u003E\u0026nbsp;\u003C/span\u003E","price_breakdown_passengers_in_cents":3000,"price_breakdown_vehicles_in_cents":0,"trip_id":9,"stop_departure_time":"2000-01-01T06:45:00Z","stop_arrival_time":"2000-01-01T08:30:00Z","from_route_stop_attributes":{"id":5,"inventory_controlled":true,"route_id":3,"position":1,"created_at":"2013-03-01T01:49:04+10:30","updated_at":"2013-03-01T01:49:04+10:30","stop_id":3,"name":"Adelaide
64
+ Central Bus Station","code":"ACBS"},"to_route_stop_attributes":{"id":14,"inventory_controlled":true,"route_id":3,"position":10,"created_at":"2013-03-01T01:49:04+10:30","updated_at":"2013-03-01T01:49:04+10:30","stop_id":12,"name":"Cape
65
+ Jervis Ferry Terminal","code":"CPJ"},"departure_time":"2000-01-01T06:00:00Z","arrival_time":"2000-01-01T08:30:00Z"},{"product_id":"13","product_id_field":"trip_id","resource_id":2,"resource_class_name_underscore":"scheduled_trip_resource","product_name_underscore":"mainland_coach_transfers","tariff_level_id":1,"service_ids":[28,29,30],"first_travel_date":"01-03-2016","last_travel_date":"01-03-2016","time_class":"","exception_type":null,"bookable_class":"
66
+ bookable","bookable":true,"display_text":"","from_label":"from","reason_unbookable":null,"service_notes":null,"booking_notes":null,"adjustment_notes":null,"developer_notes":null,"inventory_type_code":"A","price_in_cents":3000,"total_price_adjustment_in_cents":0,"selection_name":"03:45pm
73
67
  - Ferry ConnectionDeparting Adelaide - PM","input_disabled":"","input_overbook":"","formatted_price":"\u003Cspan
74
68
  class=\"money positive\"\u003E$30.00\u003C/span\u003E","price":"$30.00","formatted_pre_adjusted_price":"\u003Cspan
75
69
  class=\"money positive\"\u003E$30.00\u003C/span\u003E","pre_adjusted_price":"$30.00","price_breakdown":"\u003Cspan\u003E\u003Cstrong\u003EPassengers:\u003C/strong\u003E\u0026nbsp;\u003Cspan
76
- class=\"money positive\"\u003E$30.00\u003C/span\u003E\u0026nbsp;\u003C/span\u003E","price_breakdown_passengers_in_cents":3000,"price_breakdown_vehicles_in_cents":0,"trip_id":13,"stop_departure_time":"2000-01-01T15:45:00Z","stop_arrival_time":"2000-01-01T17:30:00Z","from_route_stop_attributes":{"address":"85
77
- Franklin Street, Adelaide","code":"ACBS","created_at":"2013-03-01T01:49:04+10:30","id":5,"inventory_controlled":true,"name":"Adelaide
78
- Central Bus Station","position":1,"route_id":3,"stop_id":3,"updated_at":"2013-03-01T01:49:04+10:30"},"to_route_stop_attributes":{"address":"Main
79
- Road, Cape Jervis","code":"CPJ","created_at":"2013-03-01T01:49:04+10:30","id":14,"inventory_controlled":true,"name":"Cape
80
- Jervis Ferry Terminal","position":10,"route_id":3,"stop_id":12,"updated_at":"2013-03-01T01:49:04+10:30"},"departure_time":"2000-01-01T15:00:00Z","arrival_time":"2000-01-01T17:30:00Z"}]'
70
+ class=\"money positive\"\u003E$30.00\u003C/span\u003E\u0026nbsp;\u003C/span\u003E","price_breakdown_passengers_in_cents":3000,"price_breakdown_vehicles_in_cents":0,"trip_id":13,"stop_departure_time":"2000-01-01T15:45:00Z","stop_arrival_time":"2000-01-01T17:30:00Z","from_route_stop_attributes":{"id":5,"inventory_controlled":true,"route_id":3,"position":1,"created_at":"2013-03-01T01:49:04+10:30","updated_at":"2013-03-01T01:49:04+10:30","stop_id":3,"name":"Adelaide
71
+ Central Bus Station","code":"ACBS"},"to_route_stop_attributes":{"id":14,"inventory_controlled":true,"route_id":3,"position":10,"created_at":"2013-03-01T01:49:04+10:30","updated_at":"2013-03-01T01:49:04+10:30","stop_id":12,"name":"Cape
72
+ Jervis Ferry Terminal","code":"CPJ"},"departure_time":"2000-01-01T15:00:00Z","arrival_time":"2000-01-01T17:30:00Z"}]'
81
73
  http_version:
82
- recorded_at: Tue, 12 Apr 2016 06:41:39 GMT
83
- recorded_with: VCR 3.0.1
74
+ recorded_at: Fri, 28 Oct 2016 05:28:14 GMT
75
+ recorded_with: VCR 3.0.3