bookingsync-api 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bookingsync/api/client.rb +6 -0
- data/lib/bookingsync/api/client/amenities.rb +10 -3
- data/lib/bookingsync/api/client/rentals_amenities.rb +29 -0
- data/lib/bookingsync/api/client/seasons.rb +1 -1
- data/lib/bookingsync/api/version.rb +1 -1
- data/spec/bookingsync/api/client/amenities_spec.rb +7 -0
- data/spec/bookingsync/api/client/rentals_amenities_spec.rb +31 -0
- data/spec/bookingsync/api/client/rentals_spec.rb +6 -0
- data/spec/bookingsync/api/client_spec.rb +17 -2
- data/spec/fixtures/cassettes/BookingSync_API_Client_Amenities/_amenity/returns_amenity.yml +64 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Periods/_delete_period/deletes_given_period.yml +1 -1
- data/spec/fixtures/cassettes/BookingSync_API_Client_Photos/_create_photo/creates_a_photo.yml +2 -2
- data/spec/fixtures/cassettes/BookingSync_API_Client_Photos/_create_photo/creates_a_photo_with_encoded_photo_file.yml +2 -2
- data/spec/fixtures/cassettes/BookingSync_API_Client_Photos/_create_photo/creates_a_photo_with_photo_path.yml +2 -2
- data/spec/fixtures/cassettes/BookingSync_API_Client_Photos/_create_photo/creates_a_photo_with_remote_URL.yml +2 -2
- data/spec/fixtures/cassettes/BookingSync_API_Client_Photos/_edit_photo/updates_photo_s_description.yml +1 -1
- data/spec/fixtures/cassettes/BookingSync_API_Client_Photos/_edit_photo/updates_photo_s_image_file.yml +1 -1
- data/spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals/returns_rentals_by_ids.yml +68 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenities/links/returns_associated_amenity.yml +125 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenities/links/returns_associated_rental.yml +126 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenities/returns_rentals_amenities.yml +64 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenity/returns_rentals_amenity.yml +64 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98d1348e74ca630a88fa244d4db2d7c07e7d30e6
|
4
|
+
data.tar.gz: 47a60b07a38870adac4ffa2384f1517e309ff325
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23ad739a4107d71f91d6c23d13958da8496dd94cc9439f972fd4549b05946371554ee8160d646553ccc2324c1b54fd083823d8ebff4ba55d0cddd43bcbf13388
|
7
|
+
data.tar.gz: 636095a26314b7ec855de9eddc3f44e3c08e1edfda4d86e74dd6a541927ebc6b0366644507bf8e53cfe41717fd861c08002dbad7b2d3f412d7cdae4ef3aa3318
|
@@ -14,6 +14,7 @@ require "bookingsync/api/client/rates"
|
|
14
14
|
require "bookingsync/api/client/rates_rules"
|
15
15
|
require "bookingsync/api/client/rates_tables"
|
16
16
|
require "bookingsync/api/client/rentals"
|
17
|
+
require "bookingsync/api/client/rentals_amenities"
|
17
18
|
require "bookingsync/api/client/rental_agreements"
|
18
19
|
require "bookingsync/api/client/reviews"
|
19
20
|
require "bookingsync/api/client/seasons"
|
@@ -41,6 +42,7 @@ module BookingSync::API
|
|
41
42
|
include BookingSync::API::Client::RatesRules
|
42
43
|
include BookingSync::API::Client::RatesTables
|
43
44
|
include BookingSync::API::Client::Rentals
|
45
|
+
include BookingSync::API::Client::RentalsAmenities
|
44
46
|
include BookingSync::API::Client::RentalAgreements
|
45
47
|
include BookingSync::API::Client::Reviews
|
46
48
|
include BookingSync::API::Client::Seasons
|
@@ -190,6 +192,10 @@ module BookingSync::API
|
|
190
192
|
options ||= {}
|
191
193
|
|
192
194
|
if options.has_key?(:query)
|
195
|
+
if options[:query].has_key?(:ids)
|
196
|
+
ids = Array(options[:query].delete(:ids)).join(',')
|
197
|
+
path = "#{path}/#{ids}"
|
198
|
+
end
|
193
199
|
options[:query].keys.each do |key|
|
194
200
|
if options[:query][key].is_a?(Array)
|
195
201
|
options[:query][key] = options[:query][key].join(",")
|
@@ -3,7 +3,7 @@ module BookingSync::API
|
|
3
3
|
module Amenities
|
4
4
|
# List amenities
|
5
5
|
#
|
6
|
-
# Returns amenities
|
6
|
+
# Returns all amenities supported in BookingSync.
|
7
7
|
# @param options [Hash] A customizable set of options.
|
8
8
|
# @option options [Array] fields: List of fields to be fetched.
|
9
9
|
# @return [Array<BookingSync::API::Resource>] Array of amenities.
|
@@ -11,12 +11,19 @@ module BookingSync::API
|
|
11
11
|
# @example Get the list of amenities for the current account
|
12
12
|
# amenities = @api.amenities
|
13
13
|
# amenities.first.title # => "Internet"
|
14
|
-
# @example Get the list of amenities only with title and rental_id for smaller response
|
15
|
-
# @api.amenities(fields: [:title, :rental_id])
|
16
14
|
# @see http://docs.api.bookingsync.com/reference/endpoints/amenities/#list-amenities
|
17
15
|
def amenities(options = {}, &block)
|
18
16
|
paginate :amenities, options, &block
|
19
17
|
end
|
18
|
+
|
19
|
+
# Get a single amenity
|
20
|
+
#
|
21
|
+
# @param amenity [BookingSync::API::Resource|Integer] Amenity or ID
|
22
|
+
# of the amenity.
|
23
|
+
# @return [BookingSync::API::Resource]
|
24
|
+
def amenity(amenity)
|
25
|
+
get("amenities/#{amenity}").pop
|
26
|
+
end
|
20
27
|
end
|
21
28
|
end
|
22
29
|
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module BookingSync::API
|
2
|
+
class Client
|
3
|
+
module RentalsAmenities
|
4
|
+
# List rentals_amenities
|
5
|
+
#
|
6
|
+
# Returns all amenities used by rentals for the current account.
|
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 rentals_amenities.
|
10
|
+
#
|
11
|
+
# @example Get the list of amenities for the current account
|
12
|
+
# rentals_amenities = @api.rentals_amenities
|
13
|
+
# rentals_amenities.first.amenity.title # => "Internet"
|
14
|
+
# @see http://docs.api.bookingsync.com/reference/endpoints/rentals_amenities/#list-rentals-amenities
|
15
|
+
def rentals_amenities(options = {}, &block)
|
16
|
+
paginate :rentals_amenities, options, &block
|
17
|
+
end
|
18
|
+
|
19
|
+
# Get a single rentals_amenity
|
20
|
+
#
|
21
|
+
# @param rentals_amenity [BookingSync::API::Resource|Integer]
|
22
|
+
# rentals_amenity or ID of the rentals_amenity.
|
23
|
+
# @return [BookingSync::API::Resource]
|
24
|
+
def rentals_amenity(rentals_amenity)
|
25
|
+
get("rentals_amenities/#{rentals_amenity}").pop
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -20,7 +20,7 @@ module BookingSync::API
|
|
20
20
|
|
21
21
|
# Create a new season
|
22
22
|
#
|
23
|
-
# @param
|
23
|
+
# @param rates_table [BookingSync::API::Resource|Integer] Rates table
|
24
24
|
# or ID of the rates table for which a season will be created.
|
25
25
|
# @param options [Hash] Season's attributes.
|
26
26
|
# @return [BookingSync::API::Resource] Newly created season.
|
@@ -9,4 +9,11 @@ describe BookingSync::API::Client::Amenities do
|
|
9
9
|
assert_requested :get, bs_url("amenities")
|
10
10
|
end
|
11
11
|
end
|
12
|
+
|
13
|
+
describe ".amenity", :vcr do
|
14
|
+
it "returns amenity" do
|
15
|
+
amenity = client.amenity(2)
|
16
|
+
expect(amenity.title).to eql("tv")
|
17
|
+
end
|
18
|
+
end
|
12
19
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe BookingSync::API::Client::RentalsAmenities do
|
4
|
+
let(:client) { BookingSync::API::Client.new(test_access_token) }
|
5
|
+
|
6
|
+
describe ".rentals_amenities", :vcr do
|
7
|
+
it "returns rentals amenities" do
|
8
|
+
expect(client.rentals_amenities).not_to be_empty
|
9
|
+
assert_requested :get, bs_url("rentals_amenities")
|
10
|
+
end
|
11
|
+
|
12
|
+
describe "links" do
|
13
|
+
it "returns associated rental" do
|
14
|
+
rentals_amenity = client.rentals_amenities.first
|
15
|
+
expect(rentals_amenity.rental).not_to be_empty
|
16
|
+
end
|
17
|
+
|
18
|
+
it "returns associated amenity" do
|
19
|
+
rentals_amenity = client.rentals_amenities.first
|
20
|
+
expect(rentals_amenity.amenity).not_to be_empty
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
describe ".rentals_amenity", :vcr do
|
26
|
+
it "returns rentals_amenity" do
|
27
|
+
amenity = client.rentals_amenity(1)
|
28
|
+
assert_requested :get, bs_url("rentals_amenities/1")
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -9,6 +9,12 @@ describe BookingSync::API::Client::Rentals do
|
|
9
9
|
assert_requested :get, bs_url("rentals")
|
10
10
|
end
|
11
11
|
|
12
|
+
it "returns rentals by ids" do
|
13
|
+
rentals = client.rentals(ids: [26, 28])
|
14
|
+
expect(rentals.size).to eql(2)
|
15
|
+
assert_requested :get, bs_url("rentals/26,28")
|
16
|
+
end
|
17
|
+
|
12
18
|
describe "links" do
|
13
19
|
it "returns associated photos" do
|
14
20
|
rental = client.rentals.first
|
@@ -166,6 +166,14 @@ describe BookingSync::API::Client do
|
|
166
166
|
end
|
167
167
|
end
|
168
168
|
|
169
|
+
context "user wants to fetch only specific ids" do
|
170
|
+
it "constructs url for given ids" do
|
171
|
+
stub_get("resources/1,3,4")
|
172
|
+
client.get("resources", ids: [1, 3, 4])
|
173
|
+
assert_requested :get, bs_url("resources/1,3,4")
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
169
177
|
context "user passes additional query options" do
|
170
178
|
it "constructs url with query options" do
|
171
179
|
stub_get("resource?months=12&status=booked,unavailable")
|
@@ -182,8 +190,15 @@ describe BookingSync::API::Client do
|
|
182
190
|
end
|
183
191
|
|
184
192
|
context "user specifies base URL via BOOKINGSYNC_URL env" do
|
185
|
-
|
193
|
+
before do
|
186
194
|
ENV["BOOKINGSYNC_URL"] = "https://bookingsync.dev"
|
195
|
+
end
|
196
|
+
|
197
|
+
after do
|
198
|
+
ENV["BOOKINGSYNC_URL"] = nil
|
199
|
+
end
|
200
|
+
|
201
|
+
it "returns custom URL to the API" do
|
187
202
|
expect(client.api_endpoint).to eql("https://bookingsync.dev/api/v3")
|
188
203
|
end
|
189
204
|
end
|
@@ -199,7 +214,7 @@ describe BookingSync::API::Client do
|
|
199
214
|
stub_get("resources", body: {"resources" => [{id: 1}, {id: 2}]}.to_json)
|
200
215
|
client.get("resources")
|
201
216
|
messages = log.rewind && log.read
|
202
|
-
expect(messages).to include("GET https://bookingsync.
|
217
|
+
expect(messages).to include("GET https://www.bookingsync.com/api/v3/resources")
|
203
218
|
end
|
204
219
|
|
205
220
|
context "BOOKINGSYNC_API_DEBUG env variable set to true" do
|
@@ -0,0 +1,64 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.bookingsync.com/api/v3/amenities/2
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
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
|
+
X-Ratelimit-Limit:
|
26
|
+
- '1000'
|
27
|
+
X-Ratelimit-Reset:
|
28
|
+
- '1401202800'
|
29
|
+
X-Ratelimit-Remaining:
|
30
|
+
- '999'
|
31
|
+
Link:
|
32
|
+
- <https://www.bookingsync.com/api/v3/amenities/2?page=1>; rel="first", <https://www.bookingsync.com/api/v3/amenities/2?page=1>;
|
33
|
+
rel="last"
|
34
|
+
X-Total-Pages:
|
35
|
+
- '1'
|
36
|
+
Access-Control-Allow-Origin:
|
37
|
+
- "*"
|
38
|
+
Access-Control-Request-Method:
|
39
|
+
- "*"
|
40
|
+
Content-Type:
|
41
|
+
- application/vnd.api+json; charset=utf-8
|
42
|
+
X-Ua-Compatible:
|
43
|
+
- IE=Edge
|
44
|
+
Etag:
|
45
|
+
- '"d38feaf36a065c3a61be13696bdf4db8"'
|
46
|
+
Cache-Control:
|
47
|
+
- max-age=0, private, must-revalidate
|
48
|
+
P3p:
|
49
|
+
- CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
|
50
|
+
OUR SAMi OTRo UNRo PUBi IND UNI STA"
|
51
|
+
X-Request-Id:
|
52
|
+
- e66e31c259208721eefb8644e8fd01b3
|
53
|
+
X-Runtime:
|
54
|
+
- '0.086610'
|
55
|
+
Date:
|
56
|
+
- Tue, 27 May 2014 14:00:19 GMT
|
57
|
+
Connection:
|
58
|
+
- close
|
59
|
+
body:
|
60
|
+
encoding: UTF-8
|
61
|
+
string: '{"amenities":[{"id":2,"title":"tv"}]}'
|
62
|
+
http_version:
|
63
|
+
recorded_at: Tue, 27 May 2014 14:00:19 GMT
|
64
|
+
recorded_with: VCR 2.9.1
|
data/spec/fixtures/cassettes/BookingSync_API_Client_Photos/_create_photo/creates_a_photo.yml
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://bookingsync.
|
5
|
+
uri: https://www.bookingsync.com/api/v3/rentals/2/photos
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: '{"photos":[{"description_en":"Funny","kind":"livingroom","photo":"/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsL\nDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/\n2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy\nMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAFABQDASIAAhEBAxEB/8QA\nHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUF\nBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkK\nFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1\ndnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXG\nx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEB\nAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAEC\nAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRom\nJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOE\nhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU\n1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiigAoo\nooA//9k=\n"}]}'
|
@@ -29,7 +29,7 @@ http_interactions:
|
|
29
29
|
X-Ratelimit-Remaining:
|
30
30
|
- '960'
|
31
31
|
Location:
|
32
|
-
- https://bookingsync.
|
32
|
+
- https://www.bookingsync.com/api/v3/photos/37
|
33
33
|
Access-Control-Allow-Origin:
|
34
34
|
- '*'
|
35
35
|
Access-Control-Request-Method:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://bookingsync.
|
5
|
+
uri: https://www.bookingsync.com/api/v3/rentals/2/photos
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: '{"photos":[{"photo":"/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsL\nDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/\n2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy\nMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAFABQDASIAAhEBAxEB/8QA\nHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUF\nBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkK\nFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1\ndnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXG\nx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEB\nAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAEC\nAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRom\nJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOE\nhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU\n1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiigAoo\nooA//9k=\n","kind":"livingroom"}]}'
|
@@ -29,7 +29,7 @@ http_interactions:
|
|
29
29
|
X-Ratelimit-Remaining:
|
30
30
|
- '962'
|
31
31
|
Location:
|
32
|
-
- https://bookingsync.
|
32
|
+
- https://www.bookingsync.com/api/v3/photos/35
|
33
33
|
Access-Control-Allow-Origin:
|
34
34
|
- '*'
|
35
35
|
Access-Control-Request-Method:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://bookingsync.
|
5
|
+
uri: https://www.bookingsync.com/api/v3/rentals/2/photos
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: '{"photos":[{"description_en":"Funny","kind":"livingroom","photo":"/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsL\nDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/\n2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy\nMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAFABQDASIAAhEBAxEB/8QA\nHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUF\nBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkK\nFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1\ndnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXG\nx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEB\nAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAEC\nAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRom\nJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOE\nhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU\n1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiigAoo\nooA//9k=\n"}]}'
|
@@ -29,7 +29,7 @@ http_interactions:
|
|
29
29
|
X-Ratelimit-Remaining:
|
30
30
|
- '963'
|
31
31
|
Location:
|
32
|
-
- https://bookingsync.
|
32
|
+
- https://www.bookingsync.com/api/v3/photos/34
|
33
33
|
Access-Control-Allow-Origin:
|
34
34
|
- '*'
|
35
35
|
Access-Control-Request-Method:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://bookingsync.
|
5
|
+
uri: https://www.bookingsync.com/api/v3/rentals/2/photos
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: '{"photos":[{"remote_photo_url":"https://www.ruby-lang.org/images/header-ruby-logo.png","kind":"livingroom"}]}'
|
@@ -29,7 +29,7 @@ http_interactions:
|
|
29
29
|
X-Ratelimit-Remaining:
|
30
30
|
- '961'
|
31
31
|
Location:
|
32
|
-
- https://bookingsync.
|
32
|
+
- https://www.bookingsync.com/api/v3/photos/36
|
33
33
|
Access-Control-Allow-Origin:
|
34
34
|
- '*'
|
35
35
|
Access-Control-Request-Method:
|
data/spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals/returns_rentals_by_ids.yml
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.bookingsync.com/api/v3/rentals/26,28
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
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
|
+
X-Ratelimit-Limit:
|
26
|
+
- '1000'
|
27
|
+
X-Ratelimit-Reset:
|
28
|
+
- '1401213600'
|
29
|
+
X-Ratelimit-Remaining:
|
30
|
+
- '995'
|
31
|
+
Link:
|
32
|
+
- <https://www.bookingsync.com/api/v3/rentals/26,28?page=1>; rel="first", <https://www.bookingsync.com/api/v3/rentals/26,28?page=1>;
|
33
|
+
rel="last"
|
34
|
+
X-Total-Pages:
|
35
|
+
- '1'
|
36
|
+
Access-Control-Allow-Origin:
|
37
|
+
- "*"
|
38
|
+
Access-Control-Request-Method:
|
39
|
+
- "*"
|
40
|
+
Content-Type:
|
41
|
+
- application/vnd.api+json; charset=utf-8
|
42
|
+
X-Ua-Compatible:
|
43
|
+
- IE=Edge
|
44
|
+
Etag:
|
45
|
+
- '"d4e1087b3d3c8f53b50094dbfd6451f4"'
|
46
|
+
Cache-Control:
|
47
|
+
- max-age=0, private, must-revalidate
|
48
|
+
P3p:
|
49
|
+
- CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
|
50
|
+
OUR SAMi OTRo UNRo PUBi IND UNI STA"
|
51
|
+
X-Request-Id:
|
52
|
+
- 02b91f60682136fd3a239a3d4391a4f1
|
53
|
+
X-Runtime:
|
54
|
+
- '0.191607'
|
55
|
+
Date:
|
56
|
+
- Tue, 27 May 2014 17:53:12 GMT
|
57
|
+
Connection:
|
58
|
+
- close
|
59
|
+
body:
|
60
|
+
encoding: UTF-8
|
61
|
+
string: '{"links":{"rentals.account":"https://www.bookingsync.com/api/v3/accounts/{rentals.account}","rentals.destination":"https://www.bookingsync.com/api/v3/destinations/{rentals.destination}","rentals.rates_table":"https://www.bookingsync.com/api/v3/rates_tables/{rentals.rates_table}","rentals.rental_agreement":"https://www.bookingsync.com/api/v3/rental_agreements/{rentals.rental_agreement}","rentals.photos":"https://www.bookingsync.com/api/v3/photos/{rentals.photos}","rentals.reviews":"https://www.bookingsync.com/api/v3/reviews/{rentals.reviews}","rentals.special_offers":"https://www.bookingsync.com/api/v3/special_offers/{rentals.special_offers}","rentals.rates":"https://www.bookingsync.com/api/v3/rates/{rentals.rates}","rentals.amenities":"https://www.bookingsync.com/api/v3/amenities/{rentals.amenities}"},"rentals":[{"links":{"account":42,"destination":13,"rates_table":25,"rental_agreement":null,"photos":[13],"reviews":[],"special_offers":[],"rates":[],"amenities":[]},"id":26,"name":"2
|
62
|
+
ducimus est","headline":{"en":null},"summary":{"en":null},"description":{"en":null},"rental_type":"villa","units":1,"bedrooms_count":null,"sleeps":7,"sleeps_max":null,"bathrooms_count":3,"surface":120,"bookable_online":false,"min_price":700,"max_price":700,"price_kind":"weekly","currency":"EUR","price_public_notes":{"en":null},"lat":45.02,"lng":6.6,"city":"Nevache","state":null,"country":"France","contact_name":"Contact
|
63
|
+
Fullname","reviews_count":0,"reviews_average_rating":null,"created_at":"2014-02-10T15:32:21Z","updated_at":"2014-02-10T15:32:22Z","address1":null,"address2":null,"zip":null,"checkin_time":16,"checkout_time":10},{"links":{"account":42,"destination":14,"rates_table":27,"rental_agreement":null,"photos":[14],"reviews":[],"special_offers":[],"rates":[],"amenities":[]},"id":28,"name":"3
|
64
|
+
et","headline":{"en":null},"summary":{"en":null},"description":{"en":null},"rental_type":"villa","units":1,"bedrooms_count":null,"sleeps":7,"sleeps_max":null,"bathrooms_count":3,"surface":120,"bookable_online":false,"min_price":700,"max_price":700,"price_kind":"weekly","currency":"EUR","price_public_notes":{"en":null},"lat":45.02,"lng":6.6,"city":"Nevache","state":null,"country":"France","contact_name":"Contact
|
65
|
+
Fullname","reviews_count":0,"reviews_average_rating":null,"created_at":"2014-02-10T15:32:24Z","updated_at":"2014-02-10T15:32:25Z","address1":null,"address2":null,"zip":null,"checkin_time":16,"checkout_time":10}]}'
|
66
|
+
http_version:
|
67
|
+
recorded_at: Tue, 27 May 2014 17:53:12 GMT
|
68
|
+
recorded_with: VCR 2.9.0
|
@@ -0,0 +1,125 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.bookingsync.com/api/v3/rentals_amenities
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
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
|
+
X-Ratelimit-Limit:
|
26
|
+
- '1000'
|
27
|
+
X-Ratelimit-Reset:
|
28
|
+
- '1401202800'
|
29
|
+
X-Ratelimit-Remaining:
|
30
|
+
- '992'
|
31
|
+
Link:
|
32
|
+
- <https://www.bookingsync.com/api/v3/rentals_amenities?page=1>; rel="first", <https://www.bookingsync.com/api/v3/rentals_amenities?page=1>;
|
33
|
+
rel="last"
|
34
|
+
X-Total-Pages:
|
35
|
+
- '1'
|
36
|
+
Access-Control-Allow-Origin:
|
37
|
+
- "*"
|
38
|
+
Access-Control-Request-Method:
|
39
|
+
- "*"
|
40
|
+
Content-Type:
|
41
|
+
- application/vnd.api+json; charset=utf-8
|
42
|
+
X-Ua-Compatible:
|
43
|
+
- IE=Edge
|
44
|
+
Etag:
|
45
|
+
- '"ae2467cb53532417eefd56d80bf4d1ff"'
|
46
|
+
Cache-Control:
|
47
|
+
- max-age=0, private, must-revalidate
|
48
|
+
P3p:
|
49
|
+
- CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
|
50
|
+
OUR SAMi OTRo UNRo PUBi IND UNI STA"
|
51
|
+
X-Request-Id:
|
52
|
+
- 8297d24ac49878ced50f6dc6167adb68
|
53
|
+
X-Runtime:
|
54
|
+
- '0.072612'
|
55
|
+
Date:
|
56
|
+
- Tue, 27 May 2014 14:05:28 GMT
|
57
|
+
Connection:
|
58
|
+
- close
|
59
|
+
body:
|
60
|
+
encoding: UTF-8
|
61
|
+
string: '{"links":{"rentals_amenities.amenity":"https://www.bookingsync.com/api/v3/amenities/{rentals_amenities.amenity}","rentals_amenities.rental":"https://www.bookingsync.com/api/v3/rentals/{rentals_amenities.rental}"},"rentals_amenities":[{"links":{"amenity":1,"rental":67},"id":1}]}'
|
62
|
+
http_version:
|
63
|
+
recorded_at: Tue, 27 May 2014 14:05:28 GMT
|
64
|
+
- request:
|
65
|
+
method: get
|
66
|
+
uri: https://www.bookingsync.com/api/v3/amenities/1
|
67
|
+
body:
|
68
|
+
encoding: US-ASCII
|
69
|
+
string: ''
|
70
|
+
headers:
|
71
|
+
User-Agent:
|
72
|
+
- Faraday v0.9.0
|
73
|
+
Accept:
|
74
|
+
- application/vnd.api+json
|
75
|
+
Content-Type:
|
76
|
+
- application/vnd.api+json
|
77
|
+
Authorization:
|
78
|
+
- Bearer <<ACCESS_TOKEN>>
|
79
|
+
Accept-Encoding:
|
80
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
81
|
+
response:
|
82
|
+
status:
|
83
|
+
code: 200
|
84
|
+
message: OK
|
85
|
+
headers:
|
86
|
+
X-Ratelimit-Limit:
|
87
|
+
- '1000'
|
88
|
+
X-Ratelimit-Reset:
|
89
|
+
- '1401202800'
|
90
|
+
X-Ratelimit-Remaining:
|
91
|
+
- '991'
|
92
|
+
Link:
|
93
|
+
- <https://www.bookingsync.com/api/v3/amenities/1?page=1>; rel="first", <https://www.bookingsync.com/api/v3/amenities/1?page=1>;
|
94
|
+
rel="last"
|
95
|
+
X-Total-Pages:
|
96
|
+
- '1'
|
97
|
+
Access-Control-Allow-Origin:
|
98
|
+
- "*"
|
99
|
+
Access-Control-Request-Method:
|
100
|
+
- "*"
|
101
|
+
Content-Type:
|
102
|
+
- application/vnd.api+json; charset=utf-8
|
103
|
+
X-Ua-Compatible:
|
104
|
+
- IE=Edge
|
105
|
+
Etag:
|
106
|
+
- '"b0d2e7221e50f0c65b3f4d017b992d1e"'
|
107
|
+
Cache-Control:
|
108
|
+
- max-age=0, private, must-revalidate
|
109
|
+
P3p:
|
110
|
+
- CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
|
111
|
+
OUR SAMi OTRo UNRo PUBi IND UNI STA"
|
112
|
+
X-Request-Id:
|
113
|
+
- 62550b20eecde802047bd5a9593034e4
|
114
|
+
X-Runtime:
|
115
|
+
- '0.068027'
|
116
|
+
Date:
|
117
|
+
- Tue, 27 May 2014 14:05:28 GMT
|
118
|
+
Connection:
|
119
|
+
- close
|
120
|
+
body:
|
121
|
+
encoding: UTF-8
|
122
|
+
string: '{"amenities":[{"id":1,"title":"internet"}]}'
|
123
|
+
http_version:
|
124
|
+
recorded_at: Tue, 27 May 2014 14:05:28 GMT
|
125
|
+
recorded_with: VCR 2.9.1
|
@@ -0,0 +1,126 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.bookingsync.com/api/v3/rentals_amenities
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
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
|
+
X-Ratelimit-Limit:
|
26
|
+
- '1000'
|
27
|
+
X-Ratelimit-Reset:
|
28
|
+
- '1401202800'
|
29
|
+
X-Ratelimit-Remaining:
|
30
|
+
- '994'
|
31
|
+
Link:
|
32
|
+
- <https://www.bookingsync.com/api/v3/rentals_amenities?page=1>; rel="first", <https://www.bookingsync.com/api/v3/rentals_amenities?page=1>;
|
33
|
+
rel="last"
|
34
|
+
X-Total-Pages:
|
35
|
+
- '1'
|
36
|
+
Access-Control-Allow-Origin:
|
37
|
+
- "*"
|
38
|
+
Access-Control-Request-Method:
|
39
|
+
- "*"
|
40
|
+
Content-Type:
|
41
|
+
- application/vnd.api+json; charset=utf-8
|
42
|
+
X-Ua-Compatible:
|
43
|
+
- IE=Edge
|
44
|
+
Etag:
|
45
|
+
- '"ae2467cb53532417eefd56d80bf4d1ff"'
|
46
|
+
Cache-Control:
|
47
|
+
- max-age=0, private, must-revalidate
|
48
|
+
P3p:
|
49
|
+
- CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
|
50
|
+
OUR SAMi OTRo UNRo PUBi IND UNI STA"
|
51
|
+
X-Request-Id:
|
52
|
+
- 028b3920e5ba80a9a254fbdc8dba3cda
|
53
|
+
X-Runtime:
|
54
|
+
- '0.094834'
|
55
|
+
Date:
|
56
|
+
- Tue, 27 May 2014 14:05:26 GMT
|
57
|
+
Connection:
|
58
|
+
- close
|
59
|
+
body:
|
60
|
+
encoding: UTF-8
|
61
|
+
string: '{"links":{"rentals_amenities.amenity":"https://www.bookingsync.com/api/v3/amenities/{rentals_amenities.amenity}","rentals_amenities.rental":"https://www.bookingsync.com/api/v3/rentals/{rentals_amenities.rental}"},"rentals_amenities":[{"links":{"amenity":1,"rental":67},"id":1}]}'
|
62
|
+
http_version:
|
63
|
+
recorded_at: Tue, 27 May 2014 14:05:26 GMT
|
64
|
+
- request:
|
65
|
+
method: get
|
66
|
+
uri: https://www.bookingsync.com/api/v3/rentals/67
|
67
|
+
body:
|
68
|
+
encoding: US-ASCII
|
69
|
+
string: ''
|
70
|
+
headers:
|
71
|
+
User-Agent:
|
72
|
+
- Faraday v0.9.0
|
73
|
+
Accept:
|
74
|
+
- application/vnd.api+json
|
75
|
+
Content-Type:
|
76
|
+
- application/vnd.api+json
|
77
|
+
Authorization:
|
78
|
+
- Bearer <<ACCESS_TOKEN>>
|
79
|
+
Accept-Encoding:
|
80
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
81
|
+
response:
|
82
|
+
status:
|
83
|
+
code: 200
|
84
|
+
message: OK
|
85
|
+
headers:
|
86
|
+
X-Ratelimit-Limit:
|
87
|
+
- '1000'
|
88
|
+
X-Ratelimit-Reset:
|
89
|
+
- '1401202800'
|
90
|
+
X-Ratelimit-Remaining:
|
91
|
+
- '993'
|
92
|
+
Link:
|
93
|
+
- <https://www.bookingsync.com/api/v3/rentals/67?page=1>; rel="first", <https://www.bookingsync.com/api/v3/rentals/67?page=1>;
|
94
|
+
rel="last"
|
95
|
+
X-Total-Pages:
|
96
|
+
- '1'
|
97
|
+
Access-Control-Allow-Origin:
|
98
|
+
- "*"
|
99
|
+
Access-Control-Request-Method:
|
100
|
+
- "*"
|
101
|
+
Content-Type:
|
102
|
+
- application/vnd.api+json; charset=utf-8
|
103
|
+
X-Ua-Compatible:
|
104
|
+
- IE=Edge
|
105
|
+
Etag:
|
106
|
+
- '"3ea506e8ca0a27d845a900e853bf8813"'
|
107
|
+
Cache-Control:
|
108
|
+
- max-age=0, private, must-revalidate
|
109
|
+
P3p:
|
110
|
+
- CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
|
111
|
+
OUR SAMi OTRo UNRo PUBi IND UNI STA"
|
112
|
+
X-Request-Id:
|
113
|
+
- 81e2bf87a432103b66ada90d5d64950c
|
114
|
+
X-Runtime:
|
115
|
+
- '1.159624'
|
116
|
+
Date:
|
117
|
+
- Tue, 27 May 2014 14:05:27 GMT
|
118
|
+
Connection:
|
119
|
+
- close
|
120
|
+
body:
|
121
|
+
encoding: UTF-8
|
122
|
+
string: '{"links":{"rentals.account":"https://www.bookingsync.com/api/v3/accounts/{rentals.account}","rentals.destination":"https://www.bookingsync.com/api/v3/destinations/{rentals.destination}","rentals.rates_table":"https://www.bookingsync.com/api/v3/rates_tables/{rentals.rates_table}","rentals.rental_agreement":"https://www.bookingsync.com/api/v3/rental_agreements/{rentals.rental_agreement}","rentals.photos":"https://www.bookingsync.com/api/v3/photos/{rentals.photos}","rentals.reviews":"https://www.bookingsync.com/api/v3/reviews/{rentals.reviews}","rentals.special_offers":"https://www.bookingsync.com/api/v3/special_offers/{rentals.special_offers}","rentals.rates":"https://www.bookingsync.com/api/v3/rates/{rentals.rates}","rentals.rentals_amenities":"https://www.bookingsync.com/api/v3/rentals_amenities/{rentals.rentals_amenities}"},"rentals":[{"links":{"account":1,"destination":null,"rates_table":null,"rental_agreement":null,"photos":[],"reviews":[],"special_offers":[],"rates":[],"rentals_amenities":[1]},"id":67,"name":"New
|
123
|
+
Rental","headline":{"en":null},"summary":{"en":null},"description":{"en":null},"rental_type":null,"units":1,"bedrooms_count":null,"sleeps":null,"sleeps_max":null,"bathrooms_count":null,"surface":null,"bookable_online":false,"min_price":null,"max_price":null,"price_kind":null,"currency":null,"price_public_notes":{"en":null},"lat":null,"lng":null,"city":null,"state":null,"country":"","contact_name":null,"reviews_count":0,"reviews_average_rating":null,"created_at":"2014-04-09T09:17:14Z","updated_at":"2014-05-27T14:04:54Z","address1":null,"address2":null,"zip":null,"checkin_time":16,"checkout_time":10}]}'
|
124
|
+
http_version:
|
125
|
+
recorded_at: Tue, 27 May 2014 14:05:27 GMT
|
126
|
+
recorded_with: VCR 2.9.1
|
@@ -0,0 +1,64 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.bookingsync.com/api/v3/rentals_amenities
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
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
|
+
X-Ratelimit-Limit:
|
26
|
+
- '1000'
|
27
|
+
X-Ratelimit-Reset:
|
28
|
+
- '1401202800'
|
29
|
+
X-Ratelimit-Remaining:
|
30
|
+
- '995'
|
31
|
+
Link:
|
32
|
+
- <https://www.bookingsync.com/api/v3/rentals_amenities?page=1>; rel="first", <https://www.bookingsync.com/api/v3/rentals_amenities?page=1>;
|
33
|
+
rel="last"
|
34
|
+
X-Total-Pages:
|
35
|
+
- '1'
|
36
|
+
Access-Control-Allow-Origin:
|
37
|
+
- "*"
|
38
|
+
Access-Control-Request-Method:
|
39
|
+
- "*"
|
40
|
+
Content-Type:
|
41
|
+
- application/vnd.api+json; charset=utf-8
|
42
|
+
X-Ua-Compatible:
|
43
|
+
- IE=Edge
|
44
|
+
Etag:
|
45
|
+
- '"ae2467cb53532417eefd56d80bf4d1ff"'
|
46
|
+
Cache-Control:
|
47
|
+
- max-age=0, private, must-revalidate
|
48
|
+
P3p:
|
49
|
+
- CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
|
50
|
+
OUR SAMi OTRo UNRo PUBi IND UNI STA"
|
51
|
+
X-Request-Id:
|
52
|
+
- 748895fc0016124083b2f59ceb8e3516
|
53
|
+
X-Runtime:
|
54
|
+
- '0.095405'
|
55
|
+
Date:
|
56
|
+
- Tue, 27 May 2014 14:05:25 GMT
|
57
|
+
Connection:
|
58
|
+
- close
|
59
|
+
body:
|
60
|
+
encoding: UTF-8
|
61
|
+
string: '{"links":{"rentals_amenities.amenity":"https://www.bookingsync.com/api/v3/amenities/{rentals_amenities.amenity}","rentals_amenities.rental":"https://www.bookingsync.com/api/v3/rentals/{rentals_amenities.rental}"},"rentals_amenities":[{"links":{"amenity":1,"rental":67},"id":1}]}'
|
62
|
+
http_version:
|
63
|
+
recorded_at: Tue, 27 May 2014 14:05:26 GMT
|
64
|
+
recorded_with: VCR 2.9.1
|
@@ -0,0 +1,64 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.bookingsync.com/api/v3/rentals_amenities/1
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
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
|
+
X-Ratelimit-Limit:
|
26
|
+
- '1000'
|
27
|
+
X-Ratelimit-Reset:
|
28
|
+
- '1401202800'
|
29
|
+
X-Ratelimit-Remaining:
|
30
|
+
- '990'
|
31
|
+
Link:
|
32
|
+
- <https://www.bookingsync.com/api/v3/rentals_amenities/1?page=1>; rel="first",
|
33
|
+
<https://www.bookingsync.com/api/v3/rentals_amenities/1?page=1>; rel="last"
|
34
|
+
X-Total-Pages:
|
35
|
+
- '1'
|
36
|
+
Access-Control-Allow-Origin:
|
37
|
+
- "*"
|
38
|
+
Access-Control-Request-Method:
|
39
|
+
- "*"
|
40
|
+
Content-Type:
|
41
|
+
- application/vnd.api+json; charset=utf-8
|
42
|
+
X-Ua-Compatible:
|
43
|
+
- IE=Edge
|
44
|
+
Etag:
|
45
|
+
- '"ae2467cb53532417eefd56d80bf4d1ff"'
|
46
|
+
Cache-Control:
|
47
|
+
- max-age=0, private, must-revalidate
|
48
|
+
P3p:
|
49
|
+
- CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
|
50
|
+
OUR SAMi OTRo UNRo PUBi IND UNI STA"
|
51
|
+
X-Request-Id:
|
52
|
+
- 49e93f958863911171ae0f4ce2b701e2
|
53
|
+
X-Runtime:
|
54
|
+
- '0.074711'
|
55
|
+
Date:
|
56
|
+
- Tue, 27 May 2014 14:06:43 GMT
|
57
|
+
Connection:
|
58
|
+
- close
|
59
|
+
body:
|
60
|
+
encoding: UTF-8
|
61
|
+
string: '{"links":{"rentals_amenities.amenity":"https://www.bookingsync.com/api/v3/amenities/{rentals_amenities.amenity}","rentals_amenities.rental":"https://www.bookingsync.com/api/v3/rentals/{rentals_amenities.rental}"},"rentals_amenities":[{"links":{"amenity":1,"rental":67},"id":1}]}'
|
62
|
+
http_version:
|
63
|
+
recorded_at: Tue, 27 May 2014 14:06:43 GMT
|
64
|
+
recorded_with: VCR 2.9.1
|
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.10
|
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: 2014-05-
|
11
|
+
date: 2014-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -114,6 +114,7 @@ files:
|
|
114
114
|
- lib/bookingsync/api/client/rates_tables.rb
|
115
115
|
- lib/bookingsync/api/client/rental_agreements.rb
|
116
116
|
- lib/bookingsync/api/client/rentals.rb
|
117
|
+
- lib/bookingsync/api/client/rentals_amenities.rb
|
117
118
|
- lib/bookingsync/api/client/reviews.rb
|
118
119
|
- lib/bookingsync/api/client/seasons.rb
|
119
120
|
- lib/bookingsync/api/client/special_offers.rb
|
@@ -139,6 +140,7 @@ files:
|
|
139
140
|
- spec/bookingsync/api/client/rates_spec.rb
|
140
141
|
- spec/bookingsync/api/client/rates_tables_spec.rb
|
141
142
|
- spec/bookingsync/api/client/rental_agreements_spec.rb
|
143
|
+
- spec/bookingsync/api/client/rentals_amenities_spec.rb
|
142
144
|
- spec/bookingsync/api/client/rentals_spec.rb
|
143
145
|
- spec/bookingsync/api/client/reviews_spec.rb
|
144
146
|
- spec/bookingsync/api/client/seasons_spec.rb
|
@@ -149,6 +151,7 @@ files:
|
|
149
151
|
- spec/bookingsync/api/response_spec.rb
|
150
152
|
- spec/bookingsync/api_spec.rb
|
151
153
|
- spec/fixtures/cassettes/BookingSync_API_Client_Amenities/_amenities/returns_amenities.yml
|
154
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_Amenities/_amenity/returns_amenity.yml
|
152
155
|
- spec/fixtures/cassettes/BookingSync_API_Client_BillingAddresses/_billing_addresses/returns_billing_addresses.yml
|
153
156
|
- spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_bookings/pagination/with_a_block/yields_block_with_batch_of_bookings.yml
|
154
157
|
- spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_bookings/pagination/with_auto_paginate_true/returns_all_bookings_joined_from_many_requests.yml
|
@@ -197,6 +200,11 @@ files:
|
|
197
200
|
- spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals/links/returns_associated_photos.yml
|
198
201
|
- spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals/links/returns_links_to_associated_resources.yml
|
199
202
|
- spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals/returns_rentals.yml
|
203
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals/returns_rentals_by_ids.yml
|
204
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenities/links/returns_associated_amenity.yml
|
205
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenities/links/returns_associated_rental.yml
|
206
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenities/returns_rentals_amenities.yml
|
207
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenity/returns_rentals_amenity.yml
|
200
208
|
- spec/fixtures/cassettes/BookingSync_API_Client_Reviews/_create_review/creates_a_new_review.yml
|
201
209
|
- spec/fixtures/cassettes/BookingSync_API_Client_Reviews/_reviews/returns_reviews.yml
|
202
210
|
- spec/fixtures/cassettes/BookingSync_API_Client_Seasons/_create_season/creates_a_new_season.yml
|
@@ -249,6 +257,7 @@ test_files:
|
|
249
257
|
- spec/bookingsync/api/client/rates_spec.rb
|
250
258
|
- spec/bookingsync/api/client/rates_tables_spec.rb
|
251
259
|
- spec/bookingsync/api/client/rental_agreements_spec.rb
|
260
|
+
- spec/bookingsync/api/client/rentals_amenities_spec.rb
|
252
261
|
- spec/bookingsync/api/client/rentals_spec.rb
|
253
262
|
- spec/bookingsync/api/client/reviews_spec.rb
|
254
263
|
- spec/bookingsync/api/client/seasons_spec.rb
|
@@ -259,6 +268,7 @@ test_files:
|
|
259
268
|
- spec/bookingsync/api/response_spec.rb
|
260
269
|
- spec/bookingsync/api_spec.rb
|
261
270
|
- spec/fixtures/cassettes/BookingSync_API_Client_Amenities/_amenities/returns_amenities.yml
|
271
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_Amenities/_amenity/returns_amenity.yml
|
262
272
|
- spec/fixtures/cassettes/BookingSync_API_Client_BillingAddresses/_billing_addresses/returns_billing_addresses.yml
|
263
273
|
- spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_bookings/pagination/with_a_block/yields_block_with_batch_of_bookings.yml
|
264
274
|
- spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_bookings/pagination/with_auto_paginate_true/returns_all_bookings_joined_from_many_requests.yml
|
@@ -307,6 +317,11 @@ test_files:
|
|
307
317
|
- spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals/links/returns_associated_photos.yml
|
308
318
|
- spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals/links/returns_links_to_associated_resources.yml
|
309
319
|
- spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals/returns_rentals.yml
|
320
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals/returns_rentals_by_ids.yml
|
321
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenities/links/returns_associated_amenity.yml
|
322
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenities/links/returns_associated_rental.yml
|
323
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenities/returns_rentals_amenities.yml
|
324
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenity/returns_rentals_amenity.yml
|
310
325
|
- spec/fixtures/cassettes/BookingSync_API_Client_Reviews/_create_review/creates_a_new_review.yml
|
311
326
|
- spec/fixtures/cassettes/BookingSync_API_Client_Reviews/_reviews/returns_reviews.yml
|
312
327
|
- spec/fixtures/cassettes/BookingSync_API_Client_Seasons/_create_season/creates_a_new_season.yml
|