Class TaxCategoryDraftBuilder
java.lang.Object
com.commercetools.api.models.tax_category.TaxCategoryDraftBuilder
- All Implemented Interfaces:
Builder<TaxCategoryDraft>
TaxCategoryDraftBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
TaxCategoryDraft taxCategoryDraft = TaxCategoryDraft.builder()
.name("{name}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddRates
(Function<TaxRateDraftBuilder, TaxRateDraft> builder) Tax rates and subrates of states and countries.build()
builds TaxCategoryDraft with checking for non-null required valuesbuilds TaxCategoryDraft without checking for non-null required valuesdescription
(String description) Description of the TaxCategory.Description of the TaxCategory.getKey()
User-defined unique identifier for the TaxCategory.getName()
Name of the TaxCategory.getRates()
Tax rates and subrates of states and countries.User-defined unique identifier for the TaxCategory.Name of the TaxCategory.static TaxCategoryDraftBuilder
of()
factory method for an instance of TaxCategoryDraftBuilderstatic TaxCategoryDraftBuilder
of
(TaxCategoryDraft template) create builder for TaxCategoryDraft instanceplusRates
(TaxRateDraft... rates) Tax rates and subrates of states and countries.Tax rates and subrates of states and countries.rates
(TaxRateDraft... rates) Tax rates and subrates of states and countries.rates
(List<TaxRateDraft> rates) Tax rates and subrates of states and countries.setRates
(Function<TaxRateDraftBuilder, TaxRateDraft> builder) Tax rates and subrates of states and countries.Tax rates and subrates of states and countries.
-
Constructor Details
-
TaxCategoryDraftBuilder
public TaxCategoryDraftBuilder()
-
-
Method Details
-
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.
- Parameters:
rates
- value to be set- Returns:
- Builder
-
rates
Tax rates and subrates of states and countries.
- Parameters:
rates
- value to be set- Returns:
- Builder
-
plusRates
Tax rates and subrates of states and countries.
- Parameters:
rates
- value to be set- Returns:
- Builder
-
plusRates
Tax rates and subrates of states and countries.
- Parameters:
builder
- function to build the rates value- Returns:
- Builder
-
withRates
Tax rates and subrates of states and countries.
- Parameters:
builder
- function to build the rates value- Returns:
- Builder
-
addRates
Tax rates and subrates of states and countries.
- Parameters:
builder
- function to build the rates value- Returns:
- Builder
-
setRates
Tax rates and subrates of states and countries.
- Parameters:
builder
- function to build the rates value- Returns:
- Builder
-
key
User-defined unique identifier for the TaxCategory.
- Parameters:
key
- value to be set- Returns:
- Builder
-
getName
Name of the TaxCategory.
- Returns:
- name
-
getDescription
Description of the TaxCategory.
- Returns:
- description
-
getRates
Tax rates and subrates of states and countries.
- Returns:
- rates
-
getKey
User-defined unique identifier for the TaxCategory.
- Returns:
- key
-
build
builds TaxCategoryDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<TaxCategoryDraft>
- Returns:
- TaxCategoryDraft
-
buildUnchecked
builds TaxCategoryDraft without checking for non-null required values- Returns:
- TaxCategoryDraft
-
of
factory method for an instance of TaxCategoryDraftBuilder- Returns:
- builder
-
of
create builder for TaxCategoryDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-