ValueAddedModuleData
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Dati per il modulo Valore aggiunto. I campi obbligatori sono intestazione e uri.
Campi |
body |
object (LocalizedString )
Testo da visualizzare nel modulo. Il limite di caratteri è 50 e le stringhe più lunghe verranno troncate.
|
image |
object (Image )
Immagine da visualizzare nel modulo. Il rapporto consigliato per le immagini è 1:1. Le immagini verranno ridimensionate in base a questo rapporto.
|
uri |
string
URI a cui rimanda il modulo al clic. Può essere un link web o un link diretto come indicato in https://developer.android.com/training/app-links/deep-linking.
|
viewConstraints |
object (ModuleViewConstraints )
Restrizioni che devono essere soddisfatte affinché il modulo venga visualizzato.
|
sortIndex |
integer
L'indice per l'ordinamento dei moduli. I moduli con un indice di ordinamento inferiore vengono visualizzati prima dei moduli con un indice di ordinamento superiore. Se non specificato, si presume che l'indice di ordinamento sia INT_MAX. Per due moduli con lo stesso indice, il comportamento di ordinamento non è definito.
|
ModuleViewConstraints
Restrizioni che devono essere soddisfatte affinché il modulo venga visualizzato.
Rappresentazione JSON |
{
"displayInterval": {
object (TimeInterval )
}
} |
Campi |
displayInterval |
object (TimeInterval )
Il periodo di tempo durante il quale il modulo verrà mostrato agli utenti. Può definire sia un startTime che un endTime . Il modulo viene visualizzato immediatamente dopo l'inserimento, a meno che non sia impostato un startTime . Il modulo viene visualizzato a tempo indeterminato se endTime non è impostato.
|
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-25 UTC.
[null,null,["Ultimo aggiornamento 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. |"]]