[Bookings] Add Bookings remote requests and actions #16243
Merged
+350
−21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Part of: WOOMOB-1508
Description
loadBooking(bookingID:, siteID:)remote method for loading a single bookingloadOrders(for siteID:, orderIDs:)remote method to load a set of orders with specified IDs.synchronizeBookingaction that fetches both booking and the corresponding order.synchronizeBookingsaction to also download related orders using theloadOrders(for siteID:, orderIDs:).Note: The new Booking related models containing product, customer and order info aren't yet applied. This will be handled in a separate PR depending on the Bookings: Add new entities for booking info.
Testing steps
est_route=/wc/v3/orders) for each non-empty bookings response (rest_route=/wc-bookings/v2/bookings) containing actual bookings.wc/v3/ordersrequests contain theincludeargument with non-repeating order ids. Make sure the corresponding orders returned in the response.print("The order for the booking \(readOnlyBooking.bookingID): \(associatedOrder)")Testing information
Tested in iOS 26 (iPhone 17) Simulator.
RELEASE-NOTES.txtif necessary.