Method: accounts.hotels.setLiveOnGoogle
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Método personalizado no nível da coleção para atualizar o status "Ao vivo no Google" de várias propriedades. Cada chamada pode ativar ou desativar vários hotéis. Para ativar e desativar alguns hotéis, é necessário fazer várias chamadas.
Solicitação HTTP
POST https://travelpartner.googleapis.com/v3/{account=accounts/*}/hotels:setLiveOnGoogle
O URL usa a sintaxe de transcodificação gRPC.
Parâmetros de caminho
Parâmetros |
account |
string
Obrigatório. Nome do recurso da conta. O formato é accounts/{account_id}.
|
Corpo da solicitação
O corpo da solicitação contém dados com a seguinte estrutura:
Representação JSON |
{
"liveOnGoogle": boolean,
"partnerHotelIds": [
string
]
} |
Campos |
liveOnGoogle |
boolean
Obrigatório. Indica se a propriedade será exibida no Google. Quando é "true", o Google mostra as propriedades quando a integração delas é concluída e elas estão disponíveis. Quando definido como falso, o Google nunca mostra as propriedades.
|
partnerHotelIds[] |
string
Obrigatório. Identifica as propriedades que serão atualizadas com a configuração liveOnGoogle.
|
Corpo da resposta
Se bem-sucedido, o corpo da resposta incluirá dados com a estrutura a seguir:
Representação JSON |
{
"updatedHotelIds": [
string
],
"failedHotelIds": [
string
]
} |
Campos |
updatedHotelIds[] |
string
Identifica as propriedades atualizadas.
|
failedHotelIds[] |
string
Identifica as propriedades que o Google não conseguiu atualizar.
|
Escopos da autorização
Requer o seguinte escopo OAuth:
https://www.googleapis.com/auth/travelpartner
Para mais informações, consulte a Visão geral do OAuth 2.0.
Todos os direitos reservados. Java é uma marca registrada da Oracle e/ou suas afiliadas.
Última atualização 2022-08-23 UTC.
[null,null,["Última atualização 2022-08-23 UTC."],[[["\u003cp\u003eThis method allows you to update the "Live on Google" status for multiple hotel properties, enabling or disabling their visibility on Google.\u003c/p\u003e\n"],["\u003cp\u003eYou can specify whether to show or hide properties on Google using the \u003ccode\u003eliveOnGoogle\u003c/code\u003e boolean field in the request body.\u003c/p\u003e\n"],["\u003cp\u003eThe request body also requires a list of \u003ccode\u003epartnerHotelIds\u003c/code\u003e to identify the specific properties to update.\u003c/p\u003e\n"],["\u003cp\u003eThe response includes lists of successfully updated (\u003ccode\u003eupdatedHotelIds\u003c/code\u003e) and failed (\u003ccode\u003efailedHotelIds\u003c/code\u003e) hotel properties.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/travelpartner\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],[],null,["# Method: accounts.hotels.setLiveOnGoogle\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.SetLiveOnGoogleResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n\nCollection-level custom method to update the Live on Google status for multiple properties. Each call can turn on or off multiple hotels. To turn some hotels on and turn some hotels off, you will have to make multiple calls.\n\n### HTTP request\n\n`POST https://travelpartner.googleapis.com/v3/{account=accounts/*}/hotels:setLiveOnGoogle`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|-----------|-------------------------------------------------------------------------------------------|\n| `account` | `string` Required. The resource name of the account. The format is accounts/{account_id}. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"liveOnGoogle\": boolean, \"partnerHotelIds\": [ string ], \"liveOnGoogleStatus\": enum (/hotels/hotel-prices/api-reference/rest/v3/accounts.hotelViews#LiveOnGoogleStatus) } ``` |\n\n| Fields ||\n|---------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `liveOnGoogle` **(deprecated)** | `boolean` Optional. DEPRECATED. Whether the property will show on Google. When true, Google will show the properties if their integration is complete and the property is available. When false, Google will never show the properties. Superseded by `liveOnGoogleStatus`. Only one of `liveOnGoogle` or `liveOnGoogleStatus` should be set; if both are set, `liveOnGoogleStatus` will be used. |\n| `partnerHotelIds[]` | `string` Required. Identifies the properties to update with the liveOnGoogle setting. |\n| `liveOnGoogleStatus` | `enum (`[LiveOnGoogleStatus](/hotels/hotel-prices/api-reference/rest/v3/accounts.hotelViews#LiveOnGoogleStatus)`)` Optional. Whether the property will show on Google, with more granular controls than the original `liveOnGoogle` boolean field. Only one of `liveOnGoogle` or `liveOnGoogleStatus` should be set; if both are set, `liveOnGoogleStatus` will be used. **Note:** This field should be enclosed in quotes. For example, `\"LIVE_ON_GOOGLE_STATUS_INACTIVE\"`. |\n\n### Response body\n\nResponse message for [HotelService.SetLiveOnGoogle](/hotels/hotel-prices/api-reference/rest/v3/accounts.hotels/setLiveOnGoogle#google.travel.travelpartner.v3.HotelService.SetLiveOnGoogle).\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------|\n| ``` { \"updatedHotelIds\": [ string ], \"failedHotelIds\": [ string ] } ``` |\n\n| Fields ||\n|---------------------|--------------------------------------------------------------|\n| `updatedHotelIds[]` | `string` Identifies the updated properties. |\n| `failedHotelIds[]` | `string` Identifies properties that Google could not update. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/travelpartner`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]