ValueAddedModuleData
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Dữ liệu cho mô-đun Giá trị gia tăng. Các trường bắt buộc là tiêu đề và uri.
Trường |
body |
object (LocalizedString )
Nội dung sẽ hiển thị trên mô-đun. Giới hạn ký tự là 50 và các chuỗi dài hơn sẽ bị cắt ngắn.
|
image |
object (Image )
Hình ảnh sẽ hiển thị trên mô-đun. Tỷ lệ hình ảnh được đề xuất là 1:1. Hình ảnh sẽ được đổi kích thước cho phù hợp với tỷ lệ này.
|
uri |
string
URI mà mô-đun dẫn đến khi nhấp. Đây có thể là đường liên kết web hoặc đường liên kết sâu như đã đề cập trong https://developer.android.com/training/app-links/deep-linking.
|
viewConstraints |
object (ModuleViewConstraints )
Các điều kiện ràng buộc mà tất cả đều phải đáp ứng để mô-đun hiển thị.
|
sortIndex |
integer
Chỉ mục để sắp xếp các mô-đun. Các mô-đun có chỉ mục sắp xếp thấp hơn sẽ xuất hiện trước các mô-đun có chỉ mục sắp xếp cao hơn. Nếu không chỉ định, chỉ mục sắp xếp sẽ được giả định là INT_MAX. Đối với hai mô-đun có cùng một chỉ mục, hành vi sắp xếp không được xác định.
|
ModuleViewConstraints
Các điều kiện ràng buộc mà tất cả đều phải đáp ứng để mô-đun hiển thị.
Biểu diễn dưới dạng JSON |
{
"displayInterval": {
object (TimeInterval )
}
} |
Trường |
displayInterval |
object (TimeInterval )
Khoảng thời gian mà mô-đun sẽ hiển thị cho người dùng. Có thể xác định cả startTime và endTime . Mô-đun sẽ hiển thị ngay sau khi chèn, trừ phi bạn đặt startTime . Mô-đun sẽ hiển thị vô thời hạn nếu bạn không đặt endTime .
|
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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. |"]]