Metodo CreateLease

Richiedi

CreateLeaseRequest

Valore restituito

CreateLeaseResponse

Requisiti:

  • lease_id deve essere creato dal backend del partner e impostato in CreateLeaseResponse.
  • lease_expiration_time deve essere impostato in CreateLeaseResponse.
  • Se il campo delle risorse è specificato in CreateLeaseRequest, deve essere impostato in CreateLeaseResponse e corrispondere a CreateLeaseRequest.
  • Tutti gli altri campi in CreateLeaseResponse devono essere impostati e corrispondere a CreateLeaseRequest.

Codici di errore gRPC canonici

  • INVALID_ARGUMENT (ID commerciante, ID servizio, riferimento cliente o specifica del tempo di slot non validi)
  • ALREADY_EXISTS (se il client ha già un lease per l'area annuncio)
  • RESOURCE_EXHAUSTED (se l'area non è disponibile)
// 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 {
  // 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 {
  // The created [ext.maps.booking.partner.v0.Lease]
  Lease lease = 1;
}