public static class Storefront.CartCodeDiscountAllocation extends AbstractResponse<Storefront.CartCodeDiscountAllocation> implements Storefront.CartDiscountAllocation
optimisticData, responseData| Constructor and Description |
|---|
CartCodeDiscountAllocation() |
CartCodeDiscountAllocation(JsonObject fields) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCode()
The code used to apply the discount.
|
Storefront.MoneyV2 |
getDiscountedAmount()
The discounted amount that has been applied to the cart line.
|
java.lang.String |
getGraphQlTypeName() |
Storefront.DiscountApplicationTargetType |
getTargetType()
The type of line that the discount is applicable towards.
|
Storefront.CartCodeDiscountAllocation |
setCode(java.lang.String arg) |
Storefront.CartCodeDiscountAllocation |
setDiscountedAmount(Storefront.MoneyV2 arg) |
Storefront.CartCodeDiscountAllocation |
setTargetType(Storefront.DiscountApplicationTargetType arg) |
boolean |
unwrapsToObject(java.lang.String key) |
collectNodes, get, getFieldName, getKey, jsonAsArray, jsonAsBoolean, jsonAsDouble, jsonAsInteger, jsonAsObject, jsonAsString, withAliaspublic CartCodeDiscountAllocation()
public CartCodeDiscountAllocation(JsonObject fields)
throws SchemaViolationError
SchemaViolationErrorpublic java.lang.String getGraphQlTypeName()
getGraphQlTypeName in interface Storefront.CartDiscountAllocationpublic java.lang.String getCode()
public Storefront.CartCodeDiscountAllocation setCode(java.lang.String arg)
public Storefront.MoneyV2 getDiscountedAmount()
getDiscountedAmount in interface Storefront.CartDiscountAllocationpublic Storefront.CartCodeDiscountAllocation setDiscountedAmount(Storefront.MoneyV2 arg)
public Storefront.DiscountApplicationTargetType getTargetType()
getTargetType in interface Storefront.CartDiscountAllocationpublic Storefront.CartCodeDiscountAllocation setTargetType(Storefront.DiscountApplicationTargetType arg)
public boolean unwrapsToObject(java.lang.String key)
unwrapsToObject in class AbstractResponse<Storefront.CartCodeDiscountAllocation>