Method: giftcardobject.addmessage
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Adiciona uma mensagem ao objeto de vale-presente indicado pelo ID de objeto fornecido.
Solicitação HTTP
POST https://walletobjects.googleapis.com/walletobjects/v1/giftCardObject/{resourceId}/addMessage
O URL usa a sintaxe de transcodificação gRPC.
Parâmetros de caminho
Parâmetros |
resourceId |
string
O identificador exclusivo de um objeto. Esse ID precisa ser exclusivo entre todos os objetos de um emissor. Esse valor precisa seguir o formato issuer ID.identifier, em que o primeiro é emitido pelo Google e o último é escolhido por você. O identificador exclusivo precisa incluir apenas caracteres alfanuméricos, ".", "_" ou "-".
|
Corpo da solicitação
O corpo da solicitação contém uma instância de AddMessageRequest
.
Corpo da resposta
Se bem-sucedido, o corpo da resposta exibirá os dados com a seguinte estrutura:
Campos |
resource |
object (GiftCardObject )
O recurso GiftCardObject atualizado.
|
Escopos de autorização
Requer o seguinte escopo OAuth:
https://www.googleapis.com/auth/wallet_object.issuer
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons, e as amostras de código são licenciadas de acordo com a Licença Apache 2.0. Para mais detalhes, consulte as políticas do site do Google Developers. Java é uma marca registrada da Oracle e/ou afiliadas.
Última atualização 2025-07-25 UTC.
[null,null,["Última atualização 2025-07-25 UTC."],[[["\u003cp\u003eAdds a message to an existing gift card object using the object ID.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should contain an AddMessageRequest as defined in the provided documentation.\u003c/p\u003e\n"],["\u003cp\u003eA successful response returns the updated GiftCardObject resource.\u003c/p\u003e\n"],["\u003cp\u003eThis functionality requires the \u003ccode\u003ehttps://www.googleapis.com/auth/wallet_object.issuer\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"]]],["This content outlines the process of adding a message to a gift card object. It uses a `POST` HTTP request to `https://walletobjects.googleapis.com/walletobjects/v1/giftCardObject/{resourceId}/addMessage`, requiring a unique `resourceId` path parameter. The request body should be an `AddMessageRequest`, and a successful response returns an updated `GiftCardObject`. Authorization requires the `https://www.googleapis.com/auth/wallet_object.issuer` OAuth scope. The `resourceId` is constructed from the issuer's ID and the user's identifier.\n"],null,["# Method: giftcardobject.addmessage\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.GiftCardObjectAddMessageResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n\nAdds a message to the gift card object referenced by the given object ID.\n\n### HTTP request\n\n`POST https://walletobjects.googleapis.com/walletobjects/v1/giftCardObject/{resourceId}/addMessage`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `resourceId` | `string` The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format \u003cvar translate=\"no\"\u003eissuer ID\u003c/var\u003e.\u003cvar translate=\"no\"\u003eidentifier\u003c/var\u003e where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'. |\n\n### Request body\n\nThe request body contains an instance of [AddMessageRequest](/wallet/reference/rest/v1/AddMessageRequest).\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------|\n| ``` { \"resource\": { object (/wallet/reference/rest/v1/giftcardobject#GiftCardObject) } } ``` |\n\n| Fields ||\n|------------|-----------------------------------------------------------------------------------------------------------------------------|\n| `resource` | `object (`[GiftCardObject](/wallet/reference/rest/v1/giftcardobject#GiftCardObject)`)` The updated GiftCardObject resource. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/wallet_object.issuer`"]]