//Granify Android SDK/com.granifyinc.granifysdk.models/Order

Order

data class Order@JvmOverloadsconstructor(val orderNumber: String, val lineItemsTotal: Price, val subtotal: Price, val totalTax: Price, val totalShipping: Price, val total: Price, val lineItems: HashMap<Product, Int>, val discountCodes: List<DiscountCode>, val financialStatus: String = defaultFinancialStatus, val currency: Currency = Currency.USD)

Represents an order placed on the site.

Parameters

androidJvm

   
orderNumber The unique identifier for this order.
lineItemsTotal The total value of all items in the cart before any discounts, taxes, and shipping, but after sale pricing.
subtotal The total value of the items in the order after discounts but before shipping or taxes.
This should match the order total you use in your own analytics.
totalTax The total value of any taxes applied to this order.
totalShipping The total value of any shipping costs applied to this order.
total The total value of the order (after discounts) including shipping and taxes.
lineItems The products in the order and their corresponding ordered quantities.
discountCodes A list of discounts applied to this order. If no discounts are applicable, this must be an empty list.
financialStatus The payment status of the order. Use the provided parameter default ("paid") unless you want to send information about fraud or cancelled orders.
currency The local currency used for prices.

Constructors

   
Order [androidJvm]
@JvmOverloads
constructor(orderNumber: String, lineItemsTotal: Price, subtotal: Price, totalTax: Price, totalShipping: Price, total: Price, lineItems: HashMap<Product, Int>, discountCodes: List<DiscountCode>, financialStatus: String = defaultFinancialStatus, currency: Currency = Currency.USD)
Creates an Order instance with all the required order details.

Properties

Name Summary
currency [androidJvm]
val currency: Currency
discountCodes [androidJvm]
val discountCodes: List<DiscountCode>
financialStatus [androidJvm]
val financialStatus: String
lineItems [androidJvm]
val lineItems: HashMap<Product, Int>
lineItemsTotal [androidJvm]
val lineItemsTotal: Price
orderNumber [androidJvm]
val orderNumber: String
subtotal [androidJvm]
val subtotal: Price
total [androidJvm]
val total: Price
totalShipping [androidJvm]
val totalShipping: Price
totalTax [androidJvm]
val totalTax: Price