public class XPFProductSku extends XPFEntity
Constructor and Description |
---|
XPFProductSku(@NonNull XPFProduct product,
@NonNull String code,
@NonNull Map<Locale,String> displayNames,
@NonNull Set<XPFProductSkuOptionValue> optionValues,
@NonNull Map<Locale,Map<String,XPFAttributeValue>> attributeValues,
Instant effectiveStartDate,
Instant effectiveEndDate,
boolean shippable) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
Optional<XPFAttributeValue> |
getAttributeValueByKey(String key,
Locale locale)
Returns the attribute value with the passed key (case insensitive match) and locale.
|
@NonNull Map<Locale,Map<String,XPFAttributeValue>> |
getAttributeValues()
The product attribute value map of maps keyed by Locale and then by attribute key.
|
@NonNull String |
getCode()
The product sku code.
|
Optional<String> |
getDisplayName(Locale locale)
Get localized display name for a locale with fallback behavior.
|
@NonNull Map<Locale,String> |
getDisplayNames()
The display name for this product sku.
|
Instant |
getEffectiveEndDate()
The end date of this product sku availability.
|
Instant |
getEffectiveStartDate()
The start date of this product sku availability.
|
@NonNull Set<XPFProductSkuOptionValue> |
getOptionValues()
The product sku option values.
|
@NonNull XPFProduct |
getProduct()
The product this sku belongs to.
|
int |
hashCode() |
boolean |
isShippable()
Whether or not this product sku is shippable.
|
String |
toString() |
getCustomData
public XPFProductSku(@NonNull @NonNull XPFProduct product, @NonNull @NonNull String code, @NonNull @NonNull Map<Locale,String> displayNames, @NonNull @NonNull Set<XPFProductSkuOptionValue> optionValues, @NonNull @NonNull Map<Locale,Map<String,XPFAttributeValue>> attributeValues, Instant effectiveStartDate, Instant effectiveEndDate, boolean shippable)
public Optional<XPFAttributeValue> getAttributeValueByKey(String key, Locale locale)
key
- the attribute keylocale
- the attribute value localepublic Optional<String> getDisplayName(Locale locale)
locale
- the locale to get a display name for@NonNull public @NonNull XPFProduct getProduct()
@NonNull public @NonNull String getCode()
@NonNull public @NonNull Map<Locale,String> getDisplayNames()
@NonNull public @NonNull Set<XPFProductSkuOptionValue> getOptionValues()
@NonNull public @NonNull Map<Locale,Map<String,XPFAttributeValue>> getAttributeValues()
public Instant getEffectiveStartDate()
public Instant getEffectiveEndDate()
public boolean isShippable()
Copyright © 2024. All rights reserved.