Interface StagedOrderAddCustomLineItemAction
- All Superinterfaces:
CustomizableDraft<StagedOrderAddCustomLineItemAction>
,ResourceUpdateAction<StagedOrderUpdateAction>
,StagedOrderUpdateAction
- All Known Implementing Classes:
StagedOrderAddCustomLineItemActionImpl
Example to create an instance using the builder pattern
StagedOrderAddCustomLineItemAction stagedOrderAddCustomLineItemAction = StagedOrderAddCustomLineItemAction.builder()
.money(moneyBuilder -> moneyBuilder)
.name(nameBuilder -> nameBuilder)
.slug("{slug}")
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for StagedOrderAddCustomLineItemAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for StagedOrderAddCustomLineItemActionbuilder
(StagedOrderAddCustomLineItemAction template) create builder for StagedOrderAddCustomLineItemAction instancedeepCopy
(StagedOrderAddCustomLineItemAction template) factory method to create a deep copy of StagedOrderAddCustomLineItemAction@Valid CustomFieldsDraft
The representation used when creating or updating a customizable data type with Custom Fields.@Valid ExternalTaxRateDraft
Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.getKey()
User-defined unique identifier of the Custom Line Item.@NotNull @Valid Money
getMoney()
Draft type that stores amounts only in cent precision for the specified currency.@NotNull @Valid LocalizedString
getName()
JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.IfStandard
, Cart Discounts with a matching CartDiscountCustomLineItemsTarget are applied to the Custom Line Item. IfExternal
, Cart Discounts are not considered on the Custom Line Item.@NotNull String
getSlug()
ResourceIdentifier to a TaxCategory.of()
factory methodof
(StagedOrderAddCustomLineItemAction template) factory method to create a shallow copy StagedOrderAddCustomLineItemActionvoid
setCustom
(CustomFieldsDraft custom) The representation used when creating or updating a customizable data type with Custom Fields.void
setExternalTaxRate
(ExternalTaxRateDraft externalTaxRate) Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.void
User-defined unique identifier of the Custom Line Item.void
Draft type that stores amounts only in cent precision for the specified currency.void
setName
(LocalizedString name) JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.void
setPriceMode
(CustomLineItemPriceMode priceMode) IfStandard
, Cart Discounts with a matching CartDiscountCustomLineItemsTarget are applied to the Custom Line Item. IfExternal
, Cart Discounts are not considered on the Custom Line Item.void
setQuantity
(Long quantity) set quantityvoid
set slugvoid
setTaxCategory
(TaxCategoryResourceIdentifier taxCategory) ResourceIdentifier to a TaxCategory.static com.fasterxml.jackson.core.type.TypeReference<StagedOrderAddCustomLineItemAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.CustomizableDraft
unwrapCustomizableDraft
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
Methods inherited from interface com.commercetools.api.models.order.StagedOrderUpdateAction
getAction, withStagedOrderUpdateAction
-
Field Details
-
ADD_CUSTOM_LINE_ITEM
discriminator value for StagedOrderAddCustomLineItemAction- See Also:
-
-
Method Details
-
getMoney
Draft type that stores amounts only in cent precision for the specified currency.
- Returns:
- money
-
getName
JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.
- Returns:
- name
-
getKey
User-defined unique identifier of the Custom Line Item.
- Returns:
- key
-
getQuantity
- Returns:
- quantity
-
getSlug
- Returns:
- slug
-
getTaxCategory
ResourceIdentifier to a TaxCategory.
- Returns:
- taxCategory
-
getCustom
The representation used when creating or updating a customizable data type with Custom Fields.
- Specified by:
getCustom
in interfaceCustomizableDraft<StagedOrderAddCustomLineItemAction>
- Returns:
- custom
-
getExternalTaxRate
Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
- Returns:
- externalTaxRate
-
getPriceMode
- If
Standard
, Cart Discounts with a matching CartDiscountCustomLineItemsTarget are applied to the Custom Line Item. - If
External
, Cart Discounts are not considered on the Custom Line Item.
- Returns:
- priceMode
- If
-
setMoney
Draft type that stores amounts only in cent precision for the specified currency.
- Parameters:
money
- value to be set
-
setName
JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.
- Parameters:
name
- value to be set
-
setKey
User-defined unique identifier of the Custom Line Item.
- Parameters:
key
- value to be set
-
setQuantity
set quantity- Parameters:
quantity
- value to be set
-
setSlug
set slug- Parameters:
slug
- value to be set
-
setTaxCategory
ResourceIdentifier to a TaxCategory.
- Parameters:
taxCategory
- value to be set
-
setCustom
The representation used when creating or updating a customizable data type with Custom Fields.
- Specified by:
setCustom
in interfaceCustomizableDraft<StagedOrderAddCustomLineItemAction>
- Parameters:
custom
- value to be set
-
setExternalTaxRate
Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
- Parameters:
externalTaxRate
- value to be set
-
setPriceMode
- If
Standard
, Cart Discounts with a matching CartDiscountCustomLineItemsTarget are applied to the Custom Line Item. - If
External
, Cart Discounts are not considered on the Custom Line Item.
- Parameters:
priceMode
- value to be set
- If
-
of
factory method- Returns:
- instance of StagedOrderAddCustomLineItemAction
-
of
factory method to create a shallow copy StagedOrderAddCustomLineItemAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static StagedOrderAddCustomLineItemAction deepCopy(@Nullable StagedOrderAddCustomLineItemAction template) factory method to create a deep copy of StagedOrderAddCustomLineItemAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for StagedOrderAddCustomLineItemAction- Returns:
- builder
-
builder
static StagedOrderAddCustomLineItemActionBuilder builder(StagedOrderAddCustomLineItemAction template) create builder for StagedOrderAddCustomLineItemAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withStagedOrderAddCustomLineItemAction
default <T> T withStagedOrderAddCustomLineItemAction(Function<StagedOrderAddCustomLineItemAction, T> helper) accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<StagedOrderAddCustomLineItemAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-