Item class

Annotations
  • @JsonSerializable.new(fieldRename: FieldRename.snake)

Constructors

Item({String? name, required Money unitAmount, Money? tax, required String quantity, String? description, String? sku, ItemCategory? category})
const
Item.fromJson(Map<String, dynamic> json)
factory

Properties

category → ItemCategory?
The item category type.
final
description → String?
The detailed item description.
final
hashCode → int
The hash code for this object.
no setterinherited
name → String?
The item name or title.
final
quantity → String
The item quantity. Must be a whole number.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sku → String?
The stock keeping unit (SKU) for the item.
final
tax → Money?
The item tax for each unit. If tax is specified, purchase_units[].amount.breakdown.tax_total is required. Must equal tax * quantity for all items. tax.value can not be a negative number.
final
unitAmount → Money
The item price or rate per unit. If you specify unit_amount, purchase_units[].amount.breakdown.item_total is required. Must equal unit_amount * quantity for all items. unit_amount.value can not be a negative number.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited