quicktravel_client 3.7.0 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +5 -4
  4. data/CHANGELOG.md +30 -0
  5. data/gemfiles/rails6.gemfile +8 -0
  6. data/lib/quick_travel.rb +2 -0
  7. data/lib/quick_travel/adapter.rb +13 -25
  8. data/lib/quick_travel/booking.rb +6 -5
  9. data/lib/quick_travel/cache.rb +24 -5
  10. data/lib/quick_travel/checkout.rb +1 -1
  11. data/lib/quick_travel/client.rb +9 -1
  12. data/lib/quick_travel/init_from_hash.rb +4 -0
  13. data/lib/quick_travel/package.rb +13 -0
  14. data/lib/quick_travel/passenger_type.rb +1 -1
  15. data/lib/quick_travel/product_configuration.rb +1 -1
  16. data/lib/quick_travel/products/base.rb +4 -4
  17. data/lib/quick_travel/reservation.rb +1 -1
  18. data/lib/quick_travel/resource.rb +1 -1
  19. data/lib/quick_travel/route.rb +1 -1
  20. data/lib/quick_travel/route_stop.rb +8 -1
  21. data/lib/quick_travel/vehicle_type.rb +1 -1
  22. data/lib/quick_travel/version.rb +1 -1
  23. data/quicktravel_client.gemspec +5 -5
  24. data/spec/adapter_spec.rb +34 -3
  25. data/spec/booking_spec.rb +10 -0
  26. data/spec/checkout_spec.rb +0 -182
  27. data/spec/clients_spec.rb +42 -0
  28. data/spec/discounts_spec.rb +21 -21
  29. data/spec/package_spec.rb +24 -0
  30. data/spec/passenger_type_spec.rb +1 -1
  31. data/spec/product_configuration_spec.rb +11 -0
  32. data/spec/reservation_spec.rb +20 -0
  33. data/spec/spec_helper.rb +6 -3
  34. data/spec/support/cassettes/accommodation_reserve.yml +12 -4
  35. data/spec/support/cassettes/basic_product_scheduled_trips.yml +3 -1
  36. data/spec/support/cassettes/basic_product_scheduled_trips_multi_sector.yml +3 -1
  37. data/spec/support/cassettes/basic_product_scheduled_trips_unbookable.yml +3 -1
  38. data/spec/support/cassettes/booking_activate.yml +6 -2
  39. data/spec/support/cassettes/booking_cancel.yml +6 -2
  40. data/spec/support/cassettes/booking_create.yml +3 -1
  41. data/spec/support/cassettes/booking_create_accommodation.yml +3 -1
  42. data/spec/support/cassettes/booking_documents.yml +3 -1
  43. data/spec/support/cassettes/booking_non_existant.yml +3 -1
  44. data/spec/support/cassettes/booking_price_changes.yml +3 -1
  45. data/spec/support/cassettes/booking_show.yml +3 -1
  46. data/spec/support/cassettes/booking_update.yml +6 -2
  47. data/spec/support/cassettes/booking_with_comments.yml +119 -0
  48. data/spec/support/cassettes/booking_with_documents.yml +6 -2
  49. data/spec/support/cassettes/booking_with_nested_attributes.yml +9 -3
  50. data/spec/support/cassettes/booking_with_price_changes.yml +3 -1
  51. data/spec/support/cassettes/checkout_client_token.yml +3 -1
  52. data/spec/support/cassettes/client_templates.yml +120 -0
  53. data/spec/support/cassettes/countries.yml +3 -1
  54. data/spec/support/cassettes/country_all.yml +3 -1
  55. data/spec/support/cassettes/create_reservation_fail.yml +3 -1
  56. data/spec/support/cassettes/create_reservation_with_booking.yml +3 -1
  57. data/spec/support/cassettes/locations.yml +3 -1
  58. data/spec/support/cassettes/opal_modern_pay_failed_booking.yml +3 -1
  59. data/spec/support/cassettes/opal_modern_pay_failed_create.yml +3 -1
  60. data/spec/support/cassettes/opal_modern_pay_failed_update.yml +3 -1
  61. data/spec/support/cassettes/opal_modern_pay_successful_booking.yml +3 -1
  62. data/spec/support/cassettes/opal_modern_pay_successful_response.yml +3 -1
  63. data/spec/support/cassettes/opal_modern_pay_successful_update_response.yml +3 -1
  64. data/spec/support/cassettes/opal_pay.yml +3 -1
  65. data/spec/support/cassettes/opal_pay_booking.yml +3 -1
  66. data/spec/support/cassettes/package_show.yml +83 -0
  67. data/spec/support/cassettes/package_show_product_type.yml +80 -0
  68. data/spec/support/cassettes/passenger_all.yml +3 -1
  69. data/spec/support/cassettes/payment_info.yml +3 -1
  70. data/spec/support/cassettes/price_quote.yml +6 -2
  71. data/spec/support/cassettes/product_date_range_bookability.yml +3 -1
  72. data/spec/support/cassettes/product_show.yml +3 -1
  73. data/spec/support/cassettes/product_show_as_agent.yml +3 -1
  74. data/spec/support/cassettes/product_type_all.yml +3 -1
  75. data/spec/support/cassettes/product_type_resource_categories.yml +3 -1
  76. data/spec/support/cassettes/product_type_resource_categories_tickets.yml +3 -1
  77. data/spec/support/cassettes/product_type_routes.yml +3 -1
  78. data/spec/support/cassettes/property.yml +3 -1
  79. data/spec/support/cassettes/property_types.yml +3 -1
  80. data/spec/support/cassettes/region_show.yml +3 -1
  81. data/spec/support/cassettes/reservation_resource.yml +3 -1
  82. data/spec/support/cassettes/reservation_with_extra_picks.yml +9 -3
  83. data/spec/support/cassettes/resource_category_all.yml +3 -1
  84. data/spec/support/cassettes/resource_category_all_for_product_type_8.yml +3 -1
  85. data/spec/support/cassettes/resource_fare_bases.yml +3 -1
  86. data/spec/support/cassettes/resource_show.yml +3 -1
  87. data/spec/support/cassettes/resource_with_price.yml +3 -1
  88. data/spec/support/cassettes/settings_basic.yml +3 -1
  89. data/spec/support/cassettes/tenant_switcher.yml +6 -2
  90. data/spec/support/cassettes/wrong_url.yml +3 -1
  91. data/spec/support/coverage_loader.rb +1 -1
  92. metadata +35 -29
  93. data/gemfiles/rails4.gemfile +0 -9
@@ -27,6 +27,11 @@ end
27
27
  require 'quick_travel/connection_error'
28
28
  require 'quick_travel/cache'
29
29
 
30
+ Money.default_currency = Money::Currency.new("AUD")
31
+ Money.locale_backend = nil
32
+ Money.default_formatting_rules = { thousands_separator: "," }
33
+ Money.rounding_mode = BigDecimal::ROUND_HALF_UP
34
+
30
35
  class HashCache
31
36
  def initialize
32
37
  @cache = {}
@@ -50,12 +55,10 @@ class HashCache
50
55
  end
51
56
 
52
57
  QuickTravel::Cache.cache_store = HashCache.new
58
+ QuickTravel::Cache.namespace = 'namespace'
53
59
 
54
60
  RSpec.configure do |config|
55
61
  config.raise_errors_for_deprecations!
56
62
  config.run_all_when_everything_filtered = true
57
63
  config.filter_run :focus
58
- config.before :each do
59
- allow(QuickTravel::Adapter).to receive(:cache) { ActiveSupport::Cache::MemoryStore.new }
60
- end
61
64
  end
@@ -5,10 +5,12 @@ http_interactions:
5
5
  uri: http://test.qt.sealink.com.au:8080/reservation_for/accommodations/create_or_update.json
6
6
  body:
7
7
  encoding: UTF-8
8
- string: reservations[resource_id]=6&reservations[bed_configuration_id]=1&reservations[first_travel_date]=01%2F03%2F2016&reservations[last_travel_date]=02%2F03%2F2016&booking_id=4&access_key=<QT_KEY>
8
+ string: reservations[resource_id]=6&reservations[bed_configuration_id]=1&reservations[first_travel_date]=01%2F03%2F2016&reservations[last_travel_date]=02%2F03%2F2016&booking_id=4
9
9
  headers:
10
10
  Content-Length:
11
11
  - '0'
12
+ X-API-KEY:
13
+ - <QT_KEY>
12
14
  response:
13
15
  status:
14
16
  code: 200
@@ -59,10 +61,12 @@ http_interactions:
59
61
  uri: http://test.qt.sealink.com.au:8080/api/bookings/4.json
60
62
  body:
61
63
  encoding: UTF-8
62
- string: access_key=<QT_KEY>
64
+ string: ''
63
65
  headers:
64
66
  Content-Length:
65
67
  - '0'
68
+ X-API-KEY:
69
+ - <QT_KEY>
66
70
  response:
67
71
  status:
68
72
  code: 200
@@ -124,10 +128,12 @@ http_interactions:
124
128
  uri: http://test.qt.sealink.com.au:8080/api/bookings/4.json
125
129
  body:
126
130
  encoding: UTF-8
127
- string: access_key=<QT_KEY>
131
+ string: ''
128
132
  headers:
129
133
  Content-Length:
130
134
  - '0'
135
+ X-API-KEY:
136
+ - <QT_KEY>
131
137
  response:
132
138
  status:
133
139
  code: 200
@@ -189,10 +195,12 @@ http_interactions:
189
195
  uri: http://test.qt.sealink.com.au:8080/api/resources/6.json
190
196
  body:
191
197
  encoding: UTF-8
192
- string: access_key=<QT_KEY>
198
+ string: ''
193
199
  headers:
194
200
  Content-Length:
195
201
  - '0'
202
+ X-API-KEY:
203
+ - <QT_KEY>
196
204
  response:
197
205
  status:
198
206
  code: 200
@@ -5,10 +5,12 @@ http_interactions:
5
5
  uri: http://test.qt.sealink.com.au:8080/reservation_for/scheduled_trips/find_services_for.json
6
6
  body:
7
7
  encoding: UTF-8
8
- string: product_type_id=1&route_id=1&forward[first_travel_date]=2016-03-01&forward[passenger_types][1]=2&access_key=<QT_KEY>
8
+ string: product_type_id=1&route_id=1&forward[first_travel_date]=2016-03-01&forward[passenger_types][1]=2
9
9
  headers:
10
10
  Content-Length:
11
11
  - '0'
12
+ X-API-KEY:
13
+ - <QT_KEY>
12
14
  response:
13
15
  status:
14
16
  code: 200
@@ -5,10 +5,12 @@ http_interactions:
5
5
  uri: http://test.qt.sealink.com.au:8080/reservation_for/scheduled_trips/find_services_for.json
6
6
  body:
7
7
  encoding: UTF-8
8
- string: product_type_id=6&route_id=3&forward[first_travel_date]=2016-03-01&forward[from_route_stop_id]=5&forward[to_route_stop_id]=14&forward[passenger_types][1]=2&access_key=<QT_KEY>
8
+ string: product_type_id=6&route_id=3&forward[first_travel_date]=2016-03-01&forward[from_route_stop_id]=5&forward[to_route_stop_id]=14&forward[passenger_types][1]=2
9
9
  headers:
10
10
  Content-Length:
11
11
  - '0'
12
+ X-API-KEY:
13
+ - <QT_KEY>
12
14
  response:
13
15
  status:
14
16
  code: 200
@@ -5,10 +5,12 @@ http_interactions:
5
5
  uri: http://test.qt.sealink.com.au:8080/reservation_for/scheduled_trips/find_services_for.json
6
6
  body:
7
7
  encoding: UTF-8
8
- string: product_type_id=1&route_id=1&forward[first_travel_date]=2016-03-03&forward[passenger_types][1]=2&access_key=<QT_KEY>
8
+ string: product_type_id=1&route_id=1&forward[first_travel_date]=2016-03-03&forward[passenger_types][1]=2
9
9
  headers:
10
10
  Content-Length:
11
11
  - '0'
12
+ X-API-KEY:
13
+ - <QT_KEY>
12
14
  response:
13
15
  status:
14
16
  code: 200
@@ -5,10 +5,12 @@ http_interactions:
5
5
  uri: http://test.qt.sealink.com.au:8080/api/bookings/2.json
6
6
  body:
7
7
  encoding: UTF-8
8
- string: access_key=<QT_KEY>
8
+ string: ''
9
9
  headers:
10
10
  Content-Length:
11
11
  - '0'
12
+ X-API-KEY:
13
+ - <QT_KEY>
12
14
  response:
13
15
  status:
14
16
  code: 200
@@ -69,10 +71,12 @@ http_interactions:
69
71
  uri: http://test.qt.sealink.com.au:8080/api/bookings/2/activate
70
72
  body:
71
73
  encoding: UTF-8
72
- string: access_key=<QT_KEY>
74
+ string: ''
73
75
  headers:
74
76
  Content-Length:
75
77
  - '0'
78
+ X-API-KEY:
79
+ - <QT_KEY>
76
80
  response:
77
81
  status:
78
82
  code: 200
@@ -5,10 +5,12 @@ http_interactions:
5
5
  uri: http://test.qt.sealink.com.au:8080/api/bookings/2.json
6
6
  body:
7
7
  encoding: UTF-8
8
- string: access_key=<QT_KEY>
8
+ string: ''
9
9
  headers:
10
10
  Content-Length:
11
11
  - '0'
12
+ X-API-KEY:
13
+ - <QT_KEY>
12
14
  response:
13
15
  status:
14
16
  code: 200
@@ -69,10 +71,12 @@ http_interactions:
69
71
  uri: http://test.qt.sealink.com.au:8080/api/bookings/2/cancel
70
72
  body:
71
73
  encoding: UTF-8
72
- string: access_key=<QT_KEY>
74
+ string: ''
73
75
  headers:
74
76
  Content-Length:
75
77
  - '0'
78
+ X-API-KEY:
79
+ - <QT_KEY>
76
80
  response:
77
81
  status:
78
82
  code: 200
@@ -5,10 +5,12 @@ http_interactions:
5
5
  uri: http://test.qt.sealink.com.au:8080/api/bookings.json
6
6
  body:
7
7
  encoding: UTF-8
8
- string: access_key=<QT_KEY>
8
+ string: ''
9
9
  headers:
10
10
  Content-Length:
11
11
  - '0'
12
+ X-API-KEY:
13
+ - <QT_KEY>
12
14
  response:
13
15
  status:
14
16
  code: 200
@@ -5,10 +5,12 @@ http_interactions:
5
5
  uri: http://test.qt.sealink.com.au:8080/api/bookings.json
6
6
  body:
7
7
  encoding: UTF-8
8
- string: access_key=<QT_KEY>
8
+ string: ''
9
9
  headers:
10
10
  Content-Length:
11
11
  - '0'
12
+ X-API-KEY:
13
+ - <QT_KEY>
12
14
  response:
13
15
  status:
14
16
  code: 200
@@ -5,10 +5,12 @@ http_interactions:
5
5
  uri: http://test.qt.sealink.com.au:8080/api/bookings/3/documents.json?last_group=true&regenerate=false
6
6
  body:
7
7
  encoding: UTF-8
8
- string: access_key=<QT_KEY>
8
+ string: ''
9
9
  headers:
10
10
  Content-Length:
11
11
  - '0'
12
+ X-API-KEY:
13
+ - <QT_KEY>
12
14
  response:
13
15
  status:
14
16
  code: 200
@@ -5,10 +5,12 @@ http_interactions:
5
5
  uri: http://test.qt.sealink.com.au:8080/api/bookings/reference/111111.json
6
6
  body:
7
7
  encoding: UTF-8
8
- string: access_key=<QT_KEY>
8
+ string: ''
9
9
  headers:
10
10
  Content-Length:
11
11
  - '0'
12
+ X-API-KEY:
13
+ - <QT_KEY>
12
14
  response:
13
15
  status:
14
16
  code: 404
@@ -5,10 +5,12 @@ http_interactions:
5
5
  uri: http://test.qt.sealink.com.au:8080/api/bookings/1/price_change.json
6
6
  body:
7
7
  encoding: UTF-8
8
- string: access_key=<QT_KEY>
8
+ string: ''
9
9
  headers:
10
10
  Content-Length:
11
11
  - '0'
12
+ X-API-KEY:
13
+ - <QT_KEY>
12
14
  response:
13
15
  status:
14
16
  code: 200
@@ -5,10 +5,12 @@ http_interactions:
5
5
  uri: http://test.qt.sealink.com.au:8080/api/bookings/3.json
6
6
  body:
7
7
  encoding: UTF-8
8
- string: access_key=<QT_KEY>
8
+ string: ''
9
9
  headers:
10
10
  Content-Length:
11
11
  - '0'
12
+ X-API-KEY:
13
+ - <QT_KEY>
12
14
  response:
13
15
  status:
14
16
  code: 200
@@ -5,10 +5,12 @@ http_interactions:
5
5
  uri: http://test.qt.sealink.com.au:8080/api/bookings/3.json
6
6
  body:
7
7
  encoding: UTF-8
8
- string: booking[customer_contact_name]=John&access_key=<QT_KEY>
8
+ string: booking[customer_contact_name]=John
9
9
  headers:
10
10
  Content-Length:
11
11
  - '0'
12
+ X-API-KEY:
13
+ - <QT_KEY>
12
14
  response:
13
15
  status:
14
16
  code: 200
@@ -63,10 +65,12 @@ http_interactions:
63
65
  uri: http://test.qt.sealink.com.au:8080/api/bookings/3.json
64
66
  body:
65
67
  encoding: UTF-8
66
- string: access_key=<QT_KEY>
68
+ string: ''
67
69
  headers:
68
70
  Content-Length:
69
71
  - '0'
72
+ X-API-KEY:
73
+ - <QT_KEY>
70
74
  response:
71
75
  status:
72
76
  code: 200
@@ -0,0 +1,119 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://test.qt.sealink.com.au:8080/api/bookings/333536.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Content-Length:
11
+ - '0'
12
+ X-Api-Key:
13
+ - <QT_KEY>
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: OK
18
+ headers:
19
+ Date:
20
+ - Thu, 20 Feb 2020 04:49:21 GMT
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ Transfer-Encoding:
24
+ - chunked
25
+ Connection:
26
+ - keep-alive
27
+ Set-Cookie:
28
+ - __cfduid=d479fa6197c2ba76728106cae869037381582174160; expires=Sat, 21-Mar-20
29
+ 04:49:20 GMT; path=/; domain=.quicktravel.com.au; HttpOnly; SameSite=Lax
30
+ - _session_id=nDi7wN9vz%2BWnYivttZncWLTlh0sID39ME4%2BzY1x85FwnrsEma2kQLQy56t8wG4Trg%2B%2B6pOaO5RsFQ%2FxoU3Q7K46VhP%2BMMADI5HK9csHIagOb5bHEjQM%3D--9uFF2MnY7YnenN12--OcTj7hAxSUXCSEo7gFV7qw%3D%3D;
31
+ path=/; HttpOnly
32
+ Cache-Control:
33
+ - max-age=0, private, must-revalidate
34
+ Etag:
35
+ - W/"ec8f8b692ff0cdd0ad92d33a51c41088"
36
+ P3p:
37
+ - CP="IDC DSP CAO COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
38
+ Strict-Transport-Security:
39
+ - max-age=631138519
40
+ Vary:
41
+ - Origin
42
+ X-Content-Type-Options:
43
+ - nosniff
44
+ X-Download-Options:
45
+ - noopen
46
+ X-Frame-Options:
47
+ - sameorigin
48
+ X-Rack-Cache:
49
+ - miss
50
+ X-Request-Id:
51
+ - 8a7660a8-8ca5-4b29-bf42-ffc70b2ab78b
52
+ X-Runtime:
53
+ - '0.974720'
54
+ X-Xss-Protection:
55
+ - 1; mode=block
56
+ Cf-Cache-Status:
57
+ - DYNAMIC
58
+ Expect-Ct:
59
+ - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
60
+ Server:
61
+ - cloudflare
62
+ Cf-Ray:
63
+ - 567dda783ac2f2ed-ADL
64
+ body:
65
+ encoding: UTF-8
66
+ string: '{"id":333536,"state":"active","reference":"23263F","public_comments":null,"internal_comments":null,"comments":[{"id":12,"booking_id":333536,"comment_type":"customer","text":"I
67
+ hate this","sentiment":"neutral","language_code":"en","translated_text":null}],"customer_contact_name":"John
68
+ Smith","customer_contact_phone":"1234","customer_contact_mobile":null,"customer_contact_email":"john.smith@test.com","currency_iso_code":"AUD","country_id":14,"drop_off_option_id":null,"drop_off_location_id":null,"post_code":"5000","referral_code_id":31,"external_identifier":null,"created_at":"2020-02-20T12:11:12.000+08:00","updated_at":"2020-02-20T12:29:45.000+08:00","promo_code":null,"promo_code_id":null,"insurance_offered":true,"total_adjustments_in_cents":136,"pre_adjusted_gross_in_cents":10900,"nett_in_cents":11036,"gross_in_cents":11036,"commission_in_cents":0,"balance_in_cents":0,"paid_in_cents":11036,"surcharge_in_cents":136,"deposit_in_cents":11036,"web_site":{"id":2,"name":"SeaLink
69
+ Rottnest","created_at":"2017-08-08T09:32:56.000+08:00","updated_at":"2017-08-08T09:32:56.000+08:00","access_key":"46eff490c163bad418569bf990214f798df8533fea29f0efb75ff0da10865109","manager_id":4,"letterhead_id":1},"web_site_name":"SeaLink
70
+ Rottnest","deposit_relevant":false,"deposit_due_on":{"_type":"Date","_value":"2020-02-20T12:11:12.000+08:00"},"balance_due_on":{"_type":"Date","_value":"2020-02-20T12:11:12.000+08:00"},"due":true,"first_travel_date":{"_type":"Date","_value":"2020-02-21"},"last_travel_date":{"_type":"Date","_value":"2020-02-21"},"complete":true,"reason_not_complete":"","first_reason_not_complete":"","unprintable_luggage_tags":false,"ttlseconds":null,"expires_from":"2020-02-20T12:39:21.289+08:00","discardable_in":-600,"inactivatable_in":-600,"notices":{},"client":null,"passenger_ids":[1101379],"vehicle_ids":[],"reservation_ids":[898357,898358],"adjustment_ids":[],"todo_items":[],"confirmation_requests":[],"passengers_attributes":[{"id":1101379,"title":"Mr","first_name":"John","last_name":"Smith","passenger_type_id":1,"age":null,"gender":"Male","position":1,"driver_uid":null,"booking_id":333536}],"vehicles_attributes":[],"reservations_attributes":[{"id":898357,"booking_id":333536,"description":"The
71
+ ''Quokka 1'', is a 400 passenger Enviro-Cat vessel that runs less fuel per
72
+ passenger than a small four cylinder car","comment":null,"active":true,"service_ids":[106911],"resource_id":2,"quantity":null,"adjustments_attributes":[{"id":3062684,"gross_in_cents":1900,"creator":{"id":4,"name":"Web
73
+ Site Manager","age":null,"first_name":"Web Site","last_name":"Manager","title":"Mr","created_at":"2017-05-01T13:27:47.000+08:00","updated_at":"2017-10-04T09:23:21.000+08:00","notes":"","updator_id":18,"creator_id":null,"active":true,"internal_subdivision":false,"business_number":null,"business_number_type":null,"access_type":2,"gender_id":"Male","auth_id":null,"birthdate":null},"created_at":"2020-02-20T12:11:49.000+08:00","description":"Rottnest
74
+ Island Admission Fee - Adult - One Way / Return on Same Day 2019/20","adjustable_item_type":"Reservation","adjustable_item_id":898357,"adjustment_definition_id":468,"adjustment_category_id":3,"automatic":true}],"complete":true,"reason_not_complete":"","first_reason_not_complete":"","enough_time_before_travel_to_edit":true,"start_time":"2000-01-01T08:30:00.000Z","end_time":"2000-01-01T10:00:00.000Z","route":"Perth
75
+ and Fremantle to Rottnest Island","route_path":"Perth to Rottnest Island","route_id":8,"trip_id":97,"inverse_reservation_id":898358,"from_route_stop_attributes":{"id":73,"inventory_controlled":true,"route_id":8,"position":1,"created_at":"2019-10-14T08:43:51.000+08:00","updated_at":"2019-10-14T08:43:51.000+08:00","stop_id":3,"name":"Perth","code":"PERTH","address":"Pier
76
+ 3, Barrack Street Jetty, Perth, WA 6000"},"to_route_stop_attributes":{"id":75,"inventory_controlled":true,"route_id":8,"position":3,"created_at":"2019-10-14T08:43:51.000+08:00","updated_at":"2019-10-14T08:43:51.000+08:00","stop_id":2,"name":"Rottnest
77
+ Island","code":"ROTTO","address":"Main Jetty, Thomson Bay, Rottnest Island,
78
+ WA 6161"},"product_type_id":6,"itinerary_footer":false,"fare_basis_set_id":266,"manually_priced":false,"manually_assigned_fare_basis_set":false,"has_vendor":false,"has_fare_basis":true,"fare_basis_season_name":"","fare_basis_pointer_id":80,"pick_up_info":"0830:
79
+ Perth (Pier 3, Barrack Street Jetty, Perth, WA 6000)","drop_off_info":"1000:
80
+ Rottnest Island (Main Jetty, Thomson Bay, Rottnest Island, WA 6161)","selection_name":"0830
81
+ - Quokka 2 - From Perth","product_name_underscore":"ferry","resource_class_name_underscore":"ship","resource_class_name":"Ship","has_ticket_template":false,"resource_ignore_last_travel_date_offset":false,"first_travel_date":{"_type":"Date","_value":"2020-02-21"},"last_travel_date":{"_type":"Date","_value":"2020-02-21"},"durational":false,"duration":1,"span":1,"duration_units":"Days","date_start_label":"Start
82
+ Date:","date_end_label":"End Date:","expires":false,"expiry":"*NA*","has_skipped_reservation_groups":false,"editable_reservation_groups":[],"tariff_level_name":"Auto
83
+ Priced as: Rottnest Island - from 5 September 2019 - Same Day \u0026 Different
84
+ Day Return","gross_including_packaged_item_in_cents":6400,"pre_adjusted_gross_including_packaged_item_in_cents":4500,"gross_in_cents":6400,"pre_adjusted_gross_in_cents":4500,"pre_adjusted_commission_in_cents":0,"cost_in_cents":0,"sub_items_gross_in_cents":0,"rules":[{"unique_name":"Rottnest
85
+ Island Admission Fee - Same Day Return from 1 July 2019 (Not commissionable)","description":"Rottnest
86
+ Island Admission Fee (only charged when arriving on Rottnest Island, not when
87
+ departing)","display_name":"Rottnest Island Admission Fee - Same Day Return
88
+ from 1 July 2019 (Not commissionable)"},{"unique_name":"Rottnest Island Ferry
89
+ - Same Day Return - travel from 5/9/19","description":"Rottnest Island Ferry
90
+ - Same Day Return - travel from 5/9/19","display_name":"Rottnest Island Ferry
91
+ - Same Day Return - travel from 5/9/19"}],"package":false,"sub_reservation_depth":0,"extra_pick":null,"child_resource":null,"pending_confirmation":false,"confirmation_request_fields":[],"report_reservation_changes":false,"vendor_pnr":null,"pick_up_information":null,"drop_off_information":null,"vendor_staff":null,"notes_for_vendor":null,"passenger_ids":[1101379],"passenger_splits":[{"id":7646275,"consumer_id":1101379,"consumer_splittable_id":898357,"gross_in_cents":4500,"commission_in_cents":0,"consumer_splittable_type":"Reservation","created_at":"2020-02-20T12:11:14.000+08:00","updated_at":"2020-02-20T12:11:15.000+08:00","commission_percentage":"0.0","length_multiplier":"1.0"}],"vehicle_ids":[],"vehicle_splits":[],"consumer_grosses":{"1101379":6400}},{"id":898358,"booking_id":333536,"description":"The
92
+ ''Quokka 1'', is a 400 passenger Enviro-Cat vessel that runs less fuel per
93
+ passenger than a small four cylinder car","comment":null,"active":true,"service_ids":[106912],"resource_id":2,"quantity":null,"adjustments_attributes":[],"complete":true,"reason_not_complete":"","first_reason_not_complete":"","enough_time_before_travel_to_edit":true,"start_time":"2000-01-01T16:15:00.000Z","end_time":"2000-01-01T17:45:00.000Z","route":"Rottnest
94
+ Island to Fremantle and Perth","route_path":"Rottnest Island to Perth","route_id":9,"trip_id":98,"inverse_reservation_id":898357,"from_route_stop_attributes":{"id":76,"inventory_controlled":true,"route_id":9,"position":1,"created_at":"2019-10-14T08:44:31.000+08:00","updated_at":"2019-10-14T08:44:31.000+08:00","stop_id":2,"name":"Rottnest
95
+ Island","code":"ROTTO","address":"Main Jetty, Thomson Bay, Rottnest Island,
96
+ WA 6161"},"to_route_stop_attributes":{"id":78,"inventory_controlled":true,"route_id":9,"position":3,"created_at":"2019-10-14T08:44:31.000+08:00","updated_at":"2019-10-14T08:44:31.000+08:00","stop_id":3,"name":"Perth","code":"PERTH","address":"Pier
97
+ 3, Barrack Street Jetty, Perth, WA 6000"},"product_type_id":6,"itinerary_footer":false,"fare_basis_set_id":257,"manually_priced":false,"manually_assigned_fare_basis_set":false,"has_vendor":false,"has_fare_basis":true,"fare_basis_season_name":"","fare_basis_pointer_id":81,"pick_up_info":"1615:
98
+ Rottnest Island (Main Jetty, Thomson Bay, Rottnest Island, WA 6161)","drop_off_info":"1745:
99
+ Perth (Pier 3, Barrack Street Jetty, Perth, WA 6000)","selection_name":"1615
100
+ - Quokka 2 - To Perth","product_name_underscore":"ferry","resource_class_name_underscore":"ship","resource_class_name":"Ship","has_ticket_template":false,"resource_ignore_last_travel_date_offset":false,"first_travel_date":{"_type":"Date","_value":"2020-02-21"},"last_travel_date":{"_type":"Date","_value":"2020-02-21"},"durational":false,"duration":1,"span":1,"duration_units":"Days","date_start_label":"Start
101
+ Date:","date_end_label":"End Date:","expires":false,"expiry":"*NA*","has_skipped_reservation_groups":false,"editable_reservation_groups":[],"tariff_level_name":"Auto
102
+ Priced as: Rottnest Island - from 5 September 2019 - Same Day \u0026 Different
103
+ Day Return","gross_including_packaged_item_in_cents":4500,"pre_adjusted_gross_including_packaged_item_in_cents":4500,"gross_in_cents":4500,"pre_adjusted_gross_in_cents":4500,"pre_adjusted_commission_in_cents":0,"cost_in_cents":0,"sub_items_gross_in_cents":0,"rules":[{"unique_name":"Rottnest
104
+ Island Ferry - Same Day Return - travel from 5/9/19","description":"Rottnest
105
+ Island Ferry - Same Day Return - travel from 5/9/19","display_name":"Rottnest
106
+ Island Ferry - Same Day Return - travel from 5/9/19"}],"package":false,"sub_reservation_depth":0,"extra_pick":null,"child_resource":null,"pending_confirmation":false,"confirmation_request_fields":[],"report_reservation_changes":false,"vendor_pnr":null,"pick_up_information":null,"drop_off_information":null,"vendor_staff":null,"notes_for_vendor":null,"passenger_ids":[1101379],"passenger_splits":[{"id":7646276,"consumer_id":1101379,"consumer_splittable_id":898358,"gross_in_cents":4500,"commission_in_cents":0,"consumer_splittable_type":"Reservation","created_at":"2020-02-20T12:11:14.000+08:00","updated_at":"2020-02-20T12:11:15.000+08:00","commission_percentage":"0.0","length_multiplier":"1.0"}],"vehicle_ids":[],"vehicle_splits":[],"consumer_grosses":{"1101379":4500}}],"adjustments_attributes":[],"payments_attributes":[{"id":155921,"booking_id":333536,"amount_in_cents":11036,"client_id":null,"creator_id":4,"created_at":"2020-02-20T12:29:42.000+08:00","updated_at":"2020-02-20T12:29:44.000+08:00","till_id":3,"comment":"","payment_type_id":2,"success":true,"payment_method":"credit_card","surcharge_in_cents":136,"creator_name":"Web
107
+ Site Manager"},{"id":155920,"booking_id":333536,"amount_in_cents":10900,"client_id":null,"creator_id":4,"created_at":"2020-02-20T12:22:33.000+08:00","updated_at":"2020-02-20T12:22:45.000+08:00","till_id":3,"comment":"","payment_type_id":21,"success":false,"payment_method":"poli_pay","surcharge_in_cents":0,"creator_name":"Web
108
+ Site Manager"}],"payment_types_attributes":[{"id":5,"name":"American Express","description":"Payments
109
+ made by American Express through the payment gateway.","transaction_fee":"1.25","active":true,"position":3,"comment_required":false,"created_at":"2017-08-03T10:05:26.000+08:00","updated_at":"2017-12-15T07:37:59.000+08:00","credit_card_brand":"American
110
+ Express","payment_method":"credit_card","gateway":"braintree","restrict_refunds":false,"on_account":false,"ticket_holding":false,"requires_staff":false,"internal":false,"redirect":false,"background":true,"creditlink":false,"surchargeable":true},{"id":14,"name":"MasterCard","description":"Payments
111
+ made by MasterCard through the payment gateway.","transaction_fee":"1.25","active":true,"position":4,"comment_required":false,"created_at":"2017-08-03T10:23:50.000+08:00","updated_at":"2017-12-01T02:54:42.000+08:00","credit_card_brand":"MasterCard","payment_method":"credit_card","gateway":"braintree","restrict_refunds":false,"on_account":false,"ticket_holding":false,"requires_staff":false,"internal":false,"redirect":false,"background":true,"creditlink":false,"surchargeable":true},{"id":2,"name":"Visa","description":"Payments
112
+ paid by Visa through the payment gateway","transaction_fee":"1.25","active":true,"position":5,"comment_required":false,"created_at":"2017-05-01T13:27:46.000+08:00","updated_at":"2017-12-01T02:54:45.000+08:00","credit_card_brand":"Visa","payment_method":"credit_card","gateway":"braintree","restrict_refunds":false,"on_account":false,"ticket_holding":false,"requires_staff":false,"internal":false,"redirect":false,"background":true,"creditlink":false,"surchargeable":true},{"id":21,"name":"POLiPay","description":"POLiPay
113
+ only online","transaction_fee":"0.0","active":true,"position":22,"comment_required":false,"created_at":"2017-09-27T14:39:23.000+08:00","updated_at":"2017-10-11T06:49:44.000+08:00","credit_card_brand":null,"payment_method":"poli_pay","gateway":null,"restrict_refunds":false,"on_account":false,"ticket_holding":false,"requires_staff":false,"internal":false,"redirect":true,"background":false,"creditlink":false,"surchargeable":false}],"issued_tickets_attributes":[],"creator":{"name":"Web
114
+ Site Manager","gravatar":"https://secure.gravatar.com/avatar/?secure=true\u0026gravatar=%7B%3Asize%3D%3E50%7D\u0026alt=Web%20Site%20Manager","url":"/parties/4"},"updator":{"name":"Web
115
+ Site Manager","gravatar":"https://secure.gravatar.com/avatar/?secure=true\u0026gravatar=%7B%3Asize%3D%3E50%7D\u0026alt=Web%20Site%20Manager","url":"/parties/4"},"company_creator":{"name":"Captain
116
+ Cook Cruises WA - Reservations","gravatar":"https://secure.gravatar.com/avatar/?secure=true\u0026gravatar=%7B%3Asize%3D%3E50%7D\u0026alt=Captain%20Cook%20Cruises%20WA%20-%20Reservations","url":"/parties/3"}}'
117
+ http_version:
118
+ recorded_at: Thu, 20 Feb 2020 04:49:22 GMT
119
+ recorded_with: VCR 2.9.3
@@ -5,10 +5,12 @@ http_interactions:
5
5
  uri: http://test.qt.sealink.com.au:8080/api/bookings/1.json
6
6
  body:
7
7
  encoding: UTF-8
8
- string: access_key=<QT_KEY>
8
+ string: ''
9
9
  headers:
10
10
  Content-Length:
11
11
  - '0'
12
+ X-API-KEY:
13
+ - <QT_KEY>
12
14
  response:
13
15
  status:
14
16
  code: 200
@@ -88,10 +90,12 @@ http_interactions:
88
90
  uri: http://test.qt.sealink.com.au:8080/api/bookings/1/documents.json?last_group=true&regenerate=false
89
91
  body:
90
92
  encoding: UTF-8
91
- string: access_key=<QT_KEY>
93
+ string: ''
92
94
  headers:
93
95
  Content-Length:
94
96
  - '0'
97
+ X-API-KEY:
98
+ - <QT_KEY>
95
99
  response:
96
100
  status:
97
101
  code: 200
@@ -5,10 +5,12 @@ http_interactions:
5
5
  uri: http://test.qt.sealink.com.au:8080/api/bookings/1.json
6
6
  body:
7
7
  encoding: UTF-8
8
- string: access_key=<QT_KEY>
8
+ string: ''
9
9
  headers:
10
10
  Content-Length:
11
11
  - '0'
12
+ X-API-KEY:
13
+ - <QT_KEY>
12
14
  response:
13
15
  status:
14
16
  code: 200
@@ -88,10 +90,12 @@ http_interactions:
88
90
  uri: http://test.qt.sealink.com.au:8080/api/bookings/1/update_with_nested_attributes.json
89
91
  body:
90
92
  encoding: UTF-8
91
- string: booking[customer_contact_name]=New%20Name&booking[consumers][][id]=1&booking[consumers][][title]=Mr&booking[consumers][][first_name]=New&booking[consumers][][last_name]=Name&access_key=<QT_KEY>
93
+ string: booking[customer_contact_name]=New%20Name&booking[consumers][][id]=1&booking[consumers][][title]=Mr&booking[consumers][][first_name]=New&booking[consumers][][last_name]=Name
92
94
  headers:
93
95
  Content-Length:
94
96
  - '0'
97
+ X-API-KEY:
98
+ - <QT_KEY>
95
99
  response:
96
100
  status:
97
101
  code: 200
@@ -144,10 +148,12 @@ http_interactions:
144
148
  uri: http://test.qt.sealink.com.au:8080/api/bookings/1.json
145
149
  body:
146
150
  encoding: UTF-8
147
- string: access_key=<QT_KEY>
151
+ string: ''
148
152
  headers:
149
153
  Content-Length:
150
154
  - '0'
155
+ X-API-KEY:
156
+ - <QT_KEY>
151
157
  response:
152
158
  status:
153
159
  code: 200