ValueAddedModuleData
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ข้อมูลสําหรับข้อบังคับมูลค่าเพิ่ม ช่องที่ต้องกรอกคือส่วนหัวและ URI
ช่อง |
body |
object (LocalizedString )
เนื้อความที่จะแสดงในข้อบังคับ จํานวนอักขระสูงสุดคือ 50 ตัว หากยาวกว่านั้นระบบจะตัดออก
|
image |
object (Image )
รูปภาพที่จะแสดงในโมดูล สัดส่วนรูปภาพที่แนะนำคือ 1:1 ระบบจะปรับขนาดรูปภาพให้พอดีกับอัตราส่วนนี้
|
uri |
string
URI ที่โมดูลจะนำทางไปเมื่อคลิก ซึ่งอาจเป็นเว็บลิงก์หรือ Deep Link ตามที่ระบุไว้ใน https://developer.android.com/training/app-links/deep-linking
|
viewConstraints |
object (ModuleViewConstraints )
ข้อจำกัดทั้งหมดที่ต้องมีเพื่อให้โมดูลแสดง
|
sortIndex |
integer
ดัชนีสำหรับการจัดเรียงโมดูล โมดูลที่มีดัชนีการจัดเรียงต่ำกว่าจะแสดงก่อนโมดูลที่มีดัชนีการจัดเรียงสูงกว่า หากไม่ได้ระบุ ระบบจะถือว่าดัชนีการจัดเรียงคือ INT_MAX สําหรับข้อบังคับ 2 รายการที่มีดัชนีเดียวกัน ระบบจะไม่กําหนดลักษณะการเรียงลําดับ
|
ModuleViewConstraints
ข้อจำกัดทั้งหมดที่ต้องมีเพื่อให้โมดูลแสดง
การแสดง JSON |
{
"displayInterval": {
object (TimeInterval )
}
} |
ช่อง |
displayInterval |
object (TimeInterval )
ระยะเวลาที่โมดูลจะแสดงต่อผู้ใช้ กำหนดได้ทั้ง startTime และ endTime โมดูลจะแสดงทันทีหลังจากการแทรก เว้นแต่จะมีการตั้งค่า startTime โมดูลจะแสดงไปแบบไม่มีกำหนดหากไม่ได้ตั้งค่า endTime
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003eValue Added Modules require a header and a URI, along with optional fields like body, image, view constraints, and sort index for customization.\u003c/p\u003e\n"],["\u003cp\u003eThe module displays a header, body (optional), and image (optional), and directs users to a specified URI upon clicking.\u003c/p\u003e\n"],["\u003cp\u003eView constraints, such as a display interval, can be set to control when the module is shown to users.\u003c/p\u003e\n"],["\u003cp\u003eModules can be sorted using the \u003ccode\u003esortIndex\u003c/code\u003e field, with lower values appearing before higher ones.\u003c/p\u003e\n"]]],["The Value Added module requires `header` and `uri` fields. It uses a JSON format that includes `header`, `body`, `image`, `uri`, `viewConstraints`, and `sortIndex`. `viewConstraints` dictates when the module is displayed, using `displayInterval` to specify `startTime` and `endTime`. Modules are ordered by `sortIndex`, with lower indices appearing first. `header` and `body` have character limits. `uri` handles links, and `image` should maintain a 1:1 ratio.\n"],null,["# ValueAddedModuleData\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [ModuleViewConstraints](#ModuleViewConstraints)\n - [JSON representation](#ModuleViewConstraints.SCHEMA_REPRESENTATION)\n\nData for Value Added module. Required fields are header and uri.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"header\": { object (/wallet/reference/rest/v1/LocalizedString) }, \"body\": { object (/wallet/reference/rest/v1/LocalizedString) }, \"image\": { object (/wallet/reference/rest/v1/Image) }, \"uri\": string, \"viewConstraints\": { object (/wallet/reference/rest/v1/ValueAddedModuleData#ModuleViewConstraints) }, \"sortIndex\": integer } ``` |\n\n| Fields ||\n|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `header` | `object (`[LocalizedString](/wallet/reference/rest/v1/LocalizedString)`)` Header to be displayed on the module. Character limit is 60 and longer strings will be truncated. |\n| `body` | `object (`[LocalizedString](/wallet/reference/rest/v1/LocalizedString)`)` Body to be displayed on the module. Character limit is 50 and longer strings will be truncated. |\n| `image` | `object (`[Image](/wallet/reference/rest/v1/Image)`)` Image to be displayed on the module. Recommended image ratio is 1:1. Images will be resized to fit this ratio. |\n| `uri` | `string` URI that the module leads to on click. This can be a web link or a deep link as mentioned in \u003chttps://developer.android.com/training/app-links/deep-linking\u003e. |\n| `viewConstraints` | `object (`[ModuleViewConstraints](/wallet/reference/rest/v1/ValueAddedModuleData#ModuleViewConstraints)`)` Constraints that all must be met for the module to be shown. |\n| `sortIndex` | `integer` The index for sorting the modules. Modules with a lower sort index are shown before modules with a higher sort index. If unspecified, the sort index is assumed to be INT_MAX. For two modules with the same index, the sorting behavior is undefined. |\n\nModuleViewConstraints\n---------------------\n\nConstraints that all must be met for the module to be shown.\n\n| JSON representation |\n|------------------------------------------------------------------------------------|\n| ``` { \"displayInterval\": { object (/wallet/reference/rest/v1/TimeInterval) } } ``` |\n\n| Fields ||\n|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `displayInterval` | `object (`[TimeInterval](/wallet/reference/rest/v1/TimeInterval)`)` The period of time that the module will be displayed to users. Can define both a `startTime` and `endTime`. The module is displayed immediately after insertion unless a `startTime` is set. The module is displayed indefinitely if `endTime` is not set. |"]]