Method: genericclass.addmessage
הפונקציה מוסיפה הודעה למחלקה הגנרית שאליה מפנה מזהה הכיתה.
בקשת HTTP
POST https://walletobjects.googleapis.com/walletobjects/v1/genericClass/{resourceId}/addMessage
כתובת ה-URL משתמשת בתחביר של Transcoding של gRPC.
פרמטרים של נתיב
פרמטרים |
resourceId |
string
המזהה הייחודי של הכיתה. המזהה הזה חייב להיות ייחודי בכל המחלקות של המנפיק. הערך צריך להיות בפורמט 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. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-11-07 (שעון UTC).
[null,null,["עדכון אחרון: 2024-11-07 (שעון UTC)."],[[["Adds a new message to an existing generic class identified by a unique class ID."],["The request requires providing an `AddMessageRequest` in the body and uses the `POST` method."],["The response provides the updated `GenericClass` object, including the new message."],["Utilizes the `https://www.googleapis.com/auth/wallet_object.issuer` authorization scope."],["The 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."]]],["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"]]