Class PriceImportImpl

java.lang.Object
com.commercetools.importapi.models.prices.PriceImportImpl
All Implemented Interfaces:
ImportResource, PriceImport, io.vrap.rmf.base.client.ModelBase

public class PriceImportImpl extends Object implements PriceImport, io.vrap.rmf.base.client.ModelBase

The data representation for a price to be imported that is persisted as a Price in the Project.

  • Constructor Details

    • PriceImportImpl

      public PriceImportImpl()
      create empty instance
  • Method Details

    • getKey

      public String getKey()

      User-defined unique identifier for the Embedded Price. If a Price with this key exists on the specified productVariant, it will be updated with the imported data.

      Specified by:
      getKey in interface ImportResource
      Specified by:
      getKey in interface PriceImport
      Returns:
      key
    • getValue

      public TypedMoney getValue()

      Maps to Price.value.

      Specified by:
      getValue in interface PriceImport
      Returns:
      value
    • getCountry

      public String getCountry()

      Maps to Price.county.

      Specified by:
      getCountry in interface PriceImport
      Returns:
      country
    • getValidFrom

      public ZonedDateTime getValidFrom()

      Maps to Price.validFrom.

      Specified by:
      getValidFrom in interface PriceImport
      Returns:
      validFrom
    • getValidUntil

      public ZonedDateTime getValidUntil()

      Maps to Price.validUntil.

      Specified by:
      getValidUntil in interface PriceImport
      Returns:
      validUntil
    • getCustomerGroup

      public CustomerGroupKeyReference getCustomerGroup()

      The Reference to the CustomerGroup with which the Price is associated. If referenced CustomerGroup does not exist, the state of the ImportOperation will be set to unresolved until the necessary CustomerGroup is created.

      Specified by:
      getCustomerGroup in interface PriceImport
      Returns:
      customerGroup
    • getChannel

      public ChannelKeyReference getChannel()

      The Reference to the Channel with which the Price is associated. If referenced Channel does not exist, the state of the ImportOperation will be set to unresolved until the necessary Channel is created.

      Specified by:
      getChannel in interface PriceImport
      Returns:
      channel
    • getDiscounted

      public DiscountedPrice getDiscounted()

      Sets a discounted price from an external service.

      Specified by:
      getDiscounted in interface PriceImport
      Returns:
      discounted
    • getPublish

      public Boolean getPublish()

      Only the Embedded Price updates will be published to staged and current projection.

      Specified by:
      getPublish in interface PriceImport
      Returns:
      publish
    • getTiers

      public List<PriceTier> getTiers()

      The tiered prices for this price.

      Specified by:
      getTiers in interface PriceImport
      Returns:
      tiers
    • getCustom

      public Custom getCustom()

      The custom fields for this price.

      Specified by:
      getCustom in interface PriceImport
      Returns:
      custom
    • getProductVariant

      public ProductVariantKeyReference getProductVariant()

      The ProductVariant in which this Embedded Price is contained. The Reference to the ProductVariant with which the Price is associated. If referenced ProductVariant does not exist, the state of the ImportOperation will be set to unresolved until the necessary ProductVariant is created.

      Specified by:
      getProductVariant in interface PriceImport
      Returns:
      productVariant
    • getProduct

      public ProductKeyReference getProduct()

      The Product in which the Product Variant containing this Embedded Price is contained. Maps to ProductVariant.product. The Reference to the Product with which the Price is associated. If referenced Product does not exist, the state of the ImportOperation will be set to unresolved until the necessary Product is created.

      Specified by:
      getProduct in interface PriceImport
      Returns:
      product
    • setKey

      public void setKey(String key)
      Description copied from interface: PriceImport

      User-defined unique identifier for the Embedded Price. If a Price with this key exists on the specified productVariant, it will be updated with the imported data.

      Specified by:
      setKey in interface ImportResource
      Specified by:
      setKey in interface PriceImport
      Parameters:
      key - value to be set
    • setValue

      public void setValue(TypedMoney value)
      Description copied from interface: PriceImport

      Maps to Price.value.

      Specified by:
      setValue in interface PriceImport
      Parameters:
      value - value to be set
    • setCountry

      public void setCountry(String country)
      Description copied from interface: PriceImport

      Maps to Price.county.

      Specified by:
      setCountry in interface PriceImport
      Parameters:
      country - value to be set
    • setValidFrom

      public void setValidFrom(ZonedDateTime validFrom)
      Description copied from interface: PriceImport

      Maps to Price.validFrom.

      Specified by:
      setValidFrom in interface PriceImport
      Parameters:
      validFrom - value to be set
    • setValidUntil

      public void setValidUntil(ZonedDateTime validUntil)
      Description copied from interface: PriceImport

      Maps to Price.validUntil.

      Specified by:
      setValidUntil in interface PriceImport
      Parameters:
      validUntil - value to be set
    • setCustomerGroup

      public void setCustomerGroup(CustomerGroupKeyReference customerGroup)
      Description copied from interface: PriceImport

      The Reference to the CustomerGroup with which the Price is associated. If referenced CustomerGroup does not exist, the state of the ImportOperation will be set to unresolved until the necessary CustomerGroup is created.

      Specified by:
      setCustomerGroup in interface PriceImport
      Parameters:
      customerGroup - value to be set
    • setChannel

      public void setChannel(ChannelKeyReference channel)
      Description copied from interface: PriceImport

      The Reference to the Channel with which the Price is associated. If referenced Channel does not exist, the state of the ImportOperation will be set to unresolved until the necessary Channel is created.

      Specified by:
      setChannel in interface PriceImport
      Parameters:
      channel - value to be set
    • setDiscounted

      public void setDiscounted(DiscountedPrice discounted)
      Description copied from interface: PriceImport

      Sets a discounted price from an external service.

      Specified by:
      setDiscounted in interface PriceImport
      Parameters:
      discounted - value to be set
    • setPublish

      public void setPublish(Boolean publish)
      Description copied from interface: PriceImport

      Only the Embedded Price updates will be published to staged and current projection.

      Specified by:
      setPublish in interface PriceImport
      Parameters:
      publish - value to be set
    • setTiers

      public void setTiers(PriceTier... tiers)
      Description copied from interface: PriceImport

      The tiered prices for this price.

      Specified by:
      setTiers in interface PriceImport
      Parameters:
      tiers - values to be set
    • setTiers

      public void setTiers(List<PriceTier> tiers)
      Description copied from interface: PriceImport

      The tiered prices for this price.

      Specified by:
      setTiers in interface PriceImport
      Parameters:
      tiers - values to be set
    • setCustom

      public void setCustom(Custom custom)
      Description copied from interface: PriceImport

      The custom fields for this price.

      Specified by:
      setCustom in interface PriceImport
      Parameters:
      custom - value to be set
    • setProductVariant

      public void setProductVariant(ProductVariantKeyReference productVariant)
      Description copied from interface: PriceImport

      The ProductVariant in which this Embedded Price is contained. The Reference to the ProductVariant with which the Price is associated. If referenced ProductVariant does not exist, the state of the ImportOperation will be set to unresolved until the necessary ProductVariant is created.

      Specified by:
      setProductVariant in interface PriceImport
      Parameters:
      productVariant - value to be set
    • setProduct

      public void setProduct(ProductKeyReference product)
      Description copied from interface: PriceImport

      The Product in which the Product Variant containing this Embedded Price is contained. Maps to ProductVariant.product. The Reference to the Product with which the Price is associated. If referenced Product does not exist, the state of the ImportOperation will be set to unresolved until the necessary Product is created.

      Specified by:
      setProduct in interface PriceImport
      Parameters:
      product - value to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object