Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include rental_url in rentals #340

Closed
bkniffler opened this issue Apr 8, 2021 · 2 comments
Closed

Include rental_url in rentals #340

bkniffler opened this issue Apr 8, 2021 · 2 comments

Comments

@bkniffler
Copy link

I found that rentals can't be fetched with rental_url included, but rental_urls can be fetched with the rentals. Wouldn't it make sense to include rental_url into the /rentals endpoint?

@Azdaroth
Copy link
Member

@bkniffler You mean you would like to sideload rental_urls relationship when fetching rentals? In general, that's not a recommended approach and that's why at some point new associations were stopped from getting added. Sideloading is ok when you have a strict transaction boundary (e.g. booking + bookings taxes + bookings fees in a context of anything related to price as it might be a problem when using booking's final price if the sum of all its components doesn't match). Otherwise, the recommended approach is to fetch resources separately using update since flow as described here: http://developers.bookingsync.com/guides/updated-since-flow/

@bkniffler
Copy link
Author

Makes sense. So your recommendation is to fetch all rentals and all rental_urls separately, keep them updated with updated-since flow and make the appropriate associations in our own systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants