Interface ExternalTaxAmountDraft

All Superinterfaces:
Draft<ExternalTaxAmountDraft>

public interface ExternalTaxAmountDraft extends Draft<ExternalTaxAmountDraft>

Cannot be used in LineItemDraft or CustomLineItemDraft.

Can only be set by these update actions:

  • Set LineItem TaxAmount, Set CustomLineItem TaxAmount, or Set ShippingMethod TaxAmount on Carts
  • Set LineItem TaxAmount, Set CustomLineItem TaxAmount, or Set ShippingMethod TaxAmount on Order Edits

Example to create an instance using the builder pattern

     ExternalTaxAmountDraft externalTaxAmountDraft = ExternalTaxAmountDraft.builder()
             .totalGross(totalGrossBuilder -> totalGrossBuilder)
             .taxRate(taxRateBuilder -> taxRateBuilder)
             .build()
 
  • Method Details

    • getTotalGross

      @NotNull @Valid @NotNull @Valid Money getTotalGross()

      Total gross amount (totalNet + taxPortions) of the Line Item or Custom Line Item.

      Returns:
      totalGross
    • getTaxRate

      @NotNull @Valid @NotNull @Valid ExternalTaxRateDraft getTaxRate()

      Tax Rates and subrates of states and countries.

      Returns:
      taxRate
    • setTotalGross

      void setTotalGross(Money totalGross)

      Total gross amount (totalNet + taxPortions) of the Line Item or Custom Line Item.

      Parameters:
      totalGross - value to be set
    • setTaxRate

      void setTaxRate(ExternalTaxRateDraft taxRate)

      Tax Rates and subrates of states and countries.

      Parameters:
      taxRate - value to be set
    • of

      factory method
      Returns:
      instance of ExternalTaxAmountDraft
    • of

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

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

      builder factory method for ExternalTaxAmountDraft
      Returns:
      builder
    • builder

      create builder for ExternalTaxAmountDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withExternalTaxAmountDraft

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