複数のパスをグループ化する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
グループ ID を使用する
デフォルトでは、1 つのプロジェクトに複数のパスを
[Google ウォレットに追加] リンクを使用しても、これらのパスは
。ただし、パスをグループにまとめることで、
すべて同じグループ ID を持つようにしますグループ化されたパスが一緒に表示されます
Google ウォレット アプリで。パスのグループを選択すると、それぞれのパスが
カルーセル表示にするか
パスをグループ化できる状況は以下のとおりです。
グループにパスを追加するには、次の groupingInfo.groupingId
プロパティを使用します。
パス オブジェクトを設定する必要があります。すべてのパス オブジェクトを同じ
groupingId
の値は、次の場合でも自動的にグループ化されます
個別に追加されました。
次の例は、ポイントカードとクーポンをグループ化し、
次回の購入で両方を利用するよう促す。
loyaltyObject = {
"classId": "ISSUER_ID.GIFT_CARD_CLASS_SUFFIX",
"id": "ISSUER_ID.GIFT_CARD_OBJECT_SUFFIX",
"state": "ACTIVE",
"groupingInfo": {
# Note the same groupingId value
"groupingId": "combinedGiftCardAndOfferId",
"sortIndex": 1
},
"barcode": {
"type": "QR_CODE",
"value": "QR code"
},
"accountId": "Account id",
"accountName": "Account name",
"loyaltyPoints": {
"label": "Points",
"balance": {
"int": 800
}
}
}
offerObject = {
"classId": "ISSUER_ID.OFFER_CLASS_SUFFIX",
"id": "ISSUER_ID.OFFER_OBJECT_SUFFIX",
"state": "ACTIVE",
"groupingInfo": {
# Note the same groupingId value
"groupingId": "combinedGiftCardAndOfferId",
"sortIndex": 2
},
"barcode": {
"type": "QR_CODE",
"value": "QR code",
},
}
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-09-26 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-26 UTC。"],[],["Passes in Google Wallet can be grouped by assigning them a shared `groupingId`. This can be done during the initial provisioning or later using `update` or `patch` methods. Setting the `groupingInfo.groupingId` property in each pass object ensures they are grouped. Passes with the same `groupingId` appear together in the user's wallet and are shown on a carousel when selected. The example shows a loyalty card and an offer using \"combinedGiftCardAndOfferId\" to be grouped.\n"]]