quicktravel_client 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/lib/quick_travel/adapter.rb +2 -1
- data/lib/quick_travel/address.rb +3 -0
- data/lib/quick_travel/product_type.rb +4 -4
- data/lib/quick_travel/products/base.rb +21 -0
- data/lib/quick_travel/products/scheduled_trip.rb +30 -0
- data/lib/quick_travel/resource_category.rb +8 -0
- data/lib/quick_travel/version.rb +1 -1
- data/lib/quick_travel.rb +3 -0
- data/quicktravel_client.gemspec +1 -0
- data/spec/product_type_spec.rb +37 -1
- data/spec/products/scheduled_trip_spec.rb +77 -0
- data/spec/resource_category_spec.rb +38 -0
- data/spec/support/cassettes/basic_product_scheduled_trips.yml +81 -0
- data/spec/support/cassettes/basic_product_scheduled_trips_multi_sector.yml +83 -0
- data/spec/support/cassettes/basic_product_scheduled_trips_unbookable.yml +61 -0
- data/spec/support/cassettes/product_type_resource_categories.yml +61 -0
- data/spec/support/cassettes/product_type_resource_categories_tickets.yml +62 -0
- data/spec/support/cassettes/product_type_routes.yml +65 -0
- data/spec/support/cassettes/resource_category_all.yml +62 -0
- data/spec/support/cassettes/resource_category_all_for_product_type_8.yml +61 -0
- data/spec/support/coverage_loader.rb +1 -1
- metadata +25 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a9774dc105f1e21dc676c4060db83a76948fa23
|
4
|
+
data.tar.gz: cbf14887c78b49f66204f0d1ea59f366b913d368
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 781a93b8099cf7670dacb078671d71162552f9fb673d683923e69001f0420a4bda1fd9d95f91502d027e459443d075fe6fbc5f9d130d03e9ce85b07577c0e9db
|
7
|
+
data.tar.gz: 31f516468e15eb1f0e043c5c00ffb07ab14657de943bf3ac8bb79661bba595dd13dfb5a1664360a166ce751ebb2df988b085f5df09951e0b78018c424d4e50e6
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,11 @@ 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.1.0] - 2016-04-13
|
7
|
+
### Added
|
8
|
+
- Resource categories
|
9
|
+
- Products
|
10
|
+
|
6
11
|
## [2.0.0] - 2016-04-08
|
7
12
|
### Added
|
8
13
|
- This changelog
|
@@ -33,4 +38,4 @@ This changelog adheres to [Keep a CHANGELOG](http://keepachangelog.com/).
|
|
33
38
|
- Fixed conflict between active_support and facets underscore method
|
34
39
|
|
35
40
|
## [1.0.0] - 2015-03-03
|
36
|
-
- Initial public release
|
41
|
+
- Initial public release
|
data/lib/quick_travel/adapter.rb
CHANGED
@@ -53,7 +53,8 @@ module QuickTravel
|
|
53
53
|
|
54
54
|
def self.all(opts = {})
|
55
55
|
if lookup
|
56
|
-
|
56
|
+
cache_name = ["#{name}.all-attrs", opts.to_param].reject(&:blank?).join('?')
|
57
|
+
find_all!("#{api_base}.json", opts.merge(cache: cache_name))
|
57
58
|
else
|
58
59
|
find_all!("#{api_base}.json", opts)
|
59
60
|
end
|
data/lib/quick_travel/address.rb
CHANGED
@@ -7,6 +7,9 @@ module QuickTravel
|
|
7
7
|
QuickTravel::Country.find(@country_id).name
|
8
8
|
end
|
9
9
|
|
10
|
+
# TODO: Remove this method
|
11
|
+
# Geokit is a dependency and ONLY used here
|
12
|
+
# This function should be done outside this gem
|
10
13
|
def geocode
|
11
14
|
@_geocode ||= QuickTravel::Cache.cache("geocode_#{self}") {
|
12
15
|
Geokit::Geocoders::MultiGeocoder.geocode(to_s)
|
@@ -5,12 +5,12 @@ module QuickTravel
|
|
5
5
|
self.api_base = '/api/product_types'
|
6
6
|
self.lookup = true
|
7
7
|
|
8
|
-
def route
|
9
|
-
Route.first(id)
|
10
|
-
end
|
11
|
-
|
12
8
|
def routes
|
13
9
|
Route.all(id)
|
14
10
|
end
|
11
|
+
|
12
|
+
def resource_categories
|
13
|
+
ResourceCategory.all(product_type_ids: [id])
|
14
|
+
end
|
15
15
|
end
|
16
16
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'quick_travel/adapter'
|
2
|
+
|
3
|
+
module QuickTravel
|
4
|
+
module Products
|
5
|
+
class Base < Adapter
|
6
|
+
def normally_bookable?
|
7
|
+
bookable || exception_type == 'inventory'
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.find(search_params = {})
|
11
|
+
find_for_type(@reservation_for_type, search_params)
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.find_for_type(type, search_params = {})
|
15
|
+
url = "/reservation_for/#{type}/find_services_for.json"
|
16
|
+
product_maps = post_and_validate(url, search_params)
|
17
|
+
product_maps.map { |product_map| new(product_map) }
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'quick_travel/adapter'
|
2
|
+
require 'quick_travel/products/base'
|
3
|
+
|
4
|
+
module QuickTravel
|
5
|
+
module Products
|
6
|
+
class ScheduledTrip < Base
|
7
|
+
@reservation_for_type = :scheduled_trips
|
8
|
+
|
9
|
+
def to_route_stop
|
10
|
+
RouteStop.new(@to_route_stop_attributes) if @to_route_stop_attributes
|
11
|
+
end
|
12
|
+
|
13
|
+
def from_route_stop
|
14
|
+
RouteStop.new(@from_route_stop_attributes) if @from_route_stop_attributes
|
15
|
+
end
|
16
|
+
|
17
|
+
def from_route_stop_id
|
18
|
+
return nil if from_route_stop.nil?
|
19
|
+
|
20
|
+
from_route_stop.id
|
21
|
+
end
|
22
|
+
|
23
|
+
def to_route_stop_id
|
24
|
+
return nil if to_route_stop.nil?
|
25
|
+
|
26
|
+
to_route_stop.id
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/lib/quick_travel/version.rb
CHANGED
data/lib/quick_travel.rb
CHANGED
@@ -17,6 +17,8 @@ module QuickTravel
|
|
17
17
|
|
18
18
|
require 'quick_travel/product'
|
19
19
|
require 'quick_travel/product_configuration'
|
20
|
+
require 'quick_travel/products/base'
|
21
|
+
require 'quick_travel/products/scheduled_trip'
|
20
22
|
require 'quick_travel/search'
|
21
23
|
|
22
24
|
# QuickTravel models
|
@@ -48,6 +50,7 @@ module QuickTravel
|
|
48
50
|
require 'quick_travel/region'
|
49
51
|
require 'quick_travel/reservation'
|
50
52
|
require 'quick_travel/resource'
|
53
|
+
require 'quick_travel/resource_category'
|
51
54
|
require 'quick_travel/room_facility'
|
52
55
|
require 'quick_travel/route_stop'
|
53
56
|
require 'quick_travel/service'
|
data/quicktravel_client.gemspec
CHANGED
@@ -17,6 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.require_paths = ['lib']
|
18
18
|
|
19
19
|
spec.add_dependency 'httparty'
|
20
|
+
# Geokit dependency should be removed (see address.rb for details)
|
20
21
|
spec.add_dependency 'geokit', '~> 1.8.3' # used in address model
|
21
22
|
spec.add_dependency 'activesupport', '>= 2.0.0'
|
22
23
|
spec.add_dependency 'facets'
|
data/spec/product_type_spec.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
require 'quick_travel/product_type'
|
3
|
+
require 'quick_travel/resource_category'
|
3
4
|
|
4
5
|
describe QuickTravel::ProductType do
|
5
6
|
context '#all' do
|
@@ -11,9 +12,44 @@ describe QuickTravel::ProductType do
|
|
11
12
|
its(:length) { should == 8 }
|
12
13
|
|
13
14
|
context 'first element' do
|
14
|
-
subject { all.first }
|
15
|
+
subject(:ferry) { all.first }
|
15
16
|
its(:class) { should == QuickTravel::ProductType }
|
16
17
|
its(:name) { should == 'Ferry' }
|
18
|
+
|
19
|
+
context '#resource_category_ids' do
|
20
|
+
subject {
|
21
|
+
VCR.use_cassette 'product_type_resource_categories' do
|
22
|
+
ferry.resource_categories
|
23
|
+
end
|
24
|
+
}
|
25
|
+
its(:size) { should eq 0 }
|
26
|
+
end
|
27
|
+
|
28
|
+
context '#routes' do
|
29
|
+
subject {
|
30
|
+
VCR.use_cassette 'product_type_routes' do
|
31
|
+
ferry.routes
|
32
|
+
end
|
33
|
+
}
|
34
|
+
its(:size) { should eq 2 }
|
35
|
+
its('first.name') { should eq 'To Kangaroo Island' }
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context 'tickets product type' do
|
40
|
+
subject(:tickets) {
|
41
|
+
all.detect { |product_type| product_type.name == 'Ticket' }
|
42
|
+
}
|
43
|
+
|
44
|
+
context '#resource_category_ids' do
|
45
|
+
subject {
|
46
|
+
VCR.use_cassette 'product_type_resource_categories_tickets' do
|
47
|
+
tickets.resource_categories
|
48
|
+
end
|
49
|
+
}
|
50
|
+
its(:size) { should eq 2 }
|
51
|
+
its('first.name') { should eq 'Common' }
|
52
|
+
end
|
17
53
|
end
|
18
54
|
end
|
19
55
|
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'quick_travel/products/scheduled_trip'
|
3
|
+
|
4
|
+
describe QuickTravel::Products::ScheduledTrip do
|
5
|
+
let(:params) {
|
6
|
+
{
|
7
|
+
product_type_id: 1,
|
8
|
+
route_id: 1,
|
9
|
+
forward: {
|
10
|
+
first_travel_date: date,
|
11
|
+
passenger_types: { '1' => '2' } # 2 adults
|
12
|
+
}
|
13
|
+
}
|
14
|
+
}
|
15
|
+
let(:date) { '2016-03-01' }
|
16
|
+
subject(:products) {
|
17
|
+
VCR.use_cassette 'basic_product_scheduled_trips' do
|
18
|
+
QuickTravel::Products::ScheduledTrip.find(params)
|
19
|
+
end
|
20
|
+
}
|
21
|
+
|
22
|
+
its(:size) { should == 4 }
|
23
|
+
|
24
|
+
context 'first product' do
|
25
|
+
subject(:product) { products.first }
|
26
|
+
|
27
|
+
it { should be_normally_bookable }
|
28
|
+
its(:price) { should eq 40.to_money }
|
29
|
+
its(:from_route_stop) { should be nil }
|
30
|
+
its(:to_route_stop) { should be nil }
|
31
|
+
end
|
32
|
+
|
33
|
+
context 'when date has no services' do
|
34
|
+
subject(:unbookable_products) {
|
35
|
+
VCR.use_cassette 'basic_product_scheduled_trips_unbookable' do
|
36
|
+
QuickTravel::Products::ScheduledTrip.find(params)
|
37
|
+
end
|
38
|
+
}
|
39
|
+
let(:date) { '2016-03-03' }
|
40
|
+
|
41
|
+
it { should be_empty }
|
42
|
+
end
|
43
|
+
|
44
|
+
context 'multi sector' do
|
45
|
+
let(:params) {
|
46
|
+
{
|
47
|
+
product_type_id: 6,
|
48
|
+
route_id: 3,
|
49
|
+
forward: {
|
50
|
+
first_travel_date: date,
|
51
|
+
from_route_stop_id: 5,
|
52
|
+
to_route_stop_id: 14,
|
53
|
+
passenger_types: { '1' => '2' } # 2 adults
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
let(:date) { '2016-03-01' }
|
58
|
+
subject(:products) {
|
59
|
+
VCR.use_cassette 'basic_product_scheduled_trips_multi_sector' do
|
60
|
+
QuickTravel::Products::ScheduledTrip.find(params)
|
61
|
+
end
|
62
|
+
}
|
63
|
+
|
64
|
+
its(:size) { should == 2 }
|
65
|
+
|
66
|
+
context 'first product' do
|
67
|
+
subject(:product) { products.first }
|
68
|
+
|
69
|
+
it { should be_normally_bookable }
|
70
|
+
its(:price) { should eq 30.to_money }
|
71
|
+
its('from_route_stop.name') { should eq 'Adelaide Central Bus Station' }
|
72
|
+
its('to_route_stop.name') { should eq 'Cape Jervis Ferry Terminal' }
|
73
|
+
its(:from_route_stop_id) { should eq 5 }
|
74
|
+
its(:to_route_stop_id) { should eq 14 }
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'quick_travel/resource_category'
|
3
|
+
|
4
|
+
describe QuickTravel::ResourceCategory do
|
5
|
+
context '#all' do
|
6
|
+
subject(:all) do
|
7
|
+
VCR.use_cassette('resource_category_all') {
|
8
|
+
QuickTravel::ResourceCategory.all
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
its(:class) { should == Array }
|
13
|
+
its(:length) { should == 4 }
|
14
|
+
|
15
|
+
context 'first element' do
|
16
|
+
subject { all.first }
|
17
|
+
its(:class) { should == QuickTravel::ResourceCategory }
|
18
|
+
its(:name) { should == 'Common' }
|
19
|
+
end
|
20
|
+
|
21
|
+
context 'when filtering a product type' do
|
22
|
+
subject(:all_for_product_type) do
|
23
|
+
VCR.use_cassette('resource_category_all_for_product_type_8') {
|
24
|
+
QuickTravel::ResourceCategory.all(product_type_ids: [8])
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
its(:class) { should == Array }
|
29
|
+
its(:length) { should == 2 }
|
30
|
+
|
31
|
+
context 'first element' do
|
32
|
+
subject { all_for_product_type.first }
|
33
|
+
its(:class) { should == QuickTravel::ResourceCategory }
|
34
|
+
its(:name) { should == 'General' }
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,81 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://test.qt.sealink.com.au:8080/reservation_for/scheduled_trips/find_services_for.json
|
6
|
+
body:
|
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>
|
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
|
+
- '"3614f3be3466aaf7133ac72313babb3d"'
|
35
|
+
Cache-Control:
|
36
|
+
- max-age=0, private, must-revalidate
|
37
|
+
X-Request-Id:
|
38
|
+
- 91d524692c087648a1441c481cb68a75
|
39
|
+
X-Runtime:
|
40
|
+
- '0.248636'
|
41
|
+
Vary:
|
42
|
+
- Origin
|
43
|
+
Date:
|
44
|
+
- Thu, 28 Feb 2013 13:58:07 GMT
|
45
|
+
X-Rack-Cache:
|
46
|
+
- invalidate, pass
|
47
|
+
Server:
|
48
|
+
- WEBrick/1.3.1 (Ruby/2.2.4/2015-12-16)
|
49
|
+
Content-Length:
|
50
|
+
- '5528'
|
51
|
+
Connection:
|
52
|
+
- Keep-Alive
|
53
|
+
Set-Cookie:
|
54
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJTU5NWIxODhiOGRmODZjZWQ2ODVkNjdlMTYxYjZhNjgzBjsAVEkiCXVzZXIGOwBGaQY%3D--488a6a29ce9432df25900b3453a9f87ede1651f9;
|
55
|
+
path=/; HttpOnly
|
56
|
+
body:
|
57
|
+
encoding: UTF-8
|
58
|
+
string: '[{"product_id":"1","product_id_field":"trip_id","resource_id":1,"resource_class_name_underscore":"ship","product_name_underscore":"ferry","tariff_level_id":1,"service_ids":[9],"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":"","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":4000,"total_price_adjustment_in_cents":0,"selection_name":"06:00am
|
60
|
+
- KI Ferry","input_disabled":"","input_overbook":"","formatted_price":"\u003Cspan
|
61
|
+
class=\"money positive\"\u003E$40.00\u003C/span\u003E","price":"$40.00","formatted_pre_adjusted_price":"\u003Cspan
|
62
|
+
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
|
63
|
+
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":1,"stop_departure_time":"2000-01-01T06:00:00Z","stop_arrival_time":"2000-01-01T06:45:00Z","from_route_stop_attributes":null,"to_route_stop_attributes":null,"departure_time":"2000-01-01T06:00:00Z","arrival_time":"2000-01-01T06:45:00Z"},{"product_id":"2","product_id_field":"trip_id","resource_id":1,"resource_class_name_underscore":"ship","product_name_underscore":"ferry","tariff_level_id":1,"service_ids":[10],"first_travel_date":"01-03-2016","last_travel_date":"01-03-2016","time_class":"","exception_type":null,"bookable_class":"
|
64
|
+
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":4000,"total_price_adjustment_in_cents":0,"selection_name":"09:00am
|
65
|
+
- KI Ferry","input_disabled":"","input_overbook":"","formatted_price":"\u003Cspan
|
66
|
+
class=\"money positive\"\u003E$40.00\u003C/span\u003E","price":"$40.00","formatted_pre_adjusted_price":"\u003Cspan
|
67
|
+
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
|
68
|
+
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":2,"stop_departure_time":"2000-01-01T09:00:00Z","stop_arrival_time":"2000-01-01T09:45:00Z","from_route_stop_attributes":null,"to_route_stop_attributes":null,"departure_time":"2000-01-01T09:00:00Z","arrival_time":"2000-01-01T09:45:00Z"},{"product_id":"5","product_id_field":"trip_id","resource_id":1,"resource_class_name_underscore":"ship","product_name_underscore":"ferry","tariff_level_id":1,"service_ids":[13],"first_travel_date":"01-03-2016","last_travel_date":"01-03-2016","time_class":"","exception_type":null,"bookable_class":"
|
69
|
+
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":4000,"total_price_adjustment_in_cents":0,"selection_name":"06:00pm
|
70
|
+
- KI Ferry","input_disabled":"","input_overbook":"","formatted_price":"\u003Cspan
|
71
|
+
class=\"money positive\"\u003E$40.00\u003C/span\u003E","price":"$40.00","formatted_pre_adjusted_price":"\u003Cspan
|
72
|
+
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
|
73
|
+
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":5,"stop_departure_time":"2000-01-01T18:00:00Z","stop_arrival_time":"2000-01-01T18:45:00Z","from_route_stop_attributes":null,"to_route_stop_attributes":null,"departure_time":"2000-01-01T18:00:00Z","arrival_time":"2000-01-01T18:45:00Z"},{"product_id":"6","product_id_field":"trip_id","resource_id":1,"resource_class_name_underscore":"ship","product_name_underscore":"ferry","tariff_level_id":1,"service_ids":[14],"first_travel_date":"01-03-2016","last_travel_date":"01-03-2016","time_class":"","exception_type":null,"bookable_class":"
|
74
|
+
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":4000,"total_price_adjustment_in_cents":0,"selection_name":"09:00pm
|
75
|
+
- KI Ferry","input_disabled":"","input_overbook":"","formatted_price":"\u003Cspan
|
76
|
+
class=\"money positive\"\u003E$40.00\u003C/span\u003E","price":"$40.00","formatted_pre_adjusted_price":"\u003Cspan
|
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
|
+
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
|
+
http_version:
|
80
|
+
recorded_at: Tue, 12 Apr 2016 06:41:39 GMT
|
81
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,83 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://test.qt.sealink.com.au:8080/reservation_for/scheduled_trips/find_services_for.json
|
6
|
+
body:
|
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>
|
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
|
+
- '"cd3d11993df18b66625a3215b62b1895"'
|
35
|
+
Cache-Control:
|
36
|
+
- max-age=0, private, must-revalidate
|
37
|
+
X-Request-Id:
|
38
|
+
- b71587c0c43e33d5d56d7520b92cec6b
|
39
|
+
X-Runtime:
|
40
|
+
- '0.203403'
|
41
|
+
Vary:
|
42
|
+
- Origin
|
43
|
+
Date:
|
44
|
+
- Thu, 28 Feb 2013 13:58:07 GMT
|
45
|
+
X-Rack-Cache:
|
46
|
+
- invalidate, pass
|
47
|
+
Server:
|
48
|
+
- WEBrick/1.3.1 (Ruby/2.2.4/2015-12-16)
|
49
|
+
Content-Length:
|
50
|
+
- '4201'
|
51
|
+
Connection:
|
52
|
+
- Keep-Alive
|
53
|
+
Set-Cookie:
|
54
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJTcyNWE1ZmU1NWVhMGEyMDBkNmRhNGU5YTliOGI0YjExBjsAVEkiCXVzZXIGOwBGaQY%3D--6b64f5c2f1d5328ed9b3aa3a6153b965bbc329b7;
|
55
|
+
path=/; HttpOnly
|
56
|
+
body:
|
57
|
+
encoding: UTF-8
|
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
|
62
|
+
- Ferry ConnectionDeparting Adelaide - AM","input_disabled":"","input_overbook":"","formatted_price":"\u003Cspan
|
63
|
+
class=\"money positive\"\u003E$30.00\u003C/span\u003E","price":"$30.00","formatted_pre_adjusted_price":"\u003Cspan
|
64
|
+
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
|
73
|
+
- Ferry ConnectionDeparting Adelaide - PM","input_disabled":"","input_overbook":"","formatted_price":"\u003Cspan
|
74
|
+
class=\"money positive\"\u003E$30.00\u003C/span\u003E","price":"$30.00","formatted_pre_adjusted_price":"\u003Cspan
|
75
|
+
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"}]'
|
81
|
+
http_version:
|
82
|
+
recorded_at: Tue, 12 Apr 2016 06:41:39 GMT
|
83
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,61 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://test.qt.sealink.com.au:8080/reservation_for/scheduled_trips/find_services_for.json
|
6
|
+
body:
|
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>
|
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
|
+
- '"d751713988987e9331980363e24189ce"'
|
35
|
+
Cache-Control:
|
36
|
+
- max-age=0, private, must-revalidate
|
37
|
+
X-Request-Id:
|
38
|
+
- c68d0834907d70a16dcd7b8df889ab15
|
39
|
+
X-Runtime:
|
40
|
+
- '0.067009'
|
41
|
+
Vary:
|
42
|
+
- Origin
|
43
|
+
Date:
|
44
|
+
- Thu, 28 Feb 2013 13:58:07 GMT
|
45
|
+
X-Rack-Cache:
|
46
|
+
- invalidate, pass
|
47
|
+
Server:
|
48
|
+
- WEBrick/1.3.1 (Ruby/2.2.4/2015-12-16)
|
49
|
+
Content-Length:
|
50
|
+
- '2'
|
51
|
+
Connection:
|
52
|
+
- Keep-Alive
|
53
|
+
Set-Cookie:
|
54
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJWFmYWI2YzYzMmNhNDdkNzNmNzE2NGRhODQyYzYxODIxBjsAVEkiCXVzZXIGOwBGaQY%3D--aa8c65e373d1ace4e5fc10e86602b065c157896e;
|
55
|
+
path=/; HttpOnly
|
56
|
+
body:
|
57
|
+
encoding: UTF-8
|
58
|
+
string: "[]"
|
59
|
+
http_version:
|
60
|
+
recorded_at: Tue, 12 Apr 2016 06:41:39 GMT
|
61
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,61 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://test.qt.sealink.com.au:8080/api/resource_categories.json?product_type_ids%5B%5D=1
|
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
|
33
|
+
Etag:
|
34
|
+
- '"d751713988987e9331980363e24189ce"'
|
35
|
+
Cache-Control:
|
36
|
+
- max-age=0, private, must-revalidate
|
37
|
+
X-Request-Id:
|
38
|
+
- da10c21b9e6ec00d6e634342051985a5
|
39
|
+
X-Runtime:
|
40
|
+
- '0.284083'
|
41
|
+
Vary:
|
42
|
+
- Origin
|
43
|
+
Date:
|
44
|
+
- Mon, 11 Apr 2016 02:11:22 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
|
+
- '2'
|
51
|
+
Connection:
|
52
|
+
- Keep-Alive
|
53
|
+
Set-Cookie:
|
54
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJWY0MGFlMmFiYTllYjliOWNhZWZmZDNlYjIyMzgxYWQ5BjsAVEkiCXVzZXIGOwBGaQY%3D--f0c739c517c26c0b6262b1546068d68cda8618b0;
|
55
|
+
path=/; HttpOnly
|
56
|
+
body:
|
57
|
+
encoding: UTF-8
|
58
|
+
string: "[]"
|
59
|
+
http_version:
|
60
|
+
recorded_at: Mon, 11 Apr 2016 02:11:22 GMT
|
61
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,62 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://test.qt.sealink.com.au:8080/api/resource_categories.json?product_type_ids%5B%5D=5
|
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
|
33
|
+
Etag:
|
34
|
+
- '"d1fd940d0166dbb4832b5f5171b67a60"'
|
35
|
+
Cache-Control:
|
36
|
+
- max-age=0, private, must-revalidate
|
37
|
+
X-Request-Id:
|
38
|
+
- 3be162994c1bcd93524db78136e6d0e4
|
39
|
+
X-Runtime:
|
40
|
+
- '0.064377'
|
41
|
+
Vary:
|
42
|
+
- Origin
|
43
|
+
Date:
|
44
|
+
- Mon, 11 Apr 2016 02:11:22 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
|
+
- '328'
|
51
|
+
Connection:
|
52
|
+
- Keep-Alive
|
53
|
+
Set-Cookie:
|
54
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJWUxOTVjOWUyNTZkMTJkYTAwMzNiYmM1ZjA5NDIwNTQwBjsAVEkiCXVzZXIGOwBGaQY%3D--2dda84b1c17cbc709600df56f5ee1794e0ee5fe9;
|
55
|
+
path=/; HttpOnly
|
56
|
+
body:
|
57
|
+
encoding: UTF-8
|
58
|
+
string: '[{"created_at":"2015-08-25T14:14:25+09:30","description":"","id":1,"name":"Common","position":null,"product_type_id":5,"updated_at":"2015-08-25T14:14:25+09:30"},{"created_at":"2015-08-25T14:14:50+09:30","description":"","id":2,"name":"Multiple
|
59
|
+
Trip","position":null,"product_type_id":5,"updated_at":"2015-08-25T14:14:50+09:30"}]'
|
60
|
+
http_version:
|
61
|
+
recorded_at: Mon, 11 Apr 2016 02:11:22 GMT
|
62
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,65 @@
|
|
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
|
33
|
+
Etag:
|
34
|
+
- '"2d8100d816a9ad65d0a2e3e9191fed41"'
|
35
|
+
Cache-Control:
|
36
|
+
- max-age=0, private, must-revalidate
|
37
|
+
X-Request-Id:
|
38
|
+
- 0e12f505a73e6b6edca1c8ca37b75f8d
|
39
|
+
X-Runtime:
|
40
|
+
- '0.072749'
|
41
|
+
Vary:
|
42
|
+
- Origin
|
43
|
+
Date:
|
44
|
+
- Mon, 11 Apr 2016 02:05:37 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
|
+
- '1249'
|
51
|
+
Connection:
|
52
|
+
- Keep-Alive
|
53
|
+
Set-Cookie:
|
54
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJTFkZjYzYTNjOGIyMzcyMTZlYTFjNmVjOTc5YzAxYzRkBjsAVEkiCXVzZXIGOwBGaQY%3D--0a0b632fa75e54e9bc37d292ab8bc2a17704536f;
|
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","stop_id":1},{"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","stop_id":2}]},{"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","stop_id":2},{"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","stop_id":1}]}]'
|
63
|
+
http_version:
|
64
|
+
recorded_at: Mon, 11 Apr 2016 02:05:37 GMT
|
65
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,62 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://test.qt.sealink.com.au:8080/api/resource_categories.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
|
33
|
+
Etag:
|
34
|
+
- '"6a08ce333252422c798300df8367be5a"'
|
35
|
+
Cache-Control:
|
36
|
+
- max-age=0, private, must-revalidate
|
37
|
+
X-Request-Id:
|
38
|
+
- 9267b96fc14d8b475734db66fd4f1af3
|
39
|
+
X-Runtime:
|
40
|
+
- '0.062795'
|
41
|
+
Vary:
|
42
|
+
- Origin
|
43
|
+
Date:
|
44
|
+
- Mon, 11 Apr 2016 02:11:23 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
|
+
- '650'
|
51
|
+
Connection:
|
52
|
+
- Keep-Alive
|
53
|
+
Set-Cookie:
|
54
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJTczNTA1NDNlMmIxYzkyYTRiMDhlOWRhNGFhMzY4ODNlBjsAVEkiCXVzZXIGOwBGaQY%3D--abb354405fc05964e610c82e93aa942ae37c1b63;
|
55
|
+
path=/; HttpOnly
|
56
|
+
body:
|
57
|
+
encoding: UTF-8
|
58
|
+
string: '[{"created_at":"2015-08-25T14:14:25+09:30","description":"","id":1,"name":"Common","position":null,"product_type_id":5,"updated_at":"2015-08-25T14:14:25+09:30"},{"created_at":"2015-08-25T14:14:50+09:30","description":"","id":2,"name":"Multiple
|
59
|
+
Trip","position":null,"product_type_id":5,"updated_at":"2015-08-25T14:14:50+09:30"},{"created_at":"2015-08-25T15:11:16+09:30","description":"","id":3,"name":"General","position":null,"product_type_id":8,"updated_at":"2015-08-25T15:11:16+09:30"},{"created_at":"2015-08-25T15:11:28+09:30","description":"","id":4,"name":"Muzzles","position":null,"product_type_id":8,"updated_at":"2015-08-25T15:11:28+09:30"}]'
|
60
|
+
http_version:
|
61
|
+
recorded_at: Mon, 11 Apr 2016 02:11:23 GMT
|
62
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,61 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://test.qt.sealink.com.au:8080/api/resource_categories.json?product_type_ids%5B%5D=8
|
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
|
33
|
+
Etag:
|
34
|
+
- '"ad47d06108ac00a1dde480369a551084"'
|
35
|
+
Cache-Control:
|
36
|
+
- max-age=0, private, must-revalidate
|
37
|
+
X-Request-Id:
|
38
|
+
- c27ad890639b172d9d36d4664d40bc4f
|
39
|
+
X-Runtime:
|
40
|
+
- '0.063613'
|
41
|
+
Vary:
|
42
|
+
- Origin
|
43
|
+
Date:
|
44
|
+
- Mon, 11 Apr 2016 02:11:23 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
|
+
- '323'
|
51
|
+
Connection:
|
52
|
+
- Keep-Alive
|
53
|
+
Set-Cookie:
|
54
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJTQxYzY0YzAwNjQwNmJlMTJhMDQ4MzkyNmRjNzQzMWYyBjsAVEkiCXVzZXIGOwBGaQY%3D--62155a212c211b0f29dbcdb6b1b7f552a10eef2f;
|
55
|
+
path=/; HttpOnly
|
56
|
+
body:
|
57
|
+
encoding: UTF-8
|
58
|
+
string: '[{"created_at":"2015-08-25T15:11:16+09:30","description":"","id":3,"name":"General","position":null,"product_type_id":8,"updated_at":"2015-08-25T15:11:16+09:30"},{"created_at":"2015-08-25T15:11:28+09:30","description":"","id":4,"name":"Muzzles","position":null,"product_type_id":8,"updated_at":"2015-08-25T15:11:28+09:30"}]'
|
59
|
+
http_version:
|
60
|
+
recorded_at: Mon, 11 Apr 2016 02:11:23 GMT
|
61
|
+
recorded_with: VCR 3.0.1
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quicktravel_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Noack
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-04-
|
13
|
+
date: 2016-04-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: httparty
|
@@ -319,12 +319,15 @@ files:
|
|
319
319
|
- lib/quick_travel/product_configuration.rb
|
320
320
|
- lib/quick_travel/product_passenger_search_criteria.rb
|
321
321
|
- lib/quick_travel/product_type.rb
|
322
|
+
- lib/quick_travel/products/base.rb
|
323
|
+
- lib/quick_travel/products/scheduled_trip.rb
|
322
324
|
- lib/quick_travel/property.rb
|
323
325
|
- lib/quick_travel/property_facility.rb
|
324
326
|
- lib/quick_travel/property_type.rb
|
325
327
|
- lib/quick_travel/region.rb
|
326
328
|
- lib/quick_travel/reservation.rb
|
327
329
|
- lib/quick_travel/resource.rb
|
330
|
+
- lib/quick_travel/resource_category.rb
|
328
331
|
- lib/quick_travel/room_facility.rb
|
329
332
|
- lib/quick_travel/route.rb
|
330
333
|
- lib/quick_travel/route_stop.rb
|
@@ -345,13 +348,18 @@ files:
|
|
345
348
|
- spec/payment_type_spec.rb
|
346
349
|
- spec/product_spec.rb
|
347
350
|
- spec/product_type_spec.rb
|
351
|
+
- spec/products/scheduled_trip_spec.rb
|
348
352
|
- spec/property_spec.rb
|
349
353
|
- spec/region_spec.rb
|
350
354
|
- spec/reservation_spec.rb
|
355
|
+
- spec/resource_category_spec.rb
|
351
356
|
- spec/resource_spec.rb
|
352
357
|
- spec/route_spec.rb
|
353
358
|
- spec/spec_helper.rb
|
354
359
|
- spec/status_spec.rb
|
360
|
+
- spec/support/cassettes/basic_product_scheduled_trips.yml
|
361
|
+
- spec/support/cassettes/basic_product_scheduled_trips_multi_sector.yml
|
362
|
+
- spec/support/cassettes/basic_product_scheduled_trips_unbookable.yml
|
355
363
|
- spec/support/cassettes/booking_create.yml
|
356
364
|
- spec/support/cassettes/booking_documents.yml
|
357
365
|
- spec/support/cassettes/booking_price_changes.yml
|
@@ -370,9 +378,14 @@ files:
|
|
370
378
|
- spec/support/cassettes/product_show.yml
|
371
379
|
- spec/support/cassettes/product_show_as_agent.yml
|
372
380
|
- spec/support/cassettes/product_type_all.yml
|
381
|
+
- spec/support/cassettes/product_type_resource_categories.yml
|
382
|
+
- spec/support/cassettes/product_type_resource_categories_tickets.yml
|
383
|
+
- spec/support/cassettes/product_type_routes.yml
|
373
384
|
- spec/support/cassettes/property.yml
|
374
385
|
- spec/support/cassettes/region_show.yml
|
375
386
|
- spec/support/cassettes/reservation_with_extra_picks.yml
|
387
|
+
- spec/support/cassettes/resource_category_all.yml
|
388
|
+
- spec/support/cassettes/resource_category_all_for_product_type_8.yml
|
376
389
|
- spec/support/cassettes/resource_fare_bases.yml
|
377
390
|
- spec/support/cassettes/resource_product_type.yml
|
378
391
|
- spec/support/cassettes/resource_show.yml
|
@@ -413,13 +426,18 @@ test_files:
|
|
413
426
|
- spec/payment_type_spec.rb
|
414
427
|
- spec/product_spec.rb
|
415
428
|
- spec/product_type_spec.rb
|
429
|
+
- spec/products/scheduled_trip_spec.rb
|
416
430
|
- spec/property_spec.rb
|
417
431
|
- spec/region_spec.rb
|
418
432
|
- spec/reservation_spec.rb
|
433
|
+
- spec/resource_category_spec.rb
|
419
434
|
- spec/resource_spec.rb
|
420
435
|
- spec/route_spec.rb
|
421
436
|
- spec/spec_helper.rb
|
422
437
|
- spec/status_spec.rb
|
438
|
+
- spec/support/cassettes/basic_product_scheduled_trips.yml
|
439
|
+
- spec/support/cassettes/basic_product_scheduled_trips_multi_sector.yml
|
440
|
+
- spec/support/cassettes/basic_product_scheduled_trips_unbookable.yml
|
423
441
|
- spec/support/cassettes/booking_create.yml
|
424
442
|
- spec/support/cassettes/booking_documents.yml
|
425
443
|
- spec/support/cassettes/booking_price_changes.yml
|
@@ -438,9 +456,14 @@ test_files:
|
|
438
456
|
- spec/support/cassettes/product_show.yml
|
439
457
|
- spec/support/cassettes/product_show_as_agent.yml
|
440
458
|
- spec/support/cassettes/product_type_all.yml
|
459
|
+
- spec/support/cassettes/product_type_resource_categories.yml
|
460
|
+
- spec/support/cassettes/product_type_resource_categories_tickets.yml
|
461
|
+
- spec/support/cassettes/product_type_routes.yml
|
441
462
|
- spec/support/cassettes/property.yml
|
442
463
|
- spec/support/cassettes/region_show.yml
|
443
464
|
- spec/support/cassettes/reservation_with_extra_picks.yml
|
465
|
+
- spec/support/cassettes/resource_category_all.yml
|
466
|
+
- spec/support/cassettes/resource_category_all_for_product_type_8.yml
|
444
467
|
- spec/support/cassettes/resource_fare_bases.yml
|
445
468
|
- spec/support/cassettes/resource_product_type.yml
|
446
469
|
- spec/support/cassettes/resource_show.yml
|