Interface StandalonePrice
- All Superinterfaces:
BaseResource
,Customizable<StandalonePrice>
,DomainResource<StandalonePrice>
,Identifiable<StandalonePrice>
,Referencable<StandalonePrice>
,ResourceIdentifiable<StandalonePrice>
,StandalonePriceMixin
,Versioned<StandalonePrice>
,WithKey
Example to create an instance using the builder pattern
StandalonePrice standalonePrice = StandalonePrice.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.sku("{sku}")
.value(valueBuilder -> valueBuilder)
.active(true)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic StandalonePriceBuilder
builder()
builder factory method for StandalonePricestatic StandalonePriceBuilder
builder
(StandalonePrice template) create builder for StandalonePrice instancestatic StandalonePrice
deepCopy
(StandalonePrice template) factory method to create a deep copy of StandalonePrice@NotNull Boolean
If set totrue
, the StandalonePrice is considered during Product price selection.@Valid ChannelReference
Product distribution Channel for which this Price is valid.Country for which this Price is valid.@NotNull ZonedDateTime
Date and time (UTC) the StandalonePrice was initially created.@Valid CreatedBy
IDs and references that created the StandalonePrice.@Valid CustomFields
Custom Fields for the StandalonePrice.@Valid CustomerGroupReference
CustomerGroup for which this Price is valid.@Valid DiscountedPrice
Set if a matching ProductDiscount exists.@NotNull String
getId()
Unique identifier of the StandalonePrice.getKey()
User-defined unique identifier of the StandalonePrice.@NotNull ZonedDateTime
Date and time (UTC) the StandalonePrice was last updated.@Valid LastModifiedBy
IDs and references that last modified the StandalonePrice.@NotNull String
getSku()
SKU of the ProductVariant to which this Price is associated.@Valid StagedStandalonePrice
Staged changes of the StandalonePrice.getTiers()
Price tiers if any are defined.Date from which the Price is valid.Date until the Price is valid.@NotNull @Valid TypedMoney
getValue()
Money value of this Price.@NotNull Long
Current version of the StandalonePrice.static StandalonePrice
of()
factory methodstatic StandalonePrice
of
(StandalonePrice template) factory method to create a shallow copy StandalonePricestatic ReferenceTypeId
void
If set totrue
, the StandalonePrice is considered during Product price selection.void
setChannel
(ChannelReference channel) Product distribution Channel for which this Price is valid.void
setCountry
(String country) Country for which this Price is valid.void
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the StandalonePrice was initially created.void
setCreatedBy
(CreatedBy createdBy) IDs and references that created the StandalonePrice.void
setCustom
(CustomFields custom) Custom Fields for the StandalonePrice.void
setCustomerGroup
(CustomerGroupReference customerGroup) CustomerGroup for which this Price is valid.void
setDiscounted
(DiscountedPrice discounted) Set if a matching ProductDiscount exists.void
Unique identifier of the StandalonePrice.void
User-defined unique identifier of the StandalonePrice.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the StandalonePrice was last updated.void
setLastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the StandalonePrice.void
SKU of the ProductVariant to which this Price is associated.void
setStaged
(StagedStandalonePrice staged) Staged changes of the StandalonePrice.void
Price tiers if any are defined.void
Price tiers if any are defined.void
setValidFrom
(ZonedDateTime validFrom) Date from which the Price is valid.void
setValidUntil
(ZonedDateTime validUntil) Date until the Price is valid.void
setValue
(TypedMoney value) Money value of this Price.void
setVersion
(Long version) Current version of the StandalonePrice.static com.fasterxml.jackson.core.type.TypeReference<StandalonePrice>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withStandalonePrice
(Function<StandalonePrice, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
Methods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizable
Methods inherited from interface com.commercetools.api.models.DomainResource
get
Methods inherited from interface com.commercetools.api.models.standalone_price.StandalonePriceMixin
toReference, toResourceIdentifier
-
Method Details
-
getId
Unique identifier of the StandalonePrice.
- Specified by:
getId
in interfaceBaseResource
- Specified by:
getId
in interfaceDomainResource<StandalonePrice>
- Specified by:
getId
in interfaceIdentifiable<StandalonePrice>
- Specified by:
getId
in interfaceVersioned<StandalonePrice>
- Returns:
- id
-
getVersion
Current version of the StandalonePrice.
- Specified by:
getVersion
in interfaceBaseResource
- Specified by:
getVersion
in interfaceDomainResource<StandalonePrice>
- Specified by:
getVersion
in interfaceVersioned<StandalonePrice>
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the StandalonePrice was initially created.
- Specified by:
getCreatedAt
in interfaceBaseResource
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the StandalonePrice was last updated.
- Specified by:
getLastModifiedAt
in interfaceBaseResource
- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the StandalonePrice.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the StandalonePrice.
- Returns:
- createdBy
-
getKey
String getKey()User-defined unique identifier of the StandalonePrice.
-
getSku
SKU of the ProductVariant to which this Price is associated.
- Returns:
- sku
-
getValue
Money value of this Price.
- Returns:
- value
-
getCountry
String getCountry()Country for which this Price is valid.
- Returns:
- country
-
getCustomerGroup
CustomerGroup for which this Price is valid.
- Returns:
- customerGroup
-
getChannel
Product distribution Channel for which this Price is valid.
- Returns:
- channel
-
getValidFrom
ZonedDateTime getValidFrom()Date from which the Price is valid.
- Returns:
- validFrom
-
getValidUntil
ZonedDateTime getValidUntil()Date until the Price is valid. Standalone Prices that are no longer valid are not automatically deleted, but they can be deleted if necessary.
- Returns:
- validUntil
-
getTiers
Price tiers if any are defined.
If
discounted
is present, the tiered Price is ignored for a Product Variant.- Returns:
- tiers
-
getDiscounted
Set if a matching ProductDiscount exists. If set, the API uses the
discounted
value for the Line Item price selection. When a relative discount is applied and the fraction part of thediscounted
price is 0.5, the discounted price is rounded in favor of the customer with the half down rounding.- Returns:
- discounted
-
getCustom
Custom Fields for the StandalonePrice.
- Specified by:
getCustom
in interfaceCustomizable<StandalonePrice>
- Returns:
- custom
-
getStaged
Staged changes of the StandalonePrice. Only present if the StandalonePrice has some changes staged.
- Returns:
- staged
-
getActive
If set to
true
, the StandalonePrice is considered during Product price selection. If set tofalse
, the StandalonePrice is not considered during Product price selection and any associated Line Items in a Cart cannot be ordered.- Returns:
- active
-
setId
Unique identifier of the StandalonePrice.
- Specified by:
setId
in interfaceBaseResource
- Parameters:
id
- value to be set
-
setVersion
Current version of the StandalonePrice.
- Specified by:
setVersion
in interfaceBaseResource
- Parameters:
version
- value to be set
-
setCreatedAt
Date and time (UTC) the StandalonePrice was initially created.
- Specified by:
setCreatedAt
in interfaceBaseResource
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
Date and time (UTC) the StandalonePrice was last updated.
- Specified by:
setLastModifiedAt
in interfaceBaseResource
- Parameters:
lastModifiedAt
- value to be set
-
setLastModifiedBy
IDs and references that last modified the StandalonePrice.
- Parameters:
lastModifiedBy
- value to be set
-
setCreatedBy
IDs and references that created the StandalonePrice.
- Parameters:
createdBy
- value to be set
-
setKey
User-defined unique identifier of the StandalonePrice.
- Parameters:
key
- value to be set
-
setSku
SKU of the ProductVariant to which this Price is associated.
- Parameters:
sku
- value to be set
-
setValue
Money value of this Price.
- Parameters:
value
- value to be set
-
setCountry
Country for which this Price is valid.
- Parameters:
country
- value to be set
-
setCustomerGroup
CustomerGroup for which this Price is valid.
- Parameters:
customerGroup
- value to be set
-
setChannel
Product distribution Channel for which this Price is valid.
- Parameters:
channel
- value to be set
-
setValidFrom
Date from which the Price is valid.
- Parameters:
validFrom
- value to be set
-
setValidUntil
Date until the Price is valid. Standalone Prices that are no longer valid are not automatically deleted, but they can be deleted if necessary.
- Parameters:
validUntil
- value to be set
-
setTiers
Price tiers if any are defined.
If
discounted
is present, the tiered Price is ignored for a Product Variant.- Parameters:
tiers
- values to be set
-
setTiers
Price tiers if any are defined.
If
discounted
is present, the tiered Price is ignored for a Product Variant.- Parameters:
tiers
- values to be set
-
setDiscounted
Set if a matching ProductDiscount exists. If set, the API uses the
discounted
value for the Line Item price selection. When a relative discount is applied and the fraction part of thediscounted
price is 0.5, the discounted price is rounded in favor of the customer with the half down rounding.- Parameters:
discounted
- value to be set
-
setCustom
Custom Fields for the StandalonePrice.
- Specified by:
setCustom
in interfaceCustomizable<StandalonePrice>
- Parameters:
custom
- value to be set
-
setStaged
Staged changes of the StandalonePrice. Only present if the StandalonePrice has some changes staged.
- Parameters:
staged
- value to be set
-
setActive
If set to
true
, the StandalonePrice is considered during Product price selection. If set tofalse
, the StandalonePrice is not considered during Product price selection and any associated Line Items in a Cart cannot be ordered.- Parameters:
active
- value to be set
-
of
factory method- Returns:
- instance of StandalonePrice
-
of
factory method to create a shallow copy StandalonePrice- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of StandalonePrice- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for StandalonePrice- Returns:
- builder
-
builder
create builder for StandalonePrice instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withStandalonePrice
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
referenceTypeId
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-