Metoda CreateLease
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Żą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.messageCreateLeaseRequest{optionfeatures.(pb.java).nest_in_file_class=YES;// The lease to be created with information about the appointment slotLeaselease=1;}// Response for the [ext.maps.booking.partner.v0.CreateLease] RPC with the// created [ext.maps.booking.partner.v0.Lease]messageCreateLeaseResponse{optionfeatures.(pb.java).nest_in_file_class=YES;// The created [ext.maps.booking.partner.v0.Lease]Leaselease=1;}
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2026-02-18 UTC."],[],["The `CreateLeaseRequest` initiates a lease creation, and `CreateLeaseResponse` returns the created lease. The partner backend must generate the `lease_id` and `lease_expiration_time` in the response. If `resources` is in the request, it must be mirrored in the response. All other response fields should mirror the request. Potential gRPC errors include `INVALID_ARGUMENT`, `ALREADY_EXISTS` if a lease exists, or `RESOURCE_EXHAUSTED` if the slot is unavailable. The response might adjust the expiration time.\n"]]