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 StandalonePriceBuilderbuilder()builder factory method for StandalonePricestatic StandalonePriceBuilderbuilder(StandalonePrice template) create builder for StandalonePrice instancecopyDeep()static StandalonePricedeepCopy(StandalonePrice template) factory method to create a deep copy of StandalonePrice@NotNull BooleanIf set totrue, the StandalonePrice is considered during Product price selection.@Valid ChannelReferenceProduct distribution Channel for which this Price is valid.Country for which this Price is valid.@NotNull ZonedDateTimeDate and time (UTC) the StandalonePrice was initially created.@Valid CreatedByIDs and references that created the StandalonePrice.@Valid CustomFieldsCustom Fields for the StandalonePrice.@Valid CustomerGroupReferenceCustomerGroup for which this Price is valid.@Valid DiscountedPriceSet if a matching ProductDiscount exists.@NotNull StringgetId()Unique identifier of the StandalonePrice.getKey()User-defined unique identifier of the StandalonePrice.@NotNull ZonedDateTimeDate and time (UTC) the StandalonePrice was last updated.@Valid LastModifiedByIDs and references that last modified the StandalonePrice.@Valid RecurrencePolicyReferenceRecurrencePolicy for which this Price is valid.@NotNull StringgetSku()SKU of the ProductVariant to which this Price is associated.@Valid StagedStandalonePriceStaged 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 TypedMoneygetValue()Money value of this Price.@NotNull LongCurrent version of the StandalonePrice.static StandalonePriceof()factory methodstatic StandalonePriceof(StandalonePrice template) factory method to create a shallow copy StandalonePricestatic ReferenceTypeIdvoidIf set totrue, the StandalonePrice is considered during Product price selection.voidsetChannel(ChannelReference channel) Product distribution Channel for which this Price is valid.voidsetCountry(String country) Country for which this Price is valid.voidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the StandalonePrice was initially created.voidsetCreatedBy(CreatedBy createdBy) IDs and references that created the StandalonePrice.voidsetCustom(CustomFields custom) Custom Fields for the StandalonePrice.voidsetCustomerGroup(CustomerGroupReference customerGroup) CustomerGroup for which this Price is valid.voidsetDiscounted(DiscountedPrice discounted) Set if a matching ProductDiscount exists.voidUnique identifier of the StandalonePrice.voidUser-defined unique identifier of the StandalonePrice.voidsetLastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the StandalonePrice was last updated.voidsetLastModifiedBy(LastModifiedBy lastModifiedBy) IDs and references that last modified the StandalonePrice.voidsetRecurrencePolicy(RecurrencePolicyReference recurrencePolicy) RecurrencePolicy for which this Price is valid.voidSKU of the ProductVariant to which this Price is associated.voidsetStaged(StagedStandalonePrice staged) Staged changes of the StandalonePrice.voidPrice tiers if any are defined.voidPrice tiers if any are defined.voidsetValidFrom(ZonedDateTime validFrom) Date from which the Price is valid.voidsetValidUntil(ZonedDateTime validUntil) Date until the Price is valid.voidsetValue(TypedMoney value) Money value of this Price.voidsetVersion(Long version) Current version of the StandalonePrice.static com.fasterxml.jackson.core.type.TypeReference<StandalonePrice>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithStandalonePrice(Function<StandalonePrice, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResourceMethods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizableMethods inherited from interface com.commercetools.api.models.DomainResource
getMethods inherited from interface com.commercetools.api.models.standalone_price.StandalonePriceMixin
toReference, toResourceIdentifier
-
Method Details
-
getId
Unique identifier of the StandalonePrice.
- Specified by:
getIdin interfaceBaseResource- Specified by:
getIdin interfaceDomainResource<StandalonePrice>- Specified by:
getIdin interfaceIdentifiable<StandalonePrice>- Specified by:
getIdin interfaceVersioned<StandalonePrice>- Returns:
- id
-
getVersion
Current version of the StandalonePrice.
- Specified by:
getVersionin interfaceBaseResource- Specified by:
getVersionin interfaceDomainResource<StandalonePrice>- Specified by:
getVersionin interfaceVersioned<StandalonePrice>- Returns:
- version
-
getCreatedAt
Date and time (UTC) the StandalonePrice was initially created.
- Specified by:
getCreatedAtin interfaceBaseResource- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the StandalonePrice was last updated.
- Specified by:
getLastModifiedAtin 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
discountedis 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
discountedvalue for the Line Item price selection. When a relative discount is applied and the fraction part of thediscountedprice is 0.5, the discounted price is rounded in favor of the customer with the half down rounding.If an absolute discount value exceeds the price of the Product Variant, the discounted price is a negative value.
- Returns:
- discounted
-
getCustom
Custom Fields for the StandalonePrice.
- Specified by:
getCustomin 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
-
getRecurrencePolicy
RecurrencePolicy for which this Price is valid.
- Returns:
- recurrencePolicy
-
setId
Unique identifier of the StandalonePrice.
- Specified by:
setIdin interfaceBaseResource- Parameters:
id- value to be set
-
setVersion
Current version of the StandalonePrice.
- Specified by:
setVersionin interfaceBaseResource- Parameters:
version- value to be set
-
setCreatedAt
Date and time (UTC) the StandalonePrice was initially created.
- Specified by:
setCreatedAtin interfaceBaseResource- Parameters:
createdAt- value to be set
-
setLastModifiedAt
Date and time (UTC) the StandalonePrice was last updated.
- Specified by:
setLastModifiedAtin 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
discountedis present, the tiered Price is ignored for a Product Variant.- Parameters:
tiers- values to be set
-
setTiers
Price tiers if any are defined.
If
discountedis 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
discountedvalue for the Line Item price selection. When a relative discount is applied and the fraction part of thediscountedprice is 0.5, the discounted price is rounded in favor of the customer with the half down rounding.If an absolute discount value exceeds the price of the Product Variant, the discounted price is a negative value.
- Parameters:
discounted- value to be set
-
setCustom
Custom Fields for the StandalonePrice.
- Specified by:
setCustomin 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
-
setRecurrencePolicy
RecurrencePolicy for which this Price is valid.
- Parameters:
recurrencePolicy- 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
-
copyDeep
StandalonePrice copyDeep()- Specified by:
copyDeepin interfaceBaseResource
-
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
-