Cart

@JsonClass(generateAdapter = true)
data class Cart

Cart contains information on what items are included in a transaction that will be shown on a reader when using setReaderDisplay.

The Cart only represents exactly what will be shown on the screen, and is not reflective of what the customer is actually charged. You are responsible for making sure that tax and total reflect what is in the cart.

For more information, see the official Stripe docs: Set the reader display

To create an instance of this class, use the Cart.Builder

Use of this SDK is subject to the Stripe Terminal Terms: https://stripe.com/terminal/legal

Types

Builder
Link copied to clipboard
class Builder @JvmOverloads() constructor(currency: String, tax: Long, total: Long, lineItems: List<CartLineItem>)

Functions

toBuilder
Link copied to clipboard
fun toBuilder(): Cart.Builder

Properties

currency
Link copied to clipboard
val currency: String
The currency of the cart
lineItems
Link copied to clipboard
val lineItems: List<CartLineItem>
List of the individual items to list on the reader display.
tax
Link copied to clipboard
val tax: Long = 0L
The displayed tax amount, provided in the currency’s smallest unit
total
Link copied to clipboard
val total: Long = 0L
The cart’s total balance, provided in the currency’s smallest unit