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 associated 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()

      Maps to shippingInfo.shippingMethodName.

      Returns:
      shippingMethodName
    • getPrice

      @NotNull @Valid @NotNull @Valid TypedMoney getPrice()

      Maps to shippingInfo.price.

      Returns:
      price
    • getShippingRate

      @NotNull @Valid @NotNull @Valid ShippingRateDraft getShippingRate()

      Used to determine the price.

      Returns:
      shippingRate
    • getTaxRate

      @Valid @Valid TaxRate getTaxRate()

      Maps to shippingInfo.taxRate.

      Returns:
      taxRate
    • getTaxCategory

      @Valid @Valid TaxCategoryKeyReference getTaxCategory()

      Maps to shippingInfo.taxCategory. If the referenced TaxCategory does not exist, the state of the ImportOperation will be set to unresolved until the referenced TaxCategory is created.

      Returns:
      taxCategory
    • getShippingMethod

      @Valid @Valid ShippingMethodKeyReference getShippingMethod()

      Maps to shippingInfo.shippingMethod. If the referenced ShippingMethod does not exist, the state of the ImportOperation will be set to unresolved until the referenced ShippingMethod is created.

      Returns:
      shippingMethod
    • getDeliveries

      @Valid @Valid List<Delivery> getDeliveries()

      Maps to shippingInfo.deliveries. You cannot add a DeliveryItem on import, as LineItems and CustomLineItems are not yet referenceable by an id.

      Returns:
      deliveries
    • getDiscountedPrice

      @Valid @Valid DiscountedLineItemPriceDraft getDiscountedPrice()

      Maps to shippingInfo.discountedPrice.

      Returns:
      discountedPrice
    • getShippingMethodState

      ShippingMethodState getShippingMethodState()

      Maps to shippingInfo.shippingMethodState.

      Returns:
      shippingMethodState
    • setShippingMethodName

      void setShippingMethodName(String shippingMethodName)

      Maps to shippingInfo.shippingMethodName.

      Parameters:
      shippingMethodName - value to be set
    • setPrice

      void setPrice(TypedMoney price)

      Maps to shippingInfo.price.

      Parameters:
      price - value to be set
    • setShippingRate

      void setShippingRate(ShippingRateDraft shippingRate)

      Used to determine the price.

      Parameters:
      shippingRate - value to be set
    • setTaxRate

      void setTaxRate(TaxRate taxRate)

      Maps to shippingInfo.taxRate.

      Parameters:
      taxRate - value to be set
    • setTaxCategory

      void setTaxCategory(TaxCategoryKeyReference taxCategory)

      Maps to shippingInfo.taxCategory. If the referenced TaxCategory does not exist, the state of the ImportOperation will be set to unresolved until the referenced TaxCategory is created.

      Parameters:
      taxCategory - value to be set
    • setShippingMethod

      void setShippingMethod(ShippingMethodKeyReference shippingMethod)

      Maps to shippingInfo.shippingMethod. If the referenced ShippingMethod does not exist, the state of the ImportOperation will be set to unresolved until the referenced ShippingMethod is created.

      Parameters:
      shippingMethod - value to be set
    • setDeliveries

      void setDeliveries(Delivery... deliveries)

      Maps to shippingInfo.deliveries. You cannot add a DeliveryItem on import, as LineItems and CustomLineItems are not yet referenceable by an id.

      Parameters:
      deliveries - values to be set
    • setDeliveries

      void setDeliveries(List<Delivery> deliveries)

      Maps to shippingInfo.deliveries. You cannot add a DeliveryItem on import, as LineItems and CustomLineItems are not yet referenceable by an id.

      Parameters:
      deliveries - values to be set
    • setDiscountedPrice

      void setDiscountedPrice(DiscountedLineItemPriceDraft discountedPrice)

      Maps to shippingInfo.discountedPrice.

      Parameters:
      discountedPrice - value to be set
    • setShippingMethodState

      void setShippingMethodState(ShippingMethodState shippingMethodState)

      Maps to shippingInfo.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
    • copyDeep

    • deepCopy

      @Nullable static ShippingInfoImportDraft deepCopy(@Nullable ShippingInfoImportDraft template)
      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