public interface TaxCategoryCreateCommand extends DraftBasedCreateCommandDsl<TaxCategory,TaxCategoryDraft,TaxCategoryCreateCommand>, MetaModelReferenceExpansionDsl<TaxCategory,TaxCategoryCreateCommand,TaxCategoryExpansionModel<TaxCategory>>
TaxCategory.
final TaxRateDraft taxRate = TaxRateDraft.of("GERMAN default tax", 0.19, false, DE); final TaxCategoryDraft taxCategoryDraft = TaxCategoryDraftBuilder.of("German tax", singletonList(taxRate), "Normal-Steuersatz").key(KEY).build(); final TaxCategory taxCategory = client().executeBlocking(TaxCategoryCreateCommand.of(taxCategoryDraft)); return taxCategory;See the test code.
TaxCategoryDraft,
TaxCategory| Modifier and Type | Method and Description |
|---|---|
static TaxCategoryCreateCommand |
of(TaxCategoryDraft draft)
Creates a command object to create a
TaxCategory. |
getDraft, withDraftcanDeserialize, deserialize, httpRequestIntentplusExpansionPaths, withExpansionPathsplusExpansionPaths, plusExpansionPaths, plusExpansionPaths, plusExpansionPaths, withExpansionPaths, withExpansionPaths, withExpansionPaths, withExpansionPathsexpansionPathsstatic TaxCategoryCreateCommand of(TaxCategoryDraft draft)
TaxCategory.draft - template to create the new object