quicktravel_client 1.1.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +5 -0
- data/.ruby-version +1 -1
- data/.travis.yml +14 -2
- data/CHANGELOG.md +34 -3
- data/Gemfile +0 -3
- data/Rakefile +0 -6
- data/examples/login_example.rb +1 -1
- data/gemfiles/rails4.gemfile +9 -0
- data/lib/quick_travel.rb +2 -1
- data/lib/quick_travel/accommodation.rb +1 -15
- data/lib/quick_travel/adapter.rb +98 -67
- data/lib/quick_travel/{adapter_exception.rb → adapter_error.rb} +1 -1
- data/lib/quick_travel/address.rb +2 -7
- data/lib/quick_travel/adjustment.rb +0 -2
- data/lib/quick_travel/bed_configuration.rb +0 -1
- data/lib/quick_travel/bed_requirement.rb +0 -1
- data/lib/quick_travel/booking.rb +22 -46
- data/lib/quick_travel/cache.rb +8 -14
- data/lib/quick_travel/checkout.rb +1 -1
- data/lib/quick_travel/client.rb +2 -4
- data/lib/quick_travel/client_type.rb +2 -1
- data/lib/quick_travel/connection_error.rb +1 -1
- data/lib/quick_travel/constants.rb +0 -1
- data/lib/quick_travel/contact.rb +0 -1
- data/lib/quick_travel/country.rb +0 -3
- data/lib/quick_travel/document.rb +0 -2
- data/lib/quick_travel/document_group.rb +0 -2
- data/lib/quick_travel/location.rb +0 -2
- data/lib/quick_travel/party.rb +7 -12
- data/lib/quick_travel/passenger.rb +0 -1
- data/lib/quick_travel/passenger_price_break.rb +0 -2
- data/lib/quick_travel/passenger_type.rb +0 -2
- data/lib/quick_travel/payment.rb +0 -3
- data/lib/quick_travel/payment_type.rb +4 -13
- data/lib/quick_travel/price_changes.rb +3 -0
- data/lib/quick_travel/price_changes/booking_price_change.rb +30 -0
- data/lib/quick_travel/price_changes/price_change.rb +23 -0
- data/lib/quick_travel/{discounts/discount_tree.rb → price_changes/price_change_tree.rb} +12 -8
- data/lib/quick_travel/product.rb +15 -28
- data/lib/quick_travel/product_type.rb +4 -16
- data/lib/quick_travel/property.rb +4 -20
- data/lib/quick_travel/property_facility.rb +0 -1
- data/lib/quick_travel/property_type.rb +2 -14
- data/lib/quick_travel/region.rb +0 -9
- data/lib/quick_travel/reservation.rb +0 -21
- data/lib/quick_travel/resource.rb +7 -28
- data/lib/quick_travel/room_facility.rb +0 -1
- data/lib/quick_travel/route.rb +9 -25
- data/lib/quick_travel/route_stop.rb +0 -1
- data/lib/quick_travel/service.rb +2 -1
- data/lib/quick_travel/status.rb +23 -0
- data/lib/quick_travel/trip.rb +0 -1
- data/lib/quick_travel/vehicle.rb +2 -4
- data/lib/quick_travel/vehicle_type.rb +0 -3
- data/lib/quick_travel/version.rb +1 -1
- data/quicktravel_client.gemspec +4 -4
- data/spec/booking_spec.rb +24 -0
- data/spec/discounts_spec.rb +69 -69
- data/spec/passenger_type_spec.rb +30 -0
- data/spec/payment_type_spec.rb +10 -0
- data/spec/product_spec.rb +52 -21
- data/spec/product_type_spec.rb +19 -0
- data/spec/property_spec.rb +83 -0
- data/spec/region_spec.rb +1 -1
- data/spec/reservation_spec.rb +3 -2
- data/spec/resource_spec.rb +31 -7
- data/spec/route_spec.rb +118 -0
- data/spec/spec_helper.rb +18 -25
- data/spec/status_spec.rb +9 -0
- data/spec/support/cassettes/booking_create.yml +39 -33
- data/spec/support/cassettes/booking_documents.yml +36 -30
- data/spec/support/cassettes/booking_price_changes.yml +66 -0
- data/spec/support/cassettes/booking_show.yml +38 -32
- data/spec/support/cassettes/booking_update.yml +74 -62
- data/spec/support/cassettes/booking_with_documents.yml +88 -76
- data/spec/support/cassettes/booking_with_nested_attributes.yml +128 -110
- data/spec/support/cassettes/booking_with_price_changes.yml +86 -0
- data/spec/support/cassettes/countries.yml +140 -0
- data/spec/support/cassettes/country_all.yml +36 -30
- data/spec/support/cassettes/create_reservation_fail.yml +32 -27
- data/spec/support/cassettes/create_reservation_with_booking.yml +40 -34
- data/spec/support/cassettes/passenger_all.yml +36 -30
- data/spec/support/cassettes/payment_info.yml +61 -0
- data/spec/support/cassettes/product_date_range_bookability.yml +61 -59
- data/spec/support/cassettes/product_show.yml +42 -32
- data/spec/support/cassettes/product_show_as_agent.yml +63 -0
- data/spec/support/cassettes/product_type_all.yml +53 -0
- data/spec/support/cassettes/property.yml +66 -0
- data/spec/support/cassettes/region_show.yml +36 -30
- data/spec/support/cassettes/reservation_with_extra_picks.yml +137 -110
- data/spec/support/cassettes/resource_fare_bases.yml +47 -78
- data/spec/support/cassettes/resource_product_type.yml +63 -0
- data/spec/support/cassettes/resource_show.yml +37 -31
- data/spec/support/cassettes/resource_with_price.yml +63 -0
- data/spec/support/cassettes/route_all.yml +65 -0
- data/spec/support/cassettes/tenant_switcher.yml +109 -0
- data/spec/support/coverage_loader.rb +26 -0
- data/spec/tenant_spec.rb +28 -0
- metadata +106 -115
- data/bootstrap/boot.rb +0 -4
- data/lib/quick_travel/discounts.rb +0 -3
- data/lib/quick_travel/discounts/booking_discount.rb +0 -18
- data/lib/quick_travel/discounts/discount.rb +0 -21
- data/spec/support/cassettes/booking_create_legacy.yml +0 -50
- data/spec/support/cassettes/booking_discounts.yml +0 -53
- data/spec/support/cassettes/booking_with_discounts.yml +0 -72
- data/spec/support/cassettes/region_index.yml +0 -48
data/bootstrap/boot.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
module QuickTravel
|
2
|
-
module Discounts
|
3
|
-
class BookingDiscount < DiscountTree
|
4
|
-
def initialize(attrs = {})
|
5
|
-
super(
|
6
|
-
attrs.merge(
|
7
|
-
'root' => attrs,
|
8
|
-
'children' => attrs['reservation_discounts']
|
9
|
-
)
|
10
|
-
)
|
11
|
-
end
|
12
|
-
|
13
|
-
def reservation_discounts
|
14
|
-
@children
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
module QuickTravel
|
2
|
-
module Discounts
|
3
|
-
class Discount
|
4
|
-
attr_reader :target
|
5
|
-
attr_reader :original_price, :discounted_price, :discount, :reason
|
6
|
-
|
7
|
-
def initialize(attrs = {})
|
8
|
-
@target = OpenStruct.new(attrs.fetch('target').slice('id', 'type'))
|
9
|
-
|
10
|
-
@original_price = Money.new(attrs.fetch('original_price_in_cents'))
|
11
|
-
@discounted_price = Money.new(attrs.fetch('discounted_price_in_cents'))
|
12
|
-
@discount = Money.new(attrs.fetch('discount_in_cents'))
|
13
|
-
@reason = attrs.fetch('reason')
|
14
|
-
end
|
15
|
-
|
16
|
-
def applied_on?(id, type = 'Reservation')
|
17
|
-
@target.type == type && @target.id == id
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,50 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: http://0.0.0.0:8080/front_office/bookings.json
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: booking[referral_code_id]=33&access_key=<QT_KEY>
|
9
|
-
headers:
|
10
|
-
content-length:
|
11
|
-
- '0'
|
12
|
-
response:
|
13
|
-
status:
|
14
|
-
code: 200
|
15
|
-
message: ! 'OK '
|
16
|
-
headers:
|
17
|
-
p3p:
|
18
|
-
- CP="IDC DSP CAO COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
|
19
|
-
content-type:
|
20
|
-
- application/json; charset=utf-8
|
21
|
-
x-ua-compatible:
|
22
|
-
- IE=Edge,chrome=1
|
23
|
-
etag:
|
24
|
-
- ! '"e1689d2a9cb6912f09c474b86aea54e1"'
|
25
|
-
cache-control:
|
26
|
-
- max-age=0, private, must-revalidate
|
27
|
-
x-request-id:
|
28
|
-
- 720751484abc6fe362e1e0cbba2de330
|
29
|
-
x-runtime:
|
30
|
-
- '0.400131'
|
31
|
-
date:
|
32
|
-
- Thu, 28 Feb 2013 14:16:27 GMT
|
33
|
-
x-rack-cache:
|
34
|
-
- 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=ae50d83b4e93bef8543f3f64075f38c7; path=/; HttpOnly
|
43
|
-
body:
|
44
|
-
encoding: US-ASCII
|
45
|
-
string: ! '{"id":4,"state":"new","reference":"222227","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:17 GMT
|
50
|
-
recorded_with: VCR 2.9.3
|
@@ -1,53 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://0.0.0.0:8080/api/bookings/1/discount.json?
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
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
|
-
p3p:
|
18
|
-
- CP="IDC DSP CAO COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
|
19
|
-
content-type:
|
20
|
-
- application/json; charset=utf-8
|
21
|
-
x-ua-compatible:
|
22
|
-
- IE=Edge,chrome=1
|
23
|
-
etag:
|
24
|
-
- ! '"2a403d410606562f02412577ffa6eb55"'
|
25
|
-
cache-control:
|
26
|
-
- max-age=0, private, must-revalidate
|
27
|
-
x-request-id:
|
28
|
-
- 7df9edb80489b280e505428e9f9c0903
|
29
|
-
x-runtime:
|
30
|
-
- '0.032943'
|
31
|
-
date:
|
32
|
-
- Thu, 28 Feb 2013 14:10:21 GMT
|
33
|
-
x-rack-cache:
|
34
|
-
- miss
|
35
|
-
server:
|
36
|
-
- WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
|
37
|
-
content-length:
|
38
|
-
- '1201'
|
39
|
-
connection:
|
40
|
-
- close
|
41
|
-
set-cookie:
|
42
|
-
- _session_id=5d633d455a32553f1ff76d29f7616e48; path=/; HttpOnly
|
43
|
-
body:
|
44
|
-
encoding: US-ASCII
|
45
|
-
string: ! '{"target":{"type":"Booking","id":1},"original_price_in_cents":64000,"discounted_price_in_cents":38000,"discount_in_cents":-26000,"reason":"Test
|
46
|
-
Discount Hilton and QBE Get Me","reservation_discounts":[{"target":{"type":"Reservation","id":1},"original_price_in_cents":64000,"discounted_price_in_cents":38000,"discount_in_cents":-26000,"reason":"Test
|
47
|
-
Discount Hilton and QBE Get Me","root":{"target":{"type":"Reservation","id":1},"original_price_in_cents":40000,"discounted_price_in_cents":20000,"discount_in_cents":-20000,"reason":"Test
|
48
|
-
Discount Hilton"},"children":[{"target":{"type":"Reservation","id":3},"original_price_in_cents":12000,"discounted_price_in_cents":12000,"discount_in_cents":0,"reason":"","root":{"target":{"type":"Reservation","id":3},"original_price_in_cents":12000,"discounted_price_in_cents":12000,"discount_in_cents":0,"reason":""},"children":[]},{"target":{"type":"Reservation","id":2},"original_price_in_cents":12000,"discounted_price_in_cents":6000,"discount_in_cents":-6000,"reason":"QBE
|
49
|
-
Get Me","root":{"target":{"type":"Reservation","id":2},"original_price_in_cents":12000,"discounted_price_in_cents":6000,"discount_in_cents":-6000,"reason":"QBE
|
50
|
-
Get Me"},"children":[]}]}]}'
|
51
|
-
http_version: '1.1'
|
52
|
-
recorded_at: Thu, 18 Dec 2014 07:27:10 GMT
|
53
|
-
recorded_with: VCR 2.9.3
|
@@ -1,72 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://0.0.0.0:8080/api/bookings/reference/222223.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
|
-
p3p:
|
18
|
-
- CP="IDC DSP CAO COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
|
19
|
-
content-type:
|
20
|
-
- application/json; charset=utf-8
|
21
|
-
x-ua-compatible:
|
22
|
-
- IE=Edge
|
23
|
-
etag:
|
24
|
-
- '"7e61bf783b86f30f5a75a859d302cdd8"'
|
25
|
-
cache-control:
|
26
|
-
- max-age=0, private, must-revalidate
|
27
|
-
x-request-id:
|
28
|
-
- db5e334cd6b1829241c6c934a8861996
|
29
|
-
x-runtime:
|
30
|
-
- '1.279564'
|
31
|
-
date:
|
32
|
-
- Wed, 25 Mar 2015 22:44:15 GMT
|
33
|
-
x-rack-cache:
|
34
|
-
- miss
|
35
|
-
server:
|
36
|
-
- WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
|
37
|
-
content-length:
|
38
|
-
- '11713'
|
39
|
-
connection:
|
40
|
-
- close
|
41
|
-
set-cookie:
|
42
|
-
- _session_id=2b5aa99831783a9749265ded2289db3b; path=/; HttpOnly
|
43
|
-
body:
|
44
|
-
encoding: UTF-8
|
45
|
-
string: '{"id":1,"state":"new","reference":"222223","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":38000,"nett_in_cents":38000,"gross_in_cents":38000,"commission_in_cents":0,"balance_in_cents":38000,"paid_in_cents":0,"surcharge_in_cents":0,"deposit_in_cents":0,"web_site_name":null,"promo_code":null,"insurance_offered":false,"deposit_due_on":{"_type":"Date","_value":"2016-03-01T00:00:00+10:30"},"balance_due_on":{"_type":"Date","_value":"2016-03-01T00:00:00+10:30"},"first_travel_date":{"_type":"Date","_value":"2016-03-01"},"last_travel_date":{"_type":"Date","_value":"2016-03-02"},"complete":true,"reason_not_complete":null,"discardable_in":-1087654,"inactivatable_in":-1087704,"notices":{},"deposit_relevant":false,"passenger_ids":[1,2],"vehicle_ids":[],"reservation_ids":[1,3,2],"adjustment_ids":[],"todo_items":[],"confirmation_requests":[],"passengers_attributes":[{"id":1,"title":null,"first_name":null,"last_name":null,"passenger_type_id":1,"age":30,"gender":null,"position":1},{"id":2,"title":null,"first_name":null,"last_name":null,"passenger_type_id":1,"age":30,"gender":null,"position":2}],"vehicles_attributes":[],"reservations_attributes":[{"id":1,"booking_id":1,"description":"A
|
46
|
-
basic studio room","comment":"","active":true,"service_ids":[3,4],"resource_id":6,"quantity":null,"complete":true,"reason_not_complete":null,"enough_time_before_travel_to_edit":true,"bed_configuration":"1
|
47
|
-
x Double","product_type_id":2,"itinerary_footer":false,"fare_basis_set_id":12,"manually_priced":false,"manually_assigned_fare_basis_set":false,"has_fare_basis":true,"fare_basis_season_name":"","fare_basis_pointer_id":6,"pick_up_info":null,"drop_off_info":null,"selection_name":"Hilton
|
48
|
-
Hotel: Executive Room","product_name_underscore":"accommodation","resource_class_name_underscore":"accommodation","resource_class_name":"Accommodation","first_travel_date":{"_type":"Date","_value":"2016-03-01"},"last_travel_date":{"_type":"Date","_value":"2016-03-02"},"durational":true,"duration":2,"checkout_date":{"_type":"Date","_value":"2016-03-03"},"duration_units":"Nights","date_start_label":"In:","date_end_label":"Out:","accommodation_extra_picks":false,"has_skipped_reservation_groups":false,"editable_reservation_groups":[],"tariff_level_name":"Auto
|
49
|
-
Priced as: Rack Rate","gross_including_packaged_item_in_cents":38000,"pre_adjusted_gross_including_packaged_item_in_cents":64000,"gross_in_cents":20000,"pre_adjusted_gross_in_cents":40000,"pre_adjusted_commission_in_cents":0,"cost_in_cents":20000,"sub_items_gross_in_cents":18000,"adjustments_attributes":[{"id":6,"gross_in_cents":-20000,"creator":{"_access_ip":null,"_access_key":null,"_crypted_password":null,"_login":null,"_password":null,"_remember_token":null,"_remember_token_expires_at":null,"_salt":null,"active":true,"age":null,"business_number":null,"business_number_type":null,"created_at":"2013-03-01T00:00:02+10:30","creator_id":null,"currency_iso_code":"AUD","first_name":"administrator","gender":null,"id":1,"internal_staff":true,"internal_subdivision":false,"last_name":"administrator","name":"Administrator
|
50
|
-
Administrator","notes":null,"remember_token":null,"remember_token_expires_at":null,"salt":null,"title":null,"updated_at":"2013-03-01T00:00:03+10:30","updator_id":null},"created_at":"2013-03-01T00:40:04+10:30","description":"50%
|
51
|
-
Off","adjustable_item_type":"Reservation","adjustable_item_id":1,"automatic":true}],"rules":[{"unique_name":"Test
|
52
|
-
Discount Hilton","description":"","display_name":"Test Discount Hilton"}],"package":false,"sub_reservation_depth":0,"sub_reservations_attributes":[{"id":3,"booking_id":1,"description":"You
|
53
|
-
have declined Travel Insurance for your booking. If you wish to add Travel
|
54
|
-
Insurance to this booking, please contact the SeaLink Travel Group on 13 13
|
55
|
-
01 prior to commencing your travels.","comment":null,"active":true,"service_ids":[7,8],"resource_id":4,"quantity":null,"complete":true,"reason_not_complete":null,"enough_time_before_travel_to_edit":true,"product_type_id":7,"itinerary_footer":true,"fare_basis_set_id":8,"manually_priced":false,"manually_assigned_fare_basis_set":false,"has_fare_basis":true,"fare_basis_season_name":"","fare_basis_pointer_id":4,"pick_up_info":null,"drop_off_info":null,"selection_name":"Travel
|
56
|
-
Insurance - Declined","product_name_underscore":"travel_insurance","resource_class_name_underscore":"insurance","resource_class_name":"Insurance","first_travel_date":{"_type":"Date","_value":"2016-03-01"},"last_travel_date":{"_type":"Date","_value":"2016-03-02"},"durational":true,"duration":2,"duration_units":"Days","date_start_label":"Start
|
57
|
-
Date:","date_end_label":"End Date:","has_skipped_reservation_groups":false,"editable_reservation_groups":[],"tariff_level_name":"Auto
|
58
|
-
Priced as: Rack Rate","gross_including_packaged_item_in_cents":12000,"pre_adjusted_gross_including_packaged_item_in_cents":12000,"gross_in_cents":12000,"pre_adjusted_gross_in_cents":12000,"pre_adjusted_commission_in_cents":0,"cost_in_cents":8000,"adjustments_attributes":[],"rules":[],"package":false,"sub_reservation_depth":1,"extra_pick":null,"child_resource":true,"pending_confirmation":false,"confirmation_request_fields":["pick_up_information","drop_off_information","vendor_pnr","notes_for_vendor","vendor_staff","note_for_inventory_type_change"],"report_reservation_changes":false,"vendor_pnr":null,"pick_up_information":null,"drop_off_information":null,"vendor_staff":null,"notes_for_vendor":null,"passenger_ids":[1,2],"passenger_splits":[{"commission_in_cents":0,"commission_percentage":"0.0","consumer_id":1,"consumer_splittable_id":3,"consumer_splittable_type":"Reservation","created_at":"2013-03-01T00:17:34+10:30","gross_in_cents":6000,"id":7,"services_deck_division_id":null,"updated_at":"2013-03-01T00:17:34+10:30"},{"commission_in_cents":0,"commission_percentage":"0.0","consumer_id":2,"consumer_splittable_id":3,"consumer_splittable_type":"Reservation","created_at":"2013-03-01T00:17:34+10:30","gross_in_cents":6000,"id":8,"services_deck_division_id":null,"updated_at":"2013-03-01T00:17:34+10:30"}],"vehicle_ids":[],"vehicle_splits":[],"consumer_grosses":{"1":6000,"2":6000}},{"id":2,"booking_id":1,"description":"QBE
|
59
|
-
Travel Insurance Policy E known as the ''Australian Cancellation and Additional
|
60
|
-
Expenses'' plan has been included into this booking. This covers you for defined
|
61
|
-
unforeseen cancellations and additional expenses. Please refer to the Product
|
62
|
-
Disclosure Statement for further information.","comment":null,"active":true,"service_ids":[5,6],"resource_id":3,"quantity":null,"complete":true,"reason_not_complete":null,"enough_time_before_travel_to_edit":true,"product_type_id":7,"itinerary_footer":true,"fare_basis_set_id":8,"manually_priced":false,"manually_assigned_fare_basis_set":false,"has_fare_basis":true,"fare_basis_season_name":"","fare_basis_pointer_id":4,"pick_up_info":null,"drop_off_info":null,"selection_name":"QBE
|
63
|
-
Travel Insurance - Policy E","product_name_underscore":"travel_insurance","resource_class_name_underscore":"insurance","resource_class_name":"Insurance","first_travel_date":{"_type":"Date","_value":"2016-03-01"},"last_travel_date":{"_type":"Date","_value":"2016-03-02"},"durational":true,"duration":2,"duration_units":"Days","date_start_label":"Start
|
64
|
-
Date:","date_end_label":"End Date:","has_skipped_reservation_groups":false,"editable_reservation_groups":[],"tariff_level_name":"Auto
|
65
|
-
Priced as: Rack Rate","gross_including_packaged_item_in_cents":6000,"pre_adjusted_gross_including_packaged_item_in_cents":12000,"gross_in_cents":6000,"pre_adjusted_gross_in_cents":12000,"pre_adjusted_commission_in_cents":0,"cost_in_cents":8000,"adjustments_attributes":[{"id":5,"gross_in_cents":-6000,"creator":{"_access_ip":null,"_access_key":null,"_crypted_password":null,"_login":null,"_password":null,"_remember_token":null,"_remember_token_expires_at":null,"_salt":null,"active":true,"age":null,"business_number":null,"business_number_type":null,"created_at":"2013-03-01T00:00:02+10:30","creator_id":null,"currency_iso_code":"AUD","first_name":"administrator","gender":null,"id":1,"internal_staff":true,"internal_subdivision":false,"last_name":"administrator","name":"Administrator
|
66
|
-
Administrator","notes":null,"remember_token":null,"remember_token_expires_at":null,"salt":null,"title":null,"updated_at":"2013-03-01T00:00:03+10:30","updator_id":null},"created_at":"2013-03-01T00:40:04+10:30","description":"50%
|
67
|
-
Off","adjustable_item_type":"Reservation","adjustable_item_id":2,"automatic":true}],"rules":[{"unique_name":"QBE
|
68
|
-
Get Me","description":"","display_name":"QBE Get Me"}],"package":false,"sub_reservation_depth":1,"extra_pick":null,"child_resource":true,"pending_confirmation":false,"confirmation_request_fields":["pick_up_information","drop_off_information","vendor_pnr","notes_for_vendor","vendor_staff","note_for_inventory_type_change"],"report_reservation_changes":false,"vendor_pnr":null,"pick_up_information":null,"drop_off_information":null,"vendor_staff":null,"notes_for_vendor":null,"passenger_ids":[1,2],"passenger_splits":[{"commission_in_cents":0,"commission_percentage":"0.0","consumer_id":1,"consumer_splittable_id":2,"consumer_splittable_type":"Reservation","created_at":"2013-03-01T00:11:08+10:30","gross_in_cents":6000,"id":3,"services_deck_division_id":null,"updated_at":"2013-03-01T00:11:08+10:30"},{"commission_in_cents":0,"commission_percentage":"0.0","consumer_id":2,"consumer_splittable_id":2,"consumer_splittable_type":"Reservation","created_at":"2013-03-01T00:11:08+10:30","gross_in_cents":6000,"id":4,"services_deck_division_id":null,"updated_at":"2013-03-01T00:11:08+10:30"}],"vehicle_ids":[],"vehicle_splits":[],"consumer_grosses":{"1":3000,"2":3000}}],"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":[1,2],"passenger_splits":[{"commission_in_cents":0,"commission_percentage":"0.0","consumer_id":1,"consumer_splittable_id":1,"consumer_splittable_type":"Reservation","created_at":"2013-03-01T00:08:00+10:30","gross_in_cents":0,"id":1,"services_deck_division_id":null,"updated_at":"2013-03-01T00:08:00+10:30"},{"commission_in_cents":0,"commission_percentage":"0.0","consumer_id":2,"consumer_splittable_id":1,"consumer_splittable_type":"Reservation","created_at":"2013-03-01T00:08:00+10:30","gross_in_cents":0,"id":2,"services_deck_division_id":null,"updated_at":"2013-03-01T00:08:00+10:30"}],"vehicle_ids":[],"vehicle_splits":[],"consumer_grosses":{"1":0,"2":0}}],"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
|
69
|
-
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}]}'
|
70
|
-
http_version: '1.1'
|
71
|
-
recorded_at: Wed, 25 Mar 2015 22:44:15 GMT
|
72
|
-
recorded_with: VCR 2.9.3
|
@@ -1,48 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://0.0.0.0:8080/regions.json?
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
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
|
-
p3p:
|
18
|
-
- CP="IDC DSP CAO COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
|
19
|
-
content-type:
|
20
|
-
- application/json; charset=utf-8
|
21
|
-
x-ua-compatible:
|
22
|
-
- IE=Edge,chrome=1
|
23
|
-
etag:
|
24
|
-
- ! '"a4c8faefeca1cec1ee7134663a0817b7"'
|
25
|
-
cache-control:
|
26
|
-
- max-age=0, private, must-revalidate
|
27
|
-
x-request-id:
|
28
|
-
- 958983dcd32b33f7157f7ff616d4d77a
|
29
|
-
x-runtime:
|
30
|
-
- '0.021027'
|
31
|
-
date:
|
32
|
-
- Thu, 28 Feb 2013 14:27:23 GMT
|
33
|
-
x-rack-cache:
|
34
|
-
- miss
|
35
|
-
server:
|
36
|
-
- WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
|
37
|
-
content-length:
|
38
|
-
- '47'
|
39
|
-
connection:
|
40
|
-
- close
|
41
|
-
set-cookie:
|
42
|
-
- _session_id=943b65a0bca41cbb3f90757a768011a9; path=/; HttpOnly
|
43
|
-
body:
|
44
|
-
encoding: US-ASCII
|
45
|
-
string: ! '[{"id":2,"name":"Adelaide","location_ids":[1]}]'
|
46
|
-
http_version: '1.1'
|
47
|
-
recorded_at: Thu, 18 Dec 2014 07:44:13 GMT
|
48
|
-
recorded_with: VCR 2.9.3
|