Method: accounts.accountLinks.patch
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
PATCH https://travelpartner.googleapis.com/v3/{accountLink.name=accounts/*/accountLinks/*}
网址采用 gRPC 转码语法。
路径参数
参数 |
accountLink.name |
string
帐号关联的资源名称,格式为 accounts/{account_id}/accountLinks/{account_link_id} 。
|
查询参数
参数 |
updateMask |
string (FieldMask format)
必需,要更新的字段。只能更新 accountLinkTarget 字段。请使用以下示例网址中所示的语法,并在请求正文中提供新值。 请求网址和请求正文示例:
PATCH https://travelpartner.googleapis.com/v3/accounts/123456789/
accountLinks/0123456789?updateMask=accountLink.account_link_target
{
"accountLinkTarget": {
"hotelList": {
"partnerHotelIds": ["1234", "4321"]
}
}
}
响应正文将仅包含 AccountLink 的 name 字段。 上述信息足以构成网址和请求正文。以下语句是系统自动生成的关于 FieldMask 格式的补充信息。 这是完全限定的字段名称的逗号分隔列表。示例:"user.displayName,photo" 。
|
请求正文
请求正文包含一个 AccountLink
实例。
响应正文
如果成功,响应正文将包含一个 AccountLink
实例。
授权范围
需要以下 OAuth 作用域:
https://www.googleapis.com/auth/travelpartner
如需了解详情,请参阅 OAuth 2.0 概览。
保留所有权利。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2022-08-23。
[null,null,["最后更新时间 (UTC):2022-08-23。"],[[["\u003cp\u003eUpdates an existing account link's target, specifically the \u003ccode\u003eaccountLinkTarget\u003c/code\u003e field.\u003c/p\u003e\n"],["\u003cp\u003eRequires specifying the account link's resource name in the URL path.\u003c/p\u003e\n"],["\u003cp\u003eUses a \u003ccode\u003ePATCH\u003c/code\u003e request with an \u003ccode\u003eupdateMask\u003c/code\u003e query parameter indicating the field to update.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should contain the updated \u003ccode\u003eAccountLink\u003c/code\u003e object with the new \u003ccode\u003eaccountLinkTarget\u003c/code\u003e value.\u003c/p\u003e\n"],["\u003cp\u003eRequires the \u003ccode\u003ehttps://www.googleapis.com/auth/travelpartner\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"]]],[],null,["# Method: accounts.accountLinks.patch\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n\nUpdates the account link target of an account link.\n\n### HTTP request\n\n`PATCH https://travelpartner.googleapis.com/v3/{accountLink.name=accounts/*/accountLinks/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------------------|-----------------------------------------------------------------------------------------------------------------------|\n| `accountLink.name` | `string` The resource name for the account link in the format `accounts/{account_id}/accountLinks/{account_link_id}`. |\n\n### Query parameters\n\n| Parameters ||\n|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` Required. The field to update. Only the `accountLinkTarget` field can be updated. Use the syntax shown in the example URL below and provide the new value in the request body. Example request URL and request body: PATCH https://travelpartner.googleapis.com/v3/accounts/123456789/ accountLinks/0123456789?updateMask=accountLink.account_link_target { \"accountLinkTarget\": { \"hotelList\": { \"partnerHotelIds\": [\"1234\", \"4321\"] } } } The response body will only include the `name` field of an `AccountLink`. The information above is sufficient for forming the URL and request body. The sentence below is auto-generated, supplemental information about the `FieldMask` format in general. This is a comma-separated list of fully qualified names of fields. Example: `\"user.displayName,photo\"`. |\n\n### Request body\n\nThe request body contains an instance of [AccountLink](/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks#AccountLink).\n\n### Response body\n\nIf successful, the response body contains an instance of [AccountLink](/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks#AccountLink).\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)."]]