bookingsync-api 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19a563dd183bbdcdfbceb5be9665ef5a2671e8b3ab48bc2f4ae364ebc263450b
4
- data.tar.gz: 4b816566334c7c60da5433815cb9f8014448914d7f0560aa87b650432c109928
3
+ metadata.gz: 6bf9cb0ca16b3d77a4ba8037ff28fb2137822d05f41f1cee9885ac143c1cb1de
4
+ data.tar.gz: 74fe4791fbb7926f544549503827c66cc9170e18d3a9d222b713e29989aec92b
5
5
  SHA512:
6
- metadata.gz: c1bbbecf812ca989b599a76062e983f6745f80ca02b74e81ecea4665bbc2736369fa68f3b491c68a913370251c589125ee1ceeceb75fa3e96097567be088d457
7
- data.tar.gz: 8c7236ad450eb3c7c94dba200bcd8458a1bfb157c731f483f8f2ebf09a7611698377f54d4b37fc59b4bec9430aee9843176c9b6a7150d748672f51d1570b5753
6
+ metadata.gz: 1d1b90fe7cb1dd0ac2ed3ca72963da60ce9e327d9dd4e1a1217266928c4221f77aa22a0da6ccfcd2a2364d83e38c3bf236b892541cffe278b147345478503d4b
7
+ data.tar.gz: 3f2c7163b3de5b56b5feb6e61eea178ae254c8809ffd47c26c3cab764edec0046a3485efa3d1c97304948d8c772fc8693218cbf4f1475f91a25ebccd360db9c8
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  # master
4
4
 
5
+ ## 1.3.0
6
+
7
+ - Add support for `reservations_requests` endpoint.
8
+
9
+ ## 1.2.0
10
+
11
+ - Add support for `restore` action for `rental_urls`.
12
+
5
13
  ## 1.1.0
6
14
 
7
15
  - Add support for `host_reviews` endpoint.
@@ -62,6 +62,16 @@ module BookingSync::API
62
62
  delete "rental_urls/#{rental_url}"
63
63
  end
64
64
 
65
+ # Restore a RentalUrl
66
+ #
67
+ # @param rental_url [BookingSync::API::Resource|Integer] RentalUrl or ID
68
+ # of the rental_url to be canceled.
69
+ # @return [BookingSync::API::Resource] Restored rental_url on success,
70
+ # exception is raised otherwise.
71
+ def restore_rental_url(rental_url)
72
+ put("rental_urls/#{rental_url}/restore").pop
73
+ end
74
+
65
75
  private
66
76
 
67
77
  def base_64_encode(file_path)
@@ -0,0 +1,56 @@
1
+ module BookingSync::API
2
+ class Client
3
+ module ReservationsRequests
4
+ # List reservations requests
5
+ #
6
+ # Returns reservations requests for the current account.
7
+ # @param options [Hash] A customizable set of query options.
8
+ # @option options [Array] fields: List of fields to be fetched.
9
+ # @return [Array<BookingSync::API::Resource>] Array of reservations requests.
10
+ # @see http://developers.bookingsync.com/reference/endpoints/reservations_requests/#list-reservations-requests
11
+ def reservations_requests(options = {}, &block)
12
+ paginate "reservations/requests", options, &block
13
+ end
14
+
15
+ # Get a single reservations request
16
+ #
17
+ # @param id [BookingSync::API::Resource|Integer] Reservations request or ID
18
+ # of the reservations request.
19
+ # @param options [Hash] A customizable set of query options.
20
+ # @option options [Array] fields: List of fields to be fetched.
21
+ # @return [BookingSync::API::Resource]
22
+ def reservations_request(id, options = {})
23
+ get("reservations/requests/#{id}", options).pop
24
+ end
25
+
26
+ # Create a new reservations request
27
+ #
28
+ # @param options [Hash] Reservations request attributes.
29
+ # @return [BookingSync::API::Resource] Newly created reservations request.
30
+ def create_reservation_request(options = {})
31
+ post("reservations/requests", requests: [options]).pop
32
+ end
33
+
34
+ # Edit a reservations request
35
+ #
36
+ # @param id [BookingSync::API::Resource|Integer] Reservations request or ID of
37
+ # the reservations request to be updated.
38
+ # @param options [Hash] Reservations request attributes to be updated.
39
+ # @return [BookingSync::API::Resource] Updated reservations request on success,
40
+ # exception is raised otherwise.
41
+ def patch_reservation_request(id, options = {})
42
+ patch("reservations/requests/#{id}", requests: [options]).pop
43
+ end
44
+
45
+ # Delete a reservations request
46
+ #
47
+ # Soft-cancels the given reservations request.
48
+ # @param id [BookingSync::API::Resource|Integer] Reservations request or ID of
49
+ # the reservations request to be deleted.
50
+ # @return [NilClass] Returns nil on success.
51
+ def delete_reservation_request(id)
52
+ delete "reservations/requests/#{id}"
53
+ end
54
+ end
55
+ end
56
+ end
@@ -40,6 +40,7 @@ require "bookingsync/api/client/rental_cancelation_policies"
40
40
  require "bookingsync/api/client/rental_cancelation_policy_items"
41
41
  require "bookingsync/api/client/rentals_contents_overrides"
42
42
  require "bookingsync/api/client/rental_urls"
43
+ require "bookingsync/api/client/reservations_requests"
43
44
  require "bookingsync/api/client/review_replies"
44
45
  require "bookingsync/api/client/reviews"
45
46
  require "bookingsync/api/client/seasons"
@@ -104,6 +105,7 @@ module BookingSync::API
104
105
  include BookingSync::API::Client::RentalCancelationPolicyItems
105
106
  include BookingSync::API::Client::RentalsContentsOverrides
106
107
  include BookingSync::API::Client::RentalUrls
108
+ include BookingSync::API::Client::ReservationsRequests
107
109
  include BookingSync::API::Client::ReviewReplies
108
110
  include BookingSync::API::Client::Reviews
109
111
  include BookingSync::API::Client::Seasons
@@ -1,5 +1,5 @@
1
1
  module BookingSync
2
2
  module API
3
- VERSION = "1.1.0"
3
+ VERSION = "1.3.0"
4
4
  end
5
5
  end
@@ -80,4 +80,13 @@ describe BookingSync::API::Client::RentalUrls do
80
80
  assert_requested :delete, bs_url("rental_urls/#{created_rental_url_id}")
81
81
  end
82
82
  end
83
+
84
+ describe "#restore_rental_url", :vcr do
85
+ let(:rental_url_id) { "e3511ab6-0976-44a7-befe-3e1e08d6f924" }
86
+
87
+ it "restores given rental_url" do
88
+ client.restore_rental_url(rental_url_id)
89
+ assert_requested :put, bs_url("rental_urls/#{rental_url_id}/restore")
90
+ end
91
+ end
83
92
  end
@@ -0,0 +1,97 @@
1
+ require "spec_helper"
2
+
3
+ describe BookingSync::API::Client::ReservationsRequests 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 ".reservations_requests", :vcr do
9
+ it "returns reservations requests" do
10
+ expect(client.reservations_requests).not_to be_empty
11
+ assert_requested :get, bs_url("reservations/requests")
12
+ end
13
+
14
+ describe "pagination" do
15
+ context "with auto_paginate: true" do
16
+ it "returns all reservations requests joined from many requests" do
17
+ requests = client.reservations_requests(per_page: 2, auto_paginate: true)
18
+ expect(requests.size).to eq(4)
19
+ end
20
+ end
21
+ end
22
+ end
23
+
24
+ describe ".reservations_request", :vcr do
25
+ let(:prefetched_reservations_request_id) {
26
+ find_resource("#{@casette_base_path}_reservations_requests/returns_reservations_requests.yml", "requests")[:id]
27
+ }
28
+
29
+ it "returns a single reservations request" do
30
+ reservations_request = client.reservations_request(prefetched_reservations_request_id)
31
+ expect(reservations_request.id).to eq prefetched_reservations_request_id
32
+ end
33
+ end
34
+
35
+ describe ".create_reservation_request", :vcr do
36
+ let(:attributes) do
37
+ {
38
+ conversation_id: 123,
39
+ rental_id: 456,
40
+ client_id: 789,
41
+ booking_id: 101,
42
+ expires_at: "2026-06-25T12:00:00Z",
43
+ booking_payload: {
44
+ start_date: "2026-07-01",
45
+ end_date: "2026-07-08",
46
+ adults: 2,
47
+ children: 0,
48
+ final_price: "950.00",
49
+ currency: "EUR"
50
+ }
51
+ }
52
+ end
53
+
54
+ it "creates a new reservations request" do
55
+ client.create_reservation_request(attributes)
56
+ assert_requested :post, bs_url("reservations/requests"),
57
+ body: { requests: [attributes] }.to_json
58
+ end
59
+
60
+ it "returns newly created reservations request" do
61
+ VCR.use_cassette("BookingSync_API_Client_ReservationsRequests/_create_reservation_request/creates_a_new_reservations_request") do
62
+ reservations_request = client.create_reservation_request(attributes)
63
+ expect(reservations_request.links.rental).to eq(456)
64
+ expect(reservations_request.expires_at).to eq(Time.parse("2026-06-25T12:00:00Z"))
65
+ end
66
+ end
67
+ end
68
+
69
+ describe ".patch_reservation_request", :vcr do
70
+ let(:created_reservations_request_id) {
71
+ find_resource("#{@casette_base_path}_create_reservation_request/creates_a_new_reservations_request.yml", "requests")[:id]
72
+ }
73
+
74
+ it "updates given reservations request by ID" do
75
+ client.patch_reservation_request(created_reservations_request_id, expires_at: "2026-07-01T12:00:00Z")
76
+ assert_requested :patch, bs_url("reservations/requests/#{created_reservations_request_id}"),
77
+ body: { requests: [{ expires_at: "2026-07-01T12:00:00Z" }] }.to_json
78
+ end
79
+
80
+ it "returns updated reservations request" do
81
+ VCR.use_cassette("BookingSync_API_Client_ReservationsRequests/_patch_reservation_request/updates_given_reservations_request_by_ID") do
82
+ reservations_request = client.patch_reservation_request(created_reservations_request_id, expires_at: "2026-07-01T12:00:00Z")
83
+ expect(reservations_request).to be_kind_of(BookingSync::API::Resource)
84
+ expect(reservations_request.expires_at).to eq(Time.parse("2026-07-01T12:00:00Z"))
85
+ end
86
+ end
87
+ end
88
+
89
+ describe ".delete_reservation_request", :vcr do
90
+ let(:reservations_request_id_to_be_deleted) { 60 }
91
+
92
+ it "deletes given reservations request" do
93
+ expect(client.delete_reservation_request(reservations_request_id_to_be_deleted)).to be_nil
94
+ assert_requested :delete, bs_url("reservations/requests/#{reservations_request_id_to_be_deleted}")
95
+ end
96
+ end
97
+ end
@@ -0,0 +1,71 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://www.bookingsync.com/api/v3/rental_urls/e3511ab6-0976-44a7-befe-3e1e08d6f924/restore
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v1.1.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
+ 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-Length:
32
+ - '529'
33
+ Content-Type:
34
+ - application/vnd.api+json; charset=utf-8
35
+ Etag:
36
+ - W/"871faa247f344cff8c07babb2402549d"
37
+ Referrer-Policy:
38
+ - strict-origin-when-cross-origin
39
+ Vary:
40
+ - Accept, Origin
41
+ X-Content-Type-Options:
42
+ - nosniff
43
+ X-Download-Options:
44
+ - noopen
45
+ X-Frame-Options:
46
+ - SAMEORIGIN
47
+ X-Permitted-Cross-Domain-Policies:
48
+ - none
49
+ X-Ratelimit-Limit:
50
+ - '1000'
51
+ X-Ratelimit-Remaining:
52
+ - '999'
53
+ X-Ratelimit-Reset:
54
+ - '1718103600'
55
+ X-Request-Id:
56
+ - bdcc44cc-cab4-4d25-afd4-8cbc37642cc4
57
+ X-Runtime:
58
+ - '0.822478'
59
+ X-Updated-Since-Request-Synced-At:
60
+ - 2024-06-11 10:10:21 UTC
61
+ X-Xss-Protection:
62
+ - 1; mode=block
63
+ Date:
64
+ - Tue, 11 Jun 2024 10:10:21 GMT
65
+ body:
66
+ encoding: UTF-8
67
+ string: '{"links":{"rental_urls.rental":"https://www.bookingsync.com/api/v3/api/v3/rentals/{rental_urls.rental}","rental_urls.account":"https://www.bookingsync.com/api/v3/api/v3/accounts/{rental_urls.account}"},"rental_urls":[{"links":{"account":1,"rental":1},"id":"e3511ab6-0976-44a7-befe-3e1e08d6f924","label":"Website
68
+ Builder - Test website","url":"https://1wymanyost.us.example.com/en/rentals/1-rental-in-nevache","lock":{"record":"","attributes":{}},"canceled_at":null,"created_at":"2024-06-05T12:33:13Z","updated_at":"2024-06-11T10:10:21Z"}],"meta":{}}'
69
+ http_version:
70
+ recorded_at: Tue, 11 Jun 2024 10:10:21 GMT
71
+ recorded_with: VCR 5.0.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://www.bookingsync.com/api/v3/reservations/requests
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"requests":[{"conversation_id":123,"rental_id":456,"client_id":789,"booking_id":101,"expires_at":"2026-06-25T12:00:00Z","booking_payload":{"start_date":"2026-07-01","end_date":"2026-07-08","adults":2,"children":0,"final_price":"950.00","currency":"EUR"}}]}'
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v1.2.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
+ Connection:
21
+ - keep-alive
22
+ Keep-Alive:
23
+ - 30
24
+ response:
25
+ status:
26
+ code: 201
27
+ message: Created
28
+ headers:
29
+ Content-Type:
30
+ - application/vnd.api+json; charset=utf-8
31
+ Status:
32
+ - 201 Created
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"links":{"requests.conversation":"https://www.bookingsync.com/api/v3/inbox/conversations/{requests.conversation}","requests.rental":"https://www.bookingsync.com/api/v3/rentals/{requests.rental}","requests.client":"https://www.bookingsync.com/api/v3/clients/{requests.client}","requests.booking":"https://www.bookingsync.com/api/v3/bookings/{requests.booking}"},"requests":[{"links":{"conversation":123,"rental":456,"client":789,"booking":101},"id":60,"expires_at":"2026-06-25T12:00:00Z","status":"pending","booking_payload":{"start_date":"2026-07-01","end_date":"2026-07-08","adults":2,"children":0,"final_price":"950.00","currency":"EUR"},"created_at":"2026-07-06T10:00:00Z","updated_at":"2026-07-06T10:00:00Z"}]}'
36
+ http_version:
37
+ recorded_at: Mon, 06 Jul 2026 10:00:00 GMT
38
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://www.bookingsync.com/api/v3/reservations/requests/60
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v1.2.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
+ Connection:
21
+ - keep-alive
22
+ Keep-Alive:
23
+ - 30
24
+ response:
25
+ status:
26
+ code: 204
27
+ message: No Content
28
+ headers:
29
+ Content-Type:
30
+ - application/vnd.api+json; charset=utf-8
31
+ Status:
32
+ - 204 No Content
33
+ body:
34
+ encoding: UTF-8
35
+ string: ''
36
+ http_version:
37
+ recorded_at: Mon, 06 Jul 2026 11:00:00 GMT
38
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: patch
5
+ uri: https://www.bookingsync.com/api/v3/reservations/requests/60
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"requests":[{"expires_at":"2026-07-01T12:00:00Z"}]}'
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v1.2.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
+ Connection:
21
+ - keep-alive
22
+ Keep-Alive:
23
+ - 30
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Content-Type:
30
+ - application/vnd.api+json; charset=utf-8
31
+ Status:
32
+ - 200 OK
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"links":{"requests.conversation":"https://www.bookingsync.com/api/v3/inbox/conversations/{requests.conversation}","requests.rental":"https://www.bookingsync.com/api/v3/rentals/{requests.rental}","requests.client":"https://www.bookingsync.com/api/v3/clients/{requests.client}","requests.booking":"https://www.bookingsync.com/api/v3/bookings/{requests.booking}"},"requests":[{"links":{"conversation":123,"rental":456,"client":789,"booking":101},"id":60,"expires_at":"2026-07-01T12:00:00Z","status":"pending","booking_payload":{"start_date":"2026-07-01","end_date":"2026-07-08","adults":2,"children":0,"final_price":"950.00","currency":"EUR"},"created_at":"2026-07-06T10:00:00Z","updated_at":"2026-07-06T11:00:00Z"}]}'
36
+ http_version:
37
+ recorded_at: Mon, 06 Jul 2026 11:00:00 GMT
38
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.bookingsync.com/api/v3/reservations/requests/55
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v1.2.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
+ Connection:
21
+ - keep-alive
22
+ Keep-Alive:
23
+ - 30
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Content-Type:
30
+ - application/vnd.api+json; charset=utf-8
31
+ Status:
32
+ - 200 OK
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"links":{"requests.conversation":"https://www.bookingsync.com/api/v3/inbox/conversations/{requests.conversation}","requests.rental":"https://www.bookingsync.com/api/v3/rentals/{requests.rental}","requests.client":"https://www.bookingsync.com/api/v3/clients/{requests.client}","requests.booking":"https://www.bookingsync.com/api/v3/bookings/{requests.booking}"},"requests":[{"links":{"conversation":123,"rental":456,"client":789,"booking":101},"id":55,"expires_at":"2026-06-25T12:00:00Z","status":"pending","booking_payload":{"start_date":"2026-07-01","end_date":"2026-07-08","adults":2,"children":0,"final_price":"950.00","currency":"EUR"},"created_at":"2026-06-20T10:00:00Z","updated_at":"2026-06-20T10:00:00Z"}]}'
36
+ http_version:
37
+ recorded_at: Mon, 06 Jul 2026 10:00:00 GMT
38
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,93 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.bookingsync.com/api/v3/reservations/requests?page=1&per_page=2
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v1.2.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
+ Connection:
21
+ - keep-alive
22
+ Keep-Alive:
23
+ - 30
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Content-Type:
30
+ - application/vnd.api+json; charset=utf-8
31
+ Status:
32
+ - 200 OK
33
+ Link:
34
+ - <https://www.bookingsync.com/api/v3/reservations/requests?page=1&per_page=2>; rel="first",
35
+ <https://www.bookingsync.com/api/v3/reservations/requests?page=2&per_page=2>; rel="next",
36
+ <https://www.bookingsync.com/api/v3/reservations/requests?page=2&per_page=2>; rel="last"
37
+ X-Total-Pages:
38
+ - '2'
39
+ X-Total-Count:
40
+ - '4'
41
+ X-Per-Page:
42
+ - '2'
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"links":{"requests.conversation":"https://www.bookingsync.com/api/v3/inbox/conversations/{requests.conversation}","requests.rental":"https://www.bookingsync.com/api/v3/rentals/{requests.rental}","requests.client":"https://www.bookingsync.com/api/v3/clients/{requests.client}","requests.booking":"https://www.bookingsync.com/api/v3/bookings/{requests.booking}"},"requests":[{"links":{"conversation":123,"rental":456,"client":789,"booking":101},"id":55,"expires_at":"2026-06-25T12:00:00Z","status":"pending","booking_payload":{"start_date":"2026-07-01","end_date":"2026-07-08","adults":2,"children":0,"final_price":"950.00","currency":"EUR"},"created_at":"2026-06-20T10:00:00Z","updated_at":"2026-06-20T10:00:00Z"},{"links":{"conversation":124,"rental":457,"client":790,"booking":null},"id":56,"expires_at":"2026-06-26T12:00:00Z","status":"pending","booking_payload":{"start_date":"2026-08-01","end_date":"2026-08-05","adults":1,"children":0,"final_price":"400.00","currency":"EUR"},"created_at":"2026-06-21T10:00:00Z","updated_at":"2026-06-21T10:00:00Z"}]}'
46
+ http_version:
47
+ recorded_at: Mon, 06 Jul 2026 10:00:00 GMT
48
+ - request:
49
+ method: get
50
+ uri: https://www.bookingsync.com/api/v3/reservations/requests?page=2&per_page=2
51
+ body:
52
+ encoding: UTF-8
53
+ string: "{}"
54
+ headers:
55
+ User-Agent:
56
+ - BookingSync API gem v1.2.0
57
+ Accept:
58
+ - application/vnd.api+json
59
+ Content-Type:
60
+ - application/vnd.api+json
61
+ Authorization:
62
+ - Bearer <<ACCESS_TOKEN>>
63
+ Accept-Encoding:
64
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
65
+ Connection:
66
+ - keep-alive
67
+ Keep-Alive:
68
+ - 30
69
+ response:
70
+ status:
71
+ code: 200
72
+ message: OK
73
+ headers:
74
+ Content-Type:
75
+ - application/vnd.api+json; charset=utf-8
76
+ Status:
77
+ - 200 OK
78
+ Link:
79
+ - <https://www.bookingsync.com/api/v3/reservations/requests?page=1&per_page=2>; rel="first",
80
+ <https://www.bookingsync.com/api/v3/reservations/requests?page=1&per_page=2>; rel="prev",
81
+ <https://www.bookingsync.com/api/v3/reservations/requests?page=2&per_page=2>; rel="last"
82
+ X-Total-Pages:
83
+ - '2'
84
+ X-Total-Count:
85
+ - '4'
86
+ X-Per-Page:
87
+ - '2'
88
+ body:
89
+ encoding: UTF-8
90
+ string: '{"links":{"requests.conversation":"https://www.bookingsync.com/api/v3/inbox/conversations/{requests.conversation}","requests.rental":"https://www.bookingsync.com/api/v3/rentals/{requests.rental}","requests.client":"https://www.bookingsync.com/api/v3/clients/{requests.client}","requests.booking":"https://www.bookingsync.com/api/v3/bookings/{requests.booking}"},"requests":[{"links":{"conversation":125,"rental":458,"client":791,"booking":102},"id":57,"expires_at":"2026-06-27T12:00:00Z","status":"pending","booking_payload":{"start_date":"2026-09-01","end_date":"2026-09-04","adults":2,"children":1,"final_price":"600.00","currency":"EUR"},"created_at":"2026-06-22T10:00:00Z","updated_at":"2026-06-22T10:00:00Z"},{"links":{"conversation":126,"rental":459,"client":792,"booking":null},"id":58,"expires_at":"2026-06-28T12:00:00Z","status":"pending","booking_payload":{"start_date":"2026-10-01","end_date":"2026-10-03","adults":1,"children":0,"final_price":"300.00","currency":"EUR"},"created_at":"2026-06-23T10:00:00Z","updated_at":"2026-06-23T10:00:00Z"}]}'
91
+ http_version:
92
+ recorded_at: Mon, 06 Jul 2026 10:00:01 GMT
93
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,47 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.bookingsync.com/api/v3/reservations/requests
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v1.2.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
+ Connection:
21
+ - keep-alive
22
+ Keep-Alive:
23
+ - 30
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Content-Type:
30
+ - application/vnd.api+json; charset=utf-8
31
+ Status:
32
+ - 200 OK
33
+ Link:
34
+ - <https://www.bookingsync.com/api/v3/reservations/requests?page=1>; rel="first",
35
+ <https://www.bookingsync.com/api/v3/reservations/requests?page=1>; rel="last"
36
+ X-Total-Pages:
37
+ - '1'
38
+ X-Total-Count:
39
+ - '2'
40
+ X-Per-Page:
41
+ - '100'
42
+ body:
43
+ encoding: UTF-8
44
+ string: '{"links":{"requests.conversation":"https://www.bookingsync.com/api/v3/inbox/conversations/{requests.conversation}","requests.rental":"https://www.bookingsync.com/api/v3/rentals/{requests.rental}","requests.client":"https://www.bookingsync.com/api/v3/clients/{requests.client}","requests.booking":"https://www.bookingsync.com/api/v3/bookings/{requests.booking}"},"requests":[{"links":{"conversation":123,"rental":456,"client":789,"booking":101},"id":55,"expires_at":"2026-06-25T12:00:00Z","status":"pending","booking_payload":{"start_date":"2026-07-01","end_date":"2026-07-08","adults":2,"children":0,"final_price":"950.00","currency":"EUR"},"created_at":"2026-06-20T10:00:00Z","updated_at":"2026-06-20T10:00:00Z"},{"links":{"conversation":124,"rental":457,"client":790,"booking":null},"id":56,"expires_at":"2026-06-26T12:00:00Z","status":"pending","booking_payload":{"start_date":"2026-08-01","end_date":"2026-08-05","adults":1,"children":0,"final_price":"400.00","currency":"EUR"},"created_at":"2026-06-21T10:00:00Z","updated_at":"2026-06-21T10:00:00Z"}]}'
45
+ http_version:
46
+ recorded_at: Mon, 06 Jul 2026 10:00:00 GMT
47
+ recorded_with: VCR 3.0.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: 1.1.0
4
+ version: 1.3.0
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: 2023-08-02 00:00:00.000000000 Z
11
+ date: 2026-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -191,6 +191,7 @@ files:
191
191
  - lib/bookingsync/api/client/rentals_amenities.rb
192
192
  - lib/bookingsync/api/client/rentals_contents_overrides.rb
193
193
  - lib/bookingsync/api/client/rentals_fees.rb
194
+ - lib/bookingsync/api/client/reservations_requests.rb
194
195
  - lib/bookingsync/api/client/review_replies.rb
195
196
  - lib/bookingsync/api/client/reviews.rb
196
197
  - lib/bookingsync/api/client/seasons.rb
@@ -248,6 +249,7 @@ files:
248
249
  - spec/bookingsync/api/client/rentals_contents_overrides_spec.rb
249
250
  - spec/bookingsync/api/client/rentals_fees_spec.rb
250
251
  - spec/bookingsync/api/client/rentals_spec.rb
252
+ - spec/bookingsync/api/client/reservations_requests_spec.rb
251
253
  - spec/bookingsync/api/client/review_replies_spec.rb
252
254
  - spec/bookingsync/api/client/reviews_spec.rb
253
255
  - spec/bookingsync/api/client/seasons_spec.rb
@@ -425,6 +427,7 @@ files:
425
427
  - spec/fixtures/cassettes/BookingSync_API_Client_RentalUrls/_rental_url/returns_rental_url.yml
426
428
  - spec/fixtures/cassettes/BookingSync_API_Client_RentalUrls/_rental_urls/links/returns_associated_rental.yml
427
429
  - spec/fixtures/cassettes/BookingSync_API_Client_RentalUrls/_rental_urls/returns_rental_urls.yml
430
+ - spec/fixtures/cassettes/BookingSync_API_Client_RentalUrls/_restore_rental_url/restores_given_rental_url.yml
428
431
  - spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_create_rental/creates_a_new_rental.yml
429
432
  - spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_delete_rental/deletes_given_rental.yml
430
433
  - spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_edit_rental/updates_given_rental_by_ID.yml
@@ -457,6 +460,12 @@ files:
457
460
  - spec/fixtures/cassettes/BookingSync_API_Client_RentalsFees/_create_rentals_fee/creates_a_new_rentals_fee.yml
458
461
  - spec/fixtures/cassettes/BookingSync_API_Client_RentalsFees/_rentals_fee/returns_a_single_rentals_fee.yml
459
462
  - spec/fixtures/cassettes/BookingSync_API_Client_RentalsFees/_rentals_fees/returns_rentals_fees.yml
463
+ - spec/fixtures/cassettes/BookingSync_API_Client_ReservationsRequests/_create_reservation_request/creates_a_new_reservations_request.yml
464
+ - spec/fixtures/cassettes/BookingSync_API_Client_ReservationsRequests/_delete_reservation_request/deletes_given_reservations_request.yml
465
+ - spec/fixtures/cassettes/BookingSync_API_Client_ReservationsRequests/_patch_reservation_request/updates_given_reservations_request_by_ID.yml
466
+ - spec/fixtures/cassettes/BookingSync_API_Client_ReservationsRequests/_reservations_request/returns_a_single_reservations_request.yml
467
+ - spec/fixtures/cassettes/BookingSync_API_Client_ReservationsRequests/_reservations_requests/pagination/with_auto_paginate_true/returns_all_reservations_requests_joined_from_many_requests.yml
468
+ - spec/fixtures/cassettes/BookingSync_API_Client_ReservationsRequests/_reservations_requests/returns_reservations_requests.yml
460
469
  - spec/fixtures/cassettes/BookingSync_API_Client_ReviewReplies/_create_guest_review_reply/creates_new_reply_to_a_guest_review.yml
461
470
  - spec/fixtures/cassettes/BookingSync_API_Client_ReviewReplies/_create_host_review_reply/creates_a_new_reply_to_host_review.yml
462
471
  - spec/fixtures/cassettes/BookingSync_API_Client_ReviewReplies/_review_replies/returns_review_replies.yml
@@ -553,6 +562,7 @@ test_files:
553
562
  - spec/bookingsync/api/client/rentals_contents_overrides_spec.rb
554
563
  - spec/bookingsync/api/client/rentals_fees_spec.rb
555
564
  - spec/bookingsync/api/client/rentals_spec.rb
565
+ - spec/bookingsync/api/client/reservations_requests_spec.rb
556
566
  - spec/bookingsync/api/client/review_replies_spec.rb
557
567
  - spec/bookingsync/api/client/reviews_spec.rb
558
568
  - spec/bookingsync/api/client/seasons_spec.rb
@@ -730,6 +740,7 @@ test_files:
730
740
  - spec/fixtures/cassettes/BookingSync_API_Client_RentalUrls/_rental_url/returns_rental_url.yml
731
741
  - spec/fixtures/cassettes/BookingSync_API_Client_RentalUrls/_rental_urls/links/returns_associated_rental.yml
732
742
  - spec/fixtures/cassettes/BookingSync_API_Client_RentalUrls/_rental_urls/returns_rental_urls.yml
743
+ - spec/fixtures/cassettes/BookingSync_API_Client_RentalUrls/_restore_rental_url/restores_given_rental_url.yml
733
744
  - spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_create_rental/creates_a_new_rental.yml
734
745
  - spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_delete_rental/deletes_given_rental.yml
735
746
  - spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_edit_rental/updates_given_rental_by_ID.yml
@@ -762,6 +773,12 @@ test_files:
762
773
  - spec/fixtures/cassettes/BookingSync_API_Client_RentalsFees/_create_rentals_fee/creates_a_new_rentals_fee.yml
763
774
  - spec/fixtures/cassettes/BookingSync_API_Client_RentalsFees/_rentals_fee/returns_a_single_rentals_fee.yml
764
775
  - spec/fixtures/cassettes/BookingSync_API_Client_RentalsFees/_rentals_fees/returns_rentals_fees.yml
776
+ - spec/fixtures/cassettes/BookingSync_API_Client_ReservationsRequests/_create_reservation_request/creates_a_new_reservations_request.yml
777
+ - spec/fixtures/cassettes/BookingSync_API_Client_ReservationsRequests/_delete_reservation_request/deletes_given_reservations_request.yml
778
+ - spec/fixtures/cassettes/BookingSync_API_Client_ReservationsRequests/_patch_reservation_request/updates_given_reservations_request_by_ID.yml
779
+ - spec/fixtures/cassettes/BookingSync_API_Client_ReservationsRequests/_reservations_request/returns_a_single_reservations_request.yml
780
+ - spec/fixtures/cassettes/BookingSync_API_Client_ReservationsRequests/_reservations_requests/pagination/with_auto_paginate_true/returns_all_reservations_requests_joined_from_many_requests.yml
781
+ - spec/fixtures/cassettes/BookingSync_API_Client_ReservationsRequests/_reservations_requests/returns_reservations_requests.yml
765
782
  - spec/fixtures/cassettes/BookingSync_API_Client_ReviewReplies/_create_guest_review_reply/creates_new_reply_to_a_guest_review.yml
766
783
  - spec/fixtures/cassettes/BookingSync_API_Client_ReviewReplies/_create_host_review_reply/creates_a_new_reply_to_host_review.yml
767
784
  - spec/fixtures/cassettes/BookingSync_API_Client_ReviewReplies/_review_replies/returns_review_replies.yml