שיטת חכירה

בקשה

יצירת בקשת חכירה

הערך המוחזר

יצירת תגובה לחכירה

דרישות:

  • צריך ליצור את lease_id בקצה העורפי של השותף ולהגדיר אותן ב-CreateLease Response.
  • יש להגדיר את lease_expiration_time ב-CreateLease Response.
  • אם שדה המשאבים צוין ב-CreateLeaseRequest, הוא צריך להיות מוגדר ב-CreateLease Response ותואם ל-CreateLeaseRequest.
  • יש להגדיר את כל שאר השדות ב-CreateLease Response ועליהם להתאים ל-CreateLeaseRequest.

קודי שגיאה קנוניים ב-gRPC

  • INVALID_ARGUMENT (מזהה לא חוקי, מזהה שירות, הפניה ללקוח או מפרט זמן משבצת לא חוקיים)
  • ALREADY_EXISTS (אם ללקוח כבר יש ליסינג במשבצת)
  • RESOURCE_EXHAUSTED (אם יחידת הקיבולת לא זמינה)
// 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;
}