Class Item.Builder
-
- All Implemented Interfaces:
public final class Item.BuilderA builder for Item.
-
-
Method Summary
Modifier and Type Method Description final Item.Builderid(String id)Required unique identifier for the item. final Item.Builderid(JsonField<String> id)Sets Builder.id to an arbitrary JSON value. final Item.Builderdescription(String description)Description or name of the item. final Item.Builderdescription(JsonField<String> description)Sets Builder.description to an arbitrary JSON value. final Item.Buildername(String name)Item name. final Item.Buildername(JsonField<String> name)Sets Builder.name to an arbitrary JSON value. final Item.Builderprice(Long price)Price per unit of the item in cents. final Item.Builderprice(JsonField<Long> price)Sets Builder.price to an arbitrary JSON value. final Item.Builderquantity(Double quantity)Quantity of the item (discrete count or weight). final Item.Builderquantity(JsonField<Double> quantity)Sets Builder.quantity to an arbitrary JSON value. final Item.BuildersnapEligible(Boolean snapEligible)Whether the item is eligible for SNAP benefits. final Item.BuildersnapEligible(JsonField<Boolean> snapEligible)Sets Builder.snapEligible to an arbitrary JSON value. final Item.BuildertaxRate(Double taxRate)Tax rate applicable to the item (as decimal, e.g., 0.07 for 7 percent). final Item.BuildertaxRate(JsonField<Double> taxRate)Sets Builder.taxRate to an arbitrary JSON value. final Item.Buildertenders(List<Item.Tender> tenders)final Item.Buildertenders(JsonField<List<Item.Tender>> tenders)Sets Builder.tenders to an arbitrary JSON value. final Item.BuilderaddTender(Item.Tender tender)Adds a single Tender to tenders. final Item.Builderunit(Item.Unit unit)Unit of measurement for the item quantity. final Item.Builderunit(JsonField<Item.Unit> unit)Sets Builder.unit to an arbitrary JSON value. final Item.BuilderpaddedPrice(Long paddedPrice)Padded price for weight-based items in cents (up to 10 percent padding allowed). final Item.BuilderpaddedPrice(JsonField<Long> paddedPrice)Sets Builder.paddedPrice to an arbitrary JSON value. final Item.BuilderphotoUrl(String photoUrl)Optional URL for the item's photo. final Item.BuilderphotoUrl(JsonField<String> photoUrl)Sets Builder.photoUrl to an arbitrary JSON value. final Item.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final Item.BuilderputAdditionalProperty(String key, JsonValue value)final Item.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final Item.BuilderremoveAdditionalProperty(String key)final Item.BuilderremoveAllAdditionalProperties(Set<String> keys)final Itembuild()Returns an immutable instance of Item. -
-
Method Detail
-
id
final Item.Builder id(String id)
Required unique identifier for the item.
-
id
final Item.Builder id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value.
You should usually call Builder.id with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
description
final Item.Builder description(String description)
Description or name of the item.
-
description
final Item.Builder description(JsonField<String> description)
Sets Builder.description to an arbitrary JSON value.
You should usually call Builder.description with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
name
final Item.Builder name(String name)
Item name.
-
name
final Item.Builder name(JsonField<String> name)
Sets Builder.name to an arbitrary JSON value.
You should usually call Builder.name with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
price
final Item.Builder price(Long price)
Price per unit of the item in cents.
-
price
final Item.Builder price(JsonField<Long> price)
Sets Builder.price to an arbitrary JSON value.
You should usually call Builder.price with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
quantity
final Item.Builder quantity(Double quantity)
Quantity of the item (discrete count or weight).
-
quantity
final Item.Builder quantity(JsonField<Double> quantity)
Sets Builder.quantity to an arbitrary JSON value.
You should usually call Builder.quantity with a well-typed Double value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
snapEligible
final Item.Builder snapEligible(Boolean snapEligible)
Whether the item is eligible for SNAP benefits.
-
snapEligible
final Item.Builder snapEligible(JsonField<Boolean> snapEligible)
Sets Builder.snapEligible to an arbitrary JSON value.
You should usually call Builder.snapEligible with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
taxRate
final Item.Builder taxRate(Double taxRate)
Tax rate applicable to the item (as decimal, e.g., 0.07 for 7 percent).
-
taxRate
final Item.Builder taxRate(JsonField<Double> taxRate)
Sets Builder.taxRate to an arbitrary JSON value.
You should usually call Builder.taxRate with a well-typed Double value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
tenders
final Item.Builder tenders(List<Item.Tender> tenders)
-
tenders
final Item.Builder tenders(JsonField<List<Item.Tender>> tenders)
Sets Builder.tenders to an arbitrary JSON value.
You should usually call Builder.tenders with a well-typed
List<Tender>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addTender
final Item.Builder addTender(Item.Tender tender)
-
unit
final Item.Builder unit(Item.Unit unit)
Unit of measurement for the item quantity.
-
unit
final Item.Builder unit(JsonField<Item.Unit> unit)
Sets Builder.unit to an arbitrary JSON value.
You should usually call Builder.unit with a well-typed Unit value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
paddedPrice
final Item.Builder paddedPrice(Long paddedPrice)
Padded price for weight-based items in cents (up to 10 percent padding allowed).
-
paddedPrice
final Item.Builder paddedPrice(JsonField<Long> paddedPrice)
Sets Builder.paddedPrice to an arbitrary JSON value.
You should usually call Builder.paddedPrice with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
photoUrl
final Item.Builder photoUrl(String photoUrl)
Optional URL for the item's photo.
-
photoUrl
final Item.Builder photoUrl(JsonField<String> photoUrl)
Sets Builder.photoUrl to an arbitrary JSON value.
You should usually call Builder.photoUrl with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final Item.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final Item.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final Item.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final Item.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final Item.Builder removeAllAdditionalProperties(Set<String> keys)
-
-
-
-