bookingsync-api 0.2.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +25 -0
  3. data/CHANGELOG.md +12 -0
  4. data/README.md +1 -1
  5. data/bookingsync-api.gemspec +2 -1
  6. data/lib/bookingsync/api/client/host_reviews.rb +95 -0
  7. data/lib/bookingsync/api/client/review_replies.rb +53 -0
  8. data/lib/bookingsync/api/client/reviews.rb +10 -0
  9. data/lib/bookingsync/api/client.rb +10 -6
  10. data/lib/bookingsync/api/version.rb +1 -1
  11. data/lib/bookingsync/api.rb +1 -0
  12. data/spec/bookingsync/api/client/host_reviews_spec.rb +150 -0
  13. data/spec/bookingsync/api/client/review_replies_spec.rb +61 -0
  14. data/spec/bookingsync/api/client/reviews_spec.rb +21 -1
  15. data/spec/fixtures/cassettes/BookingSync_API_Client_ApplicationsPeriodsRentals/_applications_periods_rental/returns_applications_periods_rental.yml +5 -5
  16. data/spec/fixtures/cassettes/BookingSync_API_Client_ApplicationsPeriodsRentals/_applications_periods_rentals/returns_applications_periods_rentals.yml +5 -5
  17. data/spec/fixtures/cassettes/BookingSync_API_Client_ApplicationsPeriodsRentals/_create_applications_periods_rental/creates_a_applications_periods_rental.yml +3 -3
  18. data/spec/fixtures/cassettes/BookingSync_API_Client_ApplicationsPeriodsRentals/_edit_applications_periods_rental/returns_updated_applications_periods_rental.yml +2 -2
  19. data/spec/fixtures/cassettes/BookingSync_API_Client_ApplicationsPeriodsRentals/_edit_applications_periods_rental/updates_given_applications_periods_rental_by_ID.yml +2 -2
  20. data/spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_create_applications_periods_rental/creates_an_applications_periods_rental.yml +3 -3
  21. data/spec/fixtures/cassettes/BookingSync_API_Client_HostReviews/_create_draft_host_review/creates_a_new_draft_review.yml +78 -0
  22. data/spec/fixtures/cassettes/BookingSync_API_Client_HostReviews/_create_submitted_host_review/creates_a_new_submitted_review.yml +78 -0
  23. data/spec/fixtures/cassettes/BookingSync_API_Client_HostReviews/_dismiss_host_review/dismisses_host_review.yml +76 -0
  24. data/spec/fixtures/cassettes/BookingSync_API_Client_HostReviews/_edit_draft_host_review/updates_given_host_review_by_ID.yml +77 -0
  25. data/spec/fixtures/cassettes/BookingSync_API_Client_HostReviews/_host_review/returns_a_single_host_review.yml +88 -0
  26. data/spec/fixtures/cassettes/BookingSync_API_Client_HostReviews/_host_reviews/returns_host_reviews.yml +87 -0
  27. data/spec/fixtures/cassettes/BookingSync_API_Client_HostReviews/_submit_draft_host_review/submits_given_host_review_by_ID.yml +77 -0
  28. data/spec/fixtures/cassettes/BookingSync_API_Client_Hosts/_hosts/returns_hosts.yml +1 -1
  29. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalUrls/_rental_urls/links/returns_associated_rental.yml +3 -3
  30. data/spec/fixtures/cassettes/BookingSync_API_Client_ReviewReplies/_create_guest_review_reply/creates_new_reply_to_a_guest_review.yml +77 -0
  31. data/spec/fixtures/cassettes/BookingSync_API_Client_ReviewReplies/_create_host_review_reply/creates_a_new_reply_to_host_review.yml +77 -0
  32. data/spec/fixtures/cassettes/BookingSync_API_Client_ReviewReplies/_review_replies/returns_review_replies.yml +86 -0
  33. data/spec/fixtures/cassettes/BookingSync_API_Client_ReviewReplies/_review_reply/returns_a_single_review_reply.yml +87 -0
  34. data/spec/fixtures/cassettes/BookingSync_API_Client_Reviews/_create_review/creates_a_new_review.yml +41 -50
  35. data/spec/fixtures/cassettes/BookingSync_API_Client_Reviews/_dismiss_review/dismisses_review.yml +126 -0
  36. metadata +50 -6
  37. data/.travis.yml +0 -11
@@ -75,7 +75,7 @@ http_interactions:
75
75
  body:
76
76
  encoding: UTF-8
77
77
  string: '{"links":{"rental_urls.rental":"https://www.bookingsync.com/api/v3/rentals/{rental_urls.rental}"},"rental_urls":[{"links":{"rental":1},"id":"a6e9b7a2-0fb9-42dc-8bf6-4bfa0b1aae25","label":"HomeAway","url":"test.com","lock":{"record":"","attributes":{}},"canceled_at":null,"created_at":"2019-10-05T20:23:21Z","updated_at":"2019-10-05T20:23:21Z"}],"meta":{"Link":{"first":"https://www.bookingsync.com/api/v3/rental_urls?page=1","last":"https://www.bookingsync.com/api/v3/rental_urls?page=1"},"X-Total-Pages":"1","X-Total-Count":"1","X-Per-Page":"100"}}'
78
- http_version:
78
+ http_version:
79
79
  recorded_at: Sat, 05 Oct 2019 20:24:01 GMT
80
80
  - request:
81
81
  method: get
@@ -151,7 +151,7 @@ http_interactions:
151
151
  - chunked
152
152
  body:
153
153
  encoding: UTF-8
154
- string: '{"links":{"rentals.account":"http://bookingsync.test/api/v3/accounts/{rentals.account}","rentals.availability":"http://bookingsync.test/api/v3/availabilities/{rentals.availability}","rentals.change_over":"http://bookingsync.test/api/v3/change_overs/{rentals.change_over}","rentals.destination":"http://bookingsync.test/api/v3/destinations/{rentals.destination}","rentals.rates_table":"http://bookingsync.test/api/v3/rates_tables/{rentals.rates_table}","rentals.rental_agreement":"http://bookingsync.test/api/v3/rental_agreements/{rentals.rental_agreement}","rentals.rental_cancelation_policy":"http://bookingsync.test/api/v3/rental_cancelation_policies/{rentals.rental_cancelation_policy}","rentals.nightly_rate_map":"http://bookingsync.test/api/v3/nightly_rate_maps/{rentals.nightly_rate_map}","rentals.photos":"http://bookingsync.test/api/v3/photos/{rentals.photos}","rentals.reviews":"http://bookingsync.test/api/v3/reviews/{rentals.reviews}","rentals.special_offers":"http://bookingsync.test/api/v3/special_offers/{rentals.special_offers}","rentals.rates":"http://bookingsync.test/api/v3/rates/{rentals.rates}","rentals.rentals_amenities":"http://bookingsync.test/api/v3/rentals_amenities/{rentals.rentals_amenities}","rentals.rentals_fees":"http://bookingsync.test/api/v3/rentals_fees/{rentals.rentals_fees}","rentals.bathrooms":"http://bookingsync.test/api/v3/bathrooms/{rentals.bathrooms}","rentals.bedrooms":"http://bookingsync.test/api/v3/bedrooms/{rentals.bedrooms}","rentals.living_rooms":"http://bookingsync.test/api/v3/living_rooms/{rentals.living_rooms}","rentals.rentals_tags":"http://bookingsync.test/api/v3/rentals_tags/{rentals.rentals_tags}","rentals.rental_contacts":"http://bookingsync.test/api/v3/rental_contacts/{rentals.rental_contacts}","rentals.videos":"http://bookingsync.test/api/v3/videos/{rentals.videos}"},"rentals":[{"links":{"account":1,"availability":1,"bathrooms":[1],"bedrooms":[],"change_over":1,"destination":85,"living_rooms":[],"nightly_rate_map":1,"photos":[1],"rates":[1,2,3],"rates_table":1,"rental_agreement":1,"rental_cancelation_policy":2,"rental_contacts":[],"rentals_amenities":[1,2,3],"rentals_fees":[],"rentals_tags":[],"reviews":[1,2,3,4,5,6,7,8,9,10,11,12,13],"special_offers":[1],"videos":[]},"id":1,"name":"Farmhouse
154
+ string: '{"links":{"rentals.account":"http://www.bookingsync.com/api/v3/accounts/{rentals.account}","rentals.availability":"http://www.bookingsync.com/api/v3/availabilities/{rentals.availability}","rentals.change_over":"http://www.bookingsync.com/api/v3/change_overs/{rentals.change_over}","rentals.destination":"http://www.bookingsync.com/api/v3/destinations/{rentals.destination}","rentals.rates_table":"http://www.bookingsync.com/api/v3/rates_tables/{rentals.rates_table}","rentals.rental_agreement":"http://www.bookingsync.com/api/v3/rental_agreements/{rentals.rental_agreement}","rentals.rental_cancelation_policy":"http://www.bookingsync.com/api/v3/rental_cancelation_policies/{rentals.rental_cancelation_policy}","rentals.nightly_rate_map":"http://www.bookingsync.com/api/v3/nightly_rate_maps/{rentals.nightly_rate_map}","rentals.photos":"http://www.bookingsync.com/api/v3/photos/{rentals.photos}","rentals.reviews":"http://www.bookingsync.com/api/v3/reviews/{rentals.reviews}","rentals.special_offers":"http://www.bookingsync.com/api/v3/special_offers/{rentals.special_offers}","rentals.rates":"http://www.bookingsync.com/api/v3/rates/{rentals.rates}","rentals.rentals_amenities":"http://www.bookingsync.com/api/v3/rentals_amenities/{rentals.rentals_amenities}","rentals.rentals_fees":"http://www.bookingsync.com/api/v3/rentals_fees/{rentals.rentals_fees}","rentals.bathrooms":"http://www.bookingsync.com/api/v3/bathrooms/{rentals.bathrooms}","rentals.bedrooms":"http://www.bookingsync.com/api/v3/bedrooms/{rentals.bedrooms}","rentals.living_rooms":"http://www.bookingsync.com/api/v3/living_rooms/{rentals.living_rooms}","rentals.rentals_tags":"http://www.bookingsync.com/api/v3/rentals_tags/{rentals.rentals_tags}","rentals.rental_contacts":"http://www.bookingsync.com/api/v3/rental_contacts/{rentals.rental_contacts}","rentals.videos":"http://www.bookingsync.com/api/v3/videos/{rentals.videos}"},"rentals":[{"links":{"account":1,"availability":1,"bathrooms":[1],"bedrooms":[],"change_over":1,"destination":85,"living_rooms":[],"nightly_rate_map":1,"photos":[1],"rates":[1,2,3],"rates_table":1,"rental_agreement":1,"rental_cancelation_policy":2,"rental_contacts":[],"rentals_amenities":[1,2,3],"rentals_fees":[],"rentals_tags":[],"reviews":[1,2,3,4,5,6,7,8,9,10,11,12,13],"special_offers":[1],"videos":[]},"id":1,"name":"Farmhouse
155
155
  Badminton","headline":{"en":"Farmhouse Badminton Surfing"},"summary":{"en":"Ipsum
156
156
  consequatur voluptas beatae laudantium quo libero architecto."},"description":{"en":"Eum
157
157
  quia quo repellat natus aut consequatur est. Ipsum rerum qui consequatur aut
@@ -161,6 +161,6 @@ http_interactions:
161
161
  impedit sint non. Natus est sit non est laudantium. Non quis quia non et.
162
162
  Vel accusamus temporibus ducimus rerum unde est sapiente qui."},"rental_type":"villa","downpayment":30,"bedrooms_count":0,"sleeps":7,"sleeps_max":null,"bathrooms_count":1,"surface":120,"surface_unit":"metric","bookable_online":false,"bookable_on_request":true,"instantly_bookable":false,"min_price":"45.0","max_price":"500.0","currency":"EUR","price_public_notes":{"en":"Public
163
163
  notes in english"},"lat":45.02,"lng":6.6,"city":"Nevache","state":null,"country_code":"FR","contact_name":null,"reviews_count":13,"reviews_average_rating":"4.5","published_at":"2019-10-04T16:27:30Z","created_at":"2019-10-04T16:26:11Z","updated_at":"2019-10-04T16:27:39Z","address1":null,"address2":null,"zip":null,"checkin_time":16,"checkin_end_time":null,"checkout_time":10,"initial_price":null,"final_price":null,"position":1,"base_rate":"500.0","base_rate_kind":"weekly","absolute_min_price":"0.0","notes":null,"stories_count":null,"floor":"","damage_deposit":"35.5","owner_fullname":null,"owner_email":null,"owner_notes":null,"checkin_details":{},"checkout_details":{},"balance_due":30,"website_url":{},"charge_damage_deposit_on_arrival":true,"full_bathrooms_count":0,"standalone_toilets_count":0,"vr_bathrooms_count":1,"nightly_rates_managed_externally":false,"rounding_kind":"no-rounding","original_currency":"EUR","exchange_rate":"1.0","permit_number":null,"absolute_min_stay":7,"space":{},"guests_access":{},"guests_interaction":{},"guests_interaction_kind":null,"public_notes":{},"neighborhood_overview":{},"neighborhood_transit":{},"residency_category":null,"content_requirements_met":false,"certifications":{},"canceled_at":null}],"meta":{"Link":{"first":"https://www.bookingsync.com/api/v3/rentals/1?page=1","last":"https://www.bookingsync.com/api/v3/rentals/1?page=1"},"X-Total-Pages":"1","X-Total-Count":"1","X-Per-Page":"50"}}'
164
- http_version:
164
+ http_version:
165
165
  recorded_at: Sat, 05 Oct 2019 20:24:02 GMT
166
166
  recorded_with: VCR 5.0.0
@@ -0,0 +1,77 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://www.bookingsync.com/api/v3/reviews/34/reply
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"review_replies":[{"message":"Merci!"}]}'
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.1.14
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/"34d31e0437945ca36780e5cde7fff74b"
35
+ Location:
36
+ - https://www.bookingsync.com/api/v3/review_replies/96f9e3f1-ed2a-4c8c-8e2f-1d3e1d0c8356
37
+ Referrer-Policy:
38
+ - strict-origin-when-cross-origin
39
+ Set-Cookie:
40
+ - ahoy_visit=c10ad674-1a94-43d4-8d42-196ef7cd5590; path=/; expires=Mon, 29 Mar
41
+ 2021 15:51:07 GMT
42
+ - ahoy_visitor=35fdbda6-bae9-4181-a60c-fb9672d9cafe; path=/; expires=Wed, 22
43
+ Mar 2023 15:51:07 GMT
44
+ Vary:
45
+ - Origin
46
+ X-Content-Type-Options:
47
+ - nosniff
48
+ X-Download-Options:
49
+ - noopen
50
+ X-Frame-Options:
51
+ - SAMEORIGIN
52
+ X-Permitted-Cross-Domain-Policies:
53
+ - none
54
+ X-Ratelimit-Limit:
55
+ - '1000'
56
+ X-Ratelimit-Remaining:
57
+ - '990'
58
+ X-Ratelimit-Reset:
59
+ - '1616428800'
60
+ X-Request-Id:
61
+ - 81c82884-63e3-4791-b4f5-fc09ef2c2ea5
62
+ X-Runtime:
63
+ - '0.361858'
64
+ X-Updated-Since-Request-Synced-At:
65
+ - 2021-03-22 15:51:07 UTC
66
+ X-Xss-Protection:
67
+ - 1; mode=block
68
+ Date:
69
+ - Mon, 22 Mar 2021 15:51:08 GMT
70
+ Content-Length:
71
+ - '451'
72
+ body:
73
+ encoding: UTF-8
74
+ string: '{"links":{"review_replies.guest_review":"https://www.bookingsync.com/api/v3/reviews/{review_replies.guest_review}","review_replies.host_review":"https://www.bookingsync.com/api/v3/host_reviews/{review_replies.host_review}"},"review_replies":[{"links":{"guest_review":34,"host_review":null},"id":"96f9e3f1-ed2a-4c8c-8e2f-1d3e1d0c8356","message":"Merci!","submitted_at":null,"created_at":"2021-03-22T15:51:07Z","updated_at":"2021-03-22T15:51:07Z"}],"meta":{}}'
75
+ http_version:
76
+ recorded_at: Mon, 22 Mar 2021 15:51:08 GMT
77
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,77 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://www.bookingsync.com/api/v3/host_reviews/04356dc9-1349-4e05-b818-09ccdac8d5dd/reply
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"review_replies":[{"message":"Thanks!"}]}'
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.1.14
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/"d24d5539fce434580f3f080da374fa6b"
35
+ Location:
36
+ - https://www.bookingsync.com/api/v3/review_replies/3c844ef6-7ef9-4718-82b5-20ec043423c7
37
+ Referrer-Policy:
38
+ - strict-origin-when-cross-origin
39
+ Set-Cookie:
40
+ - ahoy_visit=6862e092-ed64-4678-8383-d1fc83c9c47a; path=/; expires=Mon, 29 Mar
41
+ 2021 15:46:41 GMT
42
+ - ahoy_visitor=d64ea62f-8bc0-4fb1-81fd-0e30bebde02a; path=/; expires=Wed, 22
43
+ Mar 2023 15:46:41 GMT
44
+ Vary:
45
+ - Origin
46
+ X-Content-Type-Options:
47
+ - nosniff
48
+ X-Download-Options:
49
+ - noopen
50
+ X-Frame-Options:
51
+ - SAMEORIGIN
52
+ X-Permitted-Cross-Domain-Policies:
53
+ - none
54
+ X-Ratelimit-Limit:
55
+ - '1000'
56
+ X-Ratelimit-Remaining:
57
+ - '993'
58
+ X-Ratelimit-Reset:
59
+ - '1616428800'
60
+ X-Request-Id:
61
+ - 7150ed96-a672-4492-9c1b-cea8e0038b59
62
+ X-Runtime:
63
+ - '0.397915'
64
+ X-Updated-Since-Request-Synced-At:
65
+ - 2021-03-22 15:46:41 UTC
66
+ X-Xss-Protection:
67
+ - 1; mode=block
68
+ Date:
69
+ - Mon, 22 Mar 2021 15:46:42 GMT
70
+ Content-Length:
71
+ - '488'
72
+ body:
73
+ encoding: UTF-8
74
+ string: '{"links":{"review_replies.guest_review":"https://www.bookingsync.com/api/v3/reviews/{review_replies.guest_review}","review_replies.host_review":"https://www.bookingsync.com/api/v3/host_reviews/{review_replies.host_review}"},"review_replies":[{"links":{"guest_review":null,"host_review":"04356dc9-1349-4e05-b818-09ccdac8d5dd"},"id":"3c844ef6-7ef9-4718-82b5-20ec043423c7","message":"Thanks!","submitted_at":null,"created_at":"2021-03-22T15:46:42Z","updated_at":"2021-03-22T15:46:42Z"}],"meta":{}}'
75
+ http_version:
76
+ recorded_at: Mon, 22 Mar 2021 15:46:42 GMT
77
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,86 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.bookingsync.com/api/v3/review_replies
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.1.14
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/"b4b12d5155c2e714bbf620d07a0cbdab"
35
+ Link:
36
+ - <https://www.bookingsync.com/api/v3/review_replies?page=1>; rel="first", <https://www.bookingsync.com/api/v3/review_replies?page=1>;
37
+ rel="last"
38
+ Referrer-Policy:
39
+ - strict-origin-when-cross-origin
40
+ Set-Cookie:
41
+ - ahoy_visit=0ba59b6d-1626-43fd-9321-205b37b48220; path=/; expires=Mon, 29 Mar
42
+ 2021 15:46:48 GMT
43
+ - ahoy_visitor=8c7dff55-a4d7-4618-9cd0-94365dbd8927; path=/; expires=Wed, 22
44
+ Mar 2023 15:46:48 GMT
45
+ Vary:
46
+ - Origin
47
+ X-Content-Type-Options:
48
+ - nosniff
49
+ X-Current-Page:
50
+ - '1'
51
+ X-Download-Options:
52
+ - noopen
53
+ X-Frame-Options:
54
+ - SAMEORIGIN
55
+ X-Per-Page:
56
+ - '100'
57
+ X-Permitted-Cross-Domain-Policies:
58
+ - none
59
+ X-Ratelimit-Limit:
60
+ - '1000'
61
+ X-Ratelimit-Remaining:
62
+ - '992'
63
+ X-Ratelimit-Reset:
64
+ - '1616428800'
65
+ X-Request-Id:
66
+ - 617c7b7b-dfd7-4e07-8731-5c21df1497fa
67
+ X-Runtime:
68
+ - '0.193850'
69
+ X-Total-Count:
70
+ - '1'
71
+ X-Total-Pages:
72
+ - '1'
73
+ X-Updated-Since-Request-Synced-At:
74
+ - 2021-03-22 15:46:48 UTC
75
+ X-Xss-Protection:
76
+ - 1; mode=block
77
+ Date:
78
+ - Mon, 22 Mar 2021 15:46:48 GMT
79
+ Content-Length:
80
+ - '682'
81
+ body:
82
+ encoding: UTF-8
83
+ string: '{"links":{"review_replies.guest_review":"https://www.bookingsync.com/api/v3/reviews/{review_replies.guest_review}","review_replies.host_review":"https://www.bookingsync.com/api/v3/host_reviews/{review_replies.host_review}"},"review_replies":[{"links":{"guest_review":null,"host_review":"04356dc9-1349-4e05-b818-09ccdac8d5dd"},"id":"3c844ef6-7ef9-4718-82b5-20ec043423c7","message":"Thanks!","submitted_at":null,"created_at":"2021-03-22T15:46:42Z","updated_at":"2021-03-22T15:46:42Z"}],"meta":{"Link":{"first":"https://www.bookingsync.com/api/v3/review_replies?page=1","last":"https://www.bookingsync.com/api/v3/review_replies?page=1"},"X-Total-Pages":"1","X-Total-Count":"1","X-Per-Page":"100"}}'
84
+ http_version:
85
+ recorded_at: Mon, 22 Mar 2021 15:46:48 GMT
86
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,87 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.bookingsync.com/api/v3/review_replies/3c844ef6-7ef9-4718-82b5-20ec043423c7
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.1.14
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/"dbb14031e3a24207b62074aedf207797"
35
+ Link:
36
+ - <https://www.bookingsync.com/api/v3/review_replies/3c844ef6-7ef9-4718-82b5-20ec043423c7?page=1>;
37
+ rel="first", <https://www.bookingsync.com/api/v3/review_replies/3c844ef6-7ef9-4718-82b5-20ec043423c7?page=1>;
38
+ rel="last"
39
+ Referrer-Policy:
40
+ - strict-origin-when-cross-origin
41
+ Set-Cookie:
42
+ - ahoy_visit=a1d5bffc-90e3-4eaa-ad0f-f06b6ce8a7c6; path=/; expires=Mon, 29 Mar
43
+ 2021 15:46:54 GMT
44
+ - ahoy_visitor=68121f96-ec0a-40c7-b591-3924a41e33ba; path=/; expires=Wed, 22
45
+ Mar 2023 15:46:54 GMT
46
+ Vary:
47
+ - Origin
48
+ X-Content-Type-Options:
49
+ - nosniff
50
+ X-Current-Page:
51
+ - '1'
52
+ X-Download-Options:
53
+ - noopen
54
+ X-Frame-Options:
55
+ - SAMEORIGIN
56
+ X-Per-Page:
57
+ - '100'
58
+ X-Permitted-Cross-Domain-Policies:
59
+ - none
60
+ X-Ratelimit-Limit:
61
+ - '1000'
62
+ X-Ratelimit-Remaining:
63
+ - '991'
64
+ X-Ratelimit-Reset:
65
+ - '1616428800'
66
+ X-Request-Id:
67
+ - 82105f97-2806-4a59-820b-00fa9e8aa8e9
68
+ X-Runtime:
69
+ - '0.192039'
70
+ X-Total-Count:
71
+ - '1'
72
+ X-Total-Pages:
73
+ - '1'
74
+ X-Updated-Since-Request-Synced-At:
75
+ - 2021-03-22 15:46:54 UTC
76
+ X-Xss-Protection:
77
+ - 1; mode=block
78
+ Date:
79
+ - Mon, 22 Mar 2021 15:46:54 GMT
80
+ Content-Length:
81
+ - '756'
82
+ body:
83
+ encoding: UTF-8
84
+ string: '{"links":{"review_replies.guest_review":"https://www.bookingsync.com/api/v3/reviews/{review_replies.guest_review}","review_replies.host_review":"https://www.bookingsync.com/api/v3/host_reviews/{review_replies.host_review}"},"review_replies":[{"links":{"guest_review":null,"host_review":"04356dc9-1349-4e05-b818-09ccdac8d5dd"},"id":"3c844ef6-7ef9-4718-82b5-20ec043423c7","message":"Thanks!","submitted_at":null,"created_at":"2021-03-22T15:46:42Z","updated_at":"2021-03-22T15:46:42Z"}],"meta":{"Link":{"first":"https://www.bookingsync.com/api/v3/review_replies/3c844ef6-7ef9-4718-82b5-20ec043423c7?page=1","last":"https://www.bookingsync.com/api/v3/review_replies/3c844ef6-7ef9-4718-82b5-20ec043423c7?page=1"},"X-Total-Pages":"1","X-Total-Count":"1","X-Per-Page":"100"}}'
85
+ http_version:
86
+ recorded_at: Mon, 22 Mar 2021 15:46:54 GMT
87
+ recorded_with: VCR 3.0.3
@@ -2,13 +2,13 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://www.bookingsync.com/api/v3/bookings/840059/reviews
5
+ uri: https://www.bookingsync.com/api/v3/bookings/3/reviews
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"reviews":[{"comment":"Awesome place","rating":5}]}'
9
9
  headers:
10
10
  User-Agent:
11
- - BookingSync API gem v0.1.3
11
+ - BookingSync API gem v0.1.14
12
12
  Accept:
13
13
  - application/vnd.api+json
14
14
  Content-Type:
@@ -20,68 +20,59 @@ http_interactions:
20
20
  Connection:
21
21
  - keep-alive
22
22
  Keep-Alive:
23
- - 30
23
+ - '30'
24
24
  response:
25
25
  status:
26
26
  code: 201
27
27
  message: Created
28
28
  headers:
29
- Server:
30
- - nginx
31
- Date:
32
- - Mon, 12 Dec 2016 12:24:56 GMT
29
+ Cache-Control:
30
+ - max-age=0, private, must-revalidate
33
31
  Content-Type:
34
32
  - application/vnd.api+json; charset=utf-8
35
- Transfer-Encoding:
36
- - chunked
37
- Connection:
38
- - keep-alive
39
- Status:
40
- - 201 Created
41
- X-Frame-Options:
42
- - SAMEORIGIN
43
- X-Xss-Protection:
44
- - 1; mode=block
33
+ Etag:
34
+ - W/"e5c7c30a3c7938c3a3b5301b7f6fb0a9"
35
+ Location:
36
+ - https://www.bookingsync.com/api/v3/reviews/13
37
+ Referrer-Policy:
38
+ - strict-origin-when-cross-origin
39
+ Set-Cookie:
40
+ - ahoy_visit=9c08c755-8eb5-4cbd-bac8-51a7f21391ca; path=/; expires=Wed, 08 Dec
41
+ 2021 13:08:46 GMT
42
+ - ahoy_visitor=da81539d-d563-4896-b9e4-63e59a36ea1d; path=/; expires=Fri, 01
43
+ Dec 2023 13:08:46 GMT
44
+ Vary:
45
+ - Accept, Origin
45
46
  X-Content-Type-Options:
46
47
  - nosniff
47
- X-Updated-Since-Request-Synced-At:
48
- - 2016-12-12 12:24:56 UTC
48
+ X-Download-Options:
49
+ - noopen
50
+ X-Frame-Options:
51
+ - SAMEORIGIN
52
+ X-Permitted-Cross-Domain-Policies:
53
+ - none
49
54
  X-Ratelimit-Limit:
50
55
  - '1000'
51
- X-Ratelimit-Reset:
52
- - '1481547600'
53
56
  X-Ratelimit-Remaining:
54
- - '960'
55
- Link:
56
- - <https://www.bookingsync.com/api/v3/bookings/840059/reviews?page=1&reviews%5B%5D%5Bcomment%5D=Awesome+place&reviews%5B%5D%5Brating%5D=5>;
57
- rel="first"
58
- X-Per-Page:
59
- - '100'
60
- Location:
61
- - https://www.bookingsync.com/api/v3/reviews/80487
62
- Etag:
63
- - W/"285272367747e495ba917152cd285c36"
64
- Cache-Control:
65
- - max-age=0, private, must-revalidate
66
- P3p:
67
- - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
68
- OUR SAMi OTRo UNRo PUBi IND UNI STA"
69
- Set-Cookie:
70
- - ahoy_track=true; path=/; secure
71
- - ahoy_visit=252a23bc-de51-49e3-848f-77019d9bf70a; path=/; expires=Mon, 19 Dec
72
- 2016 12:24:56 -0000; secure
73
- - ahoy_visitor=e053ef05-6689-432a-ba5c-b85f2d814015; path=/; expires=Wed, 12
74
- Dec 2018 12:24:56 -0000; secure
57
+ - '999'
58
+ X-Ratelimit-Reset:
59
+ - '1638367200'
75
60
  X-Request-Id:
76
- - 90faafa7-8596-48d5-ae21-c330b6622b74
61
+ - 43361175-ffc6-4518-8d7a-47ad0ff30f39
77
62
  X-Runtime:
78
- - '0.182948'
79
- Strict-Transport-Security:
80
- - max-age=31536000
63
+ - '5.022841'
64
+ X-Updated-Since-Request-Synced-At:
65
+ - 2021-12-01 13:08:46 UTC
66
+ X-Xss-Protection:
67
+ - 1; mode=block
68
+ Date:
69
+ - Wed, 01 Dec 2021 13:08:51 GMT
70
+ Content-Length:
71
+ - '973'
81
72
  body:
82
73
  encoding: UTF-8
83
- string: '{"links":{"reviews.booking":"https://www.bookingsync.com/api/v3/bookings/{reviews.booking}","reviews.rental":"https://www.bookingsync.com/api/v3/rentals/{reviews.rental}"},"reviews":[{"links":{"booking":840059,"rental":5116},"id":80487,"rating":5,"comment":"Awesome
84
- place","name":"Eero E.","title":"Awesome place","created_at":"2016-12-12T12:24:56Z","updated_at":"2016-12-12T12:24:56Z"}]}'
85
- http_version:
86
- recorded_at: Mon, 12 Dec 2016 12:24:56 GMT
74
+ string: '{"links":{"reviews.source":"https://www.bookingsync.com/api/v3/sources/{reviews.source}","reviews.reply":"https://www.bookingsync.com/api/v3/review_replies/{reviews.reply}","reviews.booking":"https://www.bookingsync.com/api/v3/bookings/{reviews.booking}","reviews.rental":"https://www.bookingsync.com/api/v3/rentals/{reviews.rental}","reviews.account":"https://www.bookingsync.com/api/v3/accounts/{reviews.account}"},"reviews":[{"links":{"account":1,"booking":3,"rental":1,"reply":null,"source":null},"id":13,"rating":5,"comment":"Awesome
75
+ place","name":"Full N.","title":"Awesome place","country_code":null,"created_at":"2021-12-01T13:08:47Z","updated_at":"2021-12-01T13:08:47Z","rating_accurate":"5.0","shareable":true,"private_comment":null,"dismissed_at":null,"dismissed_by":null,"dismissal_reason":null,"criteria":{"cleanliness":null,"checkin":null,"communication":null,"location":null,"facilities":null,"comfort":null,"staff":null,"value_for_money":null,"accuracy":null}}],"meta":{}}'
76
+ http_version:
77
+ recorded_at: Wed, 01 Dec 2021 13:08:51 GMT
87
78
  recorded_with: VCR 3.0.3
@@ -0,0 +1,126 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://www.bookingsync.com/api/v3/reviews/13/dismiss
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"reviews":[{"dismissed_at":"2021-12-01T16:00:00Z"}]}'
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.1.14
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/"1ad821139e4a32c074ae0cf2dff5b4a6"
35
+ Referrer-Policy:
36
+ - strict-origin-when-cross-origin
37
+ Set-Cookie:
38
+ - ahoy_visit=378bd304-8f87-4e0b-a13e-bde8fa719f82; path=/; expires=Wed, 08 Dec
39
+ 2021 13:14:01 GMT
40
+ - ahoy_visitor=4f5abdac-4aa7-4958-9616-1e88bf469b20; path=/; expires=Fri, 01
41
+ Dec 2023 13:14:01 GMT
42
+ Vary:
43
+ - Accept, Origin
44
+ X-Bullet-Console-Text:
45
+ - '["user: zolw\nUSE eager loading detected\n Period => [:season]\n Add to
46
+ your query: .includes([:season])\nCall stack\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/models/period.rb:22:in
47
+ `minimum_stay''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/models/rental.rb:854:in
48
+ `filter_map''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/models/rental.rb:854:in
49
+ `absolute_min_stay''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/serializers/api/v3/base_serializer.rb:122:in
50
+ `block in attributes''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/config/initializers/instrumentation.rb:9:in
51
+ `block (2 levels) in instrument''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/config/initializers/instrumentation.rb:8:in
52
+ `block in instrument''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/config/initializers/instrumentation.rb:7:in
53
+ `instrument''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/serializers/api/v3/base_serializer.rb:185:in
54
+ `instrument''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/serializers/api/v3/base_serializer.rb:121:in
55
+ `attributes''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/serializers/api/v3/base_serializer.rb:116:in
56
+ `block in serializable_object''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/config/initializers/instrumentation.rb:9:in
57
+ `block (2 levels) in instrument''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/config/initializers/instrumentation.rb:8:in
58
+ `block in instrument''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/config/initializers/instrumentation.rb:7:in
59
+ `instrument''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/serializers/api/v3/base_serializer.rb:185:in
60
+ `instrument''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/serializers/api/v3/base_serializer.rb:115:in
61
+ `serializable_object''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/config/initializers/active_model_serializer.rb:12:in
62
+ `block in serializable_object''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/config/initializers/active_model_serializer.rb:12:in
63
+ `map''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/config/initializers/active_model_serializer.rb:12:in
64
+ `serializable_object''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/services/bookingsync/prometheus/api_v3_derived_serializer.rb:22:in
65
+ `serialize''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/services/bookingsync/prometheus/api_v3_derived_serializer.rb:5:in
66
+ `serialize''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/config/initializers/instrumentation.rb:9:in
67
+ `block (2 levels) in instrument''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/config/initializers/instrumentation.rb:8:in
68
+ `block in instrument''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/config/initializers/instrumentation.rb:7:in
69
+ `instrument''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/services/prometheus/retryable_publisher.rb:19:in
70
+ `block in publish''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/services/retryable.rb:8:in
71
+ `perform''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/services/prometheus/retryable_publisher.rb:18:in
72
+ `publish''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/services/prometheus/event_bus_to_prometheus_publisher.rb:59:in
73
+ `publish''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/services/prometheus/event_bus_to_prometheus_publisher.rb:30:in
74
+ `block in publish_for_top_level_resource''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/services/prometheus/event_bus_to_prometheus_publisher.rb:26:in
75
+ `each''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/services/prometheus/event_bus_to_prometheus_publisher.rb:26:in
76
+ `publish_for_top_level_resource''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/services/prometheus/event_bus_to_prometheus_publisher.rb:18:in
77
+ `block in call''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/config/initializers/instrumentation.rb:9:in
78
+ `block (2 levels) in instrument''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/config/initializers/instrumentation.rb:8:in
79
+ `block in instrument''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/config/initializers/instrumentation.rb:7:in
80
+ `instrument''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/services/prometheus/event_bus_to_prometheus_publisher.rb:11:in
81
+ `call''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/services/stateless_service.rb:16:in
82
+ `call''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/config/initializers/events.rb:118:in
83
+ `block in <main>''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/models/concern/eventable.rb:38:in
84
+ `block (2 levels) in <module:Eventable>''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/lib/operation/composite.rb:115:in
85
+ `block in <class:Composite>''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/lib/operation/composite.rb:243:in
86
+ `call_monad''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/lib/operation/composite.rb:179:in
87
+ `call''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/app/controllers/api/v3/reviews_controller.rb:21:in
88
+ `dismiss''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/config/initializers/action_controller_instrumentation_patch.rb:25:in
89
+ `block in process_action''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/config/initializers/action_controller_instrumentation_patch.rb:24:in
90
+ `process_action''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/lib/rack/idempotency.rb:32:in
91
+ `call''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/lib/rack/utf8_validator.rb:14:in
92
+ `call''\n /Users/zolw/Documents/Coding/bookingsync/BookingSync/lib/rack/catch_parse_errors.rb:9:in
93
+ `call''\n\n"]'
94
+ X-Content-Type-Options:
95
+ - nosniff
96
+ X-Download-Options:
97
+ - noopen
98
+ X-Frame-Options:
99
+ - SAMEORIGIN
100
+ X-Permitted-Cross-Domain-Policies:
101
+ - none
102
+ X-Ratelimit-Limit:
103
+ - '1000'
104
+ X-Ratelimit-Remaining:
105
+ - '997'
106
+ X-Ratelimit-Reset:
107
+ - '1638367200'
108
+ X-Request-Id:
109
+ - 8d3bacea-34bd-4fef-87f0-06782a2102cc
110
+ X-Runtime:
111
+ - '1.205115'
112
+ X-Updated-Since-Request-Synced-At:
113
+ - 2021-12-01 13:14:01 UTC
114
+ X-Xss-Protection:
115
+ - 1; mode=block
116
+ Date:
117
+ - Wed, 01 Dec 2021 13:14:02 GMT
118
+ Content-Length:
119
+ - '991'
120
+ body:
121
+ encoding: UTF-8
122
+ string: '{"links":{"reviews.source":"https://www.bookingsync.com/api/v3/sources/{reviews.source}","reviews.reply":"https://www.bookingsync.com/api/v3/review_replies/{reviews.reply}","reviews.booking":"https://www.bookingsync.com/api/v3/bookings/{reviews.booking}","reviews.rental":"https://www.bookingsync.com/api/v3/rentals/{reviews.rental}","reviews.account":"https://www.bookingsync.com/api/v3/accounts/{reviews.account}"},"reviews":[{"links":{"account":1,"booking":3,"rental":1,"reply":null,"source":null},"id":13,"rating":5,"comment":"Awesome
123
+ place","name":"Full N.","title":"Awesome place","country_code":null,"created_at":"2021-12-01T13:08:47Z","updated_at":"2021-12-01T13:14:01Z","rating_accurate":"5.0","shareable":true,"private_comment":null,"dismissed_at":"2021-12-01T16:00:00Z","dismissed_by":null,"dismissal_reason":null,"criteria":{"cleanliness":null,"checkin":null,"communication":null,"location":null,"facilities":null,"comfort":null,"staff":null,"value_for_money":null,"accuracy":null}}],"meta":{}}'
124
+ http_version:
125
+ recorded_at: Wed, 01 Dec 2021 13:14:02 GMT
126
+ recorded_with: VCR 3.0.3