quicktravel_client 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d406224338a518959484d11dcef14412f50cf92a
4
- data.tar.gz: c63d38aeadcc3504609d5f0177dafa291d74d789
3
+ metadata.gz: 21adb65a239a49ec7121e7c60c347d3599056a75
4
+ data.tar.gz: 5b5e26b87529048e7c6365756d6c50a345ff53dc
5
5
  SHA512:
6
- metadata.gz: 54c408479abad2926f6573a5703b7d0154feebaf8d60a6bbf59d9189e8f6cbb266798145e1dd47f9f394c4636c826de0ab4bfdd2f1317ab954cfe43f61fd442c
7
- data.tar.gz: 0b53e81800754f522628d39cbd2602ae486ef8a08e597e3517ba9a5d5a524f8a354252115d998f259747fe553e0c80b3f960b83527a055e8fe69bdc6355c54f5
6
+ metadata.gz: 9772cb57121b8dc267c0d8d4d7c13036079f38dff857459865600c963cb72ac7f99456b01de3777a7c256ca7ef4fd1c2d913116dccdc7a5f1900810b81712c8d
7
+ data.tar.gz: 3c764251d247cb746a79099bbc019982aa6b9ec894e08a6ede5a598674356ab2edc318b868e90d68d32b4d0bb97d20fb01f2cfc7b87ddb4e2e5c48d1bb3eebb0
@@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
4
4
  This changelog adheres to [Keep a CHANGELOG](http://keepachangelog.com/).
5
5
 
6
6
 
7
+ ## [3.1.0]
8
+ ### Added
9
+ - API to cancel a booking
10
+
7
11
  ## [3.0.0]
8
12
  ### Fixed
9
13
  - Allow zero pricing for extra pick items
@@ -1,8 +1,6 @@
1
1
  # QuickTravel
2
2
  #
3
3
  module QuickTravel
4
- VERSION = '0.0.2'
5
-
6
4
  require 'active_support' # for .try, etc.
7
5
 
8
6
  require 'quick_travel/cache'
@@ -275,6 +275,10 @@ module QuickTravel
275
275
  put_and_validate("#{api_base}/#{@id}/activate")
276
276
  end
277
277
 
278
+ def cancel!
279
+ put_and_validate("#{api_base}/#{@id}/cancel")
280
+ end
281
+
278
282
  def subscribe_to_email_list(email = nil)
279
283
  params = email.nil? ? {} : { email: email }
280
284
  put_and_validate("#{api_base}/#{@id}/subscribe_to_email_list", params)
@@ -1,3 +1,3 @@
1
1
  module QuickTravel
2
- VERSION = '3.0.0'
2
+ VERSION = '3.1.0'
3
3
  end
@@ -122,6 +122,7 @@ end
122
122
  describe QuickTravel::Booking do
123
123
  let(:booking) { QuickTravel::Booking.find(1) }
124
124
  subject(:consumer) { booking.passengers.first }
125
+
125
126
  it 'should updated nested attributes' do
126
127
  updated_booking = nil
127
128
  VCR.use_cassette('booking_with_nested_attributes') do
@@ -167,3 +168,21 @@ describe QuickTravel::Booking, 'when booking accommodation' do
167
168
  expect(reservation.passenger_ids).to eq booking.passenger_ids
168
169
  end
169
170
  end
171
+
172
+ describe QuickTravel::Booking, 'when changing state' do
173
+ let(:booking) { QuickTravel::Booking.find(2) }
174
+
175
+ it 'should be able to activate the booking' do
176
+ VCR.use_cassette('booking_activate') do
177
+ response = booking.activate!
178
+ expect(response["success"]).to eq true
179
+ end
180
+ end
181
+
182
+ it 'should be able to cancel the booking' do
183
+ VCR.use_cassette('booking_cancel') do
184
+ response = booking.cancel!
185
+ expect(response["success"]).to eq true
186
+ end
187
+ end
188
+ end
@@ -0,0 +1,126 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://test.qt.sealink.com.au:8080/api/bookings/2.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,chrome=1
23
+ Etag:
24
+ - '"f9c3f39d2b9b1d8cf382131ae097a3ef"'
25
+ Cache-Control:
26
+ - max-age=0, private, must-revalidate
27
+ X-Request-Id:
28
+ - 86e84036182fc30c8dc7f05092153ae8
29
+ X-Runtime:
30
+ - '0.754949'
31
+ Vary:
32
+ - Origin
33
+ Date:
34
+ - Fri, 01 Jan 2016 02:30:37 GMT
35
+ X-Rack-Cache:
36
+ - miss
37
+ X-Content-Type-Options:
38
+ - nosniff
39
+ X-Download-Options:
40
+ - noopen
41
+ X-Frame-Options:
42
+ - sameorigin
43
+ X-Permitted-Cross-Domain-Policies:
44
+ - none
45
+ X-Xss-Protection:
46
+ - 1; mode=block
47
+ Server:
48
+ - WEBrick/1.3.1 (Ruby/2.2.5/2016-04-26)
49
+ Content-Length:
50
+ - '7627'
51
+ Connection:
52
+ - Keep-Alive
53
+ Set-Cookie:
54
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJWY4MzBlNzA4ODI0YTE5ZWM1ZjNiODdiOGEyMzRlYWQyBjsAVEkiCXVzZXIGOwBGaQY%3D--c8d6e00c01ca6a6474f4bc54de9274c1f08f1456;
55
+ path=/; HttpOnly
56
+ body:
57
+ encoding: UTF-8
58
+ string: '{"id":2,"state":"new","reference":"222224","public_comments":null,"internal_comments":null,"customer_contact_name":null,"customer_contact_phone":null,"customer_contact_mobile":null,"customer_contact_email":null,"currency_iso_code":"AUD","country_id":14,"post_code":null,"referral_code_id":1,"external_identifier":null,"created_at":"2016-05-11T13:09:47+09:30","updated_at":"2016-07-13T12:00:24+09:30","promo_code":null,"promo_code_id":null,"insurance_offered":false,"total_adjustments_in_cents":0,"pre_adjusted_gross_in_cents":25000,"nett_in_cents":25000,"gross_in_cents":25000,"commission_in_cents":0,"balance_in_cents":25000,"paid_in_cents":0,"surcharge_in_cents":0,"deposit_in_cents":0,"web_site_name":null,"deposit_relevant":false,"deposit_due_on":{"_type":"Date","_value":"2016-09-02T00:00:00+09:30"},"balance_due_on":{"_type":"Date","_value":"2016-09-02T00:00:00+09:30"},"first_travel_date":{"_type":"Date","_value":"2016-09-02"},"last_travel_date":{"_type":"Date","_value":"2016-09-02"},"complete":true,"reason_not_complete":"","first_reason_not_complete":"","discardable_in":279420,"inactivatable_in":279370,"notices":{},"client":null,"passenger_ids":[3,4],"vehicle_ids":[],"reservation_ids":[4,5],"adjustment_ids":[],"todo_items":[],"confirmation_requests":[],"passengers_attributes":[{"id":3,"title":null,"first_name":null,"last_name":null,"passenger_type_id":1,"age":30,"gender":null,"position":1},{"id":4,"title":null,"first_name":null,"last_name":null,"passenger_type_id":1,"age":30,"gender":null,"position":2}],"vehicles_attributes":[],"reservations_attributes":[{"id":4,"booking_id":2,"description":"","comment":"","active":true,"service_ids":[58],"resource_id":12,"quantity":null,"adjustments_attributes":[],"complete":true,"reason_not_complete":"","first_reason_not_complete":"","enough_time_before_travel_to_edit":true,"product_type_id":9,"itinerary_footer":false,"fare_basis_set_id":14,"manually_priced":false,"manually_assigned_fare_basis_set":false,"has_fare_basis":true,"fare_basis_season_name":"","fare_basis_pointer_id":7,"pick_up_info":null,"drop_off_info":null,"selection_name":"Dinner
59
+ Cruise","product_name_underscore":"cruise","resource_class_name_underscore":"generic_resource","resource_class_name":"GenericResource","has_ticket_template":false,"first_travel_date":{"_type":"Date","_value":"2016-09-02"},"last_travel_date":{"_type":"Date","_value":"2016-09-02"},"durational":false,"duration":1,"duration_units":"Days","date_start_label":"Start
60
+ Date:","date_end_label":"End Date:","expires":false,"expiry":"*NA*","has_skipped_reservation_groups":false,"editable_reservation_groups":[],"tariff_level_name":"Auto
61
+ Priced as: Rack Rate","gross_including_packaged_item_in_cents":25000,"pre_adjusted_gross_including_packaged_item_in_cents":25000,"gross_in_cents":20000,"pre_adjusted_gross_in_cents":20000,"pre_adjusted_commission_in_cents":0,"cost_in_cents":6000,"sub_items_gross_in_cents":5000,"rules":[],"package":false,"sub_reservation_depth":0,"sub_reservations_attributes":[{"id":5,"booking_id":2,"description":"","comment":null,"active":true,"service_ids":[62],"resource_id":13,"quantity":null,"adjustments_attributes":[],"complete":true,"reason_not_complete":"","first_reason_not_complete":"","enough_time_before_travel_to_edit":true,"product_type_id":9,"itinerary_footer":false,"fare_basis_set_id":16,"manually_priced":false,"manually_assigned_fare_basis_set":false,"has_fare_basis":true,"fare_basis_season_name":"","fare_basis_pointer_id":8,"pick_up_info":null,"drop_off_info":null,"selection_name":"Dinner
62
+ Cruise Window","product_name_underscore":"cruise","resource_class_name_underscore":"generic_resource","resource_class_name":"GenericResource","has_ticket_template":false,"first_travel_date":{"_type":"Date","_value":"2016-09-02"},"last_travel_date":{"_type":"Date","_value":"2016-09-02"},"durational":false,"duration":1,"duration_units":"Days","date_start_label":"Start
63
+ Date:","date_end_label":"End Date:","expires":false,"expiry":"*NA*","has_skipped_reservation_groups":false,"editable_reservation_groups":[],"tariff_level_name":"Auto
64
+ Priced as: Rack Rate","gross_including_packaged_item_in_cents":5000,"pre_adjusted_gross_including_packaged_item_in_cents":5000,"gross_in_cents":5000,"pre_adjusted_gross_in_cents":5000,"pre_adjusted_commission_in_cents":0,"cost_in_cents":0,"rules":[],"package":false,"sub_reservation_depth":1,"extra_pick":null,"child_resource":true,"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":[3,4],"passenger_splits":[{"commission_in_cents":0,"commission_percentage":"0.0","consumer_id":3,"consumer_splittable_id":5,"consumer_splittable_type":"Reservation","created_at":"2016-05-11T16:58:08+09:30","gross_in_cents":2500,"id":17,"updated_at":"2016-05-11T16:58:08+09:30"},{"commission_in_cents":0,"commission_percentage":"0.0","consumer_id":4,"consumer_splittable_id":5,"consumer_splittable_type":"Reservation","created_at":"2016-05-11T16:58:08+09:30","gross_in_cents":2500,"id":18,"updated_at":"2016-05-11T16:58:08+09:30"}],"vehicle_ids":[],"vehicle_splits":[],"consumer_grosses":{"3":2500,"4":2500}}],"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":[3,4],"passenger_splits":[{"commission_in_cents":0,"commission_percentage":"0.0","consumer_id":3,"consumer_splittable_id":4,"consumer_splittable_type":"Reservation","created_at":"2016-05-11T13:10:20+09:30","gross_in_cents":10000,"id":15,"updated_at":"2016-05-11T13:10:20+09:30"},{"commission_in_cents":0,"commission_percentage":"0.0","consumer_id":4,"consumer_splittable_id":4,"consumer_splittable_type":"Reservation","created_at":"2016-05-11T13:10:20+09:30","gross_in_cents":10000,"id":16,"updated_at":"2016-05-11T13:10:20+09:30"}],"vehicle_ids":[],"vehicle_splits":[],"consumer_grosses":{"3":10000,"4":10000}}],"adjustments_attributes":[],"payments_attributes":[],"payment_types_attributes":[{"id":5,"name":"master","description":"master","transaction_fee":"0.0","active":true,"position":2,"for_frequent_traveller_redemption":false,"comment_required":false,"created_at":null,"updated_at":null,"credit_card_brand":"MasterCard","payment_method":"credit_card","gateway":"braintree","on_account":false,"ticket_holding":false,"requires_staff":false,"internal":false,"redirect":false,"background":true,"creditlink":false,"surchargeable":false},{"id":4,"name":"visa","description":"visa","transaction_fee":"0.0","active":true,"position":3,"for_frequent_traveller_redemption":false,"comment_required":false,"created_at":null,"updated_at":null,"credit_card_brand":"Visa","payment_method":"credit_card","gateway":"braintree","on_account":false,"ticket_holding":false,"requires_staff":false,"internal":false,"redirect":false,"background":true,"creditlink":false,"surchargeable":false},{"id":7,"name":"PayPal","description":"Payments
65
+ made via PayPal account","transaction_fee":"0.0","active":true,"position":6,"for_frequent_traveller_redemption":false,"comment_required":false,"created_at":"2013-03-01T00:00:03+10:30","updated_at":"2013-03-01T00:00:03+10:30","credit_card_brand":null,"payment_method":"paypal","gateway":"braintree","on_account":false,"ticket_holding":false,"requires_staff":false,"internal":false,"redirect":false,"background":true,"creditlink":false,"surchargeable":false}],"issued_tickets_attributes":[]}'
66
+ http_version:
67
+ recorded_at: Tue, 20 Jun 2017 06:46:15 GMT
68
+ - request:
69
+ method: put
70
+ uri: http://test.qt.sealink.com.au:8080/api/bookings/2/activate
71
+ body:
72
+ encoding: UTF-8
73
+ string: access_key=<QT_KEY>
74
+ headers:
75
+ Content-Length:
76
+ - '0'
77
+ response:
78
+ status:
79
+ code: 200
80
+ message: 'OK '
81
+ headers:
82
+ P3p:
83
+ - CP="IDC DSP CAO COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
84
+ Content-Type:
85
+ - application/json; charset=utf-8
86
+ X-Ua-Compatible:
87
+ - IE=Edge,chrome=1
88
+ Etag:
89
+ - '"7363e85fe9edee6f053a4b319588c086"'
90
+ Cache-Control:
91
+ - max-age=0, private, must-revalidate
92
+ X-Request-Id:
93
+ - fdbb18cc915ba08eb7b99383836ddaff
94
+ X-Runtime:
95
+ - '0.412926'
96
+ Vary:
97
+ - Origin
98
+ Date:
99
+ - Fri, 01 Jan 2016 02:30:37 GMT
100
+ X-Rack-Cache:
101
+ - invalidate, pass
102
+ X-Content-Type-Options:
103
+ - nosniff
104
+ X-Download-Options:
105
+ - noopen
106
+ X-Frame-Options:
107
+ - sameorigin
108
+ X-Permitted-Cross-Domain-Policies:
109
+ - none
110
+ X-Xss-Protection:
111
+ - 1; mode=block
112
+ Server:
113
+ - WEBrick/1.3.1 (Ruby/2.2.5/2016-04-26)
114
+ Content-Length:
115
+ - '16'
116
+ Connection:
117
+ - Keep-Alive
118
+ Set-Cookie:
119
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJWM1NjJjYTg0NGJjNTAyZGQwYjE4Mjg5N2U4YzNjNDUzBjsAVEkiCXVzZXIGOwBGaQY%3D--404ec16033facfec88e9a2ada7258dcbf1a6e41c;
120
+ path=/; HttpOnly
121
+ body:
122
+ encoding: UTF-8
123
+ string: '{"success":true}'
124
+ http_version:
125
+ recorded_at: Tue, 20 Jun 2017 06:46:15 GMT
126
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,126 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://test.qt.sealink.com.au:8080/api/bookings/2.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,chrome=1
23
+ Etag:
24
+ - '"fa1d5415892abe0aa2fdee6fb27e8bac"'
25
+ Cache-Control:
26
+ - max-age=0, private, must-revalidate
27
+ X-Request-Id:
28
+ - cff7d946c49579f27c1c956f1826833c
29
+ X-Runtime:
30
+ - '0.746585'
31
+ Vary:
32
+ - Origin
33
+ Date:
34
+ - Fri, 01 Jan 2016 02:30:38 GMT
35
+ X-Rack-Cache:
36
+ - miss
37
+ X-Content-Type-Options:
38
+ - nosniff
39
+ X-Download-Options:
40
+ - noopen
41
+ X-Frame-Options:
42
+ - sameorigin
43
+ X-Permitted-Cross-Domain-Policies:
44
+ - none
45
+ X-Xss-Protection:
46
+ - 1; mode=block
47
+ Server:
48
+ - WEBrick/1.3.1 (Ruby/2.2.5/2016-04-26)
49
+ Content-Length:
50
+ - '7622'
51
+ Connection:
52
+ - Keep-Alive
53
+ Set-Cookie:
54
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJTA5YmMyYzc1YTAxMDZhMWU1MjViMGI4NTY3NDcxNDJmBjsAVEkiCXVzZXIGOwBGaQY%3D--595dd5591137da8927d6a687da1b504ce6104998;
55
+ path=/; HttpOnly
56
+ body:
57
+ encoding: UTF-8
58
+ string: '{"id":2,"state":"active","reference":"222224","public_comments":null,"internal_comments":null,"customer_contact_name":null,"customer_contact_phone":null,"customer_contact_mobile":null,"customer_contact_email":null,"currency_iso_code":"AUD","country_id":14,"post_code":null,"referral_code_id":1,"external_identifier":null,"created_at":"2016-05-11T13:09:47+09:30","updated_at":"2016-01-01T13:00:37+10:30","promo_code":null,"promo_code_id":null,"insurance_offered":false,"total_adjustments_in_cents":0,"pre_adjusted_gross_in_cents":25000,"nett_in_cents":25000,"gross_in_cents":25000,"commission_in_cents":0,"balance_in_cents":25000,"paid_in_cents":0,"surcharge_in_cents":0,"deposit_in_cents":0,"web_site_name":null,"deposit_relevant":false,"deposit_due_on":{"_type":"Date","_value":"2016-09-02T00:00:00+09:30"},"balance_due_on":{"_type":"Date","_value":"2016-09-02T00:00:00+09:30"},"first_travel_date":{"_type":"Date","_value":"2016-09-02"},"last_travel_date":{"_type":"Date","_value":"2016-09-02"},"complete":true,"reason_not_complete":"","first_reason_not_complete":"","discardable_in":60,"inactivatable_in":10,"notices":{},"client":null,"passenger_ids":[3,4],"vehicle_ids":[],"reservation_ids":[4,5],"adjustment_ids":[],"todo_items":[],"confirmation_requests":[],"passengers_attributes":[{"id":3,"title":null,"first_name":null,"last_name":null,"passenger_type_id":1,"age":30,"gender":null,"position":1},{"id":4,"title":null,"first_name":null,"last_name":null,"passenger_type_id":1,"age":30,"gender":null,"position":2}],"vehicles_attributes":[],"reservations_attributes":[{"id":4,"booking_id":2,"description":"","comment":"","active":true,"service_ids":[58],"resource_id":12,"quantity":null,"adjustments_attributes":[],"complete":true,"reason_not_complete":"","first_reason_not_complete":"","enough_time_before_travel_to_edit":true,"product_type_id":9,"itinerary_footer":false,"fare_basis_set_id":14,"manually_priced":false,"manually_assigned_fare_basis_set":false,"has_fare_basis":true,"fare_basis_season_name":"","fare_basis_pointer_id":7,"pick_up_info":null,"drop_off_info":null,"selection_name":"Dinner
59
+ Cruise","product_name_underscore":"cruise","resource_class_name_underscore":"generic_resource","resource_class_name":"GenericResource","has_ticket_template":false,"first_travel_date":{"_type":"Date","_value":"2016-09-02"},"last_travel_date":{"_type":"Date","_value":"2016-09-02"},"durational":false,"duration":1,"duration_units":"Days","date_start_label":"Start
60
+ Date:","date_end_label":"End Date:","expires":false,"expiry":"*NA*","has_skipped_reservation_groups":false,"editable_reservation_groups":[],"tariff_level_name":"Auto
61
+ Priced as: Rack Rate","gross_including_packaged_item_in_cents":25000,"pre_adjusted_gross_including_packaged_item_in_cents":25000,"gross_in_cents":20000,"pre_adjusted_gross_in_cents":20000,"pre_adjusted_commission_in_cents":0,"cost_in_cents":6000,"sub_items_gross_in_cents":5000,"rules":[],"package":false,"sub_reservation_depth":0,"sub_reservations_attributes":[{"id":5,"booking_id":2,"description":"","comment":null,"active":true,"service_ids":[62],"resource_id":13,"quantity":null,"adjustments_attributes":[],"complete":true,"reason_not_complete":"","first_reason_not_complete":"","enough_time_before_travel_to_edit":true,"product_type_id":9,"itinerary_footer":false,"fare_basis_set_id":16,"manually_priced":false,"manually_assigned_fare_basis_set":false,"has_fare_basis":true,"fare_basis_season_name":"","fare_basis_pointer_id":8,"pick_up_info":null,"drop_off_info":null,"selection_name":"Dinner
62
+ Cruise Window","product_name_underscore":"cruise","resource_class_name_underscore":"generic_resource","resource_class_name":"GenericResource","has_ticket_template":false,"first_travel_date":{"_type":"Date","_value":"2016-09-02"},"last_travel_date":{"_type":"Date","_value":"2016-09-02"},"durational":false,"duration":1,"duration_units":"Days","date_start_label":"Start
63
+ Date:","date_end_label":"End Date:","expires":false,"expiry":"*NA*","has_skipped_reservation_groups":false,"editable_reservation_groups":[],"tariff_level_name":"Auto
64
+ Priced as: Rack Rate","gross_including_packaged_item_in_cents":5000,"pre_adjusted_gross_including_packaged_item_in_cents":5000,"gross_in_cents":5000,"pre_adjusted_gross_in_cents":5000,"pre_adjusted_commission_in_cents":0,"cost_in_cents":0,"rules":[],"package":false,"sub_reservation_depth":1,"extra_pick":null,"child_resource":true,"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":[3,4],"passenger_splits":[{"commission_in_cents":0,"commission_percentage":"0.0","consumer_id":3,"consumer_splittable_id":5,"consumer_splittable_type":"Reservation","created_at":"2016-05-11T16:58:08+09:30","gross_in_cents":2500,"id":17,"updated_at":"2016-05-11T16:58:08+09:30"},{"commission_in_cents":0,"commission_percentage":"0.0","consumer_id":4,"consumer_splittable_id":5,"consumer_splittable_type":"Reservation","created_at":"2016-05-11T16:58:08+09:30","gross_in_cents":2500,"id":18,"updated_at":"2016-05-11T16:58:08+09:30"}],"vehicle_ids":[],"vehicle_splits":[],"consumer_grosses":{"3":2500,"4":2500}}],"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":[3,4],"passenger_splits":[{"commission_in_cents":0,"commission_percentage":"0.0","consumer_id":3,"consumer_splittable_id":4,"consumer_splittable_type":"Reservation","created_at":"2016-05-11T13:10:20+09:30","gross_in_cents":10000,"id":15,"updated_at":"2016-05-11T13:10:20+09:30"},{"commission_in_cents":0,"commission_percentage":"0.0","consumer_id":4,"consumer_splittable_id":4,"consumer_splittable_type":"Reservation","created_at":"2016-05-11T13:10:20+09:30","gross_in_cents":10000,"id":16,"updated_at":"2016-05-11T13:10:20+09:30"}],"vehicle_ids":[],"vehicle_splits":[],"consumer_grosses":{"3":10000,"4":10000}}],"adjustments_attributes":[],"payments_attributes":[],"payment_types_attributes":[{"id":5,"name":"master","description":"master","transaction_fee":"0.0","active":true,"position":2,"for_frequent_traveller_redemption":false,"comment_required":false,"created_at":null,"updated_at":null,"credit_card_brand":"MasterCard","payment_method":"credit_card","gateway":"braintree","on_account":false,"ticket_holding":false,"requires_staff":false,"internal":false,"redirect":false,"background":true,"creditlink":false,"surchargeable":false},{"id":4,"name":"visa","description":"visa","transaction_fee":"0.0","active":true,"position":3,"for_frequent_traveller_redemption":false,"comment_required":false,"created_at":null,"updated_at":null,"credit_card_brand":"Visa","payment_method":"credit_card","gateway":"braintree","on_account":false,"ticket_holding":false,"requires_staff":false,"internal":false,"redirect":false,"background":true,"creditlink":false,"surchargeable":false},{"id":7,"name":"PayPal","description":"Payments
65
+ made via PayPal account","transaction_fee":"0.0","active":true,"position":6,"for_frequent_traveller_redemption":false,"comment_required":false,"created_at":"2013-03-01T00:00:03+10:30","updated_at":"2013-03-01T00:00:03+10:30","credit_card_brand":null,"payment_method":"paypal","gateway":"braintree","on_account":false,"ticket_holding":false,"requires_staff":false,"internal":false,"redirect":false,"background":true,"creditlink":false,"surchargeable":false}],"issued_tickets_attributes":[]}'
66
+ http_version:
67
+ recorded_at: Tue, 20 Jun 2017 06:46:16 GMT
68
+ - request:
69
+ method: put
70
+ uri: http://test.qt.sealink.com.au:8080/api/bookings/2/cancel
71
+ body:
72
+ encoding: UTF-8
73
+ string: access_key=<QT_KEY>
74
+ headers:
75
+ Content-Length:
76
+ - '0'
77
+ response:
78
+ status:
79
+ code: 200
80
+ message: 'OK '
81
+ headers:
82
+ P3p:
83
+ - CP="IDC DSP CAO COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
84
+ Content-Type:
85
+ - application/json; charset=utf-8
86
+ X-Ua-Compatible:
87
+ - IE=Edge,chrome=1
88
+ Etag:
89
+ - '"7363e85fe9edee6f053a4b319588c086"'
90
+ Cache-Control:
91
+ - max-age=0, private, must-revalidate
92
+ X-Request-Id:
93
+ - 9e6570c0c769ae2ec54b467445a7aa73
94
+ X-Runtime:
95
+ - '0.832948'
96
+ Vary:
97
+ - Origin
98
+ Date:
99
+ - Fri, 01 Jan 2016 02:30:39 GMT
100
+ X-Rack-Cache:
101
+ - invalidate, pass
102
+ X-Content-Type-Options:
103
+ - nosniff
104
+ X-Download-Options:
105
+ - noopen
106
+ X-Frame-Options:
107
+ - sameorigin
108
+ X-Permitted-Cross-Domain-Policies:
109
+ - none
110
+ X-Xss-Protection:
111
+ - 1; mode=block
112
+ Server:
113
+ - WEBrick/1.3.1 (Ruby/2.2.5/2016-04-26)
114
+ Content-Length:
115
+ - '16'
116
+ Connection:
117
+ - Keep-Alive
118
+ Set-Cookie:
119
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJWU3ODQ0MzdiMzk0YTc1ZGYwODQ5MDNjOGI3MGJhYzljBjsAVEkiCXVzZXIGOwBGaQY%3D--2380c5a5b97863f99f5cb3a66fd58943746417e2;
120
+ path=/; HttpOnly
121
+ body:
122
+ encoding: UTF-8
123
+ string: '{"success":true}'
124
+ http_version:
125
+ recorded_at: Tue, 20 Jun 2017 06:46:17 GMT
126
+ recorded_with: VCR 3.0.3
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: 3.0.0
4
+ version: 3.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: 2017-06-02 00:00:00.000000000 Z
13
+ date: 2017-06-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty
@@ -367,6 +367,8 @@ files:
367
367
  - spec/support/cassettes/basic_product_scheduled_trips.yml
368
368
  - spec/support/cassettes/basic_product_scheduled_trips_multi_sector.yml
369
369
  - spec/support/cassettes/basic_product_scheduled_trips_unbookable.yml
370
+ - spec/support/cassettes/booking_activate.yml
371
+ - spec/support/cassettes/booking_cancel.yml
370
372
  - spec/support/cassettes/booking_create.yml
371
373
  - spec/support/cassettes/booking_documents.yml
372
374
  - spec/support/cassettes/booking_price_changes.yml
@@ -423,7 +425,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
423
425
  version: '0'
424
426
  requirements: []
425
427
  rubyforge_project:
426
- rubygems_version: 2.5.2
428
+ rubygems_version: 2.4.5.1
427
429
  signing_key:
428
430
  specification_version: 4
429
431
  summary: Booking process using QuickTravel API
@@ -454,6 +456,8 @@ test_files:
454
456
  - spec/support/cassettes/basic_product_scheduled_trips.yml
455
457
  - spec/support/cassettes/basic_product_scheduled_trips_multi_sector.yml
456
458
  - spec/support/cassettes/basic_product_scheduled_trips_unbookable.yml
459
+ - spec/support/cassettes/booking_activate.yml
460
+ - spec/support/cassettes/booking_cancel.yml
457
461
  - spec/support/cassettes/booking_create.yml
458
462
  - spec/support/cassettes/booking_documents.yml
459
463
  - spec/support/cassettes/booking_price_changes.yml