public final class SetCountry extends UpdateActionImpl<Cart>
See also CartInStoreUpdateCommand.
final Cart cart = createCartWithoutCountry(client()); assertThat(cart.getCountry()).isNull(); final Cart cartWithCountry = client().executeBlocking(CartUpdateCommand.of(cart, SetCountry.of(DE))); assertThat(cartWithCountry.getCountry()).isEqualTo(DE); final Cart cartWithoutCountry = client().executeBlocking(CartUpdateCommand.of(cartWithCountry, SetCountry.of(null))); assertThat(cartWithoutCountry.getCountry()).isNull();
See the test code.
Modifier and Type | Method and Description |
---|---|
com.neovisionaries.i18n.CountryCode |
getCountry() |
static SetCountry |
of(com.neovisionaries.i18n.CountryCode country) |
getAction
public static SetCountry of(@Nullable com.neovisionaries.i18n.CountryCode country)
@Nullable public com.neovisionaries.i18n.CountryCode getCountry()