public final class SetCustomerGroup extends UpdateActionImpl<Customer>
See also CustomerUpdateCommand.
withB2cCustomerGroup(client(), customerGroup -> { withCustomer(client(), customer -> { assertThat(customer.getCustomerGroup()).isNull(); final Customer updateCustomer = client().executeBlocking(CustomerUpdateCommand.of(customer, SetCustomerGroup.of(customerGroup))); assertThat(updateCustomer.getCustomerGroup()).isEqualTo(customerGroup.toReference()); }); });
See the test code.
Customer
Modifier and Type | Method and Description |
---|---|
Reference<CustomerGroup> |
getCustomerGroup() |
static SetCustomerGroup |
of(Referenceable<CustomerGroup> customerGroup) |
getAction
public static SetCustomerGroup of(@Nullable Referenceable<CustomerGroup> customerGroup)
@Nullable public Reference<CustomerGroup> getCustomerGroup()