Żądanie
CreateLeaseRequest
Zwracana wartość
CreateLeaseResponse
Wymagania:
- Identyfikator lease_id musi zostać utworzony przez backend partnera i ustawiony w odpowiedzi CreateLeaseResponse.
- W odpowiedzi CreateLeaseResponse musi być ustawiony parametr lease_expiration_time.
- Jeśli pole resources jest określone w elemencie CreateLeaseRequest, musi być ustawione w elemencie CreateLeaseResponse i odpowiadać elementowi CreateLeaseRequest.
- Wszystkie pozostałe pola w odpowiedzi CreateLeaseResponse muszą być ustawione i zgodne z żądaniem CreateLeaseRequest.
Kanoniczne kody błędów gRPC
INVALID_ARGUMENT(nieprawidłowy identyfikator sprzedawcy, identyfikator usługi, odniesienie klienta lub specyfikacja czasu rezerwacji)ALREADY_EXISTS(jeśli klient ma już rezerwację miejsca),RESOURCE_EXHAUSTED(jeśli przedział czasowy jest niedostępny)
// Request to create a [ext.maps.booking.partner.v0.Lease] for a slot in the // inventory. The expiration time in the returned Lease may be modified by the // backend, e.g. if the requested lease period is too long. message CreateLeaseRequest { option features.(pb.java).nest_in_file_class = YES; // The lease to be created with information about the appointment slot Lease lease = 1; } // Response for the [ext.maps.booking.partner.v0.CreateLease] RPC with the // created [ext.maps.booking.partner.v0.Lease] message CreateLeaseResponse { option features.(pb.java).nest_in_file_class = YES; // The created [ext.maps.booking.partner.v0.Lease] Lease lease = 1; }