GetBookingStatus 方法
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
此方法会基于用户提供的预订 ID 返回其预订状态。
请求
GetBookingStatusRequest
返回值
GetBookingStatusResponse
// Request to get booking status and prepayment status for a Booking.
message GetBookingStatusRequest {
// ID of the existing booking (required)
string booking_id = 1;
}
// Response for the GetBookingStatus RPC with booking status and prepayment
// status.
message GetBookingStatusResponse {
// ID of the booking (required)
string booking_id = 1;
// Status of the booking (required)
BookingStatus booking_status = 2;
// Prepayment status of the booking (required)
PrepaymentStatus prepayment_status = 3;
}
如需查看 BookingStatus 规范,请点击此处
// Prepayment status of a booking.
// Updating payment status will trigger an update on the payment status of the
// associated booking (if applicable).
// Currently, the only supported transition is from PREPAYMENT_PROVIDED to
// PREPAYMENT_REFUNDED, which will initiate a non-reversible refund on the
// associated payment transaction.
enum PrepaymentStatus {
// Not specified, defaults to PREPAYMENT_NOT_PROVIDED.
PREPAYMENT_STATUS_UNSPECIFIED = 0;
// The fee for the booking has been paid in advance.
PREPAYMENT_PROVIDED = 1;
// The fee for the booking has not been paid in advance.
PREPAYMENT_NOT_PROVIDED = 2;
// The fee was previously PREPAYMENT_PROVIDED but has now been refunded.
PREPAYMENT_REFUNDED = 3;
// The fee was previously PREPAYMENT_PROVIDED but now has been credited
// (user given a UserPaymentOption as a voucher for the booking).
// If this is set, the response should also include the updated
// UserPaymentOption.
PREPAYMENT_CREDITED = 4;
}
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThis method retrieves the status of a booking using a provided booking ID.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires a \u003ccode\u003ebooking_id\u003c/code\u003e and returns a \u003ccode\u003eGetBookingStatusResponse\u003c/code\u003e containing the \u003ccode\u003ebooking_id\u003c/code\u003e, \u003ccode\u003ebooking_status\u003c/code\u003e, and \u003ccode\u003eprepayment_status\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eBookingStatus\u003c/code\u003e provides details on the overall state of the booking and is further defined in external documentation.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ePrepaymentStatus\u003c/code\u003e indicates the status of any advance payment associated with the booking, including whether it was provided, refunded, or credited.\u003c/p\u003e\n"]]],["The method uses a `GetBookingStatusRequest` containing a booking ID to retrieve a `GetBookingStatusResponse`. The response includes the booking ID, `BookingStatus`, and `PrepaymentStatus`. `PrepaymentStatus` can be `PREPAYMENT_NOT_PROVIDED`, `PREPAYMENT_PROVIDED`, `PREPAYMENT_REFUNDED`, or `PREPAYMENT_CREDITED`. Updating prepayment status from `PREPAYMENT_PROVIDED` to `PREPAYMENT_REFUNDED` initiates a refund. `PREPAYMENT_CREDITED` means the user received a voucher for the booking.\n"],null,["# GetBookingStatus method\n\nThis method returns a booking status for a user based on provided booking\nID.\n\n**Request**\n\nGetBookingStatusRequest\n\n**Return value**\n\nGetBookingStatusResponse \n\n```scilab\n// Request to get booking status and prepayment status for a Booking.\nmessage GetBookingStatusRequest {\n // ID of the existing booking (required)\n string booking_id = 1;\n}\n\n// Response for the GetBookingStatus RPC with booking status and prepayment\n// status.\nmessage GetBookingStatusResponse {\n // ID of the booking (required)\n string booking_id = 1;\n\n // Status of the booking (required)\n BookingStatus booking_status = 2;\n\n // Prepayment status of the booking (required)\n PrepaymentStatus prepayment_status = 3;\n}\n```\n\nBookingStatus specification can be found\n[here](/actions-center/verticals/local-services/e2e/reference/booking-server-api-rest/e2e-definitions/bookingstatus-definition) \n\n```gdscript\n// Prepayment status of a booking.\n// Updating payment status will trigger an update on the payment status of the\n// associated booking (if applicable).\n// Currently, the only supported transition is from PREPAYMENT_PROVIDED to\n// PREPAYMENT_REFUNDED, which will initiate a non-reversible refund on the\n// associated payment transaction.\nenum PrepaymentStatus {\n // Not specified, defaults to PREPAYMENT_NOT_PROVIDED.\n PREPAYMENT_STATUS_UNSPECIFIED = 0;\n\n // The fee for the booking has been paid in advance.\n PREPAYMENT_PROVIDED = 1;\n\n // The fee for the booking has not been paid in advance.\n PREPAYMENT_NOT_PROVIDED = 2;\n\n // The fee was previously PREPAYMENT_PROVIDED but has now been refunded.\n PREPAYMENT_REFUNDED = 3;\n\n // The fee was previously PREPAYMENT_PROVIDED but now has been credited\n // (user given a UserPaymentOption as a voucher for the booking).\n // If this is set, the response should also include the updated\n // UserPaymentOption.\n PREPAYMENT_CREDITED = 4;\n}\n```"]]