Class TaxCategoryBuilder
- All Implemented Interfaces:
Builder<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()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddRates
(Function<TaxRateBuilder, TaxRate> builder) Tax rates and subrates of states and countries.build()
builds TaxCategory with checking for non-null required valuesbuilds TaxCategory without checking for non-null required valuescreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the TaxCategory was initially created.IDs and references that created the TaxCategory.createdBy
(Function<CreatedByBuilder, CreatedByBuilder> builder) IDs and references that created the TaxCategory.description
(String description) Description of the TaxCategory.Date and time (UTC) the TaxCategory was initially created.IDs and references that created the TaxCategory.Description of the TaxCategory.getId()
Unique identifier of the TaxCategory.getKey()
User-defined unique identifier of the TaxCategory.Date and time (UTC) the TaxCategory was last updated.IDs and references that last modified the TaxCategory.getName()
Name of the TaxCategory.getRates()
Tax rates and subrates of states and countries.Current version of the TaxCategory.Unique identifier of the TaxCategory.User-defined unique identifier of the TaxCategory.lastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the TaxCategory was last updated.lastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the TaxCategory.IDs and references that last modified the TaxCategory.Name of the TaxCategory.static TaxCategoryBuilder
of()
factory method for an instance of TaxCategoryBuilderstatic TaxCategoryBuilder
of
(TaxCategory template) create builder for TaxCategory instanceTax rates and subrates of states and countries.plusRates
(Function<TaxRateBuilder, TaxRateBuilder> builder) Tax rates and subrates of states and countries.Tax rates and subrates of states and countries.Tax rates and subrates of states and countries.setRates
(Function<TaxRateBuilder, TaxRate> builder) Tax rates and subrates of states and countries.Current version of the TaxCategory.withCreatedBy
(Function<CreatedByBuilder, CreatedBy> builder) IDs and references that created the TaxCategory.IDs and references that last modified the TaxCategory.withRates
(Function<TaxRateBuilder, TaxRateBuilder> builder) Tax rates and subrates of states and countries.
-
Constructor Details
-
TaxCategoryBuilder
public TaxCategoryBuilder()
-
-
Method Details
-
id
Unique identifier of the TaxCategory.
- Parameters:
id
- value to be set- Returns:
- Builder
-
version
Current version of the TaxCategory.
- Parameters:
version
- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the TaxCategory was initially created.
- Parameters:
createdAt
- value to be set- Returns:
- Builder
-
lastModifiedAt
Date and time (UTC) the TaxCategory was last updated.
- Parameters:
lastModifiedAt
- value to be set- Returns:
- Builder
-
lastModifiedBy
public TaxCategoryBuilder lastModifiedBy(Function<LastModifiedByBuilder, LastModifiedByBuilder> builder) IDs and references that last modified the TaxCategory.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
withLastModifiedBy
public TaxCategoryBuilder withLastModifiedBy(Function<LastModifiedByBuilder, LastModifiedBy> builder) IDs and references that last modified the TaxCategory.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the TaxCategory.
- Parameters:
lastModifiedBy
- value to be set- Returns:
- Builder
-
createdBy
IDs and references that created the TaxCategory.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
withCreatedBy
IDs and references that created the TaxCategory.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
createdBy
IDs and references that created the TaxCategory.
- Parameters:
createdBy
- value to be set- Returns:
- Builder
-
name
Name of the TaxCategory.
- Parameters:
name
- value to be set- Returns:
- Builder
-
description
Description of the TaxCategory.
- Parameters:
description
- value to be set- Returns:
- Builder
-
rates
Tax rates and subrates of states and countries. Each TaxRate in the array has a unique ID.
- Parameters:
rates
- value to be set- Returns:
- Builder
-
rates
Tax rates and subrates of states and countries. Each TaxRate in the array has a unique ID.
- Parameters:
rates
- value to be set- Returns:
- Builder
-
plusRates
Tax rates and subrates of states and countries. Each TaxRate in the array has a unique ID.
- Parameters:
rates
- value to be set- Returns:
- Builder
-
plusRates
Tax rates and subrates of states and countries. Each TaxRate in the array has a unique ID.
- Parameters:
builder
- function to build the rates value- Returns:
- Builder
-
withRates
Tax rates and subrates of states and countries. Each TaxRate in the array has a unique ID.
- Parameters:
builder
- function to build the rates value- Returns:
- Builder
-
addRates
Tax rates and subrates of states and countries. Each TaxRate in the array has a unique ID.
- Parameters:
builder
- function to build the rates value- Returns:
- Builder
-
setRates
Tax rates and subrates of states and countries. Each TaxRate in the array has a unique ID.
- Parameters:
builder
- function to build the rates value- Returns:
- Builder
-
key
User-defined unique identifier of the TaxCategory.
- Parameters:
key
- value to be set- Returns:
- Builder
-
getId
Unique identifier of the TaxCategory.
- Returns:
- id
-
getVersion
Current version of the TaxCategory.
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the TaxCategory was initially created.
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the TaxCategory was last updated.
- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the TaxCategory.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the TaxCategory.
- Returns:
- createdBy
-
getName
Name of the TaxCategory.
- Returns:
- name
-
getDescription
Description of the TaxCategory.
- Returns:
- description
-
getRates
Tax rates and subrates of states and countries. Each TaxRate in the array has a unique ID.
- Returns:
- rates
-
getKey
User-defined unique identifier of the TaxCategory.
- Returns:
- key
-
build
builds TaxCategory with checking for non-null required values- Specified by:
build
in interfaceBuilder<TaxCategory>
- Returns:
- TaxCategory
-
buildUnchecked
builds TaxCategory without checking for non-null required values- Returns:
- TaxCategory
-
of
factory method for an instance of TaxCategoryBuilder- Returns:
- builder
-
of
create builder for TaxCategory instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-