/** * Creates a new builder with the values of this object. * * @return new builder */ public TaxCategoryDraftBuilder newBuilder() { return new TaxCategoryDraftBuilder(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 TaxCategoryDraftBuilder of(final String name, final List<TaxRateDraft> taxRates, @Nullable final String description) { return new TaxCategoryDraftBuilder(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 TaxCategoryDraftBuilder of(final TaxCategoryDraft template) { return new TaxCategoryDraftBuilder(template.getDescription(), template.getKey(), template.getName(), template.getTaxRates()); } }