public PriceBuilder customerGroup(final Referenceable<CustomerGroup> customerGroup) { Objects.requireNonNull(customerGroup); return customerGroup(Optional.of(customerGroup.toReference())); }
public PriceBuilder customerGroup(final Referenceable<CustomerGroup> customerGroup) { Objects.requireNonNull(customerGroup); return customerGroup(Optional.of(customerGroup.toReference())); }
public Price withCustomerGroup(@Nullable final Referenceable<CustomerGroup> customerGroup) { return PriceBuilder.of(this).customerGroup(Optional.ofNullable(customerGroup).map(c -> c.toReference()).orElse(null)).build(); }
default Price withCustomerGroup(@Nullable final Referenceable<CustomerGroup> customerGroup) { return PriceBuilder.of(this).customerGroup(Optional.ofNullable(customerGroup).map(c -> c.toReference()).orElse(null)).build(); }
default Price withCustomerGroup(@Nullable final Referenceable<CustomerGroup> customerGroup) { return PriceBuilder.of(this).customerGroup(Optional.ofNullable(customerGroup).map(c -> c.toReference()).orElse(null)).build(); }
public Price withCustomerGroup(final Optional<Reference<CustomerGroup>> customerGroup) { return PriceBuilder.of(this).customerGroup(customerGroup).build(); }
public Price withCustomerGroup(final Optional<Reference<CustomerGroup>> customerGroup) { return PriceBuilder.of(this).customerGroup(customerGroup).build(); }
public static PriceBuilder of(final Price template) { return of(template.getValue()) .country(template.getCountry()) .customerGroup(template.getCustomerGroup()) .channel(template.getChannel()) .discounted(template.getDiscounted()); }
public static PriceBuilder of(final Price template) { return of(template.getValue()) .country(template.getCountry()) .customerGroup(template.getCustomerGroup()) .channel(template.getChannel()) .discounted(template.getDiscounted()); }
public static PriceBuilder of(final Price template) { return of(template.getValue()) .country(template.getCountry()) .customerGroup(template.getCustomerGroup()) .channel(template.getChannel()) .discounted(template.getDiscounted()) .validFrom(template.getValidFrom()) .validUntil(template.getValidUntil()) .id(template.getId()); }