public PriceDraftDsl withCustomerGroup(@Nullable final Referenceable<CustomerGroup> customerGroup) { return PriceDraftBuilder.of(this).customerGroup(Optional.ofNullable(customerGroup).map(c -> c.toReference()).orElse(null)).build(); }
public PriceDraftDsl withCustomerGroup(@Nullable final Referenceable<CustomerGroup> customerGroup) { return PriceDraftBuilder.of(this).customerGroup(Optional.ofNullable(customerGroup).map(c -> c.toReference()).orElse(null)).build(); }
public PriceDraftDsl withCustomerGroup(@Nullable final Referenceable<CustomerGroup> customerGroup) { return PriceDraftBuilder.of(this).customerGroup(Optional.ofNullable(customerGroup).map(c -> c.toReference()).orElse(null)).build(); }
public static PriceDraftBuilder of(final Price template) { return of(template.getValue()) .country(template.getCountry()) .customerGroup(template.getCustomerGroup()) .channel(Optional.ofNullable(template.getChannel()).map(Referenceable::toResourceIdentifier).orElse(null)) .validFrom(template.getValidFrom()) .validUntil(template.getValidUntil()) .custom(copyCustom(template)); } }
public static PriceDraftBuilder of(final Price template) { return of(template.getValue()) .country(template.getCountry()) .customerGroup(template.getCustomerGroup()) .channel(Optional.ofNullable(template.getChannel()).map(Referenceable::toResourceIdentifier).orElse(null)) .validFrom(template.getValidFrom()) .validUntil(template.getValidUntil()) .custom(copyCustom(template)); } }
public static PriceDraftDsl of(final Price template) { final ResourceIdentifier<Channel> channelResourceIdentifier = Optional.ofNullable(template.getChannel()).map(Referenceable::toResourceIdentifier).orElse(null); return PriceDraftBuilder.of(template.getValue()) .country(template.getCountry()) .customerGroup(template.getCustomerGroup()) .channel(channelResourceIdentifier) .validFrom(template.getValidFrom()) .validUntil(template.getValidUntil()) .custom(customFieldsDraftOrNull(template)) .tiers(template.getTiers()) .build(); }
public static PriceDraftDsl of(final Price template) { final ResourceIdentifier<Channel> channelResourceIdentifier = Optional.ofNullable(template.getChannel()).map(Referenceable::toResourceIdentifier).orElse(null); return PriceDraftBuilder.of(template.getValue()) .country(template.getCountry()) .customerGroup(template.getCustomerGroup()) .channel(channelResourceIdentifier) .validFrom(template.getValidFrom()) .validUntil(template.getValidUntil()) .custom(customFieldsDraftOrNull(template)) .tiers(template.getTiers()) .build(); }
public static PriceDraftBuilder of(final PriceDraft template) { return of(template.getValue()) .country(template.getCountry()) .customerGroup(template.getCustomerGroup()) .channel(template.getChannel()) .validFrom(template.getValidFrom()) .validUntil(template.getValidUntil()) .custom(template.getCustom()); }
public static PriceDraftBuilder of(final PriceDraft template) { return of(template.getValue()) .country(template.getCountry()) .customerGroup(template.getCustomerGroup()) .channel(template.getChannel()) .validFrom(template.getValidFrom()) .validUntil(template.getValidUntil()) .custom(template.getCustom()); }
public static PriceDraftBuilder of(final PriceDraft template) { return of(template.getValue()) .country(template.getCountry()) .customerGroup(template.getCustomerGroup()) .channel(template.getChannel()) .validFrom(template.getValidFrom()) .validUntil(template.getValidUntil()) .custom(template.getCustom()); }
public static PriceDraftDsl of(final Price template) { return PriceDraftBuilder.of(template.getValue()) .country(template.getCountry()) .customerGroup(template.getCustomerGroup()) .channel(template.getChannel()) .validFrom(template.getValidFrom()) .validUntil(template.getValidUntil()) .custom(customFieldsDraftOrNull(template)) .build(); }