# ValueAddedModuleData

- [JSON representation](https://developers.google.com/wallet/reference/rest/v1/ValueAddedModuleData#SCHEMA_REPRESENTATION)
- [ModuleViewConstraints](https://developers.google.com/wallet/reference/rest/v1/ValueAddedModuleData#ModuleViewConstraints)
  - [JSON representation](https://developers.google.com/wallet/reference/rest/v1/ValueAddedModuleData#ModuleViewConstraints.SCHEMA_REPRESENTATION)

Data for Value Added module. Required fields are header and uri.

| JSON representation |
|---|
| ``` { "header": { object (`https://developers.google.com/wallet/reference/rest/v1/LocalizedString`) }, "body": { object (`https://developers.google.com/wallet/reference/rest/v1/LocalizedString`) }, "image": { object (`https://developers.google.com/wallet/reference/rest/v1/Image`) }, "uri": string, "viewConstraints": { object (`https://developers.google.com/wallet/reference/rest/v1/ValueAddedModuleData#ModuleViewConstraints`) }, "sortIndex": integer } ``` |

| Fields ||
|---|---|
| `header` | ``object (`https://developers.google.com/wallet/reference/rest/v1/LocalizedString`)`` Header to be displayed on the module. Character limit is 60 and longer strings will be truncated. |
| `body` | ``object (`https://developers.google.com/wallet/reference/rest/v1/LocalizedString`)`` Body to be displayed on the module. Character limit is 50 and longer strings will be truncated. |
| `image` | ``object (`https://developers.google.com/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. |
| `uri` | `string` URI that the module leads to on click. This can be a web link or a deep link as mentioned in <https://developer.android.com/training/app-links/deep-linking>. |
| `viewConstraints` | ``object (`https://developers.google.com/wallet/reference/rest/v1/ValueAddedModuleData#ModuleViewConstraints`)`` Constraints that all must be met for the module to be shown. |
| `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. |

## ModuleViewConstraints

Constraints that all must be met for the module to be shown.

| JSON representation |
|---|
| ``` { "displayInterval": { object (`https://developers.google.com/wallet/reference/rest/v1/TimeInterval`) } } ``` |

| Fields ||
|---|---|
| `displayInterval` | ``object (`https://developers.google.com/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. |