Exemplo n.º 1
0
 public ShippingCalculationContext(
     Customer customer,
     Address shippingAddress,
     CartItemCollection cartItems,
     decimal taxRate,
     bool shippingIsFreeIfIncludedInFreeList,
     decimal handlingExtraFee,
     bool excludeZeroFreightCosts,
     int storeId,
     decimal weight,
     CartSubtotalDelegate cartSubtotal)
 {
     Customer        = customer;
     ShippingAddress = shippingAddress;
     CartItems       = cartItems;
     TaxRate         = taxRate;
     ShippingIsFreeIfIncludedInFreeList = shippingIsFreeIfIncludedInFreeList;
     HandlingExtraFee        = handlingExtraFee;
     ExcludeZeroFreightCosts = excludeZeroFreightCosts;
     StoreId      = storeId;
     Weight       = weight;
     CartSubtotal = cartSubtotal;
 }
Exemplo n.º 2
0
 public ShippingCalculationContext(
     ShippingCalculationContext source,
     Customer customer            = null,
     Address shippingAddress      = null,
     CartItemCollection cartItems = null,
     decimal?taxRate = null,
     bool?shippingIsFreeIfIncludedInFreeList = null,
     decimal?handlingExtraFee     = null,
     bool?excludeZeroFreightCosts = null,
     int?storeId    = null,
     decimal?weight = null,
     CartSubtotalDelegate cartSubtotal = null)
 {
     Customer        = customer ?? source.Customer;
     ShippingAddress = shippingAddress ?? source.ShippingAddress;
     CartItems       = cartItems ?? source.CartItems;
     TaxRate         = taxRate ?? source.TaxRate;
     ShippingIsFreeIfIncludedInFreeList = shippingIsFreeIfIncludedInFreeList ?? source.ShippingIsFreeIfIncludedInFreeList;
     HandlingExtraFee        = handlingExtraFee ?? source.HandlingExtraFee;
     ExcludeZeroFreightCosts = excludeZeroFreightCosts ?? source.ExcludeZeroFreightCosts;
     StoreId      = storeId ?? source.StoreId;
     Weight       = weight ?? source.Weight;
     CartSubtotal = cartSubtotal ?? source.CartSubtotal;
 }