bookingsync-api 0.0.28 → 0.0.29
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 +4 -4
- data/CHANGELOG.md +13 -9
- data/lib/bookingsync/api/client.rb +4 -0
- data/lib/bookingsync/api/client/bathrooms.rb +54 -0
- data/lib/bookingsync/api/client/bedrooms.rb +54 -0
- data/lib/bookingsync/api/version.rb +1 -1
- data/spec/bookingsync/api/client/bathrooms_spec.rb +62 -0
- data/spec/bookingsync/api/client/bedrooms_spec.rb +62 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Bathrooms/_bathrooms/returns_bathrooms.yml +84 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Bathrooms/_cancel_bathroom/cancels_given_bathroom.yml +67 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Bathrooms/_create_bathroom/creates_a_new_bathroom.yml +76 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Bathrooms/_edit_bathroom/updates_given_bathroom_by_ID.yml +74 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_bedrooms/returns_bedrooms.yml +86 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_cancel_bedroom/cancels_given_bedroom.yml +67 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_create_bedroom/creates_a_new_bedroom.yml +76 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_edit_bedroom/updates_given_bedroom_by_ID.yml +74 -0
- metadata +24 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df0f78f0a79e9a32da557bccb9ad5777f77e2ea2
|
4
|
+
data.tar.gz: 6003bf2692a48dfe8cf60fe537161ed3991cb89d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0358693bc5ae14c4038876ddd2ab0c5c7226e7ab60bea6b2c968fb04976e501d4112a590eac504b2ff9182b94251738f331ded764941824d9ddb9bd495343285
|
7
|
+
data.tar.gz: 372ca716f9c91593ac6d27c15ef1f4492bca2961a0c2ad31e653d0f0e0954e412c43d606eb92a2d4141670a41550f65cfd22064197cccd1b8689701991d852a8
|
data/CHANGELOG.md
CHANGED
@@ -2,28 +2,32 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
+
## 0.0.29
|
6
|
+
|
7
|
+
- Add support for Bathrooms and Bedrooms endpoints.
|
8
|
+
|
5
9
|
## 0.0.28
|
6
10
|
|
7
|
-
- Add missing dependency of `addressable
|
11
|
+
- Add missing dependency of `addressable`.
|
8
12
|
|
9
13
|
## 0.0.27
|
10
14
|
|
11
|
-
- Add support for fetching a single booking with options (needed to fetch canceled bookings)
|
15
|
+
- Add support for fetching a single booking with options (needed to fetch canceled bookings).
|
12
16
|
|
13
17
|
## 0.0.26
|
14
18
|
|
15
|
-
- Add support for creating instant bookings
|
16
|
-
- Add support for creatings rentals amenities
|
19
|
+
- Add support for creating instant bookings.
|
20
|
+
- Add support for creatings rentals amenities.
|
17
21
|
|
18
22
|
## 0.0.25
|
19
23
|
|
20
|
-
- Add support for Accounts endpoint
|
24
|
+
- Add support for Accounts endpoint.
|
21
25
|
|
22
26
|
## 0.0.24
|
23
27
|
|
24
|
-
- Add support for fetching a single availability
|
25
|
-
- Add support for polymorphic associations
|
26
|
-
- Add support for Taxes, Fees, BookingsTaxes, BookingsFees and RentalsFees endpoints
|
28
|
+
- Add support for fetching a single availability.
|
29
|
+
- Add support for polymorphic associations.
|
30
|
+
- Add support for Taxes, Fees, BookingsTaxes, BookingsFees and RentalsFees endpoints.
|
27
31
|
|
28
32
|
## 0.0.23
|
29
33
|
|
@@ -31,4 +35,4 @@
|
|
31
35
|
|
32
36
|
## 0.0.22
|
33
37
|
|
34
|
-
- Handle 403 responses from the API. Raises BookingSync::API::Forbidden
|
38
|
+
- Handle 403 responses from the API. Raises BookingSync::API::Forbidden.
|
@@ -3,6 +3,8 @@ require "bookingsync/api/client/accounts"
|
|
3
3
|
require "bookingsync/api/client/amenities"
|
4
4
|
require "bookingsync/api/client/availabilities"
|
5
5
|
require "bookingsync/api/client/billing_addresses"
|
6
|
+
require "bookingsync/api/client/bathrooms"
|
7
|
+
require "bookingsync/api/client/bedrooms"
|
6
8
|
require "bookingsync/api/client/bookings"
|
7
9
|
require "bookingsync/api/client/bookings_fees"
|
8
10
|
require "bookingsync/api/client/bookings_payments"
|
@@ -42,6 +44,8 @@ module BookingSync::API
|
|
42
44
|
include BookingSync::API::Client::Amenities
|
43
45
|
include BookingSync::API::Client::Availabilities
|
44
46
|
include BookingSync::API::Client::BillingAddresses
|
47
|
+
include BookingSync::API::Client::Bathrooms
|
48
|
+
include BookingSync::API::Client::Bedrooms
|
45
49
|
include BookingSync::API::Client::Bookings
|
46
50
|
include BookingSync::API::Client::BookingsFees
|
47
51
|
include BookingSync::API::Client::BookingsPayments
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module BookingSync::API
|
2
|
+
class Client
|
3
|
+
module Bathrooms
|
4
|
+
# List bathrooms
|
5
|
+
#
|
6
|
+
# Returns bathrooms for the account user is authenticated with.
|
7
|
+
# @param options [Hash] A customizable set of options.
|
8
|
+
# @option options [Array] fields: List of fields to be fetched.
|
9
|
+
# @return [Array<BookingSync::API::Resource>] Array of bathrooms.
|
10
|
+
#
|
11
|
+
# @example Get the list of bathrooms for the current account
|
12
|
+
# bathrooms = @api.bathrooms
|
13
|
+
# bathrooms.first.name # => "Bathroom 2"
|
14
|
+
# @example Get the list of bathrooms only with name for smaller response
|
15
|
+
# @api.bathrooms(fields: [:name])
|
16
|
+
def bathrooms(options = {}, &block)
|
17
|
+
paginate :bathrooms, options, &block
|
18
|
+
end
|
19
|
+
|
20
|
+
# Create a new bathroom
|
21
|
+
#
|
22
|
+
# @param rental [BookingSync::API::Resource|Integer] Rental or ID of
|
23
|
+
# the rental for which bathroom will be created.
|
24
|
+
# @param options [Hash] Bathroom's attributes.
|
25
|
+
# @return [BookingSync::API::Resource] Newly created bathroom.
|
26
|
+
def create_bathroom(rental, options = {})
|
27
|
+
post("rentals/#{rental}/bathrooms", bathrooms: [options]).pop
|
28
|
+
end
|
29
|
+
|
30
|
+
# Edit a bathroom
|
31
|
+
#
|
32
|
+
# @param bathroom [BookingSync::API::Resource|Integer] Bathroom or ID of
|
33
|
+
# the bathroom to be updated.
|
34
|
+
# @param options [Hash] Bathroom attributes to be updated.
|
35
|
+
# @return [BookingSync::API::Resource] Updated bathroom on success,
|
36
|
+
# exception is raised otherwise.
|
37
|
+
# @example
|
38
|
+
# bathroom = @api.bathrooms.first
|
39
|
+
# @api.edit_bathroom(bathroom, { name: "Some bathroom" })
|
40
|
+
def edit_bathroom(bathroom, options = {})
|
41
|
+
put("bathrooms/#{bathroom}", bathrooms: [options]).pop
|
42
|
+
end
|
43
|
+
|
44
|
+
# Cancel a bathroom
|
45
|
+
#
|
46
|
+
# @param bathroom [BookingSync::API::Resource|Integer] Bathroom or ID
|
47
|
+
# of the bathroom to be canceled.
|
48
|
+
# @return [NilClass] Returns nil on success.
|
49
|
+
def cancel_bathroom(bathroom)
|
50
|
+
delete "bathrooms/#{bathroom}"
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module BookingSync::API
|
2
|
+
class Client
|
3
|
+
module Bedrooms
|
4
|
+
# List bedrooms
|
5
|
+
#
|
6
|
+
# Returns bedrooms for the account user is authenticated with.
|
7
|
+
# @param options [Hash] A customizable set of options.
|
8
|
+
# @option options [Array] fields: List of fields to be fetched.
|
9
|
+
# @return [Array<BookingSync::API::Resource>] Array of bedrooms.
|
10
|
+
#
|
11
|
+
# @example Get the list of bedrooms for the current account
|
12
|
+
# bedrooms = @api.bedrooms
|
13
|
+
# bedrooms.first.name # => "Bedroom 2"
|
14
|
+
# @example Get the list of bedrooms only with name for smaller response
|
15
|
+
# @api.bedrooms(fields: [:name])
|
16
|
+
def bedrooms(options = {}, &block)
|
17
|
+
paginate :bedrooms, options, &block
|
18
|
+
end
|
19
|
+
|
20
|
+
# Create a new bedroom
|
21
|
+
#
|
22
|
+
# @param rental [BookingSync::API::Resource|Integer] Rental or ID of
|
23
|
+
# the rental for which bedroom will be created.
|
24
|
+
# @param options [Hash] Bedroom's attributes.
|
25
|
+
# @return [BookingSync::API::Resource] Newly created bedroom.
|
26
|
+
def create_bedroom(rental, options = {})
|
27
|
+
post("rentals/#{rental}/bedrooms", bedrooms: [options]).pop
|
28
|
+
end
|
29
|
+
|
30
|
+
# Edit a bedroom
|
31
|
+
#
|
32
|
+
# @param bedroom [BookingSync::API::Resource|Integer] Bedroom or ID of
|
33
|
+
# the bedroom to be updated.
|
34
|
+
# @param options [Hash] Bedroom attributes to be updated.
|
35
|
+
# @return [BookingSync::API::Resource] Updated bedroom on success,
|
36
|
+
# exception is raised otherwise.
|
37
|
+
# @example
|
38
|
+
# bedroom = @api.bedrooms.first
|
39
|
+
# @api.edit_bedroom(bedroom, { name: "Some bedroom" })
|
40
|
+
def edit_bedroom(bedroom, options = {})
|
41
|
+
put("bedrooms/#{bedroom}", bedrooms: [options]).pop
|
42
|
+
end
|
43
|
+
|
44
|
+
# Cancel a bedroom
|
45
|
+
#
|
46
|
+
# @param bedroom [BookingSync::API::Resource|Integer] Bedroom or ID
|
47
|
+
# of the bedroom to be canceled.
|
48
|
+
# @return [NilClass] Returns nil on success.
|
49
|
+
def cancel_bedroom(bedroom)
|
50
|
+
delete "bedrooms/#{bedroom}"
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe BookingSync::API::Client::Bathrooms do
|
4
|
+
|
5
|
+
let(:client) { BookingSync::API::Client.new(test_access_token) }
|
6
|
+
|
7
|
+
describe ".bathrooms", :vcr do
|
8
|
+
it "returns bathrooms" do
|
9
|
+
expect(client.bathrooms).not_to be_empty
|
10
|
+
assert_requested :get, bs_url("bathrooms")
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe ".create_bathroom", :vcr do
|
15
|
+
let(:attributes) {{
|
16
|
+
name_en: "New bathroom",
|
17
|
+
wc: true
|
18
|
+
}}
|
19
|
+
let(:rental) { BookingSync::API::Resource.new(client, id: 5116) }
|
20
|
+
|
21
|
+
it "creates a new bathroom" do
|
22
|
+
client.create_bathroom(rental, attributes)
|
23
|
+
assert_requested :post, bs_url("rentals/5116/bathrooms"),
|
24
|
+
body: { bathrooms: [attributes] }.to_json
|
25
|
+
end
|
26
|
+
|
27
|
+
it "returns newly created bathroom" do
|
28
|
+
VCR.use_cassette('BookingSync_API_Client_Bathrooms/_create_bathroom/creates_a_new_bathroom') do
|
29
|
+
bathroom = client.create_bathroom(rental, attributes)
|
30
|
+
expect(bathroom.name).to eql({ en: "New bathroom" })
|
31
|
+
expect(bathroom.wc).to eql(attributes[:wc])
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
describe ".edit_bathroom", :vcr do
|
37
|
+
let(:attributes) {
|
38
|
+
{ name_en: "Updated bathroom" }
|
39
|
+
}
|
40
|
+
|
41
|
+
it "updates given bathroom by ID" do
|
42
|
+
client.edit_bathroom(729, attributes)
|
43
|
+
assert_requested :put, bs_url("bathrooms/729"),
|
44
|
+
body: { bathrooms: [attributes] }.to_json
|
45
|
+
end
|
46
|
+
|
47
|
+
it "returns updated bathroom" do
|
48
|
+
VCR.use_cassette('BookingSync_API_Client_Bathrooms/_edit_bathroom/updates_given_bathroom_by_ID') do
|
49
|
+
bathroom = client.edit_bathroom(729, attributes)
|
50
|
+
expect(bathroom).to be_kind_of(BookingSync::API::Resource)
|
51
|
+
expect(bathroom.name).to eq({ en: "Updated bathroom", fr: "Salle de bain 1" })
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
describe ".cancel_bathroom", :vcr do
|
57
|
+
it "cancels given bathroom" do
|
58
|
+
client.cancel_bathroom(729)
|
59
|
+
assert_requested :delete, bs_url("bathrooms/729")
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe BookingSync::API::Client::Bedrooms do
|
4
|
+
|
5
|
+
let(:client) { BookingSync::API::Client.new(test_access_token) }
|
6
|
+
|
7
|
+
describe ".bedrooms", :vcr do
|
8
|
+
it "returns bedrooms" do
|
9
|
+
expect(client.bedrooms).not_to be_empty
|
10
|
+
assert_requested :get, bs_url("bedrooms")
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe ".create_bedroom", :vcr do
|
15
|
+
let(:attributes) {{
|
16
|
+
name_en: "New bedroom",
|
17
|
+
sofa_beds_count: 2
|
18
|
+
}}
|
19
|
+
let(:rental) { BookingSync::API::Resource.new(client, id: 5116) }
|
20
|
+
|
21
|
+
it "creates a new bedroom" do
|
22
|
+
client.create_bedroom(rental, attributes)
|
23
|
+
assert_requested :post, bs_url("rentals/5116/bedrooms"),
|
24
|
+
body: { bedrooms: [attributes] }.to_json
|
25
|
+
end
|
26
|
+
|
27
|
+
it "returns newly created bedroom" do
|
28
|
+
VCR.use_cassette('BookingSync_API_Client_Bedrooms/_create_bedroom/creates_a_new_bedroom') do
|
29
|
+
bedroom = client.create_bedroom(rental, attributes)
|
30
|
+
expect(bedroom.name).to eql({ en: "New bedroom" })
|
31
|
+
expect(bedroom.sofa_beds_count).to eql(attributes[:sofa_beds_count])
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
describe ".edit_bedroom", :vcr do
|
37
|
+
let(:attributes) {
|
38
|
+
{ name_en: "Updated bedroom" }
|
39
|
+
}
|
40
|
+
|
41
|
+
it "updates given bedroom by ID" do
|
42
|
+
client.edit_bedroom(944, attributes)
|
43
|
+
assert_requested :put, bs_url("bedrooms/944"),
|
44
|
+
body: { bedrooms: [attributes] }.to_json
|
45
|
+
end
|
46
|
+
|
47
|
+
it "returns updated bedroom" do
|
48
|
+
VCR.use_cassette('BookingSync_API_Client_Bedrooms/_edit_bedroom/updates_given_bedroom_by_ID') do
|
49
|
+
bedroom = client.edit_bedroom(944, attributes)
|
50
|
+
expect(bedroom).to be_kind_of(BookingSync::API::Resource)
|
51
|
+
expect(bedroom.name).to eq({ en: "Updated bedroom", fr: "Chambre 1" })
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
describe ".cancel_bedroom", :vcr do
|
57
|
+
it "cancels given bedroom" do
|
58
|
+
client.cancel_bedroom(944)
|
59
|
+
assert_requested :delete, bs_url("bedrooms/944")
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
data/spec/fixtures/cassettes/BookingSync_API_Client_Bathrooms/_bathrooms/returns_bathrooms.yml
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.bookingsync.com/api/v3/bathrooms
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BookingSync API gem v0.0.28
|
12
|
+
Accept:
|
13
|
+
- application/vnd.api+json
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.api+json
|
16
|
+
Authorization:
|
17
|
+
- Bearer <<ACCESS_TOKEN>>
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx
|
27
|
+
Date:
|
28
|
+
- Tue, 08 Sep 2015 18:55:44 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/vnd.api+json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Status:
|
36
|
+
- 200 OK
|
37
|
+
Strict-Transport-Security:
|
38
|
+
- max-age=31536000
|
39
|
+
X-Frame-Options:
|
40
|
+
- SAMEORIGIN
|
41
|
+
X-Xss-Protection:
|
42
|
+
- 1; mode=block
|
43
|
+
X-Content-Type-Options:
|
44
|
+
- nosniff
|
45
|
+
X-Ratelimit-Limit:
|
46
|
+
- '1000'
|
47
|
+
X-Ratelimit-Reset:
|
48
|
+
- '1441738800'
|
49
|
+
X-Ratelimit-Remaining:
|
50
|
+
- '965'
|
51
|
+
Link:
|
52
|
+
- <https://www.bookingsync.com/api/v3/bathrooms?page=1>; rel="first", <https://www.bookingsync.com/api/v3/bathrooms?page=1>;
|
53
|
+
rel="last"
|
54
|
+
X-Total-Pages:
|
55
|
+
- '1'
|
56
|
+
X-Total-Count:
|
57
|
+
- '4'
|
58
|
+
Etag:
|
59
|
+
- '"c09fe447113ac4b772b09b6d87c8cbf1"'
|
60
|
+
Cache-Control:
|
61
|
+
- max-age=0, private, must-revalidate
|
62
|
+
P3p:
|
63
|
+
- CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
|
64
|
+
OUR SAMi OTRo UNRo PUBi IND UNI STA"
|
65
|
+
Set-Cookie:
|
66
|
+
- ahoy_track=true; path=/; secure
|
67
|
+
- ahoy_visit=15617461-601e-4ee1-a52a-ac1f7a6d7e14; path=/; expires=Tue, 15 Sep
|
68
|
+
2015 18:55:44 -0000; secure
|
69
|
+
- ahoy_visitor=9e776b5c-99e4-4a02-9029-df1f4e875294; path=/; expires=Fri, 08
|
70
|
+
Sep 2017 18:55:44 -0000; secure
|
71
|
+
X-Request-Id:
|
72
|
+
- a235dbc9-e6a4-4434-80d0-10c70cf49cd2
|
73
|
+
X-Runtime:
|
74
|
+
- '0.092549'
|
75
|
+
body:
|
76
|
+
encoding: UTF-8
|
77
|
+
string: '{"links":{"bathrooms.rental":"https://www.bookingsync.com/api/v3/rentals/{bathrooms.rental}"},"bathrooms":[{"links":{"rental":5116},"id":730,"name":{"en":"Bathroom
|
78
|
+
2","fr":"Salle de bain 2"},"wc":false,"shower":false,"bath":false,"created_at":"2015-08-31T19:52:34Z","updated_at":"2015-08-31T19:52:34Z"},{"links":{"rental":5116},"id":729,"name":{"en":"Bathroom
|
79
|
+
1","fr":"Salle de bain 1"},"wc":false,"shower":false,"bath":false,"created_at":"2015-08-31T19:52:34Z","updated_at":"2015-08-31T19:52:34Z"},{"links":{"rental":5117},"id":732,"name":{"en":"Bathroom
|
80
|
+
2","fr":"Salle de bain 2"},"wc":false,"shower":false,"bath":false,"created_at":"2015-08-31T19:52:34Z","updated_at":"2015-08-31T19:52:34Z"},{"links":{"rental":5117},"id":731,"name":{"en":"Bathroom
|
81
|
+
1","fr":"Salle de bain 1"},"wc":false,"shower":false,"bath":false,"created_at":"2015-08-31T19:52:34Z","updated_at":"2015-08-31T19:52:34Z"}]}'
|
82
|
+
http_version:
|
83
|
+
recorded_at: Tue, 08 Sep 2015 18:55:45 GMT
|
84
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,67 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: delete
|
5
|
+
uri: https://www.bookingsync.com/api/v3/bathrooms/729
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: "{}"
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BookingSync API gem v0.0.28
|
12
|
+
Accept:
|
13
|
+
- application/vnd.api+json
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.api+json
|
16
|
+
Authorization:
|
17
|
+
- Bearer <<ACCESS_TOKEN>>
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 204
|
23
|
+
message: No Content
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx
|
27
|
+
Date:
|
28
|
+
- Tue, 08 Sep 2015 18:55:46 GMT
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Status:
|
32
|
+
- 204 No Content
|
33
|
+
Strict-Transport-Security:
|
34
|
+
- max-age=31536000
|
35
|
+
X-Frame-Options:
|
36
|
+
- SAMEORIGIN
|
37
|
+
X-Xss-Protection:
|
38
|
+
- 1; mode=block
|
39
|
+
X-Content-Type-Options:
|
40
|
+
- nosniff
|
41
|
+
X-Ratelimit-Limit:
|
42
|
+
- '1000'
|
43
|
+
X-Ratelimit-Reset:
|
44
|
+
- '1441738800'
|
45
|
+
X-Ratelimit-Remaining:
|
46
|
+
- '962'
|
47
|
+
Cache-Control:
|
48
|
+
- no-cache
|
49
|
+
P3p:
|
50
|
+
- CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
|
51
|
+
OUR SAMi OTRo UNRo PUBi IND UNI STA"
|
52
|
+
Set-Cookie:
|
53
|
+
- ahoy_track=true; path=/; secure
|
54
|
+
- ahoy_visit=a0eded4a-7bdb-4e1f-bc72-4772ca219297; path=/; expires=Tue, 15 Sep
|
55
|
+
2015 18:55:46 -0000; secure
|
56
|
+
- ahoy_visitor=1fda0dcb-880b-4831-afcb-8b724396df3a; path=/; expires=Fri, 08
|
57
|
+
Sep 2017 18:55:46 -0000; secure
|
58
|
+
X-Request-Id:
|
59
|
+
- a1454b77-b31c-419b-8925-0ea3d4411e3c
|
60
|
+
X-Runtime:
|
61
|
+
- '0.061494'
|
62
|
+
body:
|
63
|
+
encoding: UTF-8
|
64
|
+
string: ''
|
65
|
+
http_version:
|
66
|
+
recorded_at: Tue, 08 Sep 2015 18:55:47 GMT
|
67
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,76 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://www.bookingsync.com/api/v3/rentals/5116/bathrooms
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"bathrooms":[{"name_en":"New bathroom","wc":true}]}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BookingSync API gem v0.0.28
|
12
|
+
Accept:
|
13
|
+
- application/vnd.api+json
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.api+json
|
16
|
+
Authorization:
|
17
|
+
- Bearer <<ACCESS_TOKEN>>
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx
|
27
|
+
Date:
|
28
|
+
- Tue, 08 Sep 2015 18:55:45 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/vnd.api+json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Status:
|
36
|
+
- 201 Created
|
37
|
+
Strict-Transport-Security:
|
38
|
+
- max-age=31536000
|
39
|
+
X-Frame-Options:
|
40
|
+
- SAMEORIGIN
|
41
|
+
X-Xss-Protection:
|
42
|
+
- 1; mode=block
|
43
|
+
X-Content-Type-Options:
|
44
|
+
- nosniff
|
45
|
+
X-Ratelimit-Limit:
|
46
|
+
- '1000'
|
47
|
+
X-Ratelimit-Reset:
|
48
|
+
- '1441738800'
|
49
|
+
X-Ratelimit-Remaining:
|
50
|
+
- '964'
|
51
|
+
Location:
|
52
|
+
- https://www.bookingsync.com/api/v3/bathrooms/8729
|
53
|
+
Etag:
|
54
|
+
- '"bdd3245a67be587735129a92ce4b48f7"'
|
55
|
+
Cache-Control:
|
56
|
+
- max-age=0, private, must-revalidate
|
57
|
+
P3p:
|
58
|
+
- CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
|
59
|
+
OUR SAMi OTRo UNRo PUBi IND UNI STA"
|
60
|
+
Set-Cookie:
|
61
|
+
- ahoy_track=true; path=/; secure
|
62
|
+
- ahoy_visit=2d5cd6c4-5d61-4ac9-9bf0-7e8168d56865; path=/; expires=Tue, 15 Sep
|
63
|
+
2015 18:55:45 -0000; secure
|
64
|
+
- ahoy_visitor=ce5ecb20-0e5f-495b-92d8-69f0fb1a9bed; path=/; expires=Fri, 08
|
65
|
+
Sep 2017 18:55:45 -0000; secure
|
66
|
+
X-Request-Id:
|
67
|
+
- f75f91a9-40f8-44a5-aba7-9ad9016cb9be
|
68
|
+
X-Runtime:
|
69
|
+
- '0.110989'
|
70
|
+
body:
|
71
|
+
encoding: UTF-8
|
72
|
+
string: '{"links":{"bathrooms.rental":"https://www.bookingsync.com/api/v3/rentals/{bathrooms.rental}"},"bathrooms":[{"links":{"rental":5116},"id":8729,"name":{"en":"New
|
73
|
+
bathroom"},"wc":true,"shower":false,"bath":false,"created_at":"2015-09-08T18:55:45Z","updated_at":"2015-09-08T18:55:45Z"}]}'
|
74
|
+
http_version:
|
75
|
+
recorded_at: Tue, 08 Sep 2015 18:55:46 GMT
|
76
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,74 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://www.bookingsync.com/api/v3/bathrooms/729
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"bathrooms":[{"name_en":"Updated bathroom"}]}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BookingSync API gem v0.0.28
|
12
|
+
Accept:
|
13
|
+
- application/vnd.api+json
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.api+json
|
16
|
+
Authorization:
|
17
|
+
- Bearer <<ACCESS_TOKEN>>
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx
|
27
|
+
Date:
|
28
|
+
- Tue, 08 Sep 2015 18:55:45 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/vnd.api+json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Status:
|
36
|
+
- 200 OK
|
37
|
+
Strict-Transport-Security:
|
38
|
+
- max-age=31536000
|
39
|
+
X-Frame-Options:
|
40
|
+
- SAMEORIGIN
|
41
|
+
X-Xss-Protection:
|
42
|
+
- 1; mode=block
|
43
|
+
X-Content-Type-Options:
|
44
|
+
- nosniff
|
45
|
+
X-Ratelimit-Limit:
|
46
|
+
- '1000'
|
47
|
+
X-Ratelimit-Reset:
|
48
|
+
- '1441738800'
|
49
|
+
X-Ratelimit-Remaining:
|
50
|
+
- '963'
|
51
|
+
Etag:
|
52
|
+
- '"cc0a5790f3de1b03539f6d7196b4dd17"'
|
53
|
+
Cache-Control:
|
54
|
+
- max-age=0, private, must-revalidate
|
55
|
+
P3p:
|
56
|
+
- CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
|
57
|
+
OUR SAMi OTRo UNRo PUBi IND UNI STA"
|
58
|
+
Set-Cookie:
|
59
|
+
- ahoy_track=true; path=/; secure
|
60
|
+
- ahoy_visit=3d945b32-0531-4f47-ab47-6f259c33e32a; path=/; expires=Tue, 15 Sep
|
61
|
+
2015 18:55:45 -0000; secure
|
62
|
+
- ahoy_visitor=576185ac-10e1-4443-9a22-7cf342d035d0; path=/; expires=Fri, 08
|
63
|
+
Sep 2017 18:55:45 -0000; secure
|
64
|
+
X-Request-Id:
|
65
|
+
- 9484c8bc-0350-4f98-bd79-2926d70b8a6c
|
66
|
+
X-Runtime:
|
67
|
+
- '0.137241'
|
68
|
+
body:
|
69
|
+
encoding: UTF-8
|
70
|
+
string: '{"links":{"bathrooms.rental":"https://www.bookingsync.com/api/v3/rentals/{bathrooms.rental}"},"bathrooms":[{"links":{"rental":5116},"id":729,"name":{"en":"Updated
|
71
|
+
bathroom","fr":"Salle de bain 1"},"wc":false,"shower":false,"bath":false,"created_at":"2015-08-31T19:52:34Z","updated_at":"2015-09-08T18:55:45Z"}]}'
|
72
|
+
http_version:
|
73
|
+
recorded_at: Tue, 08 Sep 2015 18:55:46 GMT
|
74
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,86 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.bookingsync.com/api/v3/bedrooms
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BookingSync API gem v0.0.28
|
12
|
+
Accept:
|
13
|
+
- application/vnd.api+json
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.api+json
|
16
|
+
Authorization:
|
17
|
+
- Bearer <<ACCESS_TOKEN>>
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx
|
27
|
+
Date:
|
28
|
+
- Tue, 08 Sep 2015 18:31:55 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/vnd.api+json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Status:
|
36
|
+
- 200 OK
|
37
|
+
Strict-Transport-Security:
|
38
|
+
- max-age=31536000
|
39
|
+
X-Frame-Options:
|
40
|
+
- SAMEORIGIN
|
41
|
+
X-Xss-Protection:
|
42
|
+
- 1; mode=block
|
43
|
+
X-Content-Type-Options:
|
44
|
+
- nosniff
|
45
|
+
X-Ratelimit-Limit:
|
46
|
+
- '1000'
|
47
|
+
X-Ratelimit-Reset:
|
48
|
+
- '1441738800'
|
49
|
+
X-Ratelimit-Remaining:
|
50
|
+
- '969'
|
51
|
+
Link:
|
52
|
+
- <https://www.bookingsync.com/api/v3/bedrooms?page=1>; rel="first", <https://www.bookingsync.com/api/v3/bedrooms?page=1>;
|
53
|
+
rel="last"
|
54
|
+
X-Total-Pages:
|
55
|
+
- '1'
|
56
|
+
X-Total-Count:
|
57
|
+
- '6'
|
58
|
+
Etag:
|
59
|
+
- '"0cdf18e4a868760cf1c5d354dbb9466f"'
|
60
|
+
Cache-Control:
|
61
|
+
- max-age=0, private, must-revalidate
|
62
|
+
P3p:
|
63
|
+
- CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
|
64
|
+
OUR SAMi OTRo UNRo PUBi IND UNI STA"
|
65
|
+
Set-Cookie:
|
66
|
+
- ahoy_track=true; path=/; secure
|
67
|
+
- ahoy_visit=079e4d80-57c0-4704-b6c8-fbba71c29a8c; path=/; expires=Tue, 15 Sep
|
68
|
+
2015 18:31:55 -0000; secure
|
69
|
+
- ahoy_visitor=ab0f02d6-ed71-4989-b044-5e1a393d9a8b; path=/; expires=Fri, 08
|
70
|
+
Sep 2017 18:31:55 -0000; secure
|
71
|
+
X-Request-Id:
|
72
|
+
- 21ac0a29-9a83-479c-9845-c09d71b4cc3e
|
73
|
+
X-Runtime:
|
74
|
+
- '0.090052'
|
75
|
+
body:
|
76
|
+
encoding: UTF-8
|
77
|
+
string: '{"links":{"bedrooms.rental":"https://www.bookingsync.com/api/v3/rentals/{bedrooms.rental}"},"bedrooms":[{"links":{"rental":5116},"id":7367,"name":{"en":"New
|
78
|
+
bedroom"},"bunk_beds_count":0,"double_beds_count":0,"kingsize_beds_count":0,"queensize_beds_count":0,"single_beds_count":0,"sofa_beds_count":0,"created_at":"2015-09-08T18:30:04Z","updated_at":"2015-09-08T18:30:04Z"},{"links":{"rental":5116},"id":7366,"name":{"en":"New
|
79
|
+
bedroom"},"bunk_beds_count":0,"double_beds_count":0,"kingsize_beds_count":0,"queensize_beds_count":0,"single_beds_count":0,"sofa_beds_count":0,"created_at":"2015-09-08T18:28:21Z","updated_at":"2015-09-08T18:28:21Z"},{"links":{"rental":5116},"id":7365,"name":{"en":"New
|
80
|
+
bedroom"},"bunk_beds_count":0,"double_beds_count":0,"kingsize_beds_count":0,"queensize_beds_count":0,"single_beds_count":0,"sofa_beds_count":0,"created_at":"2015-09-08T18:26:01Z","updated_at":"2015-09-08T18:26:01Z"},{"links":{"rental":5116},"id":7364,"name":{"en":"New
|
81
|
+
bedroom"},"bunk_beds_count":0,"double_beds_count":0,"kingsize_beds_count":0,"queensize_beds_count":0,"single_beds_count":0,"sofa_beds_count":0,"created_at":"2015-09-08T18:23:39Z","updated_at":"2015-09-08T18:23:39Z"},{"links":{"rental":5116},"id":945,"name":{"en":"Bedroom
|
82
|
+
2","fr":"Chambre 2"},"bunk_beds_count":0,"double_beds_count":0,"kingsize_beds_count":0,"queensize_beds_count":0,"single_beds_count":0,"sofa_beds_count":0,"created_at":"2015-08-12T22:23:31Z","updated_at":"2015-08-12T22:23:31Z"},{"links":{"rental":5116},"id":944,"name":{"en":"Updated
|
83
|
+
bedroom","fr":"Chambre 1"},"bunk_beds_count":0,"double_beds_count":0,"kingsize_beds_count":0,"queensize_beds_count":0,"single_beds_count":0,"sofa_beds_count":0,"created_at":"2015-08-12T22:23:31Z","updated_at":"2015-09-08T18:30:09Z"}]}'
|
84
|
+
http_version:
|
85
|
+
recorded_at: Tue, 08 Sep 2015 18:31:57 GMT
|
86
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,67 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: delete
|
5
|
+
uri: https://www.bookingsync.com/api/v3/bedrooms/944
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: "{}"
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BookingSync API gem v0.0.28
|
12
|
+
Accept:
|
13
|
+
- application/vnd.api+json
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.api+json
|
16
|
+
Authorization:
|
17
|
+
- Bearer <<ACCESS_TOKEN>>
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 204
|
23
|
+
message: No Content
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx
|
27
|
+
Date:
|
28
|
+
- Tue, 08 Sep 2015 18:32:06 GMT
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Status:
|
32
|
+
- 204 No Content
|
33
|
+
Strict-Transport-Security:
|
34
|
+
- max-age=31536000
|
35
|
+
X-Frame-Options:
|
36
|
+
- SAMEORIGIN
|
37
|
+
X-Xss-Protection:
|
38
|
+
- 1; mode=block
|
39
|
+
X-Content-Type-Options:
|
40
|
+
- nosniff
|
41
|
+
X-Ratelimit-Limit:
|
42
|
+
- '1000'
|
43
|
+
X-Ratelimit-Reset:
|
44
|
+
- '1441738800'
|
45
|
+
X-Ratelimit-Remaining:
|
46
|
+
- '966'
|
47
|
+
Cache-Control:
|
48
|
+
- no-cache
|
49
|
+
P3p:
|
50
|
+
- CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
|
51
|
+
OUR SAMi OTRo UNRo PUBi IND UNI STA"
|
52
|
+
Set-Cookie:
|
53
|
+
- ahoy_track=true; path=/; secure
|
54
|
+
- ahoy_visit=47214c11-207b-400c-a097-62e293ec279c; path=/; expires=Tue, 15 Sep
|
55
|
+
2015 18:32:06 -0000; secure
|
56
|
+
- ahoy_visitor=5ebdb49a-330d-40c9-b1fb-3f927530485c; path=/; expires=Fri, 08
|
57
|
+
Sep 2017 18:32:06 -0000; secure
|
58
|
+
X-Request-Id:
|
59
|
+
- 0b0ef3a9-db71-42a9-96f4-6c809aa48403
|
60
|
+
X-Runtime:
|
61
|
+
- '0.050484'
|
62
|
+
body:
|
63
|
+
encoding: UTF-8
|
64
|
+
string: ''
|
65
|
+
http_version:
|
66
|
+
recorded_at: Tue, 08 Sep 2015 18:32:07 GMT
|
67
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,76 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://www.bookingsync.com/api/v3/rentals/5116/bedrooms
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"bedrooms":[{"name_en":"New bedroom","sofa_beds_count":2}]}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BookingSync API gem v0.0.28
|
12
|
+
Accept:
|
13
|
+
- application/vnd.api+json
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.api+json
|
16
|
+
Authorization:
|
17
|
+
- Bearer <<ACCESS_TOKEN>>
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx
|
27
|
+
Date:
|
28
|
+
- Tue, 08 Sep 2015 18:32:00 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/vnd.api+json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Status:
|
36
|
+
- 201 Created
|
37
|
+
Strict-Transport-Security:
|
38
|
+
- max-age=31536000
|
39
|
+
X-Frame-Options:
|
40
|
+
- SAMEORIGIN
|
41
|
+
X-Xss-Protection:
|
42
|
+
- 1; mode=block
|
43
|
+
X-Content-Type-Options:
|
44
|
+
- nosniff
|
45
|
+
X-Ratelimit-Limit:
|
46
|
+
- '1000'
|
47
|
+
X-Ratelimit-Reset:
|
48
|
+
- '1441738800'
|
49
|
+
X-Ratelimit-Remaining:
|
50
|
+
- '968'
|
51
|
+
Location:
|
52
|
+
- https://www.bookingsync.com/api/v3/bedrooms/7368
|
53
|
+
Etag:
|
54
|
+
- '"5202ae8ea158342886c8c73b4f9a5688"'
|
55
|
+
Cache-Control:
|
56
|
+
- max-age=0, private, must-revalidate
|
57
|
+
P3p:
|
58
|
+
- CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
|
59
|
+
OUR SAMi OTRo UNRo PUBi IND UNI STA"
|
60
|
+
Set-Cookie:
|
61
|
+
- ahoy_track=true; path=/; secure
|
62
|
+
- ahoy_visit=dd282f48-1dce-4c5f-9239-66128775eba0; path=/; expires=Tue, 15 Sep
|
63
|
+
2015 18:31:59 -0000; secure
|
64
|
+
- ahoy_visitor=bc5e403e-b0e3-490f-b47f-916b1bd9f85b; path=/; expires=Fri, 08
|
65
|
+
Sep 2017 18:31:59 -0000; secure
|
66
|
+
X-Request-Id:
|
67
|
+
- b885a767-919a-4060-9a01-3f80b689e2c8
|
68
|
+
X-Runtime:
|
69
|
+
- '0.088645'
|
70
|
+
body:
|
71
|
+
encoding: UTF-8
|
72
|
+
string: '{"links":{"bedrooms.rental":"https://www.bookingsync.com/api/v3/rentals/{bedrooms.rental}"},"bedrooms":[{"links":{"rental":5116},"id":7368,"name":{"en":"New
|
73
|
+
bedroom"},"bunk_beds_count":0,"double_beds_count":0,"kingsize_beds_count":0,"queensize_beds_count":0,"single_beds_count":0,"sofa_beds_count":2,"created_at":"2015-09-08T18:31:59Z","updated_at":"2015-09-08T18:31:59Z"}]}'
|
74
|
+
http_version:
|
75
|
+
recorded_at: Tue, 08 Sep 2015 18:32:01 GMT
|
76
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,74 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://www.bookingsync.com/api/v3/bedrooms/944
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"bedrooms":[{"name_en":"Updated bedroom"}]}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BookingSync API gem v0.0.28
|
12
|
+
Accept:
|
13
|
+
- application/vnd.api+json
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.api+json
|
16
|
+
Authorization:
|
17
|
+
- Bearer <<ACCESS_TOKEN>>
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx
|
27
|
+
Date:
|
28
|
+
- Tue, 08 Sep 2015 18:32:02 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/vnd.api+json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Status:
|
36
|
+
- 200 OK
|
37
|
+
Strict-Transport-Security:
|
38
|
+
- max-age=31536000
|
39
|
+
X-Frame-Options:
|
40
|
+
- SAMEORIGIN
|
41
|
+
X-Xss-Protection:
|
42
|
+
- 1; mode=block
|
43
|
+
X-Content-Type-Options:
|
44
|
+
- nosniff
|
45
|
+
X-Ratelimit-Limit:
|
46
|
+
- '1000'
|
47
|
+
X-Ratelimit-Reset:
|
48
|
+
- '1441738800'
|
49
|
+
X-Ratelimit-Remaining:
|
50
|
+
- '967'
|
51
|
+
Etag:
|
52
|
+
- '"71ea099e0acfa2f393786825ca27e6b9"'
|
53
|
+
Cache-Control:
|
54
|
+
- max-age=0, private, must-revalidate
|
55
|
+
P3p:
|
56
|
+
- CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
|
57
|
+
OUR SAMi OTRo UNRo PUBi IND UNI STA"
|
58
|
+
Set-Cookie:
|
59
|
+
- ahoy_track=true; path=/; secure
|
60
|
+
- ahoy_visit=9cddf87b-2fd9-4059-8f23-4a9baae57397; path=/; expires=Tue, 15 Sep
|
61
|
+
2015 18:32:02 -0000; secure
|
62
|
+
- ahoy_visitor=4ef6e17e-327f-454b-9d2e-219356cb45d1; path=/; expires=Fri, 08
|
63
|
+
Sep 2017 18:32:02 -0000; secure
|
64
|
+
X-Request-Id:
|
65
|
+
- 6be78d61-e9ca-4ba6-8f75-030ca02121b5
|
66
|
+
X-Runtime:
|
67
|
+
- '0.096654'
|
68
|
+
body:
|
69
|
+
encoding: UTF-8
|
70
|
+
string: '{"links":{"bedrooms.rental":"https://www.bookingsync.com/api/v3/rentals/{bedrooms.rental}"},"bedrooms":[{"links":{"rental":5116},"id":944,"name":{"en":"Updated
|
71
|
+
bedroom","fr":"Chambre 1"},"bunk_beds_count":0,"double_beds_count":0,"kingsize_beds_count":0,"queensize_beds_count":0,"single_beds_count":0,"sofa_beds_count":0,"created_at":"2015-08-12T22:23:31Z","updated_at":"2015-09-08T18:30:09Z"}]}'
|
72
|
+
http_version:
|
73
|
+
recorded_at: Tue, 08 Sep 2015 18:32:03 GMT
|
74
|
+
recorded_with: VCR 2.9.2
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bookingsync-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sébastien Grosjean
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -103,6 +103,8 @@ files:
|
|
103
103
|
- lib/bookingsync/api/client/accounts.rb
|
104
104
|
- lib/bookingsync/api/client/amenities.rb
|
105
105
|
- lib/bookingsync/api/client/availabilities.rb
|
106
|
+
- lib/bookingsync/api/client/bathrooms.rb
|
107
|
+
- lib/bookingsync/api/client/bedrooms.rb
|
106
108
|
- lib/bookingsync/api/client/billing_addresses.rb
|
107
109
|
- lib/bookingsync/api/client/bookings.rb
|
108
110
|
- lib/bookingsync/api/client/bookings_fees.rb
|
@@ -138,6 +140,8 @@ files:
|
|
138
140
|
- spec/bookingsync/api/client/accounts_spec.rb
|
139
141
|
- spec/bookingsync/api/client/amenities_spec.rb
|
140
142
|
- spec/bookingsync/api/client/availabilities_spec.rb
|
143
|
+
- spec/bookingsync/api/client/bathrooms_spec.rb
|
144
|
+
- spec/bookingsync/api/client/bedrooms_spec.rb
|
141
145
|
- spec/bookingsync/api/client/billing_addresses_spec.rb
|
142
146
|
- spec/bookingsync/api/client/billings_payments_spec.rb
|
143
147
|
- spec/bookingsync/api/client/bookings_fees_spec.rb
|
@@ -174,6 +178,14 @@ files:
|
|
174
178
|
- spec/fixtures/cassettes/BookingSync_API_Client_Amenities/_amenity/returns_amenity.yml
|
175
179
|
- spec/fixtures/cassettes/BookingSync_API_Client_Availabilities/_availabilities/returns_availabilities.yml
|
176
180
|
- spec/fixtures/cassettes/BookingSync_API_Client_Availabilities/_availability/returns_a_single_availability.yml
|
181
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_Bathrooms/_bathrooms/returns_bathrooms.yml
|
182
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_Bathrooms/_cancel_bathroom/cancels_given_bathroom.yml
|
183
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_Bathrooms/_create_bathroom/creates_a_new_bathroom.yml
|
184
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_Bathrooms/_edit_bathroom/updates_given_bathroom_by_ID.yml
|
185
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_bedrooms/returns_bedrooms.yml
|
186
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_cancel_bedroom/cancels_given_bedroom.yml
|
187
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_create_bedroom/creates_a_new_bedroom.yml
|
188
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_edit_bedroom/updates_given_bedroom_by_ID.yml
|
177
189
|
- spec/fixtures/cassettes/BookingSync_API_Client_BillingAddresses/_billing_addresses/returns_billing_addresses.yml
|
178
190
|
- spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_booking/returns_a_single_booking.yml
|
179
191
|
- spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_booking/returns_a_single_canceled_booking.yml
|
@@ -285,6 +297,8 @@ test_files:
|
|
285
297
|
- spec/bookingsync/api/client/accounts_spec.rb
|
286
298
|
- spec/bookingsync/api/client/amenities_spec.rb
|
287
299
|
- spec/bookingsync/api/client/availabilities_spec.rb
|
300
|
+
- spec/bookingsync/api/client/bathrooms_spec.rb
|
301
|
+
- spec/bookingsync/api/client/bedrooms_spec.rb
|
288
302
|
- spec/bookingsync/api/client/billing_addresses_spec.rb
|
289
303
|
- spec/bookingsync/api/client/billings_payments_spec.rb
|
290
304
|
- spec/bookingsync/api/client/bookings_fees_spec.rb
|
@@ -321,6 +335,14 @@ test_files:
|
|
321
335
|
- spec/fixtures/cassettes/BookingSync_API_Client_Amenities/_amenity/returns_amenity.yml
|
322
336
|
- spec/fixtures/cassettes/BookingSync_API_Client_Availabilities/_availabilities/returns_availabilities.yml
|
323
337
|
- spec/fixtures/cassettes/BookingSync_API_Client_Availabilities/_availability/returns_a_single_availability.yml
|
338
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_Bathrooms/_bathrooms/returns_bathrooms.yml
|
339
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_Bathrooms/_cancel_bathroom/cancels_given_bathroom.yml
|
340
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_Bathrooms/_create_bathroom/creates_a_new_bathroom.yml
|
341
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_Bathrooms/_edit_bathroom/updates_given_bathroom_by_ID.yml
|
342
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_bedrooms/returns_bedrooms.yml
|
343
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_cancel_bedroom/cancels_given_bedroom.yml
|
344
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_create_bedroom/creates_a_new_bedroom.yml
|
345
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_edit_bedroom/updates_given_bedroom_by_ID.yml
|
324
346
|
- spec/fixtures/cassettes/BookingSync_API_Client_BillingAddresses/_billing_addresses/returns_billing_addresses.yml
|
325
347
|
- spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_booking/returns_a_single_booking.yml
|
326
348
|
- spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_booking/returns_a_single_canceled_booking.yml
|