Interface CartClassificationType

All Superinterfaces:
ShippingRateInputType

public interface CartClassificationType extends ShippingRateInputType

Used when the ShippingRate maps to an abstract Cart categorization expressed by strings (for example, Light, Medium, or Heavy). Only keys defined in the values array can be used to create a tier or to set a value of the shippingRateInput on the Cart. Keys must be unique.


Example to create an instance using the builder pattern

     CartClassificationType cartClassificationType = CartClassificationType.builder()
             .plusValues(valuesBuilder -> valuesBuilder)
             .build()
 
  • Field Details

    • CART_CLASSIFICATION

      static final String CART_CLASSIFICATION
      discriminator value for CartClassificationType
      See Also:
  • Method Details

    • getValues

      @NotNull @Valid @NotNull @Valid List<CustomFieldLocalizedEnumValue> getValues()

      The classification items that can be used for specifying any ShippingRatePriceTier.

      Returns:
      values
    • setValues

      void setValues(CustomFieldLocalizedEnumValue... values)

      The classification items that can be used for specifying any ShippingRatePriceTier.

      Parameters:
      values - values to be set
    • setValues

      void setValues(List<CustomFieldLocalizedEnumValue> values)

      The classification items that can be used for specifying any ShippingRatePriceTier.

      Parameters:
      values - values to be set
    • of

      factory method
      Returns:
      instance of CartClassificationType
    • of

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

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

      builder factory method for CartClassificationType
      Returns:
      builder
    • builder

      create builder for CartClassificationType instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCartClassificationType

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