quicktravel_client 1.1.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +5 -0
  3. data/.ruby-version +1 -1
  4. data/.travis.yml +14 -2
  5. data/CHANGELOG.md +34 -3
  6. data/Gemfile +0 -3
  7. data/Rakefile +0 -6
  8. data/examples/login_example.rb +1 -1
  9. data/gemfiles/rails4.gemfile +9 -0
  10. data/lib/quick_travel.rb +2 -1
  11. data/lib/quick_travel/accommodation.rb +1 -15
  12. data/lib/quick_travel/adapter.rb +98 -67
  13. data/lib/quick_travel/{adapter_exception.rb → adapter_error.rb} +1 -1
  14. data/lib/quick_travel/address.rb +2 -7
  15. data/lib/quick_travel/adjustment.rb +0 -2
  16. data/lib/quick_travel/bed_configuration.rb +0 -1
  17. data/lib/quick_travel/bed_requirement.rb +0 -1
  18. data/lib/quick_travel/booking.rb +22 -46
  19. data/lib/quick_travel/cache.rb +8 -14
  20. data/lib/quick_travel/checkout.rb +1 -1
  21. data/lib/quick_travel/client.rb +2 -4
  22. data/lib/quick_travel/client_type.rb +2 -1
  23. data/lib/quick_travel/connection_error.rb +1 -1
  24. data/lib/quick_travel/constants.rb +0 -1
  25. data/lib/quick_travel/contact.rb +0 -1
  26. data/lib/quick_travel/country.rb +0 -3
  27. data/lib/quick_travel/document.rb +0 -2
  28. data/lib/quick_travel/document_group.rb +0 -2
  29. data/lib/quick_travel/location.rb +0 -2
  30. data/lib/quick_travel/party.rb +7 -12
  31. data/lib/quick_travel/passenger.rb +0 -1
  32. data/lib/quick_travel/passenger_price_break.rb +0 -2
  33. data/lib/quick_travel/passenger_type.rb +0 -2
  34. data/lib/quick_travel/payment.rb +0 -3
  35. data/lib/quick_travel/payment_type.rb +4 -13
  36. data/lib/quick_travel/price_changes.rb +3 -0
  37. data/lib/quick_travel/price_changes/booking_price_change.rb +30 -0
  38. data/lib/quick_travel/price_changes/price_change.rb +23 -0
  39. data/lib/quick_travel/{discounts/discount_tree.rb → price_changes/price_change_tree.rb} +12 -8
  40. data/lib/quick_travel/product.rb +15 -28
  41. data/lib/quick_travel/product_type.rb +4 -16
  42. data/lib/quick_travel/property.rb +4 -20
  43. data/lib/quick_travel/property_facility.rb +0 -1
  44. data/lib/quick_travel/property_type.rb +2 -14
  45. data/lib/quick_travel/region.rb +0 -9
  46. data/lib/quick_travel/reservation.rb +0 -21
  47. data/lib/quick_travel/resource.rb +7 -28
  48. data/lib/quick_travel/room_facility.rb +0 -1
  49. data/lib/quick_travel/route.rb +9 -25
  50. data/lib/quick_travel/route_stop.rb +0 -1
  51. data/lib/quick_travel/service.rb +2 -1
  52. data/lib/quick_travel/status.rb +23 -0
  53. data/lib/quick_travel/trip.rb +0 -1
  54. data/lib/quick_travel/vehicle.rb +2 -4
  55. data/lib/quick_travel/vehicle_type.rb +0 -3
  56. data/lib/quick_travel/version.rb +1 -1
  57. data/quicktravel_client.gemspec +4 -4
  58. data/spec/booking_spec.rb +24 -0
  59. data/spec/discounts_spec.rb +69 -69
  60. data/spec/passenger_type_spec.rb +30 -0
  61. data/spec/payment_type_spec.rb +10 -0
  62. data/spec/product_spec.rb +52 -21
  63. data/spec/product_type_spec.rb +19 -0
  64. data/spec/property_spec.rb +83 -0
  65. data/spec/region_spec.rb +1 -1
  66. data/spec/reservation_spec.rb +3 -2
  67. data/spec/resource_spec.rb +31 -7
  68. data/spec/route_spec.rb +118 -0
  69. data/spec/spec_helper.rb +18 -25
  70. data/spec/status_spec.rb +9 -0
  71. data/spec/support/cassettes/booking_create.yml +39 -33
  72. data/spec/support/cassettes/booking_documents.yml +36 -30
  73. data/spec/support/cassettes/booking_price_changes.yml +66 -0
  74. data/spec/support/cassettes/booking_show.yml +38 -32
  75. data/spec/support/cassettes/booking_update.yml +74 -62
  76. data/spec/support/cassettes/booking_with_documents.yml +88 -76
  77. data/spec/support/cassettes/booking_with_nested_attributes.yml +128 -110
  78. data/spec/support/cassettes/booking_with_price_changes.yml +86 -0
  79. data/spec/support/cassettes/countries.yml +140 -0
  80. data/spec/support/cassettes/country_all.yml +36 -30
  81. data/spec/support/cassettes/create_reservation_fail.yml +32 -27
  82. data/spec/support/cassettes/create_reservation_with_booking.yml +40 -34
  83. data/spec/support/cassettes/passenger_all.yml +36 -30
  84. data/spec/support/cassettes/payment_info.yml +61 -0
  85. data/spec/support/cassettes/product_date_range_bookability.yml +61 -59
  86. data/spec/support/cassettes/product_show.yml +42 -32
  87. data/spec/support/cassettes/product_show_as_agent.yml +63 -0
  88. data/spec/support/cassettes/product_type_all.yml +53 -0
  89. data/spec/support/cassettes/property.yml +66 -0
  90. data/spec/support/cassettes/region_show.yml +36 -30
  91. data/spec/support/cassettes/reservation_with_extra_picks.yml +137 -110
  92. data/spec/support/cassettes/resource_fare_bases.yml +47 -78
  93. data/spec/support/cassettes/resource_product_type.yml +63 -0
  94. data/spec/support/cassettes/resource_show.yml +37 -31
  95. data/spec/support/cassettes/resource_with_price.yml +63 -0
  96. data/spec/support/cassettes/route_all.yml +65 -0
  97. data/spec/support/cassettes/tenant_switcher.yml +109 -0
  98. data/spec/support/coverage_loader.rb +26 -0
  99. data/spec/tenant_spec.rb +28 -0
  100. metadata +106 -115
  101. data/bootstrap/boot.rb +0 -4
  102. data/lib/quick_travel/discounts.rb +0 -3
  103. data/lib/quick_travel/discounts/booking_discount.rb +0 -18
  104. data/lib/quick_travel/discounts/discount.rb +0 -21
  105. data/spec/support/cassettes/booking_create_legacy.yml +0 -50
  106. data/spec/support/cassettes/booking_discounts.yml +0 -53
  107. data/spec/support/cassettes/booking_with_discounts.yml +0 -72
  108. data/spec/support/cassettes/region_index.yml +0 -48
@@ -0,0 +1,19 @@
1
+ require 'spec_helper'
2
+ require 'quick_travel/product_type'
3
+
4
+ describe QuickTravel::ProductType do
5
+ context '#all' do
6
+ subject(:all) do
7
+ VCR.use_cassette('product_type_all') { QuickTravel::ProductType.all }
8
+ end
9
+
10
+ its(:class) { should == Array }
11
+ its(:length) { should == 8 }
12
+
13
+ context 'first element' do
14
+ subject { all.first }
15
+ its(:class) { should == QuickTravel::ProductType }
16
+ its(:name) { should == 'Ferry' }
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,83 @@
1
+ require 'spec_helper'
2
+ require 'quick_travel/address'
3
+ require 'quick_travel/accommodation'
4
+ require 'quick_travel/country'
5
+ require 'quick_travel/property'
6
+
7
+ describe QuickTravel::Property do
8
+ let(:opts) { { first_travel_date: Date.new(2016, 1, 1) } }
9
+ subject(:property) {
10
+ VCR.use_cassette 'property' do
11
+ QuickTravel::Property.load_with_pricing(1, product: opts)
12
+ end
13
+ }
14
+
15
+ before do
16
+ VCR.use_cassette 'countries' do
17
+ QuickTravel::Country.all # preload countries for address
18
+ end
19
+ end
20
+
21
+ its(:id) { should eq 1 }
22
+ its(:name) { should eq 'Hilton Hotel' }
23
+
24
+ context 'its address' do
25
+ subject(:address) { property.address }
26
+ its(:id) { should eq 1 }
27
+ its(:address_line1) { should eq 'Level 2' }
28
+ its(:address_line2) { should eq '1 Victoria Square' }
29
+ its(:city) { should eq 'Adelaide' }
30
+ its(:state) { should eq 'SA' }
31
+ its(:post_code) { should eq '5000' }
32
+ its(:country_id) { should eq 14 }
33
+ its(:country_name) { should eq 'Australia' }
34
+ end
35
+
36
+ context 'its property facilities' do
37
+ subject(:property_facilities) { property.property_facilities }
38
+
39
+ its(:size) { should eq 2 }
40
+
41
+ specify { expect(subject.map(&:name)).to eq ['Pool', 'Spa'] }
42
+
43
+ context 'first property facility' do
44
+ subject { property_facilities.first }
45
+
46
+ its(:id) { should eq 1 }
47
+ its(:name) { should eq 'Pool' }
48
+ its(:category_id) { should eq 1 }
49
+ its(:position) { should eq 1 }
50
+ its(:created_at) { should be_a(Date) }
51
+ its(:updated_at) { should be_a(Date) }
52
+ end
53
+ end
54
+
55
+ context 'its accommodations' do
56
+ subject(:accommodations) { property.accommodations }
57
+
58
+ its(:size) { should eq 1 }
59
+ end
60
+
61
+ context 'first accommodation' do
62
+ subject(:accommodation) { property.accommodations.first }
63
+
64
+ context 'its room facilities' do
65
+ subject(:room_facilities) { accommodation.room_facilities }
66
+
67
+ its(:size) { should eq 2 }
68
+
69
+ specify { expect(subject.map(&:name)).to eq ['Shower', 'Hairdryer'] }
70
+
71
+ context 'first room facility' do
72
+ subject(:room_facility) { room_facilities.first }
73
+
74
+ its(:id) { should eq 1 }
75
+ its(:name) { should eq 'Shower' }
76
+ its(:category_id) { should eq 2 }
77
+ its(:position) { should eq 1 }
78
+ its(:created_at) { should be_a(Date) }
79
+ its(:updated_at) { should be_a(Date) }
80
+ end
81
+ end
82
+ end
83
+ end
data/spec/region_spec.rb CHANGED
@@ -3,7 +3,7 @@ require 'quick_travel/region'
3
3
 
4
4
  describe QuickTravel::Region do
5
5
  describe '#first' do
6
- subject { QuickTravel::Region.first }
6
+ subject { QuickTravel::Region.all.first }
7
7
 
8
8
  it 'should find a first instance of region from QuickTravel' do
9
9
  VCR.use_cassette('region_show') do
@@ -10,7 +10,8 @@ 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 9
13
+ expect(reservation.booking_id).to eq 3 # based on running ALL specs
14
+ # from a fresh bootstrap.sql
14
15
  end
15
16
  end
16
17
 
@@ -21,7 +22,7 @@ describe QuickTravel::Reservation do
21
22
  resource_id: '4',
22
23
  first_travel_date: '2099-09-10'
23
24
  )
24
- rescue QuickTravel::AdapterException => e
25
+ rescue QuickTravel::AdapterError => e
25
26
  expect(e.message).to match(/^No services selected for/)
26
27
  end
27
28
  end
@@ -2,21 +2,45 @@ require 'spec_helper'
2
2
  require 'quick_travel/resource'
3
3
 
4
4
  describe QuickTravel::Resource do
5
- before do
5
+ subject(:resource) {
6
6
  VCR.use_cassette('resource_show') do
7
- @resource = QuickTravel::Resource.find(6)
7
+ QuickTravel::Resource.find(6)
8
8
  end
9
- end
9
+ }
10
10
 
11
- it 'should fetch a resource' do
12
- expect(@resource.name).to eq 'Executive Room'
13
- end
11
+ its(:name) { should eq 'Executive Room' }
14
12
 
15
13
  it 'should find fare bases of a resource' do
16
14
  VCR.use_cassette('resource_fare_bases') do
17
- picks = @resource.sub_resources
15
+ picks = resource.sub_resources
18
16
  expect(picks.size).to eq 2
19
17
  expect(picks.map(&:name)).to eq ['QBE Travel Insurance - Policy E', 'Travel Insurance - Declined']
20
18
  end
21
19
  end
20
+
21
+ context '#product_type' do
22
+ subject(:property_type) {
23
+ VCR.use_cassette 'resource_product_type' do
24
+ resource.product_type
25
+ end
26
+ }
27
+
28
+ its(:name) { should eq 'Accommodation' }
29
+ end
30
+
31
+ context '#all_with_price' do
32
+ let(:ticket_product_type_id) { 5 }
33
+ subject(:response) {
34
+ VCR.use_cassette 'resource_with_price' do
35
+ QuickTravel::Resource.all_with_price(product_type_ids: ticket_product_type_id)
36
+ end
37
+ }
38
+
39
+ its(:count) { should eq 3 }
40
+
41
+ context 'first resource' do
42
+ subject(:resource) { response.first }
43
+ its(:todays_price) { should eq 32.to_money }
44
+ end
45
+ end
22
46
  end
@@ -0,0 +1,118 @@
1
+ require 'spec_helper'
2
+ require 'quick_travel/route'
3
+
4
+ describe QuickTravel::Route do
5
+ let(:ferry_product_type_id) { 1 }
6
+ let(:to_route_id) { 1 }
7
+ let(:from_route_id) { 2 }
8
+
9
+ context '#all' do
10
+ subject(:routes) {
11
+ VCR.use_cassette 'route_all' do
12
+ QuickTravel::Route.all(ferry_product_type_id)
13
+ end
14
+ }
15
+
16
+ specify { expect(routes.size).to eq 2 }
17
+
18
+ context 'first route' do
19
+ subject(:route) { routes.first }
20
+
21
+ its(:id) { should eq to_route_id }
22
+ its(:name) { should eq 'To Kangaroo Island' }
23
+ its(:path) { should eq 'Cape Jervis to Penneshaw' }
24
+ its(:position) { should eq 1 }
25
+ its(:product_type_id) { should eq 1 }
26
+ its(:reverse_id) { should eq from_route_id }
27
+
28
+ context 'route stops' do
29
+ subject(:route_stops) { route.route_stops }
30
+
31
+ its(:size) { should eq 2 }
32
+
33
+ context 'first stop' do
34
+ subject(:route_stop) { route_stops.first }
35
+
36
+ its(:id) { should eq to_route_id }
37
+ its(:name) { should eq 'Cape Jervis' }
38
+ its(:address) { should eq '' }
39
+ its(:code) { should eq 'CPJ' }
40
+ its(:position) { should eq 1 }
41
+ its(:route_id) { should eq 1 }
42
+ end
43
+ end
44
+ end
45
+ end
46
+
47
+ context '#find_by_route_id_and_product_type_id' do
48
+ subject(:route) {
49
+ VCR.use_cassette('route_all') do
50
+ QuickTravel::Route.find_by_route_id_and_product_type_id(
51
+ from_route_id,
52
+ ferry_product_type_id
53
+ )
54
+ end
55
+ }
56
+
57
+ its(:id) { should eq from_route_id }
58
+ its(:name) { should eq 'From Kangaroo Island' }
59
+ its(:path) { should eq 'Penneshaw to Cape Jervis' }
60
+ its(:position) { should eq 2 }
61
+ its(:product_type_id) { should eq 1 }
62
+ its(:reverse_id) { should eq to_route_id }
63
+ end
64
+
65
+ context '#find' do
66
+ let(:routes) {
67
+ VCR.use_cassette('route_all') do
68
+ QuickTravel::Route.all(ferry_product_type_id)
69
+ end
70
+ }
71
+ subject(:route) { QuickTravel::Route.find(routes, from_route_id) }
72
+
73
+ its(:name) { should eq 'From Kangaroo Island' }
74
+
75
+ context '#get_return_route_stop!' do
76
+ let(:forward_stop) { route.route_stops.first }
77
+ subject(:return_stop) { route.get_return_route_stop!(forward_stop) }
78
+
79
+ its(:name) { should eq forward_stop.name }
80
+ end
81
+
82
+ context '#get_reverse_route' do
83
+ specify { expect(route.get_reverse_route!.id).to eq to_route_id }
84
+ end
85
+
86
+ context '#find_route_stop_by_id' do
87
+ specify { expect(route.find_route_stop_by_id(3).name).to eq 'Penneshaw' }
88
+ specify { expect(route.find_route_stop_by_id(4).name).to eq 'Cape Jervis' }
89
+ end
90
+ end
91
+
92
+ context 'reverse route not setup' do
93
+ let(:route) { QuickTravel::Route.new(reverse_id: nil) }
94
+
95
+ specify {
96
+ expect { route.get_reverse_route! }.to raise_error(
97
+ QuickTravel::AdapterError,
98
+ 'Reverse has not been setup for the selected route.'
99
+ )
100
+ }
101
+ end
102
+
103
+ context 'reverse route cant be found' do
104
+ let(:route) {
105
+ QuickTravel::Route.new(
106
+ reverse_id: 42,
107
+ product_type_id: ferry_product_type_id
108
+ )
109
+ }
110
+
111
+ specify {
112
+ expect { route.get_reverse_route! }.to raise_error(
113
+ QuickTravel::AdapterError,
114
+ 'Reverse does not exist for the selected route.'
115
+ )
116
+ }
117
+ end
118
+ end
data/spec/spec_helper.rb CHANGED
@@ -13,39 +13,23 @@ require 'date' # Needed for stamp
13
13
  require 'stamp' # Some reasons stamp doesn't load automatically?
14
14
  require 'vcr'
15
15
 
16
- qt_key = ENV['QT_KEY'] || 'test_key'
16
+ ENV['QT_KEYS'] ||= 'test_key_1,test_key_2'
17
+ qt_keys = ENV['QT_KEYS'].split(',')
17
18
  VCR.configure do |c|
18
19
  c.cassette_library_dir = 'spec/support/cassettes'
19
20
  c.default_cassette_options = { match_requests_on: [:method, :uri, :body] }
20
- c.filter_sensitive_data('<QT_KEY>') { qt_key }
21
- c.hook_into :fakeweb
21
+ c.filter_sensitive_data('<QT_KEY>') { qt_keys[0] }
22
+ c.filter_sensitive_data('<QT_KEY_2>') { qt_keys[1] }
23
+ c.hook_into :webmock
22
24
  end
23
25
 
24
- MINIMUM_COVERAGE = 74
25
-
26
- if ENV['COVERAGE']
27
- require 'simplecov'
28
- require 'simplecov-rcov'
29
- SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
30
- SimpleCov.start do
31
- add_filter '/vendor/'
32
- add_filter '/spec/'
33
- add_group 'lib', 'lib'
34
- end
35
- SimpleCov.at_exit do
36
- SimpleCov.result.format!
37
- percent = SimpleCov.result.covered_percent
38
- unless percent >= MINIMUM_COVERAGE
39
- puts "Coverage must be above #{MINIMUM_COVERAGE}%. It is #{'%.2f' % percent}%"
40
- Kernel.exit(1)
41
- end
42
- end
43
- end
26
+ require 'support/coverage_loader'
27
+ require 'quick_travel' # eager load to ensure coverage correct
44
28
 
45
29
  require 'quick_travel/config'
46
30
  QuickTravel.configure do |c|
47
- c.url = 'http://0.0.0.0:8080'
48
- c.access_key = qt_key
31
+ c.url = 'http://test.qt.sealink.com.au:8080'
32
+ c.access_key = qt_keys[0]
49
33
  end
50
34
 
51
35
  require 'quick_travel/connection_error'
@@ -64,11 +48,20 @@ class HashCache
64
48
  def write(name, value, _ = nil)
65
49
  @cache[name] = value
66
50
  end
51
+
52
+ def clear
53
+ @cache = {}
54
+ end
55
+
56
+ def delete(name)
57
+ @cache.delete(name)
58
+ end
67
59
  end
68
60
 
69
61
  QuickTravel::Cache.cache_store = HashCache.new
70
62
 
71
63
  RSpec.configure do |config|
64
+ config.raise_errors_for_deprecations!
72
65
  config.run_all_when_everything_filtered = true
73
66
  config.filter_run :focus
74
67
  config.before :each do
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+ require 'quick_travel/cache'
3
+ require 'quick_travel/status'
4
+
5
+ describe QuickTravel::Status do
6
+ specify {
7
+ expect { QuickTravel::Status.check! }.to_not raise_error
8
+ }
9
+ end
@@ -2,49 +2,55 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: http://0.0.0.0:8080/api/bookings.json
5
+ uri: http://test.qt.sealink.com.au:8080/api/bookings.json
6
6
  body:
7
- encoding: US-ASCII
7
+ encoding: UTF-8
8
8
  string: booking[referral_code_id]=33&access_key=<QT_KEY>
9
9
  headers:
10
- content-length:
10
+ Content-Length:
11
11
  - '0'
12
12
  response:
13
13
  status:
14
14
  code: 200
15
- message: ! 'OK '
15
+ message: 'OK '
16
16
  headers:
17
- p3p:
17
+ P3p:
18
18
  - CP="IDC DSP CAO COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
19
- content-type:
19
+ Content-Type:
20
20
  - application/json; charset=utf-8
21
- x-ua-compatible:
22
- - IE=Edge,chrome=1
23
- etag:
24
- - ! '"f4a3881c4477a858ad2157aad8887436"'
25
- cache-control:
26
- - max-age=0, private, must-revalidate
27
- x-request-id:
28
- - bf709d73f2c947811bf2ec1153e361ac
29
- x-runtime:
30
- - '0.410944'
31
- date:
32
- - Thu, 28 Feb 2013 14:16:26 GMT
33
- x-rack-cache:
21
+ X-Ua-Compatible:
22
+ - IE=Edge
23
+ Cache-Control:
24
+ - no-store, must-revalidate, private, max-age=0
25
+ X-Request-Id:
26
+ - d4861dc66f06b575f04ee07a68c3dade
27
+ X-Runtime:
28
+ - '1.299366'
29
+ Vary:
30
+ - Origin
31
+ X-Rack-Cache:
34
32
  - invalidate, pass
35
- server:
36
- - WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
37
- content-length:
38
- - '1996'
39
- connection:
40
- - close
41
- set-cookie:
42
- - _session_id=c3f5b616d7b0a15b8634d496713152b2; path=/; HttpOnly
33
+ X-Miniprofiler-Ids:
34
+ - '["3zatihooarqo93hijqmw","3n393d46407xjckipoz4","sbzq3sn22o19v6amh4lx","hnsva789t8cmifp64wx3","wmmnukmwie7vr7vj8xqf","2brmax1rs5fwk4fd7n5","dvsmvrl183r0tifnlw46","5o49qsg88hbcsljo43fu","w0wrmi9s9rgua6owkm3z","lxziuvwk5cnyi9wz6zbf"]'
35
+ Server:
36
+ - WEBrick/1.3.1 (Ruby/2.2.3/2015-08-18)
37
+ Date:
38
+ - Mon, 26 Oct 2015 00:18:43 GMT
39
+ Content-Length:
40
+ - '2248'
41
+ Connection:
42
+ - Keep-Alive
43
+ Set-Cookie:
44
+ - __profilin=p%3Dt; path=/
45
+ - __profilin=p%3Dt; path=/
46
+ - __profilin=p%3Dt; path=/
47
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJWQ0NjRhYTk2ZTUyNTc1ZGNhZjJkZDk1ZjZhNzk5NDU1BjsAVEkiCXVzZXIGOwBGaQY%3D--5b9052a724d9f6014f694bd40b53c77d0993ab0b;
48
+ path=/; HttpOnly
43
49
  body:
44
- encoding: US-ASCII
45
- string: ! '{"id":3,"state":"new","reference":"222226","public_comments":null,"internal_comments":null,"customer_contact_name":null,"customer_contact_phone":null,"customer_contact_mobile":null,"customer_contact_email":null,"currency_iso_code":"AUD","country_id":14,"post_code":null,"referral_code_id":1,"total_adjustments_in_cents":0,"pre_adjusted_gross_in_cents":0,"nett_in_cents":0,"gross_in_cents":0,"commission_in_cents":0,"balance_in_cents":0,"paid_in_cents":0,"surcharge_in_cents":0,"deposit_in_cents":0,"web_site_name":"SeaLink","promo_code":null,"insurance_offered":false,"deposit_due_on":null,"balance_due_on":null,"first_travel_date":{"_type":"Date","_value":"2013-03-01"},"last_travel_date":null,"complete":true,"reason_not_complete":null,"discardable_in":60,"inactivatable_in":10,"notices":{"currency":["Currency
46
- has changed to currency AUD. Please set currency as appropriate."]},"deposit_relevant":false,"passenger_ids":[],"vehicle_ids":[],"reservation_ids":[],"adjustment_ids":[],"todo_items":[],"confirmation_requests":[],"passengers_attributes":[],"vehicles_attributes":[],"reservations_attributes":[],"adjustments_attributes":[],"payments_attributes":[],"payment_types_attributes":[{"id":5,"name":"master","description":"master","payment_method":"credit_card","credit_card_brand":"MasterCard","transaction_fee":"0.0","active":true,"position":2,"surchargeable":false,"for_frequent_traveller_redemption":false,"comment_required":false,"external":true},{"id":4,"name":"visa","description":"visa","payment_method":"credit_card","credit_card_brand":"Visa","transaction_fee":"0.0","active":true,"position":3,"surchargeable":false,"for_frequent_traveller_redemption":false,"comment_required":false,"external":true},{"id":7,"name":"PayPal","description":"Payments
47
- made via PayPal account","payment_method":"paypal","credit_card_brand":null,"transaction_fee":"0.0","active":true,"position":6,"surchargeable":false,"for_frequent_traveller_redemption":false,"comment_required":false,"external":true}]}'
48
- http_version: '1.1'
49
- recorded_at: Thu, 18 Dec 2014 07:33:16 GMT
50
+ encoding: UTF-8
51
+ string: '{"id":2,"state":"new","reference":"222224","public_comments":null,"internal_comments":null,"customer_contact_name":null,"customer_contact_phone":null,"customer_contact_mobile":null,"customer_contact_email":null,"currency_iso_code":"AUD","country_id":14,"post_code":null,"referral_code_id":1,"created_at":"2015-11-18T14:45:58+10:30","updated_at":"2015-11-18T14:45:58+10:30","promo_code":null,"promo_code_id":null,"insurance_offered":false,"total_adjustments_in_cents":0,"pre_adjusted_gross_in_cents":0,"nett_in_cents":0,"gross_in_cents":0,"commission_in_cents":0,"balance_in_cents":0,"paid_in_cents":0,"surcharge_in_cents":0,"deposit_in_cents":0,"web_site_name":"SeaLink","deposit_relevant":false,"deposit_due_on":null,"balance_due_on":null,"first_travel_date":{"_type":"Date","_value":"2015-11-18"},"last_travel_date":null,"complete":true,"reason_not_complete":null,"discardable_in":60,"inactivatable_in":10,"notices":{"currency":["Currency
52
+ has changed to currency AUD. Please set currency as appropriate."]},"passenger_ids":[],"vehicle_ids":[],"reservation_ids":[],"adjustment_ids":[],"todo_items":[],"confirmation_requests":[],"passengers_attributes":[],"vehicles_attributes":[],"reservations_attributes":[],"adjustments_attributes":[],"payments_attributes":[],"payment_types_attributes":[{"id":5,"name":"master","description":"master","payment_method":"credit_card","gateway":"braintree","credit_card_brand":"MasterCard","transaction_fee":"0.0","active":true,"position":2,"surchargeable":false,"for_frequent_traveller_redemption":false,"comment_required":false,"external":true,"redirect":false},{"id":4,"name":"visa","description":"visa","payment_method":"credit_card","gateway":"braintree","credit_card_brand":"Visa","transaction_fee":"0.0","active":true,"position":3,"surchargeable":false,"for_frequent_traveller_redemption":false,"comment_required":false,"external":true,"redirect":false},{"id":7,"name":"PayPal","description":"Payments
53
+ made via PayPal account","payment_method":"paypal","gateway":"braintree","credit_card_brand":null,"transaction_fee":"0.0","active":true,"position":6,"surchargeable":false,"for_frequent_traveller_redemption":false,"comment_required":false,"external":true,"redirect":false}],"issued_tickets_attributes":[]}'
54
+ http_version:
55
+ recorded_at: Mon, 26 Oct 2015 00:18:43 GMT
50
56
  recorded_with: VCR 2.9.3