बुक करने का तरीका

अनुरोध करें

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

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

CreateBookingResponse

साइड इफ़ेक्ट

CreateBooking, लीज़ का इस्तेमाल करती है. इसलिए, इसे आगे की बुकिंग के लिए अमान्य माना जाता है.

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

  • अगर दी गई Client Information अमान्य है, तो INVALID_ARGUMENT. जैसे: कोई फ़ील्ड मौजूद न होने की वजह से
  • अगर दिया गया लीज़ आईडी मान्य नहीं है, तो NOT_FOUND.
  • RESOURCE_EXHAUSTED (लीज़ बनाने के बाद से स्लॉट उपलब्ध न होने पर, उदाहरण के लिए, बुकिंग में गड़बड़ी होने पर)
  • ALREADY_EXISTS (अगर क्लाइंट के पास पहले से ही स्लॉट के लिए बुकिंग है)
// Request to create a [ext.maps.booking.partner.v0.Booking] for an inventory
// slot. Consumes the lease.
message CreateBookingRequest {
  // The lease that is being confirmed to make this booking
  LeaseReference lease_ref = 1;

  // Personal information of the client making the appointment
  ClientInformation client_information = 2;

  // Information about payments. If the booking request does not succeed,
  // payment authorizations are automatically canceled.
  PaymentInformation payment_information = 3;

  // The parameters to be used if the payment is processed by the partner
  // (i.e. payment_information.payment_processed_by is equal to
  // PROCESSED_BY_PARTNER).
  PaymentProcessingParameters payment_processing_parameters = 4;
}

// Response with the created [ext.maps.booking.partner.v0.Booking] for an
// inventory slot
message CreateBookingResponse {
  // The created booking
  Booking booking = 1;

  // The updated user payment option used in this booking.
  // If a new payment option was purchased to pay for the booking, this should
  // be a newly created user payment option.
  // If an already purchased user payment option was used for this booking,
  // this should reflect an updated version of that user payment option.
  UserPaymentOption user_payment_option = 2;
}