public PriceDraftDsl withChannel(@Nullable final Referenceable<Channel> channel) { final Reference<Channel> channelReference = Optional.ofNullable(channel).map(Referenceable::toReference).orElse(null); return PriceDraftBuilder.of(this).channel(channelReference).build(); }
public PriceDraftDsl withChannel(@Nullable final Referenceable<Channel> channel) { final ResourceIdentifier<Channel> channelResourceIdentifier = Optional.ofNullable(channel).map(Referenceable::toResourceIdentifier).orElse(null); return PriceDraftBuilder.of(this).channel(channelResourceIdentifier).build(); }
public PriceDraftDsl withChannel(@Nullable final Referenceable<Channel> channel) { final ResourceIdentifier<Channel> channelResourceIdentifier = Optional.ofNullable(channel).map(Referenceable::toResourceIdentifier).orElse(null); return PriceDraftBuilder.of(this).channel(channelResourceIdentifier).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(); }