/** * Creates a new instance of {@code TaxCategoryDraftDsl} with the values of this builder. * * @return the instance */ public TaxCategoryDraftDsl build() { return new TaxCategoryDraftDsl(description, key, name, taxRates); }
/** * Creates a new object initialized with the given values. * * @param name initial value for the {@link TaxCategoryDraft#getName()} property * @param taxRates initial value for the {@link TaxCategoryDraft#getTaxRates()} property * @param description initial value for the {@link TaxCategoryDraft#getDescription()} property * @return new object initialized with the given values */ public static TaxCategoryDraftDsl of(final String name, final List<TaxRateDraft> taxRates, @Nullable final String description) { return new TaxCategoryDraftDsl(description, null, name, taxRates); }
/** * Creates a new object initialized with the fields of the template parameter. * * @param template the template * @return a new object initialized from the template */ public static TaxCategoryDraftDsl of(final TaxCategoryDraft template) { return new TaxCategoryDraftDsl(template.getDescription(), template.getKey(), template.getName(), template.getTaxRates()); } }