
### ContentWidget
Class responsible for creating the content widget.

**Declared In:**  
`com.synerise.sdk.content.widgets.ContentWidget`

**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-65">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-65-0" data-tab-group="tabgrp-65" data-tab-active="true">Java</button><button class="tab-button" data-tab-id="tabgrp-65-1" data-tab-group="tabgrp-65">Kotlin</button></div>

<div class="tab-panel" data-tab-id="tabgrp-65-0" data-tab-group="tabgrp-65" data-tab-active="true">

```Java
public class ContentWidget
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-65-1" data-tab-group="tabgrp-65">

```Kotlin
class ContentWidget
```

</div>
</div>


**Properties:**  

There are no properties.


**Initializers:**  

There is a constructor.


<pre><code class="language-java">public ContentWidget(ContentWidgetOptions contentWidgetOptions, ContentWidgetAppearance contentWidgetAppearance)</code></pre>


**Methods:**  

Setter for widget state.


<pre><code class="language-java">public void setOnContentWidgetListener(OnContentWidgetListener listener)</code></pre>


---

This method is responsible for returning widgetView.


<pre><code class="language-java">public View getView()</code></pre>


---

This method reloads data.


<pre><code class="language-java">public void load()</code></pre>


---

---
---

### ContentWidgetAppearance
Class responsible for configuring the content widget UI.

**Declared In:**  
`com.synerise.sdk.content.widgets.model.ContentWidgetAppearance`

**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-66">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-66-0" data-tab-group="tabgrp-66" data-tab-active="true">Java</button><button class="tab-button" data-tab-id="tabgrp-66-1" data-tab-group="tabgrp-66">Kotlin</button></div>

<div class="tab-panel" data-tab-id="tabgrp-66-0" data-tab-group="tabgrp-66" data-tab-active="true">

```Java
public class ContentWidgetAppearance
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-66-1" data-tab-group="tabgrp-66">

```Kotlin
class ContentWidgetAppearance
```

</div>
</div>


**Properties:**  

| Property | Type | Optional | Default | Description |
| --- | --- | --- | --- | --- |
| **layout** | [ContentWidgetBaseLayout](/developers/mobile-sdk/class-reference/android/content-widget#contentwidgetbaselayout) | no | - | Content widget layout |
| **itemLayout** | [ContentWidgetBaseItemLayout](/developers/mobile-sdk/class-reference/android/content-widget#contentwidgetbaseitemlayout) | no | - | Single item layout |


**Initializers:**  

There is a constructor.


<pre><code class="language-java">public ContentWidgetAppearance(ContentWidgetBaseLayout layout, ContentWidgetBaseItemLayout itemLayout)</code></pre>


**Methods:**  

There are no methods.

---

---
---

### ContentWidgetOptions
Class responsible for configuration of the content widget data.

**Declared In:**  
`com.synerise.sdk.content.widgets.model.ContentWidgetOptions`
`com.synerise.sdk.content.widgets.model.ContentWidgetRecommendationsOptions`

**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-67">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-67-0" data-tab-group="tabgrp-67" data-tab-active="true">Java</button><button class="tab-button" data-tab-id="tabgrp-67-1" data-tab-group="tabgrp-67">Kotlin</button></div>

<div class="tab-panel" data-tab-id="tabgrp-67-0" data-tab-group="tabgrp-67" data-tab-active="true">

```Java
public class ContentWidgetRecommendationsOptions
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-67-1" data-tab-group="tabgrp-67">

```Kotlin
class ContentWidgetRecommendationsOptions
```

</div>
</div>


**Properties:**  

| Property | Type | Optional | Default | Description |
| --- | --- | --- | --- | --- |
| **activity** | Activity | no | - | Activity |
| **slug** | String | no | - | Slug of the document |
| **attributes** | HashMap <String, Object> | no | - | Attribute value |
| **ContentWidgetOptionsAttributeKeyProductId** | String | no | - | Final flag to add to attributes |
| **mapper** | [OnRecommendationModelMapper](/developers/mobile-sdk/class-reference/android/content-widget#contentwidgetrecommendationdatamodel) | no | - | Mapper responsible for mapping RecommendationResponse|
| **recommendationEventType** | RecommendationEventType | no | - | Recommendation event type. <ul><li>RECOMMENDATION_VIEW_EVENT sends all products in one event. We highly recommend using this type of event in content widget.</li><li>RECOMMENDATION_SEEN_EVENT sends each event as a separate event.</li></ul> |


**Initializers:**  

There is a constructor.


<pre><code class="language-java">public ContentWidgetRecommendationsOptions(@NonNull Activity activity, @NonNull String slug, OnRecommendationModelMapper mapper)</code></pre>


**Methods:**  

There are no methods.

---

---
---

### ContentWidgetBaseLayout
Class responsible for widget layout configuration.

**Declared In:**  
`com.synerise.sdk.content.widgets.layout.ContentWidgetBaseLayout`

**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-68">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-68-0" data-tab-group="tabgrp-68" data-tab-active="true">Java</button><button class="tab-button" data-tab-id="tabgrp-68-1" data-tab-group="tabgrp-68">Kotlin</button></div>

<div class="tab-panel" data-tab-id="tabgrp-68-0" data-tab-group="tabgrp-68" data-tab-active="true">

```Java
public abstract class ContentWidgetBaseLayout
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-68-1" data-tab-group="tabgrp-68">

```Kotlin
abstract class ContentWidgetBaseLayout
```

</div>
</div>


**Properties:**  

There are no properties.


**Initializers:**  

There are no constructors.

#### Inheriting classes

[ContentWidgetGridLayout](/developers/mobile-sdk/class-reference/android/content-widget#contentwidgetgridlayout)


[ContentWidgetHorizontalSliderLayout](/developers/mobile-sdk/class-reference/android/content-widget#contentwidgetsliderlayout)

**Methods:**  

This method defines the value of the cardview size. Any unit is acceptable, but remember to use the same unit across the whole widget.


<pre><code class="language-java">public void setCardViewSize(int width, int height)</code></pre>


---

This method retrieves the preferred width of a gridView.


<pre><code class="language-java">public float getPreferredWidth()</code></pre>


---

Setter for preferredWidth of a gridView.


<pre><code class="language-java">public void setPreferredWidth(float width)</code></pre>


---

---
---

### ContentWidgetSliderLayout
Class responsible for slider layout configuration.

**Declared In:**  
`com.synerise.sdk.content.widgets.layout.ContentWidgetHorizontalSliderLayout`

**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-69">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-69-0" data-tab-group="tabgrp-69" data-tab-active="true">Java</button><button class="tab-button" data-tab-id="tabgrp-69-1" data-tab-group="tabgrp-69">Kotlin</button></div>

<div class="tab-panel" data-tab-id="tabgrp-69-0" data-tab-group="tabgrp-69" data-tab-active="true">

```Java
public class ContentWidgetHorizontalSliderLayout extends ContentWidgetBaseLayout
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-69-1" data-tab-group="tabgrp-69">

```Kotlin
class ContentWidgetHorizontalSliderLayout : ContentWidgetBaseLayout
```

</div>
</div>


**Properties:**  

There are no properties.


**Initializers:**  

There is only a default constructor.


**Methods:**  

This method defines the cardview size. Any unit is acceptable, but remember to use the same unit across the whole widget.


<pre><code class="language-java">public void setCardViewSize(int width, int height)</code></pre>


---

This method retrieves the preferred width of a gridView.


<pre><code class="language-java">public float getPreferredWidth()</code></pre>


---

Setter for the preferredWidth of a gridView.


<pre><code class="language-java">public void setPreferredWidth(float width)</code></pre>


---

---
---

### ContentWidgetGridLayout
Class responsible for grid layout configuration.

**Declared In:**  
`com.synerise.sdk.content.widgets.layout.ContentWidgetGridLayout`

**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-70">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-70-0" data-tab-group="tabgrp-70" data-tab-active="true">Java</button><button class="tab-button" data-tab-id="tabgrp-70-1" data-tab-group="tabgrp-70">Kotlin</button></div>

<div class="tab-panel" data-tab-id="tabgrp-70-0" data-tab-group="tabgrp-70" data-tab-active="true">

```Java
public class ContentWidgetGridLayout extends ContentWidgetBaseLayout
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-70-1" data-tab-group="tabgrp-70">

```Kotlin
class ContentWidgetGridLayout : ContentWidgetBaseLayout
```

</div>
</div>


**Properties:**  

| Property | Type | Optional | Default | Description |
| --- | --- | --- | --- | --- |
| **itemsPerRow** | int | no | 1 | Number of items per row |
| **cardViewVerticalSpacing** | int | no | 0 | Card view vertical spacing |
| **includeEdgeSpacing** | Boolean | no | false | Defines if edge spacing is included |



**Initializers:**  

Constructor with the preferred width of a grid layout.


<pre><code class="language-java">public ContentWidgetGridLayout(float prefferedWidth)</code></pre>




**Methods:**  

This method defines the cardview size. Any unit is acceptable, but remember to use the same unit across the whole widget.


<pre><code class="language-java">public void setCardViewSize(int width, int height)</code></pre>


---

This method retrieves the preferred width of a gridView.


<pre><code class="language-java">public float getPreferredWidth()</code></pre>


---

Setter for the preferredWidth of a gridView.


<pre><code class="language-java">public void setPreferredWidth(float width)</code></pre>


---

---
---

### ContentWidgetBaseItemLayout
Class responsible for card layout configuration.

**Declared In:**  
`com.synerise.sdk.content.widgets.layout.ContentWidgetBaseItemLayout`

**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-71">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-71-0" data-tab-group="tabgrp-71" data-tab-active="true">Java</button><button class="tab-button" data-tab-id="tabgrp-71-1" data-tab-group="tabgrp-71">Kotlin</button></div>

<div class="tab-panel" data-tab-id="tabgrp-71-0" data-tab-group="tabgrp-71" data-tab-active="true">

```Java
public abstract class ContentWidgetBaseItemLayout
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-71-1" data-tab-group="tabgrp-71">

```Kotlin
class abstract ContentWidgetBaseItemLayout
```

</div>
</div>


#### Inheriting classes

[ContentWidgetBasicProductItemLayout](/developers/mobile-sdk/class-reference/android/content-widget#contentwidgetbasicproductitemlayout)

**Properties:**  

| Property | Type | Optional | Default | Description |
| --- | --- | --- | --- | --- |
| **cardViewCornerRadius** | float | no | 0 | Card view corner radius |
| **cardViewElevation** | float | no | 0 | Card view elevation |


**Initializers:**  

There is only a default constructor.


**Methods:**  

There are no methods.

---
---

### ContentWidgetBasicProductItemLayout
Class responsible for the configuration of item layout.

**Declared In:**  
`com.synerise.sdk.content.widgets.layout.ContentWidgetBasicProductItemLayout`

**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-72">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-72-0" data-tab-group="tabgrp-72" data-tab-active="true">Java</button><button class="tab-button" data-tab-id="tabgrp-72-1" data-tab-group="tabgrp-72">Kotlin</button></div>

<div class="tab-panel" data-tab-id="tabgrp-72-0" data-tab-group="tabgrp-72" data-tab-active="true">

```Java
public class ContentWidgetBasicProductItemLayout extends ContentWidgetBaseItemLayout
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-72-1" data-tab-group="tabgrp-72">

```Kotlin
class ContentWidgetBasicProductItemLayout : ContentWidgetBaseItemLayout
```

</div>
</div>


**Properties:**  

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| imageHeightToCardHeightRatio | Double | 0.6 | Image height. A ratio of `0.6` means that the image height equals 60% of the entire height of an item |
| imageWidthToCardWidthRatio | Double | 1 | Image width. `1` means that the image width is equal to the width of the item |
| imageScaleType | ImageView.ScaleType | ImageView.ScaleType.CENTER_INSIDE | Scaling type of the image |
| imageMargin | int | 0 | General margin of the image |
| itemLabelStyle | Typeface | - | Typeface of the label |
| itemLabelSize | int | 12 | Size of the label |
| itemLabelColor | int | #000 | Label text color |
| itemLabelMarginLeft | int | 0 | Left margin of the label text |
| itemLabelMarginRight | int | 0 | Right margin of the label text |
| itemLabelMarginBottom | int | 0 | Bottom margin of the label text |
| itemLabelMarginTop | int | 0 | Top margin of the label text |
| cardViewCornerRadius | Float | 0 | Corner radius of the cardView |
| cardViewElevation | Float | 0 | Elevation of the cardView |
| itemTitleStyle | Typeface | - | Typeface of the product title |
| itemTitleSize | int | 12 | Size of the title |
| itemTitleColor | int | #000 | Color of the title text |
| itemTitleMarginLeft | int | 0 | Left margin of the title text |
| itemTitleMarginRight | int | 0 | Right margin of the title text |
| itemTitleMarginBottom | int | 0 | Bottom margin of the title text |
| itemTitleMarginTop | int | 0 | Top margin of the title text |
| itemTitleMaxLines | int | 1 | Maximum displayed lines of the title text |
| itemSubTitleStyle | Typeface | - | Typeface of the product subtitle |
| itemTitleSize | int | 12 | Size of the title |
| itemSubTitleColor | int | #000 | Color of the subtitle text |
| itemSubTitleMarginLeft | int | 0 | Left margin of the subtitle text |
| itemSubTitleMarginRight | int | 0 | Right margin of the subtitle text |
| itemSubTitleMarginBottom | int | 0 | Bottom margin of the subtitle text |
| itemSubTitleMarginTop | int | 0 | Top margin of the subtitle text |
| isItemSubTitleVisible | Boolean | false | Flag indicating visibility of subtitle |
| itemSubTitleGravity | int | Gravity.LEFT | Flag indicating gravity of subtitle |
| itemSubTitleMaxLines | int | 1 | Maximum displayed lines of the subtitle text |
| itemProductIdentifier | Typeface | - | Typeface of the product identifier |
| itemIdentifierSize | int | 12 | Size of the identifier |
| itemIdentifierColor | int | #000 | Color of the identifier text |
| itemIdentifierMarginLeft | int | 0 | Left margin of the identifier text |
| itemIdentifierMarginRight | int | 0 | Right margin of the identifier text |
| itemIdentifierMarginBottom | int | 0 | Bottom margin of the identifier text |
| itemIdentifierMarginTop | int | 0 | Top margin of the identifier text |
| isItemIdentifierVisible | Boolean | false | Flag indicating visibility of identifier |
| itemIdentifierGravity | int | Gravity.LEFT | Flag indicating gravity of identifier |
| itemIdentifierMaxLines | int | 1 | Maximum displayed lines of the identifier text |
| itemLoyaltyPointsStyle | Typeface | - | Typeface of the loyalty points |
| itemLoyaltyPointsSize | int | 12 | Size of the loyalty points |
| itemLoyaltyPointsColor | int | #000 | Color of the loyalty points text |
| itemLoyaltyPointsMarginLeft | int | 0 | Left margin of the loyalty points text |
| itemLoyaltyPointsMarginRight | int | 0 | Right margin of the loyalty points text |
| itemLoyaltyPointsMarginBottom | int | 0 | Bottom margin of the loyalty points text |
| itemLoyaltyPointsMarginTop | int | 0 | Top margin of the loyalty points text |
| isItemLoyaltyPointsVisible | Boolean | false | Flag indicating visibility of loyalty points |
| itemLoyaltyPointsHorizontalPosition | `HorizontalPosition` | HorizontalPosition.LEFT | Flag indicating position of loyaltyPoints |
| itemLoyaltyPointsLabel | String | "Loyalty points" | Label for loyalty points field |
| itemLoyaltyPointsLabelStyle | Typeface | - | Typeface of the loyalty points label |
| itemLoyaltyPointsLabelSize | int | 12 | Size of the loyalty points label |
| itemLoyaltyPointsLabelColor | int | #000 | Color of the loyalty points label text |
| itemLoyaltyPointsLabelMarginLeft | int | 0 | Left margin of the loyalty points label text |
| itemLoyaltyPointsLabelMarginRight | int | 0 | Right margin of the loyalty points label text |
| itemLoyaltyPointsLabelMarginBottom | int | 0 | Bottom margin of the loyalty points label text |
| itemLoyaltyPointsLabelMarginTop | int | 0 | Top margin of the loyalty points label text |
| itemPriceStyle | Typeface | - | Typeface of the price |
| itemPriceSize | int | 12 | Size of the price text |
| itemPriceColor | int | #000 | Color of the price text |
| itemPriceMarginLeft | int | 0 | Left margin of the price text |
| itemPriceMarginRight | int | 0 | Right margin of the price text |
| itemPriceMarginTop | int | 0 | Top margin of the price text |
| itemPriceMarginBottom | int | 0 | Bottom margin of the price text |
| itemPriceCurrencyHorizontalPosition | HorizontalPosition | HorizontalPosition.RIGHT | Flag indicating position of currency |
| itemPriceHorizontalPosition | HorizontalPosition | 0 | Bottom margin of the price text |
| itemSalePriceStyle | Typeface | - | Typeface of the sale price |
| itemSalePriceSize | int | 12 | Size of the sale price |
| itemSalePriceColor | int | #000 | Color of the sale price text |
| itemSalePriceGravity | int | Gravity.LEFT | Gravity of the sale price text |
| itemSalePriceMarginLeft | int | 0 | Left margin of the sale price text |
| itemSalePriceMarginRight | int | 0 | Right margin of the sale price text |
| itemSalePriceMarginTop | int | 0 | Top margin of the sale price text |
| itemSalePriceMarginBottom | int | 0 | Bottom margin of the sale price text |
| itemSalePriceOrientation | int | LinearLayout.HORIZONTAL | Orientation of the sale price text |
| isItemSalePriceVisible | Boolean | false | Flag determining whether to show the sale price or not |
| itemDiscountPercentageLabelStyle | Typeface | - | Typeface of discount percentage label |
| itemDiscountPercentageLabelColor | int | #000 | Color of discount percentage label |
| itemDiscountPercentageLabelSize | int | 12 | Size of the discount percentage label text |
| itemDiscountPercentageLabelMarginLeft | int | 0 | Left margin of the discount percentage label text |
| itemDiscountPercentageLabelMarginRight | int | 0 | Right margin of the discount percentage label text |
| itemDiscountPercentageLabelMarginTop | int | 0 | Top margin of the discount percentage label text |
| itemDiscountPercentageLabelMarginBottom | int | 0 | Bottom margin of the discount percentage label text |
| isItemDiscountPercentageLabelVisible | Boolean | false | Flag determining whether to show the discount percentage label or not |
| itemActionButton | ImageButtonCustomAction | - | Object which stores all information about the ActionButton |
| itemBadge | ContentWidgetBadge | - | Object which stores all information about the Badge |
| imageButtonCustomActionGravity | int | Gravity.TOP | Gravity of the actionButton |

**Initializers:**  

There are no initializers.


**Methods:**  

Setter for margins in ItemTitle.


<pre><code class="language-java">public void setItemTitleMargins(int marginLeft, int marginRight, int marginTop, int marginBottom)</code></pre>


---

Setter for margins in ItemPrice.


<pre><code class="language-java">public void setItemPriceMargins(int marginLeft, int marginRight, int marginTop, int marginBottom)</code></pre>


---

Setter for margins in ItemSalePrice.


<pre><code class="language-java">public void setItemSalePriceMargins(int marginLeft, int marginRight, int marginTop, int marginBottom)</code></pre>


---

Setter for margins in ItemLabel.


<pre><code class="language-java">public void setItemLabelMargins(int marginLeft, int marginRight, int marginTop, int marginBottom)</code></pre>


---

Setter for margins in ItemDiscountLabel.


<pre><code class="language-java">public void setItemDiscountLabelMargins(int marginLeft, int marginRight, int marginTop, int marginBottom)</code></pre>


---

Setter for margins in ItemSubtitle.


<pre><code class="language-java">public void setItemSubTitleMargins(int marginLeft, int marginRight, int marginTop, int marginBottom)</code></pre>


---

Setter for margins in ItemIdentifier.


<pre><code class="language-java">public void setItemIdentifierMargins(int marginLeft, int marginRight, int marginTop, int marginBottom)</code></pre>


---

Setter for margins in ItemLoyaltyPoints.


<pre><code class="language-java">public void setItemLoyaltyPointsMargins(int marginLeft, int marginRight, int marginTop, int marginBottom)</code></pre>


---

Setter for margins in ItemLoyaltyPointsLabel.


<pre><code class="language-java">public void setItemLoyaltyPointsLabelMargins(int marginLeft, int marginRight, int marginTop, int marginBottom)</code></pre>


---

Setter for itemAction.


<pre><code class="language-java">public void setItemAction(ImageButtonCustomAction itemImageButton)</code></pre>


---

Setter for the badge.


<pre><code class="language-java">public void setBadge(ContentWidgetBadge badge)</code></pre>


---
---

### ContentWidgetRecommendationDataModel
Model for recommendations inside a content widget

**Declared In:**  
`com.synerise.sdk.content.widgets.dataModel.ContentWidgetRecommendationDataModel`

**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-73">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-73-0" data-tab-group="tabgrp-73" data-tab-active="true">Java</button><button class="tab-button" data-tab-id="tabgrp-73-1" data-tab-group="tabgrp-73">Kotlin</button></div>

<div class="tab-panel" data-tab-id="tabgrp-73-0" data-tab-group="tabgrp-73" data-tab-active="true">

```Java
public class ContentWidgetRecommendationDataModel
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-73-1" data-tab-group="tabgrp-73">

```Kotlin
class ContentWidgetRecommendationDataModel
```

</div>
</div>


**Properties:**  

There are no properties.


**Initializers:**  

Constructor:


<pre><code class="language-java">public ContentWidgetRecommendationDataModel(String name, String image, String price, String salePrice, String priceCurrency)</code></pre>



<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

It's recommended to send the value of the `priceCurrency` in ISO format.

</div></div></div>


**Methods:**  

This method retrieves an item name.


<pre><code class="language-java">public String getName()</code></pre>


---

This method retrieves the URL of the item's image.


<pre><code class="language-java">public String getImage()</code></pre>


---

This method retrieves the item's price.


<pre><code class="language-java">public String getPrice()</code></pre>


---

This method retrieves the item's sale price.


<pre><code class="language-java">public String getSalePrice()</code></pre>


---

This method retrieves the currency of the price.


<pre><code class="language-java">public String getPriceCurrency()</code></pre>


---

This method retrieves the value of the badge model parameter.


<pre><code class="language-java">public ContentWidgetBadgeDataModel getBadgeDataModel()</code></pre>


---

This method retrieves the value of the label parameter.


<pre><code class="language-java">public String getLabel()</code></pre>


---

This method defines the value of the badge model parameter.


<pre><code class="language-java">public void setBadgeDataModel(ContentWidgetBadgeDataModel badge)</code></pre>


---

This method defines the value of the label parameter.


<pre><code class="language-java">public void setLabel(String label)</code></pre>


---

---
---

### ContentWidgetBadgeDataModel
Model for badges inside content widgets.

**Declared In:**  
`com.synerise.sdk.content.widgets.dataModel.ContentWidgetBadgeDataModel`

**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-74">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-74-0" data-tab-group="tabgrp-74" data-tab-active="true">Java</button><button class="tab-button" data-tab-id="tabgrp-74-1" data-tab-group="tabgrp-74">Kotlin</button></div>

<div class="tab-panel" data-tab-id="tabgrp-74-0" data-tab-group="tabgrp-74" data-tab-active="true">

```Java
public class ContentWidgetBadgeDataModel
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-74-1" data-tab-group="tabgrp-74">

```Kotlin
class ContentWidgetBadgeDataModel
```

</div>
</div>


**Properties:**  

There are no properties.


**Initializers:**  

Constructor:


<pre><code class="language-java">public ContentWidgetBadgeDataModel(String text, int color, int textColor)</code></pre>


**Methods:**  

This method retrieves the value of the badge text.


<pre><code class="language-java">public String getText()</code></pre>


---

This method retrieves the badge color.


<pre><code class="language-java">public int getColor()</code></pre>


---

This method retrieves the badge text color.


<pre><code class="language-java">public int getTextColor()</code></pre>


---

---
---

### ContentWidgetRecommendationDataModel
Model for recommendations inside a content widget

**Declared In:**  
`com.synerise.sdk.content.widgets.dataModel.ContentWidgetRecommendationDataModel`

**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-75">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-75-0" data-tab-group="tabgrp-75" data-tab-active="true">Java</button><button class="tab-button" data-tab-id="tabgrp-75-1" data-tab-group="tabgrp-75">Kotlin</button></div>

<div class="tab-panel" data-tab-id="tabgrp-75-0" data-tab-group="tabgrp-75" data-tab-active="true">

```Java
public class ContentWidgetRecommendationDataModel
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-75-1" data-tab-group="tabgrp-75">

```Kotlin
class ContentWidgetRecommendationDataModel
```

</div>
</div>


**Properties:**  

There are no properties.


**Initializers:**  

Constructor:


<pre><code class="language-java">public ContentWidgetRecommendationDataModel(String name, String image, String price, String salePrice, String priceCurrency)</code></pre>



<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

It's recommended to send the value of the `priceCurrency` in ISO format.

</div></div></div>


**Methods:**  

This method retrieves an item name.


<pre><code class="language-java">public String getName()</code></pre>


---

This method retrieves the URL of the item's image.


<pre><code class="language-java">public String getImage()</code></pre>


---

This method retrieves the item's price.


<pre><code class="language-java">public String getPrice()</code></pre>


---

This method retrieves the item's sale price.


<pre><code class="language-java">public String getSalePrice()</code></pre>


---

This method retrieves the currency of the price.


<pre><code class="language-java">public String getPriceCurrency()</code></pre>


---

This method retrieves the value of the badge model parameter.


<pre><code class="language-java">public ContentWidgetBadgeDataModel getBadgeDataModel()</code></pre>


---

This method retrieves the value of the label parameter.


<pre><code class="language-java">public String getLabel()</code></pre>


---

This method defines the value of the badge model parameter.


<pre><code class="language-java">public void setBadgeDataModel(ContentWidgetBadgeDataModel badge)</code></pre>


---

This method defines the value of the label parameter.


<pre><code class="language-java">public void setLabel(String label)</code></pre>


---
