בקשה
CreateLeaseRequest
הערך המוחזר
CreateLeaseResponse
דרישות:
- השותף צריך ליצור את lease_id בבק-אנד ולהגדיר אותו ב-CreateLeaseResponse.
- חובה להגדיר את lease_expiration_time ב-CreateLeaseResponse.
- אם השדה resources מצוין ב-CreateLeaseRequest, הוא חייב להיות מוגדר ב-CreateLeaseResponse ולהיות זהה ל-CreateLeaseRequest.
- צריך להגדיר את כל השדות האחרים ב-CreateLeaseResponse כך שיתאימו ל-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 { 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; }