Interface StandalonePrice

All Superinterfaces:
BaseResource, Customizable<StandalonePrice>, DomainResource<StandalonePrice>, Identifiable<StandalonePrice>, Referencable<StandalonePrice>, ResourceIdentifiable<StandalonePrice>, StandalonePriceMixin, Versioned<StandalonePrice>, WithKey

StandalonePrice
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 Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the StandalonePrice.

      Specified by:
      getId in interface BaseResource
      Specified by:
      getId in interface DomainResource<StandalonePrice>
      Specified by:
      getId in interface Identifiable<StandalonePrice>
      Specified by:
      getId in interface Versioned<StandalonePrice>
      Returns:
      id
    • getVersion

      @NotNull @NotNull Long getVersion()

      Current version of the StandalonePrice.

      Specified by:
      getVersion in interface BaseResource
      Specified by:
      getVersion in interface DomainResource<StandalonePrice>
      Specified by:
      getVersion in interface Versioned<StandalonePrice>
      Returns:
      version
    • getCreatedAt

      @NotNull @NotNull ZonedDateTime getCreatedAt()

      Date and time (UTC) the StandalonePrice was initially created.

      Specified by:
      getCreatedAt in interface BaseResource
      Returns:
      createdAt
    • getLastModifiedAt

      @NotNull @NotNull ZonedDateTime getLastModifiedAt()

      Date and time (UTC) the StandalonePrice was last updated.

      Specified by:
      getLastModifiedAt in interface BaseResource
      Returns:
      lastModifiedAt
    • getLastModifiedBy

      @Valid @Valid LastModifiedBy getLastModifiedBy()

      IDs and references that last modified the StandalonePrice.

      Returns:
      lastModifiedBy
    • getCreatedBy

      @Valid @Valid CreatedBy getCreatedBy()

      IDs and references that created the StandalonePrice.

      Returns:
      createdBy
    • getKey

      String getKey()

      User-defined unique identifier of the StandalonePrice.

      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getSku

      @NotNull @NotNull String getSku()

      SKU of the ProductVariant to which this Price is associated.

      Returns:
      sku
    • getValue

      @NotNull @Valid @NotNull @Valid TypedMoney getValue()

      Money value of this Price.

      Returns:
      value
    • getCountry

      String getCountry()

      Country for which this Price is valid.

      Returns:
      country
    • getCustomerGroup

      @Valid @Valid CustomerGroupReference getCustomerGroup()

      CustomerGroup for which this Price is valid.

      Returns:
      customerGroup
    • getChannel

      @Valid @Valid ChannelReference 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

      @Valid @Valid List<PriceTier> getTiers()

      Price tiers if any are defined.

      If discounted is present, the tiered Price is ignored for a Product Variant.

      Returns:
      tiers
    • getDiscounted

      @Valid @Valid DiscountedPrice 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 the discounted price is 0.5, the discounted price is rounded in favor of the customer with the half down rounding.

      Returns:
      discounted
    • getCustom

      @Valid @Valid CustomFields getCustom()

      Custom Fields for the StandalonePrice.

      Specified by:
      getCustom in interface Customizable<StandalonePrice>
      Returns:
      custom
    • getStaged

      @Valid @Valid StagedStandalonePrice getStaged()

      Staged changes of the StandalonePrice. Only present if the StandalonePrice has some changes staged.

      Returns:
      staged
    • getActive

      @NotNull @NotNull Boolean getActive()

      If set to true, the StandalonePrice is considered during Product price selection. If set to false, the StandalonePrice is not considered during Product price selection and any associated Line Items in a Cart cannot be ordered.

      Returns:
      active
    • setId

      void setId(String id)

      Unique identifier of the StandalonePrice.

      Specified by:
      setId in interface BaseResource
      Parameters:
      id - value to be set
    • setVersion

      void setVersion(Long version)

      Current version of the StandalonePrice.

      Specified by:
      setVersion in interface BaseResource
      Parameters:
      version - value to be set
    • setCreatedAt

      void setCreatedAt(ZonedDateTime createdAt)

      Date and time (UTC) the StandalonePrice was initially created.

      Specified by:
      setCreatedAt in interface BaseResource
      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      void setLastModifiedAt(ZonedDateTime lastModifiedAt)

      Date and time (UTC) the StandalonePrice was last updated.

      Specified by:
      setLastModifiedAt in interface BaseResource
      Parameters:
      lastModifiedAt - value to be set
    • setLastModifiedBy

      void setLastModifiedBy(LastModifiedBy lastModifiedBy)

      IDs and references that last modified the StandalonePrice.

      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      void setCreatedBy(CreatedBy createdBy)

      IDs and references that created the StandalonePrice.

      Parameters:
      createdBy - value to be set
    • setKey

      void setKey(String key)

      User-defined unique identifier of the StandalonePrice.

      Parameters:
      key - value to be set
    • setSku

      void setSku(String sku)

      SKU of the ProductVariant to which this Price is associated.

      Parameters:
      sku - value to be set
    • setValue

      void setValue(TypedMoney value)

      Money value of this Price.

      Parameters:
      value - value to be set
    • setCountry

      void setCountry(String country)

      Country for which this Price is valid.

      Parameters:
      country - value to be set
    • setCustomerGroup

      void setCustomerGroup(CustomerGroupReference customerGroup)

      CustomerGroup for which this Price is valid.

      Parameters:
      customerGroup - value to be set
    • setChannel

      void setChannel(ChannelReference channel)

      Product distribution Channel for which this Price is valid.

      Parameters:
      channel - value to be set
    • setValidFrom

      void setValidFrom(ZonedDateTime validFrom)

      Date from which the Price is valid.

      Parameters:
      validFrom - value to be set
    • setValidUntil

      void setValidUntil(ZonedDateTime validUntil)

      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

      void setTiers(PriceTier... tiers)

      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

      void setTiers(List<PriceTier> tiers)

      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

      void setDiscounted(DiscountedPrice discounted)

      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 the discounted 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

      void setCustom(CustomFields custom)

      Custom Fields for the StandalonePrice.

      Specified by:
      setCustom in interface Customizable<StandalonePrice>
      Parameters:
      custom - value to be set
    • setStaged

      void setStaged(StagedStandalonePrice staged)

      Staged changes of the StandalonePrice. Only present if the StandalonePrice has some changes staged.

      Parameters:
      staged - value to be set
    • setActive

      void setActive(Boolean active)

      If set to true, the StandalonePrice is considered during Product price selection. If set to false, 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

      static StandalonePrice of()
      factory method
      Returns:
      instance of StandalonePrice
    • of

      static StandalonePrice of(StandalonePrice template)
      factory method to create a shallow copy StandalonePrice
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static StandalonePrice deepCopy(@Nullable StandalonePrice template)
      factory method to create a deep copy of StandalonePrice
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static StandalonePriceBuilder builder()
      builder factory method for StandalonePrice
      Returns:
      builder
    • builder

      static StandalonePriceBuilder builder(StandalonePrice template)
      create builder for StandalonePrice instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withStandalonePrice

      default <T> T withStandalonePrice(Function<StandalonePrice,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • referenceTypeId

      static ReferenceTypeId referenceTypeId()
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<StandalonePrice> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference