Method: transitclass.addmessage
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Aggiunge un messaggio alla classe di transito a cui fa riferimento l'ID classe specificato.
Richiesta HTTP
POST https://walletobjects.googleapis.com/walletobjects/v1/transitClass/{resourceId}/addMessage
L'URL utilizza la sintassi di transcodifica gRPC.
Parametri del percorso
Parametri |
resourceId |
string
L'identificatore univoco di una classe. Questo ID deve essere univoco in tutte le classi di un emittente. Questo valore deve essere nel formato issuer ID.identifier: il primo viene emesso da Google, mentre il secondo è scelto da te. Il tuo identificatore univoco deve includere solo caratteri alfanumerici, ".", "_" o "-".
|
Corpo della richiesta
Il corpo della richiesta contiene un'istanza di AddMessageRequest
.
Corpo della risposta
In caso di esito positivo, il corpo della risposta contiene dati con la seguente struttura:
Rappresentazione JSON |
{
"resource": {
object (TransitClass )
}
} |
Campi |
resource |
object (TransitClass )
La risorsa TransitClass aggiornata.
|
Ambiti di autorizzazione
Richiede il seguente ambito OAuth:
https://www.googleapis.com/auth/wallet_object.issuer
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-25 UTC.
[null,null,["Ultimo aggiornamento 2025-07-25 UTC."],[[["\u003cp\u003eAdds a message to an existing transit class identified by a unique class ID.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should contain an \u003ccode\u003eAddMessageRequest\u003c/code\u003e as defined in the API reference.\u003c/p\u003e\n"],["\u003cp\u003eA successful response returns the updated \u003ccode\u003eTransitClass\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eRequires \u003ccode\u003ewallet_object.issuer\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"]]],["This document outlines adding a message to a transit class via an HTTP POST request to `https://walletobjects.googleapis.com/walletobjects/v1/transitClass/{resourceId}/addMessage`. The `resourceId`, a unique class identifier, is a path parameter. The request body utilizes the `AddMessageRequest` structure. Successful requests return a JSON response containing the updated `TransitClass` resource. Authorization requires the `https://www.googleapis.com/auth/wallet_object.issuer` OAuth scope.\n"],null,["# Method: transitclass.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.TransitClassAddMessageResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n\nAdds a message to the transit class referenced by the given class ID.\n\n### HTTP request\n\n`POST https://walletobjects.googleapis.com/walletobjects/v1/transitClass/{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 a class. This ID must be unique across all classes 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/transitclass#TransitClass) } } ``` |\n\n| Fields ||\n|------------|---------------------------------------------------------------------------------------------------------------------|\n| `resource` | `object (`[TransitClass](/wallet/reference/rest/v1/transitclass#TransitClass)`)` The updated TransitClass resource. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/wallet_object.issuer`"]]