ShoppingCart.Builder


class ShoppingCart.Builder


Builder class for ShoppingCart.

Summary

Public constructors

Public functions

ShoppingCart.Builder!

Adds the display time window for the shopping cart.

ShoppingCart.Builder!

Adds the display time window for the shopping cart.

ShoppingCart.Builder!

Add a item label in the shopping cart cluster

ShoppingCart.Builder!

Add a list of item labels in the shopping cart cluster

ShoppingCart.Builder!

Adds a poster image of the items in the shopping cart.

ShoppingCart.Builder!

Adds poster images of the items in the shopping cart.

ShoppingCart!
ShoppingCart.Builder!

Sets the action link uri for the shopping cart.

ShoppingCart.Builder!

Sets the action text of the shopping cart. e.g. "View Cart"

ShoppingCart.Builder!
@CanIgnoreReturnValue
setLastUserInteractionTimestampMillis(
    lastUserInteractionTimestampMillis: Long
)

Sets the timestamp when the user last interacted with the shopping cart.

ShoppingCart.Builder!

Sets the number of items in the shopping cart.

ShoppingCart.Builder!

Sets the title of the shopping cart.

Public constructors

Builder

Builder()

Public functions

addAllDisplayTimeWindow

@CanIgnoreReturnValue
fun addAllDisplayTimeWindow(
    displayTimeWindows: (Mutable)List<DisplayTimeWindow!>!
): ShoppingCart.Builder!

Adds the display time window for the shopping cart.

Optional.

addDisplayTimeWindow

@CanIgnoreReturnValue
fun addDisplayTimeWindow(displayTimeWindow: DisplayTimeWindow!): ShoppingCart.Builder!

Adds the display time window for the shopping cart.

Optional.

addItemLabel

@CanIgnoreReturnValue
fun addItemLabel(itemLabel: String!): ShoppingCart.Builder!

Add a item label in the shopping cart cluster

Optional.

addItemLabels

@CanIgnoreReturnValue
fun addItemLabels(itemLabels: (Mutable)List<String!>!): ShoppingCart.Builder!

Add a list of item labels in the shopping cart cluster

Optional.

addPosterImage

@CanIgnoreReturnValue
fun addPosterImage(image: Image!): ShoppingCart.Builder!

Adds a poster image of the items in the shopping cart.

Optional.

addPosterImages

@CanIgnoreReturnValue
fun addPosterImages(images: (Mutable)List<Image!>!): ShoppingCart.Builder!

Adds poster images of the items in the shopping cart.

Optional.

build

fun build(): ShoppingCart!

setActionLinkUri

@CanIgnoreReturnValue
fun setActionLinkUri(actionLinkUri: Uri!): ShoppingCart.Builder!

Sets the action link uri for the shopping cart.

Required.

setActionText

@CanIgnoreReturnValue
fun setActionText(actionText: String!): ShoppingCart.Builder!

Sets the action text of the shopping cart. e.g. "View Cart"

Optional.

setLastUserInteractionTimestampMillis

@CanIgnoreReturnValue
fun setLastUserInteractionTimestampMillis(
    lastUserInteractionTimestampMillis: Long
): ShoppingCart.Builder!

Sets the timestamp when the user last interacted with the shopping cart.

Required for partner apps publishing multiple carts per user. Optional, if publishing a single cart.

setNumberOfItems

@CanIgnoreReturnValue
fun setNumberOfItems(numberOfItems: Int): ShoppingCart.Builder!

Sets the number of items in the shopping cart.

When set to 0, the cart is empty.

Optional.

setTitle

@CanIgnoreReturnValue
fun setTitle(title: String!): ShoppingCart.Builder!

Sets the title of the shopping cart.

Optional.