bookingsync-api 0.0.25 → 0.0.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile +1 -1
- data/bookingsync-api.gemspec +0 -1
- data/lib/bookingsync/api/client.rb +4 -1
- data/lib/bookingsync/api/client/instant_bookings.rb +13 -0
- data/lib/bookingsync/api/client/photos.rb +1 -1
- data/lib/bookingsync/api/client/rentals_amenities.rb +14 -1
- data/lib/bookingsync/api/relation.rb +3 -1
- data/lib/bookingsync/api/response.rb +0 -2
- data/lib/bookingsync/api/version.rb +1 -1
- data/spec/bookingsync/api/client/instant_bookings_spec.rb +43 -0
- data/spec/bookingsync/api/client/rentals_amenities_spec.rb +15 -0
- data/spec/bookingsync/api/relation_spec.rb +3 -3
- data/spec/fixtures/cassettes/BookingSync_API_Client_InstantBookings/_create_instant_booking/creates_a_booking.yml +68 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_create_rentals_amenity/creates_a_new_rental_s_amenity.yml +67 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_create_rentals_amenity/returns_newly_created_rental_s_amenity.yml +67 -0
- metadata +12 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51ffff302f82b77e6dd01697caa6e5ffef3ef0da
|
4
|
+
data.tar.gz: 6a66bfd98999e66de3d8092bfcbb410d5050e31f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4ff59a86c1755ca5854a8d0762d8ba934cf451dc67ab327f631dc2df24dbe812f8ddb44f6d5de1d0dc88c570c1a3cb093c492627792d53b8352d936bba9a43a
|
7
|
+
data.tar.gz: 72423d9d9d50e32df0bc4fe7f72f29b7e95e1b4f6f7f4f9b3a5eef1c78fc9fae9b7f9f3108f448de04431070beb1428e62a640e8f0a24c32637bfb07a4c65ff1
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/bookingsync-api.gemspec
CHANGED
@@ -19,7 +19,6 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_dependency "faraday", "~> 0.9"
|
22
|
-
spec.add_dependency "addressable"
|
23
22
|
spec.add_dependency "hashie"
|
24
23
|
spec.add_development_dependency "bundler", "~> 1.5"
|
25
24
|
spec.add_development_dependency "rake"
|
@@ -11,6 +11,7 @@ require "bookingsync/api/client/clients"
|
|
11
11
|
require "bookingsync/api/client/destinations"
|
12
12
|
require "bookingsync/api/client/fees"
|
13
13
|
require "bookingsync/api/client/inquiries"
|
14
|
+
require "bookingsync/api/client/instant_bookings"
|
14
15
|
require "bookingsync/api/client/periods"
|
15
16
|
require "bookingsync/api/client/payments"
|
16
17
|
require "bookingsync/api/client/photos"
|
@@ -32,6 +33,7 @@ require "bookingsync/api/response"
|
|
32
33
|
require "bookingsync/api/resource"
|
33
34
|
require "bookingsync/api/serializer"
|
34
35
|
require "logger"
|
36
|
+
require "addressable/template"
|
35
37
|
|
36
38
|
module BookingSync::API
|
37
39
|
class Client
|
@@ -48,6 +50,7 @@ module BookingSync::API
|
|
48
50
|
include BookingSync::API::Client::Destinations
|
49
51
|
include BookingSync::API::Client::Fees
|
50
52
|
include BookingSync::API::Client::Inquiries
|
53
|
+
include BookingSync::API::Client::InstantBookings
|
51
54
|
include BookingSync::API::Client::Periods
|
52
55
|
include BookingSync::API::Client::Payments
|
53
56
|
include BookingSync::API::Client::Photos
|
@@ -285,7 +288,7 @@ module BookingSync::API
|
|
285
288
|
# @param options [Hash] - Variables which will be used to expand
|
286
289
|
# @return [String] - Expanded URL
|
287
290
|
def expand_url(url, options = nil)
|
288
|
-
tpl = url.respond_to?(:expand) ? url : Addressable::Template.new(url.to_s)
|
291
|
+
tpl = url.respond_to?(:expand) ? url : ::Addressable::Template.new(url.to_s)
|
289
292
|
tpl.expand(options || {}).to_s
|
290
293
|
end
|
291
294
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module BookingSync::API
|
2
|
+
class Client
|
3
|
+
module InstantBookings
|
4
|
+
# Create an instant booking
|
5
|
+
#
|
6
|
+
# @param options [Hash] Booking attributes.
|
7
|
+
# @return [BookingSync::API::Resource] Newly created booking.
|
8
|
+
def create_instant_booking(options = {})
|
9
|
+
post("instant_bookings", bookings: [options]).pop
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -24,7 +24,7 @@ module BookingSync::API
|
|
24
24
|
#
|
25
25
|
# @param rental [BookingSync::API::Resource|Integer] Rental object or ID
|
26
26
|
# for which the photo will be created. Image can be provided in three
|
27
|
-
#
|
27
|
+
# ways, as a file path, encode string or as an URL.
|
28
28
|
# @param options [Hash] Photo's attributes.
|
29
29
|
# @option options [String] photo_path: Path to the image to be uploaded.
|
30
30
|
# @option options [String] photo: Photo encoded with Base64
|
@@ -11,7 +11,7 @@ module BookingSync::API
|
|
11
11
|
# @example Get the list of amenities for the current account
|
12
12
|
# rentals_amenities = @api.rentals_amenities
|
13
13
|
# rentals_amenities.first.amenity.title # => "Internet"
|
14
|
-
# @see http://
|
14
|
+
# @see http://developers.bookingsync.com/reference/endpoints/rentals_amenities/#list-rentals-amenities
|
15
15
|
def rentals_amenities(options = {}, &block)
|
16
16
|
paginate :rentals_amenities, options, &block
|
17
17
|
end
|
@@ -24,6 +24,19 @@ module BookingSync::API
|
|
24
24
|
def rentals_amenity(rentals_amenity)
|
25
25
|
get("rentals_amenities/#{rentals_amenity}").pop
|
26
26
|
end
|
27
|
+
|
28
|
+
# Create a rental's amenity
|
29
|
+
#
|
30
|
+
# @param rental [BookingSync::API::Resource|Integer] Rental object or ID
|
31
|
+
# for which the rental amenity will be created.
|
32
|
+
# @param options [Hash] Rental Amenity' s attributes.
|
33
|
+
# @return [BookingSync::API::Resource] Newly created rental's amenity.
|
34
|
+
# @example Create a rental's amenity.
|
35
|
+
# @api.create_rentals_amenity(10, { amenity_id: 50 }) # Add the Internet amenity to the rental with ID 10
|
36
|
+
# @see http://developers.bookingsync.com/reference/endpoints/rentals_amenities/#create-a-new-rentals-amenity
|
37
|
+
def create_rentals_amenity(rental, options = {})
|
38
|
+
post("rentals/#{rental}/rentals_amenities", rentals_amenities: [options]).pop
|
39
|
+
end
|
27
40
|
end
|
28
41
|
end
|
29
42
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require "addressable/template"
|
2
|
+
|
1
3
|
module BookingSync::API
|
2
4
|
class Relation
|
3
5
|
attr_reader :client, :name, :href_template, :method
|
@@ -46,7 +48,7 @@ module BookingSync::API
|
|
46
48
|
@client = client
|
47
49
|
@name = name.to_sym
|
48
50
|
@href = href
|
49
|
-
@href_template = Addressable::Template.new(href.to_s)
|
51
|
+
@href_template = ::Addressable::Template.new(href.to_s)
|
50
52
|
@method = (method || :get).to_sym
|
51
53
|
@available_methods = Set.new methods || [@method]
|
52
54
|
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe BookingSync::API::Client::InstantBookings do
|
4
|
+
let(:client) { BookingSync::API::Client.new(test_access_token) }
|
5
|
+
|
6
|
+
describe ".create_instant_booking", :vcr do
|
7
|
+
let(:params) do
|
8
|
+
{
|
9
|
+
"rental_id" => "1",
|
10
|
+
"start_at" => "2015-08-01 16:00:00",
|
11
|
+
"end_at" => "2015-08-11 10:00:00",
|
12
|
+
"adults" => "3",
|
13
|
+
"children" => "2",
|
14
|
+
"final_price" => "806.82",
|
15
|
+
"currency" => "EUR",
|
16
|
+
"bookings_fees_attributes" => {
|
17
|
+
"0" => { "rentals_fee_id" => "1", "times_booked" => "1" },
|
18
|
+
"1" => { "rentals_fee_id" => "3", "times_booked" => "1" }
|
19
|
+
},
|
20
|
+
"contact_information_attributes" => {
|
21
|
+
"firstname" => "Lazar",
|
22
|
+
"email" => "email@example.com",
|
23
|
+
"lastname" => "Angelov",
|
24
|
+
"phone_number" => "123-123-123"
|
25
|
+
}
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
it "creates a booking" do
|
30
|
+
client.create_instant_booking(params)
|
31
|
+
assert_requested :post, bs_url("instant_bookings"),
|
32
|
+
body: {bookings: [params]}.to_json
|
33
|
+
end
|
34
|
+
|
35
|
+
it "returns newly created booking" do
|
36
|
+
VCR.use_cassette('BookingSync_API_Client_InstantBookings/_create_instant_booking/creates_a_booking') do
|
37
|
+
booking = client.create_instant_booking(params)
|
38
|
+
expect(booking.start_at).to eql(Time.parse("2015-08-01 16:00:00 UTC"))
|
39
|
+
expect(booking.end_at).to eql(Time.parse("2015-08-11 10:00:00 UTC"))
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -28,4 +28,19 @@ describe BookingSync::API::Client::RentalsAmenities do
|
|
28
28
|
assert_requested :get, bs_url("rentals_amenities/1")
|
29
29
|
end
|
30
30
|
end
|
31
|
+
|
32
|
+
describe ".create_rentals_amenity", :vcr do
|
33
|
+
let(:rental) { BookingSync::API::Resource.new(client, id: 38) }
|
34
|
+
|
35
|
+
it "creates a new rental's amenity" do
|
36
|
+
client.create_rentals_amenity(rental, { amenity_id: 50 })
|
37
|
+
assert_requested :post, bs_url("rentals/38/rentals_amenities"),
|
38
|
+
body: { rentals_amenities: [{ amenity_id: 50 }] }.to_json
|
39
|
+
end
|
40
|
+
|
41
|
+
it "returns newly created rental's amenity" do
|
42
|
+
rentals_amenity = client.create_rentals_amenity(rental, { amenity_id: 51 })
|
43
|
+
expect(rentals_amenity.links.amenity).to eql 51
|
44
|
+
end
|
45
|
+
end
|
31
46
|
end
|
@@ -29,7 +29,7 @@ describe BookingSync::API::Relation do
|
|
29
29
|
let(:client) { double(BookingSync::API::Client) }
|
30
30
|
|
31
31
|
it "makes HTTP request using API client" do
|
32
|
-
url_template = Addressable::Template.new("http://example.com/photos/{foo.photos}")
|
32
|
+
url_template = ::Addressable::Template.new("http://example.com/photos/{foo.photos}")
|
33
33
|
expect(client).to receive(:call).with(:get, url_template, nil, {})
|
34
34
|
relation.call
|
35
35
|
end
|
@@ -37,7 +37,7 @@ describe BookingSync::API::Relation do
|
|
37
37
|
|
38
38
|
describe "#get" do
|
39
39
|
it "makes a HTTP GET using call on relation" do
|
40
|
-
url_template = Addressable::Template.new("http://example.com/photos/{foo.photos}")
|
40
|
+
url_template = ::Addressable::Template.new("http://example.com/photos/{foo.photos}")
|
41
41
|
expect(relation).to receive(:call).with({fields: [:name, :description], method: :get})
|
42
42
|
relation.get(fields: [:name, :description])
|
43
43
|
end
|
@@ -52,7 +52,7 @@ describe BookingSync::API::Relation do
|
|
52
52
|
|
53
53
|
describe "#href_template" do
|
54
54
|
it "returns relation's URL template" do
|
55
|
-
url_template = Addressable::Template.new("http://example.com/photos/{foo.photos}")
|
55
|
+
url_template = ::Addressable::Template.new("http://example.com/photos/{foo.photos}")
|
56
56
|
expect(relation.href_template).to eq(url_template)
|
57
57
|
end
|
58
58
|
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://www.bookingsync.com/api/v3/instant_bookings
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"bookings":[{"rental_id":"1","start_at":"2015-08-01 16:00:00","end_at":"2015-08-11
|
9
|
+
10:00:00","adults":"3","children":"2","final_price":"806.82","currency":"EUR","bookings_fees_attributes":{"0":{"rentals_fee_id":"1","times_booked":"1"},"1":{"rentals_fee_id":"3","times_booked":"1"}},"contact_information_attributes":{"firstname":"Lazar","email":"email@example.com","lastname":"Angelov","phone_number":"123-123-123"}}]}'
|
10
|
+
headers:
|
11
|
+
User-Agent:
|
12
|
+
- BookingSync API gem v0.0.25
|
13
|
+
Accept:
|
14
|
+
- application/vnd.api+json
|
15
|
+
Content-Type:
|
16
|
+
- application/vnd.api+json
|
17
|
+
Authorization:
|
18
|
+
- Bearer <<ACCESS_TOKEN>>
|
19
|
+
Accept-Encoding:
|
20
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
21
|
+
response:
|
22
|
+
status:
|
23
|
+
code: 201
|
24
|
+
message: Created
|
25
|
+
headers:
|
26
|
+
X-Frame-Options:
|
27
|
+
- SAMEORIGIN
|
28
|
+
X-Xss-Protection:
|
29
|
+
- 1; mode=block
|
30
|
+
X-Content-Type-Options:
|
31
|
+
- nosniff
|
32
|
+
X-Ratelimit-Limit:
|
33
|
+
- '1000'
|
34
|
+
X-Ratelimit-Reset:
|
35
|
+
- '1435928400'
|
36
|
+
X-Ratelimit-Remaining:
|
37
|
+
- '999'
|
38
|
+
Location:
|
39
|
+
- https://www.bookingsync.com/api/v3/bookings/435
|
40
|
+
Content-Type:
|
41
|
+
- application/vnd.api+json; charset=utf-8
|
42
|
+
Etag:
|
43
|
+
- '"e0525b23086189fc0bf31000ad430cbc"'
|
44
|
+
Cache-Control:
|
45
|
+
- max-age=0, private, must-revalidate
|
46
|
+
P3p:
|
47
|
+
- CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
|
48
|
+
OUR SAMi OTRo UNRo PUBi IND UNI STA"
|
49
|
+
Set-Cookie:
|
50
|
+
- ahoy_track=true; path=/
|
51
|
+
- ahoy_visit=98402521-c15f-4128-95da-c2c47241de35; path=/; expires=Fri, 10 Jul
|
52
|
+
2015 12:39:56 -0000
|
53
|
+
- ahoy_visitor=c7fa60d1-c2cb-47da-b95a-b2bc3e82a001; path=/; expires=Mon, 03
|
54
|
+
Jul 2017 12:39:56 -0000
|
55
|
+
X-Request-Id:
|
56
|
+
- fc1d7a8b-2332-4f37-9b5b-7563d9f66b76
|
57
|
+
X-Runtime:
|
58
|
+
- '1.043527'
|
59
|
+
Date:
|
60
|
+
- Fri, 03 Jul 2015 12:39:57 GMT
|
61
|
+
Connection:
|
62
|
+
- close
|
63
|
+
body:
|
64
|
+
encoding: UTF-8
|
65
|
+
string: '{"links":{"bookings.account":"https://www.bookingsync.com/api/v3/accounts/{bookings.account}","bookings.rental":"https://www.bookingsync.com/api/v3/rentals/{bookings.rental}","bookings.client":"https://www.bookingsync.com/api/v3/clients/{bookings.client}","bookings.rental_agreement":"https://www.bookingsync.com/api/v3/rental_agreements/{bookings.rental_agreement}","bookings.source":"https://www.bookingsync.com/api/v3/sources/{bookings.source}","bookings.bookings_fees":"https://www.bookingsync.com/api/v3/bookings_fees/{bookings.bookings_fees}","bookings.bookings_taxes":"https://www.bookingsync.com/api/v3/bookings_taxes/{bookings.bookings_taxes}"},"bookings":[{"links":{"account":1,"rental":1,"client":85,"rental_agreement":null,"source":null,"bookings_fees":[207,208],"bookings_taxes":[474,475,476]},"id":435,"start_at":"2015-08-01T16:00:00Z","end_at":"2015-08-11T10:00:00Z","status":"Booked","updated_at":"2015-07-03T12:39:56Z","booked":true,"unavailable":false,"tentative_expires_at":null,"initial_price":"217.17","initial_rental_price":"217.17","discount":null,"final_rental_price":"217.17","final_price":"806.82","downpayment":null,"paid_amount":"0.0","currency":"EUR","notes":null,"adults":3,"children":2,"bookings_payments_count":0,"review_requests_count":0,"locked":null,"created_at":"2015-07-03T12:39:56Z","canceled_at":null}]}'
|
66
|
+
http_version:
|
67
|
+
recorded_at: Fri, 03 Jul 2015 12:39:57 GMT
|
68
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,67 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://www.bookingsync.com/api/v3/rentals/38/rentals_amenities
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"rentals_amenities":[{"amenity_id":50}]}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BookingSync API gem v0.0.25
|
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
|
+
X-Frame-Options:
|
26
|
+
- SAMEORIGIN
|
27
|
+
X-Xss-Protection:
|
28
|
+
- 1; mode=block
|
29
|
+
X-Content-Type-Options:
|
30
|
+
- nosniff
|
31
|
+
X-Ratelimit-Limit:
|
32
|
+
- '1000'
|
33
|
+
X-Ratelimit-Reset:
|
34
|
+
- '1435431600'
|
35
|
+
X-Ratelimit-Remaining:
|
36
|
+
- '976'
|
37
|
+
Location:
|
38
|
+
- https://www.bookingsync.com/api/v3/rentals_amenities/4
|
39
|
+
Content-Type:
|
40
|
+
- application/vnd.api+json; charset=utf-8
|
41
|
+
Etag:
|
42
|
+
- '"6d9b1011b538671db8c2e682236f7863"'
|
43
|
+
Cache-Control:
|
44
|
+
- max-age=0, private, must-revalidate
|
45
|
+
P3p:
|
46
|
+
- CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
|
47
|
+
OUR SAMi OTRo UNRo PUBi IND UNI STA"
|
48
|
+
Set-Cookie:
|
49
|
+
- ahoy_track=true; path=/
|
50
|
+
- ahoy_visit=e2e3bec0-5907-49c4-97b9-9a85509464be; path=/; expires=Sat, 04 Jul
|
51
|
+
2015 18:35:11 -0000
|
52
|
+
- ahoy_visitor=8b59983b-51d4-42b5-9ef2-03bcd60331c7; path=/; expires=Tue, 27
|
53
|
+
Jun 2017 18:35:11 -0000
|
54
|
+
X-Request-Id:
|
55
|
+
- d149dc81-8acc-4bb8-a155-277ae02c5c0c
|
56
|
+
X-Runtime:
|
57
|
+
- '0.040817'
|
58
|
+
Date:
|
59
|
+
- Sat, 27 Jun 2015 18:35:11 GMT
|
60
|
+
Connection:
|
61
|
+
- close
|
62
|
+
body:
|
63
|
+
encoding: UTF-8
|
64
|
+
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":50,"rental":38},"id":4,"created_at":"2015-06-27T18:35:11Z","updated_at":"2015-06-27T18:35:11Z"}]}'
|
65
|
+
http_version:
|
66
|
+
recorded_at: Sat, 27 Jun 2015 18:35:11 GMT
|
67
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,67 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://www.bookingsync.com/api/v3/rentals/38/rentals_amenities
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"rentals_amenities":[{"amenity_id":51}]}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BookingSync API gem v0.0.25
|
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
|
+
X-Frame-Options:
|
26
|
+
- SAMEORIGIN
|
27
|
+
X-Xss-Protection:
|
28
|
+
- 1; mode=block
|
29
|
+
X-Content-Type-Options:
|
30
|
+
- nosniff
|
31
|
+
X-Ratelimit-Limit:
|
32
|
+
- '1000'
|
33
|
+
X-Ratelimit-Reset:
|
34
|
+
- '1435431600'
|
35
|
+
X-Ratelimit-Remaining:
|
36
|
+
- '975'
|
37
|
+
Location:
|
38
|
+
- https://www.bookingsync.com/api/v3/rentals_amenities/5
|
39
|
+
Content-Type:
|
40
|
+
- application/vnd.api+json; charset=utf-8
|
41
|
+
Etag:
|
42
|
+
- '"2b241bab5594fc4bd2eda9a5fcc84f0e"'
|
43
|
+
Cache-Control:
|
44
|
+
- max-age=0, private, must-revalidate
|
45
|
+
P3p:
|
46
|
+
- CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
|
47
|
+
OUR SAMi OTRo UNRo PUBi IND UNI STA"
|
48
|
+
Set-Cookie:
|
49
|
+
- ahoy_track=true; path=/
|
50
|
+
- ahoy_visit=a59bc2ce-d0e3-4dec-8559-cb68823b655e; path=/; expires=Sat, 04 Jul
|
51
|
+
2015 18:35:11 -0000
|
52
|
+
- ahoy_visitor=5cfda5da-7916-40d3-aadd-a0e104e1b3a6; path=/; expires=Tue, 27
|
53
|
+
Jun 2017 18:35:11 -0000
|
54
|
+
X-Request-Id:
|
55
|
+
- 2c550fed-f678-4ad8-ba0e-f45ba0d0f079
|
56
|
+
X-Runtime:
|
57
|
+
- '0.039191'
|
58
|
+
Date:
|
59
|
+
- Sat, 27 Jun 2015 18:35:11 GMT
|
60
|
+
Connection:
|
61
|
+
- close
|
62
|
+
body:
|
63
|
+
encoding: UTF-8
|
64
|
+
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":51,"rental":38},"id":5,"created_at":"2015-06-27T18:35:11Z","updated_at":"2015-06-27T18:35:11Z"}]}'
|
65
|
+
http_version:
|
66
|
+
recorded_at: Sat, 27 Jun 2015 18:35:11 GMT
|
67
|
+
recorded_with: VCR 2.9.3
|
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.26
|
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-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.9'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: addressable
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: hashie
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -112,6 +98,7 @@ files:
|
|
112
98
|
- lib/bookingsync/api/client/destinations.rb
|
113
99
|
- lib/bookingsync/api/client/fees.rb
|
114
100
|
- lib/bookingsync/api/client/inquiries.rb
|
101
|
+
- lib/bookingsync/api/client/instant_bookings.rb
|
115
102
|
- lib/bookingsync/api/client/payments.rb
|
116
103
|
- lib/bookingsync/api/client/periods.rb
|
117
104
|
- lib/bookingsync/api/client/photos.rb
|
@@ -146,6 +133,7 @@ files:
|
|
146
133
|
- spec/bookingsync/api/client/destinations_spec.rb
|
147
134
|
- spec/bookingsync/api/client/fees_spec.rb
|
148
135
|
- spec/bookingsync/api/client/inquiries_spec.rb
|
136
|
+
- spec/bookingsync/api/client/instant_bookings_spec.rb
|
149
137
|
- spec/bookingsync/api/client/payments_spec.rb
|
150
138
|
- spec/bookingsync/api/client/periods_spec.rb
|
151
139
|
- spec/bookingsync/api/client/photos_spec.rb
|
@@ -191,6 +179,7 @@ files:
|
|
191
179
|
- spec/fixtures/cassettes/BookingSync_API_Client_Fees/_fees/returns_fees.yml
|
192
180
|
- spec/fixtures/cassettes/BookingSync_API_Client_Inquiries/_create_inquiry/creates_a_new_inquiry.yml
|
193
181
|
- spec/fixtures/cassettes/BookingSync_API_Client_Inquiries/_inquiries/returns_inquiries.yml
|
182
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_InstantBookings/_create_instant_booking/creates_a_booking.yml
|
194
183
|
- spec/fixtures/cassettes/BookingSync_API_Client_Payments/_cancel_payment/cancels_given_payment.yml
|
195
184
|
- spec/fixtures/cassettes/BookingSync_API_Client_Payments/_create_payment/creates_a_new_payment.yml
|
196
185
|
- spec/fixtures/cassettes/BookingSync_API_Client_Payments/_edit_payment/updates_given_payment_by_ID.yml
|
@@ -229,6 +218,8 @@ files:
|
|
229
218
|
- spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals_meta/returns_meta_information_about_requested_rentals.yml
|
230
219
|
- spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals_search/rentals_ids_given/makes_a_search_within_given_rentals.yml
|
231
220
|
- spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals_search/returns_rentals.yml
|
221
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_create_rentals_amenity/creates_a_new_rental_s_amenity.yml
|
222
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_create_rentals_amenity/returns_newly_created_rental_s_amenity.yml
|
232
223
|
- spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenities/links/returns_associated_amenity.yml
|
233
224
|
- spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenities/links/returns_associated_rental.yml
|
234
225
|
- spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenities/returns_rentals_amenities.yml
|
@@ -271,7 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
271
262
|
version: '0'
|
272
263
|
requirements: []
|
273
264
|
rubyforge_project:
|
274
|
-
rubygems_version: 2.
|
265
|
+
rubygems_version: 2.4.5
|
275
266
|
signing_key:
|
276
267
|
specification_version: 4
|
277
268
|
summary: Ruby interface for accessing https://www.bookingsync.com
|
@@ -288,6 +279,7 @@ test_files:
|
|
288
279
|
- spec/bookingsync/api/client/destinations_spec.rb
|
289
280
|
- spec/bookingsync/api/client/fees_spec.rb
|
290
281
|
- spec/bookingsync/api/client/inquiries_spec.rb
|
282
|
+
- spec/bookingsync/api/client/instant_bookings_spec.rb
|
291
283
|
- spec/bookingsync/api/client/payments_spec.rb
|
292
284
|
- spec/bookingsync/api/client/periods_spec.rb
|
293
285
|
- spec/bookingsync/api/client/photos_spec.rb
|
@@ -333,6 +325,7 @@ test_files:
|
|
333
325
|
- spec/fixtures/cassettes/BookingSync_API_Client_Fees/_fees/returns_fees.yml
|
334
326
|
- spec/fixtures/cassettes/BookingSync_API_Client_Inquiries/_create_inquiry/creates_a_new_inquiry.yml
|
335
327
|
- spec/fixtures/cassettes/BookingSync_API_Client_Inquiries/_inquiries/returns_inquiries.yml
|
328
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_InstantBookings/_create_instant_booking/creates_a_booking.yml
|
336
329
|
- spec/fixtures/cassettes/BookingSync_API_Client_Payments/_cancel_payment/cancels_given_payment.yml
|
337
330
|
- spec/fixtures/cassettes/BookingSync_API_Client_Payments/_create_payment/creates_a_new_payment.yml
|
338
331
|
- spec/fixtures/cassettes/BookingSync_API_Client_Payments/_edit_payment/updates_given_payment_by_ID.yml
|
@@ -371,6 +364,8 @@ test_files:
|
|
371
364
|
- spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals_meta/returns_meta_information_about_requested_rentals.yml
|
372
365
|
- spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals_search/rentals_ids_given/makes_a_search_within_given_rentals.yml
|
373
366
|
- spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals_search/returns_rentals.yml
|
367
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_create_rentals_amenity/creates_a_new_rental_s_amenity.yml
|
368
|
+
- spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_create_rentals_amenity/returns_newly_created_rental_s_amenity.yml
|
374
369
|
- spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenities/links/returns_associated_amenity.yml
|
375
370
|
- spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenities/links/returns_associated_rental.yml
|
376
371
|
- spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenities/returns_rentals_amenities.yml
|