अपडेट बुकिंग का तरीका

अनुरोध करें

अपडेट बुकिंग का अनुरोध

अनुरोध वाले मैसेज में, बुकिंग फ़ील्ड में अपडेट की गई जानकारी होती है. साथ ही, updated_mask फ़ील्ड में अपडेट किए जाने वाले सभी बुकिंग फ़ील्ड के पाथ की सूची भी होती है. उदाहरण के लिए, किसी मौजूदा बुकिंग को फिर से शेड्यूल करने वाले अनुरोध के अपडेट_mask फ़ील्ड में, ये दो पाथ शामिल होते हैं:

  paths: "start_time"
  paths: "duration"

ज़्यादा जानकारी के लिए FieldMask देखें.

रिटर्न वैल्यू

अपडेट बुकिंग रिस्पॉन्स

कैननिकल gRPC गड़बड़ी कोड

  • INVALID_ARGUMENT अगर दिए गए फ़ील्ड मास्क में अमान्य वैल्यू हैं या अपडेट किए गए बुकिंग फ़ील्ड में से कोई फ़ील्ड अमान्य है. इसमें, ऐसा मामला शामिल है जिसमें कारोबार के हिसाब से, फ़ील्ड को अपडेट करने की अनुमति नहीं है. उदाहरण के लिए, ऐसा इसलिए होता है, क्योंकि इसे रद्द करने में बहुत देरी हो जाती है.
  • अगर दिया गया बुकिंग आईडी अज्ञात है, तो NOT_FOUND
  • RESOURCE_EXHAUSTED अगर अपडेट किए गए शुरू होने के समय से जुड़ा स्लॉट बुकिंग के लिए उपलब्ध नहीं है.
// Request to update a [ext.maps.booking.partner.v0.Booking]
message UpdateBookingRequest {
  // Field mask of all booking fields to be updated
  google.protobuf.FieldMask update_mask = 1;

  // The booking to be updated
  // The following fields can be set in a booking:
  // - status, to cancel a booking.
  // - start_time and duration to reschedule a booking.
  Booking booking = 2;
}

// Response with the updated [ext.maps.booking.partner.v0.Booking]
message UpdateBookingResponse {
  // The updated booking
  Booking booking = 1;

  // The updated user payment option originally used to pay for this booking.
  // This should be set if the UpdateBookingRequest results in a change to
  // the UserPaymentOption.
  // For instance, if the booking is canceled, the UserPaymentOption should
  // reflect an additional credit to the user. In the case of a multi-use
  // payment option, the current_count should be increased by one to
  // allow the user to create another booking with this payment option. In the
  // case of a single-use payment option, a new single-use user payment option
  // should be returned.
  UserPaymentOption user_payment_option = 2;
}