bookingsync-api 0.1.11 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/.travis.yml +3 -1
- data/CHANGELOG.md +12 -0
- data/bookingsync-api.gemspec +3 -3
- data/lib/bookingsync/api/client/applications.rb +43 -0
- data/lib/bookingsync/api/client/applications_periods_rentals.rb +49 -0
- data/lib/bookingsync/api/client/booking_comments.rb +1 -1
- data/lib/bookingsync/api/client/contacts.rb +63 -0
- data/lib/bookingsync/api/client/rental_urls.rb +72 -0
- data/lib/bookingsync/api/client/rentals.rb +3 -2
- data/lib/bookingsync/api/client.rb +12 -2
- data/lib/bookingsync/api/version.rb +1 -1
- data/spec/bookingsync/api/client/applications_periods_rentals_spec.rb +70 -0
- data/spec/bookingsync/api/client/applications_spec.rb +44 -0
- data/spec/bookingsync/api/client/contacts_spec.rb +116 -0
- data/spec/bookingsync/api/client/rental_urls_spec.rb +83 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Applications/_application/returns_a_single_application.yml +84 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Applications/_applications/returns_applications.yml +85 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Applications/_edit_application/returns_updated_application.yml +73 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Applications/_edit_application/updates_given_application_by_ID.yml +73 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_ApplicationsPeriodsRentals/_applications_periods_rental/returns_applications_periods_rental.yml +80 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_ApplicationsPeriodsRentals/_applications_periods_rentals/returns_applications_periods_rentals.yml +80 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_ApplicationsPeriodsRentals/_create_applications_periods_rental/creates_a_applications_periods_rental.yml +71 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_ApplicationsPeriodsRentals/_edit_applications_periods_rental/returns_updated_applications_periods_rental.yml +69 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_ApplicationsPeriodsRentals/_edit_applications_periods_rental/updates_given_applications_periods_rental_by_ID.yml +69 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_create_applications_periods_rental/creates_an_applications_periods_rental.yml +71 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Contacts/_contact/returns_a_single_contact.yml +99 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Contacts/_contact/returns_contact.yml +99 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Contacts/_contacts/returns_contacts.yml +99 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Contacts/_contacts/returns_contacts_by_ids.yml +99 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Contacts/_create_contact/creates_a_new_contact.yml +74 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Contacts/_delete_contact/deletes_given_contact.yml +63 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Contacts/_edit_contact/updates_given_contact_by_ID.yml +71 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_RentalUrls/_cancel_rental_url/cancels_given_rental_url.yml +63 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_RentalUrls/_create_rental_url/creates_a_new_rental_url.yml +71 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_RentalUrls/_edit_rental_url/updates_given_rental_url_by_ID.yml +69 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_RentalUrls/_rental_url/returns_rental_url.yml +81 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_RentalUrls/_rental_urls/links/returns_associated_rental.yml +166 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_RentalUrls/_rental_urls/returns_rental_urls.yml +80 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_create_rental_url/creates_a_new_rental_url.yml +71 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_edit_rental_url/updates_given_rentals_url.yml +69 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_edit_rental_url/updates_given_rentals_url_by_ID.yml +69 -0
- metadata +88 -19
@@ -0,0 +1,83 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe BookingSync::API::Client::RentalUrls do
|
4
|
+
let(:client) { BookingSync::API::Client.new(test_access_token) }
|
5
|
+
|
6
|
+
before { |ex| @casette_base_path = casette_path(casette_dir, ex.metadata) }
|
7
|
+
|
8
|
+
describe "#rental_urls", :vcr do
|
9
|
+
it "returns rental urls" do
|
10
|
+
expect(client.rental_urls).not_to be_empty
|
11
|
+
assert_requested :get, bs_url("rental_urls")
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "links" do
|
15
|
+
it "returns associated rental" do
|
16
|
+
rentals_url = client.rental_urls.first
|
17
|
+
expect(rentals_url.rental).not_to be_empty
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
describe "#rental_url", :vcr do
|
23
|
+
let(:prefetched_rental_url) {
|
24
|
+
find_resource("#{@casette_base_path}_rental_urls/returns_rental_urls.yml", "rental_urls")[:id]
|
25
|
+
}
|
26
|
+
|
27
|
+
it "returns rental_url" do
|
28
|
+
client.rental_url(prefetched_rental_url)
|
29
|
+
assert_requested :get, bs_url("rental_urls/#{prefetched_rental_url}")
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
describe "#create_rental_url", :vcr do
|
34
|
+
let(:attributes) { { url: "test_test.com", label: "HomeAway", locked: "true" } }
|
35
|
+
let(:rental) { BookingSync::API::Resource.new(client, id: 1) }
|
36
|
+
|
37
|
+
it "creates a new rental_url" do
|
38
|
+
client.create_rental_url(rental, attributes)
|
39
|
+
assert_requested :post, bs_url("rentals/#{rental}/rental_urls"),
|
40
|
+
body: { rental_urls: attributes }.to_json
|
41
|
+
end
|
42
|
+
|
43
|
+
it "returns newly created rental_url" do
|
44
|
+
VCR.use_cassette("BookingSync_API_Client_RentalsAmenities/_create_rental_url/creates_a_new_rental_url") do
|
45
|
+
rental_url = client.create_rental_url(rental, attributes)
|
46
|
+
expect(rental_url.url).to eq("test_test.com")
|
47
|
+
expect(rental_url.label).to eq("HomeAway")
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
describe "#edit_rental_url", :vcr do
|
53
|
+
let(:attributes) { { url: "new_url.com" } }
|
54
|
+
let(:created_rental_url) {
|
55
|
+
find_resource("#{@casette_base_path}_create_rental_url/creates_a_new_rental_url.yml", "rental_urls")[:id]
|
56
|
+
}
|
57
|
+
|
58
|
+
it "updates given rental_url by ID" do
|
59
|
+
client.edit_rental_url(created_rental_url, attributes)
|
60
|
+
assert_requested :put, bs_url("rental_urls/#{created_rental_url}"),
|
61
|
+
body: { rental_urls: attributes }.to_json
|
62
|
+
end
|
63
|
+
|
64
|
+
it "returns updated rental_url" do
|
65
|
+
VCR.use_cassette("BookingSync_API_Client_RentalsAmenities/_edit_rental_url/updates_given_rentals_url_by_ID") do
|
66
|
+
rental_url = client.edit_rental_url(created_rental_url, attributes)
|
67
|
+
expect(rental_url).to be_kind_of(BookingSync::API::Resource)
|
68
|
+
expect(rental_url.url).to eq("new_url.com")
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
describe "#cancel_rental_url", :vcr do
|
74
|
+
let(:created_rental_url_id) {
|
75
|
+
find_resource("#{@casette_base_path}_create_rental_url/creates_a_new_rental_url.yml", "rental_urls")[:id]
|
76
|
+
}
|
77
|
+
|
78
|
+
it "cancels given rental_url" do
|
79
|
+
client.cancel_rental_url(created_rental_url_id)
|
80
|
+
assert_requested :delete, bs_url("rental_urls/#{created_rental_url_id}")
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.bookingsync.com/api/v3/applications/17
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: "{}"
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BookingSync API gem v0.1.12
|
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
|
+
Connection:
|
21
|
+
- keep-alive
|
22
|
+
Keep-Alive:
|
23
|
+
- 30
|
24
|
+
response:
|
25
|
+
status:
|
26
|
+
code: 200
|
27
|
+
message: OK
|
28
|
+
headers:
|
29
|
+
Server:
|
30
|
+
- nginx/1.13.4
|
31
|
+
Date:
|
32
|
+
- Mon, 28 Jan 2019 06:51:43 GMT
|
33
|
+
Content-Type:
|
34
|
+
- application/vnd.api+json; charset=utf-8
|
35
|
+
Transfer-Encoding:
|
36
|
+
- chunked
|
37
|
+
X-Frame-Options:
|
38
|
+
- SAMEORIGIN
|
39
|
+
X-Xss-Protection:
|
40
|
+
- 1; mode=block
|
41
|
+
X-Content-Type-Options:
|
42
|
+
- nosniff
|
43
|
+
X-Updated-Since-Request-Synced-At:
|
44
|
+
- 2019-01-28 06:51:43 UTC
|
45
|
+
X-Ratelimit-Limit:
|
46
|
+
- '1000'
|
47
|
+
X-Ratelimit-Reset:
|
48
|
+
- '1548658800'
|
49
|
+
X-Ratelimit-Remaining:
|
50
|
+
- '996'
|
51
|
+
Link:
|
52
|
+
- <https://www.bookingsync.com/api/v3/applications/17?page=1>; rel="first",
|
53
|
+
<https://www.bookingsync.com/api/v3/applications/17?page=1>; rel="last"
|
54
|
+
X-Total-Pages:
|
55
|
+
- '1'
|
56
|
+
X-Total-Count:
|
57
|
+
- '1'
|
58
|
+
X-Per-Page:
|
59
|
+
- '100'
|
60
|
+
X-Current-Page:
|
61
|
+
- '1'
|
62
|
+
Etag:
|
63
|
+
- W/"12fe43cbe24d70d282ed7485bca60003"
|
64
|
+
Cache-Control:
|
65
|
+
- max-age=0, private, must-revalidate
|
66
|
+
Set-Cookie:
|
67
|
+
- ahoy_visit=14d915aa-3f24-4021-a1d2-92adf5515150; path=/; expires=Mon, 04 Feb
|
68
|
+
2019 06:51:43 -0000; secure
|
69
|
+
- ahoy_visitor=d5632d8c-8edb-45e8-a3d3-3c023e08b041; path=/; expires=Thu, 28
|
70
|
+
Jan 2021 06:51:43 -0000; secure
|
71
|
+
X-Request-Id:
|
72
|
+
- 15522b34-dbb2-4f31-a007-16ee518c1046
|
73
|
+
X-Runtime:
|
74
|
+
- '0.039903'
|
75
|
+
Vary:
|
76
|
+
- Origin
|
77
|
+
Strict-Transport-Security:
|
78
|
+
- max-age=15552000
|
79
|
+
body:
|
80
|
+
encoding: UTF-8
|
81
|
+
string: '{"applications":[{"id":17,"name":"BSA Website DEV","default_price_increase":"0.0"}],"meta":{"Link":{"first":"https://www.bookingsync.com/api/v3/applications/17?page=1","last":"https://www.bookingsync.com/api/v3/applications/17?page=1"},"X-Total-Pages":"1","X-Total-Count":"1","X-Per-Page":"100"}}'
|
82
|
+
http_version:
|
83
|
+
recorded_at: Mon, 28 Jan 2019 06:51:43 GMT
|
84
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,85 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.bookingsync.com/api/v3/applications
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: "{}"
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BookingSync API gem v0.1.12
|
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
|
+
Connection:
|
21
|
+
- keep-alive
|
22
|
+
Keep-Alive:
|
23
|
+
- 30
|
24
|
+
response:
|
25
|
+
status:
|
26
|
+
code: 200
|
27
|
+
message: OK
|
28
|
+
headers:
|
29
|
+
Server:
|
30
|
+
- nginx/1.13.4
|
31
|
+
Date:
|
32
|
+
- Mon, 28 Jan 2019 06:51:00 GMT
|
33
|
+
Content-Type:
|
34
|
+
- application/vnd.api+json; charset=utf-8
|
35
|
+
Transfer-Encoding:
|
36
|
+
- chunked
|
37
|
+
X-Frame-Options:
|
38
|
+
- SAMEORIGIN
|
39
|
+
X-Xss-Protection:
|
40
|
+
- 1; mode=block
|
41
|
+
X-Content-Type-Options:
|
42
|
+
- nosniff
|
43
|
+
X-Updated-Since-Request-Synced-At:
|
44
|
+
- 2019-01-28 06:51:00 UTC
|
45
|
+
X-Ratelimit-Limit:
|
46
|
+
- '1000'
|
47
|
+
X-Ratelimit-Reset:
|
48
|
+
- '1548658800'
|
49
|
+
X-Ratelimit-Remaining:
|
50
|
+
- '997'
|
51
|
+
Link:
|
52
|
+
- <https://www.bookingsync.com/api/v3/applications?page=1>; rel="first", <https://www.bookingsync.com/api/v3/applications?page=1>;
|
53
|
+
rel="last"
|
54
|
+
X-Total-Pages:
|
55
|
+
- '1'
|
56
|
+
X-Total-Count:
|
57
|
+
- '7'
|
58
|
+
X-Per-Page:
|
59
|
+
- '100'
|
60
|
+
X-Current-Page:
|
61
|
+
- '1'
|
62
|
+
Etag:
|
63
|
+
- W/"42e01960a6efc9143f7fbb79e6c3d8cf"
|
64
|
+
Cache-Control:
|
65
|
+
- max-age=0, private, must-revalidate
|
66
|
+
Set-Cookie:
|
67
|
+
- ahoy_visit=161d7a18-614d-4097-b3e7-02442ce63677; path=/; expires=Mon, 04 Feb
|
68
|
+
2019 06:51:00 -0000; secure
|
69
|
+
- ahoy_visitor=964715b9-e8cc-473b-b7f3-24a7dec755ad; path=/; expires=Thu, 28
|
70
|
+
Jan 2021 06:51:00 -0000; secure
|
71
|
+
X-Request-Id:
|
72
|
+
- a8968162-e761-4743-8fae-fdef93a90f38
|
73
|
+
X-Runtime:
|
74
|
+
- '0.074883'
|
75
|
+
Vary:
|
76
|
+
- Origin
|
77
|
+
Strict-Transport-Security:
|
78
|
+
- max-age=15552000
|
79
|
+
body:
|
80
|
+
encoding: UTF-8
|
81
|
+
string: '{"applications":[{"id":17,"name":"BSA Website DEV","default_price_increase":"0.0"},{"id":65,"name":"Airbnb","default_price_increase":"0.0"},{"id":95,"name":"bsa-secure","default_price_increase":"0.0"},{"id":453,"name":"bsa-booking-staging","default_price_increase":"0.0"},{"id":455,"name":"airConnect","default_price_increase":"0.0"},{"id":560,"name":"Admin
|
82
|
+
UI","default_price_increase":"0.0"},{"id":609,"name":"Channel Manager","default_price_increase":"0.0"}],"meta":{"Link":{"first":"https://www.bookingsync.com/api/v3/applications?page=1","last":"https://www.bookingsync.com/api/v3/applications?page=1"},"X-Total-Pages":"1","X-Total-Count":"7","X-Per-Page":"100"}}'
|
83
|
+
http_version:
|
84
|
+
recorded_at: Mon, 28 Jan 2019 06:51:00 GMT
|
85
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,73 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://www.bookingsync.com/api/v3/applications/17
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"applications":[{"default_price_increase":1.1}]}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BookingSync API gem v0.1.12
|
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
|
+
Connection:
|
21
|
+
- keep-alive
|
22
|
+
Keep-Alive:
|
23
|
+
- 30
|
24
|
+
response:
|
25
|
+
status:
|
26
|
+
code: 200
|
27
|
+
message: OK
|
28
|
+
headers:
|
29
|
+
Server:
|
30
|
+
- nginx/1.13.4
|
31
|
+
Date:
|
32
|
+
- Tue, 29 Jan 2019 11:29:34 GMT
|
33
|
+
Content-Type:
|
34
|
+
- application/vnd.api+json; charset=utf-8
|
35
|
+
Transfer-Encoding:
|
36
|
+
- chunked
|
37
|
+
X-Frame-Options:
|
38
|
+
- SAMEORIGIN
|
39
|
+
X-Xss-Protection:
|
40
|
+
- 1; mode=block
|
41
|
+
X-Content-Type-Options:
|
42
|
+
- nosniff
|
43
|
+
X-Updated-Since-Request-Synced-At:
|
44
|
+
- 2019-01-29 11:29:34 UTC
|
45
|
+
X-Ratelimit-Limit:
|
46
|
+
- '1000'
|
47
|
+
X-Ratelimit-Reset:
|
48
|
+
- '1548763200'
|
49
|
+
X-Ratelimit-Remaining:
|
50
|
+
- '998'
|
51
|
+
Etag:
|
52
|
+
- W/"fdce7369a2708523045bf15864871fb8"
|
53
|
+
Cache-Control:
|
54
|
+
- max-age=0, private, must-revalidate
|
55
|
+
Set-Cookie:
|
56
|
+
- ahoy_visit=46943574-f6a6-4c9b-8747-2c78c37d0b74; path=/; expires=Tue, 05 Feb
|
57
|
+
2019 11:29:34 -0000; secure
|
58
|
+
- ahoy_visitor=b210b427-032e-4a22-830b-3b5bcb4de265; path=/; expires=Fri, 29
|
59
|
+
Jan 2021 11:29:34 -0000; secure
|
60
|
+
X-Request-Id:
|
61
|
+
- 208e0410-3a7a-4b0e-8cb2-ffe0e724a01d
|
62
|
+
X-Runtime:
|
63
|
+
- '0.568793'
|
64
|
+
Vary:
|
65
|
+
- Origin
|
66
|
+
Strict-Transport-Security:
|
67
|
+
- max-age=15552000
|
68
|
+
body:
|
69
|
+
encoding: UTF-8
|
70
|
+
string: '{"applications":[{"id":17,"name":"BSA Website DEV","default_price_increase":"1.1"}],"meta":{}}'
|
71
|
+
http_version:
|
72
|
+
recorded_at: Tue, 29 Jan 2019 11:29:34 GMT
|
73
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,73 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://www.bookingsync.com/api/v3/applications/17
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"applications":[{"default_price_increase":1.1}]}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BookingSync API gem v0.1.12
|
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
|
+
Connection:
|
21
|
+
- keep-alive
|
22
|
+
Keep-Alive:
|
23
|
+
- 30
|
24
|
+
response:
|
25
|
+
status:
|
26
|
+
code: 200
|
27
|
+
message: OK
|
28
|
+
headers:
|
29
|
+
Server:
|
30
|
+
- nginx/1.13.4
|
31
|
+
Date:
|
32
|
+
- Tue, 29 Jan 2019 11:33:26 GMT
|
33
|
+
Content-Type:
|
34
|
+
- application/vnd.api+json; charset=utf-8
|
35
|
+
Transfer-Encoding:
|
36
|
+
- chunked
|
37
|
+
X-Frame-Options:
|
38
|
+
- SAMEORIGIN
|
39
|
+
X-Xss-Protection:
|
40
|
+
- 1; mode=block
|
41
|
+
X-Content-Type-Options:
|
42
|
+
- nosniff
|
43
|
+
X-Updated-Since-Request-Synced-At:
|
44
|
+
- 2019-01-29 11:33:25 UTC
|
45
|
+
X-Ratelimit-Limit:
|
46
|
+
- '1000'
|
47
|
+
X-Ratelimit-Reset:
|
48
|
+
- '1548763200'
|
49
|
+
X-Ratelimit-Remaining:
|
50
|
+
- '997'
|
51
|
+
Etag:
|
52
|
+
- W/"fdce7369a2708523045bf15864871fb8"
|
53
|
+
Cache-Control:
|
54
|
+
- max-age=0, private, must-revalidate
|
55
|
+
Set-Cookie:
|
56
|
+
- ahoy_visit=d289e0aa-b815-4afe-905f-793303de635f; path=/; expires=Tue, 05 Feb
|
57
|
+
2019 11:33:25 -0000; secure
|
58
|
+
- ahoy_visitor=c8da2971-4a43-4201-8040-2f63f31db44c; path=/; expires=Fri, 29
|
59
|
+
Jan 2021 11:33:25 -0000; secure
|
60
|
+
X-Request-Id:
|
61
|
+
- 327fe1c5-4f29-4dea-8054-c5d4e9750f36
|
62
|
+
X-Runtime:
|
63
|
+
- '0.863601'
|
64
|
+
Vary:
|
65
|
+
- Origin
|
66
|
+
Strict-Transport-Security:
|
67
|
+
- max-age=15552000
|
68
|
+
body:
|
69
|
+
encoding: UTF-8
|
70
|
+
string: '{"applications":[{"id":17,"name":"BSA Website DEV","default_price_increase":"1.1"}],"meta":{}}'
|
71
|
+
http_version:
|
72
|
+
recorded_at: Tue, 29 Jan 2019 11:33:26 GMT
|
73
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,80 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://bookingsync.test/api/v3/applications_periods_rentals/2
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: "{}"
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BookingSync API gem v0.1.12
|
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
|
+
Connection:
|
21
|
+
- keep-alive
|
22
|
+
Keep-Alive:
|
23
|
+
- '30'
|
24
|
+
response:
|
25
|
+
status:
|
26
|
+
code: 200
|
27
|
+
message: OK
|
28
|
+
headers:
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
31
|
+
Content-Type:
|
32
|
+
- application/vnd.api+json; charset=utf-8
|
33
|
+
Etag:
|
34
|
+
- W/"4f16e1fadf19018a8e568c8eccace925"
|
35
|
+
Link:
|
36
|
+
- <https://bookingsync.test/api/v3/applications_periods_rentals/2?page=1>; rel="first",
|
37
|
+
<https://bookingsync.test/api/v3/applications_periods_rentals/2?page=1>; rel="last"
|
38
|
+
Set-Cookie:
|
39
|
+
- ahoy_visit=2d8fdbfb-1554-4133-9dee-7595b92d0d3b; path=/; expires=Tue, 19 Feb
|
40
|
+
2019 13:17:09 -0000
|
41
|
+
- ahoy_visitor=01bc6be4-c17c-4b78-aa7d-7697333689a3; path=/; expires=Fri, 12
|
42
|
+
Feb 2021 13:17:09 -0000
|
43
|
+
Vary:
|
44
|
+
- Origin
|
45
|
+
X-Content-Type-Options:
|
46
|
+
- nosniff
|
47
|
+
X-Current-Page:
|
48
|
+
- '1'
|
49
|
+
X-Frame-Options:
|
50
|
+
- SAMEORIGIN
|
51
|
+
X-Per-Page:
|
52
|
+
- '100'
|
53
|
+
X-Ratelimit-Limit:
|
54
|
+
- '1000'
|
55
|
+
X-Ratelimit-Remaining:
|
56
|
+
- '997'
|
57
|
+
X-Ratelimit-Reset:
|
58
|
+
- '1549980000'
|
59
|
+
X-Request-Id:
|
60
|
+
- a8cd0926-d3c9-4c84-bf54-3812d4ad9529
|
61
|
+
X-Runtime:
|
62
|
+
- '0.377347'
|
63
|
+
X-Total-Count:
|
64
|
+
- '1'
|
65
|
+
X-Total-Pages:
|
66
|
+
- '1'
|
67
|
+
X-Updated-Since-Request-Synced-At:
|
68
|
+
- 2019-02-12 13:17:09 UTC
|
69
|
+
X-Xss-Protection:
|
70
|
+
- 1; mode=block
|
71
|
+
Date:
|
72
|
+
- Tue, 12 Feb 2019 13:17:09 GMT
|
73
|
+
Content-Length:
|
74
|
+
- '353'
|
75
|
+
body:
|
76
|
+
encoding: UTF-8
|
77
|
+
string: '{"applications_periods_rentals":[{"id":2,"price_increase":"15.0","start_date":"2019-01-01","end_date":"2100-01-01"}],"meta":{"Link":{"first":"https://bookingsync.test/api/v3/applications_periods_rentals/2?page=1","last":"https://bookingsync.test/api/v3/applications_periods_rentals/2?page=1"},"X-Total-Pages":"1","X-Total-Count":"1","X-Per-Page":"100"}}'
|
78
|
+
http_version:
|
79
|
+
recorded_at: Tue, 12 Feb 2019 13:17:09 GMT
|
80
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,80 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://bookingsync.test/api/v3/applications_periods_rentals
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: "{}"
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BookingSync API gem v0.1.12
|
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
|
+
Connection:
|
21
|
+
- keep-alive
|
22
|
+
Keep-Alive:
|
23
|
+
- '30'
|
24
|
+
response:
|
25
|
+
status:
|
26
|
+
code: 200
|
27
|
+
message: OK
|
28
|
+
headers:
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
31
|
+
Content-Type:
|
32
|
+
- application/vnd.api+json; charset=utf-8
|
33
|
+
Etag:
|
34
|
+
- W/"73df67a8f30027c62974163194dc023c"
|
35
|
+
Link:
|
36
|
+
- <https://bookingsync.test/api/v3/applications_periods_rentals?page=1>; rel="first",
|
37
|
+
<https://bookingsync.test/api/v3/applications_periods_rentals?page=1>; rel="last"
|
38
|
+
Set-Cookie:
|
39
|
+
- ahoy_visit=9d96a1b7-8d2b-4eac-81a2-cbab3a49d139; path=/; expires=Tue, 19 Feb
|
40
|
+
2019 13:16:28 -0000
|
41
|
+
- ahoy_visitor=7df69672-3d06-42bb-ae5a-fb383e3ad4c6; path=/; expires=Fri, 12
|
42
|
+
Feb 2021 13:16:28 -0000
|
43
|
+
Vary:
|
44
|
+
- Origin
|
45
|
+
X-Content-Type-Options:
|
46
|
+
- nosniff
|
47
|
+
X-Current-Page:
|
48
|
+
- '1'
|
49
|
+
X-Frame-Options:
|
50
|
+
- SAMEORIGIN
|
51
|
+
X-Per-Page:
|
52
|
+
- '100'
|
53
|
+
X-Ratelimit-Limit:
|
54
|
+
- '1000'
|
55
|
+
X-Ratelimit-Remaining:
|
56
|
+
- '998'
|
57
|
+
X-Ratelimit-Reset:
|
58
|
+
- '1549980000'
|
59
|
+
X-Request-Id:
|
60
|
+
- 5f45035f-9cb8-4199-a84a-0d0ff18a741c
|
61
|
+
X-Runtime:
|
62
|
+
- '0.428332'
|
63
|
+
X-Total-Count:
|
64
|
+
- '1'
|
65
|
+
X-Total-Pages:
|
66
|
+
- '1'
|
67
|
+
X-Updated-Since-Request-Synced-At:
|
68
|
+
- 2019-02-12 13:16:28 UTC
|
69
|
+
X-Xss-Protection:
|
70
|
+
- 1; mode=block
|
71
|
+
Date:
|
72
|
+
- Tue, 12 Feb 2019 13:16:29 GMT
|
73
|
+
Content-Length:
|
74
|
+
- '349'
|
75
|
+
body:
|
76
|
+
encoding: UTF-8
|
77
|
+
string: '{"applications_periods_rentals":[{"id":2,"price_increase":"15.0","start_date":"2019-01-01","end_date":"2100-01-01"}],"meta":{"Link":{"first":"https://bookingsync.test/api/v3/applications_periods_rentals?page=1","last":"https://bookingsync.test/api/v3/applications_periods_rentals?page=1"},"X-Total-Pages":"1","X-Total-Count":"1","X-Per-Page":"100"}}'
|
78
|
+
http_version:
|
79
|
+
recorded_at: Tue, 12 Feb 2019 13:16:29 GMT
|
80
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,71 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://bookingsync.test/api/v3/applications_periods_rentals
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"applications_periods_rental":{"rental_id":1,"application_id":9,"start_date":"2017-01-03","end_date":"2017-01-04","price_increase":15}}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BookingSync API gem v0.1.12
|
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
|
+
Connection:
|
21
|
+
- keep-alive
|
22
|
+
Keep-Alive:
|
23
|
+
- '30'
|
24
|
+
response:
|
25
|
+
status:
|
26
|
+
code: 201
|
27
|
+
message: Created
|
28
|
+
headers:
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
31
|
+
Content-Type:
|
32
|
+
- application/vnd.api+json; charset=utf-8
|
33
|
+
Etag:
|
34
|
+
- W/"329930caf43d53b1d9585178f1d749c2"
|
35
|
+
Location:
|
36
|
+
- https://bookingsync.test/api/v3/applications_periods_rentals/3
|
37
|
+
Set-Cookie:
|
38
|
+
- ahoy_visit=4cb740ce-99ee-48b1-9999-5f87d415f164; path=/; expires=Tue, 19 Feb
|
39
|
+
2019 17:47:53 -0000
|
40
|
+
- ahoy_visitor=bfb3a53f-61fe-4530-b1f4-273bc8592f22; path=/; expires=Fri, 12
|
41
|
+
Feb 2021 17:47:53 -0000
|
42
|
+
Vary:
|
43
|
+
- Origin
|
44
|
+
X-Content-Type-Options:
|
45
|
+
- nosniff
|
46
|
+
X-Frame-Options:
|
47
|
+
- SAMEORIGIN
|
48
|
+
X-Ratelimit-Limit:
|
49
|
+
- '1000'
|
50
|
+
X-Ratelimit-Remaining:
|
51
|
+
- '998'
|
52
|
+
X-Ratelimit-Reset:
|
53
|
+
- '1549994400'
|
54
|
+
X-Request-Id:
|
55
|
+
- 8b539374-fab2-444c-add6-36f36602dc75
|
56
|
+
X-Runtime:
|
57
|
+
- '0.585753'
|
58
|
+
X-Updated-Since-Request-Synced-At:
|
59
|
+
- 2019-02-12 17:47:53 UTC
|
60
|
+
X-Xss-Protection:
|
61
|
+
- 1; mode=block
|
62
|
+
Date:
|
63
|
+
- Tue, 12 Feb 2019 17:47:54 GMT
|
64
|
+
Content-Length:
|
65
|
+
- '127'
|
66
|
+
body:
|
67
|
+
encoding: UTF-8
|
68
|
+
string: '{"applications_periods_rentals":[{"id":3,"price_increase":"15.0","start_date":"2017-01-03","end_date":"2017-01-04"}],"meta":{}}'
|
69
|
+
http_version:
|
70
|
+
recorded_at: Tue, 12 Feb 2019 17:47:54 GMT
|
71
|
+
recorded_with: VCR 4.0.0
|