Package io.electrum.suv.api.models
Class Product
- java.lang.Object
-
- io.electrum.suv.api.models.Product
-
public class Product extends Object
Product related data.
-
-
Constructor Summary
Constructors Constructor Description Product()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Productamount(io.electrum.vas.model.LedgerAmount amount)Productbarcode(String barcode)booleanequals(Object o)io.electrum.vas.model.LedgerAmountgetAmount()The price of the product, if available.StringgetBarcode()A barcode code identifying the product.StringgetName()The name of the product.StringgetProductId()inthashCode()Productname(String name)ProductproductId(String productId)A vendor determined code identifying the product the voucher should pertain to.voidsetAmount(io.electrum.vas.model.LedgerAmount amount)voidsetBarcode(String barcode)voidsetName(String name)voidsetProductId(String productId)StringtoString()
-
-
-
Method Detail
-
productId
public Product productId(String productId)
A vendor determined code identifying the product the voucher should pertain to.
-
getProductId
@Pattern(regexp="[0-9A-Za-z-]{1,40}") @NotNull public String getProductId()
-
setProductId
public void setProductId(String productId)
-
getBarcode
@Pattern(regexp="[0-9A-Za-z]{1,13}") public String getBarcode()A barcode code identifying the product. This is an alternative identifier for the product but does not supersede the productId.- Returns:
- barcode
-
setBarcode
public void setBarcode(String barcode)
-
getName
@Length(min=1, max=40) public String getName()The name of the product.- Returns:
- name
-
setName
public void setName(String name)
-
amount
public Product amount(io.electrum.vas.model.LedgerAmount amount)
-
getAmount
public io.electrum.vas.model.LedgerAmount getAmount()
The price of the product, if available.- Returns:
- amount
- Since:
- v1.16.0
-
setAmount
public void setAmount(io.electrum.vas.model.LedgerAmount amount)
-
-