boolean totalitarianOffer,
OfferType offerType,
BigDecimal value
) {
Offer offer = new OfferImpl();
OfferRule customerRule = new OfferRuleImpl();
customerRule.setMatchRule(appliesToCustomerRules);
offer.getOfferMatchRules().put(OfferRuleType.CUSTOMER.getType(), customerRule);
OfferRule fgRule = new OfferRuleImpl();
fgRule.setMatchRule(appliesToFulfillmentGroupRules);
offer.getOfferMatchRules().put(OfferRuleType.FULFILLMENT_GROUP.getType(), fgRule);
OfferRule orderRule = new OfferRuleImpl();
orderRule.setMatchRule(appliesToRules);
offer.getOfferMatchRules().put(OfferRuleType.ORDER.getType(), orderRule);
offer.setApplyDiscountToSalePrice(applyToSalePrice);
offer.setCombinableWithOtherOffers(combinableWithOtherOffers);
offer.setDeliveryType(deliveryType);
offer.setAutomaticallyAdded(OfferDeliveryType.AUTOMATIC==deliveryType);