public final class ChangeTaxCategory extends UpdateActionImpl<ShippingMethod>
See also ShippingMethodUpdateCommand.
final TaxCategory newTaxCategory = TaxCategoryFixtures.defaultTaxCategory(client()); withUpdateableShippingMethod(client(), shippingMethod -> { assertThat(shippingMethod.getTaxCategory().getId()).isNotEqualTo(newTaxCategory.getId()); final ShippingMethodUpdateCommand cmd = ShippingMethodUpdateCommand.of(shippingMethod, ChangeTaxCategory.of(newTaxCategory)); final ShippingMethod updatedShippingMethod = client().executeBlocking(cmd); assertThat(updatedShippingMethod.getTaxCategory().getId()).isEqualTo(newTaxCategory.getId()); return updatedShippingMethod; });
See the test code.
Modifier and Type | Method and Description |
---|---|
ResourceIdentifier<TaxCategory> |
getTaxCategory() |
static ChangeTaxCategory |
of(Referenceable<TaxCategory> taxCategory) |
static ChangeTaxCategory |
of(ResourceIdentifier<TaxCategory> taxCategory) |
getAction
public ResourceIdentifier<TaxCategory> getTaxCategory()
public static ChangeTaxCategory of(Referenceable<TaxCategory> taxCategory)
public static ChangeTaxCategory of(ResourceIdentifier<TaxCategory> taxCategory)