Method: genericclass.addmessage
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
지정된 클래스 ID로 참조되는 일반 클래스에 메시지를 추가합니다.
HTTP 요청
POST https://walletobjects.googleapis.com/walletobjects/v1/genericClass/{resourceId}/addMessage
URL은 gRPC 트랜스코딩 문법을 사용합니다.
경로 매개변수
매개변수 |
resourceId |
string
클래스의 고유 식별자입니다. 이 ID는 한 발급기관의 모든 클래스에서 고유해야 합니다. 이 값은 issuer ID 형식을 따라야 합니다.identifier: Google에서 발급하며 후자는 개발자가 선택합니다. 고유 식별자에는 영숫자 문자, '.', '_', '-'만 포함되어야 합니다.
|
요청 본문
요청 본문에 AddMessageRequest
의 인스턴스가 포함됩니다.
응답 본문
클래스에 새 발급기관 메시지를 추가하는 것에 대한 응답입니다. 여기에는 업데이트된 GenericClass 전체가 포함되어 있습니다.
성공할 경우 응답 본문에 다음 구조의 데이터가 포함됩니다.
필드 |
resource |
object (GenericClass )
업데이트된 EventTicketClass 리소스입니다.
|
승인 범위
다음 OAuth 범위가 필요합니다.
https://www.googleapis.com/auth/wallet_object.issuer
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[[["\u003cp\u003eAdds a new message to an existing generic class identified by a unique class ID.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires providing an \u003ccode\u003eAddMessageRequest\u003c/code\u003e in the body and uses the \u003ccode\u003ePOST\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eThe response provides the updated \u003ccode\u003eGenericClass\u003c/code\u003e object, including the new message.\u003c/p\u003e\n"],["\u003cp\u003eUtilizes the \u003ccode\u003ehttps://www.googleapis.com/auth/wallet_object.issuer\u003c/code\u003e authorization scope.\u003c/p\u003e\n"],["\u003cp\u003eThe class ID follows a specific format, \u003cvar translate=no\u003eissuer ID\u003c/var\u003e.\u003cvar translate=no\u003eidentifier\u003c/var\u003e, with constraints on the characters allowed in the identifier.\u003c/p\u003e\n"]]],["This document outlines the process for adding a message to a generic class using a `POST` HTTP request to a specific URL. The request requires a unique `resourceId` in the path, formatted as `issuer ID.identifier`. The request body must include an `AddMessageRequest` instance. Successful requests return an updated `GenericClass` in JSON format, contained within a `resource` field. The process necessitates authorization via the `https://www.googleapis.com/auth/wallet_object.issuer` OAuth scope.\n"],null,["# Method: genericclass.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.GenericClassAddMessageResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n\nAdds a message to the generic class referenced by the given class ID.\n\n### HTTP request\n\n`POST https://walletobjects.googleapis.com/walletobjects/v1/genericClass/{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\nResponse to adding a new issuer message to the class. This contains the entire updated GenericClass.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------------------------------------------|\n| ``` { \"resource\": { object (/wallet/reference/rest/v1/genericclass#GenericClass) } } ``` |\n\n| Fields ||\n|------------|-------------------------------------------------------------------------------------------------------------------------|\n| `resource` | `object (`[GenericClass](/wallet/reference/rest/v1/genericclass#GenericClass)`)` The updated EventTicketClass resource. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/wallet_object.issuer`"]]