Phương thức GetBookingStatus
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Phương thức này trả về trạng thái đặt phòng cho người dùng dựa trên mã đặt phòng đã cung cấp.
Yêu cầu
GetBookingStatusRequest
Giá trị trả về
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;
}
Bạn có thể xem thông số kỹ thuật của BookingStatus tại đây
// 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;
}
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003eThis service allows you to retrieve the status of a specific booking using its unique booking ID.\u003c/p\u003e\n"],["\u003cp\u003eThe response includes both the booking status and the prepayment status associated with the booking.\u003c/p\u003e\n"],["\u003cp\u003eThe prepayment status indicates whether the booking fee has been paid in advance, not paid, refunded, or credited.\u003c/p\u003e\n"],["\u003cp\u003eThe supported prepayment status transition is limited to moving from \u003ccode\u003ePREPAYMENT_PROVIDED\u003c/code\u003e to \u003ccode\u003ePREPAYMENT_REFUNDED\u003c/code\u003e, which initiates a non-reversible refund.\u003c/p\u003e\n"]]],["The `GetBookingStatusRequest` uses a `booking_id` to retrieve a `GetBookingStatusResponse`. The response includes the `booking_id`, `BookingStatus`, and `PrepaymentStatus`. `PrepaymentStatus` options are `PREPAYMENT_PROVIDED`, `PREPAYMENT_NOT_PROVIDED`, `PREPAYMENT_REFUNDED`, or `PREPAYMENT_CREDITED`. Updating prepayment status from `PREPAYMENT_PROVIDED` to `PREPAYMENT_REFUNDED` triggers a refund. `PREPAYMENT_CREDITED` requires an updated UserPaymentOption in the response.\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/legacy/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```"]]