Interface TaxCategory

All Superinterfaces:
BaseResource, DomainResource<TaxCategory>, Identifiable<TaxCategory>, Referencable<TaxCategory>, ResourceIdentifiable<TaxCategory>, TaxCategoryMixin, Versioned<TaxCategory>, WithKey

TaxCategory
Example to create an instance using the builder pattern

     TaxCategory taxCategory = TaxCategory.builder()
             .id("{id}")
             .version(0.3)
             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .name("{name}")
             .plusRates(ratesBuilder -> ratesBuilder)
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the TaxCategory.

      Specified by:
      getId in interface BaseResource
      Specified by:
      getId in interface DomainResource<TaxCategory>
      Specified by:
      getId in interface Identifiable<TaxCategory>
      Specified by:
      getId in interface Versioned<TaxCategory>
      Returns:
      id
    • getVersion

      @NotNull @NotNull Long getVersion()

      Current version of the TaxCategory.

      Specified by:
      getVersion in interface BaseResource
      Specified by:
      getVersion in interface DomainResource<TaxCategory>
      Specified by:
      getVersion in interface Versioned<TaxCategory>
      Returns:
      version
    • getCreatedAt

      @NotNull @NotNull ZonedDateTime getCreatedAt()

      Date and time (UTC) the TaxCategory was initially created.

      Specified by:
      getCreatedAt in interface BaseResource
      Returns:
      createdAt
    • getLastModifiedAt

      @NotNull @NotNull ZonedDateTime getLastModifiedAt()

      Date and time (UTC) the TaxCategory was last updated.

      Specified by:
      getLastModifiedAt in interface BaseResource
      Returns:
      lastModifiedAt
    • getLastModifiedBy

      @Valid @Valid LastModifiedBy getLastModifiedBy()

      Present on resources created after 1 February 2019 except for events not tracked.

      Returns:
      lastModifiedBy
    • getCreatedBy

      @Valid @Valid CreatedBy getCreatedBy()

      Present on resources created after 1 February 2019 except for events not tracked.

      Returns:
      createdBy
    • getName

      @NotNull @NotNull String getName()

      Name of the TaxCategory.

      Returns:
      name
    • getDescription

      String getDescription()

      Description of the TaxCategory.

      Returns:
      description
    • getRates

      @NotNull @Valid @NotNull @Valid List<TaxRate> getRates()

      Tax rates and subrates of states and countries. Each TaxRate in the array has a unique ID.

      Returns:
      rates
    • getKey

      String getKey()

      User-defined unique identifier of the TaxCategory.

      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • setId

      void setId(String id)

      Unique identifier of the TaxCategory.

      Specified by:
      setId in interface BaseResource
      Parameters:
      id - value to be set
    • setVersion

      void setVersion(Long version)

      Current version of the TaxCategory.

      Specified by:
      setVersion in interface BaseResource
      Parameters:
      version - value to be set
    • setCreatedAt

      void setCreatedAt(ZonedDateTime createdAt)

      Date and time (UTC) the TaxCategory was initially created.

      Specified by:
      setCreatedAt in interface BaseResource
      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      void setLastModifiedAt(ZonedDateTime lastModifiedAt)

      Date and time (UTC) the TaxCategory was last updated.

      Specified by:
      setLastModifiedAt in interface BaseResource
      Parameters:
      lastModifiedAt - value to be set
    • setLastModifiedBy

      void setLastModifiedBy(LastModifiedBy lastModifiedBy)

      Present on resources created after 1 February 2019 except for events not tracked.

      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      void setCreatedBy(CreatedBy createdBy)

      Present on resources created after 1 February 2019 except for events not tracked.

      Parameters:
      createdBy - value to be set
    • setName

      void setName(String name)

      Name of the TaxCategory.

      Parameters:
      name - value to be set
    • setDescription

      void setDescription(String description)

      Description of the TaxCategory.

      Parameters:
      description - value to be set
    • setRates

      void setRates(TaxRate... rates)

      Tax rates and subrates of states and countries. Each TaxRate in the array has a unique ID.

      Parameters:
      rates - values to be set
    • setRates

      void setRates(List<TaxRate> rates)

      Tax rates and subrates of states and countries. Each TaxRate in the array has a unique ID.

      Parameters:
      rates - values to be set
    • setKey

      void setKey(String key)

      User-defined unique identifier of the TaxCategory.

      Parameters:
      key - value to be set
    • of

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

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

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

      static TaxCategoryBuilder builder()
      builder factory method for TaxCategory
      Returns:
      builder
    • builder

      static TaxCategoryBuilder builder(TaxCategory template)
      create builder for TaxCategory instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withTaxCategory

      default <T> T withTaxCategory(Function<TaxCategory,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • referenceTypeId

      static ReferenceTypeId referenceTypeId()
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<TaxCategory> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference