Interface ShippingInfoImportDraft

All Superinterfaces:
Draft<ShippingInfoImportDraft>

public interface ShippingInfoImportDraft extends Draft<ShippingInfoImportDraft>

Maps to an order's shippingInfo property. This field is usually populated by the cart assosciated with the order, but when importing orders you must provide a draft representation as a part of the OrderImport.


Example to create an instance using the builder pattern

     ShippingInfoImportDraft shippingInfoImportDraft = ShippingInfoImportDraft.builder()
             .shippingMethodName("{shippingMethodName}")
             .price(priceBuilder -> priceBuilder)
             .shippingRate(shippingRateBuilder -> shippingRateBuilder)
             .build()
 
  • Method Details

    • getShippingMethodName

      @NotNull @NotNull String getShippingMethodName()
      Returns:
      shippingMethodName
    • getPrice

      @NotNull @Valid @NotNull @Valid TypedMoney getPrice()
      Returns:
      price
    • getShippingRate

      @NotNull @Valid @NotNull @Valid ShippingRateDraft getShippingRate()
      Returns:
      shippingRate
    • getTaxRate

      @Valid @Valid TaxRate getTaxRate()
      Returns:
      taxRate
    • getTaxCategory

      @Valid @Valid TaxCategoryKeyReference getTaxCategory()

      References a tax category by key.

      Returns:
      taxCategory
    • getShippingMethod

      @Valid @Valid ShippingMethodKeyReference getShippingMethod()

      References a shipping method by key.

      Returns:
      shippingMethod
    • getDeliveries

      @Valid @Valid List<Delivery> getDeliveries()

      Note that you can not add a DeliveryItem on import, as LineItems and CustomLineItems are not yet referencable by an id.

      Returns:
      deliveries
    • getDiscountedPrice

      @Valid @Valid DiscountedLineItemPriceDraft getDiscountedPrice()
      Returns:
      discountedPrice
    • getShippingMethodState

      ShippingMethodState getShippingMethodState()
      Returns:
      shippingMethodState
    • setShippingMethodName

      void setShippingMethodName(String shippingMethodName)
      set shippingMethodName
      Parameters:
      shippingMethodName - value to be set
    • setPrice

      void setPrice(TypedMoney price)
      set price
      Parameters:
      price - value to be set
    • setShippingRate

      void setShippingRate(ShippingRateDraft shippingRate)
      set shippingRate
      Parameters:
      shippingRate - value to be set
    • setTaxRate

      void setTaxRate(TaxRate taxRate)
      set taxRate
      Parameters:
      taxRate - value to be set
    • setTaxCategory

      void setTaxCategory(TaxCategoryKeyReference taxCategory)

      References a tax category by key.

      Parameters:
      taxCategory - value to be set
    • setShippingMethod

      void setShippingMethod(ShippingMethodKeyReference shippingMethod)

      References a shipping method by key.

      Parameters:
      shippingMethod - value to be set
    • setDeliveries

      void setDeliveries(Delivery... deliveries)

      Note that you can not add a DeliveryItem on import, as LineItems and CustomLineItems are not yet referencable by an id.

      Parameters:
      deliveries - values to be set
    • setDeliveries

      void setDeliveries(List<Delivery> deliveries)

      Note that you can not add a DeliveryItem on import, as LineItems and CustomLineItems are not yet referencable by an id.

      Parameters:
      deliveries - values to be set
    • setDiscountedPrice

      void setDiscountedPrice(DiscountedLineItemPriceDraft discountedPrice)
      set discountedPrice
      Parameters:
      discountedPrice - value to be set
    • setShippingMethodState

      void setShippingMethodState(ShippingMethodState shippingMethodState)
      set shippingMethodState
      Parameters:
      shippingMethodState - value to be set
    • of

      factory method
      Returns:
      instance of ShippingInfoImportDraft
    • of

      factory method to create a shallow copy ShippingInfoImportDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of ShippingInfoImportDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for ShippingInfoImportDraft
      Returns:
      builder
    • builder

      create builder for ShippingInfoImportDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withShippingInfoImportDraft

      default <T> T withShippingInfoImportDraft(Function<ShippingInfoImportDraft,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<ShippingInfoImportDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference