Interface TaxRate


public interface TaxRate
TaxRate
Example to create an instance using the builder pattern

     TaxRate taxRate = TaxRate.builder()
             .name("{name}")
             .amount(0.3)
             .includedInPrice(true)
             .country("{country}")
             .build()
 
  • Method Details

    • getId

      String getId()
      Returns:
      id
    • getName

      @NotNull @NotNull String getName()
      Returns:
      name
    • getAmount

      @NotNull @NotNull Double getAmount()
      Returns:
      amount
    • getIncludedInPrice

      @NotNull @NotNull Boolean getIncludedInPrice()
      Returns:
      includedInPrice
    • getCountry

      @NotNull @NotNull String getCountry()

      A two-digit country code as per ISO 3166-1 alpha-2.

      Returns:
      country
    • getState

      String getState()
      Returns:
      state
    • getSubRates

      @Valid @Valid List<SubRate> getSubRates()
      Returns:
      subRates
    • setId

      void setId(String id)
      set id
      Parameters:
      id - value to be set
    • setName

      void setName(String name)
      set name
      Parameters:
      name - value to be set
    • setAmount

      void setAmount(Double amount)
      set amount
      Parameters:
      amount - value to be set
    • setIncludedInPrice

      void setIncludedInPrice(Boolean includedInPrice)
      set includedInPrice
      Parameters:
      includedInPrice - value to be set
    • setCountry

      void setCountry(String country)

      A two-digit country code as per ISO 3166-1 alpha-2.

      Parameters:
      country - value to be set
    • setState

      void setState(String state)
      set state
      Parameters:
      state - value to be set
    • setSubRates

      void setSubRates(SubRate... subRates)
      set subRates
      Parameters:
      subRates - values to be set
    • setSubRates

      void setSubRates(List<SubRate> subRates)
      set subRates
      Parameters:
      subRates - values to be set
    • of

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

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

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

      static TaxRateBuilder builder()
      builder factory method for TaxRate
      Returns:
      builder
    • builder

      static TaxRateBuilder builder(TaxRate template)
      create builder for TaxRate instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withTaxRate

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