Class Item
-
- All Implemented Interfaces:
public final class ItemItem in an order.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classItem.BuilderA builder for Item.
public final classItem.Tenderpublic final classItem.UnitUnit of measurement for the item quantity.
-
Method Summary
Modifier and Type Method Description final Stringid()Required unique identifier for the item. final Stringdescription()Description or name of the item. final Stringname()Item name. final Longprice()Price per unit of the item in cents. final Doublequantity()Quantity of the item (discrete count or weight). final BooleansnapEligible()Whether the item is eligible for SNAP benefits. final DoubletaxRate()Tax rate applicable to the item (as decimal, e.g., 0.07 for 7 percent). final List<Item.Tender>tenders()final Item.Unitunit()Unit of measurement for the item quantity. final Optional<Long>paddedPrice()Padded price for weight-based items in cents (up to 10 percent padding allowed). final Optional<String>photoUrl()Optional URL for the item's photo. final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<String>_description()Returns the raw JSON value of description. final JsonField<String>_name()Returns the raw JSON value of name. final JsonField<Long>_price()Returns the raw JSON value of price. final JsonField<Double>_quantity()Returns the raw JSON value of quantity. final JsonField<Boolean>_snapEligible()Returns the raw JSON value of snapEligible. final JsonField<Double>_taxRate()Returns the raw JSON value of taxRate. final JsonField<List<Item.Tender>>_tenders()Returns the raw JSON value of tenders. final JsonField<Item.Unit>_unit()Returns the raw JSON value of unit. final JsonField<Long>_paddedPrice()Returns the raw JSON value of paddedPrice. final JsonField<String>_photoUrl()Returns the raw JSON value of photoUrl. final Map<String, JsonValue>_additionalProperties()final Item.BuildertoBuilder()final Itemvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static Item.Builderbuilder()Returns a mutable builder for constructing an instance of Item. -
-
Method Detail
-
description
final String description()
Description or name of the item.
-
snapEligible
final Boolean snapEligible()
Whether the item is eligible for SNAP benefits.
-
taxRate
final Double taxRate()
Tax rate applicable to the item (as decimal, e.g., 0.07 for 7 percent).
-
tenders
final List<Item.Tender> tenders()
-
paddedPrice
final Optional<Long> paddedPrice()
Padded price for weight-based items in cents (up to 10 percent padding allowed).
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
_description
final JsonField<String> _description()
Returns the raw JSON value of description.
Unlike description, this method doesn't throw if the JSON field has an unexpected type.
-
_name
final JsonField<String> _name()
Returns the raw JSON value of name.
Unlike name, this method doesn't throw if the JSON field has an unexpected type.
-
_price
final JsonField<Long> _price()
Returns the raw JSON value of price.
Unlike price, this method doesn't throw if the JSON field has an unexpected type.
-
_quantity
final JsonField<Double> _quantity()
Returns the raw JSON value of quantity.
Unlike quantity, this method doesn't throw if the JSON field has an unexpected type.
-
_snapEligible
final JsonField<Boolean> _snapEligible()
Returns the raw JSON value of snapEligible.
Unlike snapEligible, this method doesn't throw if the JSON field has an unexpected type.
-
_taxRate
final JsonField<Double> _taxRate()
Returns the raw JSON value of taxRate.
Unlike taxRate, this method doesn't throw if the JSON field has an unexpected type.
-
_tenders
final JsonField<List<Item.Tender>> _tenders()
Returns the raw JSON value of tenders.
Unlike tenders, this method doesn't throw if the JSON field has an unexpected type.
-
_unit
final JsonField<Item.Unit> _unit()
Returns the raw JSON value of unit.
Unlike unit, this method doesn't throw if the JSON field has an unexpected type.
-
_paddedPrice
final JsonField<Long> _paddedPrice()
Returns the raw JSON value of paddedPrice.
Unlike paddedPrice, this method doesn't throw if the JSON field has an unexpected type.
-
_photoUrl
final JsonField<String> _photoUrl()
Returns the raw JSON value of photoUrl.
Unlike photoUrl, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final Item.Builder toBuilder()
-
builder
final static Item.Builder builder()
Returns a mutable builder for constructing an instance of Item.
The following fields are required:
.id() .description() .name() .price() .quantity() .snapEligible() .taxRate() .tenders() .unit()
-
-
-
-